CN114398907A - Dynamic topic recommendation method and device, storage medium and electronic equipment - Google Patents

Dynamic topic recommendation method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114398907A
CN114398907A CN202210016016.6A CN202210016016A CN114398907A CN 114398907 A CN114398907 A CN 114398907A CN 202210016016 A CN202210016016 A CN 202210016016A CN 114398907 A CN114398907 A CN 114398907A
Authority
CN
China
Prior art keywords
information
user
session
vector
topic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210016016.6A
Other languages
Chinese (zh)
Inventor
王硕
杨康
姜娜
李霞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Mininglamp Software System Co ltd
Original Assignee
Beijing Mininglamp Software System Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Mininglamp Software System Co ltd filed Critical Beijing Mininglamp Software System Co ltd
Priority to CN202210016016.6A priority Critical patent/CN114398907A/en
Publication of CN114398907A publication Critical patent/CN114398907A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • G06F40/35Discourse or dialogue representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a topic dynamic recommendation method, a topic dynamic recommendation device, a topic dynamic recommendation storage medium and electronic equipment. The method comprises the following steps: acquiring user information of a user and session information of each session topic in a plurality of session topics, wherein the session topics are topics to be recommended to the user, and the user information comprises historical chat information and basic interest information of the user; inputting user information and 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 a user; extracting the embedded characteristics of the historical chat information through convolution kernels with different sizes; coding the embedded characteristics 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; and recommending the target conversation topic to the user. The invention solves the technical problem that the conversation topic more conforming to the dynamic interest information of the user cannot be recommended to the user when the interest of the user changes.

Description

