Topic dynamic recommendation method, device, storage medium and electronic device

By obtaining the user's historical chat and basic interest information, and using language models and long-term memory network models to identify dynamic interests, the problem of inability to recommend conversational topics that meet user interests in real time in the prior art is solved, and more accurate interest recognition and recommend.

CN114398907BActive Publication Date: 2025-01-14BEIJING MININGLAMP SOFTWARE SYST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210016016.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-07
Publication Date
2025-01-14
Estimated Expiration
2042-01-07

AI Technical Summary

Technical Problem

The prior art cannot effectively identify dynamic changes in user interest information, resulting in the inability to recommend conversational topics that meet users' dynamic interests in real time.

Method used

By obtaining the user's historical chat information and basic interest information, using the language model to extract embedded features, and identifying dynamic interest information through improved long-term and short-term memory network model and attention mechanism, we recommend conversational topics that are more in line with user interests.

Benefits of technology

Real-time identification and recommendation of changes in user interests is achieved, and the accuracy and user experience of recommendations are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114398907B_ABST
    Figure CN114398907B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, storage medium and electronic device for dynamic topic recommendation. The method comprises: obtaining user information of a user and session information of each of a plurality of session topics, wherein the session topic is a topic to be recommended to the user, and the user information comprises the user's historical chat information and basic interest information; inputting the user information and session information into a language model to obtain the user's basic interest vector, the historical chat information vector and the session information vector of the session information; extracting the embedded features of the historical chat information through convolution kernels of different sizes; encoding the embedded features to obtain the user's dynamic interest information; determining a target session topic from the session topics according to the dynamic interest information and the session information vector; and recommending the target session topic to the user. The present invention solves the technical problem that a session topic that is more in line with the user's dynamic interest information cannot be recommended to the user when the user's interest changes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a topic dynamic recommendation method, device, storage medium and electronic device. Background Art

[0002] In the prior art, there is no good recommendation method that can effectively identify user interest information based on topic changes and recommend conversation topics that match the user's dynamic interest information in real time. Traditional recommendation methods focus on feature engineering, matching interests by constructing feature representations of users and conversation topics, and deep learning-based recommendation methods improve the performance of recommendation algorithms through various neural networks. However, a large amount of conversation information causes users' interests to change constantly. When users' interests change over time, it is impossible to recommend conversation topics that are more in line with users' dynamic interest information. Summary of the invention

[0003] The embodiments of the present invention provide a topic dynamic recommendation method, device, storage medium and electronic device to at least solve the problem that when the user's interests change, a conversation topic that is more in line with the user's dynamic interest information cannot be recommended to the user.

[0004] According to one aspect of an embodiment of the present invention, a method for dynamic topic recommendation is provided, comprising: obtaining user information of a user and session information of each of a plurality of session topics, wherein the session topic is a topic to be recommended to the user, and the user information comprises historical chat information and basic interest information of the user; inputting the user information and the session information into a language model to obtain a basic interest vector, a historical chat information vector and a session information vector of the session information of the user; extracting embedded features of the historical chat information by using convolution kernels of different sizes; encoding the embedded features to obtain the dynamic interest information of the user; determining a target session topic from the session topics according to the dynamic interest information and the session information vector; and recommending the target session topic to the user.

[0005] According to another aspect of an embodiment of the present invention, a topic dynamic recommendation device is provided, comprising: an acquisition module, used to acquire user information of a user and session information of each of a plurality of session topics, wherein the above-mentioned session topic is a topic to be recommended to the above-mentioned user, and the above-mentioned user information includes historical chat information and basic interest information of the above-mentioned user; an input module, used to input the above-mentioned user information and the above-mentioned session information into a language model to obtain the basic interest vector, the historical chat information vector and the session information vector of the above-mentioned session information of the above-mentioned user; an extraction module, used to extract the embedded features of the above-mentioned historical chat information through convolution kernels of different sizes; an encoding module, used to encode the above-mentioned embedded features to obtain the dynamic interest information of the above-mentioned user; a determination module, used to determine the target session topic from the above-mentioned session topics according to the above-mentioned dynamic interest information and the above-mentioned session information vector; and a recommendation module, used to recommend the above-mentioned target session topic to the above-mentioned user.

