Content recommendation method, device, electronic device and storage medium
By generating interest feature vectors in the content recommendation system and utilizing the changing trends of users' interests in multiple scenarios, the problem of incomplete interest representation in the existing technology is solved, and a higher interest matching degree and personalized recommendation effect are achieved.
Patent Information
- Application Number
- CN202510818273.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-06-18
AI Technical Summary
In the existing technology, content recommendation systems cannot fully represent user interests, resulting in a low degree of match between recommended content and user interests.
By obtaining the historical behaviors of target users in multiple conversation scenarios, grouping them into conversation sequences, analyzing interest change trends, and generating interest feature vectors, we can recommend content in any conversation scenario.
It improves the matching degree between content recommendations and user interests, and achieves more comprehensive interest representation and personalized recommendations.
Smart Images

Figure CN120316357B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a content recommendation method, device, electronic device and storage medium. Background Art
[0002] Any app (application) can have multiple conversation scenarios. For example, a financial app may have different functional modules, such as an information recommendation module and a securities order module. User actions using the information recommendation module fall within the information recommendation conversation scenario, while user actions using the securities order module fall within the securities order conversation scenario. Furthermore, one or more of an app's conversation scenarios may involve content recommendation. For example, the aforementioned information recommendation conversation scenario is one such conversation scenario involving content recommendation.
[0003] In existing technologies, personalized recommendations for users in conversational scenarios involving content recommendation typically identify user interests based on user behavior during the conversation, such as clicks, searches, and purchases. However, the user's behavior during the conversation typically represents a relatively single dimension of interest, resulting in a low degree of match between the recommended content and the user's interests. Summary of the Invention
[0004] The purpose of the embodiments of the present invention is to provide a content recommendation method, device, electronic device, and storage medium to improve the matching degree between the content recommended to the user and the user's interests. The specific technical solution is as follows:
[0005] In a first aspect, the present application provides a content recommendation method, comprising:
[0006] Whenever a trigger condition is met, an interest feature vector of the target user is determined; the interest feature vector represents each interest and the weight of each interest;
[0007] In response to any conversation scenario satisfying a content recommendation condition for a target user, determining content to be recommended based on the target user's current interest feature vector, and recommending the content to be recommended to the target user in the conversation scenario;
[0008] The method for determining the interest feature vector includes:
[0009] Obtain target sequences corresponding to multiple historical behaviors; the multiple historical behaviors are behaviors performed by the target user in at least two conversation scenarios within a specified time period; the target sequence corresponding to each historical behavior includes descriptive information of multiple dimensions of the historical behavior;
[0010] Grouping the acquired target sequences to obtain a plurality of conversation sequences; each conversation sequence includes at least one target sequence, and the historical behaviors corresponding to the at least one target sequence belong to the same conversation scenario and occur in the same sub-period of the specified time period;
[0011] Determine the interest analysis results corresponding to each conversation sequence;
[0012] For each conversation scenario, based on the interest analysis results corresponding to the conversation scenario, determine the interest change vector of the target user in the conversation scenario, which is used to characterize the interest change trend; the interest analysis results corresponding to the conversation scenario include: the interest analysis results corresponding to each specified sequence, and the specified sequence is: the historical behavior corresponding to the included target sequence belongs to the conversation sequence of the conversation scenario; based on the determined interest change vector, determine the interest feature vector.
[0013] In a second aspect, the present application provides a content recommendation device, comprising:
[0014] A determination module, configured to determine an interest feature vector of a target user whenever a trigger condition is met; the interest feature vector represents each interest and the weight of each interest;
[0015] A recommendation module, configured to determine content to be recommended based on a current interest feature vector of the target user in response to any conversation scenario satisfying a content recommendation condition for the target user, and recommend the content to be recommended to the target user in the conversation scenario;
[0016] The method for determining the interest feature vector includes:
[0017] Obtain target sequences corresponding to multiple historical behaviors; the multiple historical behaviors are behaviors performed by the target user in at least two conversation scenarios within a specified time period; the target sequence corresponding to each historical behavior includes descriptive information of multiple dimensions of the historical behavior;
[0018] Grouping the acquired target sequences to obtain a plurality of conversation sequences; each conversation sequence includes at least one target sequence, and the historical behaviors corresponding to the at least one target sequence belong to the same conversation scenario and occur in the same sub-period of the specified time period;
[0019] Determine the interest analysis results corresponding to each conversation sequence;
[0020] For each conversation scenario, based on the interest analysis results corresponding to the conversation scenario, determine the interest change vector of the target user in the conversation scenario, which is used to characterize the interest change trend; the interest analysis results corresponding to the conversation scenario include: the interest analysis results corresponding to each specified sequence, and the specified sequence is: the historical behavior corresponding to the included target sequence belongs to the conversation sequence of the conversation scenario; based on the determined interest change vector, determine the interest feature vector.
[0021] In a third aspect, the present application provides an electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0022] Memory for storing computer programs;
[0023] The processor is configured to implement any of the above-mentioned content recommendation methods when executing the program stored in the memory.
[0024] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements any of the above-mentioned content recommendation methods.
[0025] An embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned content recommendation methods.
[0026] Beneficial effects of the embodiments of the present invention:
[0027] The solution of the present application determines the interest feature vector of the target user whenever a trigger condition is met, and in response to any conversation scenario satisfying the content recommendation condition for the target user, determines the content to be recommended based on the current interest feature vector of the target user, and recommends the content to be recommended to the target user in the conversation scenario. The interest feature vector of the present application is determined by using the interest change trend of the target user in each conversation scenario in multiple conversation scenarios. Therefore, the interest feature vector can more comprehensively represent the user's interests, so that the content to be recommended determined by using the interest feature vector has a high degree of matching with the user's interests. It can be seen that the solution of the present application can improve the matching degree between the content recommended to the user and the user's interests.
[0028] Of course, it is not necessary to achieve all of the advantages described above simultaneously in order to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present invention 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 of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0030] Figure 1 A flowchart of a content recommendation method provided in an embodiment of the present application;
[0031] Figure 2 This is a schematic diagram of the structure of multiple modules of a content recommendation method provided in an embodiment of the present application;
[0032] Figure 3 A schematic diagram of a model building module provided in an embodiment of the present application;
[0033] Figure 4 A schematic diagram of a user's real-time behavior sequence provided in an embodiment of the present application;
[0034] Figure 5 A schematic diagram of a user's daily status sequence provided in an embodiment of the present application;
[0035] Figure 6 A schematic diagram of a processing flow of a user interest extraction layer provided in an embodiment of the present application;
[0036] Figure 7 A schematic diagram of a processing flow of a user interest activation layer provided in an embodiment of the present application;
[0037] Figure 8 A schematic diagram of a processing flow of a click-through rate estimation layer provided in an embodiment of the present application;
[0038] Figure 9 A flowchart of another content recommendation method provided in an embodiment of the present application;
[0039] Figure 10 A schematic diagram of the structure of a content recommendation device provided in an embodiment of the present application;
[0040] Figure 11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field based on this application are within the scope of protection of the present invention.
[0042] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0043] In order to improve the matching degree between the content recommended to the user and the user's interests, the embodiments of the present application provide a content recommendation method, device, electronic device and storage medium.
[0044] The following first introduces a content recommendation method provided in an embodiment of the present application. A content recommendation method provided in an embodiment of the present application can be applied to a server. For example, the server can be a server of an APP (Application) that can perform content recommendation, or a server of a website that can perform content recommendation. This application does not limit the server, and the server of this application can be any server that can execute the content recommendation method of this application.
[0045] A content recommendation method provided in an embodiment of the present application may include:
[0046] Whenever a trigger condition is met, an interest feature vector of the target user is determined; the interest feature vector represents each interest and the weight of each interest;
[0047] In response to any conversation scenario satisfying a content recommendation condition for a target user, determining content to be recommended based on the target user's current interest feature vector, and recommending the content to be recommended to the target user in the conversation scenario;
[0048] The method for determining the interest feature vector includes:
[0049] Obtain target sequences corresponding to multiple historical behaviors; the multiple historical behaviors are behaviors performed by the target user in at least two conversation scenarios within a specified time period; the target sequence corresponding to each historical behavior includes descriptive information of multiple dimensions of the historical behavior;
[0050] Grouping the acquired target sequences to obtain a plurality of conversation sequences; each conversation sequence includes at least one target sequence, and the historical behaviors corresponding to the at least one target sequence belong to the same conversation scenario and occur in the same sub-period of the specified time period;
[0051] Determine the interest analysis results corresponding to each conversation sequence;
[0052] For each conversation scenario, based on the interest analysis results corresponding to the conversation scenario, an interest change vector of the target user in the conversation scenario is determined, which is used to characterize the interest change trend of the target user in the conversation scenario. The interest analysis results corresponding to the conversation scenario include interest analysis results corresponding to each specified sequence, where the specified sequence is a conversation sequence including historical behaviors corresponding to the target sequence belonging to the conversation scenario.
[0053] Based on the determined interest change vector, an interest feature vector is determined.
[0054] The solution of the present application determines the interest feature vector of the target user whenever a trigger condition is met, and in response to any conversation scenario satisfying the content recommendation condition for the target user, determines the content to be recommended based on the current interest feature vector of the target user, and recommends the content to be recommended to the target user in the conversation scenario. The interest feature vector of the present application is determined by using the interest change trend of the target user in each conversation scenario in multiple conversation scenarios. Therefore, the interest feature vector can more comprehensively represent the user's interests, so that the content to be recommended determined by using the interest feature vector has a high degree of matching with the user's interests. It can be seen that the solution of the present application can improve the matching degree between the content recommended to the user and the user's interests.
[0055] A content recommendation method provided by an embodiment of the present application is introduced below with reference to the accompanying drawings.
[0056] Figure 1 This is a flow chart of a content recommendation method provided by this application. Figure 1 As shown, the method includes:
[0057] S101, whenever a trigger condition is met, determining an interest feature vector of a target user; the interest feature vector represents each interest and the weight of each interest;
[0058] The trigger condition is a specified trigger condition, which can be one or more. For example, one or more of the following can be used as the trigger condition: the user's account for logging into the target APP, the user's execution of specified behaviors in the target APP, and the time point at which the target user's interest feature vector is periodically determined. The specified behavior can be a predetermined number of types of user operation behaviors, such as different types of user operation behaviors such as search behavior, information viewing behavior, and transaction behavior. Different APPs may have different corresponding specified behaviors, and this application does not limit the specified behaviors.
[0059] The interest feature vector of the target user may represent each interest of the target user and the weight of each interest. Whenever a trigger condition is met, the interest feature vector of the target user may be determined, thereby obtaining the latest interest feature vector of the target user.
[0060] The method of determining the interest feature vector of the target user includes steps A1-A5.
[0061] Step A1: Obtain target sequences corresponding to multiple historical behaviors; the multiple historical behaviors are behaviors performed by the target user in at least two conversation scenarios within a specified time period; the target sequence corresponding to each historical behavior includes descriptive information of multiple dimensions of the historical behavior.
[0062] The specified time period can be a time period with the current time point as the end time and the target time length. The current time is the time when the trigger condition is met. For example, if the target time length is one week, the specified time period can be the time period from the current time point to one week before the current time point, and the multiple historical behaviors are historical behaviors performed by the target user in at least two session scenarios of the APP within the time interval from the current time point to one week before the current time point. The target time length can be set according to actual needs, and this application does not limit this.
[0063] The multiple historical behaviors involve at least two conversation scenarios, and of course may also involve all conversation scenarios of the APP.
[0064] The descriptive information of multiple dimensions of historical behavior may, for example, include information describing the behavior, information describing the time when the behavior occurred, and information describing the conversation context in which the behavior occurred. The descriptive information of the multiple dimensions may vary for different apps, and this application does not limit this.
[0065] Step A2: group the acquired target sequences to obtain multiple conversation sequences; each conversation sequence includes at least one target sequence, and the historical behaviors corresponding to the at least one target sequence belong to the same conversation scenario and occur in the same sub-period of the specified time period.
[0066] The designated time period can be divided into multiple sub-periods. For example, if the designated time period is 24 hours long and each sub-period is 1 hour long, then the designated time period can be divided into 24 sub-periods. The division of sub-periods can be based on actual needs and is not limited in this application.
[0067] Target sequences that belong to the same conversation scenario and occur within a sub-period of the specified time period can be determined to belong to the same conversation sequence. Target sequences in each conversation sequence have a temporal order, and target sequences in each conversation sequence can be sorted according to the temporal order.
[0068] Step A3, determining the interest analysis results corresponding to each conversation sequence;
[0069] It is understood that the duration of each sub-period is typically short, and the behaviors corresponding to the target sequences included in each conversation sequence can be understood as the user's continuous operations over a short period of time. Therefore, the user interests represented by the behaviors corresponding to the target sequences included in each conversation sequence are typically the same interest. Of course, the user interests represented by the behaviors corresponding to the target sequences included in each conversation sequence can also be multiple interests.
[0070] By analyzing each target sequence included in any conversation sequence, the interest of the target user in the sub-period corresponding to the conversation sequence can be determined. Specifically, the interest of the target user is represented by the interest analysis result.
[0071] Each conversation sequence includes at least one target sequence, and each target sequence includes descriptive information of multiple dimensions of the historical behavior corresponding to the target sequence. The descriptive information of multiple dimensions of at least one target sequence included in each conversation sequence can be analyzed to obtain the interest analysis result corresponding to the conversation sequence.
[0072] For example, in a session sequence, the target user viewed stock A, stock B, and stock C, and stock A, stock B, and stock C are all stocks related to new energy. It can be determined that the target user's interest in the sub-period corresponding to the session sequence is: new energy.
[0073] Step A4, for each conversation scenario, based on the interest analysis results corresponding to the conversation scenario, determine the interest change vector of the target user in the conversation scenario, which is used to characterize the interest change trend; the interest analysis results corresponding to the conversation scenario include: the interest analysis results corresponding to each specified sequence, and the specified sequence is: the historical behavior corresponding to the included target sequence belongs to the conversation sequence of the conversation scenario.
[0074] There is a time sequence between the sub-periods corresponding to each conversation scenario. Therefore, for each conversation scenario, the interest change vector representing the interest change trend can be determined based on the time sequence of the sub-periods of each conversation sequence of the conversation scenario and the interest analysis results of each conversation sequence.
[0075] For example, a search session includes session sequences 1, 2, and 3. The sub-period corresponding to session sequence 1 is furthest from the current time point, the sub-period corresponding to session sequence 2 is second furthest, and the sub-period corresponding to session sequence 3 is closest to the current time point. The interest analysis result for session sequence 1 is: new energy, the interest analysis result for session sequence 2 is: artificial intelligence, and the interest analysis result for session sequence 3 is: photovoltaics. Therefore, it can be determined that the target user's interest change trend in this search session is: new energy - artificial intelligence - photovoltaics. The analyzed interest change trend can then be used to generate an interest change vector representing this trend.
[0076] Step A5: determining an interest feature vector based on the determined interest change vector.
[0077] Each conversation scenario corresponds to an interest change vector, and thus the current interest feature vector of the target user can be determined by using each interest change vector. Each conversation scenario corresponds to an interest change vector, and the interest change vector can characterize the interest change trend under the conversation scenario. Specifically, for each interest represented by each interest change vector, the initial weight of each interest can be determined according to the time of each interest on the timeline. For any interest, the closer the time of the interest on the timeline is to the current time point, the higher the corresponding initial weight. Multiple interest change vectors may include the same interest, and the weight of the interest can be obtained by performing weighted summation processing using multiple initial weights corresponding to the same interest in multiple interest change vectors. Thus, the interest feature vector of the target user is generated by using the weight of each interest.
[0078] For example, interest change vector 1, interest change vector 2, and interest change vector 3 all include interest A. In interest change vector 1, the initial weight of interest A is 0.5, and the weighting coefficient is 0.2. In interest change vector 2, the initial weight of interest A is 0.4, and the weighting coefficient is 0.3. In interest change vector 3, the initial weight of interest A is 0.6, and the weighting coefficient is 0.5. Then the weight of this interest is: 0.5*0.2+0.4*0.3+0.6*0.5=0.52. The weighting coefficients corresponding to different interest change vectors can be pre-set. For example, the weighting coefficient of the interest change vector corresponding to the conversation scenario can be set according to the conversation scenario. This application does not limit the setting method of the weighting coefficients corresponding to different interest change vectors.
[0079] S102 , in response to any conversation scenario satisfying a content recommendation condition for a target user, determining content to be recommended based on the current interest feature vector of the target user, and recommending the content to be recommended to the target user in the conversation scenario.
[0080] The content recommendation of this application can specifically be video recommendation, information recommendation, stock recommendation, product recommendation, etc. In different APPs, the content recommendation involved can be different, and this application does not limit the specific categories of APPs and content recommendations.
[0081] Within an app, content recommendations can exist in multiple conversation scenarios. For example, one conversation scenario is an information recommendation conversation scenario. In this scenario, content recommendation conditions for the target user may include: the user clicks on the information refresh button, the user performs an information search, etc. The content recommendation conditions can vary across different conversation scenarios, and this application does not limit them.
[0082] When any conversation scenario satisfies the content recommendation conditions for the target user, the current interest feature vector of the target user can be used to determine the recommended content that matches the user's interests. The current interest feature vector of the target user is the most recently determined interest feature vector in step S101.
[0083] The content to be recommended is recommended to the target user in the conversation scenario. Specifically, the content to be recommended may be displayed in an interface corresponding to the conversation scenario, thereby achieving recommendation to the user.
[0084] The solution of the present application determines the interest feature vector of the target user whenever a trigger condition is met, and in response to any conversation scenario satisfying the content recommendation condition for the target user, determines the content to be recommended based on the current interest feature vector of the target user, and recommends the content to be recommended to the target user in the conversation scenario. The interest feature vector of the present application is determined by using the interest change trend of the target user in each conversation scenario in multiple conversation scenarios. Therefore, the interest feature vector can more comprehensively represent the user's interests, so that the content to be recommended determined by using the interest feature vector has a high degree of matching with the user's interests. It can be seen that the solution of the present application can improve the matching degree between the content recommended to the user and the user's interests.
[0085] Optionally, determining the interest analysis result corresponding to each conversation sequence includes:
[0086] Convert each conversation sequence into a feature vector to obtain the feature vector corresponding to each conversation sequence;
[0087] An interest analysis is performed on the feature vector of each conversation sequence to obtain the interest analysis result corresponding to each conversation sequence.
[0088] Each conversation sequence is converted into a feature vector using random vectorization or pre-trained models such as the BERT model (Bidirectional Encoder Representation from Transformers) or the Word2Vec model (a related model for generating word vectors). This application does not limit the implementation method of vectorization.
[0089] By performing interest analysis on the feature vector of each conversation sequence, the vector corresponding to the user's interest in the sub-period corresponding to each conversation sequence can be determined. The vector corresponding to the interest in the sub-period corresponding to each conversation sequence is the interest analysis result.
[0090] Optionally, determining the interest feature vector of the target user is achieved by utilizing an interest extraction model;
[0091] The interest extraction model includes: a behavior division layer, a basic coding layer and an interest extraction layer;
[0092] The behavior segmentation layer is used to group the target sequences corresponding to the multiple historical behaviors into groups to obtain multiple conversation sequences.
[0093] The basic coding layer is used to convert each conversation sequence into a conversation feature vector to obtain the feature vector corresponding to each conversation sequence;
[0094] The interest extraction layer is used to perform interest analysis on the feature vectors of each conversation sequence to obtain the interest analysis results corresponding to each conversation sequence; and, for each conversation scenario, based on the interest analysis results corresponding to the conversation scenario, determine the interest change vector of the target user in the conversation scenario, which is used to characterize the interest change trend; based on the determined interest change vector, determine the interest feature vector of the target user.
[0095] In this application, the various steps performed by the behavior division layer, basic coding layer and interest extraction layer of the interest extraction model have been introduced in the above embodiments and will not be repeated here.
[0096] The specific structure of the interest extraction model is: a behavior classification layer, a basic coding layer, and an interest extraction layer. Thus, the solution of the present application, whenever a trigger condition is met, obtains target sequences corresponding to multiple historical behaviors, and after inputting the target sequences corresponding to the multiple historical behaviors into the interest extraction model, the interest feature vector of the target user can be obtained. It can be seen that the solution of the present application, using the interest extraction model, can improve the efficiency of determining the interest feature vector of the target user.
[0097] Optionally, the interest extraction layer includes: a first self-attention mechanism layer, a long short-term memory network LSTM, and a second self-attention mechanism layer;
[0098] The first self-attention mechanism layer is used to perform interest analysis on the feature vector of each conversation sequence to obtain an interest analysis result corresponding to each conversation sequence;
[0099] The long short-term memory network (LSTM) is used to determine, for each conversation scenario, an interest change vector of the target user in the conversation scenario, which is used to characterize the interest change trend based on the interest analysis result corresponding to the conversation scenario;
[0100] The second self-attention mechanism layer is used to analyze the interest change vectors of each conversation scenario to determine the weight of each interest of the target user, and generate the interest feature vector of the target user based on the determined weight of each interest.
[0101] That is, determining the interest feature vector of the target user based on the determined interest change vector may include: analyzing the interest change vectors of each conversation scenario to determine the weight of each interest of the target user, and generating the interest feature vector of the target user based on the determined weight of each interest.
[0102] In this embodiment, the specific structure of the interest extraction layer can be: a first self-attention mechanism layer - a long short-term memory network (LSTM) - a second self-attention mechanism layer. The first self-attention mechanism layer can include multiple first self-attention mechanism networks, each of which can simultaneously perform interest analysis on the feature vectors of a conversation sequence to obtain an interest analysis result corresponding to the conversation sequence. In other words, multiple first self-attention mechanism networks can process multiple conversation sequences in parallel. The multiple first self-attention mechanism networks can process each conversation sequence in parallel, thereby effectively improving the efficiency of performing interest analysis on the feature vectors of the conversation sequence and obtaining the interest analysis result corresponding to the conversation sequence.
[0103] The core feature of the self-attention mechanism is to calculate the attention relationship between elements within the same input sequence. In this application, the self-attention mechanism can support the extraction of changes in interest. The first and second self-attention mechanism layers both include the self-attention mechanism, but the functions implemented by the self-attention mechanism in the first and second self-attention mechanism layers are different in this application.
[0104] Optionally, the interest extraction layer further includes: a fully connected layer;
[0105] The fully connected layer is used to convert the dimensions of the interest change vectors of each conversation scenario into the same dimension before analyzing the interest change vectors of each conversation scenario.
[0106] Since the number of behaviors performed by the target user in different conversation scenarios may be different, the dimensions of the interest change vectors determined for each conversation scenario may not be the same. In order to improve the efficiency of analyzing the interest change vectors of each conversation scenario, the dimensions of the interest change vectors of each conversation scenario can be converted into the same dimension.
[0107] Optionally, the determining of the content to be recommended based on the current interest feature vector of the target user includes steps B1-B3.
[0108] Step B1, for each candidate content, based on the current interest feature vector of the target user and the feature vector of the candidate content, generate an interest activation feature vector corresponding to the candidate content; wherein the interest activation feature vector includes the vector of each interest in the current interest feature vector whose correlation with the feature vector of the candidate content is greater than the target degree.
[0109] The feature vector of each candidate content is determined using the attribute characteristics of the candidate content. For example, if a candidate content is news about new energy stocks, the attribute characteristics of the candidate content may include: new energy.
[0110] In one implementation, for each candidate content, generating an interest activation feature vector corresponding to the candidate content based on the current interest feature vector of the target user and the feature vector of the candidate content includes:
[0111] For each candidate content, the current interest feature vector of the target user and the feature vector of the candidate content are input into the target attention mechanism model, so that the target attention mechanism model determines the attention weights of each interest and / or each interest combination represented by the current interest feature vector, and constructs the interest activation feature vector corresponding to the candidate content based on the determined attention weights; wherein the attention weight of each interest is determined using the weight of the interest, and the attention weight of each interest combination is determined using the weights of each interest included in the interest combination.
[0112] Determining the attention weights for each interest and / or interest combination represented by the current interest feature vector captures the user's most interesting aspects of the candidate content. Specifically, this can be calculated using the attention mechanism. The core idea of the attention mechanism is to enable the model to automatically focus on key components and ignore secondary information when processing complex information, thereby improving information processing efficiency and accuracy.
[0113] The attention can be understood as the degree of attention. The higher the degree of match (correlation) between any interest represented by the current interest feature vector and the feature vector of the candidate content, the higher the corresponding attention weight. The attention weight can be dynamically allocated according to the current candidate content. The attention weight of each interest can be determined by the degree of match between the interest and the candidate content. And the attention weight of each interest can be dynamically adjusted based on the weight corresponding to the interest according to the degree of match between the interest and the candidate content. And it can be understood that a candidate information content can be related to multiple interests of the user. For example, the current user's interest feature vectors include: digital product interest (interest weight 0.9), sports interest (interest weight 0.8), mobile phone evaluation interest (interest weight 0.6) and food interest 0.7. The candidate content is content related to wireless headphones. Wireless headphones have a high matching degree with digital product interests, and the attention weight of digital product interests can be obtained as 0.95. Wireless headphones have a low matching degree with sports interests, and the attention weight of sports can be obtained as 0.2. Wireless headphones have a medium matching degree with mobile phone evaluation interests, and the attention weight of mobile phone evaluation interests is 0.5. Wireless headphones have a low matching degree with food evaluation interests, and the attention weight of food interests is 0.05. The attention weight of food interests that are not related to the candidate content is low and can be ignored.
[0114] The attention weight of each interest combination can represent the cross-dimensional relationship between multiple interests. For example, when the candidate content is new energy vehicles, the current user's interest feature vector includes new energy batteries and vehicles. Then the user can focus on the combination of new energy battery interests and vehicle interests, and the combination of new energy battery interests and vehicle interests can be assigned a higher attention weight. The attention weight of each interest combination can be determined based on the weights of each interest included in the interest combination.
[0115] This embodiment uses the attention mechanism to eliminate interference from irrelevant interests (for example, if the candidate content is related to wireless headphones, the attention weight of the food interest in the interest feature vector is low, and the food interest can be ignored), identify cross-dimensional interest relationships (such as the combined features of new energy battery interest and transportation interest), and activate different interest combinations for different candidate content.
[0116] Interest activation vector can be used to measure the user's interest in candidate content.
[0117] In this implementation, the current interest feature vector of the target user and the feature vector of the candidate content can be input into the target attention mechanism model for processing, so as to obtain the interest activation feature vector corresponding to the candidate content, thereby effectively improving the processing efficiency.
[0118] Each interest activation feature vector, in addition to including the attention weight, may also include an interest feature vector and a feature vector of the candidate content corresponding to the interest activation feature vector.
[0119] Step B2: determining an estimated click probability for each candidate content based on the interest activation feature vector corresponding to each candidate content and the feature vector used to characterize the user portrait of the target user;
[0120] In this application, a click probability estimation model may be used to determine the estimated click probability of each candidate content.
[0121] The user profile of the target user may, for example, include portrait data such as age, gender, region, and risk level. The specific content of the user profile may be different in different APPs, and this application does not limit this.
[0122] Specifically, the click-through rate prediction model can be trained using sample features of multiple sample users and the true values corresponding to the sample features. For each sample user, there can be multiple sample features of the sample user, and each sample feature is constructed using at least the sample interest activation feature vector of the sample user and the feature vector of the sample user portrait. The true value of each sample feature is the probability that the sample user actually clicks on the candidate content corresponding to the sample interest activation feature vector. During the training process of the click-through rate prediction model, the parameters of the click-through rate prediction model can be adjusted according to the difference between the estimated probability determined by the click-through rate prediction model for the sample features and the sample true value until the click-through rate prediction model converges.
[0123] The click rate prediction model can be trained periodically so that the updated click rate prediction model can more accurately determine the estimated click probability of each candidate content. When the click rate prediction model is trained, it is trained based on the model obtained in the previous training.
[0124] The determining of the estimated click probability of each candidate content based on the interest activation feature vector corresponding to each candidate content and the feature vector used to characterize the user portrait of the target user includes:
[0125] Based on the interest activation feature vector corresponding to each candidate content, the feature vector used to characterize the user portrait of the target user, and the tag click feature, the estimated click probability of each candidate content is determined.
[0126] Tag click features can include the number of clicks on each tag by the target user, as well as the number of clicks on each tag by all users. Specifically, each recommended content has a corresponding tag. When a user clicks on that content, the number of tags corresponding to that recommended content increases by 1. Different recommended content can have the same tag. The tag click feature can represent both personalized user data and general data for each user. Therefore, using this tag click feature for click-through rate (CTR) estimation can further improve the accuracy of CTR estimation.
[0127] In this embodiment, when training the CTR prediction model, each sample feature can be constructed using the sample user's sample interest activation feature vector, the feature vector of the sample user's profile, and the tag click feature. Otherwise, the training process of the CTR prediction model in this embodiment is identical to that of the above-described embodiment, and will not be elaborated upon here.
[0128] In step B3, the candidate contents are arranged from largest to smallest according to the estimated click probability, and the top N candidate contents are selected as the contents to be recommended.
[0129] The number of N can be set according to actual needs and is not limited in this application.
[0130] The higher the estimated click probability of the candidate content, the higher the degree of match between the candidate content and the user's interests. Therefore, the top N candidate contents selected are the N candidate contents with the highest degree of match between the user's interests and the candidate content.
[0131] Below, a content recommendation method of the present application is introduced through a specific embodiment.
[0132] Figure 2 A schematic diagram of the structure of multiple modules for implementing the content recommendation method of the present application.
[0133] like Figure 2 There are three modules for implementing the content recommendation method of this application, namely, data acquisition module, model building & training module, and model deployment module.
[0134] In this embodiment, the APP used by the user may be a financial APP, which may have functions such as stock trading, information recommendation, and information search.
[0135] Among them, the data acquisition module can obtain various user behavior sequences, user day-level sequences, user portraits, estimated product portrait features, and other features from App tracking points and attribute tables. Figure 2The user behavior sequence, user day-level sequence, user portrait, estimated product portrait features and other features shown are acquired by the data acquisition module.
[0136] The behavior sequence may include behavior sequences corresponding to user clicks, purchases, browsing, searches, and other behaviors, as well as account daily status sequences; the account daily status sequence refers to the user's financial status and position share after the market closes every day in the past X days, that is, it represents the changes in the user's current funds and position status. The X can be set according to actual needs. The behavior sequence corresponds to the target sequence of the above embodiment. The other features may include the number of clicks on each tag by the target user, and the number of clicks on each tag by all users. Specifically, each recommended content has a corresponding label. When a user clicks on the content, the number of labels corresponding to the recommended content is increased by 1. Different recommended content can have the same label. The estimated product portrait feature is the feature vector of the above candidate content.
[0137] The steps performed by the data acquisition module correspond to the above-mentioned steps of obtaining target sequences corresponding to each of the multiple historical behaviors.
[0138] The model building module can fit the click-through rate of the features of each sequence obtained by the data acquisition module and the estimated product portrait features.
[0139] The overall structure of the model building and training module is as follows Figure 3 As shown, it includes 5 layers from bottom to top, including the user behavior classification layer (i.e. Figure 2 Behavior division layer), feature vectorization representation layer (i.e. Figure 2 feature representation layer), user interest extraction layer (i.e. Figure 2 interest extraction layer), user interest activation layer (i.e. Figure 2 The user's entire behavior sequence, target item features, user portraits and other features are Figure 3 The input of the model described in . The user's entire behavior sequence is the user's entire behavior sequence, and the target item feature is the estimated product profile feature.
[0140] The user behavior segmentation layer is used to segment user behaviors. Specifically, it performs fine-grained segmentation of user behavior sequences, dividing them into different behavior sessions based on scenarios and time intervals. Each session is sorted in chronological order and represents the user's behavior sequence in one or more similar scenarios within a time period.
[0141] The user behavior classification layer corresponds to the behavior classification layer in the above embodiment.
[0142] Among them, user behavior sequences are further divided into user real-time behavior sequences and user daily status sequences according to their characteristic attributes.
[0143] For example, Figure 4 As shown, real-time user behavior sequences can be categorized into four session scenarios: user click sessions, user search sessions, user delegation sessions, and user cancellation sessions. Each session scenario can include multiple session sequences, from session sequence 1 to session sequence n. Each session sequence includes at least one target sequence, and the historical behaviors corresponding to the at least one target sequence belong to the same session scenario and occur within a sub-period of the specified time period.
[0144] like Figure 5 As shown, the user's daily status sequence can be divided into user fund status and user shareholding status. User fund status and user shareholding status belong to the session sequence. The user fund status session sequence can include the user's fund information during a specified time period; the user shareholding status session sequence can include information about the stocks held by the user during a specified time period.
[0145] The feature representation layer is used for feature vectorization. This layer is the basic coding layer. Users complete the embedding coding of user behavior sequences, user portraits, estimated information portraits and other features, and output them to the downstream in the form of dense vectors. When vectorizing, random vectorization methods or pre-trained model (such as BERT, Word2Vec) vectorization methods are generally used to obtain the vector Wembedding. When performing sequence processing, position information is also important information. Therefore, when vectorizing user sequences, sequence information, namely the position vector Pembedding, must also be added. After superimposing Wembedding and Pembedding, the final vector expression PWembedding=Wembedding+Pembedding is obtained. Among them, the generation method of Pembedding can refer to the following formula:
[0146] ;
[0147] .
[0148] Among them, PE is the position encoding, i.e., the position vector, pos is the position number in the sequence, i is the dimension index of the embedding vector, and d is the total dimension of the embedding vector.
[0149] The processing flow of the user interest extraction layer is as follows Figure 6As shown, it is used to receive the dense vectors of the above-mentioned different sessions of the user, and extract user interests for each session according to the self-attention mechanism (this self-attention mechanism corresponds to the first self-attention mechanism layer of the above-mentioned embodiment), such as session 1-session n corresponding to the user delegation session and session 1-session n corresponding to the user cancellation session; then the results of different sessions of the same category are sent to the LSTM, and the evolution of user interests is learned by extracting the relationship between the sessions; then, after using a fully connected layer to unify their dimensions, they are sent together to the next self-attention mechanism (this self-attention mechanism corresponds to the second self-attention mechanism layer of the above-mentioned embodiment) to extract the most important points of interest of the current user and form a user interest vector.
[0150] The user interest extraction layer of this embodiment corresponds to the interest extraction layer of the above embodiment.
[0151] User interest activation layer, such as Figure 7 As shown, it is used to receive the user interest vector generated by the user interest extraction layer, combine it with the attribute vector of the predicted information, that is, the predicted information vector, and extract the part with the greatest relationship between the user interest vector and the current predicted information vector through the attention mechanism, that is, to activate the interest path related to the user interest and the predicted target in a targeted manner, and generate an activation vector after the user interest is activated, which is used for click-through rate estimation in the click-through rate estimation layer.
[0152] The steps performed by the user interest activation layer correspond to the above steps of generating an interest activation feature vector corresponding to each candidate content based on the target user's current interest feature vector and the feature vector of the candidate content. The activation vector after the user interest is activated is the interest activation feature vector.
[0153] Click rate prediction layer, such as Figure 8 As shown in the figure, the activation vector generated by the user interest activation layer is concatenated with the user portrait vector and other feature vector representations, i.e., other feature vectors, and then fed into an MLP (multi-layer perceptron) for click-through rate estimation. Figure 8 Concatenate refers to vector concatenation.
[0154] The steps performed by the click rate prediction layer correspond to the steps of determining the content to be recommended based on the current interest feature vector of the target user. The click rate prediction layer of this embodiment corresponds to the click rate prediction model of the above embodiment.
[0155] Model deployment module: This module belongs to the online real-time reasoning part. The model obtained by the previous module is stored in two stages, namely as a user interest extraction model and a click-through rate prediction model. Among them, the user interest extraction model includes a user behavior classification layer, a feature vectorization representation layer, and a user interest extraction layer. The user interest extraction model of this embodiment corresponds to the interest extraction model of the above embodiment, and the click-through rate prediction model includes a user interest adaptation layer and a click-through rate prediction layer.
[0156] User interest extraction service: When a user performs any specified user behavior in the App, this service will be triggered to recalculate the user's interests and store them in the memory. The steps performed by the user interest extraction service correspond to the above S101. Figure 2 User interest extraction in the model deployment module is implemented using the user interest extraction model.
[0157] Click-through rate prediction service: This service is triggered when a user makes a request in a recommendation scenario. The inference service performs recall and click-through rate estimation. During the CTR estimation process, the attributes of each recalled information are matched to the user's interests. The CTR is then estimated and ranked based on the user's profile and other characteristics. The CTR prediction service corresponds to the CTR prediction model in the above-mentioned embodiment. Figure 2 In the model deployment module, click-through rate estimation is achieved using the click-through rate estimation model.
[0158] like Figure 9 As shown in the figure, when a user performs a specific action in the app, the user interest extraction service is triggered. This service calculates the user's interests, obtains the user's interest features, and stores them in Redis (a type of storage). The interest extraction service specifically uses a model to extract user interests.
[0159] When a user makes a user request in the App, the model can be triggered to estimate the click-through rate. Based on the estimated click-through rate, a recommendation service can be provided to recommend the determined recommendation results to the user.
[0160] The content recommendation method of this embodiment has no limit on the length of the user behavior sequence and can be applied to ultra-long sequences, that is, no matter how many user behaviors the user has, the solution of this application can process them, and because of the model structure involved in the solution of this application, even if the number of user behaviors is large, it can be processed quickly, and the processing efficiency is high. In addition, the solution of this embodiment does not limit the type of user behavior sequence, and the behavior sequences of various conversation scenarios can be applied to the solution of this application. The solution of this application is highly efficient: the parallel computing of the attention mechanism can improve the timeliness of model training and calculation. The solution of this application is easy to operate: the model structure can be applied to a variety of recommendation scenarios and has strong adaptability. The solution of this application can improve the precision and accuracy of content recommendations: the model can accurately extract user interests and locally activated interests, and can improve the model recall rate; the ultimate benefit reflected in online is to improve the accuracy of online recommendation effects.
[0161] Based on the above-mentioned embodiment of the content recommendation method, the embodiment of the present application further provides a content recommendation device. Figure 10 A schematic diagram of the structure of a video recommendation device provided in an embodiment of the present application is shown in FIG. Figure 10 As shown, the video recommendation device may include:
[0162] Determination module 1001, for determining the interest feature vector of the target user whenever a trigger condition is met; the interest feature vector represents each interest and the weight of each interest;
[0163] A recommendation module 1002 is configured to determine content to be recommended based on the target user's current interest feature vector in response to any conversation scenario satisfying a content recommendation condition for the target user, and recommend the content to be recommended to the target user in the conversation scenario;
[0164] The method for determining the interest feature vector includes:
[0165] Obtain target sequences corresponding to multiple historical behaviors; the multiple historical behaviors are behaviors performed by the target user in at least two conversation scenarios within a specified time period; the target sequence corresponding to each historical behavior includes descriptive information of multiple dimensions of the historical behavior;
[0166] Grouping the acquired target sequences to obtain a plurality of conversation sequences; each conversation sequence includes at least one target sequence, and the historical behaviors corresponding to the at least one target sequence belong to the same conversation scenario and occur in the same sub-period of the specified time period;
[0167] Determine the interest analysis results corresponding to each conversation sequence;
[0168] For each conversation scenario, based on the interest analysis results corresponding to the conversation scenario, determine the interest change vector of the target user in the conversation scenario, which is used to characterize the interest change trend; the interest analysis results corresponding to the conversation scenario include: the interest analysis results corresponding to each specified sequence, and the specified sequence is: the historical behavior corresponding to the included target sequence belongs to the conversation sequence of the conversation scenario; based on the determined interest change vector, determine the interest feature vector.
[0169] Optionally, determining the interest analysis result corresponding to each conversation sequence includes:
[0170] Convert each conversation sequence into a feature vector to obtain the feature vector corresponding to each conversation sequence;
[0171] An interest analysis is performed on the feature vector of each conversation sequence to obtain the interest analysis result corresponding to each conversation sequence.
[0172] Optionally, the recommendation module includes:
[0173] a generating unit configured to generate, for each candidate content, an interest activation feature vector corresponding to the candidate content based on the target user's current interest feature vector and the feature vector of the candidate content; wherein the interest activation feature vector includes a vector of each interest in the current interest feature vector having a correlation greater than a target correlation with the feature vector of the candidate content;
[0174] a determination unit, configured to determine an estimated click probability of each candidate content based on an interest activation feature vector corresponding to each candidate content and a feature vector used to characterize a user profile of the target user;
[0175] The selection unit is used to arrange the candidate contents from large to small according to the estimated click probability, and select the top N candidate contents as the contents to be recommended.
[0176] Optionally, determining the interest feature vector of the target user is achieved by utilizing an interest extraction model;
[0177] The interest extraction model includes: a behavior division layer, a basic coding layer and an interest extraction layer;
[0178] The behavior segmentation layer is used to group the target sequences corresponding to the multiple historical behaviors into groups to obtain multiple conversation sequences.
[0179] The basic coding layer is used to convert each conversation sequence into a conversation feature vector to obtain the feature vector corresponding to each conversation sequence;
[0180] The interest extraction layer is used to perform interest analysis on the feature vectors of each conversation sequence to obtain the interest analysis results corresponding to each conversation sequence; and, for each conversation scenario, based on the interest analysis results corresponding to the conversation scenario, determine the interest change vector of the target user in the conversation scenario, which is used to characterize the interest change trend; based on the determined interest change vector, determine the interest feature vector of the target user.
[0181] Optionally, the interest extraction layer includes: a first self-attention mechanism layer, a long short-term memory network LSTM, and a second self-attention mechanism layer;
[0182] The first self-attention mechanism layer is used to perform interest analysis on the feature vector of each conversation sequence to obtain an interest analysis result corresponding to each conversation sequence;
[0183] The long short-term memory network (LSTM) is used to determine, for each conversation scenario, an interest change vector of the target user in the conversation scenario based on the interest analysis result corresponding to the conversation scenario, which is used to characterize the interest change trend;
[0184] The second self-attention mechanism layer is used to analyze the interest change vectors of each conversation scenario to determine the weight of each interest of the target user, and generate the interest feature vector of the target user based on the determined weight of each interest.
[0185] Optionally, the interest extraction layer further includes: a fully connected layer;
[0186] The fully connected layer is used to convert the dimensions of the interest change vectors of each conversation scenario into the same dimension before analyzing the interest change vectors of each conversation scenario.
[0187] Optionally, the generating unit includes:
[0188] A sub-unit is constructed for inputting the current interest feature vector of the target user and the feature vector of the candidate content into the target attention mechanism model for each candidate content, so that the target attention mechanism model determines the attention weights of each interest and / or each interest combination represented by the current interest feature vector, and constructs the interest activation feature vector corresponding to the candidate content based on the determined attention weights; wherein the attention weight of each interest is determined by using the weight of the interest, and the attention weight of each interest combination is determined by using the weights of each interest included in the interest combination.
[0189] The embodiment of the present invention further provides an electronic device, such as Figure 11As shown, it includes a processor 1101 , a communication interface 1102 , a memory 1103 and a communication bus 1104 , wherein the processor 1101 , the communication interface 1102 , and the memory 1103 communicate with each other via the communication bus 1104 .
[0190] Memory 1103, used for storing computer programs;
[0191] The processor 1101 is configured to implement any of the above-mentioned content recommendation methods when executing the program stored in the memory 1103 .
[0192] The communication bus mentioned in the electronic devices mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into address buses, data buses, control buses, etc. For ease of illustration, only a single thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0193] The communication interface is used for communication between the above electronic device and other devices.
[0194] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0195] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0196] In another embodiment of the present invention, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned content recommendation methods are implemented.
[0197] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is executed on a computer, the computer is enabled to perform the content recommendation method described in any one of the above embodiments.
[0198] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state disk (SSD)).
[0199] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0200] Each embodiment in this specification is described in a related manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
[0201] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.
Claims
1. A content recommendation method, characterized in that: include: Whenever a trigger condition is met, an interest feature vector of the target user is determined; the interest feature vector represents each interest and the weight of each interest; In response to any conversation scenario satisfying a content recommendation condition for a target user, determining content to be recommended based on the target user's current interest feature vector, and recommending the content to be recommended to the target user in the conversation scenario; The method for determining the interest feature vector includes: Obtain target sequences corresponding to multiple historical behaviors; the multiple historical behaviors are behaviors performed by the target user in at least two conversation scenarios within a specified time period; the target sequence corresponding to each historical behavior includes descriptive information of multiple dimensions of the historical behavior; Grouping the acquired target sequences to obtain a plurality of conversation sequences; each conversation sequence includes at least one target sequence, and the historical behaviors corresponding to the at least one target sequence belong to the same conversation scenario and occur in the same sub-period of the specified time period; Determine the interest analysis results corresponding to each conversation sequence; For each conversation scenario, based on the interest analysis results corresponding to the conversation scenario, an interest change vector of the target user in the conversation scenario, which is used to characterize the interest change trend of the target user, is determined; the interest analysis results corresponding to the conversation scenario include interest analysis results corresponding to each specified sequence, where the specified sequence is a conversation sequence including a target sequence whose historical behavior corresponds to the conversation scenario; based on the determined interest change vector, an interest feature vector is determined; The determining of the interest feature vector based on the determined interest change vector includes: Analyze the interest change vectors of each determined conversation scenario to determine the weight of each interest of the target user; wherein, for each interest represented by each interest change vector, determine the initial weight of each interest according to the time of each interest on the timeline; for any interest, the closer the time of the interest on the timeline is to the current time point, the higher the corresponding initial weight; if multiple interest change vectors include the same interest, use the multiple initial weights corresponding to the same interest in the multiple interest change vectors to perform weighted summation processing to obtain the weight of the same interest; An interest feature vector of the target user is generated based on the determined weight of each interest.
2. The method according to claim 1, characterized in that Determining the interest analysis result corresponding to each conversation sequence includes: Convert each conversation sequence into a conversation feature vector to obtain the feature vector corresponding to each conversation sequence; An interest analysis is performed on the feature vector of each conversation sequence to obtain the interest analysis result corresponding to each conversation sequence.
3. The method according to claim 1 or 2, characterized in that The determining of the content to be recommended based on the current interest feature vector of the target user includes: For each candidate content, based on the target user's current interest feature vector and the feature vector of the candidate content, an interest activation feature vector corresponding to the candidate content is generated; wherein the interest activation feature vector includes a vector of each interest in the current interest feature vector whose correlation with the feature vector of the candidate content is greater than a target correlation; Determining an estimated click probability for each candidate content based on an interest activation feature vector corresponding to each candidate content and a feature vector used to characterize a user profile of the target user; Arrange the candidate contents from largest to smallest according to their estimated click probability, and select the top N candidate contents as the contents to be recommended.
4. The method according to claim 2, characterized in that The determining of the interest feature vector of the target user is achieved by utilizing an interest extraction model; The interest extraction model includes: a behavior division layer, a basic coding layer and an interest extraction layer; The behavior segmentation layer is used to group the target sequences corresponding to the multiple historical behaviors into groups to obtain multiple conversation sequences. The basic coding layer is used to convert each conversation sequence into a conversation feature vector to obtain the feature vector corresponding to each conversation sequence; The interest extraction layer is used to perform interest analysis on the feature vectors of each conversation sequence to obtain the interest analysis results corresponding to each conversation sequence; and, for each conversation scenario, based on the interest analysis results corresponding to the conversation scenario, determine the interest change vector of the target user in the conversation scenario, which is used to characterize the interest change trend; based on the determined interest change vector, determine the interest feature vector of the target user.
5. The method according to claim 4, characterized in that The interest extraction layer includes: a first self-attention mechanism layer, a long short-term memory network LSTM and a second self-attention mechanism layer; The first self-attention mechanism layer is used to perform interest analysis on the feature vector of each conversation sequence to obtain an interest analysis result corresponding to each conversation sequence; The long short-term memory network (LSTM) is used to determine, for each conversation scenario, an interest change vector of the target user in the conversation scenario, which is used to characterize the interest change trend based on the interest analysis result corresponding to the conversation scenario; The second self-attention mechanism layer is used to analyze the interest change vectors of each conversation scenario to determine the weight of each interest of the target user, and generate the interest feature vector of the target user based on the determined weight of each interest.
6. The method according to claim 5, characterized in that The interest extraction layer further includes: a fully connected layer; The fully connected layer is used to convert the dimensions of the interest change vectors of each conversation scenario into the same dimension before analyzing the interest change vectors of each conversation scenario.
7. The method according to claim 3, characterized in that The generating, for each candidate content, an interest activation feature vector corresponding to the candidate content based on the current interest feature vector of the target user and the feature vector of the candidate content includes: For each candidate content, the current interest feature vector of the target user and the feature vector of the candidate content are input into the target attention mechanism model, so that the target attention mechanism model determines the attention weights of each interest and / or each interest combination represented by the current interest feature vector, and constructs the interest activation feature vector corresponding to the candidate content based on the determined attention weights; wherein the attention weight of each interest is determined using the weight of the interest, and the attention weight of each interest combination is determined using the weights of each interest included in the interest combination.
8. A content recommendation device, characterized in that: The device comprises: A determination module, configured to determine an interest feature vector of a target user whenever a trigger condition is met; the interest feature vector represents each interest and the weight of each interest; A recommendation module, configured to determine content to be recommended based on a current interest feature vector of the target user in response to any conversation scenario satisfying a content recommendation condition for the target user, and recommend the content to be recommended to the target user in the conversation scenario; The method for determining the interest feature vector includes: Obtain target sequences corresponding to multiple historical behaviors; the multiple historical behaviors are behaviors performed by the target user in at least two conversation scenarios within a specified time period; the target sequence corresponding to each historical behavior includes descriptive information of multiple dimensions of the historical behavior; Grouping the acquired target sequences to obtain a plurality of conversation sequences; each conversation sequence includes at least one target sequence, and the historical behaviors corresponding to the at least one target sequence belong to the same conversation scenario and occur in the same sub-period of the specified time period; Determine the interest analysis results corresponding to each conversation sequence; For each conversation scenario, based on the interest analysis results corresponding to the conversation scenario, an interest change vector of the target user in the conversation scenario, which is used to characterize the interest change trend of the target user, is determined; the interest analysis results corresponding to the conversation scenario include interest analysis results corresponding to each specified sequence, where the specified sequence is a conversation sequence including a target sequence whose historical behavior corresponds to the conversation scenario; based on the determined interest change vector, an interest feature vector is determined; The determining of the interest feature vector based on the determined interest change vector includes: Analyze the interest change vectors of each determined conversation scenario to determine the weight of each interest of the target user; wherein, for each interest represented by each interest change vector, determine the initial weight of each interest according to the time of each interest on the timeline; for any interest, the closer the time of the interest on the timeline is to the current time point, the higher the corresponding initial weight; if multiple interest change vectors include the same interest, use the multiple initial weights corresponding to the same interest in the multiple interest change vectors to perform weighted summation processing to obtain the weight of the same interest; An interest feature vector of the target user is generated based on the determined weight of each interest.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 7 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Object recommendation method and device, electronic equipment and readable storage medium
CN119336995A
Content recommendation method and device, electronic equipment and storage medium
CN120123591A