Dialogue knowledge point generation method and device
By integrating lexical, utterance, and conversational saliency information from conversation sequences into online services, dialogue knowledge points are generated, solving the problem of information fragmentation in multi-turn dialogues and improving the efficiency and quality of information acquisition.
Patent Information
- Application Number
- CN202311265875.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-09-27
AI Technical Summary
In online services, knowledge gained from multi-turn conversations is fragmented and repetitive in chats, making it difficult for users to quickly obtain complete and key information.
By identifying lexical, utterance, and conversational saliency information in the conversation sequence and fusing this information, we can guide the generation of dialogue knowledge points, resulting in complete and concise knowledge points.
It improves the efficiency for users to obtain complete information in multi-turn conversations, reduces information fragmentation and repetition, and enhances the quality of conversation services.
Smart Images

Figure CN117407494B_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification generally relate to the field of artificial intelligence, and in particular to methods and apparatus for generating dialogue knowledge points. Background Technology
[0002] With the continuous development of internet technology, online services have gradually become the mainstream service model. When providing online services, service providers (such as conversation recommendation systems and intelligent customer service systems) engage in multi-turn dialogues with users around a specific topic or entity to provide services. To enable users to quickly ask questions and receive natural and informative answers, knowledge-grounded dialogue (KGD) schemes have been proposed. However, due to the chat-like nature of dialogues, most knowledge is fragmented and repetitive within the conversation, making it difficult for users to quickly obtain complete and crucial information from the conversation set. Summary of the Invention
[0003] This specification provides a method and apparatus for generating dialogue knowledge points. By using this method and apparatus, the saliency information of each dialogue word in a dialogue sequence at the word granularity, discourse granularity, and dialogue granularity is determined and fused. The fused saliency information is then used to guide the generation of dialogue-based knowledge points, enabling the acquisition of complete and concise knowledge point information from multiple dialogue contents.
[0004] According to one aspect of the embodiments of this specification, a method for generating dialogue knowledge points is provided, comprising: determining lexical-level salience information, discourse-level salience information, and conversation-level salience information of each dialogue lexical in a multi-dialogue sequence, wherein the lexical-level salience information, discourse-level salience information, and conversation-level salience information are respectively used to reflect the knowledge point relevance of the dialogue lexical at the lexical level, discourse level, and conversation level; performing salience information fusion on the lexical-level salience information, discourse-level salience information, and conversation-level salience information of each dialogue lexical; and using the fused salience information of each dialogue lexical to guide the generation of dialogue knowledge points based on the dialogue lexical in the multi-dialogue sequence.
[0005] Optionally, in one example of the above aspects, determining the lexical-level salience information, utterance-level salience information, and conversation-level salience information of each conversation lexical in the multi-conversation sequence may include: adding conversation marker lexicals and utterance marker lexicals at the beginning of each conversation and each utterance in the multi-conversation sequence; generating a conversation sequence representation of the multi-conversation sequence based on the multi-conversation sequence after the addition of marker lexicals, the conversation sequence representation including a conversation representation of each conversation, a utterance representation of each utterance, and a lexical representation of each conversation lexical; and determining the lexical-level salience information, utterance-level salience information, and conversation-level salience information of each conversation lexical in the multi-conversation sequence based on the conversation sequence representation of the multi-conversation sequence.
[0006] Optionally, in one example of the above aspects, determining the lexical-level salience information, utterance-level salience information, and conversation-level salience information of each conversation lexical in the multi-conversation sequence based on the conversation sequence representation of the multi-conversation sequence may include: providing the lexical representation of each conversation lexical in the conversation sequence representation to a lexical-level salience-aware model to predict the lexical-level salience representation of each conversation lexical; providing the utterance representation of each utterance in the conversation sequence representation to a utterance-level salience-aware model to predict the salience representation of each utterance, wherein the salience representation of each utterance serves as the utterance-level salience representation of the conversation lexical in that utterance; and providing the conversation representation of each conversation in the conversation sequence representation to a conversation-level salience-aware model to predict the salience representation of each conversation, wherein the salience feature of each conversation serves as the conversation-level salience representation of the conversation lexical in that conversation.
[0007] Optionally, in one example of the above aspects, providing the lexical representations of each conversation lexical in the conversation sequence representation to a lexical-level saliency-aware model to predict the lexical-level saliency representation of each conversation lexical may include: predicting the classification probability of the lexical saliency category of each conversation lexical based on the lexical representations of each conversation lexical in the conversation sequence representation via a classification layer of the lexical-level saliency-aware model; mapping the lexical saliency category to a lexical saliency category embedding via a mapping layer of the lexical-level saliency-aware model; and determining the lexical-level saliency representation of each conversation lexical based on the classification probability of the lexical saliency category and the lexical saliency category embedding via a soft estimation layer of the lexical-level saliency-aware model.
[0008] Optionally, in one example of the above aspects, providing each utterance representation in the conversation sequence representation to the utterance-level salience-aware model to predict the salience representation of each utterance may include: predicting the classification probability of the utterance salience category of each utterance based on the utterance representation in the conversation sequence representation via a classification layer of the utterance-level salience-aware model; mapping the utterance salience category to an utterance salience category embedding via a mapping layer of the utterance-level salience-aware model; and determining the salience representation of each utterance based on the classification probability of the utterance salience category and the utterance salience category embedding via a soft estimation layer of the utterance-level salience-aware model.
[0009] Optionally, in one example of the above aspects, providing each session representation in the session sequence representation to a session-level saliency-aware model to predict the saliency representation of each session includes: predicting the classification probability of the session saliency category of each session based on the session representation in the session sequence representation via a classification layer of the session-level saliency-aware model; mapping the session saliency category to a session saliency category embedding via a mapping layer of the session-level saliency-aware model; and determining the saliency representation of each session based on the classification probability of the session saliency category and the session saliency category embedding via a soft estimation layer of the session-level saliency-aware model.
[0010] Optionally, in one example of the above aspects, determining the lexical-level salience information, discourse-level salience information, and conversation-level salience information of each conversation lexical in a multi-conversation sequence may include: generating a conversation sequence representation of the multi-conversation sequence, the conversation sequence representation including the lexical representation of each conversation lexical; and determining the lexical-level salience information, discourse-level salience information, and conversation-level salience information of each conversation lexical in the multi-conversation sequence based on the conversation sequence representation of the multi-conversation sequence.
[0011] Optionally, in one example of the above aspects, determining the lexical-level salience information, utterance-level salience information, and conversation-level salience information of each conversation lexical in the conversation sequence based on the conversation sequence representation of the multi-conversation sequence may include: providing the lexical representations of each conversation lexical in the conversation sequence representation to a lexical-level salience-aware model to predict the lexical-level salience representation of each conversation lexical; for each utterance in the multi-conversation sequence, providing the lexical representations of each conversation lexical in the utterance to a utterance-level salience-aware model to predict the salience representation of the utterance, with the salience representation of each utterance serving as the utterance-level salience representation of the conversation lexical in the utterance; and for each conversation in the multi-conversation sequence, providing the lexical representations of each conversation lexical in the conversation to a conversation-level salience-aware model to predict the salience representation of each conversation, with the salience features of each conversation serving as the conversation-level salience representation of the conversation lexical in the conversation.
[0012] Optionally, in one example of the above aspects, saliency information fusion of the lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversation lexical may include: determining the information retention ratio of the lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversation lexical based on the matching between each conversation lexical and the lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversation lexical; and performing saliency information fusion based on the lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversation lexical and the information retention ratio.
[0013] Optionally, in one example of the above aspects, determining the information retention ratio of each conversational word based on the matching between each conversational word and the word-level salience information, discourse-level salience information, and conversation-level salience information of each conversational word may include: using a gating model to determine the information retention ratio of each conversational word based on the matching between each conversational word and the word-level salience information, discourse-level salience information, and conversation-level salience information of each conversational word.
[0014] Optionally, in one example of the above aspects, the conversation sequence representation is generated via an encoder in a converter-based encoder-decoder model. Using fused saliency information of individual conversational lexical units to guide the generation of dialogue knowledge points based on conversational lexical units in the multi-conversation sequence may include: generating dialogue knowledge points of the multi-conversation sequence via a decoder in the encoder-decoder model using fused saliency information of individual conversational lexical units and lexical representations of individual conversational lexical units, wherein the fused saliency information of individual conversational lexical units is added to the lexical representations of individual conversational lexical units as key states of a cross-attention layer on the decoder side.
[0015] According to another aspect of the embodiments of this specification, a dialogue knowledge point generation apparatus is provided, comprising: a saliency information determination unit, which determines lexical-level saliency information, discourse-level saliency information, and dialogue-level saliency information of each dialogue lexical in a multi-dialogue sequence, wherein the lexical-level saliency information, discourse-level saliency information, and dialogue-level saliency information are respectively used to reflect the knowledge point relevance of the dialogue lexical at the lexical, discourse, and dialogue levels; a saliency information fusion unit, which performs saliency information fusion on the lexical-level saliency information, discourse-level saliency information, and dialogue-level saliency information of each dialogue lexical; and a knowledge point generation unit, which uses the fused saliency information of each dialogue lexical to guide the generation of dialogue knowledge points based on the dialogue lexical in the multi-dialogue sequence.
[0016] Optionally, in one example of the above aspects, the dialogue knowledge point generation device may further include: a token addition unit, which adds session tokens and utterance tokens at the beginning of each session and each utterance of the multi-session sequence; and a session sequence representation generation unit, which generates a session sequence representation of the multi-session sequence based on the session sequence after token addition, the session sequence representation including a session representation of each session, a utterance representation of each utterance, and a token representation of each session token, wherein the saliency information determination unit determines the token-level saliency information, utterance-level saliency information, and session-level saliency information of each session token in the multi-session sequence according to the session sequence representation of the multi-session sequence.
[0017] Optionally, in one example of the above aspects, the saliency information determination unit includes: a lexical-level saliency information prediction module, which provides the lexical representations of each conversation lexical in the conversation sequence representation to a lexical-level saliency perception model to predict the lexical-level saliency representation of each conversation lexical; a utterance-level saliency information prediction module, which provides the utterance representations of each utterance in the conversation sequence representation to a utterance-level saliency perception model to predict the saliency representation of each utterance, wherein the saliency representation of each utterance serves as the utterance-level saliency representation of the conversation lexical in that utterance; and a conversation-level saliency information prediction module, which provides the conversation representations of each conversation in the conversation sequence representation to a conversation-level saliency perception model to predict the saliency representation of each conversation, wherein the saliency features of each conversation serve as the conversation-level saliency representation of the conversation lexical in that conversation.
[0018] Optionally, in one example of the above aspects, the saliency information fusion unit includes: an information retention ratio determination module, which determines the information retention ratio of each conversational word element's word-level saliency information, discourse-level saliency information, and conversation-level saliency information based on the matching between each conversational word element and each conversational word element's word-level saliency information, discourse-level saliency information, and conversation-level saliency information; and a saliency information fusion module, which performs saliency information fusion based on each conversational word element's word-level saliency information, discourse-level saliency information, and conversation-level saliency information and information retention ratio.
[0019] Optionally, in one example of the above aspects, the information retention ratio determination module uses a gating model to determine the information retention ratio of each conversation word based on the matching between each conversation word and the word-level salience information, discourse-level salience information and conversation-level salience information of each conversation word.
[0020] Optionally, in one example of the above aspects, the conversation sequence representation generation unit generates a conversation sequence representation of the multi-conversation sequence via an encoder in a converter-based encoder-decoder model, and the knowledge point generation unit generates dialogue knowledge points of the multi-conversation sequence via a decoder in the encoder-decoder model using fused saliency information of each conversation word and word representation of each conversation word, wherein the fused saliency information of each conversation word is added to the word representation of each conversation word as a key state of the cross-attention layer on the decoder side.
[0021] According to another aspect of the embodiments of this specification, a dialogue knowledge point generation apparatus is provided, comprising: at least one processor; a memory coupled to the at least one processor; and a computer program stored in the memory, wherein the at least one processor executes the computer program to implement the dialogue knowledge point generation method as described above.
[0022] According to another aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores executable instructions, which, when executed, cause a processor to perform the dialogue knowledge point generation method as described above. Attached Figure Description
[0023] A further understanding of the nature and advantages of this specification can be achieved by referring to the following figures. In the figures, similar components or features may have the same reference numerals.
[0024] Figure 1 An example flowchart of a dialogue knowledge point generation method according to an embodiment of this specification is shown.
[0025] Figure 2 An example diagram of multi-session information is shown.
[0026] Figure 3 An example flowchart of the process for determining the salience information of conversational lexical units according to an embodiment of this specification is shown.
[0027] Figure 4 An example schematic diagram of the process for determining the salience information of conversational lexical units according to an embodiment of this specification is shown.
[0028] Figure 5 An example schematic diagram of a word-level saliency-aware model according to an embodiment of this specification is shown.
[0029] Figure 6 Another example flowchart of the process for determining the salience information of conversational lexical units according to an embodiment of this specification is shown.
[0030] Figure 7 Another example schematic diagram of the process for determining the salience information of conversational lexical units according to an embodiment of this specification is shown.
[0031] Figure 8 An example flowchart of a saliency information fusion process according to an embodiment of this specification is shown.
[0032] Figure 9 An example schematic diagram of a dialogue knowledge point generation process according to an embodiment of this specification is shown.
[0033] Figure 10An example schematic diagram of a Transformer-based encoder-decoder model is shown.
[0034] Figure 11 A schematic diagram illustrating the processing of the cross-attention layer is shown.
[0035] Figure 12 An example schematic diagram illustrating knowledge points according to an embodiment of this specification is shown.
[0036] Figure 13 An example block diagram of a dialogue knowledge point generation apparatus according to an embodiment of this specification is shown.
[0037] Figure 14 An example block diagram of a salience information determination unit according to an embodiment of this specification is shown.
[0038] Figure 15 An example block diagram of a saliency information fusion unit according to an embodiment of this specification is shown.
[0039] Figure 16 An example schematic diagram of a dialogue knowledge point generation apparatus based on a computer system according to an embodiment of this specification is shown. Detailed Implementation
[0040] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed merely to enable those skilled in the art to better understand and implement the subject matter described herein, and are not intended to limit the scope, applicability, or examples set forth in the claims. The function and arrangement of the elements discussed may be changed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the various examples. For example, the described methods may be performed in a different order than described, and steps may be added, omitted, or combined. Furthermore, features described in some examples may be combined in other examples.
[0041] As used herein, the term "comprising" and its variations are open terms meaning "including but not limited to". The term "based on" means "at least partially based on". The terms "one embodiment" and "an embodiment" mean "at least one embodiment". The term "another embodiment" means "at least one other embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other definitions, whether explicit or implicit, may be included below. Unless explicitly indicated by the context, the definition of a term shall remain consistent throughout the specification.
[0042] The flowcharts used in this specification illustrate operations implemented according to some embodiments of this specification. It should be clearly understood that the operations in the flowcharts may not be implemented in a sequential order. Instead, the operations may be implemented in reverse order or simultaneously. Furthermore, one or more additional operations may be added to the flowcharts. One or more operations may be removed from the flowcharts.
[0043] Figure 1 An example flowchart of a dialogue knowledge point generation method 100 according to an embodiment of this specification is shown.
[0044] like Figure 1 As shown in section 110, the lexical-level salience, discourse-level salience, and conversation-level salience information of each conversational lexical in the multi-conversation sequence are determined. These determined lexical-level, discourse-level, and conversation-level salience information are used to reflect the knowledge point relevance of conversational lexical units at the lexical, discourse, and conversation levels, respectively. In this specification, the term "salience" can also be referred to as "salience degree," "knowledge relevance," or "knowledge point relevance." The term "knowledge" or "knowledge point" refers to factual or descriptive text, such as factual or descriptive text obtained from a corpus. Examples of corpora include, but are not limited to, professional books, such as Wikipedia's encyclopedia platform database, dialogue logs, and dialogue databases. The higher the salience of a conversational lexical unit, the higher its relevance to a knowledge point, and more attention should be paid to its influence when generating knowledge points. The lower the salience of a conversational lexical unit, the lower its relevance to a knowledge point, and its influence can be ignored when generating knowledge points.
[0045] Multi-session sequences can be formed by integrating or combining the content of multiple sessions. Figure 2 An example diagram illustrating multi-session information is shown. Figure 2 The example illustrates three sessions, each consisting of multiple utterances delivered in different rounds by different speaker roles, and each utterance composed of multiple session tokens. In this specification, the term "session" refers to a complete conversation between multiple users or between a user and an entity (e.g., an online service platform) regarding a specific topic or entity. The term "utterance" refers to a round of dialogue initiated by a user or entity within a session, for example... Figure 2 The phrase "I don't like Harry Porter" is an example. The term "lexical" is used to refer to the word-segmented constituent units in discourse, for example, Figure 2The term "JKRowling" is used. In some embodiments, the integrated multiple session content may include multiple session content discussing the same topic or the same entity, or multiple session content discussing related topics or related entities.
[0046] In some embodiments, session information from multiple session contents can be integrated according to session identifier, speaker role, and session occurrence time order. For example, for Figure 2 The three conversation contents shown can be concatenated in the order of conversation 1 to conversation 3. For each conversation, multiple utterances are categorized according to speaker roles, and the utterances from each role are concatenated in chronological order. Furthermore, each utterance is segmented to obtain the lexical units contained in each utterance, and these lexical units are concatenated in the order of utterance composition. In this specification, speaker roles can include knowledge inquirers and knowledge responders. Multi-conversation integration is performed in the above manner to obtain a multi-conversation sequence. The data structure of the obtained multi-conversation sequence can be, for example, d = {d1, d2, ..., d...}. k}, where k is the number of sessions, and d is the number of sessions of the i-th session. i Represented as d i ={r1,w i11 ,w i12 ,…,r2,w i21 ,w i22 ,…,w imn}, r i Indicates the speaker's role, w ijp Let represent the p-th conversational word in the j-th utterance of the i-th conversation, m represent the number of utterances in the conversation, and n represent the number of conversational words in each utterance. It should be noted that in some embodiments, when performing multi-conversation integration, categorization and concatenation can be performed according to speaker roles, but the resulting multi-conversation sequence does not include speaker roles, i.e., it does not include r. i .
[0047] After obtaining the multi-conversation sequence as described above, word-level salience information, discourse-level salience information, and conversation-level salience information of each conversation unit in the multi-conversation sequence can be generated based on the multi-conversation sequence.
[0048] Figure 3 An example flowchart of a conversational lexical salience information determination process 300 according to an embodiment of this specification is shown.
[0049] like Figure 3As shown in section 310, session marker lexical units and utterance marker lexical units are added at the beginning of each session and each utterance in the multi-session sequence. For example, for each session, a session marker lexical unit can be added at the beginning of that session and a utterance marker lexical unit can be added at the beginning of each utterance contained in that session. Here, the session marker lexical units and utterance marker lexical units can include predefined specific lexical units. After the above marker lexical unit addition is performed, for each session d i ={r1,w i11 ,w i12 ,…,r2,w i21 ,w i22 ,…,w imn} can be constructed
[0050] At 320, a conversation sequence representation of the multi-conversation sequence is generated based on the multi-conversation sequence after the addition of tagged lexical units. The generated conversation sequence representation includes a conversation representation for each conversation, a utterance representation for each utterance, and a lexical representation for each conversation lexical unit. In some embodiments, the lexical representation of the conversation lexical unit, the utterance representation of the utterance, and the conversation representation of the conversation can be generated based on the conversation lexical units, the utterance tagged lexical units, and the conversation tagged lexical units, respectively. In some embodiments, the multi-conversation sequence after the addition of tagged lexical units can be provided to a transformer-based encoder to generate the conversation sequence representation of the multi-conversation sequence. The structure of the transformer-based encoder can be referred to in the following section. Figure 10 The description is as follows: When generating representations of lexical units, utterances, and conversations based on the encoder, the positional information of lexical units, utterances, and conversations in the conversation sequence is introduced, and an attention mechanism is used. The resulting lexical representations, utterance representations, and conversation representations are contextualized representations with contextual information.
[0051] After obtaining the conversation sequence representation of the multi-conversation sequence as described above, at 330, the word-level salience information, discourse-level salience information, and conversation-level salience information of each conversation word in the multi-conversation sequence are determined based on the conversation sequence representation of the multi-conversation sequence.
[0052] In some embodiments, word-level saliency perception models, discourse-level saliency perception models, and conversation-level saliency perception models can be pre-trained. Figure 4 An example schematic diagram of a word-level saliency perception model 400 according to an embodiment of this specification is shown.
[0053] like Figure 4As shown, the lexical-level saliency awareness model 400 may include a classification layer 410, a mapping layer 420, and a soft estimation layer 430. The classification layer 410 is configured to predict the classification probability of the lexical saliency category of each conversational lexical based on the lexical representation of the conversational lexical. The mapping layer 420 is configured to map the lexical saliency categories to lexical saliency category embeddings (trainable lexical saliency category embeddings). The soft estimation layer 430 is configured to calculate the expected value of the saliency representation based on the classification probability of the lexical saliency category of the conversational lexical and the lexical saliency category embedding, as the lexical-level saliency representation of the conversational lexical. It should be noted that the classification layer and the mapping layer have trainable model parameters, which need to be trained through model training.
[0054] The model structure and function of the discourse-level salience perception model and the conversation-level salience perception model are the same as those of the lexical-level salience perception model, and will not be described in detail here.
[0055] After training the word-level saliency perception model, the discourse-level saliency perception model, and the conversation-level saliency perception model as described above, the word representations of each conversation word in the conversation sequence representation of the multi-conversation sequence can be provided to the word-level saliency perception model to predict the word-level saliency representation of each conversation word.
[0056] Specifically, the lexical representations of each conversation word in the conversation sequence representation can be provided to the classification layer of the lexical saliency perception model, and the classification layer can predict the classification probability of the lexical saliency category of each conversation word based on the lexical representation of each conversation word.
[0057] For example, the lexical representation of the i-th conversation lexical in a conversation sequence. Lexical representation Provided to the classification layer (e.g., a single-layer classification layer Softmax), the hierarchical layer determines the classification probability of the i-th conversational lexical belonging to various lexical saliency categories according to formula (1):
[0058]
[0059] in, The lexical saliency representation of the i-th conversation lexical, l t A category index representing the salientity category of a lexical unit (or the explicitness category of a lexical unit). This indicates that under the condition of input session sequence x Classified as l t The conditional probability, These are the trainable parameters of the classification layer in a lexical-level saliency-aware model. Typically, lexical saliency categories include two classes, namely, l t ∈{0,1}.
[0060] When training the model parameters for the classification layer of the word-level saliency-aware model, The true label can be determined based on reference knowledge in the following manner.
[0061] for The corresponding conversational terms in the conversation The conversational lexicon set contained in the conversation is And a list of reference knowledge. Calculate the lexical significance S according to formulas (2)-(4). i :
[0062] S i =TF i ×IKF i (2)
[0063]
[0064]
[0065] Where, if K i Include but otherwise,
[0066] If the calculated S i If it is greater than the predetermined threshold λ, then The true label is 1, otherwise, The true label is 0. In some embodiments, the predetermined threshold λ can be 0.1.
[0067] Next, the word saliency categories are mapped to word saliency category embeddings via the mapping layer of the word-level saliency perception model. For example, a parameter-trainable mapping function f() can be used to map word saliency categories to trainable word saliency category embeddings. That is, the lexical saliency categories 0 and 1 are mapped to different lexical saliency category embeddings Embedding(0) and Embedding(1), respectively.
[0068] Subsequently, through the soft estimation layer of the lexical saliency perception model, the lexical saliency representation of each conversation lexical is determined based on the classification probability of the lexical saliency category and the lexical saliency category embedding of each conversation lexical.
[0069] For example, the expected value of the lexical saliency category can be calculated according to formula (5) as the lexical saliency representation of the conversation lexical:
[0070]
[0071] Following the above method, the lexical saliency representation of each conversation lexical in the conversation sequence x can be determined. Where |x| represents the number of lexical units contained in the conversation sequence x.
[0072] Subsequently, the utterance representations of each utterance can be provided to the utterance-level saliency perception model to predict the saliency representation of each utterance. The saliency representation of each utterance serves as the utterance-level saliency representation of the conversational lexical units in that utterance.
[0073] Specifically, the utterance representations of each utterance in the conversation sequence representation can be provided to the classification layer of the utterance-level salience perception model, and the classification layer can predict the classification probability of the utterance salience category of each utterance based on the utterance representations of each utterance.
[0074] For example, the utterance representation of the j-th utterance in a conversation. Words can be expressed Provided to the classification layer (e.g., a single-layer classification layer Softmax), the hierarchical layer determines the classification probability of the j-th utterance belonging to various utterance salience categories according to formula (6):
[0075]
[0076] in, Let l represent the saliency of the j-th utterance. u A category index representing the salience category of discourse (or the salience category of discourse). This indicates that under the condition of input session sequence x Classified as l u The conditional probability, These are the trainable parameters of the classification layer in the discourse-level salience perception model. Typically, discourse salience categories include three classes, namely, l u ∈{0,1,2}. When training the model parameters for the classification layer of the discourse salience perception model, The true labels can be determined based on reference knowledge in a manner similar to the word-level saliency perception model. Preferably, two thresholds, μ1 = 0.025 and μ2 = 0.060, can be set when determining the true labels.
[0077] Next, the utterance saliency categories are mapped to utterance saliency category embeddings via the mapping layer of the utterance-level saliency perception model. For example, a parameter-trainable mapping function f() can be used to map utterance saliency categories to trainable utterance saliency category embeddings. That is, the discourse salience categories 0, 1 and 2 are mapped to different discourse salience category embeddings Embedding(0), Embedding(1) and Embedding(2), respectively.
[0078] Subsequently, through the soft estimation layer of the discourse-level saliency perception model, the discourse-level saliency representation of each discourse is determined based on the classification probability of the discourse saliency category and the discourse saliency category embedding. The discourse-level saliency representation of a discourse can be determined in a manner similar to that of formula (5).
[0079] Following the above method, the utterance-level salience representation of each conversational lexical unit in the conversation sequence x can be determined.
[0080] In addition, the session representations of each session are provided to the session-level saliency perception model to predict the saliency representation of each session, and the saliency features of each session are used as the session-level saliency representation of the session lexical units in that session.
[0081] Specifically, the session representations of each session in the session sequence representation can be provided to the classification layer of the session-level saliency awareness model, and the classification layer can predict the classification probability of the session saliency category of each session based on the session representation of each session.
[0082] For example, the session representation for the k-th session. Session representation Provided to the classification layer (e.g., a single-layer classification layer Softmax), the hierarchical layer determines the classification probability of the k-th session belonging to various session saliency categories according to formula (7):
[0083]
[0084] in, Let l represent the session-level saliency representation of the k-th session. s Indicates the category of session prominence (or the category index of session visibility). This indicates that under the condition of input session sequence x Classified as l s The conditional probability, These are the trainable parameters of the classification layer in the conversation-level saliency-aware model. Typically, conversation saliency categories include three classes, namely, l s ∈{0,1,2}. When training the model parameters for the classification layer of the conversation-level saliency-aware model, The true labels can be determined based on reference knowledge in a manner similar to the word-level saliency perception model. Preferably, when determining the true labels, two thresholds v1 = 0.01 and v2 = 0.02 can be set.
[0085] Next, the conversational saliency categories are mapped to conversational saliency category embeddings via the mapping layer of the conversational saliency-aware model. For example, a parameter-trainable mapping function f() can be used to map conversational saliency categories to trainable conversational saliency category embeddings. That is, the session saliency categories 0, 1 and 2 are mapped to different session saliency category embeddings Embedding(0), Embedding(1) and Embedding(2), respectively.
[0086] Subsequently, through the soft estimation layer of the conversation-level saliency perception model, the conversation-level saliency representation of each conversation is determined based on the classification probability of the conversation saliency category and the conversation saliency category embedding. The conversation-level saliency representation of a conversation can be determined in a manner similar to that of Equation (5).
[0087] Following the above method, the conversational saliency representation of each conversational lexical unit in the conversation sequence x can be determined.
[0088] Figure 5 A schematic diagram illustrating an example of a conversational lexical salience information determination process 500 according to an embodiment of this specification is shown.
[0089] like Figure 5 As shown, for k sessions d1 to d k The resulting conversation sequence d = {r1, w 111 ,w 112 ,…,r2,w 121 ,w 122 ,...,r1,w k11 ,…,r2,w k21 ,…,w kmn}, we can add (410) tagged tokens to each conversation and each utterance in the conversation sequence d, thereby obtaining the conversation sequence after adding tagged tokens.
[0090] Session sequence Provided to the Transformer-based encoder 420 to generate session sequence representations, the generated session sequence representations include session representations for each session. The discourse representation of each utterance and the lexical representation of each conversation lexical.
[0091] Lexical representation of each word Provided to the lexical saliency-aware model 430 to generate lexical saliency representations for each conversation lexical. Represent the utterance of each utterance Provided to the discourse-level saliency perception model 430 to generate discourse-level saliency representations for each discourse. And the session representation of each session Provided to the session saliency-aware model 430 to generate session-level saliency representations for each session. The obtained discourse-level salience representation can be used as the discourse-level salience representation of all conversational lexical units contained in the discourse, and the obtained conversational salience representation can be used as the conversational salience representation of all conversational lexical units contained in the conversation.
[0092] Figure 6 Another example flowchart of a conversational lexical salience information determination process 600 according to an embodiment of this specification is shown.
[0093] like Figure 6 As shown in 610, a session sequence representation of a multi-session sequence is generated, and the generated session sequence representation includes the lexical representation of each session lexical.
[0094] In 620, the lexical-level salience information, discourse-level salience information, and conversation-level salience information of each conversation lexical in the multi-conversation sequence are determined based on the conversation sequence representation of the multi-conversation sequence.
[0095] In some embodiments, the lexical representations of each conversation lexical in the conversation sequence representation can be provided to the lexical-level saliency-aware model to predict the lexical-level saliency representation of each conversation lexical. The prediction process of the lexical-level saliency representation can be referred to the above reference. Figure 4 The prediction process is described.
[0096] For each utterance in a multi-conversation sequence, the lexical representations of each conversational word in the utterance can be provided to a discourse-level saliency perception model to predict the saliency representation of the utterance. The saliency representations of each utterance serve as the discourse-level saliency representations of the conversational words in the utterance. For example, the lexical representations of each conversational word in the utterance can be added element-wise to obtain the discourse representation of the utterance, and then the obtained discourse representation can be provided to the discourse-level saliency perception model to predict the saliency representation of the utterance.
[0097] For each session in the multi-session sequence, the lexical representation of each session word in that session can be provided to the session-level saliency-aware model to predict the saliency representation of each session. The saliency features of each session serve as the session-level saliency representation of the session words in that session. For example, the session representation of each session word can be obtained by adding the lexical representations of each session word element by element, and then the obtained session representation can be provided to the session-level saliency-aware model to predict the saliency representation of that session.
[0098] Figure 7 Another example schematic diagram of the process for determining the salience information of conversational lexical units according to an embodiment of this specification is shown.
[0099] like Figure 7 As shown, for k sessions d1 to d k The resulting conversation sequence d = {r1, w 111 ,w 112 ,…,r2,w 121 ,w 122 ,…,r1,w k11 ,…,r2,w k21 ,…,w kmn The conversation sequence d can be provided to the Transformer-based encoder 710 to generate a conversation sequence representation, which includes the lexical representation of each conversation lexical.
[0100] Lexical representation of each word Provided to the lexical saliency-aware model 720 to generate lexical saliency representations for each conversation lexical. The lexical representations of all conversational lexical units contained in each utterance are provided to the utterance-level saliency-aware model 720 to generate the utterance-level saliency representation of each utterance. And the lexical representations of all conversational terms contained in each conversation are provided to the conversational saliency-aware model 720 to generate a conversational saliency representation for each conversation. The obtained discourse-level salience representation can be used as the discourse-level salience representation of all conversational lexical units contained in the discourse, and the obtained conversational salience representation can be used as the conversational salience representation of all conversational lexical units contained in the conversation.
[0101] Back Figure 1 After determining the lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversation lexical unit as described above, at 120, saliency information fusion is performed on the lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversation lexical unit.
[0102] Figure 8 An example flowchart of a saliency information fusion process 800 according to an embodiment of this specification is shown.
[0103] like Figure 8 As shown in Figure 810, based on the matching between each conversational word and each other's word-level salience information, discourse-level salience information and conversation-level salience information, the information retention ratio of each conversational word's word-level salience information, discourse-level salience information and conversation-level salience information is determined.
[0104] For example, in some embodiments, the similarity between the lexical representation of each conversational lexical and the saliency representation of the corresponding lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information can be calculated, and the matching degree between each conversational lexical and the corresponding lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information can be determined based on the calculated similarity. Subsequently, based on the matching degree between each conversational lexical and the corresponding lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information, the information retention ratio of the lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversational lexical is determined.
[0105] In some embodiments, a hybrid expert model can be used to achieve saliency information fusion. For example, a word-level saliency perception model, a discourse-level saliency perception model, and a conversation-level saliency perception model can be used as three expert models, and a gating model can be used to determine the information retention ratio of word-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversation word based on the matching between each conversation word and the word-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversation word.
[0106] For example, a gating function G = {α(x), β(x), γ(x)} can be used to calculate the information retention ratio of each conversational lexical's lexical, utterance-level, and conversational-level saliency representation based on the heuristic matching between each conversational lexical and its lexical-level, utterance-level, and conversational-level saliency representations.
[0107] For example, the information retention ratios of the lexical-level salience representation, discourse-level salience representation, and conversation-level salience representation of each conversational lexical can be calculated using formulas (8)-(11):
[0108]
[0109]
[0110]
[0111]
[0112] Among them, W1, W2, W3 and W G is the trainable parameter, L is the conversation sequence length (i.e., the number of lexical units in the conversation), h is the number of hidden states, and ⊙ represents element-wise multiplication.
[0113] After determining the information retention ratios of word-level salience, discourse-level salience, and conversation-level salience for each conversation word as described above, salience information fusion is performed at 820 based on the word-level salience, discourse-level salience, and conversation-level salience and their information retention ratios for each conversation word.
[0114] For example, the saliency information MoE(x) after fusion can be determined according to formula (12):
[0115] MoE(x)=α(x)⊙δ(x)+β(x)⊙ζ(x)+γ(x)⊙η(x) (12).
[0116] After determining the saliency information of each conversational lexical as described above, at 130, the saliency information of each conversational lexical is used to guide the generation of dialogue knowledge points based on conversational lexical in a multi-conversation sequence.
[0117] In some embodiments, dialogue knowledge points for a multi-conversation sequence can be generated via the decoder in an encoder-decoder model using fused saliency information of each conversational lexical and lexical representation of each conversational lexical. The fused saliency information of each conversational lexical is added to the lexical representation of each conversational lexical as a key state of the cross-attention layer on the decoder side. The lexical representation of the conversational lexical is the output of the encoder, i.e., the last hidden state of the encoder.
[0118] For example, the cross-attention score of the cross-attention layer on the decoder side can be determined according to formula (13):
[0119]
[0120] Wherein, the query vector Q = h decoder It is the hidden state of the decoder (decoder output), and the key vector K = h decoder +MoE(x) is obtained by adding the fused saliency information to the encoder's hidden state (encoder output), and the value vector V = h decoder This is the hidden state of the encoder (encoder output).
[0121] By explicitly adding the saliency information after fusion to the lexical representation of conversational lexical units, knowledge points can be generated by better perceiving knowledge-related content at the lexical granularity, discourse granularity, and conversational granularity, thereby generating complete and concise knowledge point information.
[0122] Figure 9 A schematic diagram illustrating an example of a dialogue knowledge point generation process according to an embodiment of this specification is shown. Figure 9In the example, a Transformer-based encoder-decoder model architecture is used to generate dialogue knowledge points based on multi-session sequences.
[0123] In progress Figure 9 Before the description, combined with Figure 10 and Figure 11 Describe the encoder-decoder model architecture based on Transformer. Figure 10 An example schematic diagram of a Transformer-based encoder-decoder model is shown, and Figure 11 A schematic diagram illustrating the processing of the cross-attention layer is shown.
[0124] exist Figure 10 In the encoder-decoder model architecture shown, each encoder consists of a multi-head self-attention layer and a feedforward neural network layer, and each decoder consists of a three-layer structure. The first and third layers of the decoder are similar to the multi-head self-attention layer and the feedforward neural network layer of the encoder. The middle layer of the decoder is a cross-attention layer, and the inputs K and V of the cross-attention layer are the outputs of the corresponding encoders.
[0125] In the Transformer-based encoder-decoder model architecture, the encoder encodes the input sequence into a series of feature vectors, and the decoder generates the output sequence step by step based on these feature vectors. To enable the decoder to effectively model the context of the current generation position, a cross-attention layer is introduced. In the cross-attention layer, the decoder adjusts the encoder's output with attention to obtain encoder information relevant to the current decoding position.
[0126] The processing procedure of the cross-attention layer is as follows Figure 11 As shown, a query vector Q is generated at each position of the decoder, used to calculate attention weights at all positions of the encoder. A set of key vectors K and value vectors V are generated at all positions of the encoder. The query vector Q and key vector K are used to perform a dot product operation, and the encoder's attention weights are generated through the Softmax function. Subsequently, the encoder's attention weights are multiplied by the value vectors and the results are summed to obtain the encoder's adjusted output.
[0127] The following is combined with Figure 9 This describes the process of generating dialogue knowledge points according to embodiments of this specification.
[0128] like Figure 9As shown, the multi-session sequence is encoded and multi-information integrated via a Transformer encoder, resulting in a session sequence representation of the multi-session sequence. This representation includes the session representation of each session, the discourse representation of each utterance, and the lexical representation of each session word. The obtained lexical representations are fed to a lexical-level saliency-aware model to predict the lexical-level saliency representation of each session word; the obtained discourse representations are fed to a discourse-level saliency-aware model to predict the discourse-level saliency representation of each utterance; and the obtained session representations are fed to a session-level saliency-aware model to predict the session-level saliency representation of each session. The predicted discourse-level saliency representations of each utterance serve as the discourse-level saliency representations of all session words contained in that utterance, and the predicted session-level saliency representations of each session serve as the session-level saliency representations of all session words contained in that session.
[0129] For each conversational lexical, a hybrid expert model is used to perform saliency fusion on the obtained lexical-level saliency representation, discourse-level saliency representation, and conversation-level saliency representation, and then provide it to the Transformer decoder.
[0130] The Transformer decoder uses the fused saliency representation to guide the generation of knowledge points on the decoder side. That is, it uses the fused saliency representation to guide the decoding process of the decoder on the session sequence representation (i.e., encoder output) generated by the encoder, thereby generating the corresponding knowledge points. Figure 12 An example schematic diagram illustrating knowledge points according to an embodiment of this specification is shown. Figure 12 The knowledge points in the text are based on Figure 2 Multi-session information generation.
[0131] Figure 13 An example block diagram of a dialogue knowledge point generation apparatus 1300 according to an embodiment of this specification is shown. Figure 13 As shown, the dialogue knowledge point generation device 1300 includes a salience information determination unit 1310, a salience information fusion unit 1320, and a knowledge point generation unit 1330.
[0132] The saliency information determination unit 1310 is configured to determine the lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversation lexical in a multi-conversation sequence. The determined lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information are used to reflect the knowledge point relevance of conversation lexical at the lexical, discourse, and conversation levels, respectively. The operation of the saliency information determination unit 1310 can be referenced above. Figure 1 110 and Figures 2-7 The described operation.
[0133] The saliency information fusion unit 1320 is configured to perform saliency information fusion on the lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversation lexical. The operation of the saliency information fusion unit 1320 can be referenced above. Figure 1 120 and Figure 8 The described operation.
[0134] The knowledge point generation unit 1330 is configured to use the fused saliency information of each conversational lexical unit to guide the generation of dialogue knowledge points based on conversational lexical units in a multi-conversation sequence. The operation of the knowledge point generation unit 1330 can be referenced above. Figure 1 The operation described in 130.
[0135] In some embodiments, the dialogue knowledge point generation apparatus 1300 may further include a tokenized lexical addition unit and a conversation sequence representation generation unit. The tokenized lexical addition unit is configured to add conversation tokenized lexicals and utterance tokenized lexicals at the beginning of each conversation and each utterance in the multi-conversation sequence. Subsequently, the conversation sequence representation generation unit generates a conversation sequence representation of the multi-conversation sequence based on the conversation sequence after tokenized lexical addition. The generated conversation sequence representation includes a conversation representation for each conversation, a utterance representation for each utterance, and a lexical representation for each conversation lexical.
[0136] After obtaining the conversation sequence representation of the conversation sequence as described above, the salience information determination unit 110 determines the word-level salience information, discourse-level salience information and conversation-level salience information of each conversation word in the multi-conversation sequence based on the conversation sequence representation of the multi-conversation sequence.
[0137] Figure 14 An example block diagram of a salience information determination unit 1400 according to an embodiment of this specification is shown. Figure 14 As shown, the salience information determination unit 1400 includes a word-level salience information prediction module 1410, a discourse-level salience information prediction module 1420, and a conversation-level salience information prediction module 1430.
[0138] The lexical-level saliency prediction module 1410 is configured to provide the lexical representations of each conversation lexical in the conversation sequence representation to the lexical-level saliency perception model to predict the lexical-level saliency representation of each conversation lexical. The operation of the lexical-level saliency prediction module 1410 can be referenced above. Figure 3 330 and Figures 4-5 The described operation.
[0139] The utterance-level saliency information prediction module 1420 is configured to provide the utterance representation of each utterance in the conversation sequence representation to the utterance-level saliency perception model to predict the saliency representation of each utterance. The saliency representation of each utterance serves as the utterance-level saliency representation of the conversational lexical units in that utterance. The operation of the utterance-level saliency information prediction module 1420 can be referenced above. Figure 3 The operation described in 330.
[0140] The conversation-level saliency prediction module 1430 is configured to provide the conversation representations of each conversation in the conversation sequence representation to the conversation-level saliency perception model to predict the saliency representation of each conversation. The saliency features of each conversation serve as the conversation-level saliency representation of the conversational lexical units in that conversation. The operation of the conversation-level saliency prediction module 1430 can be referenced above. Figure 3 The operation described in 330.
[0141] In some embodiments, the conversation sequence representation generation unit can generate a conversation sequence representation of multiple conversation sequences based on the conversation sequence, wherein the generated conversation sequence representation includes the lexical representation of each conversation lexical. After obtaining the conversation sequence representation of the conversation sequence as described above, the saliency information determination unit determines the lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversation lexical in the multiple conversation sequence based on the conversation sequence representation of the multiple conversation sequence.
[0142] In this context, the lexical-level saliency prediction module is configured to provide the lexical representations of each conversation lexical in the conversation sequence representation to the lexical-level saliency perception model to predict the lexical-level saliency representation of each conversation lexical. The utterance-level saliency prediction module is configured to, for each utterance in a multi-conversation sequence, provide the lexical representations of each conversation lexical in that utterance to the utterance-level saliency perception model to predict the saliency representation of that utterance; the saliency representations of each utterance serve as the utterance-level saliency representations of the conversation lexical in that utterance. The conversation-level saliency prediction module is configured to, for each conversation in a multi-conversation sequence, provide the lexical representations of each conversation lexical in that conversation to the conversation-level saliency perception model to predict the saliency representation of each conversation; the saliency features of each conversation serve as the conversation-level saliency representations of the conversation lexical in that conversation.
[0143] Figure 15 An example block diagram of a saliency information fusion unit 1500 according to an embodiment of this specification is shown. Figure 15 As shown, the saliency information fusion unit 1500 includes an information retention ratio determination module 1510 and a saliency information fusion module 1520.
[0144] The information retention ratio determination module 1510 is configured to determine the information retention ratio of each conversational lexical based on the matching between each conversational lexical and the lexical-level, utterance-level, and conversation-level salience information of each conversational lexical. The operation of the information retention ratio determination module 1510 can be referenced above. Figure 8 The operation described in 810.
[0145] The saliency information fusion module 1520 is configured to perform saliency information fusion based on the word-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversation word and the information retention ratio.
[0146] In some embodiments, the lexical-level saliency perception model, the discourse-level saliency perception model, and the conversation-level saliency perception model are used as expert models in a hybrid expert system. The information retention ratio determination module can use a gating model in the hybrid expert system to determine the information retention ratios of each conversation lexical, discourse-level, and conversation-level saliency information based on the matching between each conversation lexical and the lexical-level, discourse-level, and conversation-level saliency information of each conversation lexical.
[0147] In some embodiments, the conversation sequence representation generation unit can generate conversation sequence representations of multiple conversation sequences via an encoder in a converter-based encoder-decoder model. In this case, the knowledge point generation unit can generate dialogue knowledge points of multiple conversation sequences via a decoder in the encoder-decoder model, using fused saliency information of each conversation word and word representation of each conversation word, wherein the fused saliency information of each conversation word is added to the word representation of each conversation word as a key state (or key vector) of the cross-attention layer on the decoder side.
[0148] As per the above reference Figures 1 to 15 This specification describes a method and apparatus for generating dialogue knowledge points according to embodiments thereof. The aforementioned dialogue knowledge point generation apparatus can be implemented in hardware, software, or a combination of both.
[0149] Figure 16 An example schematic diagram of a dialogue knowledge point generation apparatus 1600 implemented based on a computer system according to an embodiment of this specification is shown. Figure 16As shown, the dialogue knowledge point generation apparatus 1600 may include at least one processor 1610, a memory (e.g., non-volatile memory) 1620, a main memory 1630, and a communication interface 1640, and the at least one processor 1610, memory 1620, main memory 1630, and communication interface 1640 are connected together via a bus 1660. At least one processor 1610 executes at least one computer-readable instruction (i.e., the elements implemented in software above) stored or encoded in the memory.
[0150] In one embodiment, computer-executable instructions are stored in memory that, when executed, cause at least one processor 1610 to: determine lexical-level salience information, utterance-level salience information, and conversation-level salience information for each conversational lexical in a multi-conversation sequence, the lexical-level salience information, utterance-level salience information, and conversation-level salience information being used to reflect the knowledge point relevance of the conversational lexical at the lexical, utterance, and conversation levels, respectively; perform salience information fusion on the lexical-level salience information, utterance-level salience information, and conversation-level salience information for each conversational lexical; and use the fused salience information of each conversational lexical to guide the generation of dialogue knowledge points based on the conversational lexical in the multi-conversation sequence.
[0151] It should be understood that the computer-executable instructions stored in memory, when executed, cause at least one processor 1610 to perform the above-described combinations in the various embodiments of this specification. Figures 1-15 The description includes various operations and functions.
[0152] According to one embodiment, a program product, such as a machine-readable medium (e.g., a non-transitory machine-readable medium), is provided. The machine-readable medium may have instructions (i.e., the elements implemented in software as described above), which, when executed by a machine, cause the machine to perform the above-described combinations of the various embodiments of this specification. Figures 1-15 The various operations and functions described. Specifically, a system or apparatus equipped with a readable storage medium storing software program code that implements the functions of any of the embodiments described above, and enabling the computer or processor of the system or apparatus to read and execute the instructions stored in the readable storage medium.
[0153] In this case, the program code itself, which can be read from a readable medium, can perform the functions of any of the above embodiments. Therefore, the machine-readable code and the readable storage medium storing the machine-readable code constitute a part of the present invention.
[0154] Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer or the cloud via a communication network.
[0155] According to one embodiment, a computer program product is provided, the computer program product including a computer program, which, when executed by a processor, causes the processor to perform the above-described combinations of the various embodiments of this specification. Figures 1-15 The description includes various operations and functions.
[0156] Those skilled in the art will understand that the various embodiments disclosed above can be modified and varied without departing from the spirit of the invention. Therefore, the scope of protection of this invention should be defined by the appended claims.
[0157] It should be noted that not all steps and units in the above process and system structure diagrams are mandatory; some steps or units can be omitted according to actual needs. The execution order of each step is not fixed and can be determined as needed. The device structure described in the above embodiments can be a physical structure or a logical structure; that is, some units may be implemented by the same physical entity, or some units may be implemented by multiple physical entities, or they may be jointly implemented by certain components in multiple independent devices.
[0158] In the above embodiments, the hardware units or modules can be implemented mechanically or electrically. For example, a hardware unit, module, or processor may include permanent dedicated circuitry or logic (such as a dedicated processor, FPGA, or ASIC) to perform the corresponding operation. The hardware unit or processor may also include programmable logic or circuitry (such as a general-purpose processor or other programmable processor), which can be temporarily configured by software to perform the corresponding operation. The specific implementation method (mechanical, dedicated permanent circuitry, or temporarily configured circuitry) can be determined based on cost and time considerations.
[0159] The specific embodiments described above with reference to the accompanying drawings are exemplary embodiments, but do not represent all embodiments that can be implemented or fall within the scope of the claims. The term "exemplary" as used throughout this specification means "serving as an example, instance, or illustration" and does not imply that it is "preferred" or "advantageous" compared to other embodiments. Specific details are included to provide an understanding of the described techniques. However, these techniques can be practiced without these specific details. In some instances, well-known structures and apparatuses are shown in block diagram form to avoid obscuring the concepts of the described embodiments.
[0160] The foregoing description of this disclosure is provided to enable any person skilled in the art to implement or use this disclosure. Various modifications to this disclosure will be apparent to those skilled in the art, and the general principles defined herein can be applied to other variations without departing from the scope of this disclosure. Therefore, this disclosure is not limited to the examples and designs described herein, but is consistent with the widest scope of the principles and novel features disclosed herein.
Claims
1. A method for generating dialogue knowledge points, comprising: A conversation sequence representation of a multi-conversation sequence is generated via an encoder in a converter-based encoder-decoder model, the conversation sequence representation including lexical representations of each conversation lexical unit; The lexical-level salience information, discourse-level salience information, and conversation-level salience information of each conversation lexical in the multi-conversation sequence are determined. The lexical-level salience information, discourse-level salience information, and conversation-level salience information are used to reflect the knowledge point relevance of the conversation lexical at the lexical level, discourse level, and conversation level, respectively. Saliency information fusion is performed on the lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversational lexical unit; as well as The decoder in the encoder-decoder model generates dialogue knowledge points for the multi-conversation sequence using the fused saliency information of each conversational lexical and the lexical representation of each conversational lexical. The fused saliency information of each conversational lexical is added to the lexical representation of each conversational lexical as the key state of the cross-attention layer on the decoder side.
2. The dialogue knowledge point generation method as described in claim 1, wherein, The session sequence representation for generating multi-session sequences includes: Add session marker lemmas and utterance marker lemmas at the beginning of each session and each utterance in the multi-session sequence; A conversation sequence representation of the multi-conversation sequence is generated based on the multi-conversation sequence after the addition of tagged lexical units. The conversation sequence representation further includes a conversation representation for each conversation and a utterance representation for each utterance. The determination of the lexical-level salience information, discourse-level salience information, and conversation-level salience information of each conversation lexical in the multi-conversation sequence includes: The lexical-level salience information, discourse-level salience information, and conversation-level salience information of each conversation lexical in the multi-conversation sequence are determined based on the conversation sequence representation of the multi-conversation sequence.
3. The dialogue knowledge point generation method as described in claim 2, wherein, Determining the lexical-level salience information, discourse-level salience information, and conversation-level salience information of each conversation lexical in the multi-conversation sequence based on the conversation sequence representation of the multi-conversation sequence includes: The lexical representations of each conversation word in the conversation sequence representation are provided to the lexical-level saliency-aware model to predict the lexical-level saliency representation of each conversation word. The utterance representations of each utterance in the conversation sequence representation are provided to the utterance-level saliency perception model to predict the saliency representation of each utterance. The saliency representation of each utterance serves as the utterance-level saliency representation of the conversational lexical units within that utterance. The session representations of each session in the session sequence representation are provided to the session-level saliency-aware model to predict the saliency representation of each session. The saliency features of each session are used as the session-level saliency representation of the session lexical units in that session.
4. The dialogue knowledge point generation method as described in claim 3, wherein, The lexical representations of each conversation word in the conversation sequence representation are provided to the lexical-level saliency-aware model to predict the lexical-level saliency representations of each conversation word, including: The classification probability of the lexical saliency category of each conversation word is predicted based on the lexical representation of each conversation word in the conversation sequence representation through the classification layer of the lexical saliency perception model. The lexical saliency category is mapped to a lexical saliency category embedding via the mapping layer of the lexical-level saliency perception model; and The lexical-level saliency perception model is used to determine the lexical-level saliency representation of each conversation lexical based on the classification probability of the lexical saliency category and the lexical saliency category embedding of each conversation lexical.
5. The dialogue knowledge point generation method as described in claim 3, wherein, Providing each utterance representation in the conversation sequence representation to the utterance-level salience perception model to predict the salience representation of each utterance includes: The classification probability of the salience category of each utterance is predicted based on the utterance representation in the conversation sequence representation through the classification layer of the utterance-level salience perception model. The utterance saliency categories are mapped to utterance saliency category embeddings via the mapping layer of the utterance-level saliency perception model; and The salience representation of each utterance is determined by the soft estimation layer of the utterance-level salience perception model based on the classification probability of the utterance salience category and the utterance salience category embedding.
6. The dialogue knowledge point generation method as described in claim 3, wherein, Providing each session representation in the session sequence representation to the session-level saliency-aware model to predict the saliency representation of each session includes: The classification probability of each session's session saliency category is predicted based on the session representation in the session sequence representation through the classification layer of the session-level saliency perception model. The session saliency categories are mapped to session saliency category embeddings via the mapping layer of the session-level saliency-aware model; and The saliency representation of each session is determined by the soft estimation layer of the session-level saliency perception model based on the classification probability of the session saliency category and the session saliency category embedding.
7. The dialogue knowledge point generation method as described in claim 1, wherein, Determining the lexical-level salience, discourse-level salience, and conversation-level salience of each conversation lexical in a multi-conversation sequence includes: The lexical-level salience information, discourse-level salience information, and conversation-level salience information of each conversation lexical in the multi-conversation sequence are determined based on the conversation sequence representation of the multi-conversation sequence.
8. The knowledge point generation method as described in claim 7, wherein, Determining the lexical-level salience information, discourse-level salience information, and conversation-level salience information of each conversation lexical in the conversation sequence based on the conversation sequence representation of the multi-conversation sequence includes: The lexical representations of each conversation word in the conversation sequence representation are provided to the lexical-level saliency-aware model to predict the lexical-level saliency representation of each conversation word. For each utterance in the multi-conversation sequence, the lexical representation of each conversational word in the utterance is provided to the utterance-level saliency perception model to predict the saliency representation of the utterance. The saliency representation of each utterance serves as the utterance-level saliency representation of the conversational words in the utterance; and For each session in the multi-session sequence, the lexical representation of each session word in the session is provided to the session-level saliency-aware model to predict the saliency representation of each session, and the saliency features of each session are used as the session-level saliency representation of the session words in the session.
9. The dialogue knowledge point generation method as described in claim 1, wherein, The saliency information fusion of lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information for each conversational lexical includes: Based on the matching between each conversational lexical and its corresponding lexical-level, discourse-level, and conversation-level salience information, the information retention ratios of each conversational lexical are determined. Saliency information is fused based on the lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversational lexical unit, as well as the information retention ratio.
10. The dialogue knowledge point generation method as described in claim 9, wherein, Based on the matching between each conversational lexical and the lexical-level, discourse-level, and conversation-level salience information of each conversational lexical, the information retention ratios of each conversational lexical, discourse-level, and conversation-level salience information are determined, including: A gating model is used to determine the information retention ratio of each conversational word based on the matching between each conversational word and the word-level, discourse-level, and conversation-level saliency information.
11. A dialog knowledge point generation device, comprising: The conversation sequence representation generation unit generates a conversation sequence representation of multiple conversation sequences via an encoder in a converter-based encoder-decoder model, the conversation sequence representation including the lexical representation of each conversation lexical; The saliency information determination unit determines the lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversation lexical in the multi-conversation sequence. The lexical-level saliency information, discourse-level saliency information, and conversation-level saliency information are used to reflect the knowledge point relevance of the conversation lexical at the lexical level, discourse level, and conversation level, respectively. The saliency information fusion unit performs saliency information fusion on the word-level saliency information, discourse-level saliency information and conversation-level saliency information of each conversation word; as well as The knowledge point generation unit generates dialogue knowledge points for the multi-conversation sequence via the decoder in the encoder-decoder model using the fused saliency information of each conversation word and the lexical representation of each conversation word. The fused saliency information of each conversation word is added to the lexical representation of each conversation word as the key state of the cross-attention layer on the decoder side.
12. The dialogue knowledge point generation apparatus as described in claim 11, further comprising: The lexical addition unit adds session lexical and utterance lexical at the beginning of each session and each utterance in the multi-session sequence; as well as The conversation sequence representation generation unit further generates a conversation sequence representation of the multi-conversation sequence based on the conversation sequence after adding tagged lexical units. The conversation sequence representation also includes a conversation representation for each conversation and a utterance representation for each utterance. The saliency information determination unit determines the word-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversation word in the multi-conversation sequence based on the conversation sequence representation of the multi-conversation sequence.
13. The dialogue knowledge point generation apparatus as described in claim 12, wherein, The saliency information determination unit includes: The lexical saliency information prediction module provides the lexical representation of each conversation lexical in the conversation sequence representation to the lexical saliency perception model to predict the lexical saliency representation of each conversation lexical. The utterance-level saliency information prediction module provides the utterance representations of each utterance in the conversation sequence representation to the utterance-level saliency perception model to predict the saliency representation of each utterance. The saliency representation of each utterance serves as the utterance-level saliency representation of the conversational lexical units within that utterance. The conversation-level saliency information prediction module provides the conversation representations of each conversation in the conversation sequence representation to the conversation-level saliency perception model to predict the saliency representation of each conversation. The saliency features of each conversation serve as the conversation-level saliency representation of the conversational lexical units in that conversation.
14. The dialogue knowledge point generation apparatus as described in claim 11, wherein, The saliency information fusion unit includes: The information retention ratio determination module determines the information retention ratios of each conversational lexical based on the matching between each lexical, discourse, and conversational salience information and the lexical-level, discourse-level, and conversational salience information of each conversational lexical. The saliency information fusion module fuses saliency information based on the word-level saliency information, discourse-level saliency information, and conversation-level saliency information of each conversation word and the information retention ratio.
15. The dialogue knowledge point generation apparatus as described in claim 14, wherein, The information retention ratio determination module uses a gating model to determine the information retention ratio of each conversation word based on the matching between each conversation word and the word-level salience information, discourse-level salience information, and conversation-level salience information of each conversation word.
16. A dialog knowledge point generation device, comprising: At least one processor; Memory coupled to the at least one processor; as well as A computer program stored in the memory, which is executed by the at least one processor to implement the dialogue knowledge point generation method as described in any one of claims 1 to 10.
17. A computer-readable storage medium storing executable instructions that, when executed, cause a processor to perform the dialogue knowledge point generation method as described in any one of claims 1 to 10.
Citation Information
Patent Citations
Multi-round dialogue generation method and system based on information enhancement
CN114357976A
Dialogue abstract generation method and system
CN116483991A