[0006] As an optional example, the extraction module includes: an extraction unit, used to extract the embedded features of the historical chat information using a feature extraction model, wherein the feature extraction model includes a word embedding layer, a convolution layer, a pooling layer, and a fully connected layer, and the convolution layer includes convolution kernels of different sizes.

[0007] As an optional example, the extraction unit includes: a processing subunit, used to use the historical chat information vector as the output content of the word embedding layer; an encoding subunit, used to encode the output content using one-dimensional convolution encoding with different convolution kernels to obtain encoding information; a pooling subunit, used to perform a maximum pooling operation on the encoding information to obtain pooling information; and an integration subunit, used to integrate the pooling information to obtain the embedding feature.

[0008] As an optional example, the above-mentioned encoding module includes: a transformation unit, used to perform a linear transformation on the above-mentioned basic interest vector to obtain a transformation result; an initialization unit, used to use the above-mentioned transformation result to initialize the long short-term memory network model to obtain a target long short-term memory network model; an identification unit, used to identify the above-mentioned embedded features by the above-mentioned target long short-term memory network model to obtain the above-mentioned dynamic interest information.

[0009] As an optional example, the above-mentioned device also includes: a processing module, which is used to input the above-mentioned session information vector into the above-mentioned target long short-term memory network after acquiring the above-mentioned session information vector, to obtain a new above-mentioned session information vector, and when determining the above-mentioned target conversation topic, use the above-mentioned dynamic interest information and the new above-mentioned session information vector to determine the above-mentioned target conversation topic.

[0010] As an optional example, the above-mentioned determination module includes: a calculation unit, used to calculate the vector dot product of the above-mentioned dynamic interest information and the above-mentioned session information vector of each of the above-mentioned session information; a mapping unit, used to map the above-mentioned vector dot product to a target interval to obtain the calculation result of the above-mentioned session information; a determination unit, used to determine the session topic corresponding to the session information with the largest calculation result as the above-mentioned target session topic.

[0011] According to another aspect of the embodiments of the present invention, a storage medium is provided, in which a computer program is stored, wherein the computer program executes the above-mentioned topic dynamic recommendation method when executed by a processor.

[0012] According to another aspect of an embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-mentioned topic dynamic recommendation method through the computer program.

[0013] The above-mentioned topic dynamic recommendation method of the present application can be used for personalized recommendation processing of recommendation technology. In an embodiment of the present invention, the user information of the user and the session information of each session topic in multiple session topics are obtained, wherein the above-mentioned session topic is a topic to be recommended to the above-mentioned user, and the above-mentioned user information includes the historical chat information and basic interest information of the above-mentioned user; the above-mentioned user information and the above-mentioned session information are input into the language model to obtain the basic interest vector, the historical chat information vector and the session information vector of the above-mentioned session information of the above-mentioned user; the embedded features of the above-mentioned historical chat information are extracted by convolution kernels of different sizes; the above-mentioned embedded features are encoded to obtain the dynamic interest information of the above-mentioned user; according to the above-mentioned dynamic interest information and the above-mentioned session information vector, the target session topic is determined from the above-mentioned session topics; the method for recommending the above-mentioned target session topic to the above-mentioned user, because in the above-mentioned method, the improved long short-term memory network model is adopted to obtain the user's dynamic interest information, and the session topic that is more in line with the user's dynamic interest is identified through the attention mechanism and recommended to the user, thereby achieving the purpose of recommending to the user a session topic that is more in line with the user's dynamic interest information, thereby solving the technical problem that when the user's interest changes, a session topic that is more in line with the user's dynamic interest information cannot be recommended to the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0015] Figure 1 is a flowchart of an optional topic dynamic recommendation method according to an embodiment of the present invention;

[0016] Figure 2 is a technical solution diagram of an optional topic dynamic recommendation method according to an embodiment of the present invention;

[0017] Figure 3 is a structural diagram of an improved long short-term memory network model of an optional topic dynamic recommendation method according to an embodiment of the present invention;

