A method for generating rich semantic and diverse dialogue content based on a crowd-sourced knowledge graph

By constructing a three-layer group intelligence knowledge graph and gated fusion dynamic knowledge dependency model, the problem of single content generation of existing dialogue systems is solved, and a rich, diverse and logically smooth dialogue reply generation is achieved.

CN116166815BActive Publication Date: 2025-07-22NORTHWESTERN POLYTECHNICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211686396.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-26
Publication Date
2025-07-22
Estimated Expiration
2042-12-26

AI Technical Summary

Technical Problem

Existing dialogue systems are difficult to generate information-rich, diverse and logically smooth responses, especially in social media, where group intelligence knowledge expressed by users is not fully utilized.

Method used

A three-layer group intelligence knowledge graph is constructed, including domain common sense, group intelligence description and group intelligence expression graph, combined with a gated fusion dynamic knowledge dependency model, dialogue content is generated through the Transformer encoder and GRU decoder, and knowledge is fused using static and dynamic graph attention mechanisms to achieve rich understanding and diversified generation of dialogue context.

Benefits of technology

The dialogue content with rich information, high diversity and smooth logic was generated, which improved the semantic understanding and expression ability of the dialogue system, and enhanced the personalization and descriptiveness of the reply.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116166815B_ABST
    Figure CN116166815B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for generating rich semantic and diverse dialogue content based on a crowd-sourced knowledge graph. The specific process is as follows: collect the opinions and attitude content expressed by users on social media platforms, and construct a three-layer crowd-sourced knowledge graph: (1) domain common sense knowledge graph, (2) crowd-sourced description knowledge graph, and (3) crowd-sourced expression knowledge graph; construct a gated fusion dynamic knowledge dependence model. In the encoding stage, use the crowd-sourced knowledge graph to enhance the semantics of the input dialogue context. In the decoding stage, use the gated fusion dynamic knowledge dependence decoding mechanism. The gating mechanism fuses common sense and description knowledge from the perspective of local semantics to improve the diversity and subjectivity of content expression. The dynamic knowledge dependence mechanism fuses expression knowledge from the perspective of global grammar to ensure that the reply content is logically smooth and fluent; use dialogue data to train the model. After training is completed, it can automatically generate high-quality content with rich information and high diversity according to the input dialogue content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of non-goal-driven dialogue systems based on knowledge graphs, and particularly relates to a method for generating rich semantic and diverse dialogue content based on a crowd-sourced knowledge graph. Background Art

[0002] In recent years, numerous researchers have been dedicated to constructing dialogue systems that can communicate naturally with humans. Although significant progress has been made in the research of dialogue systems, there is still a certain distance from truly human-like dialogue systems. During the dialogue process, we will automatically combine the knowledge we have mastered to understand the dialogue context and generate reasonable responses. Deeply understanding the dialogue context by integrating external knowledge and generating factually correct, fluent, and smooth dialogue responses is a current research hotspot in dialogue systems. A truly anthropomorphic dialogue system should attract users in the dialogue process from three aspects: (1) stating basic factual information, (2) conveying subjective descriptions and opinionated information to achieve in-depth opinion exchanges, and (3) using diverse expression techniques to attract users to engage in long-term conversations. Existing structured knowledge graphs and unstructured knowledge bases are descriptions of common-sense information about things and can only provide the ability for dialogue systems to convey basic factual information.

[0003] In the era of social media, users tend to express their opinions and attitudes online based on their own experiences and cognitions. The content expressed by these groups contains rich crowd-sourced knowledge, including rich descriptions with emotions about things. Crowd-sourced knowledge can enhance the performance of dialogue systems from three aspects: (1) enriching semantic information to enhance context understanding, (2) descriptive and opinionated information to increase the information content of the generated content, and (3) personalized user expressions to enhance the diversity of response content. By mining the crowd-sourced knowledge in crowd-sourced expression texts and constructing a crowd-sourced knowledge graph, it is possible to further enrich the dialogue system's understanding of the semantics of the dialogue context, as well as the information richness and expression diversity of the generated dialogue content. Summary of the Invention

[0004] Technical Problems to be Solved

[0005] To avoid the deficiencies of the prior art, the present invention provides a method for generating rich semantic and diverse dialogue content based on a crowd-sourced knowledge graph.

[0006] Technical Solution

[0007] A method for generating rich semantic and diverse dialogue content based on a crowd-sourced knowledge graph, characterized by the following steps:

