An intelligent assistant method and system for judges' responses in court debates

By introducing knowledge memory units and attention mechanisms into the dialogue reply generation system, combining the dialogue historical content and dispute focus annotation, the problem that the existing system failed to effectively consider the dispute focus in court debates was solved, and more targeted judge response generation was achieved, and the efficiency and fairness of court trials were improved.

CN115034231BActive Publication Date: 2025-06-17ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210619116.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-01
Publication Date
2025-06-17
Estimated Expiration
2042-06-01

AI Technical Summary

Technical Problem

The existing dialogue replies generation system failed to effectively consider the focus of the dispute in the trial debate, resulting in the content of the judge's reply being inconsistent enough.

Method used

A method of intelligent auxiliary judge reply generation for court debate is adopted. By obtaining the historical content of the dialogue and the annotation information of the dispute focus, the encoder obtains semantic representation, constructing a knowledge memory unit to store the dispute focus information, and generating the judge reply content through a decoder based on the attention mechanism.

Benefits of technology

This method can effectively consider the dispute focus in the trial, generate more targeted judge responses, and improve the efficiency and fairness of the trial.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115034231B_ABST
    Figure CN115034231B_ABST
Patent Text Reader

Abstract

The present invention discloses an intelligent auxiliary judge reply generation method and system for court debates, belonging to the field of legal artificial intelligence. Given the dialogue history content and the focus of controversy, as well as the annotation of the type of focus of controversy corresponding to each focus of controversy, an encoder is used to obtain the semantic representation of the dialogue history content; a knowledge memory unit is constructed, and a plurality of trainable embedding matrices are used to generate memory content based on the type of focus of controversy, and the memory content is stored in the memory unit slots of the knowledge memory unit; a decoder based on the attention mechanism is used for decoding, and in each step of the decoding process, a context vector, a memory unit readout vector, and the word generated in the previous decoding step are obtained until the decoding ends, and the judge reply content is generated. This model generates the judge's reply based on the given dialogue history content and the focus of controversy in the opposing history.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of legal artificial intelligence, and particularly to an intelligent assistant judge reply generation method for court debate. Background Art

[0002] In recent years, with the continuous disclosure of judicial big data represented by judgment documents and the continuous breakthrough of natural language processing technology, how to apply artificial intelligence in the judicial field to assist judicial workers in improving the efficiency and fairness of case handling has become a hot topic in legal intelligence research. In the court session link of judicial practice, the judge will ask questions related to the case details to the plaintiff and the defendant according to relevant court session regulations and case types, and the plaintiff and the defendant will respectively make statements, defenses, and evidence exchanges based on these questions regarding the case details. Analyzing the dialogue history information using artificial intelligence technology to provide reply content for the judge can improve the trial efficiency of the court and reduce the burden on judicial personnel.

[0003] In court debate, there will be some controversial foci between the plaintiff and the defendant, and the judge's reply often needs to consider these controversial foci. The existing dialogue reply generation systems do not have this function. To achieve this function, the present invention will propose a method for generating a judge's reply based on the court session dialogue history information, which can provide an intelligent assistant function for judicial personnel in court sessions. Summary of the Invention

[0004] The purpose of the present invention is to meet the existing needs. In order to assist judicial personnel in considering the controversial foci of the parties in the debate during the court session for questioning, the present invention provides an intelligent assistant judge reply generation method for court debate.

[0005] The specific technical solution adopted by the present invention is as follows:

[0006] An intelligent assistant judge reply generation method for court debate, comprising:

[0007] Obtain the given dialogue history content and controversial foci, as well as the controversial focus type annotation corresponding to each controversial focus, and use an encoder to obtain the semantic representation of the dialogue history content;

[0008] Construct a knowledge memory unit, generate memory content based on the controversial focus type using a plurality of trainable embedding matrices, and store the memory content in the memory unit slots of the knowledge memory unit;

[0009] Use a decoder based on the attention mechanism for decoding, and obtain the context vector, memory unit readout vector, and the word generated in the previous decoding step in each step of the decoding process until the decoding ends to generate the judge's reply content.

[0010] Further, the encoder, decoder, and knowledge memory unit are trained in an end-to-end manner. During the training process, the dialogue history content, the annotation of the controversial focus type of the dialogue history content, and the judge's reply content are used as training samples. The dialogue history content is used as the input of the encoder, the annotation of the controversial focus type of the dialogue history content is used as the input of the knowledge memory unit, and the judge's reply content is used as the output label of the decoder.

[0011] A court debate intelligent auxiliary judge reply generation system is used to implement the above-mentioned court debate intelligent auxiliary judge reply generation method.

[0012] The beneficial effects of the present invention are as follows:

[0013] The present invention proposes a court debate intelligent auxiliary judge reply generation method, which is different from the existing dialogue reply generation models. The present invention uses a knowledge memory unit to store the controversial foci in the dialogue history and integrates them into the encoder-decoder network. Specifically, the present invention will use a dialogue encoder to encode the court trial dialogue history content. Then, the present invention designs a knowledge memory unit to store the encoded dialogue history content and the controversial focus content therein. Finally, the present invention designs a language decoder, which, during the decoding process, fuses the content in the knowledge memory unit and the dialogue history content and adopts a copy mechanism to generate the corresponding judge's reply content.

[0014] The existing dialogue reply generation methods do not consider the annotation information of the controversial foci in the dialogue debate. The method proposed by the present invention utilizes the annotation information of the controversial foci in the dialogue debate and overcomes the related defects of the existing methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 FIG. is a schematic structural diagram of a knowledge memory unit shown according to an exemplary embodiment;

[0016] Figure 2 FIG. is a schematic diagram of a court debate intelligent auxiliary judge reply generation method shown according to an exemplary embodiment;

[0017] Figure 3 FIG. is a structural diagram of an electronic device terminal for implementing the court debate intelligent auxiliary judge reply generation method shown according to an exemplary embodiment. DETAILED DESCRIPTION

[0018] The present invention will be further described and explained below in conjunction with the accompanying drawings and specific embodiments. The accompanying drawings are only schematic diagrams of the present invention. Some of the block diagrams shown in the drawings are functional entities, which do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor systems and / or microcontroller systems.

[0019] The flowcharts shown in the accompanying drawings are only illustrative and do not necessarily include all steps. For example, some steps can be decomposed, while some steps can be combined or partially combined. Therefore, the actual execution order may change according to the actual situation.

[0020] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by those with ordinary skills in the technical field to which this application belongs. In this application, words such as "a", "one", "a kind of", "the", "these", etc. do not indicate a limitation in quantity, and they can be singular or plural. The terms "including", "comprising", "having" and any variants thereof involved in this application are intended to cover non-exclusive inclusion; the terms "connected", "linked", "coupled", etc. involved in this application do not limit to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0021] As Figure 2 shown, the present invention proposes an intelligent auxiliary judge reply generation method for court debates, including the following steps:

[0022] Step 1: For a court debate dialogue text, sample and extract a number of data samples. Each data sample consists of the dialogue history content, the annotation of the controversial focus type of the dialogue history content, and the judge's reply content.

[0023] During the sampling process, first determine a certain sentence in the dialogue text as the judge's reply content, and the role annotation of this sentence must be the judge; then take several sentences before this sentence as the dialogue history content, where at least one sentence in the dialogue history content must have an annotation of the controversial focus type, and there can be multiple sentences with an annotation of the controversial focus type. Each annotation of the controversial focus type can contain an indefinite number of type labels. For example, the annotation of the controversial focus type of a certain sentence contains two type labels, namely "principal dispute" and "partial repayment of the principal of the loan".

[0024] In this step, as shown in Table 1, a part of the text of a court debate dialogue is intercepted. Taking the statement with the last character annotation being the judge as an example, it is used as the judge's reply content, and the four sentences before the last sentence are used as the dialogue history content. There is a controversial focus content "How much is the actual loan amount between the two parties" in the dialogue history content, which meets the sampling requirements; the classification labels of the controversial focus types in the dialogue history content in this example include four-level classification labels, namely "principal dispute", "loan agreement", "written agreement or electronic agreement", and "lack of intention of borrowing".

[0025] Table 1: Example of data sample.

[0026]

[0027] Step 2: Construct a deep neural network encoder to encode the dialogue history content to obtain a set of encoded dialogue content. The deep neural network encoder includes word embedding, role embedding, and long short-term memory network encoder.

[0028] In this step, the specific working process of the deep neural network encoder is as follows:

[0029] Take the dialogue history content as the source sentence input. Each word is represented by a pre-trained word embedding w, and the role embedding r is used to encode the speaker information (plaintiff / defendant / judge) to which the word belongs. The structures of the word embedding and the role embedding are concatenated as the semantic representation at the word level. Input the semantic representation at the word level into the long short-term memory network encoder Enc to obtain the semantic representation H = {h1, h2, …, h i , …, h M} of the encoded dialogue history content, where h i represents the hidden layer state of the i-th word in the dialogue history content, and M represents the length of the dialogue history content.

[0030] Step 3: Construct a knowledge memory unit, and the structure of the knowledge memory unit is as Figure 1 shown. In this step, the knowledge memory unit consists of K + 1 trainable embedding matrices C = (C 1 , …, C K+1 ) and the same number of memory unit slots, where represents the k-th trainable embedding matrix, K is the maximum number of hops in the memory unit, |V| is the size of the dictionary, and d emb is the dimension of the embedding.

[0031] For a certain dialogue history content with several controversial focus type annotations, given several controversial foci in the dialogue history, the hierarchical classification label of the i-th controversial focus is vi For each, use a label embedding layer to embed the label to obtain the initial knowledge representation \(m\) of the \(i\)-th controversial focus. i Use \(K + 1\) trainable embedding matrices \(C\) to generate the memory content \(c=(c 1 ,\cdots,c K+1 ) and store it in the memory cell slots of the knowledge memory unit.

[0032] Take the hidden layer state \(h\) of the last word in the semantic representation \(H\) of the encoded dialogue history content in step two M as the initial write query vector \(q\) 1 , and interact the write query vector with the memory content stored in the corresponding memory cell slot to calculate the memory cell attention weights for each controversial focus and update the write query vector for each hop.

[0033] In this step, the specific workflow is as follows:

[0034] 3.1) According to the \(K + 1\) trainable embedding matrices \(C=(C 1 ,\cdots,C K+1 ), calculate the cell content stored in the memory cell slot corresponding to each hop. The calculation formula is as follows:

[0035]

[0036] where is the cell content at the \(i\)-th position of the \(k\)-th memory slot, and the \(i\)-th position corresponds to the \(i\)-th controversial focus; \(C k (.) represents the processing by the \(k\)-th trainable embedding matrix, and \(B(·)\) represents the bag-of-words calculation method to aggregate the corresponding category word vectors.

[0037] Traverse all controversial foci in each hop to obtain the cell content stored in the memory slot of the current hop \(n\) is the number of controversial foci;

[0038] 3.2) Take the hidden layer state \(h\) of the last word in the semantic representation \(H\) of the encoded dialogue history content in step two M as the initial write query vector \(q\) 1 , and the write query vector can be calculated for \(K\) hops in a loop. Calculate the memory cell attention weights for each controversial focus in each hop. This weight determines the similarity degree of a certain memory cell content in the current hop with respect to the write query vector of the current hop:

[0039]

[0040] where \(q kis the write query vector corresponding to the k-th hop; the superscript T represents transpose, represents the weight at the i-th position of the memory slot for the k-th hop.

[0041] 3.3) Update the write query vector for each hop: The model obtains the output o k+1 of the k-th hop by performing a weighted sum of the attention weights over c k , and adds it to the write query vector q k of the k-th hop to update it to the write query vector q k+1 of the new hop:

[0042]

[0043] q k+1 = q k + o k

[0044] Through the calculation of this step, the content c = (c 1 , …, c K+1 ) stored in K + 1 memory cell slots is obtained, and the final write query vector q K+1 is obtained.

[0045] Step 4: Construct a language decoder. The basic composition of the language decoder is a long short-term memory network based on the attention mechanism, and this network decodes and generates step by step in an autoregressive manner, that is, the t-th decoding step is used to generate the t-th word of the response content.

[0046] In this step, in the (t + 1)-th decoding step, it is necessary to obtain the word y t generated in the t-th decoding step, the context vector c t , and the memory cell readout vector mem t , and the three are used as the inputs of the long short-term memory network.

[0047] Among them, the context vector c t is obtained by performing the attention mechanism calculation on the decoder hidden layer vector s t at this time step and the vector in the semantic representation H of the encoded dialogue history content obtained in Step 2 respectively, and the formula is expressed as:

[0048]

[0049] α ti = Softmax(W[h i ; s t + b)

[0050] Among them, α ti is the hidden layer vector s tand the hidden layer vector h of the i-th encoding step i The calculated attention weights; W represents a trainable matrix, b represents a bias, and Softmax(.) is the Softmax function. In particular, c0 is a zero vector.

[0051] The memory cell readout vector mem t From the decoder hidden layer vector s at this time step t Obtained by performing a readout operation ReadOut(·) on the memory cell, and the formula is:

[0052] mem t = ReadOut(s t )

[0053] Wherein, ReadOut(·) represents the readout operation, that is, taking s t As the initial readout query vector of the knowledge memory cell Perform a loop calculation of K hops, and the final readout query vector obtained after the calculation Is mem t . In particular, mem0 is a zero vector;

[0054] In this embodiment, the readout operation process is as follows:

[0055] In the k-th hop, the readout query vector Calculates the relevance with the corresponding content c stored in the write operation in step three k And performs a weighted calculation to obtain an output Finally, add it to the readout query vector To update and obtain a new readout query vector

[0056]

[0057]

[0058]

[0059] Wherein, Is the unit content at the i-th position of the memory slot in the k-th hop, and the superscript T represents the transpose, Represents the weight at the i-th position of the memory slot in the k-th hop.

[0060] In the t-th decoding step, the decoded output word y t Is obtained from the decoder hidden layer vector s at this time step t Through the fully connected layer MLP and the Softmax function. In particular, y0 is a special start symbol.

[0061] The hidden state s of the new step of the decoder t+1 is updated as follows:

[0062]

[0063] where c t is the context vector at the t-th decoding step, mem t is the memory unit readout vector at the t-th decoding step, is the word y decoded at the t-th decoding step t after being represented by the embedding layer, s t is the decoder hidden layer vector at the t-th decoding step, Dec(.) represents the decoder, which is a long short-term memory network in this embodiment.

[0064] It should be noted that Figure 2 only shows the process of using s1 as the initial readout query vector of the knowledge memory unit in the first decoding step to obtain the final readout query vector as the memory unit readout vector mem1 in the second decoding step. Similarly, in the second decoding step, s2 is used as the initial readout query vector of the knowledge memory unit to obtain the final readout query vector as the memory unit readout vector mem2 in the third decoding step. The subsequent several decoding steps are the same process, Figure 2 which are not shown one by one.

[0065] Step Five: The model is trained using the maximum likelihood estimation method, and the loss function is:

[0066]

[0067] where p θ is the decoding process of the model, N is the preset decoding length, y t |y 1:t-1 ,H represents predicting the t-th word based on the semantic representation H of the generated first t - 1 words and the encoded dialogue history content.

[0068] The samples required for training are obtained in the manner described in Step One. Each data sample consists of the dialogue history content, the annotation of the controversial focus type of the dialogue history content, and the judge's reply content. Among them, the dialogue history content and the annotation of the controversial focus type of the dialogue history content are the input content, and the judge's reply content is used as the output label.

[0069] After training, the obtained encoder-decoder network with an external knowledge memory unit, similarly, takes the dialogue history content and the labeled focus types of the dialogue history content as input, and generates the judge's reply content. Therefore, the present invention can automatically generate the judge's reply based on the given dialogue history content and the optional labeled focus types, providing an intelligent assistance function for judicial personnel during court trials.

[0070] In this embodiment, a smart assistant judge reply generation system for court debates is also provided. This system is used to implement the above embodiment, and the parts that have been described will not be elaborated again. The following terms such as "module", "sub-module", "unit", etc. can be a combination of software and / or hardware that can achieve a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible.

[0071] A smart assistant judge reply generation system for court debates includes:

[0072] An encoder module, which is used to obtain the given dialogue history content and focus points, as well as the labeled focus types corresponding to each focus point, and use the encoder to obtain the semantic representation of the dialogue history content;

[0073] A knowledge memory unit module, which is used to generate memory content based on the focus types using a number of trainable embedding matrices, and store the memory content in the memory unit slots of the knowledge memory unit;

[0074] A decoder module, which is used to perform decoding based on the attention mechanism, and obtain the context vector, the memory unit readout vector, and the word generated in the previous decoding step in each decoding step until the decoding is completed, and generate the judge's reply content.

[0075] In some embodiments of the present invention, a display module may also be included, which is used to display the generated reply content.

[0076] The implementation processes of the functions and roles of each module in the above system are specifically described in the corresponding steps of the above method, which will not be elaborated here. For the system embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The system embodiments described above are only illustrative. The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present invention solution. Those of ordinary skill in the art can understand and implement it without creative work.

[0077] Embodiments of the method or system for intelligent assistance in generating judges' responses in court debates of the present invention can be applied to any device with data processing capabilities, and such a device with data processing capabilities can be a device or system such as a computer. System embodiments can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a logically meaningful system, it is formed by the processor of any device with data processing capabilities where it is located reading the corresponding computer program instructions in the non-volatile memory into the memory for operation. At the hardware level, as Figure 3 shown, a hardware structure diagram provided by this embodiment. In addition to Figure 3 the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities where the system is located in the embodiment usually includes other hardware according to the actual functions of the device with data processing capabilities, which will not be elaborated here.

[0078] The above method or system will be applied to the following embodiments to demonstrate the technical effects of the present invention. The specific steps in the embodiments will not be elaborated.

[0079] The present invention conducted experiments on a self-collected dataset of court trial debate texts. The dataset comes from a municipal court in China, and all cases involved are private lending disputes. After dividing the training set, validation set, and test set according to a ratio of 8:1:1, the training set includes 4,903 cases, the validation set includes 613 cases, and the test set includes 613 cases. During the sampling process, the present invention concatenates 60 consecutive short sentences before the sentences (target sentences) with the role labeled as judge, with a character length not exceeding 512 as the dialogue history content. Thus, 27,081 sentence pairs are obtained for the training set, 3,066 sentence pairs for the validation set, and 1,744 sentence pairs for the test set.

[0080] To objectively evaluate the performance of the algorithm of the present invention, on the test set, the present invention uses BLEU-1, BLEU-2, BLEU-3, BLEU-4, ROUGE-L, and METEOR metrics to automatically evaluate the effect of the present invention. Taking four existing technologies, namely Seq2Seq+Attention, Copynet, ReCosa, and BART, as comparative examples, and testing according to the steps described in the specific implementation manner for the six metrics, the automatic evaluation results of the present invention compared with the other 4 existing methods are shown in Table 2.

[0081] Table 2 Automatic evaluation results for six metrics

[0082]

[0083] As can be seen from Table 1, the Seq2Seq+Attention model is an encoder-decoder network with an attention mechanism, the Copynet model is an encoder-decoder network with a copy mechanism, the ReCosa model is a hierarchical Transformer encoder-decoder network, and BART is a network obtained by fine-tuning a pre-trained encoder-decoder language model on this dataset. The method of the present invention is superior to the comparative models in most evaluation metrics and is only comparable to the BART model in terms of the ROUGE-L evaluation metric, demonstrating the powerful function of the present invention.

[0084] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of patent protection. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. An intelligent auxiliary judge reply generation method for court debates, characterized in that, Including: Obtain the given dialogue history content and the focus of controversy, as well as the annotation of the type of focus of controversy corresponding to each focus of controversy, and use the encoder to obtain the semantic representation of the dialogue history content; Construct a knowledge memory unit, use a number of trainable embedding matrices to generate memory content based on the type of focus of controversy, and store the memory content in the memory unit slots of the knowledge memory unit; Use a decoder based on the attention mechanism to decode. In each step of the decoding process, obtain the context vector, the memory unit readout vector, and the word generated in the previous decoding step until the decoding ends to generate the judge's reply content. The process of using a decoder based on the attention mechanism is as follows: At the (t + 1)-th decoding step, it is necessary to obtain the word y generated at the t-th decoding step t , the context vector c t , and the memory unit readout vector mem t , and the three are used as the inputs to the decoder; Among them, the context vector c at the t-th decoding step t is obtained by respectively performing the calculation of the attention mechanism on the decoder hidden layer vector s at this decoding step t and the vector in the semantic representation H of the encoded dialogue history content obtained in the second step, and the formula is expressed as: α ti = Softmax(W[h i ; s t + b) where α ti is the attention weight calculated from the hidden layer vector s t at the t-th decoding step and the hidden layer vector h i at the i-th encoding step; W represents a trainable matrix, b represents a bias, and Softmax(.) is the Softmax function; The memory cell readout vector mem at the t-th decoding step t is obtained from the decoder hidden layer vector s at this decoding step t by performing a readout operation ReadOut(·) on the memory cell, and is expressed by the formula: mem t = ReadOut(s t ) Among them, ReadOut(·) represents the read-out operation, that is, s t as the initial read-out query vector of the knowledge memory unit performs a loop calculation of K hops, and the final read-out query vector obtained after the calculation is mem t ; At the t-th decoding step, the decoded output word y t is obtained from the decoder hidden layer vector s t of this decoding step through the fully connected layer MLP and the Softmax function; The hidden state s of the decoder at the new step t+1 is updated as follows: where c t is the context vector at the t-th decoding step, mem t is the memory cell readout vector at the t-th decoding step, is the word y decoded at the t-th decoding step t after being represented by the embedding layer, s t is the decoder hidden layer vector at the t-th decoding step, and Dec(.) represents the decoder.

2. The intelligent auxiliary judge reply generation method for court debates according to claim 1, characterized in that, The encoder described above includes a word embedding layer, a role embedding layer, and a long short-term memory network layer. During the encoding process, the word embedding layer is used to obtain the word embedding w of the conversation history content, and the role embedding layer is used to obtain the speaker information r to which the conversation history content belongs. After concatenating the word embedding w of the conversation history content and the speaker information r to which the conversation history content belongs, it is used as the input of the long short-term memory network layer to obtain the semantic representation of the conversation history content at the word level.

3. The intelligent auxiliary judge reply generation method for court debates according to claim 1, characterized in that, The described knowledge memory unit consists of K + 1 trainable embedding matrices C = (C 1 , …, C K+1 ) and the same number of memory unit slots, where represents the k-th trainable embedding matrix, K is the maximum number of hops in the memory unit, |V| is the size of the vocabulary, and d emb is the dimension of the embedding.

4. The intelligent auxiliary judge reply generation method for court debates according to claim 3, characterized in that, The process of using a number of trainable embedding matrices to generate memory content based on the type of focus of controversy is: Given a number of foci of controversy and their corresponding focus of controversy type annotations existing in a certain dialogue history content, use the label embedding layer to embed the several focus of controversy type annotations corresponding to each focus of controversy to obtain the initial knowledge representation of each focus of controversy; Use K + 1 trainable embedding matrices and the initial knowledge representation of each focus of controversy to generate memory content and store it in the memory unit slots of the knowledge memory unit. The calculation formula is as follows: k = 1, 2, …, K, K + 1 Among them, is the cell content at the i-th position of the memory slot for the k-th hop. The i-th position corresponds to the i-th controversial focus; C k (.) represents being processed by the k-th trainable embedding matrix, B(·) represents the bag-of-words calculation, m i is the initial knowledge representation of the i-th controversial focus, and K is the maximum number of hops in the memory cell; Traverse all the controversial points in each hop, and the cell content stored in the memory slot of the current hop can be obtained It represents the cell content stored in the memory slot of the k-th hop, and n is the number of controversial points.

5. The intelligent auxiliary judge reply generation method for court debates according to claim 4, characterized in that, After storing the memory content in the memory unit slots of the knowledge memory unit, it further includes the process of updating the write query vector, specifically: The hidden layer state h of the last word in the semantic representation H of the encoded dialogue history content M is used as the initial write query vector q 1 , and the write query vector can perform K-hop calculations cyclically. In each hop, the memory unit attention weights for each controversial focus are calculated respectively, and these weights determine the similarity degree of the content of a certain memory unit in the current hop with respect to the write query vector in the current hop: where q k is the write query vector corresponding to the k-th hop; the superscript T represents transpose, represents the weight at the i-th position of the memory slot of the k-th hop; Update the write query vector for each hop: The model obtains the output \(o\) of the \(k\)-th hop by performing a weighted sum of the attention weights over and adds it to the write query vector \(q\) of the \(k\)-th hop k to update it to the write query vector \(q\) of the new hop k : k+1 ​ q k+1 = q k + o k Through the calculation of this step, the content c = (c 1 , …, c K+1 ) stored in K + 1 memory cell slots is obtained, and the final write query vector q K+1 is obtained.

6. A method for generating an intelligent assistant judge's reply in court debate according to claim 1, characterized in that, The readout operation process is as follows: In the k-th hop, read out the query vector and the corresponding content c stored in the write operation in step three k Calculate the relevance and perform weighted calculation to obtain the output Finally, add it to the read-out query vector Update to obtain a new read-out query vector wherein, is the cell content at the i-th position of the k-th memory slot, and the superscript T represents transpose, represents the weight at the i-th position of the k-th memory slot.

7. A method for generating an intelligent assistant judge's reply in court debate according to claim 1, characterized in that, The decoder uses a long short-term memory network.

8. A method for generating an intelligent assistant judge's reply in court debate according to claim 1, characterized in that, The encoder, decoder, and knowledge memory unit are trained in an end-to-end manner. During the training process, the dialogue history content, the annotation of the type of focus of controversy of the dialogue history content, and the judge's reply content are used as training samples. The dialogue history content is used as the input of the encoder, the annotation of the type of focus of controversy of the dialogue history content is used as the input of the knowledge memory unit, and the judge's reply content is used as the output label of the decoder.

9. An intelligent assistant judge's reply generation system for court debate, used to implement the generation method described in claim 1, characterized in that, The generation system includes: An encoder module, which is used to obtain the given dialogue history content and the focus of controversy, as well as the annotation of the type of focus of controversy corresponding to each focus of controversy, and use the encoder to obtain the semantic representation of the dialogue history content; A knowledge memory unit module, which is used to use a number of trainable embedding matrices to generate memory content based on the type of focus of controversy, and store the memory content in the memory unit slots of the knowledge memory unit; A decoder module, which is used to decode based on the attention mechanism. In each step of the decoding process, obtain the context vector, the memory unit readout vector, and the word generated in the previous decoding step until the decoding ends to generate the judge's reply content.

Citation Information

Patent Citations

  • Method for judging reliability of mental health assessment by eye movement measurement and control technology

    CN108836363A

  • Judicial trial head problem generation method and device based on deep neural network, and medium

    CN112329464A