[0018] Figure 4 is a schematic structural diagram of an optional topic dynamic recommendation device according to an embodiment of the present invention;

[0019] Figure 5 is a schematic diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0020] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments 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 without creative work should fall within the scope of protection of the present invention.

[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0022] According to a first aspect of an embodiment of the present invention, a topic dynamic recommendation method is provided. Optionally, Figure 1 As shown, the above method includes:

[0023] S102, obtaining user information of the user and session information of each of a plurality of session topics, wherein the session topic is a topic to be recommended to the user, and the user information includes historical chat information and basic interest information of the user;

[0024] S104, inputting the user information and the session information into the language model to obtain the user's basic interest vector, the historical chat information vector, and the session information vector of the session information;

[0025] S106, extracting the embedding features of the historical chat information through convolution kernels of different sizes;

[0026] S108, encoding the embedded features to obtain the user's dynamic interest information;

[0027] S110, determining a target conversation topic from conversation topics according to the dynamic interest information and the conversation information vector;

[0028] S112, recommending a target conversation topic to the user.

[0029] Optionally, in this embodiment, the conversation topic can be a public account or a subscription account, and the conversation information of the conversation topic can be topic content such as pets, reading, movies, etc. Basic interest information includes personal information such as user gender, age, hobbies, etc. The language model is a language abstract mathematical modeling based on objective language facts. It is a corresponding relationship. The present invention adopts the Bert pre-trained language model, which has powerful language representation and feature extraction capabilities. Convolution kernels of different sizes can be 1, 2, 3, 4, etc. Dynamic interest information is the user's interest information that changes in real time.

[0030] Optionally, in this embodiment, one or more conversation topics and conversation information of the conversation topics, as well as the user's historical chat information and basic interest information are obtained, and the vectors of the conversation information, basic interest information and historical chat information are obtained through the Bert pre-trained language model. The convolutional neural network model is used to extract the embedded features of the historical chat information through convolution kernels of different sizes. The convolutional neural network model can be a textCNN model. The textCNN model is a model that uses a convolutional neural network to process natural language problems, and can extract important features more efficiently. The neural network model is used to encode the embedded features to obtain the user's dynamic interest information. The neural network model can use an improved LSTM model. The improved LSTM model is an improved long short-term memory artificial neural network model that integrates the transformer model. It is a time-recurrent neural network with higher feature expression capabilities. Finally, based on the dynamic interest information, the conversation topic that is more in line with the user's dynamic interest information among multiple conversation topics is determined and recommended to the user.

[0031] Optionally, in this embodiment, an improved long short-term memory network model is used to obtain user dynamic interest information, and the conversation topics that are more in line with the user's dynamic interests are identified through the attention mechanism and recommended to the user, thereby achieving the purpose of recommending conversation topics that are more in line with the user's dynamic interest information to the user, and further solving the technical problem that conversation topics that are more in line with the user's dynamic interest information cannot be recommended to the user when the user's interests change.

[0032] As an optional example, the embedding features of historical chat information extracted by convolution kernels of different sizes include:

[0033] A feature extraction model is used to extract embedded features of historical chat information, where the feature extraction model includes a word embedding layer, a convolution layer, a pooling layer, and a fully connected layer, and the convolution layer includes convolution kernels of different sizes.

[0034] Optionally, the feature extraction model in this embodiment can be a long short-term memory artificial neural network model, which is used to extract embedded features of historical chat records. The feature extraction process of the long short-term memory artificial neural network model includes an embedding layer, a convolution layer, a pooling layer, and a fully connected layer. The embedding layer can convert the input data into a vector of a fixed size. Convolution is multiplication and addition. The convolution layer can easily extract features. The convolution layer includes convolution kernels of different sizes. The convolution kernel is also called a filter. The convolution kernel needs to be flipped during the calculation of the convolution. The pooling layer uses a pooling function to unify the dimensions of the features of different sizes extracted by the convolution kernels of different sizes in the convolution layer. The fully connected layer inputs the information obtained by the pooling layer and outputs the embedded features.

[0035] As an optional example, using a feature extraction model to extract embedding features of historical chat information includes:

[0036] The historical chat information vector is used as the output of the word embedding layer;

[0037] The output content is encoded using one-dimensional convolutional coding with different convolution kernels to obtain encoded information;

[0038] Perform a maximum pooling operation on the encoded information to obtain pooled information;

[0039] Integrate the pooled information to obtain embedded features.

[0040] Optionally, in this embodiment, historical chat information is input into the embedding layer, and a historical chat information vector is output. In the convolution layer, one-dimensional convolution encoding is performed on the historical chat information vector using convolution kernels of different sizes to obtain encoded information. In the pooling layer, a pooling function is used to unify the dimension of the encoded information to obtain pooled information. Finally, the pooled information is integrated in the fully connected layer to obtain embedded features of the historical chat information.

[0041] As an optional example, encoding the embedded features to obtain the user's dynamic interest information includes:

[0042] Perform a linear transformation on the basic interest vector to obtain the transformation result;

[0043] Use the transformation result to initialize the long short-term memory network model to obtain the target long short-term memory network model;

[0044] The target long short-term memory network model recognizes embedded features and obtains dynamic interest information.

[0045] Optionally, in this embodiment, the linear transformation is a linear mapping of the linear space V to itself, and a linear function is used to perform vector transformation on the basic interest vector to obtain a vector transformation result, and the vector transformation result is used to initialize the long short-term memory network model to obtain the initialized target long short-term memory network model, and finally the embedded features of the historical chat information are identified to obtain the user's dynamic interest information.

[0046] As an optional example, the above method further includes:

[0047] After obtaining the session information vector of the session information, the session information vector is input into the target long short-term memory network to obtain a new session information vector. When determining the target session topic, the dynamic interest information and the new session information vector are used to determine the target session topic.

[0048] Optionally, in this embodiment, the initialized target long short-term memory network model is used to output the session information vector to obtain a new session information vector, and the target session topic is determined according to the dynamic interest information and the new session information vector. It can be identified and determined through the attention mechanism, which is more efficient and more accurate.

[0049] As an optional example, determining a target conversation topic from conversation topics according to the dynamic interest information and the conversation information vector includes:

[0050] Calculate the vector dot product of the dynamic interest information and the session information vector of each session information;

[0051] Map the vector dot product to the target interval to obtain the calculation result of the session information;

[0052] The conversation topic corresponding to the conversation information with the largest calculation result is determined as the target conversation topic.

[0053] Optionally, in this embodiment, the vector dot product of the dynamic interest information vector and the conversation message vector is calculated, and the vector dot product is mapped to the target interval to obtain the calculation result of the conversation information. The softmax function can be used to calculate the attention weight in the attention mechanism. The attention weight reflects the similarity between the conversation topic and the dynamic interest information. The larger the weight, the more consistent the conversation topic is with the dynamic interest information. Finally, the conversation topic with the largest calculation result, that is, the largest weight, is determined as the target conversation topic.

[0054] Optionally, an example is used to illustrate the overall technical solution. Figure 2 As shown, the specific steps are as follows:

[0055] 1. First, input the conversation topic information, user basic interest information, and user historical chat information into the pre-trained Bert model, and model the conversation topic information and historical chat record information based on the word sequence and user basic interest information, and map them to the vector space. The output of the last layer of the Bert network is used as the output of the trained sentence embedding to model the conversation topic information, user basic interest information, and user historical chat information.

[0056] 2. This embodiment uses a textCNN model to extract high-level abstract features of user historical chat information. Because user historical chat information is mostly short text, and there are many local dependencies between user historical chat information, convolution kernels of different sizes can extract key information of different n-gram models in the chat information. The textCNN model used in this embodiment mainly includes four parts: word embedding layer, convolution layer, pooling layer, and fully connected layer. The word embedding layer uses the output of the last layer of the Bert pre-trained language model of the user historical chat information. The convolution layer uses one-dimensional convolution with convolution kernels of 2, 3, and 4 to encode information of different n-gram models. The pooling layer uses maximum pooling to obtain the most important information in the user historical chat information. The fully connected layer is used to integrate the information obtained by the pooling layer to obtain the embedded features of the user historical chat information.

[0057] 3. Modeling user dynamic interests based on the improved LSTM model. Since the user's interests change at various speeds, the LSTM model is used to model the long-term changing interests. Due to the limitations of the LSTM model in extracting features, this embodiment uses an improved LSTM model that integrates the transformer model to improve the feature representation capability of the LSTM model. The structure of the improved LSTM model that integrates the transformer model is as follows: Figure 3In order to obtain the user's dynamic interests, the Bert model is first used to encode the user's basic interest information, so as to obtain the user's relatively long-term and stable interests and hobbies. Then, the user's long-term stable interests are transformed by linear functions to initialize the state of the improved LSTM model. Finally, the LSTM model is used to encode the user's historical chat information to obtain the user's dynamic interest information.

[0058] Among them, the calculation process of the improved LSTM structure fused with transformer is as follows:

[0059] Through the output information H at the last moment t-1 , the previous unit status information C t-1 , the current input X t , as the input of the current unit. And through the forget gate f t Selective information discarding is performed, and the process is shown in formula (1):

[0060] f t =σ(W f ·[H t-1 ,X t ]+b f ) (1)

[0061] Input data to the input gate i t , use transformer to extract features, Sigmoid to decide which values ​​to update, and use tanh function to create candidate vectors to calculate the updated value of the unit state The two outputs are multiplied and the information is finally merged into the cell state information C t The process is as follows:

[0062] i t =σ(W i Transformer ([H t-1 ,X t ]+b i ))

[0063]

[0064] Input data to the output gate o of LSTM t , extract features through transformer, and input into Sigmoid for nonlinear fitting, while the unit state information C t Input to the tanh layer for fitting, and finally multiply the two outputs as the output H of the unit t , the process is as shown in formula (3):

[0065] o t =σ(Wo Transformer ([H t-1 ,X t ])+b o )

[0066] H t =o t *tanh (C t ) (3)

[0067] By utilizing the powerful feature extraction capability of transformer, the shortcomings of LSTM in data feature extraction are overcome, so that the model can not only obtain the long-term dependence of sequence information, but also extract the features of the sequence well, thereby better encoding the user's dynamic interest information, where b is a parameter.

[0068] 4. After obtaining the user's dynamic interest information, it is necessary to model the conversation topic information. In order to better recommend appropriate topics to users, the user's basic interest information is incorporated into the conversation topic information modeling to express the differences in the continuous interests of different users' basic interest information. The improved bidirectional LSTM-based model in step 2 is used to encode the conversation information, thereby obtaining the interactive response structure of the conversation topic information.

[0069] 5. After obtaining the feature representation of the user's dynamic interest information and the conversation topic information, decide whether to recommend the conversation topic to the user based on the user's dynamic interest information. This embodiment uses an attention mechanism to identify conversation topics that are more in line with the interests of the target user. First, the vector dot product of the user's dynamic interest information and the conversation topic information is calculated, and the softmax function is used to calculate the attention weight. The attention weight reflects the similarity between the conversation and the target user's latest interests. The larger the weight, the more likely the user is to participate in the conversation topic. The user's interest in each conversation topic information is obtained through the attention mechanism.

[0070] 6. Finally, the fully connected layer is used to predict the conversation topics that the user will participate in.

[0071] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0072] According to another aspect of the embodiment of the present application, a topic dynamic recommendation device is also provided. Figure 4 As shown, including:

[0073] An acquisition module 402 is used to acquire user information of a user and session information of each of a plurality of session topics, wherein the session topic is a topic to be recommended to the user, and the user information includes historical chat information and basic interest information of the user;

[0074] An input module 404, configured to input the user information and the session information into a language model to obtain a basic interest vector of the user, a historical chat information vector, and a session information vector of the session information;

[0075] An extraction module 406, configured to extract the embedded features of the historical chat information through convolution kernels of different sizes;

[0076] An encoding module 408, configured to encode the embedded features to obtain the user's dynamic interest information;