[0008] Step 1: Collect group expression data, collect the evaluation and opinion content expressed by users on social media platforms about specific things as the knowledge source of the crowd-sourced knowledge graph, and provide support for the subsequent construction of the crowd-sourced knowledge graph;

[0009] Step 2: Construct a three-layer crowd-sourced knowledge graph \(G=(G C ,G D ,G E ), where the domain common sense knowledge graph contains common sense knowledge information within a specific domain, where is a knowledge triple \((h, r, t)\) expressing the relationship between the head entity and the tail entity; the crowd-sourced description knowledge graph is descriptive knowledge information about things, reflecting the subjective perception and emotional attitude towards things, where is a knowledge triple, and \(G D contains two relationships, group topic and group consensus; the group topic reflects the aspects and attributes that people are most concerned about when discussing the same thing, reflecting the inherent attributes of things, and the group consensus reflects the content that is recognized and expressed by most users when discussing the same thing; use the topic extraction method that fuses phrases and the TextRank algorithm with topic bias to mine group topics and group consensus; the crowd-sourced expression knowledge graph is knowledge at the natural language expression structure level, reflecting the context association and syntactic dependency relationship of language, is a knowledge triple, and use a syntactic graph to construct \(G E , and obtain the syntactic part-of-speech and syntactic dependency relationship between words by analyzing the syntactic graph of the user's expression content;

[0010] Step 3: Construct a hierarchical semantic enhancement encoding module of a gated fusion dynamic knowledge dependency model; first define the input dialogue context sequence \(X = \{x_1, x_2, \ldots, x n \}\), and the constructed crowd-sourced knowledge graph \(G=(G C ,G D ,G E ), and the model target output is the corresponding dialogue response \(Y = \{y_1, y_2, \ldots, y m \}\); extract three knowledge sub-graph sequences from the crowd-sourced knowledge graph according to the input dialogue context For the knowledge extracted from the common sense and description graphs, regard it as a text sequence and use the Transformer model for encoding, as follows:

[0011] z i = Transformer(k i )

[0012] For the knowledge extracted from the expression graph, use the static graph attention mechanism to fuse the structural information of the edges and nodes between multiple knowledge triples, as follows:

[0013]

[0014]

[0015]

[0016] where h n , r n , t n represent the head entity, relation, and tail entity in the knowledge triple respectively; n e represents the number of knowledge triples in the expression graph; W r , W h , W t are three weight matrices, randomly initialized during the training process, used to model the semantic associations between the head entity, relation, and tail entity; finally, the static graph attention mechanism is used to fuse all knowledge vectors to obtain the semantic representation of the finally extracted knowledge vector as follows:

[0017]

[0018]

[0019] where W z are two trainable weight matrices, randomly initialized during the training process, used to map the semantic representation of the knowledge vector to a unified dimension; concatenating with the corresponding input word vector ω(x t ) to obtain the knowledge-enhanced dialogue context vector representation Taking the dialogue context vector representation sequence as the input of the encoder GRU, the encoded hidden state sequence H = {h1, h2,..., h n} is obtained as follows:

[0020] h t = GRU(h t-1 , e(x t ))

[0021] Step 4: Construct a gated fusion dynamic knowledge dependency decoder; the decoder uses the gating mechanism and the dynamic knowledge dependency mechanism to dynamically adjust the attention weights and utilization degrees of different types of knowledge during the decoding process; the decoder GRU fuses the decoded hidden state vector s t from the previous decoding moment, the dialogue context attention vector the gated knowledge vector the expressive knowledge vector and the vector representation e(y t),Perform the word prediction generation process as follows:

[0022]

[0023] Among them, the dialogue context attention vector At each decoding moment, it is obtained by calculating the attention between the decoding hidden state vector s t and the encoded hidden state sequence H as follows:

[0024]

[0025] q t = softmax(α t )

[0026]

[0027] Among them, W h and W s are two trainable weight matrices, randomly initialized during the training process, used to map h i and s t to the same dimension, b q represents the bias matrix, and n represents the length of the input sentence in the encoding stage;

[0028] Express knowledge controls the syntactic structure of the generated sentence from a global syntactic perspective during the decoding process; Dynamically update the express knowledge vector t according to the decoding hidden state s to achieve dynamic adjustment of syntactic express knowledge as follows:

[0029]

[0030]

[0031]

[0032] Among them, W e and are two trainable weight matrices, randomly initialized during the training process, used to map and s t to the same dimension, b e represents the bias matrix, and n1 represents the number of express knowledge that can be fused;

[0033] The common sense knowledge vector and the descriptive knowledge vector are obtained according to the same calculation method. Use the gating mechanism to determine the semantic expression degree in common sense and descriptive knowledge to obtain the gated knowledge vector as follows:

[0034]

[0035]

[0036] where v g represents the weight matrix, and b g represents the bias matrix, which is randomly initialized during the training process; σ represents the sigmoid activation function;

[0037] Step 5: The knowledge-aware copy module realizes the generation process of the final response by explicitly copying words from the input and the knowledge source; at each decoding time step t, the predicted word distribution is:

[0038]

[0039] where W v represents the weight matrix, and b v represents the bias matrix, which is randomly initialized during the training process;

[0040] To avoid out-of-vocabulary words, the pointer mechanism is used to explicitly copy words from the knowledge source and the input sequence; the knowledge pointers for copying from the input, commonsense knowledge graph, crowd wisdom description graph, and crowd wisdom expression graph are defined as p Q , p C , p D , p E , and the calculation method is as follows:

[0041]

[0042]

[0043]

[0044]

[0045] where both represent trainable weight matrices, and b x (x ∈ (q, c, d, e)) both represent bias matrices, which are randomly initialized during the training process; σ represents the sigmoid activation function;

[0046] The probability distribution of the words generated by the final model is as follows:

[0047]

[0048] where W p represents the trainable weight matrix, and q ti , respectively represent the decoding hidden state s tThe attention weight obtained by calculating the i-th item of the dialogue context, common sense knowledge, descriptive knowledge, and expressive knowledge through the softmax function.

[0049] A computer system, characterized by comprising: one or more processors, and a computer-readable storage medium for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned method.

[0050] A computer-readable storage medium, characterized by storing computer-executable instructions, which are used to implement the method described in claim 1 when executed.

[0051] Beneficial effects

[0052] A rich semantic and diverse dialogue content generation method based on a crowd-sourced knowledge graph provided by the present invention collects the viewpoints and attitude content expressed by users on social media platforms, and constructs a three-layer crowd-sourced knowledge graph: (1) a domain common sense knowledge graph, (2) a crowd-sourced descriptive knowledge graph, and (3) a crowd-sourced expressive knowledge graph, to mine valuable and high-quality crowd-sourced knowledge information from multi-source and heterogeneous group expression content; constructs a gated fusion dynamic knowledge dependence model, uses the crowd-sourced knowledge graph to enhance the semantics of the input dialogue context in the encoding stage, and uses a gated fusion dynamic knowledge dependence decoding mechanism in the decoding stage. The gating mechanism fuses common sense and descriptive knowledge from a local semantic perspective to improve the diversity and subjectivity of content expression, and the dynamic knowledge dependence mechanism fuses expressive knowledge from a global grammar perspective to ensure the logical smoothness and fluency of the reply content; trains the model using dialogue data, and after training is completed, it can automatically generate high-quality content with rich information and high diversity according to the input dialogue content. Brief description of the drawings

[0053] The drawings are only for the purpose of showing specific embodiments, and are not considered as limiting the present invention. Throughout the drawings, the same reference signs denote the same components.

[0054] Figure 1 It is the overall system architecture diagram in the embodiment of the present invention.

[0055] Figure 2 It is the detailed structural diagram of the encoding and decoding model of the model. Detailed implementation manners

[0056] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0057] A rich-semantic and diverse dialogue content generation method based on the crowd wisdom knowledge graph provided by the present invention is based on the following principles: The rich crowd wisdom knowledge contained in the group expression content can effectively improve the dialogue system: (1) Enriching semantic information enhances context understanding; (2) Descriptive and opinionated information increases the information content of the generated content; (3) Personalized user expressions enhance the diversity of reply content. The gated fusion dynamic knowledge dependence mechanism reasonably controls the reply generation process from the perspectives of global grammar and local semantics, ensuring that the generated content is rich in information and fluent at the same time.

[0058] It includes:

[0059] Crowd wisdom knowledge graph construction model: Mining crowd wisdom knowledge from group expression content and constructing a three-layer crowd wisdom knowledge graph;

[0060] Rich-semantic and diverse dialogue generation model: Fusing crowd wisdom knowledge, using crowd wisdom knowledge to enhance the semantic understanding of dialogue context during the encoding process, and dynamically fusing global grammar crowd wisdom knowledge and local semantic crowd wisdom knowledge during the decoding process, ensuring the fluency and smoothness of the generated dialogue content while increasing its information content.

[0061] The specific steps are as follows:

[0062] Step 1: Collect group expression data, collect the evaluation and opinion content of users' expressions about specific things from social media platforms, as the knowledge source of the crowd wisdom knowledge graph, providing support for the subsequent construction of the crowd wisdom knowledge graph. The specific knowledge source is the user reviews and travel notes about tourist attractions in Xi'an on online travel platforms such as Qunar, Mafengwo, and Ctrip, as the crowd wisdom knowledge source.

[0063] Step 2: Construct a three-layer crowd wisdom knowledge graph G=(G C ,G D ,G E ). Among them, the domain common sense knowledge graph contains common sense knowledge information in the tourism field, where is a knowledge triple (h, r, t), expressing the relationship between the head entity and the tail entity. For example, (Big Wild Goose Pagoda, ticket price, 25 yuan) represents the common sense knowledge that the ticket price of the Big Wild Goose Pagoda is 25 yuan. The crowd wisdom description knowledge graph contains descriptive knowledge information about things, reflecting the subjective perception and emotional attitude towards things. Among them, is a knowledge triple, G DIt contains two relationships, group topic and group consensus. The group topic reflects the aspects and attributes that people are most concerned about when discussing the same thing, reflecting the inherent attributes of the thing. The group consensus reflects the content that is recognized and expressed by most users when discussing the same thing. Use the topic extraction method that combines phrases and the TextRank algorithm with topic bias to mine group topics and group consensus. For example, the two triples (Datang Furong Garden, group topic, ticket price) and (ticket price, group consensus, too expensive, poor cost performance) reflect that most users are concerned about the ticket price of Datang Furong Garden and generally think it is too expensive. The crowd wisdom expression knowledge graph is knowledge at the natural language expression structure level, reflecting the context association and grammatical dependency relationship of language. is a knowledge triple, and the construction of G E is carried out using a syntax graph. By analyzing the syntax graph of the user's expression content, the grammatical part-of-speech and grammatical dependency relationship between words are obtained.

[0064] Step 3: Construct a hierarchical semantic enhancement encoding module for the gated fusion dynamic knowledge dependency model. First, define the input dialogue context sequence X = {x1, x2, …, x n}, and the constructed crowd wisdom knowledge graph G = (G C , G D , G E ). The model target output is the corresponding dialogue response Y = {y1, y2, …, y m}. Extract three knowledge sub-graph sequences from the crowd wisdom knowledge graph according to the input dialogue context For the knowledge extracted from the common sense and description graph, regard it as a text sequence and use the Transformer model for encoding as follows:

[0065] z i = Transformer(k i )

[0066] For the knowledge extracted from the expression graph, we use the static graph attention mechanism to fuse the structural information of the edges and nodes between multiple knowledge triples as follows:

[0067]

[0068]

[0069]

[0070] where h n , r n , t nrespectively represent the head entity, relation, and tail entity in the knowledge triple; n e represents the number of knowledge triples in the expression map; W r , W h , W t are three weightable matrices, randomly initialized during the training process, used to model the semantic associations between the head entity, relation, and tail entity; finally, the static graph attention mechanism is used to fuse all knowledge vectors to obtain the semantic representation of the finally extracted knowledge vector as follows:

[0071]

[0072]

[0073] where W z are two trainable weight matrices, randomly initialized during the training process, used to map the semantic representation of the knowledge vector to a unified dimension; concatenate with the corresponding input word vector ω(x t ) to obtain the knowledge-enhanced dialogue context vector representation Take the dialogue context vector representation sequence as the input of the encoder GRU to obtain the encoded hidden state sequence H = {h1, h2, …, h n}}, as follows:

[0074] h t = GUR(h t-1 , e(x t ))

[0075] Step 4: Construct a gated fusion dynamic knowledge dependency decoder; the decoder uses the gating mechanism and dynamic knowledge dependency mechanism to dynamically adjust the attention weights and utilization degrees of different types of knowledge during the decoding process; the decoder GRU fuses the decoding hidden state vector s t from the previous decoding moment, the dialogue context attention vector the gated knowledge vector the expression knowledge vector and the vector representation e(y t ) of the word generated by the previous decoding moment to perform the word prediction generation process, as follows:

[0076]

[0077] where the dialogue context attention vector is obtained by calculating the attention between the decoding hidden state vector s t from the previous decoding moment and the encoded hidden state sequence H at each decoding moment, as follows:

[0078]

[0079] q t = softmax(α t )

[0080]

[0081] where W h and W s are two trainable weight matrices, randomly initialized during the training process, used to map h i and s t to a unified dimension, b q represents the bias matrix, and n represents the length of the input sentence in the encoding stage;

[0082] The expression knowledge controls the syntactic structure of the generated sentence from a global syntactic perspective during the decoding process; According to the decoding hidden state s t dynamically updates the expression knowledge vector to achieve dynamic adjustment of syntactic expression knowledge as follows:

[0083]

[0084]

[0085]

[0086] where W e and are two trainable weight matrices, randomly initialized during the training process, used to and s t map to a unified dimension, b e represents the bias matrix, and n1 represents the number of expressible knowledge that can be fused;

[0087] The common sense knowledge vector and the descriptive knowledge vector are obtained according to the same calculation method, and the gating mechanism is used to determine the degree of semantic expression in common sense and descriptive knowledge to obtain the gated knowledge vector as follows:

[0088]

[0089]

[0090] where v g represents the weight matrix, b g represents the bias matrix, which is randomly initialized during the training process; σ represents the sigmoid activation function;

[0091] Step 5: Construct a knowledge-aware copy module. The generation process of the final response is achieved by showing the copied input and the words in the knowledge source. At each decoding time step \(t\), the predicted word distribution is:

[0092]

[0093] where \(W\) v denotes the weight matrix, \(b\) v denotes the bias matrix, which is randomly initialized during the training process;

[0094] To avoid out-of-vocabulary words, a pointer mechanism is used to explicitly copy words from the knowledge source and the input sequence. The knowledge pointers for copying from the input, commonsense knowledge graph, crowd wisdom description graph, and crowd wisdom expression graph are defined as \(p\) Q , \(p\) C , \(p\) D , \(p\) E , and their calculation methods are as follows:

[0095]

[0096]

[0097]

[0098]

[0099] where both denote trainable weight matrices, and \(b\) x (\(x\in(q, c, d, e)\)) both denote bias matrices, which are randomly initialized during the training process; \(\sigma\) represents the sigmoid activation function;

[0100] The probability distribution of the words generated by the final model is as follows:

[0101]

[0102] where \(W\) p denotes the trainable weight matrix, and \(q\) ti , respectively denote the attention weights obtained by calculating the \(i\)-th item of the dialogue context, commonsense knowledge, description knowledge, and expression knowledge of the decoding hidden state \(s\) t through the softmax function.

[0103] According to this word distribution, a prediction of the generated response word sequence is made to obtain the finally generated response.

[0104] As described above, it is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present invention.

Claims

1. A rich-semantic and diverse dialogue content generation method based on a crowd-sourced knowledge graph, characterized in that The steps are as follows: Step 1: Collect group expression data. Collect the evaluation and opinion content expressed by users on specific things from social media platforms as the knowledge source of the crowd wisdom knowledge graph, providing support for the subsequent construction of the crowd wisdom knowledge graph; Step 2: Construct a three-layer crowd-sourced knowledge graph \(G=(G C ,G D ,G E ), where the domain common sense knowledge graph contains common sense knowledge information within a specific domain, where is a knowledge triple \((h, r, t)\) that expresses the relationship between the head entity and the tail entity; the crowd-sourced description knowledge graph is descriptive knowledge information about things, reflecting the subjective perception and emotional attitude towards things, where is a knowledge triple, and \(G D contains two relationships, group topic and group consensus; the group topic reflects the aspects and attributes that people are most concerned about when discussing the same thing, reflecting the inherent attributes of the thing, and the group consensus reflects the content that is recognized and expressed by most users when discussing the same thing; use the topic extraction method that combines phrases and the TextRank algorithm with topic bias to mine group topics and group consensus; the crowd-sourced expression knowledge graph is knowledge at the natural language expression structure level, reflecting the context association and syntactic dependency relationship of language, is a knowledge triple, and use a syntax graph to construct \(G E , and obtain the syntactic part-of-speech and syntactic dependency relationship between words by performing syntax graph analysis on the user's expression content; Step 3: Construct a hierarchical semantic enhancement encoding module for the gated fusion dynamic knowledge dependence model; First, define the input dialogue context sequence X = {x1, x2, …, x n}, and the crowdsourced knowledge graph G = (G C , G D , G E ) that has been constructed. The model's target output is the corresponding dialogue response Y = {y1, y2, …, y m}; Extract three knowledge subgraph sequences from the crowdsourced knowledge graph according to the input dialogue context Regarding the knowledge extracted from the common sense and description graph as text sequences, use the Transformer model for encoding as follows: z i = Transformer(k i ) For the knowledge extracted from the expression graph, use the static graph attention mechanism to fuse the structural information of the edges and nodes between multiple knowledge triples as follows: where h n , r n , t n represent the head entity, relation, and tail entity in the knowledge triple respectively; n e represents the number of knowledge triples in the expression map; W r , W h , W t are three weight matrices, randomly initialized during the training process, used to model the semantic associations between the head entity, relation, and tail entity; finally, all knowledge vectors are fused using the static graph attention mechanism to obtain the semantic representation of the finally extracted knowledge vectors as follows: Among them W z are two trainable weight matrices, randomly initialized during the training process, used to map the semantic representation of the knowledge vector to a unified dimension; concatenating with the corresponding input word vector ω(x t ) to obtain a knowledge-enhanced dialogue context vector representation Taking the dialogue context vector representation sequence as the input of the encoder GRU, an encoded hidden state sequence H = {h1, h2, …, h n} is obtained as follows: h t = GRU(h t-1 , e(x t )) Step 4: Construct a gated fusion dynamic knowledge dependency decoder; During the decoding process, the decoder dynamically adjusts the attention weights and utilization degrees of different types of knowledge by using the gating mechanism and the dynamic knowledge dependency mechanism; The decoder GRU fuses the decoded hidden state vector s at the previous decoding moment at each decoding moment t , the dialogue context attention vector , the gated knowledge vector , the expressive knowledge vector and the vector representation e(y of the word generated by decoding at the previous moment t ), and performs the word prediction generation process as follows: Among them, the dialogue context attention vector is obtained by calculating the attention between the decoding hidden state vector s t at the previous decoding moment and the encoded hidden state sequence H at each decoding moment, as follows: q t = softmax(α t ) Where W h and W s are two trainable weight matrices, randomly initialized during the training process, used to map h i and s t to a unified dimension, b q represents the bias matrix, and n represents the length of the input sentence in the encoding stage; The expressive knowledge controls the syntactic structure of the generated sentence from a global syntactic perspective during the decoding process; according to the decoding hidden state s t Dynamically update the expressive knowledge vector Implement dynamic adjustment of syntactic expressive knowledge as follows: Among them, W e and W s e are two trainable weight matrices, randomly initialized during the training process, and are used to map and s t to a unified dimension, b e represents the bias matrix, and n1 represents the number of expressible knowledge that can be fused; Obtain the common sense knowledge vector according to the same calculation method and the descriptive knowledge vector Use the gating mechanism to determine the semantic expression degree in common sense and descriptive knowledge, and obtain the gated knowledge vector As follows: where v g represents the weight matrix, b g represents the bias matrix, which is randomly initialized during the training process; σ represents the sigmoid activation function; Step 5: Knowledge-aware copy module. The generation process of the final reply is realized by explicitly copying the words in the input and the knowledge source. At each decoding moment t, the predicted word distribution is: where W v represents the weight matrix, and b v represents the bias matrix, which is randomly initialized during the training process; To avoid words outside the vocabulary, a pointer mechanism is used to explicitly copy words from the knowledge source and the input sequence; the knowledge pointers for copying from the input, common sense knowledge graph, crowd wisdom description graph, and crowd wisdom expression graph are defined as p Q , p C , p D , p E , and the calculation method is as follows: wherein both represent trainable weight matrices, and b x (x ∈ (q, c, d, e)) both represent bias matrices, which are randomly initialized during the training process; σ represents the sigmoid activation function; The probability distribution of the words generated by the final model is as follows: Where W p represents a trainable weight matrix, q ti , respectively represent the attention weights obtained by calculating the i-th item of the dialogue context, common sense knowledge, descriptive knowledge, and expressive knowledge through the softmax function for the decoded hidden state s t .

2. A computer system, characterized in that Including: One or more processors, a computer-readable storage medium for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in claim 1.

3. A computer-readable storage medium, characterized in that Stored with computer-executable instructions, the instructions are used to implement the method described in claim 1 when executed.

Citation Information

Patent Citations

  • Dialogue emotion correction method based on graph neural network

    US20220270636A1

  • Intelligent question answering method, apparatus and device, and computer-readable storage medium

    WO2021196920A1