Program recommendation method and device
By obtaining the user's historical and current behavior information and utilizing the encoding layer, collaborative attention module, and paired attention loss module in the program recommendation model to calculate the behavioral relevance, the problem of user behavior being difficult to distinguish under family sharing accounts is solved, enabling more accurate program recommendations.
Patent Information
- Application Number
- CN202311473035.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-06
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2043-11-06
AI Technical Summary
In the existing technology, the recommendation system cannot accurately distinguish the different user behaviors under the family sharing account, resulting in low accuracy of program recommendations.
By obtaining the user's first historical behavior information and current session behavior information, the encoding layer, session-aware collaborative attention module and pairwise attention loss module in the pre-trained program recommendation model are used to process these behavior information to calculate the relevance and output the probability of the user clicking on the candidate program.
The accuracy of program recommendations has been improved, and programs that match the current user's interests can be recommended more accurately.
Smart Images

Figure CN118803315B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method and device for program recommendation, an electronic device, and a storage medium. Background Art
[0002] With the rapid development of smart TVs, more and more programs can be watched on TV at any time. Unlike individual coupled behaviors, since TV is a household device, viewing behavior usually includes the behavior of different family members who share a family account. Therefore, the recommendation system cannot obtain the accurate identification of each viewing behavior.
[0003] In related technologies, recommendation models directly assume that behaviors come from the same user and generate recommendation results based on a complete set of historical behaviors. However, when directly processing coupled behaviors, the behaviors of other people will introduce a lot of noise, interfering with the model's judgment of user interests, resulting in low accuracy in program recommendations. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a method, device, electronic device and storage medium for program recommendation, so as to solve the problem of low accuracy of program recommendation.
[0005] To solve the above technical problems, the embodiments of the present application are implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for recommending programs, comprising: obtaining first historical behavior information and current session behavior information of a user; the first historical behavior information comprising: historical program information browsed by the user on a previously logged-in device; and the current session behavior information comprising: current program information browsed by the user on a currently logged-in device within a preset time;
[0007] Mapping the first historical behavior information and the current session behavior information to obtain a low-dimensional dense first historical behavior vector and a current session behavior vector;
[0008] Processing the input current session behavior vector through an encoding layer in a pre-trained program recommendation model to output first session information, where the first session information is used to characterize the current session behavior of the user;
[0009] The session-aware collaborative attention module in the program recommendation model processes the first session information, the first historical behavior vector, and the candidate program information, and outputs second historical behavior information, where the second historical behavior information is used to represent the relevance between the first historical behavior information and the first session information of the user.
[0010] performing feature enhancement processing on the second historical behavior vector inputted into the session-aware collaborative attention module by the paired attention loss module in the program recommendation model when the current login device information and the historical login device information are consistent, thereby obtaining third historical behavior information, wherein the second historical behavior vector includes: the first historical behavior vector corresponding to the historical login device information consistent with the current login device information, and the third historical behavior information is used to represent the correlation between the second historical behavior vector and the first session information;
[0011] The first session information, the candidate program information and the third historical behavior information are input into the feedforward neural network in the program recommendation model, and the probability of the user clicking on the candidate program is output; the probability of the candidate program is used to determine the target program recommended to the user.
[0012] In a second aspect, an embodiment of the present application provides a program recommendation apparatus, comprising: a first acquisition module, configured to acquire first historical behavior information and current session behavior information of multiple users; the first historical behavior information comprising: historical program information browsed by the user on a historically logged-in device; the current session behavior information comprising: current program information browsed by the user on a currently logged-in device within a preset time period;
[0013] A first input module is configured to map the first historical behavior information and the current session behavior information to obtain a low-dimensional and dense first historical behavior vector and a current session behavior vector;
[0014] a first output module, configured to process the input current session behavior vector through an encoding layer in a pre-trained program recommendation model, and output first session information, where the first session information is used to characterize the current session behavior of the user;
[0015] a session-aware collaborative attention module, configured to process the input first session information, the first historical behavior vector, and candidate program information, and output second historical behavior information, wherein the second historical behavior information is used to represent the relevance between the first historical behavior information of the user and the first session information;
[0016] a paired attention loss module, configured to, when the current login device information and the historical login device information are consistent, perform feature enhancement processing on the second historical behavior vector input into the session-aware collaborative attention module to obtain third historical behavior information, wherein the second historical behavior vector includes the first historical behavior vector corresponding to the historical login device information that is consistent with the current login device information, and the third historical behavior information is used to represent the correlation between the second historical behavior vector and the first session information;
[0017] A feedforward neural network module is used to input the first session information, the candidate program information and the third historical behavior information into the feedforward neural network in the program recommendation model, and output the probability of the user clicking on the candidate program; the probability of the candidate program is used to determine the target program recommended to the user.
[0018] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory electrically connected to the processor, wherein the memory stores a computer program, and the processor is used to call and execute the computer program from the memory to implement the steps of the method described in the first aspect above.
[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program can be executed by a processor to implement the steps in the method described in the first aspect above.
[0020] Using the technical solution of the embodiments of the present application, a user's first historical behavior information and current session behavior information are obtained, wherein the first historical behavior information includes historical program information browsed by the user on historical login devices, and the current session behavior information includes current program information browsed by the user on the current login device within a preset time. The first historical behavior information and the current session behavior information are mapped to obtain low-dimensional dense first historical behavior vectors and current session behavior vectors. The input current session behavior vector is processed by the encoding layer of a pre-trained program recommendation model to obtain first session information representing the user's current session behavior. The input first session information, the first historical behavior vector, and candidate program information are processed by the session-aware collaborative attention module of the program recommendation model to output second historical behavior information representing the relevance between the user's first historical behavior information and the first session information. Furthermore, the paired attention loss module in the program recommendation model performs feature enhancement processing on the second historical behavior vector input into the session-aware collaborative attention module when the current login device information and the historical login device information are consistent, thereby obtaining third historical behavior information. The second historical behavior vector includes: a first historical behavior vector corresponding to the historical login device information consistent with the current login device information; and the third historical behavior information represents the correlation between the second historical behavior vector and the first session information. The first session information, candidate program information, and the third historical behavior information are input into the feedforward neural network in the program recommendation model, and the probability of the user clicking on the candidate program is output. Based on the probability of the candidate program, the target program recommended to the user is determined. It can be seen that the session-aware collaborative attention module in the program recommendation model can calculate the correlation between the first historical behavior information and the first session information. The paired attention loss module adjusts the correlation of the session-aware collaborative attention module and enhances the features of the second historical behavior vector corresponding to the current session login device information. The login device information serves as a weak supervisory signal. Based on the correlation between the first historical behavior information and the current session behavior information, as well as the information of the current login device and the historical login device, it is determined that the users logged into the account belong to the same person. The accuracy of program recommendations can be improved based on the correlation and attention mechanism. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate one or more embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in one or more embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0022] Figure 1This is a schematic diagram of an application scenario of a program recommendation method according to an embodiment of the present application;
[0023] Figure 2 is a schematic flow chart of a program recommendation method according to an embodiment of the present application;
[0024] Figure 3 is a schematic diagram of a program recommendation method according to an embodiment of the present application;
[0025] Figure 4 This is a schematic flow chart of a program recommendation method according to another embodiment of the present application.
[0026] Figure 5 is a schematic block diagram of a program recommendation device according to an embodiment of the present application;
[0027] Figure 6 This is a schematic diagram of the hardware structure of a program recommendation according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] Embodiments of the present application provide a method, device, electronic device, and storage medium for program recommendation, to solve the problem of low accuracy in program recommendation.
[0029] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0030] The program recommendation method provided in the embodiments of the present application can be executed by an electronic device or by software installed in the electronic device. Specifically, the electronic device can be a terminal device or a server device. The terminal device can include a smartphone, a laptop computer, a smart wearable device, an in-vehicle terminal, etc. The server device can include an independent physical server, a server cluster consisting of multiple servers, or a cloud server capable of cloud computing.
[0031] When a family uses the same account to watch programs on different devices, such as Figure 1As shown, the first historical behavior includes: a female user logging into a certain account to watch a program on device 1, a male user logging into the same account to watch a program on device 2, or a male and female user using the same account to watch a program on device 3. The current session behavior includes: some time later, the female user uses this account to watch a program on device 1. At this time, the recommended candidate programs should be targeted at the female user, that is, the program content with the highest relevance to the female user's browsing history should be recommended. However, during the recommendation process, the female user is not the only one browsing programs using this account. Therefore, when the system recommends programs to the female user, the male user's first historical behavior becomes noise, interfering with the model's judgment of the female user's interests. Since group recommendations cannot distinguish who is currently watching TV, identifying the user currently watching is crucial to providing accurate recommendations to TV viewers. Therefore, a program recommendation method that improves the accuracy of program recommendations is provided.
[0032] The program recommendation method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0033] like Figure 2 As shown in FIG. 1 , a schematic flow chart of a method for recommending programs according to an embodiment of the present application is shown. The method for recommending programs includes the following steps:
[0034] S202: Acquire the user's first historical behavior information and current session behavior information.
[0035] The first historical behavior information includes: historical program information browsed by the user on the historical login device, wherein the first historical behavior includes browsing multiple historical programs.
[0036] Current session behavior information includes information about the current programs viewed by the user on the currently logged-in device within a preset time period. The current session behavior can include multiple programs viewed. The preset time period can include the minutes before the user switches to a candidate program after logging into the device. User behavior information before the preset time period is considered first historical behavior information, while user behavior information during the preset time period is considered current session information. Program information after the preset time period can be considered candidate program information.
[0037] S204 : Mapping the first historical behavior information and the current session behavior information to obtain a low-dimensional and dense first historical behavior vector and a current session behavior vector.
[0038] The mapping process may include: deep embedding technology.
[0039] Low-dimensional dense vectors can represent certain features of the corresponding objects, the distance between vectors, the similarity between reflection objects, etc., which facilitates processing by upper-level neural networks.
[0040] The high-dimensional sparse first historical behavior information and current session behavior information are converted into low-dimensional dense vectors through mapping processing to facilitate subsequent calculation and processing.
[0041] S206: Process the input current session behavior vector through the encoding layer of the pre-trained program recommendation model and output first session information, wherein the first session information is used to represent the user's current session behavior.
[0042] The encoding layer is an encoder in the recurrent neural network layer, which inputs the current session behavior vector converted into a low-dimensional dense vector in step 104 into the encoding layer to obtain first session information that can be used to characterize the user's current session behavior.
[0043] S208: The first session information, the first historical behavior vector, and the candidate program information are processed by the session-aware collaborative attention module in the program recommendation model to output second historical behavior information. The second historical behavior information is used to characterize the relevance between the user's first historical behavior information and the first session information.
[0044] The program recommendation model uses the session-aware collaborative attention module to calculate the correlation between the first session information, the first historical behavior vector, and the candidate program information. The module calculates the correlation, and the attention network currently uses a feed-forward neural network. This calculation determines an attention score for the first historical behavior vector based on the correlation. This score improves the accuracy of identifying first historical behavior vectors that are highly correlated with the first session information.
[0045] S210, through the paired attention loss module in the program recommendation model, when the current login device information and the historical login device information are consistent, the second historical behavior vector input in the session-aware collaborative attention module is feature enhanced to obtain third historical behavior information.
[0046] The second historical behavior vector includes: a first historical behavior vector corresponding to historical login device information consistent with the current login device information; and the third historical behavior information is used to represent the correlation between the second historical behavior vector and the first session information.
[0047] The pairwise attention loss module is used to adjust the attention weights of each program in the attention mechanism of the session-aware collaborative attention module.
[0048] The login device information includes: login device identity (Identification, ID) information.
[0049] When the current login device information and the historical login device information are consistent, including when the current login device ID and the historical login device ID are the same at a preset time, feature enhancement processing is performed on the second historical behavior vector input into the session-aware collaborative attention module. Specifically, the paired attention loss module obtains the first historical behavior vector of the historical login device ID that is the same as the login device ID, classifies all identical first historical behavior vectors as the second historical behavior vector, and performs feature enhancement processing on the second historical behavior vector. That is, the paired attention loss module increases the attention weight of each historical behavior vector in the second historical behavior vector, while suppressing the weights of other historical behavior vectors with different login device IDs. After feature enhancement processing is performed on the second historical behavior vector, the session-aware collaborative attention module re-outputs the correlation between the second historical behavior vector and the first session information.
[0050] By adjusting the weights of each program in the attention mechanism of the session-aware collaborative attention module through the paired attention loss module, the session-aware collaborative attention module determines the most attention-significant first historical behavior information, thereby outputting the correlation between the latest second historical behavior vector and the first session information, i.e., the third historical behavior information. Based on whether the login device ID and the previous login device ID are the same, the correlation of each historical behavior information in the second historical behavior vector is determined, thereby determining whether the current user and the user who previously logged into the account are the same user.
[0051] S212: Input the first session information, the candidate program information, and the third historical behavior information into a feedforward neural network in the program recommendation model, and output the probability of the user clicking on the candidate program. The probability of the candidate program is used to determine the target program recommended to the user.
[0052] The first conversation information, candidate program information, and the third historical behavior information processed by the conversation-aware collaborative attention module and the paired attention loss module are input into the feedforward neural network for calculation, and the final output is the probability of the user clicking on the candidate program. The calculation formula in the feedforward neural network is as follows:
[0053]
[0054] Among them, FFN represents the forward propagation network, a represents the user vector, ν represents the candidate program information, and h m The indicator representing the real user, that is, the first session information, R represents the second historical behavior information, and the probability of the user clicking on the candidate program is obtained through calculation.
[0055] As an example, the TV program currently being watched by the user is a cartoon. The first session information is used to indicate that the program browsed by the user account on the logged-in device is a cartoon. The candidate program information can be cartoons, TV series, variety shows, etc. The third historical behavior information indicates the relevance between the program information browsed when the user account logged in to this device before and the currently browsed program information. The first session information, candidate program information, and third historical behavior information are input into a feedforward neural network to calculate the probability of the user clicking on the candidate program.
[0056] Using the technical solution of the embodiments of the present application, a user's first historical behavior information and current session behavior information are obtained, wherein the first historical behavior information includes historical program information browsed by the user on historical login devices, and the current session behavior information includes current program information browsed by the user on the current login device within a preset time. The first historical behavior information and the current session behavior information are mapped to obtain low-dimensional dense first historical behavior vectors and current session behavior vectors. The input current session behavior vector is processed by the encoding layer of a pre-trained program recommendation model to obtain first session information representing the user's current session behavior. The input first session information, the first historical behavior vector, and candidate program information are processed by the session-aware collaborative attention module of the program recommendation model to output second historical behavior information representing the relevance between the user's first historical behavior information and the first session information. Furthermore, the paired attention loss module in the program recommendation model performs feature enhancement processing on the second historical behavior vector input into the session-aware collaborative attention module when the current login device information and the historical login device information are consistent, thereby obtaining third historical behavior information. The second historical behavior vector includes: a first historical behavior vector corresponding to the historical login device information consistent with the current login device information; and the third historical behavior information represents the correlation between the second historical behavior vector and the first session information. The first session information, candidate program information, and the third historical behavior information are input into the feedforward neural network in the program recommendation model, and the probability of the user clicking on the candidate program is output. Based on the probability of the candidate program, the target program recommended to the user is determined. It can be seen that the session-aware collaborative attention module in the program recommendation model can calculate the correlation between the first historical behavior information and the first session information. The paired attention loss module adjusts the correlation of the session-aware collaborative attention module and enhances the features of the second historical behavior vector corresponding to the current session login device information. The login device information serves as a weak supervisory signal. Based on the correlation between the first historical behavior information and the current session behavior information, as well as the information of the current login device and the historical login device, it is determined that the users logged into the account belong to the same person. The accuracy of program recommendations can be improved based on the correlation and attention mechanism.
[0057] In one embodiment, the method further includes training a program recommendation model: specifically, the following steps A1-A5 may be performed:
[0058] Step A1: Acquire first historical behavior information, historical conversation behavior information, and historical candidate program information of multiple users.
[0059] The historical session behavior information includes: the current program information browsed by the user on the currently logged-in device within a preset time; the historical candidate program information includes: the program information browsed by the user on the currently logged-in device after the preset time.
[0060] By obtaining the first historical behavior information, historical conversation behavior information and historical candidate program information of multiple users, they are used as samples for model training.
[0061] Step A2: Mapping the first historical behavior information and the historical conversation behavior information to obtain low-dimensional dense first historical behavior vectors and historical conversation behavior vectors.
[0062] The first historical behavior information and the historical session behavior information are mapped into low-dimensional dense vectors in the same vector space through deep embedding technology to obtain the first historical behavior vector and the historical session behavior vector.
[0063] Step A3: Input the historical conversation behavior vector into the encoding layer of the program recommendation model, and output second conversation information, which is used to represent the user's historical conversation behavior information.
[0064] Step A4: Input the second session information, the first historical behavior vector, and the historical candidate program information into the program recommendation model to be trained. After calculation by the session-aware collaborative attention module, the paired attention loss module, and the feedforward neural network in the model, the probability of the user clicking on the historical candidate program is obtained.
[0065] The probability of the historical candidate program includes the probability of the historical candidate program with the highest correlation between the historical login device information corresponding to the first historical behavior vector and the current login device information corresponding to the second session information.
[0066] The second session information, first historical behavior vectors, and historical candidate program information of multiple users are input into the program recommendation model to be trained. The correlation between the first historical behavior vector and the second session information is obtained through the session-aware collaborative attention module in the model. The attention mechanism in the session-aware collaborative attention module is then adjusted through the paired attention loss module to obtain new correlation information between the first historical behavior vector and the second session information with the same login device ID. Finally, the second session information, historical candidate program information, and the new correlation information are input into the feedforward neural network, and the probability of the user clicking on the historical candidate program is obtained through calculation.
[0067] Step A5: Based on the probability of the user clicking on the historical candidate program and the historical candidate program information, the program recommendation model to be trained is trained to obtain a trained program recommendation model.
[0068] Determine whether the probability of clicking the historical candidate program information is consistent with the obtained historical candidate program information. If so, it means that the prediction is successful, and there is no need to adjust the relevance in the session-aware collaborative attention module. If not, it means that the prediction fails, and the relevance in the session-aware collaborative attention module needs to be adjusted and updated until the model training is successful, that is, the output probability of the user clicking the candidate program is consistent with the obtained historical candidate program information.
[0069] In this embodiment, Figure 3 As shown in the schematic diagram, the first historical behavior information of multiple users, the second session information obtained by the encoding layer of the historical session behavior information, and the candidate program information are processed through the session-aware collaborative attention module in the program recommendation model to be trained to obtain the relevance. After that, the relevance of the first historical behavior information and the historical session information is adjusted through the paired attention loss module to obtain new relevance information. The historical candidate programs, the new relevance information and the user account information are then input into the feedforward neural network for calculation to obtain the probability of the user clicking on the historical candidate programs. The obtained probability of the user clicking on the historical candidate programs is compared with the historical candidate program information. When the comparison results are consistent, the relevance information does not need to be adjusted and the training of the program recommendation model is terminated. If they are inconsistent, the calculation of the relevance is adjusted and the training of the program recommendation model to be trained continues.
[0070] By training the program recommendation model to be trained, a program recommendation model that outputs the probability of users clicking on candidate programs more accurately can be obtained, and program recommendations can be made to users based on the trained program recommendation model.
[0071] In one embodiment, before obtaining the user's first historical behavior information and current session behavior information (step 202), the following steps B1-B2 may be performed:
[0072] Step B1: Obtain the user's historical behavior sequence.
[0073] The historical behavior sequence includes: the program information browsed by the user on all logged-in devices. The behavior sequence specifically includes the user's account information, the user's login device ID, and the program information browsed by the user on the login device.
[0074] Step B2: dividing the historical behavior sequence into first historical behavior information and current session behavior information according to a preset time.
[0075] Specifically, based on the user's account information, the user behavior is divided into the behavior of each login device, and then the behavior of each login device is divided into the most recent current session behavior information and the first historical behavior information. Among them, if the behavior information is Ha, then b1...bn belongs to the first historical behavior information, and bn+1...bn+m belongs to the current session behavior information.
[0076]
[0077] The current session behavior includes the end time of the previous program and the start time of the next program. For example, if the interval is 10 minutes, they belong to the same session.
[0078] In other words, the calculation method of the split point n in the above formula is:
[0079]
[0080] Among them, n is the interval time, that is, the preset time, which can be 10 minutes. and It is the start timestamp and end timestamp of two adjacent programs, d i+1 ~d m+n It is the login device ID, indicating that these actions belong to the same login device.
[0081] In this embodiment, based on the user's account information, each user's historical behavior sequence is divided into first historical behavior information and current session behavior information according to a preset time.
[0082] In one embodiment, the first historical behavior information and the current session behavior information are mapped to obtain the first historical behavior vector and the current session behavior vector as low-dimensional dense vectors (i.e., step 204). Specifically, the following steps C1-C2 may be performed:
[0083] Step C1: Based on the high-dimensional and sparse first historical behavior information, the user's historical account information and historical program information are mapped through deep embedding technology to obtain a low-dimensional and dense first historical behavior vector.
[0084] Step C2: Based on the high-dimensional and sparse current session behavior information, the user's current account information and current program information are mapped using deep embedding technology to obtain a low-dimensional and dense current session behavior vector.
[0085] Preferably, the low-dimensional dense current session behavior vector is passed through the session coding layer in the program recommendation model to obtain the first session information. The first session information can be calculated using the following formula:
[0086]
[0087] Among them, [s1~s m ] is the input vector, which is the low-dimensional and sparse current conversation behavior vector obtained by deep embedding technology of the current conversation behavior information, [h1~h m ] is the latent vector, ⊙ is the multiplication of the corresponding elements in the vector, and the first session information is obtained through the above formula.
[0088] In this embodiment, the user's first historical behavior information and current session behavior information are both obtained in high-dimensional, sparse representations. Deep embedding technology can be used to convert these high-dimensional, sparse vectors into low-dimensional, dense vectors, reducing the input dimension of the neural network. Furthermore, the cosine similarity between the two vectors can be used to infer the similarity between the two behavior information. For example, if a user has only watched five programs, and the number of programs they have watched is high-dimensional and sparse (perhaps 200,000 programs), they can ultimately be described by a three-dimensional real number vector. Mapping the user's first historical behavior information and current session behavior information into low-dimensional, dense vectors through deep embedding technology can better preserve the relationship between the information and improve text processing and semantic understanding.
[0089] In one embodiment, the first session information, the first historical behavior vector, and the candidate program information are processed by the session-aware collaborative attention module in the program recommendation model to output second historical behavior information (i.e., step 208). Specifically, the following steps D1-D2 may be performed:
[0090] Step D1: Input the first session information, the historical behavior vector, and the candidate program information into a forward propagation neural network, and determine the first session information with the most significant correlation with the first historical behavior information through a maximum pooling layer.
[0091] The first session information, historical behavior vector, and candidate program information are input into the forward propagation neural network, and the correlation information is obtained by calculation, as shown in the following formula:
[0092]
[0093] Among them, C ij represents the correlation between the candidate program v, the jth first conversation behavior information h, and the ith first historical behavior b; is vector concatenation, FFN is feed-forward network, and the correlation information of the three is obtained by calculation.
[0094] The maximum pooling layer is used to capture the session behavior information that is most significantly correlated with the first historical behavior information. That is, as shown in the following formula, MP is the maximum pooling layer, and j is found so that C ii maximum.
[0095]
[0096] Among them, the maximum pooling layer can determine the session behavior information with the most significant correlation for each first historical behavior. The session behavior information includes: multiple session behavior information in the first session information within the preset time. The maximum pooling layer can determine each first historical behavior information and the most significant session behavior information with the highest correlation among the multiple session behavior information within the preset time, thereby reducing the amount of computation for subsequent calculations and providing accurate calculations.
[0097] Step D2: Based on the softmax function, calculate the attention score of the first historical behavior vector and the first session information.
[0098] According to step D1, c is calculated i , c i Represents the first historical behavior vector b i The relevance to the entire first session information, that is, the relevance to the first session information can be represented by the relevance between the first historical behavior information and the most significant session behavior information in the entire first session information.
[0099] After obtaining the relevance of the i-th first historical behavior vector, its attention score is calculated using the softmax function:
[0100]
[0101] Among them, α i is the attention score, and the attention score of each first historical behavior vector is calculated according to the relevance of the first historical behavior vector.
[0102] Step D3: Output the second historical behavior information according to the attention score and the first historical behavior vector.
[0103] The second historical behavior information is represented by R:
[0104]
[0105] A second historical behavior information representation is obtained according to the first historical behavior vector and its corresponding attention score, which is used to represent the relevance between the first historical behavior information and the first session information.
[0106] In this embodiment, the input first conversation information, the first historical behavior vector, and the candidate program information are processed by the session-aware collaborative attention module in the program recommendation model. That is, the correlation information is calculated through the forward propagation neural network, and the first conversation information with the greatest correlation with the first historical behavior information is obtained using the maximum pooling layer. Based on the calculation of the softmax function, the attention score of the first historical behavior information is obtained. According to the attention score and the first historical behavior vector, the second historical behavior information is determined to represent the latest correlation between the first historical behavior information and the first conversation information.
[0107] In one embodiment, when the current login device information and the historical login device information are consistent, the second historical behavior vector input in the session-aware collaborative attention module is subjected to feature enhancement processing to obtain third historical behavior information through the paired attention loss module in the program recommendation model. The following step E can be performed:
[0108] Step E: When the current login device information corresponding to the first session information is consistent with the historical login device information corresponding to the first historical behavior information, the attention score of the second historical behavior vector is increased by the function in the paired attention loss module to obtain the third historical behavior information.
[0109] A major problem with the current shared account model is the lack of supervisory signals, making it difficult to capture the labels of real users, as some accounts can have labels for multiple devices. Assume that the IDs of these login devices are D a ={d1,…,d n+m}, when it is the same as the login device ID in the current session behavior, it is recorded as d s , that is, d n+1 =d n+2 =…=d n+m =d s When all login device IDs are the same, we consider that the same user is watching the program.
[0110] In order to increase the weight of the real user's first historical behavior vector, if d i =d s , then increase the attention score α i On the contrary, if d i ≠d s , then reduce α i , for this purpose, a pairwise attention loss function is designed:
[0111]
[0112] Among them, p is the same as d sThe number of identical device IDs. This pairwise loss is calculated by taking the mean of the attention scores for identical device IDs and subtracting the mean of the attention scores for different device IDs. In this way, the device ID is used as a weak supervisory signal to guide the attention mechanism to pay more attention to the first historical behavior information of the same device.
[0113] For example, assuming that users with the same login device ID are the same user, a small amount of device ID information from the acquired login device information data is used to establish a supervised learning training set. If the login device used by the current user account and the user's previous login devices use the same device ID, it is assumed that they are the same user and is used as a positive example. If the device ID is different, it is treated as a negative example. Using neural network machine learning methods, positive and negative examples are predicted, achieving the ability to establish computational correlation.
[0114] In this embodiment, the paired attention loss module in the program recommendation model uses the information of the current login device ID and the historical login device ID obtained as a supervision signal to adjust the attention score of the attention mechanism in the session-aware collaborative attention module. This can accurately judge the authenticity of the user and improve the accuracy of recommending candidate programs to the user based on the real user's viewing history.
[0115] In one embodiment, the training of the program recommendation model also includes backpropagation training. In most cases, most households only have one TV device, while the program recommendation model utilizes the behavior of multiple device accounts. Therefore, it is necessary to divide all user behaviors into single-device account behaviors and multi-device account behaviors, and conduct two-stage training for each. Specifically, the following steps F1-F5 can be performed:
[0116] Step F1: Obtain single-device account and multi-device account.
[0117] Among them, a single-device account is a user account that only logs in to a single device, and a multi-device account is a user account that logs in to multiple devices, as shown in the following formula:
[0118]
[0119] in, and Single-device account behavior and multi-device account behavior, including the user's first historical behavior information, historical session behavior information, and historical candidate program information; and For single device accounts and multi-device accounts; is the set of all programs clicked by account a; a is the account information corresponding to the user, and v is the historical behavior information corresponding to the user.
[0120] Step F2: Based on the cross entropy loss function and the user behavior of logging into the single device account, the cross entropy loss of the single device account is calculated to obtain a first loss function.
[0121] Generally, in the first training phase, based on all the single-device account behaviors obtained in step F1, the final predicted click is calculated with the cross entropy loss, and the first loss function is obtained as follows:
[0122]
[0123] Step F3: Based on the first loss function, a back propagation algorithm is used to adjust the attention score of the corresponding first historical behavior vector in the program recommendation model.
[0124] The backpropagation algorithm includes: since there is an error between the output result of the model after artificial neural network training and the actual result, the error between the estimated value and the actual value is first calculated, and the error is backpropagated from the output layer to the hidden layer until it propagates to the input layer; during the backpropagation process, the values of various parameters are adjusted according to the error; the above process is continuously iterated until convergence.
[0125] According to step F2, the first loss function is obtained, which can reflect the difference between the user behavior of a single device account and the probability of the user clicking on the historical candidate program. Based on the first loss function, the back propagation algorithm is used to adjust the various parameters of the program recommendation model to reduce the error, for example, adjusting the correlation between the first session information, the first historical behavior vector and the historical candidate program information.
[0126] Step F4: Calculate the second loss function of the multi-device account based on the cross entropy loss function, the pairwise attention loss function, and the user behavior of logging into the multi-device account.
[0127] In the second training phase, since multiple device accounts also need to calculate the pairwise attention of the correlation, not only the cross entropy loss but also the pairwise attention loss is calculated, which is recorded as Get the second loss function. The calculation method of is described in detail above and will not be repeated here. The formula of the second loss function is as follows:
[0128]
[0129] Among them, λ is the balance factor between cross entropy loss and pairwise attention loss, which is a hyperparameter.
[0130] Step F5: Based on the second loss function, the back propagation algorithm is used to adjust the attention score of the corresponding first historical behavior vector in the program recommendation model.
[0131] According to step F4, the second loss function is obtained, which can reflect the differences in user behavior of multiple device accounts and the probability of users clicking on historical candidate programs. Based on the second loss function, the back propagation algorithm is used to adjust the various parameters of the program recommendation model to reduce errors. For example, the correlation between the first session information, the first historical behavior vector and the historical candidate program information is adjusted, or the attention score in the perceptual collaborative attention module is adjusted.
[0132] In this embodiment, all acquired user behaviors are divided into single-device account behaviors and multi-device account behaviors. By calculating the corresponding first loss function and second loss function respectively, the parameters of the trained program recommendation model are adjusted. That is, after each model training passes through the feedforward neural network, the back propagation algorithm can perform backward transmission according to the weights and biases to adjust the parameters of the model. The back propagation algorithm can reduce the error rate and improve the reliability of the model.
[0133] In summary, by training the program recommendation model to be trained, the first historical behavior information, historical session behavior information, and historical candidate program information of multiple users are obtained and input into the program recommendation model to be trained. The correlation is calculated through the session-aware collaborative attention module, and the attention score is adjusted according to the login device information through the paired attention loss module. Finally, the probability of the user clicking on the historical candidate program is output through the feedforward neural network. At the same time, backpropagation training is performed, and the various parameter information is adjusted through the loss function. The probability of clicking on the historical candidate program is compared with the historical candidate program to obtain a trained program recommendation model. When the user inputs a behavior sequence into the model, the model can calculate the current user's behavior information and obtain the probability of the candidate program that the current user will click. Based on the probability of clicking the candidate program, the candidate program content is determined and the program recommendation is made.
[0134] The program recommendation method provided by this application is described below through a specific embodiment.
[0135] Figure 4 is a schematic flow chart of a program recommendation method according to another embodiment of the present application. Figure 4 As shown, the method includes the following steps:
[0136] S401, obtaining the user's historical behavior sequence.
[0137] The historical behavior sequence includes: program information browsed by the user on all logged-in devices.
[0138] S402: Acquire the user's first historical behavior information and current session behavior information.
[0139] According to the acquired historical behavior sequence of the user, the historical behavior sequence is divided into first historical behavior information and current session behavior information by preset time.
[0140] S403: Convert the first historical behavior information and the current session behavior information into a low-dimensional dense first historical behavior vector and a current session behavior vector.
[0141] S404 : Process the input current session behavior vector through the encoding layer in the pre-trained program recommendation model and output first session information.
[0142] The first session information is used to characterize the user's current session behavior.
[0143] S405 : Input the first conversation information, the first historical behavior vector, and the candidate program information into a conversation-aware collaborative attention module in the program recommendation model.
[0144] S406 , processing the input first conversation information, the first historical behavior vector, and the candidate program information through the forward propagation neural network in the conversation-aware collaborative attention module in the program recommendation model to obtain relevance information.
[0145] The correlation information is used to indicate the correlation among the first historical behavior vector, the first conversation information, and the candidate program.
[0146] S407 : Determine, through a maximum pooling layer, the first conversation information that is most significantly correlated with the first historical behavior vector.
[0147] S408 : Calculate the attention score of the first historical behavior vector and the first conversation information based on the softmax function.
[0148] S409: Output second historical behavior information according to the attention score and the first historical behavior vector.
[0149] The second historical behavior information is used to represent the relevance between the user's first historical behavior information and the first session information.
[0150] S410, adjusting the attention score through the paired attention loss module in the program recommendation model.
[0151] When the current login device information corresponding to the first session information is consistent with the historical login device information corresponding to the first historical behavior information, the attention score in the attention mechanism is adjusted through the loss function in the paired attention loss module to increase the weight of the real user's first historical behavior information.
[0152] S411 , obtaining third historical behavior information through the adjusted attention score, the first conversation behavior information, and the candidate program information.
[0153] The third historical behavior information is used to represent the correlation between the first historical behavior vector and the first session information after the attention score is adjusted.
[0154] S412: Input the first conversation information, the candidate program information, and the third historical behavior information into a feedforward neural network in the program recommendation model, and output the probability of the user clicking on the candidate program.
[0155] S413: Determine the target program to be recommended to the user based on the probability of the candidate programs.
[0156] Using the technical solution of the embodiments of the present application, a user's first historical behavior information and current session behavior information are obtained, wherein the first historical behavior information includes historical program information browsed by the user on historical login devices, and the current session behavior information includes current program information browsed by the user on the current login device within a preset time. The first historical behavior information and the current session behavior information are mapped to obtain low-dimensional dense first historical behavior vectors and current session behavior vectors. The input current session behavior vector is processed by the encoding layer of a pre-trained program recommendation model to obtain first session information representing the user's current session behavior. The input first session information, the first historical behavior vector, and candidate program information are processed by the session-aware collaborative attention module of the program recommendation model to output second historical behavior information representing the relevance between the user's first historical behavior information and the first session information. Furthermore, the paired attention loss module in the program recommendation model performs feature enhancement processing on the second historical behavior vector input into the session-aware collaborative attention module when the current login device information and the historical login device information are consistent, thereby obtaining third historical behavior information. The second historical behavior vector includes: a first historical behavior vector corresponding to the historical login device information consistent with the current login device information; and the third historical behavior information represents the correlation between the second historical behavior vector and the first session information. The first session information, candidate program information, and the third historical behavior information are input into the feedforward neural network in the program recommendation model, and the probability of the user clicking on the candidate program is output. Based on the probability of the candidate program, the target program recommended to the user is determined. It can be seen that the session-aware collaborative attention module in the program recommendation model can calculate the correlation between the first historical behavior information and the first session information. The paired attention loss module adjusts the correlation of the session-aware collaborative attention module and enhances the features of the second historical behavior vector corresponding to the current session login device information. The login device information serves as a weak supervisory signal. Based on the correlation between the first historical behavior information and the current session behavior information, as well as the information of the current login device and the historical login device, it is determined that the users logged into the account belong to the same person. The accuracy of program recommendations can be improved based on the correlation and attention mechanism.
[0157] In summary, specific embodiments of the present subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing may be advantageous.
[0158] The above is a method for program recommendation provided in an embodiment of the present application. Based on the same idea, an embodiment of the present application also provides a device for program recommendation.
[0159] Figure 5 is a schematic block diagram of a program recommendation device according to an embodiment of the present application. Figure 4 As shown, the device includes:
[0160] In one embodiment, the first acquisition module 51 is configured to acquire first historical behavior information and current session behavior information of multiple users, wherein the first historical behavior information includes: historical program information browsed by the user on the device previously logged in; and the current session behavior information includes: current program information browsed by the user on the device currently logged in within a preset time period.
[0161] A first input module 52 is configured to map the first historical behavior information and the current session behavior information to obtain a low-dimensional and dense first historical behavior vector and a current session behavior vector;
[0162] A first output module 53 is configured to process the input current session behavior vector through the encoding layer of the pre-trained program recommendation model and output first session information, where the first session information is used to represent the user's current session behavior;
[0163] a session-aware collaborative attention module 54 configured to process the first session information, the first historical behavior vector, and the candidate program information inputted through the session-aware collaborative attention module in the program recommendation model, and output second historical behavior information, where the second historical behavior information is used to represent the relevance between the user's first historical behavior information and the first session information;
[0164] The paired attention loss module 55 is configured to perform feature enhancement processing on the second historical behavior vector inputted by the session-aware collaborative attention module when the current login device information and the historical login device information are consistent, thereby obtaining third historical behavior information, wherein the second historical behavior vector includes the first historical behavior vector corresponding to the historical login device information that is consistent with the current login device information, and the third historical behavior information is used to represent the correlation between the second historical behavior vector and the first session information;
[0165] The feedforward neural network module 56 is used to input the first session information, candidate program information and third historical behavior information into the feedforward neural network in the program recommendation model, and output the probability of the user clicking on the candidate program; the probability of the candidate program is used to determine the target program recommended to the user.
[0166] In one embodiment, the apparatus further includes: training a program recommendation model: obtaining first historical behavior information, historical session behavior information, and historical candidate program information of a plurality of users, wherein the historical session behavior information includes current program information browsed by the user on the currently logged-in device within a preset time, and the historical candidate program information includes program information browsed by the user on the currently logged-in device after the preset time;
[0167] Mapping the first historical behavior information and the historical conversation behavior information to obtain low-dimensional dense first historical behavior vectors and historical conversation behavior vectors;
[0168] Inputting the historical session behavior vector into the encoding layer of the program recommendation model and outputting second session information, where the second session information is used to represent the user's historical session behavior information;
[0169] The second session information, the first historical behavior vector, and the historical candidate program information are input into the program recommendation model to be trained. The session-aware collaborative attention module, the paired attention loss module, and the feedforward neural network in the model calculate the probability of the user clicking on the historical candidate program. The second session information is used to represent the user's historical session behavior information. The probability of the historical candidate program includes the probability of the historical candidate program with the highest correlation between the historical login device information corresponding to the first historical behavior vector and the current login device information corresponding to the second session information.
[0170] Based on the probability of a user clicking on a historical candidate program and the historical candidate program information, the program recommendation model to be trained is trained to obtain a trained program recommendation model.
[0171] In one embodiment, before obtaining the user's first historical behavior information and current session behavior information, the user's historical behavior sequence is obtained, and the historical behavior sequence includes: program information browsed by the user on all login devices;
[0172] By presetting the time, the historical behavior sequence is divided into the first historical behavior information and the current session behavior information.
[0173] In one embodiment, the first input module 52 includes: mapping the user's historical account information and historical program information based on the high-dimensional sparse first historical behavior information through deep embedding technology to obtain a low-dimensional dense first historical behavior vector;
[0174] Based on the high-dimensional and sparse current session behavior information, the user's current account information and current program information are mapped through deep embedding technology to obtain a low-dimensional and dense current session behavior vector.
[0175] In one embodiment, the session-aware collaborative attention module 54 includes: inputting the first session information, the historical behavior vector, and the candidate program information into a forward propagation neural network, and determining the first session information that is most significantly correlated with the first historical behavior information through a maximum pooling layer;
[0176] Based on the softmax function, calculate the attention score of the first historical behavior vector and the first session information;
[0177] Output second historical behavior information based on the attention score and the first historical behavior vector.
[0178] In one embodiment, the paired attention loss module 55 includes, when the current login device information corresponding to the first session information is consistent with the historical login device information corresponding to the first historical behavior information, improving the attention score of the second historical behavior vector through the parameters in the paired attention loss module to obtain the third historical behavior information.
[0179] In one embodiment, the training of the target recommendation model further includes back propagation training, including: obtaining a single-device account and a multi-device account, where the single-device account is a user account that is only logged into a single device, and the multi-device account is a user account that is logged into multiple devices;
[0180] Based on the cross entropy loss function and the user behavior of logging into a single device account, the cross entropy loss of the single device account is calculated to obtain the first loss function;
[0181] According to the first loss function, a back propagation algorithm is used to adjust corresponding parameter information in the program recommendation model;
[0182] Calculate the second loss function for multi-device accounts based on the cross entropy loss function, pairwise attention loss function, and the user behavior of logging into multi-device accounts;
[0183] According to the second loss function, a back propagation algorithm is used to adjust the attention score and parameter information of the corresponding first historical behavior vector in the program recommendation model.
[0184] Using the technical solution of the embodiments of the present application, a user's first historical behavior information and current session behavior information are obtained, wherein the first historical behavior information includes historical program information browsed by the user on historical login devices, and the current session behavior information includes current program information browsed by the user on the current login device within a preset time. The first historical behavior information and the current session behavior information are mapped to obtain low-dimensional dense first historical behavior vectors and current session behavior vectors. The input current session behavior vector is processed by the encoding layer of a pre-trained program recommendation model to obtain first session information representing the user's current session behavior. The input first session information, the first historical behavior vector, and candidate program information are processed by the session-aware collaborative attention module of the program recommendation model to output second historical behavior information representing the relevance between the user's first historical behavior information and the first session information. Furthermore, the paired attention loss module in the program recommendation model performs feature enhancement processing on the second historical behavior vector input into the session-aware collaborative attention module when the current login device information and the historical login device information are consistent, thereby obtaining third historical behavior information. The second historical behavior vector includes: a first historical behavior vector corresponding to the historical login device information consistent with the current login device information; and the third historical behavior information represents the correlation between the second historical behavior vector and the first session information. The first session information, candidate program information, and the third historical behavior information are input into the feedforward neural network in the program recommendation model, and the probability of the user clicking on the candidate program is output. Based on the probability of the candidate program, the target program recommended to the user is determined. It can be seen that the session-aware collaborative attention module in the program recommendation model can calculate the correlation between the first historical behavior information and the first session information. The paired attention loss module adjusts the correlation of the session-aware collaborative attention module and enhances the features of the second historical behavior vector corresponding to the current session login device information. The login device information serves as a weak supervisory signal. Based on the correlation between the first historical behavior information and the current session behavior information, as well as the information of the current login device and the historical login device, it is determined that the users logged into the account belong to the same person. The accuracy of program recommendations can be improved based on the correlation and attention mechanism.
[0185] Those skilled in the art should understand that Figure 5 The device for program recommendation can be used to implement the program recommendation method described above, and the detailed description thereof should be similar to the description of the method part above. To avoid redundancy, it will not be described here.
[0186] Based on the same idea, the embodiment of the present application also provides a device for program recommendation, such as Figure 5As shown. The program recommendation device may have relatively large differences due to different configurations or performances, and may include one or more processors 601 and memory 602, and the memory 602 may store one or more storage applications or data. Among them, the memory 602 can be a temporary storage or a permanent storage. The application stored in the memory 602 may include one or more modules (not shown in the figure), and each module may include a series of computer-executable instructions in the program recommendation device. Furthermore, the processor 601 can be configured to communicate with the memory 602 to execute a series of computer-executable instructions in the memory 602 on the program recommendation device. The program recommendation device may also include one or more power supplies 603, one or more wired or wireless network interfaces 604, one or more input and output interfaces 605, and one or more keyboards 606.
[0187] Specifically, in this embodiment, the program recommendation device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the program recommendation device, and the one or more programs are configured to be executed by one or more processors, including computer-executable instructions for performing the following:
[0188] Obtaining first historical behavior information and current session behavior information of the user, where the first historical behavior information includes: historical program information browsed by the user on the historical login device, and the current session behavior information includes: current program information browsed by the user on the current login device within a preset time;
[0189] Mapping the first historical behavior information and the current session behavior information to obtain a low-dimensional dense first historical behavior vector and a current session behavior vector;
[0190] The encoding layer of the pre-trained program recommendation model processes the input current session behavior vector and outputs first session information, where the first session information is used to characterize the user's current session behavior.
[0191] The session-aware collaborative attention module in the program recommendation model processes the input first session information, the first historical behavior vector, and the candidate program information, and outputs second historical behavior information. The second historical behavior information is used to represent the relevance between the user's first historical behavior information and the first session information.
[0192] Through the paired attention loss module in the program recommendation model, when the current login device information and the historical login device information are consistent, the second historical behavior vector input in the session-aware collaborative attention module is feature enhanced to obtain third historical behavior information, wherein the second historical behavior vector includes: a first historical behavior vector corresponding to the historical login device information consistent with the current login device information, and the third historical behavior information is used to characterize the correlation between the second historical behavior vector and the first session information; the first session information, candidate program information and the third historical behavior information are input into the feedforward neural network in the program recommendation model, and the probability of the user clicking on the candidate program is output; the probability of the candidate program is used to determine the target program recommended to the user.
[0193] The specific execution steps can refer to the various steps of the above program recommendation method embodiment, and can achieve the same technical effect. To avoid repetition, they will not be described here.
[0194] The present application also provides a computer-readable storage medium storing one or more computer programs. The one or more computer programs include instructions. When executed by an electronic device including multiple application programs, the instructions enable the electronic device to perform various processes of the program recommendation method embodiment described above, and are specifically configured to perform:
[0195] Obtaining first historical behavior information and current session behavior information of the user, where the first historical behavior information includes: historical program information browsed by the user on the historical login device, and the current session behavior information includes: current program information browsed by the user on the current login device within a preset time;
[0196] Mapping the first historical behavior information and the current session behavior information to obtain a low-dimensional dense first historical behavior vector and a current session behavior vector;
[0197] The encoding layer of the pre-trained program recommendation model processes the input current session behavior vector and outputs first session information, where the first session information is used to characterize the user's current session behavior.
[0198] The session-aware collaborative attention module in the program recommendation model processes the input first session information, the first historical behavior vector, and the candidate program information, and outputs second historical behavior information. The second historical behavior information is used to represent the relevance between the user's first historical behavior information and the first session information.
[0199] Using the paired attention loss module in the program recommendation model, when the current login device information and the historical login device information are consistent, feature enhancement processing is performed on the second historical behavior vector inputted by the session-aware collaborative attention module to obtain third historical behavior information, wherein the second historical behavior vector includes: a first historical behavior vector corresponding to the historical login device information that is consistent with the current login device information; and the third historical behavior information is used to represent the correlation between the second historical behavior vector and the first session information.
[0200] The first session information, candidate program information and third historical behavior information are input into a feedforward neural network in a program recommendation model, and the probability of the user clicking on the candidate program is output; the probability of the candidate program is used to determine the target program recommended to the user.
[0201] The specific execution steps can refer to the various steps of the above program recommendation method embodiment, and can achieve the same technical effect. To avoid repetition, they will not be described here.
[0202] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0203] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0204] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0205] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0206] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0207] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0208] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0209] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0210] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0211] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0212] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0213] The various embodiments in this application are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so the description is relatively simple. For relevant parts, refer to the partial description of the method embodiment.
[0214] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A method for program recommendation, characterized in that: include: Obtain the user's first historical behavior information and current session behavior information; The first historical behavior information includes: historical program information browsed by the user on the historical login device, and the current session behavior information includes: current program information browsed by the user on the current login device within a preset time; Mapping the first historical behavior information and the current session behavior information to obtain a low-dimensional dense first historical behavior vector and a current session behavior vector; Processing the input current session behavior vector through an encoding layer in a pre-trained program recommendation model to output first session information, where the first session information is used to characterize the current session behavior of the user; The session-aware collaborative attention module in the program recommendation model processes the first session information, the first historical behavior vector, and the candidate program information, and outputs second historical behavior information, where the second historical behavior information is used to represent the relevance between the first historical behavior information and the first session information of the user. performing feature enhancement processing on the second historical behavior vector inputted into the session-aware collaborative attention module by the paired attention loss module in the program recommendation model when the current login device information and the historical login device information are consistent, thereby obtaining third historical behavior information, wherein the second historical behavior vector includes: the first historical behavior vector corresponding to the historical login device information consistent with the current login device information, and the third historical behavior information is used to represent the correlation between the second historical behavior vector and the first session information; The first session information, the candidate program information and the third historical behavior information are input into the feedforward neural network in the program recommendation model, and the probability of the user clicking on the candidate program is output; the probability of the candidate program is used to determine the target program recommended to the user.
2. The method according to claim 1, characterized in that The method further includes: training the program recommendation model: Acquiring the first historical behavior information, historical session behavior information, and historical candidate program information of a plurality of users, wherein the historical session behavior information includes current program information browsed by the user on a currently logged-in device within a preset time, and the historical candidate program information includes program information browsed by the user on the currently logged-in device after the preset time; Mapping the first historical behavior information and the historical conversation behavior information to obtain a low-dimensional dense first historical behavior vector and a historical conversation behavior vector; Inputting the historical session behavior vector into the encoding layer of the program recommendation model, and outputting second session information, where the second session information is used to represent the historical session behavior information of the user; The second session information, the first historical behavior vector, and the historical candidate program information are input into a program recommendation model to be trained. The session-aware collaborative attention module, the paired attention loss module, and the feedforward neural network in the model calculate the probability of the user clicking on the historical candidate program. The probability of the historical candidate program includes the probability of the historical candidate program having the highest correlation between the historical login device information corresponding to the first historical behavior vector and the current login device information corresponding to the second session information. Based on the probability of the user clicking on the historical candidate program and the historical candidate program information, the program recommendation model to be trained is trained to obtain a trained program recommendation model.
3. The method according to claim 1, characterized in that Before obtaining the user's first historical behavior information and current session behavior information, the method includes: Acquire a user's historical behavior sequence, the historical behavior sequence including: program information browsed by the user on all logged-in devices; The historical behavior sequence is divided into the first historical behavior information and the current session behavior information according to the preset time.
4. The method according to claim 1, wherein The mapping process of the first historical behavior information and the current session behavior information to obtain the first historical behavior vector and the current session behavior vector as low-dimensional dense vectors includes: Based on the high-dimensional and sparse first historical behavior information, the user's historical account information and the historical program information are mapped using deep embedding technology to obtain a low-dimensional and dense first historical behavior vector; Based on the high-dimensional and sparse current session behavior information, the user's current account information and the current program information are mapped using deep embedding technology to obtain a low-dimensional and dense current session behavior vector.
5. The method according to claim 1, characterized in that The step of processing the input first conversation information, the first historical behavior vector, and the candidate program information through the session-aware collaborative attention module in the program recommendation model and outputting second historical behavior information includes: Inputting the first session information, the historical behavior vector, and the candidate program information into a forward propagation neural network, and determining the first session information having the most significant correlation with the first historical behavior information through a maximum pooling layer; Calculating, based on a softmax function, an attention score of the first historical behavior vector and the first conversation information; Outputting the second historical behavior information according to the attention score and the first historical behavior vector.
6. The method according to claim 5, characterized in that The paired attention loss module in the program recommendation model performs feature enhancement processing on the second historical behavior vector inputted in the session-aware collaborative attention module when the current login device information and the historical login device information are consistent, to obtain third historical behavior information, including: When the current login device information corresponding to the first session information is consistent with the historical login device information corresponding to the first historical behavior information, the attention score of the second historical behavior vector is increased by the function in the paired attention loss module to obtain third historical behavior information.
7. The method according to claim 2, characterized in that The training of the program recommendation model further includes back propagation training, including: Obtain a single-device account and a multi-device account, where the single-device account is a user account that is logged into only a single device, and the multi-device account is a user account that is logged into multiple devices; Calculating the cross entropy loss of the single-device account based on the cross entropy loss function and the user behavior of logging into the single-device account to obtain a first loss function; According to the first loss function, a back propagation algorithm is used to adjust corresponding parameter information in the program recommendation model; Calculating a second loss function for the multi-device account based on the cross entropy loss function, the pairwise attention loss function, and the behavior of the user logging into the multi-device account; According to the second loss function, a back propagation algorithm is used to adjust the attention score and the parameter information of the corresponding first historical behavior vector in the program recommendation model.
8. A program recommendation device, characterized in that: The device comprises: A first acquisition module is configured to acquire first historical behavior information and current session behavior information of a plurality of users; the first historical behavior information includes: historical program information browsed by the user on a historically logged-in device; the current session behavior information includes current program information browsed by the user on a currently logged-in device within a preset time period; A first input module is configured to map the first historical behavior information and the current session behavior information to obtain a low-dimensional and dense first historical behavior vector and a current session behavior vector; a first output module, configured to process the input current session behavior vector through an encoding layer in a pre-trained program recommendation model, and output first session information, where the first session information is used to characterize the current session behavior of the user; a session-aware collaborative attention module, configured to process the input first session information, the first historical behavior vector, and candidate program information, and output second historical behavior information, wherein the second historical behavior information is used to represent the relevance between the first historical behavior information of the user and the first session information; a paired attention loss module, configured to, when the current login device information and the historical login device information are consistent, perform feature enhancement processing on the second historical behavior vector input into the session-aware collaborative attention module to obtain third historical behavior information, wherein the second historical behavior vector includes the first historical behavior vector corresponding to the historical login device information that is consistent with the current login device information, and the third historical behavior information is used to represent the correlation between the second historical behavior vector and the first session information; A feedforward neural network module is used to input the first session information, the candidate program information and the third historical behavior information into the feedforward neural network in the program recommendation model, and output the probability of the user clicking on the candidate program; the probability of the candidate program is used to determine the target program recommended to the user.
9. An electronic device, characterized in that: The method comprises a processor and a memory electrically connected to the processor, wherein the memory stores a computer program, and the processor is used to call and execute the computer program from the memory to implement a program recommendation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The storage medium is used to store a computer program, and the computer program can be executed by a processor to implement a program recommendation method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Self-attention sequence recommendation method, system and equipment fusing time information
CN115249175A
Graph model-based short video recommendation method, intelligent terminal and storage medium
WO2021179640A1