[0077] A determination module 410, configured to determine a target conversation topic from the conversation topics according to the dynamic interest information and the conversation information vector;

[0078] The recommendation module 412 is configured to recommend the target conversation topic to the user.

[0079] Optionally, in this embodiment, the conversation topic can be a public account or a subscription account, and the conversation information of the conversation topic can be topic content such as pets, reading, movies, etc. Basic interest information includes personal information such as user gender, age, hobbies, etc. The language model is a language abstract mathematical modeling based on objective language facts. It is a corresponding relationship. The present invention adopts the Bert pre-trained language model, which has powerful language representation and feature extraction capabilities. Convolution kernels of different sizes can be 1, 2, 3, 4, etc. Dynamic interest information is the user's interest information that changes in real time.

[0080] Optionally, in this embodiment, one or more conversation topics and conversation information of the conversation topics, as well as the user's historical chat information and basic interest information are obtained, and the vectors of the conversation information, basic interest information and historical chat information are obtained through the Bert pre-trained language model. The convolutional neural network model is used to extract the embedded features of the historical chat information through convolution kernels of different sizes. The convolutional neural network model can be a textCNN model. The textCNN model is a model that uses a convolutional neural network to process natural language problems, and can extract important features more efficiently. The neural network model is used to encode the embedded features to obtain the user's dynamic interest information. The neural network model can use an improved LSTM model. The improved LSTM model is an improved long short-term memory artificial neural network model that integrates the transformer model. It is a time-recurrent neural network with higher feature expression capabilities. Finally, based on the dynamic interest information, the conversation topic that is more in line with the user's dynamic interest information among multiple conversation topics is determined and recommended to the user.

[0081] Optionally, in this embodiment, an improved long short-term memory network model is used to obtain user dynamic interest information, and the conversation topics that are more in line with the user's dynamic interests are identified through the attention mechanism and recommended to the user, thereby achieving the purpose of recommending conversation topics that are more in line with the user's dynamic interest information to the user, and further solving the technical problem that conversation topics that are more in line with the user's dynamic interest information cannot be recommended to the user when the user's interests change.

[0082] As an optional example, the extraction module includes:

[0083] The extraction unit is used to extract the embedded features of the historical chat information using a feature extraction model, wherein the feature extraction model includes a word embedding layer, a convolution layer, a pooling layer, and a fully connected layer, and the convolution layer includes convolution kernels of different sizes.

[0084] Optionally, the feature extraction model in this embodiment can be a long short-term memory artificial neural network model, which is used to extract embedded features of historical chat records. The feature extraction process of the long short-term memory artificial neural network model includes an embedding layer, a convolution layer, a pooling layer, and a fully connected layer. The embedding layer can convert the input data into a vector of a fixed size. Convolution is multiplication and addition. The convolution layer can easily extract features. The convolution layer includes convolution kernels of different sizes. The convolution kernel is also called a filter. The convolution kernel needs to be flipped during the calculation of the convolution. The pooling layer uses a pooling function to unify the dimensions of the features of different sizes extracted by the convolution kernels of different sizes in the convolution layer. The fully connected layer inputs the information obtained by the pooling layer and outputs the embedded features.

[0085] As an optional example, the extraction unit includes:

[0086] A processing subunit, used to use the historical chat information vector as the output content of the word embedding layer;

[0087] The encoding subunit is used to encode the output content using one-dimensional convolution encoding with different convolution kernels to obtain encoding information;

[0088] A pooling subunit, used to perform a maximum pooling operation on the encoded information to obtain pooled information;

[0089] The integration subunit is used to integrate the pooling information to obtain embedded features.

[0090] Optionally, in this embodiment, historical chat information is input into the embedding layer, and a historical chat information vector is output. In the convolution layer, one-dimensional convolution encoding is performed on the historical chat information vector using convolution kernels of different sizes to obtain encoded information. In the pooling layer, a pooling function is used to unify the dimension of the encoded information to obtain pooled information. Finally, the pooled information is integrated in the fully connected layer to obtain embedded features of the historical chat information.

[0091] As an optional example, the encoding module includes:

[0092] A transformation unit, used for performing a linear transformation on the basic interest vector to obtain a transformation result;

[0093] An initialization unit, used to initialize the long short-term memory network model using the transformation result to obtain a target long short-term memory network model;

[0094] The recognition unit is used to recognize the embedded features by the target long short-term memory network model to obtain dynamic interest information.

[0095] Optionally, in this embodiment, the linear transformation is a linear mapping of the linear space V to itself, and a linear function is used to perform vector transformation on the basic interest vector to obtain a vector transformation result, and the vector transformation result is used to initialize the long short-term memory network model to obtain the initialized target long short-term memory network model, and finally the embedded features of the historical chat information are identified to obtain the user's dynamic interest information.

[0096] As an optional example, the above device further includes:

[0097] The processing module is used to input the session information vector into the target long short-term memory network after acquiring the session information vector of the session information to obtain a new session information vector, and when determining the target session topic, use the dynamic interest information and the new session information vector to determine the target session topic.

[0098] Optionally, in this embodiment, the initialized target long short-term memory network model is used to output the session information vector to obtain a new session information vector, and the target session topic is determined according to the dynamic interest information and the new session information vector. It can be identified and determined through the attention mechanism, which is more efficient and more accurate.

[0099] As an optional example, the above-mentioned determination module includes:

[0100] A calculation unit, used to calculate a vector dot product of the dynamic interest information and a session information vector of each session information;

[0101] A mapping unit, used for mapping the vector dot product to a target interval to obtain a calculation result of the session information;

[0102] The determination unit is used to determine the conversation topic corresponding to the conversation information with the largest calculation result as the target conversation topic.

[0103] Optionally, in this embodiment, the vector dot product of the dynamic interest information vector and the conversation message vector is calculated, and the vector dot product is mapped to the target interval to obtain the calculation result of the conversation information. The softmax function can be used to calculate the attention weight in the attention mechanism. The attention weight reflects the similarity between the conversation topic and the dynamic interest information. The larger the weight, the more consistent the conversation topic is with the dynamic interest information. Finally, the conversation topic with the largest calculation result, that is, the largest weight, is determined as the target conversation topic.

[0104] For other examples of this embodiment, please refer to the above examples and will not be repeated here.

[0105] Figure 5 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Figure 5 As shown, it includes a processor 502, a communication interface 504, a memory 506 and a communication bus 508, wherein the processor 502, the communication interface 504 and the memory 506 communicate with each other through the communication bus 508, wherein,

[0106] Memory 506, used for storing computer programs;

[0107] The processor 502 is used to execute the computer program stored in the memory 506 to implement the following steps:

[0108] Obtaining user information of the user and session information of each of a plurality of session topics, wherein the session topic is a topic to be recommended to the user, and the user information includes historical chat information and basic interest information of the user;

[0109] Input the user information and session information into the language model to obtain the user's basic interest vector, the historical chat information vector, and the session information vector of the session information;

[0110] Extract the embedded features of historical chat information through convolution kernels of different sizes;

[0111] Encode the embedded features to obtain the user's dynamic interest information;

[0112] Determine a target conversation topic from conversation topics according to the dynamic interest information and the conversation information vector;

[0113] Recommend target conversation topics to users.

[0114] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The communication interface is used for communication between the above electronic device and other devices.

[0115] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0116] As an example, the memory 506 may include, but is not limited to, the acquisition module 402, input module 404, extraction module 406, encoding module 408, determination module 410, and recommendation module 412 in the request processing device. In addition, other module units in the request processing device may also be included but are not limited to, which will not be repeated in this example.

[0117] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0118] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.

[0119] It can be understood by those skilled in the art that Figure 5 The structure shown is for illustration only. The device for implementing the above request processing method may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 5 The structure of the electronic device is not limited. Figure 5 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 5 Different configurations shown.

[0120] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.

[0121] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program executes the steps in the above-mentioned topic dynamic recommendation method when executed by a processor.

[0122] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0123] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0124] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.

