User question rewriting method and system for multi-round questions and answers of large-scale dialogue system
By using HMM and RCM modules in a large-scale dialogue system for part-of-speech detection and assignment calculation, combined with the mounting and sorting of multi-forktree structures, the problems of missing reference relationships and insufficient backgrounds in multiple rounds of question-and-answers are solved, and the reference digestion and question-asking background improvement are achieved throughout the dialogue cycle.
Patent Information
- Application Number
- CN202411769373.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-04
AI Technical Summary
In a large-scale dialogue system, the user's questions in multiple rounds of question-and-answer questions refer to the lack of relationships and insufficient background, which leads to the search system being unable to retrieve knowledge blocks with high correlation, affecting the model's answering ability.
By obtaining the historical questions and current questions entered by the user, the HMM and RCM modules are used to detect and assign part-of-speech and calculate the value to determine whether the question has a subject. The questions with subject are mounted on the child nodes of the multi-fork tree, and the questions without subject are mounted on the grandchild nodes, and they are sorted to form a question list with subject and background.
Referential digestion and discovery within the entire dialogue cycle is realized, which alleviates the question of weak background questions, and improves the model's answering ability and the overall performance of the dialogue system.
Smart Images

Figure CN119719282A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a method and system for rewriting user questions for multi-round question and answering in a large-scale dialogue system. Background Art
[0002] In actual use, each question asked by the user may be related to the previous question or the previous k questions. Therefore, in a certain question, the user's question may lack the necessary background, or there may be reference relationships between the subjects in the question. As a result, the retrieval system cannot retrieve highly relevant knowledge blocks during retrieval, and the model cannot obtain knowledge that is highly relevant to the question, resulting in poor answering ability of the model. Therefore, how to resolve references and enhance background induction becomes a problem.
[0003] Traditional coreference resolution technology tends to be rule-based or based on recognition models of coreference recognition and coreference resolution. It can achieve certain performance in some traditional non-conversational datasets. However, in the context of multi-round conversations, as the number of user conversations increases, coreference duplication becomes more and more serious. Therefore, this technology has become difficult to be used in modern LLM-based conversation systems. Summary of the invention
[0004] The present invention provides a user question rewriting method and system for multi-round question and answering in a large-scale dialogue system, so as to solve the problem that reference resolution and discovery cannot be achieved within the entire dialogue cycle and the problem of weak background in questioning cannot be alleviated.
[0005] A first aspect of the present invention provides a method for rewriting user questions for multi-round question and answering in a large-scale dialogue system, comprising the following steps:
[0006] Obtaining user input, wherein the user input includes historical questions and current questions;
[0007] Inputting the current question into a judgment model to obtain a question with a subject or a question without a subject;
[0008] Mounting the question with a subject on a child node of a multi-branch tree, mounting the question without a subject on a grandchild node of the multi-branch tree, and mounting the historical question on a child node or a grandchild node of the multi-branch tree to obtain a mounted multi-branch tree;
[0009] The mounted multi-branch tree includes a root node, a plurality of child nodes and a plurality of grandchild nodes; the plurality of child nodes belong to the root node, and the plurality of child nodes are questions of different topics; the plurality of grandchild nodes belong to one or more child nodes, and the plurality of grandchild nodes are questions of different topics;
[0010] The grandchild nodes in each of the child nodes are sorted to obtain relevant non-topic question clusters to form multiple question lists with subjects and backgrounds.
[0011] In some embodiments of the first aspect, in the step of inputting the current question into the judgment model to obtain a question with a subject or a question without a subject, specifically:
[0012] The judgment model includes an HMM module and an RCM module;
[0013] Using the trained HMM module to perform part-of-speech detection on the current question to obtain an output part-of-speech tag sequence;
[0014] Using the RCM module to perform value calculation on the output part-of-speech tag sequence to obtain the sequence score, mean and standard deviation corresponding to the sentence;
[0015] Based on the sequence score, the mean and the standard deviation, it is determined whether the user input is the question with a subject or the question without a subject.
[0016] In some embodiments of the first aspect, the model expression of the HMM module is specifically:
[0017] λ=(A,B,Π)
[0018] A=[a ij ] N*N , a ij =P(i t+1 =q j |i t =q i )
[0019] B=[b j (k)] N*M , b j (k) = P(o t =v k |i t =q j )
[0020] Π=[π(i)] N ,π(i)=P(i1=q i )
[0021] In the above formula, λ is a triple, Π is the hidden state probability distribution, and for the hidden state set Q, Q = {q1, q2, ..., q N}, there is an observation set V = {v1,v2,...,v M}, N is the number of possible states, M is the possible observations, I is a set of state sequences, I = {i1, i2, ..., i r}, O is a set of observation sequences with O = {o1, o2, ..., o r}, A is the state transfer matrix of the Markov chain, a ij Identify the state q at time t i Transfer to state q at time t+1 j The probability of the observed state is , B is the probability matrix generated by the observed state, b j (k) is the momentary observation state v k In the hidden state q j π(i) is the probability set of sequence I being in a certain state at a certain time t.
[0022] In some embodiments of the first aspect, the RCM module includes a score function, a mean function, and a standard deviation function;
[0023] The expression of the score function is specifically:
[0024]
[0025] In the above formula, RCM(T) is the sequence score corresponding to the sentence, Word(t i ) is the output part-of-speech tag assignment, t i is the part-of-speech tag for the i-th word in sentence t, long is the length of the sequence, r is the pronoun, and T is the output part-of-speech tag sequence;
[0026]
[0027] In the above formula, n is a common noun, nz is other proper nouns, PER is a person's name, LOC is a place name, ORG is an organization name, u is an auxiliary word, q is a quantifier, ad is an adverb, v is a common verb, f is a directional noun, vd is a verb adverb, an is a noun adverb, xc is other function words, w is a punctuation mark, p is a preposition, d is an adverb, vn is a noun verb, nw is a work name, and TIME is time;
[0028] The expression of the mean function is specifically:
[0029]
[0030] In the above formula, μ is the mean, Num is the number of items in the question sequence, RCM(T i ) is the score for the i-th question;
[0031] The expression of the standard deviation function is specifically:
[0032]
[0033] In the above formula, μ is the mean, σ is the standard value, Num is the number of items in the question sequence, RCM(Ti ) is the score for the i-th question.
[0034] In some embodiments of the first aspect, in the step of determining whether the user input is the question with a subject or the question without a subject based on the sequence score, the mean, and the standard deviation, the following steps are specifically performed:
[0035] When the sequence score is less than the difference between the mean and the standard deviation, determining that the current question is the question without a subject;
[0036] When the sequence score is greater than the difference between the mean and the standard deviation, the current question is determined to be the question with a subject.
[0037] In some embodiments of the first aspect, the question without a subject is mounted on a grandchild node of the multi-branch tree. Specifically, the step includes:
[0038] Based on the ranking function, the similarity between questions without subjects and questions with different topics is calculated;
[0039] The question without a subject is mounted at a grandchild node under the child node where the topic question with the highest similarity is located.
[0040] In some embodiments of the first aspect, the expression of the ranking function is specifically:
[0041] DGT(L,u)=BM25(L,u)*ln(d i )
[0042]
[0043] In the above formula, DGT(L,u) is, L is the set of topic questions, u is the question without topic, d i For each topic question l in the topic question set L i The relative distance, F num is the total number of documents, Seq Len is the number of terms in the query, f(q i , D) is q i The number of occurrences TF in document D, q i is the i-th term in the query, len(D) is the length of document D, avg len is the average length of all documents, k is the first hyperparameter, and b is the second hyperparameter.
[0044] In some embodiments of the first aspect, in the step of sorting the grandchild nodes in each of the child nodes to obtain relevant non-topic question clusters to form multiple question lists with subjects and backgrounds, the following steps are specifically performed:
[0045] Use the information entropy function to determine the minimum information entropy change of each grandchild node under the child node;
[0046] Based on the minimum information entropy change, the order of the grandchild nodes is determined to obtain relevant non-topic question clusters to form multiple question lists with subjects and backgrounds.
[0047] In some embodiments of the first aspect, the expression of the information entropy function is specifically:
[0048] min(△H(u))
[0049]
[0050] In the above formula, H(u) is the information entropy within a cluster, p(x i ) is the probability that u is xi, x i For the i-th input
[0051] A second aspect of the present invention provides a user question rewriting system for multi-round question and answering in a large-scale dialogue system, comprising:
[0052] An acquisition module, used to acquire user input, wherein the user input includes historical questions and current questions;
[0053] A judgment module, used for inputting the current question into a judgment model to obtain a question with a subject or a question without a subject;
[0054] A mounting module, used for mounting the question with a subject on a child node of a multi-branch tree, mounting the question without a subject on a grandchild node of the multi-branch tree, and mounting the historical question on a child node or a grandchild node of the multi-branch tree, to obtain a mounted multi-branch tree;
[0055] A multi-branch tree module, the multi-branch tree module includes a root node, a plurality of child nodes and a plurality of grandchild nodes; the plurality of child nodes belong to the root node, and the plurality of child nodes respectively ask different topic questions; the plurality of grandchild nodes belong to one or more child nodes, and the plurality of grandchild nodes respectively ask different non-topic questions;
[0056] The sorting module is used to sort the grandchild nodes in each of the child nodes to obtain relevant non-topic question clusters to form multiple question lists with subjects and backgrounds.
[0057] It can be seen from the above technical solutions that the present invention has at least the following advantages:
[0058] The embodiment of the present invention provides a user question rewriting method and system for multi-round question and answer in a large-scale dialogue system. On the one hand, since the questions with subjects and the questions without subjects are mounted on the multi-branch tree, the mounted multi-branch tree includes a root node, multiple child nodes and multiple grandchild nodes; multiple child nodes belong to the root node, and the multiple child nodes are different topic questions; multiple grandchild nodes belong to one or more child nodes, and the multiple grandchild nodes are different non-topic questions, so that a multi-branch tree of session records of a global session is maintained in the DGT session, which can achieve reference resolution and discovery within the entire dialogue cycle compared with traditional context technology;
[0059] On the other hand, since the historical questions are mounted on the child nodes or grandchild nodes of the multi-branch tree, combined with sorting the grandchild nodes in each child node, a cluster of related non-topic questions is obtained, forming multiple question lists with subjects and backgrounds, realizing global session specifications for continuous questions or multi-hop questions, realizing topic management of the entire session life cycle, and alleviating the problem of weak background in questions.
[0060] In summary, this solution effectively solves the problem of being unable to achieve reference resolution and discovery within the entire dialogue cycle and unable to alleviate the problem of weak context of questions. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0062] Figure 1 A schematic diagram of the overall steps of a method for rewriting user questions for multi-round question-answering in a large-scale dialogue system provided by an embodiment of the present invention;
[0063] Figure 2 A schematic diagram of the overall process of a method for rewriting user questions for multi-round question-answering in a large-scale dialogue system provided by an embodiment of the present invention;
[0064] Figure 3 A schematic diagram of part-of-speech detection on user input by an HMM model for multi-round question-answering in a large-scale dialogue system provided by an embodiment of the present invention;
[0065] Figure 4 A mounted multi-branch tree for multi-round question and answer in a large-scale dialogue system is provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0066] The embodiments of the present invention provide a method and system for rewriting user questions for multi-round question and answering in a large-scale dialogue system. The method and system are for multi-round question and answering in a large-scale dialogue system, which may have cross-domain topics and references. Compared with the existing technology, the method and system can effectively cope with open-world question and answering.
[0067] On the one hand, the DGT algorithm highlighted in this patent can break through the focus boundary of the context and expand the potential resolution of reference resolution to the entire conversation session, which can avoid the inability to retrieve two questions with a larger span after the user has conducted too many rounds of questions and answers; on the other hand, through the DGT and FQC algorithms, while organizing the user's conversation topic, the user's questions can be organized in a chain, avoiding the problem of erroneous inheritance caused by multiple inaccurate answers when using the context, simplifying multiple rounds of questions and answers into a single question retrieval and discovery, and effectively solving the problem of being unable to achieve reference resolution and discovery and unable to alleviate the weak background of questions within the entire dialogue cycle.
[0068] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0069] See also Figure 1 and Figure 2 The present invention provides a user question rewriting method for multi-round question and answering in a large-scale dialogue system, comprising the following steps:
[0070] S1, obtaining user input, which includes historical questions and current questions.
[0071] S2, input the current question into the judgment model to obtain a question with a subject or a question without a subject, that is, first perform reference detection on the current user's question, divide the user's question into main questions and subordinate questions, cache and record them internally, and obtain multiple tags of the user's question.
[0072] Preferably, the judgment model includes an HMM module and an RCM module, and step S2 is specifically as follows:
[0073] S21, using the trained HMM module to perform part-of-speech detection on the current question to obtain an output part-of-speech tagging sequence.
[0074] In this embodiment, when the user's sentence lacks a subject and has a pronoun, and the output sequence contains a word with a part of speech of r, the sentence is marked as a topic sub-question query (Qc ), if there is no word of secondary r and there is a user question with a subject, mark the sentence as a new topic question query(Q t ).
[0075] In this embodiment, the model expression of the HMM module is specifically:
[0076] λ=(A,B,Π)
[0077] A=[a ij ]N *N , a ij =P(i t+1 =q j |i t =q i )
[0078] B=[b j (k)] N*M , b j (k) = P(o t =v k |i t =q j )
[0079] Π=[π(i)] N ,π(i)=P(i1=q i )
[0080] In the above formula, λ is a triple, Π is the hidden state probability distribution, and for the hidden state set Q, Q = {q1, q2, ..., q N}, there is an observation set V = {v1,v2,...,v M}, N is the number of possible states, M is the possible observations, I is a set of state sequences, I = {i1, i2, ..., i r}, O is a set of observation sequences with O = {o1, o2, ..., o r}, A is the state transfer matrix of the Markov chain, a ij Identify the state q at time t i Transfer to state q at time t+1 j The probability of the observed state is , B is the probability matrix generated by the observed state, b j (k) is the momentary observation state v k In the hidden state q j π(i) is the probability set of sequence I being in a certain state at a certain time t.
[0081] Specifically, Figure 3 As shown, the establishment of the HMM module includes the following steps:
[0082] First, assume that Q is the set of all possible hidden states (that is, the set of parts of speech, with M possibilities, that is, the number of possible hidden states), V is the set of all possible observed states (that is, the set of user inputs, with N data, that is, the number of all possible observed states), Q = {q1, q2, ..., q M}, V = {v1, v2, ..., v N}, for a sequence of length T, I corresponds to the state sequence, O is the corresponding observation sequence, that is, I = {i1, i2, ..., i T}, O = {o1, o2, ..., o T}, any hidden state i t ∈Q, any observation state o t ∈V.
[0083] Next we calculate the hidden state of the sequence index t is i t =q t , the hidden state at t+1 is i t+1 =q j , define the state transition probability a of HMM from t to t+1 ij For: a ij =P(i t+1 =q j |i t =q i ), by a ij The state transition matrix A that constitutes the Markov chain is [a ij ] N*N
[0084] For the hidden state i at time t t =q j , corresponding to the observed state o t =v k , then the observation state v at this moment k In the hidden state q j The probability of generation is b j (k), satisfying b j (k) = P(o t =v k |i t =q j ), for b j (k) can form the probability matrix B = [b j (k)] N*M
[0085] The hidden state probability distribution when t=1 is Π=[π(i)] N , where π(i)=P(i1=q i )
[0086] Therefore, the HMM module can be determined by the hidden state distribution Π, the state transition probability matrix A, and the observed state probability matrix B. The HMM is described by the triple λ=(A,B,Π).
[0087] S22, using the RCM module to perform assignment calculation on the output part-of-speech tag sequence to obtain the sequence score, mean and standard deviation corresponding to the sentence;
[0088] The RCM module includes score function, mean function and standard deviation function;
[0089] In this embodiment, the expression of the score function is specifically:
[0090]
[0091] In the above formula, RCM(T) is the sequence score corresponding to the sentence, Word(t i ) is the output part-of-speech tag assignment, t i is the part-of-speech tag for the i-th word in sentence t, long is the length of the sequence, r is the pronoun, and T is the output part-of-speech tag sequence;
[0092]
[0093] In the above formula, n is a common noun, nz is other proper nouns, PER is a person's name, LOC is a place name, ORG is an organization name, u is an auxiliary word, q is a quantifier, ad is an adverb, v is a common verb, f is a directional noun, vd is a verb adverb, an is a noun adverb, xc is other function words, w is a punctuation mark, p is a preposition, d is an adverb, vn is a noun verb, nw is a work name, and TIME is time, which is the meaning of the labels in the LAC table;
[0094] In this embodiment, the expression of the mean function is specifically:
[0095]
[0096] In the above formula, μ is the mean, Num is the number of items in the question sequence, RCM(T i ) is the score for the i-th question;
[0097] In this embodiment, the expression of the standard deviation function is specifically:
[0098]
[0099] In the above formula, μ is the mean, σ is the standard value, Num is the number of items in the question sequence, RCM(T i ) is the score for the i-th question.
[0100] S23, based on the sequence score, mean and standard deviation, determine whether the user input is a question with a subject or a question without a subject, that is, obtain the score of the sentence corresponding to the sequence through RCM(T), and maintain the following based on the principle of normal distribution through μ and σ calculated above: Figure 4 The session principal tree is shown.
[0101] Preferably, step S23 is specifically:
[0102] When the sequence score is less than the difference between the mean and the standard deviation, the current question is judged to be a question without a subject. That is, when RCM(T)<μ-σ, the input will be judged as a question without a subject, and therefore will be mounted on a grandchild node (a leaf node of the tree).
[0103] When the sequence score is greater than the difference between the mean and the standard deviation, the current question is judged to be a question with a subject, that is, when RCM(T)≥μ-σ, the input is judged to be a question with a subject, and therefore will be mounted on a child node (the second-level node of the tree).
[0104] S3, mounts questions with subjects, questions without subjects and historical questions on a multi-branch tree.
[0105] In this embodiment, step S3 is specifically as follows:
[0106] S31, mount the question with the subject on the child node of the multi-branch tree;
[0107] S32, mount the question without a subject on the grandchild node of the multi-branch tree;
[0108] Preferably, step S32 is specifically:
[0109] S321, based on the ranking function, calculating the similarity between the question without a subject and the questions with different topics;
[0110] The expression of the sorting function is as follows:
[0111] DGT(L,u)=BM25(L,u)*ln(d i )
[0112]
[0113] In the above formula, DGT(L,u) is, L is the set of topic questions, u is the question without topic, d i For each topic question l in the topic question set L i The relative distance, F num is the total number of documents, Seq Len is the number of terms in the query, f(q i ,D) is q iThe number of occurrences TF in document D, q i is the i-th term in the query, len(D) is the length of document D, avg len is the average length of all documents, k is the first hyperparameter, and b is the second hyperparameter.
[0114] S322, the question without a subject is mounted at the grandchild node under the child node where the topic question with the highest similarity is located.
[0115] S33, mount the historical questions on the child nodes or grandchild nodes of the multi-branch tree to obtain the mounted multi-branch tree. For the user's historical question list Q = {q1, q2, ..., q M}, they will be divided into topic questions combined with topic questions l under L i ,In the case of continuous questioning, it is necessary to link the questions to each other ,to ensure that the current question has sufficient background knowledge and retrieval recall conditions.
[0116] Among them, Figure 4 As shown, the mounted multi-branch tree includes a root node, multiple child nodes and multiple grandchild nodes; the multiple child nodes belong to the root node, and the multiple child nodes are questions of different topics; the multiple grandchild nodes belong to one or more child nodes, and the multiple grandchild nodes are different untopic questions.
[0117] To summarize steps S2 and S3, a global session conversation record tree is maintained through the DGT conversation subject tree. Compared with traditional context technology, it can achieve reference resolution and discovery within the entire conversation cycle; and the use of the DGT algorithm can break through the focus boundary of the context and expand the potential resolution of reference resolution to the entire conversation session, which can avoid the inability to retrieve two questions with a larger span after the user has conducted too many rounds of questions and answers.
[0118] S4, sort the grandchild nodes in each child node to obtain the relevant non-topic question clusters to form multiple question lists with subjects and backgrounds. i When the number of untopic questions u under is greater than 1, they need to be sorted. Generally, user questions have a high contextual relationship, so in fact we will sort l i Under the non-topic question u, the minimum range is determined by information entropy. For u, there is information entropy For the continuous question cluster u, there needs to be a minimum information entropy change min(ΔH(u)). By obtaining the minimum continuous change of information entropy, the related non-topic question cluster u is obtained.
[0119] Preferably, step S4 is specifically:
[0120] S41, using the information entropy function to determine the minimum information entropy change of each grandchild node under the child node;
[0121] The specific expression of the information entropy function is:
[0122] min(ΔH(u))
[0123]
[0124] In the above formula, H(u) is the information entropy within a cluster, p(x i ) is the probability that u is xi, x i is the ith input.
[0125] S42, based on the minimum information entropy change, determine the order of the grandchild nodes, obtain the relevant non-topic question clusters, and form multiple question lists with subjects and backgrounds.
[0126] Compared with the traditional bag-of-words or large model summary generation method, it only needs to use the DGT+FQC algorithm to implement the global session protocol for continuous questioning or multi-hop questioning, realize the topic management of the entire session life cycle, and alleviate the problem of weak background of questions. Through the DGT and FQC algorithms, it is possible to organize the user's conversation topic while organizing the user's questions in a chain, avoiding the problem of erroneous inheritance caused by multiple inaccurate answers without using the context, and simplifying multiple rounds of questions and answers into a single question retrieval discovery.
[0127] S5, based on all relevant multiple question lists with subjects and backgrounds, use the retrieval system to obtain LLM summary responses to user questions.
[0128] Based on the above embodiments, the present invention also provides a user question rewriting system for multi-round question and answer in a large-scale dialogue system, including:
[0129] The acquisition module is used to obtain user input, which includes historical questions and current questions;
[0130] A judgment module, used for inputting the current question into the judgment model to obtain a question with a subject or a question without a subject;
[0131] A mounting module is used to mount questions with subjects on child nodes of the multi-branch tree, mount questions without subjects on grandchild nodes of the multi-branch tree, and mount historical questions on child nodes or grandchild nodes of the multi-branch tree to obtain a mounted multi-branch tree;
[0132] A multi-branch tree module includes a root node, multiple child nodes, and multiple grandchild nodes; multiple child nodes belong to the root node, and the multiple child nodes are respectively different topic questions; multiple grandchild nodes belong to one or more child nodes, and the multiple grandchild nodes are respectively different non-topic questions;
[0133] The sorting module is used to sort the grandchild nodes in each child node to obtain relevant non-topic question clusters to form multiple question lists with subjects and backgrounds.
[0134] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
[0135] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0136] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
Claims
1. A user question rewriting method for multi-round question answering in a large-scale dialogue system, characterized by: The following steps are involved: Obtaining user input, wherein the user input includes historical questions and current questions; Inputting the current question into a judgment model to obtain a question with a subject or a question without a subject; Mounting the question with a subject on a child node of a multi-branch tree, mounting the question without a subject on a grandchild node of the multi-branch tree, and mounting the historical question on a child node or a grandchild node of the multi-branch tree to obtain a mounted multi-branch tree; The mounted multi-branch tree includes a root node, a plurality of child nodes and a plurality of grandchild nodes; the plurality of child nodes belong to the root node, and the plurality of child nodes are questions of different topics; the plurality of grandchild nodes belong to one or more child nodes, and the plurality of grandchild nodes are questions of different topics; The grandchild nodes in each of the child nodes are sorted to obtain relevant non-topic question clusters to form multiple question lists with subjects and backgrounds.
2. The user question rewriting method according to claim 1, characterized in that: In the step of inputting the current question into the judgment model to obtain a question with a subject or a question without a subject, the specific steps are as follows: The judgment model includes an HMM module and an RCM module; Using the trained HMM module to perform part-of-speech detection on the current question to obtain an output part-of-speech tag sequence; Using the RCM module to perform value calculation on the output part-of-speech tag sequence to obtain the sequence score, mean and standard deviation corresponding to the sentence; Based on the sequence score, the mean and the standard deviation, it is determined whether the user input is the question with a subject or the question without a subject.
3. The user question rewriting method according to claim 2, characterized in that: The model expression of the HMM module is specifically: λ=(A,B,Π) A=[a ij ] N*N ,a ij =P(i t+1 =q j |i t =q i ) B=[b j (k)] N*M ,b j ( k ) =P(o t =v k |i t =q j ) Π=[π(i)] N ,π(i)=P(i1=q i ) In the above formula, λ is a triple, Π is the hidden state probability distribution, and for the hidden state set Q, Q = {q1,q2,...,q N }, there is an observation set V = {v1,v2,…,v M }, N is the number of possible states, M is the possible observations, I is a set of state sequences, I={i1,i2,…,i r }, O is a set of observation sequences with O = {o1,o2,...,o r }, A is the state transfer matrix of the Markov chain, a ij Identify the state q at time t i Transfer to state q at time t+1 j The probability of the observed state is , B is the probability matrix generated by the observed state, b j (k) is the observation state v at the moment k In the hidden state q j π(i) is the probability set of sequence I being in a certain state at a certain time t.
4. The user question rewriting method according to claim 2, characterized in that: The RCM module includes a score function, a mean function and a standard deviation function; The expression of the score function is specifically: In the above formula, RCM ( T ) is the sequence score corresponding to the sentence, Word(t i ) is the output part-of-speech tag assignment, t i is the part-of-speech tag for the i-th word in sentence t, long is the length of the sequence, r is a pronoun, T is the output part-of-speech tag sequence, n is a common noun, nz is other proper nouns, PER is a person's name, LOC is a place name, ORG is an organization name, u is an auxiliary word, q is a quantifier, ad is an adverb, v is a common verb, f is a locative noun, vd is a verb adverb, an is a noun adverb, xc is other function words, w is a punctuation mark, p is a preposition, d is an adverb, vn is a noun verb, nw is a work name, and TIME is time; The expression of the mean function is specifically: In the above formula, μ is the mean, Num is the number of items in the question sequence, RCM(T i ) is the score of the ith question; The expression of the standard deviation function is specifically: In the above formula, μ is the mean, σ is the standard value, Num is the number of items in the question sequence, RCM(T i ) is the score for the i-th question.
5. The user question rewriting method according to claim 2, characterized in that: In the step of determining whether the user input is the question with a subject or the question without a subject based on the sequence score, the mean value and the standard deviation, specifically: When the sequence score is less than the difference between the mean and the standard deviation, determining that the current question is the question without a subject; When the sequence score is greater than the difference between the mean and the standard deviation, the current question is determined to be the question with a subject.
6. The user question rewriting method according to claim 1, characterized in that: The question without a subject is mounted on the grandchild node of the multi-branch tree. In this step, specifically: Based on the ranking function, the similarity between questions without subjects and questions with different topics is calculated; The question without a subject is mounted at a grandchild node under the child node where the topic question with the highest similarity is located.
7. The user question rewriting method according to claim 6, characterized in that: The expression of the sorting function is specifically: DGT(L,u)=BM25(L,u)*ln(d i ) In the above formula, DGT(L,u) is, L is the set of topic questions, u is the question without topic, d i For each topic question l in the topic question set L i The relative distance, F num is the total number of documents, Seq Len is the number of terms in the query, f(q i ,D) is q i The number of occurrences TF in document D, q i is the i-th term in the query, len(D) is the length of document D, avg len is the average length of all documents, k is the first hyperparameter, and b is the second hyperparameter.
8. The user question rewriting method according to claim 1, characterized in that: The grandchild nodes in each of the child nodes are sorted to obtain relevant non-topic question clusters to form multiple question lists with subjects and backgrounds. Specifically, in this step: Use the information entropy function to determine the minimum information entropy change of each grandchild node under the child node; Based on the minimum information entropy change, the order of the grandchild nodes is determined to obtain relevant non-topic question clusters to form multiple question lists with subjects and backgrounds.
9. The user question rewriting method according to claim 8, characterized in that: The expression of the information entropy function is specifically: min(ΔH ( u ) ) In the above formula, H ( u ) is the information entropy within a cluster, p ( x i) is the probability that u is xi, x i is the ith input.
10. A user question rewriting system for multi-round question answering in large-scale dialogue systems, characterized by: include: An acquisition module, used to acquire user input, wherein the user input includes historical questions and current questions; A judgment module, used for inputting the current question into a judgment model to obtain a question with a subject or a question without a subject; A mounting module, used for mounting the question with a subject on a child node of a multi-branch tree, mounting the question without a subject on a grandchild node of the multi-branch tree, and mounting the historical question on a child node or a grandchild node of the multi-branch tree, to obtain a mounted multi-branch tree; A multi-branch tree module, the multi-branch tree module comprising a root node, a plurality of the child nodes and a plurality of the grandchild nodes; A plurality of said child nodes belong to said root node, and said plurality of said child nodes are respectively questions of different topics; a plurality of said grandchild nodes belong to one or more said child nodes, and said plurality of said grandchild nodes are respectively questions of different topics; The sorting module is used to sort the grandchild nodes in each of the child nodes to obtain relevant non-topic question clusters to form multiple question lists with subjects and backgrounds.
Citation Information
Patent Citations
Dialogue question rewriting method and device, computer equipment and storage medium
CN115757731A
Discourse parsing
US20210342548A1