Dynamic topic recommendation method and device, storage medium and electronic equipment
Technical Field
The invention relates to the field of computers, in particular to a topic dynamic recommendation method, a topic dynamic recommendation device, a topic dynamic recommendation storage medium and electronic equipment.
Background
In the prior art, no good recommendation method exists, the interest information of the user can be effectively and dynamically identified according to the change of topics, and the conversation topics which accord with the dynamic interest information of the user are recommended to the user in real time. The traditional recommendation method focuses on the construction of feature engineering, interest matching is carried out by constructing feature representations of users and conversation topics, and the recommendation method based on deep learning improves the performance of a recommendation algorithm through various neural networks. However, the interest of the user is continuously changed by a large amount of dialogue information, and when the interest of the user changes with time, the conversation topic more conforming to the dynamic interest information of the user cannot be recommended to the user.
Disclosure of Invention
The embodiment of the invention provides a dynamic topic recommendation method, a dynamic topic recommendation device, a storage medium and electronic equipment, which are used for solving the problem that a conversation topic more conforming to dynamic interest information of a user cannot be recommended to the user at least when the interest of the user changes.
According to an aspect of an embodiment of the present invention, there is provided a topic dynamic recommendation method, including: acquiring user information of a user and session information of each session topic in a plurality of session topics, wherein the session topics are topics 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 the embedded characteristics of the historical chat information through convolution kernels with different sizes; coding the embedded characteristics to obtain the 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; and recommending the target conversation topic to the user.
According to another aspect of the embodiments of the present invention, there is provided a topic dynamic recommendation apparatus, including: the system comprises an acquisition module, a recommendation module and a recommendation module, wherein the acquisition module is used for acquiring user information of a user and session information of each session topic in a plurality of session topics, the session topics are topics to be recommended to the user, and the user information comprises historical chat information and basic interest information of the user; an input module, configured to input the user information and the session information into a language model, so as to obtain a basic interest vector, a history chat information vector, and a session information vector of the session information of the user; the extraction module is used for extracting the embedded characteristics of the historical chat information through convolution kernels with different sizes; the coding module is used for coding the embedded characteristics to obtain the dynamic interest information of the user; the determining module is used for determining a target conversation topic from the conversation topics according to the dynamic interest information and the conversation information vector; and the recommending module is used for recommending the target conversation topic to the user.
As an optional example, the extracting module includes: and an extracting unit configured 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 full-link layer, and the convolution layer includes convolution kernels having different sizes.
As an alternative example, the extracting unit includes: the processing subunit is used for taking the historical chat information vector as the output content of the word embedding layer; the coding subunit is used for carrying out one-dimensional convolutional coding on the output content by adopting different convolutional kernels to obtain coding information; the pooling subunit is used for executing maximum pooling operation on the coding information to obtain pooling information; and the integration subunit is used for integrating the pooling information to obtain the embedding characteristics.
As an alternative example, the encoding module includes: the transformation unit is used for carrying out linear transformation on the basic interest vector to obtain a transformation result; the initialization unit is used for initializing the long-short term memory network model by using the conversion result to obtain a target long-short term memory network model; and the identification unit is used for identifying the embedded characteristics by the target long-term and short-term memory network model to obtain the dynamic interest information.
As an optional example, the apparatus further includes: and the processing module is used for inputting 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 the target session topic is determined, the dynamic interest information and the new session information vector are used for determining the target session topic.
As an optional example, the determining module includes: a calculating unit, configured to calculate a vector dot product of the dynamic interest information and the session information vector of each piece of the session information; a mapping unit, configured to map the vector dot product to a target interval to obtain a calculation result of the session information; and a determining unit configured to determine the topic of the conversation corresponding to the conversation information with the largest calculation result as the target topic of the conversation.
According to still another aspect of the embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is executed by a processor to perform the above dynamic topic recommendation method.
According to still another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the above topic dynamic recommendation method through the computer program.
The topic dynamic recommendation method can be used for personalized recommendation processing of a recommendation technology, and in the embodiment of the invention, user information of a user and session information of each session topic in a plurality of session topics are acquired, wherein the session topics are topics 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 the embedded characteristics of the historical chat information through convolution kernels with different sizes; coding the embedded characteristics to obtain the 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; according to the method for recommending the target conversation topic to the user, the improved long-short term memory network model is adopted to obtain the dynamic interest information of the user, the conversation topic which is more in line with the dynamic interest of the user is identified through the attention mechanism and recommended to the user, so that the purpose of recommending the conversation topic which is more in line with the dynamic interest information of the user to the user is achieved, and the technical problem that the conversation topic which is more in line with the dynamic interest information of the user cannot be recommended to the user when the interest of the user changes is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow diagram of an alternative method for dynamic topic recommendation in accordance with embodiments of the present invention;
FIG. 2 is a technical solution diagram of an alternative dynamic topic recommendation method according to an embodiment of the present invention;
FIG. 3 is a diagram of an improved long short term memory network model architecture for an alternative topic dynamic recommendation method according to an embodiment of the invention;
fig. 4 is a schematic structural diagram of an alternative topic dynamic recommendation device according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to a first aspect of the embodiments of the present invention, there is provided a topic dynamic recommendation method, optionally, as shown in fig. 1, the method includes:
s102, acquiring user information of a user and session information of each session topic in a plurality of session topics, wherein the session topics are topics to be recommended to the user, and the user information comprises historical chat information and basic interest information of the user;
s104, 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;
s106, extracting the embedding characteristics of the historical chat information through convolution kernels with different sizes;
s108, encoding the embedded features to obtain dynamic interest information of the user;
s110, determining a target conversation topic from the conversation topics according to the dynamic interest information and the conversation information vector;
and S112, recommending the target conversation topic to the user.
Optionally, in this embodiment, the conversation topic may be a public number or a subscription number, and the conversation information of the conversation topic may be topic contents such as a pet, a book, a movie, and the like. The basic interest information includes personal information such as gender, age, hobbies and the like of the user. The language model is a language abstract mathematical modeling according to the language objective fact, is a corresponding relation, adopts the Bert pre-training language model, and has strong language representation capability and feature extraction capability. Convolution kernels of different sizes may be 1, 2, 3, 4, etc. The dynamic interest information is the interest information of the user changing in real time.
Optionally, in this embodiment, session information of one or more session topics and session topics, and historical chat information and basic interest information of a user are obtained, vectors of the session information, the basic interest information, and the historical chat information are obtained through a Bert pre-training language model, an embedded feature of the historical chat information is extracted through convolution kernels of different sizes by using a convolutional neural network model, the convolutional neural network model may be a textCNN model, and the textCNN model is a model for processing a natural language problem by using a convolutional neural network, and an important feature can be extracted more efficiently. The neural network model is used for coding the embedded features to obtain the dynamic interest information of the user, the neural network model can use an improved LSTM model, and the improved LSTM model is an improved long-short term memory artificial neural network model which is fused with a transformer model, is a time cycle neural network and has higher feature expression capability. And finally, determining the conversation topics which are more consistent with the dynamic interest information of the user from the plurality of conversation topics according to the dynamic interest information and recommending the conversation topics to the user.
Optionally, in this embodiment, the improved long and short term memory network model is used to obtain the user dynamic interest information, and the conversation topic more in line with the user dynamic interest is identified through the attention mechanism and recommended to the user, so that the purpose of recommending the conversation topic more in line with the user dynamic interest information to the user is achieved, and the technical problem that the conversation topic more in line with the user dynamic interest information cannot be recommended to the user when the user interest changes is solved.
As an alternative example, extracting the embedded features of the historical chat information by convolution kernels of different sizes includes:
and extracting the embedded features of the historical chat information by using a feature extraction model, wherein the feature extraction model comprises a word embedding layer, a convolution layer, a pooling layer and a full-connection layer, and the convolution layer comprises convolution kernels with different sizes.
Optionally, in this embodiment, the feature extraction model may be a long-short term memory artificial neural network model, the long-short term memory artificial neural network model is used to extract embedded features of the historical chat records, the long-short term memory artificial neural network model includes an embedding layer, a convolution layer, a pooling layer, and a full connection layer, and the embedding layer may convert input data into vectors with a fixed size. Convolution is multiplication and addition, the convolution layer can conveniently extract features, the convolution layer comprises convolution kernels with different sizes, the convolution kernels are also called filters, and convolution kernel inversion is needed in the convolution calculation process. The pooling layer is a dimension unifying the features of different sizes extracted from convolution kernels of different sizes in the convolution layer by using a pooling function. And inputting the information obtained by the pooling layer by the full connection layer and outputting the embedding characteristics.
As an alternative example, extracting the embedded features of the historical chat information using the feature extraction model includes:
using the historical chat information vector as the output content of the word embedding layer;
adopting one-dimensional convolution coding with different convolution kernels to output content to obtain coding information;
performing maximum pooling operation on the coded information to obtain pooled information;
integrating the pooling information to obtain the embedded features.
Optionally, in this embodiment, historical chat information is input in the embedding layer, historical chat information vectors are output, convolution kernels of different sizes are used in the convolution layer to perform one-dimensional convolution coding on the historical chat information vectors, coded information is obtained, pooling functions are used in the pooling layer to unify dimensionality of the coded information, pooled information is obtained, and finally, the pooled information is integrated in the full-connection layer, so that embedding characteristics of the historical chat information are obtained.
As an alternative example, encoding the embedded features to obtain the dynamic interest information of the user includes:
performing linear transformation on the basic interest vector to obtain a transformation result;
initializing the long-short term memory network model by using the transformation result to obtain a target long-short term memory network model;
and identifying the embedded characteristics by the target long-term and short-term memory network model to obtain dynamic interest information.
Optionally, in this embodiment, the linear transformation is linear mapping from the linear space V to itself, the basic interest vector is subjected to vector transformation using a linear function to obtain a vector transformation result, the long-short term memory network model is initialized using the vector transformation result to obtain an initialized target long-short term memory network model, and finally, the embedded feature of the historical chat information is identified to obtain the dynamic interest information of the user.
As an optional example, the method further includes:
after the session information vector of the session information is obtained, the session information vector is input into a target long-short term memory network to obtain a new session information vector, and when the target session topic is determined, the dynamic interest information and the new session information vector are used for determining the target session topic.
Optionally, in this embodiment, the initialized target long-and-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, which can be identified and determined through an attention mechanism, so that the efficiency is higher and the accuracy is higher.
As an alternative example, determining the target conversation topic from the conversation topics according to the dynamic interest information and the conversation information vector includes:
calculating a vector dot product of the dynamic interest information and the session information vector of each piece of session information;
mapping the vector dot product to a target interval to obtain a calculation result of the session information;
and determining the conversation topic corresponding to the conversation information with the maximum calculation result as the target conversation topic.
Optionally, in this embodiment, a vector dot product of the dynamic interest information vector and the session message vector is calculated, the vector dot product is mapped to the target interval, a calculation result of the session information is obtained, a softmax function may be used to calculate a weight of attention in the attention mechanism, the weight of attention reflects a similarity between the session topic and the dynamic interest information, the larger the weight is, the more the session topic conforms to the dynamic interest information, and finally, the session topic with the largest calculation result, that is, the largest weight is determined as the target session topic.
Optionally, an example is combined for explanation, and the overall technical scheme is shown in fig. 2, and the specific method steps are as follows:
1. firstly, inputting conversation topic information, basic user interest information and historical chat information of a user into a pre-trained Bert model, modeling according to word sequences and basic user interest information of the conversation topic information and the historical chat record information, and mapping the word sequences and the basic user interest information to a vector space. And the output of the last layer of network of the Bert is adopted as the output of embedding the training sentence, so as to model the conversation topic information, the basic interest information of the user and the historical chat information of the user.
2. In the embodiment, high-level abstract characteristics of the historical chat information of the user are extracted based on the textCNN model, because the historical chat information of the user is mostly short text and local dependency exists among the historical chat information of the user, different sizes of convolution kernels can extract different key information of n-gram models in the chat information. The textCNN model adopted in this embodiment mainly includes four parts, i.e., a word embedding layer, a convolutional layer, a pooling layer, and a full connection layer, where the word embedding layer adopts the output of the last layer of the user history chat information through a Bert pre-training language model, the convolutional layer adopts a one-dimensional convolution with convolution kernels of 2, 3, and 4 to encode information of different n-gram models, the pooling layer adopts maximum pooling to obtain the most important information in the user history chat information, and the full connection layer is used to integrate the information obtained by the pooling layer to obtain the embedding characteristics of the user history chat information.
3. User dynamic interests are modeled based on the improved LSTM model. Because the interest change speed of the user is various, the LSTM model is adopted for modeling aiming at the interest changing for a long time, and because of the limitation of feature extraction of the LSTM model, the feature representation capability of the LSTM model is improved by adopting the improved LSTM model which is fused with the transform model in the embodiment. The structure of the improved LSTM model fused with the transformer model is shown in FIG. 3. In order to obtain the dynamic interest of the user, firstly, basic interest information of the user is coded by adopting a Bert model so as to obtain the long-term and stable interest and preference of the user, then the long-term and stable interest of the user is transformed by a linear function so as to initialize the state of an improved LSTM model, and finally, historical chat information of the user is coded by using the LSTM model so as to obtain the dynamic interest information of the user.
The calculation process of the improved LSTM structure fused with the transformer is as follows:
the output information Ht-1 at the last moment, the state information Ct-1 of the previous unit and the currently input Xt are used as the input of the current unit. And pass through the forgetting door ftSelective discarding of information is performed as shown in equation (1):
ft=σ(Wf·[ht-1,xt]+bf) (1)
input data to input gate itFeature extraction is carried out by using a transformer, Sigmoid is used for deciding which values to update, meanwhile, a candidate vector is created by adopting a tanh function, and an updated value of the unit state is calculated
Figure BDA0003460816550000091
And multiplies the two outputs and finally merges the information into the cell state information CtThe process is as in formula (2):
it=σ(Wi·Transformer([ht-1,xt]+bi))
Figure BDA0003460816550000092
Figure BDA0003460816550000093
output gate o for inputting data to LSTMtExtracting characteristics through a transform, inputting the characteristics into a Sigmoid for nonlinear fitting, and simultaneously, obtaining unit state information CtInputting into tanh layer for fitting, finally multiplying two outputs as output h of unittThe process is as formula (3):
ot=σ(Wo·Transformer([ht-1,xt])+bo)
ht=ot*tanh(Ct) (3)
the method overcomes the defects of the LSTM in data feature extraction by utilizing the strong feature extraction capability of the transform, so that the model can not only acquire the long-term dependence of the sequence information, but also can well extract the features of the sequence, thereby better coding the dynamic interest information of the user, wherein b is a parameter.
4. After the dynamic interest information of the user is obtained, the conversation topic information needs to be modeled, and in order to better recommend a proper topic for the user, the basic interest information of the user is merged into the modeling of the conversation topic information to express the difference of the continuous interest of different basic interest information of the user. And (3) encoding the conversation information by adopting the improved two-way LSTM-based model in the step 2, thereby obtaining an interactive reply structure of the conversation topic information.
5. And after the feature representation of the user dynamic interest information and the conversation topic information is obtained, determining whether to recommend the conversation topic for the user according to the user dynamic interest information. The embodiment adopts an attention mechanism to identify conversation topics more consistent with the interests of target users, firstly calculates the vector dot product of the dynamic interest information of the users and the information of the conversation topics, and adopts a softmax function to calculate the attention weight, wherein the attention weight reflects the similarity between the conversation and the latest interests of the target users, and the larger the attention weight is, the more likely the users participate in the conversation topics. The interest degree of the user for each conversation topic information is obtained through an attention mechanism.
6. And finally, predicting the conversation topic which the user can participate in through a full connection layer.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiments of the present application, there is also provided a topic dynamic recommendation device, as shown in fig. 4, including:
an obtaining module 402, configured to obtain user information of a user and session information of each of a plurality of session topics, where the session topics are topics to be recommended to the user, and the user information includes historical chat information and basic interest information of the user;
an input module 404, configured to input the user information and the session information into a language model, so as to obtain a basic interest vector, a historical chat information vector, and a session information vector of the session information of the user;
an extracting module 406, configured to extract an embedded feature of the historical chat information through convolution kernels with different sizes;
the encoding module 408 is configured to encode the embedded feature to obtain dynamic interest information of the user;
a determining module 410, configured to determine a target conversation topic from the conversation topics according to the dynamic interest information and the conversation information vector;
a recommending module 412, configured to recommend the target conversation topic to the user.
Optionally, in this embodiment, the conversation topic may be a public number or a subscription number, and the conversation information of the conversation topic may be topic contents such as a pet, a book, a movie, and the like. The basic interest information includes personal information such as gender, age, hobbies and the like of the user. The language model is a language abstract mathematical modeling according to the language objective fact, is a corresponding relation, adopts the Bert pre-training language model, and has strong language representation capability and feature extraction capability. Convolution kernels of different sizes may be 1, 2, 3, 4, etc. The dynamic interest information is the interest information of the user changing in real time.
Optionally, in this embodiment, session information of one or more session topics and session topics, and historical chat information and basic interest information of a user are obtained, vectors of the session information, the basic interest information, and the historical chat information are obtained through a Bert pre-training language model, an embedded feature of the historical chat information is extracted through convolution kernels of different sizes by using a convolutional neural network model, the convolutional neural network model may be a textCNN model, and the textCNN model is a model for processing a natural language problem by using a convolutional neural network, and an important feature can be extracted more efficiently. The neural network model is used for coding the embedded features to obtain the dynamic interest information of the user, the neural network model can use an improved LSTM model, and the improved LSTM model is an improved long-short term memory artificial neural network model which is fused with a transformer model, is a time cycle neural network and has higher feature expression capability. And finally, determining the conversation topics which are more consistent with the dynamic interest information of the user from the plurality of conversation topics according to the dynamic interest information and recommending the conversation topics to the user.
Optionally, in this embodiment, the improved long and short term memory network model is used to obtain the user dynamic interest information, and the conversation topic more in line with the user dynamic interest is identified through the attention mechanism and recommended to the user, so that the purpose of recommending the conversation topic more in line with the user dynamic interest information to the user is achieved, and the technical problem that the conversation topic more in line with the user dynamic interest information cannot be recommended to the user when the user interest changes is solved.
As an optional example, the extracting module includes:
and the extraction unit is used for extracting the embedded characteristics of the historical chat information by using a characteristic extraction model, wherein the characteristic extraction model comprises a word embedding layer, a convolution layer, a pooling layer and a full-connection layer, and the convolution layer comprises convolution kernels with different sizes.
Optionally, in this embodiment, the feature extraction model may be a long-short term memory artificial neural network model, the long-short term memory artificial neural network model is used to extract embedded features of the historical chat records, the long-short term memory artificial neural network model includes an embedding layer, a convolution layer, a pooling layer, and a full connection layer, and the embedding layer may convert input data into vectors with a fixed size. Convolution is multiplication and addition, the convolution layer can conveniently extract features, the convolution layer comprises convolution kernels with different sizes, the convolution kernels are also called filters, and convolution kernel inversion is needed in the convolution calculation process. The pooling layer is a dimension unifying the features of different sizes extracted from convolution kernels of different sizes in the convolution layer by using a pooling function. And inputting the information obtained by the pooling layer by the full connection layer and outputting the embedding characteristics.
As an alternative example, the extracting unit includes:
the processing subunit is used for embedding the historical chat information vector into the output content of the layer as a word;
the coding subunit is used for carrying out one-dimensional convolutional coding on the output content by adopting different convolutional kernels to obtain coding information;
the pooling sub-unit is used for executing maximum pooling operation on the coded information to obtain pooled information;
and the integration subunit is used for integrating the pooling information to obtain the embedded characteristics.
Optionally, in this embodiment, historical chat information is input in the embedding layer, historical chat information vectors are output, convolution kernels of different sizes are used in the convolution layer to perform one-dimensional convolution coding on the historical chat information vectors, coded information is obtained, pooling functions are used in the pooling layer to unify dimensionality of the coded information, pooled information is obtained, and finally, the pooled information is integrated in the full-connection layer, so that embedding characteristics of the historical chat information are obtained.
As an alternative example, the encoding module includes:
the transformation unit is used for carrying out linear transformation on the basic interest vector to obtain a transformation result;
the initialization unit is used for initializing the long-short term memory network model by using the conversion result to obtain a target long-short term memory network model;
and the identification unit is used for identifying the embedded characteristics by the target long-term and short-term memory network model to obtain dynamic interest information.
Optionally, in this embodiment, the linear transformation is linear mapping from the linear space V to itself, the basic interest vector is subjected to vector transformation using a linear function to obtain a vector transformation result, the long-short term memory network model is initialized using the vector transformation result to obtain an initialized target long-short term memory network model, and finally, the embedded feature of the historical chat information is identified to obtain the dynamic interest information of the user.
As an optional example, the apparatus further includes:
and the processing module is used for inputting the session information vector into the target long-short term memory network after the session information vector of the session information is acquired, acquiring a new session information vector, and determining the target session topic by using the dynamic interest information and the new session information vector when the target session topic is determined.
Optionally, in this embodiment, the initialized target long-and-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, which can be identified and determined through an attention mechanism, so that the efficiency is higher and the accuracy is higher.
As an optional example, the determining module includes:
the computing unit is used for computing the vector dot product of the dynamic interest information and the session information vector of each piece of session information;
the mapping unit is used for mapping the vector dot product to a target interval to obtain a calculation result of the session information;
and the determining unit is used for determining the conversation topic corresponding to the conversation information with the maximum calculation result as the target conversation topic.
Optionally, in this embodiment, a vector dot product of the dynamic interest information vector and the session message vector is calculated, the vector dot product is mapped to the target interval, a calculation result of the session information is obtained, a softmax function may be used to calculate a weight of attention in the attention mechanism, the weight of attention reflects a similarity between the session topic and the dynamic interest information, the larger the weight is, the more the session topic conforms to the dynamic interest information, and finally, the session topic with the largest calculation result, that is, the largest weight is determined as the target session topic.
For other examples of this embodiment, please refer to the above examples, which are not described herein.
Fig. 5 is a block diagram of an alternative electronic device according to an embodiment of the present application, as shown in fig. 5, including a processor 502, a communication interface 504, a memory 506, and a communication bus 508, where the processor 502, the communication interface 504, and the memory 506 are communicated with each other via the communication bus 508, and where,
a memory 506 for storing a computer program;
the processor 502, when executing the computer program stored in the memory 506, implements the following steps:
acquiring user information of a user and session information of each session topic in a plurality of session topics, wherein the session topics are topics to be recommended to the user, and the user information comprises historical chat information and basic interest information of the user;
inputting user information and 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 a user;
extracting the embedded characteristics of the historical chat information through convolution kernels with different sizes;
coding the embedded characteristics 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;
and recommending the target conversation topic to the user.
Alternatively, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus. The communication interface is used for communication between the electronic equipment and other equipment.
The memory may include RAM, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
As an example, the memory 506 may include, but is not limited to, the obtaining module 402, the inputting module 404, the extracting module 406, the encoding module 408, the determining module 410, and the recommending module 412 in the processing device of the request. In addition, the module may further include, but is not limited to, other module units in the processing apparatus of the request, which is not described in this example again.
The processor may be a general-purpose processor, and may include but is not limited to: a CPU (Central Processing Unit), an NP (Network Processor), and the like; but also a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 5 is only an illustration, and the device implementing the processing method of the request may be a terminal device, and the terminal device may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 5 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 5, or have a different configuration than shown in FIG. 5.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
According to still another aspect of embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is executed by a processor to perform the steps of the above-mentioned topic dynamic recommendation method.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A topic dynamic recommendation method is characterized by comprising the following steps:
acquiring user information of a user and session information of each session topic in a plurality of session topics, wherein the session topics are topics 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 the embedded characteristics of the historical chat information through convolution kernels with different sizes;
coding the embedded features to obtain the 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.
2. The method of claim 1, wherein extracting the embedded features of the historical chat information by convolution kernels of different sizes comprises:
extracting the embedded features of the historical chat information by using a feature extraction model, wherein the feature extraction model comprises a word embedding layer, a convolution layer, a pooling layer and a full-link layer, and the convolution layer comprises convolution kernels with different sizes.
3. The method of claim 2, wherein said extracting the embedded features of the historical chat information using a feature extraction model comprises:
taking the historical chat information vector as the output content of the word embedding layer;
adopting one-dimensional convolution coding with different convolution kernels to the output content to obtain coding information;
performing maximum pooling operation on the coded information to obtain pooled information;
and integrating the pooling information to obtain the embedded feature.
4. The method of any of claims 1-3, wherein encoding the embedded features to obtain the dynamic interest information of the user comprises:
performing linear transformation on the basic interest vector to obtain a transformation result;
initializing a long-short term memory network model by using the conversion result to obtain a target long-short term memory network model;
and identifying the embedded characteristics by the target long-term and short-term memory network model to obtain the dynamic interest information.
5. The method of claim 4, further comprising:
after a session information vector of the session information is acquired, the session information vector is input into the target long-short term memory network to obtain a new session information vector, and when the target session topic is determined, the dynamic interest information and the new session information vector are used for determining the target session topic.
6. The method of claim 1 or 5, wherein the determining a target conversation topic from the conversation topics according to the dynamic interest information and the conversation information vector comprises:
calculating a vector dot product of the dynamic interest information and the session information vector of each piece of the session information;
mapping the vector dot product to a target interval to obtain a calculation result of the session information;
and determining the conversation topic corresponding to the conversation information with the maximum calculation result as the target conversation topic.
7. A topic dynamic recommendation apparatus, comprising:
the system comprises an acquisition module, a recommendation module and a recommendation module, wherein the acquisition module is used for acquiring user information of a user and session information of each session topic in a plurality of session topics, the session topics are topics to be recommended to the user, and the user information comprises historical chat information and basic interest information of the user;
the input module is used for 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;
the extraction module is used for extracting the embedded characteristics of the historical chat information through convolution kernels with different sizes;
the coding module is used for coding the embedded characteristics to obtain the dynamic interest information of the user;
the determining module is used for determining a target conversation topic from the conversation topics according to the dynamic interest information and the conversation information vector;
and the recommending module is used for recommending the target conversation topic to the user.
8. The apparatus of claim 7, wherein the extraction module comprises:
and the extraction unit is used for extracting the embedded features of the historical chat information by using a feature extraction model, wherein the feature extraction model comprises a word embedding layer, a convolution layer, a pooling layer and a full-connection layer, and the convolution layer comprises convolution kernels with different sizes.
9. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 6.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 6 by means of the computer program.
CN202210016016.6A 2022-01-07 2022-01-07 Dynamic topic recommendation method and device, storage medium and electronic equipment Pending CN114398907A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210016016.6A CN114398907A (en) 2022-01-07 2022-01-07 Dynamic topic recommendation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210016016.6A CN114398907A (en) 2022-01-07 2022-01-07 Dynamic topic recommendation method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114398907A true CN114398907A (en) 2022-04-26