[0125] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0126] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0127] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0128] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0129] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A topic dynamic recommendation method, characterized in that: include: Acquire user information of the user and session information of each of a plurality of session topics, wherein the session topic is a topic to be recommended to the user, and the user information includes historical chat information and basic interest information of the user; Inputting the user information and the session information into a language model to obtain a basic interest vector of the user, a historical chat information vector, and a session information vector of the session information; Extracting embedded features of the historical chat information through convolution kernels of different sizes; Encoding the embedded features to obtain dynamic interest information of the user; determining a target conversation topic from the conversation topics according to the dynamic interest information and the conversation information vector; recommending the target conversation topic to the user; The encoding of the embedded features to obtain the dynamic interest information of the user includes: performing a linear transformation on the basic interest vector to obtain a transformation result; initializing a long short-term memory network model using the transformation result to obtain a target long short-term memory network model; and identifying the embedded features by the target long short-term memory network model to obtain the dynamic interest information; Among them, determining the target conversation topic from the conversation topics based on the dynamic interest information and the conversation information vector includes: calculating the vector dot product of the dynamic interest information and the conversation information vector of each of the conversation information; mapping the vector dot product to a target interval to obtain a calculation result of the conversation information; and determining the conversation topic corresponding to the conversation information with the largest calculation result as the target conversation topic.

2. The method according to claim 1, characterized in that The extracting the embedding features of the historical chat information by using convolution kernels of different sizes includes: The embedded features of the historical chat information are extracted using a feature extraction model, wherein the feature extraction model includes a word embedding layer, a convolution layer, a pooling layer, and a fully connected layer, and the convolution layer includes convolution kernels of different sizes.

3. The method according to claim 2, characterized in that The extracting the embedded features of the historical chat information using a feature extraction model comprises: Using the historical chat information vector as the output content of the word embedding layer; The output content is encoded using one-dimensional convolutional coding with different convolution kernels to obtain encoded information; Performing a maximum pooling operation on the encoded information to obtain pooled information; The pooling information is integrated to obtain the embedded features.

4. The method according to claim 1, characterized in that The method further comprises: After obtaining the session information vector of the session information, the session information vector is input into the target long short-term memory network to obtain a new session information vector, and when determining the target session topic, the dynamic interest information and the new session information vector are used to determine the target session topic.

5. A topic dynamic recommendation device, characterized in that: include: an acquisition module, configured to acquire user information of a user and session information of each of a plurality of session topics, wherein the session topic is a topic to be recommended to the user, and the user information includes historical chat information and basic interest information of the user; An input module, used to input the user information and the session information into a language model to obtain a basic interest vector of the user, a historical chat information vector, and a session information vector of the session information; An extraction module, used for extracting the embedded features of the historical chat information through convolution kernels of different sizes; An encoding module, used for encoding the embedded features to obtain the dynamic interest information of the user; a determination module, configured to determine a target conversation topic from the conversation topics according to the dynamic interest information and the conversation information vector; A recommendation module, configured to recommend the target conversation topic to the user; The encoding of the embedded features to obtain the dynamic interest information of the user includes: performing a linear transformation on the basic interest vector to obtain a transformation result; initializing a long short-term memory network model using the transformation result to obtain a target long short-term memory network model; and identifying the embedded features by the target long short-term memory network model to obtain the dynamic interest information; Among them, determining the target conversation topic from the conversation topics based on the dynamic interest information and the conversation information vector includes: calculating the vector dot product of the dynamic interest information and the conversation information vector of each of the conversation information; mapping the vector dot product to a target interval to obtain a calculation result of the conversation information; and determining the conversation topic corresponding to the conversation information with the largest calculation result as the target conversation topic.

6. The device according to claim 5, characterized in that The extraction module comprises: An extraction unit is used to extract the embedded features of the historical chat information using a feature extraction model, wherein the feature extraction model includes a word embedding layer, a convolution layer, a pooling layer, and a fully connected layer, and the convolution layer includes convolution kernels of different sizes.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is executed.

8. An electronic device, comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 4 through the computer program.

Citation Information

Patent Citations

  • Session recommendation method and system based on user interests

    CN112115352A

  • Session recommendation method based on modeling of long-term interests and short-term interests of users

    CN113722599A