Family

ID=81229220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210016016.6A Pending CN114398907A (en) 2022-01-07 2022-01-07 Dynamic topic recommendation method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114398907A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115150462A (en) * 2022-05-25 2022-10-04 东风柳州汽车有限公司 Driving topic pushing method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115150462A (en) * 2022-05-25 2022-10-04 东风柳州汽车有限公司 Driving topic pushing method, device, equipment and storage medium
CN115150462B (en) * 2022-05-25 2023-10-31 东风柳州汽车有限公司 Driving topic pushing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110929206B (en) Click rate estimation method and device, computer readable storage medium and equipment
CN112085565B (en) Deep learning-based information recommendation method, device, equipment and storage medium
CN108170684A (en) Text similarity computing method and system, data query system and computer product
CN113283238B (en) Text data processing method and device, electronic equipment and storage medium
CN113538070B (en) User life value cycle detection method and device and computer equipment
CN114676704A (en) Sentence emotion analysis method, device and equipment and storage medium
CN116368796A (en) Data processing method and device
CN113239176A (en) Semantic matching model training method, device, equipment and storage medium
CN114168819B (en) Post matching method and device based on graph neural network
CN112529149A (en) Data processing method and related device
CN115879508A (en) Data processing method and related device
CN115238909A (en) Data value evaluation method based on federal learning and related equipment thereof
CN113326383B (en) Short text entity linking method, device, computing equipment and storage medium
CN113409157B (en) Cross-social network user alignment method and device
CN114398907A (en) Dynamic topic recommendation method and device, storage medium and electronic equipment
CN113609819A (en) Punctuation mark determination model and determination method
CN111445545B (en) Text transfer mapping method and device, storage medium and electronic equipment
CN112417874A (en) Named entity recognition method and device, storage medium and electronic device
CN115906861B (en) Sentence emotion analysis method and device based on interaction aspect information fusion
CN112528621B (en) Text processing method, text processing model training device and storage medium
CN116415624A (en) Model training method and device, and content recommendation method and device
CN115700550A (en) Label classification model training and object screening method, device and storage medium
CN114528491A (en) Information processing method, information processing device, computer equipment and storage medium
CN114493674A (en) Advertisement click rate prediction model and method
CN113822291A (en) Image processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination