Statement generation method, device, and computer-readable medium

Through the combination of finite state machine and logical reasoning graph, the automatic generation of process prompt statements in the trial scenario is realized, which solves the problems of poor universality and high workload in the existing technology, and improves the universality and efficiency of the generation method.

CN113807069BActive Publication Date: 2025-06-17ALIBABA GROUP HOLDING LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010530595.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-11
Publication Date
2025-06-17
Estimated Expiration
2040-06-11

AI Technical Summary

Technical Problem

In the prior art, the automatic generation of process prompt statements during court trials has problems such as poor generalization and high workload, especially the rule-based generation method requires pre-customization of a large number of rules, which is poor in versatility.

Method used

The method of finite state machine combined with logical inference graph is adopted to manage the process state nodes in the scenario through the finite state machine, and the generation of process prompt statements and switching of process state nodes is controlled using the logic tree.

Benefits of technology

This method can flexibly configure finite state machine and logic tree, which is suitable for trial scenarios with different cases, reduces the workload when applying different cases and improves versatility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113807069B_ABST
    Figure CN113807069B_ABST
Patent Text Reader

Abstract

In a scheme for generating process prompt statements provided by this application, this scheme adopts a method combining a finite state machine and a logical inference graph. That is, it uses a finite state machine representation to manage the process state nodes in the scenario, and uses a logical inference graph formed by a logical tree to control the generation of process prompt statements and the switching of process state nodes. For the court trial scenario, different case types can be adapted by flexibly configuring the states included in the finite state machine and the template nodes in the logical tree. Therefore, the workload for different case types can be reduced, and the generality is good.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information technology, and in particular, to a method, device, and computer-readable medium for generating statements. Background Art

[0002] A court trial is a special multi-person conversation scenario, and the participants include the judge, the plaintiff's side (including the plaintiff and agents, etc.), and the defendant's side (including the defendant and agents, etc.). Among them, the judge is the organizer of the court trial. The judge not only needs to ask questions to the plaintiff and the defendant to understand the facts, but also needs to maintain the order of the court trial and promote the process of the court trial.

[0003] In order to push forward the court trial, the judge generally uses some relatively fixed statements to require other participants in the court trial to make corresponding responses or statements. These relatively fixed statements are called procedural prompt statements, such as "the identity information of the plaintiff and the defendant", "the plaintiff and the defendant read the indictment and the defense statement", etc. In the regular court trial process, these procedural prompt statements need to be spoken by the judge to other participants in the court trial at an appropriate time. Since the content of the procedural prompt statements is relatively fixed, there is a theoretical possibility of automatic generation, which can reduce the burden on the judge during the court trial.

[0004] In the field of information technology, the automatic generation of procedural prompt statements during a court trial can be defined as a natural language generation problem. There are usually two solutions, namely the rule-based generation method and the abstract generation method. Among them, the abstract generation method still has technical bottlenecks at present. The generated statements are usually incomplete, or some content is repeated, or there are other language problems, and they cannot be directly applied in actual scenarios. The rule-based generation method needs to pre-customize a large number of rules for different case types, with poor generality and heavy workload. Summary of the Invention

[0005] An object of this application is to provide a method, device, and computer-readable medium for generating statements to solve the problems of poor generality and heavy workload.

[0006] An embodiment of this application provides a method for generating statements, which includes:

[0007] Determine the current process state node based on a finite state machine;

[0008] Obtain the activation state of the process state node according to the logic tree with the process state node as the root node;

[0009] If the activation state of the process state node is activated, generate a procedural prompt statement corresponding to the process state node according to the template node in the logic tree;

[0010] If the activation status of the process status node is inactive, or all the process prompt statements corresponding to the process status node have been output, switch to the next process status node according to the finite state machine.

[0011] The embodiment of the present application also provides a statement generation device, which includes:

[0012] A status control module, configured to determine the currently located process status node based on a finite state machine, and if the activation status of the process status node is inactive, or all the process prompt statements corresponding to the process status node have been output, switch to the next process status node according to the finite state machine;

[0013] A statement generation module, configured to obtain the activation status of the process status node according to the logic tree with the process status node as the root node, and if the activation status of the process status node is active, generate the process prompt statement corresponding to the process status node according to the template node in the logic tree.

[0014] Some embodiments of the present application also provide a computing device, where the device includes a memory for storing computer program instructions and a processor for executing the computer program instructions. When the computer program instructions are executed by the processor, the device is triggered to execute the foregoing statement generation method.

[0015] Some other embodiments of the present application also provide a computer-readable medium, on which computer program instructions are stored, and the computer-readable instructions can be executed by a processor to implement the statement generation method.

[0016] In a statement generation solution provided by an embodiment of the present application, the solution can determine the currently located process status node based on a finite state machine, and then obtain the activation status of the process status node according to the logic tree with the process status node as the root node. If the activation status of the process status node is active, generate the process prompt statement corresponding to the process status node according to the template node in the logic tree. If the activation status of the process status node is inactive, or all the process prompt statements corresponding to the process status node have been output, switch to the next process status node according to the finite state machine. Since the finite state machine is combined with the logical inference graph, that is, the process status nodes in the scenario are managed by the finite state machine representation, and the logical inference graph formed by the logic tree is used to control the generation of process prompt statements and the switching of process status nodes, different case types can be adapted by flexibly configuring the states included in the finite state machine and the template nodes in the logic tree for the court trial scenario. Therefore, the workload for different case types can be reduced, and the generality is good. Description of the Drawings

[0017] Other features, objects, and advantages of the present application will become more apparent from the following detailed description of non-limiting embodiments read in conjunction with the accompanying drawings:

[0018] Figure 1 It is a processing flow chart of a sentence generation method provided in an embodiment of the present application;

[0019] Figure 2 It is a timing diagram of the issuance of a prompt sentence in a court trial scenario;

[0020] Figure 3 It is a node transition state diagram of process state nodes in an embodiment of the present application;

[0021] Figure 4 It is a logical reasoning map corresponding to a node transition state diagram in an embodiment of the present application;

[0022] Figure 5 It is a logical tree with process state node 4 as the root node in an embodiment of the present application;

[0023] Figure 6 It is a flow chart when generating a process prompt sentence corresponding to a process state node in an embodiment of the present application;

[0024] Figure 7 It is a schematic diagram of a way to mark the access order between nodes in an embodiment of the present application;

[0025] Figure 8 It is a schematic structural diagram of a sentence generation device provided in an embodiment of the present application;

[0026] Figure 9 It is a system framework diagram of an automatic question - asking system that can be applied to a court trial scenario;

[0027] Figure 10 It is a schematic structural diagram of a computing device for implementing sentence generation provided in an embodiment of the present application;

[0028] Identical or similar reference numerals in the drawings represent identical or similar components. Detailed Embodiments

[0029] The present application will be further described in detail below with reference to the accompanying drawings.

[0030] The embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described by referring to the drawings below are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0031] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0032] An embodiment of the present application provides a sentence generation method, which adopts a finite state machine combined with a logical reasoning graph, that is, the process state nodes in the scene are managed through the finite state machine representation, and the logical reasoning graph formed by the logic tree is used to control the generation of process prompt statements and the switching of process state nodes. For the trial scene, the states contained in the finite state machine and the template nodes in the logic tree can be flexibly configured to be applicable to different case causes, thereby reducing the workload when applied to different case causes, and having good versatility.

[0033] In actual scenarios, the execution subject of the method can be a user device, a network device, or a device formed by integrating a user device and a network device through a network, and can also be a program running in the above-mentioned device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, and tablet computers; the network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing (Cloud Computing), where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.

[0034] Figure 1 The processing flow of a sentence generation method provided by an embodiment of the present application is shown, which may include at least the following processing steps:

[0035] Step S101, determining the current process state node based on the finite state machine.

[0036] This solution can be applied to scenarios with relatively fixed interaction processes, such as court trials, meetings, etc. In these scenarios, generally, specific personnel are required to promote the progress of the interaction process. Taking the court trial scenario as an example, the judge will use a series of prompt statements to let the participants in the court trial answer questions or state their opinions to promote the progress of the court trial. Among them, the judge's prompt statements can include factual prompt statements, mainly aimed at the indictment and answer of the plaintiff and defendant, and some questions related to the facts of the case asked by the judge; and the procedural prompt statements during the court trial refer to some relatively fixed statements used to promote the court trial, such as "identity information of the plaintiff and defendant", "the plaintiff and defendant read the indictment and answer", etc.

[0037] Figure 2 It shows a timing sequence of issuing prompt statements during a court trial. Among them, the start node is the node when the court trial starts, the process node is the node where the procedural prompt statement is issued, the fact node is the node where the factual prompt statement is issued, the end node is the node when the court trial ends, and the numbers represent the switching order between nodes. From this, it can be known that in the scenario corresponding to this figure, the judge will issue procedural prompt statements to the participants in the court trial first when switching between the states corresponding to 1, 2, 5, and 6 to promote the progress of the court trial.

[0038] According to different actual scenarios, such as court trials of different case types, meetings of different themes, etc., the entire process of scenario advancement can be divided into different process state nodes. Each process state node represents a state or branch in the process of scenario advancement. In this state or branch, one or more procedural prompt statements may be proposed. For different scenarios, the total set of process state nodes can be determined in advance. For example, at the beginning of a court trial, a procedural prompt statement introducing the process of this court trial will be issued first: XX Court is now publicly hearing the case of plaintiff AAA vs. defendant BBB regarding XX case type in accordance with the law. Then, according to the actual attendance of the participants in the court trial, procedural prompt statements requiring each party to verify their identity information will be issued, such as the identity of the plaintiff, the identity of the defendant, the identity of the third party involved in the case, etc.

[0039] Since the total set of process state nodes can be determined in advance, and for similar scenarios, such as court trials of similar case types, meetings with similar themes, etc., the process state nodes in the process of scenario advancement will also be similar. Therefore, a finite state machine (FSM) can be used to represent the process state nodes included in the scenario. For example Figure 3 It shows a schematic diagram of the node transition state corresponding to a finite state machine. From this, it can be known that the advancement process corresponding to this scenario will sequentially transfer between process state nodes 4, 6, 7, and 8.

[0040] Thus, when determining the current process status node based on the finite state machine, if it is the first processing, the first node in the finite state machine can be determined as the current process status node; if it is not the first processing, the current process status node can be determined according to the process status nodes that have been visited, so as to Figure 3 Taking the node transition state diagram shown in Figure 3 as an example, if the process status node 4 has been processed in the previous time, then in this processing, the process status node 6 can be determined as the current process status node.

[0041] Step S102: Obtain the activation status of the process status node according to the logic tree with the process status node as the root node.

[0042] Step S103: If the activation status of the process status node is activated, generate a process-related prompt statement corresponding to the process status node according to the template node in the logic tree.

[0043] Among them, each process status node in the finite state machine corresponds to a logic tree with itself as the root node. These logic trees, that is, the constructed logical inference graph, can be used to control the generation of process-related prompt statements and the switching of process status nodes. For example, for Figure 3 the node transition state diagram shown in Figure 3 , its corresponding logical inference graph can be as shown in Figure 4 Taking the process status node 4 in it as an example, it consists of the root node itself of the logic tree with it as the root node and other nodes a1 - a8.

[0044] Among them, other nodes except the root node can be one of concept element nodes, template nodes or logical calculation nodes. The association relationship between nodes and the specific content of each node can be preset according to the actual scenario requirements, and the corresponding logic tree in the logical inference graph can be directly called when generating process-related prompt statements.

[0045] The concept element node represents the node represented by the actually collected information. For example, in the court trial scenario, the concept element nodes can be "whether the defendant appears in court", "whether it is a summary procedure", "whether it is an ordinary procedure", etc. The specific values of these concept element nodes can be boolean values, that is, their values can be true or false. In the actual scenario, the input information can be obtained in a preset manner to determine the values of the concept element nodes. For example, the input information can be the statements of the court trial participants, the submitted materials, etc., which are obtained through speech recognition, character recognition or manual input, and methods such as keyword extraction and neural network model classification are used to determine the values of the concept element nodes.

[0046] The template node contains process-related prompt statements that may need to be issued in the process status nodes corresponding to the logical tree to which it belongs, such as "XX Court publicly hears the case of YY cause of action between plaintiff AAA and defendant BBB today in accordance with the law", "Can both parties guarantee that the above statements are true", "If there are false statements, the legal consequences of false litigation need to be borne. Have you heard clearly", and so on. In an actual scenario, a template node can correspond to one or more process-related prompt statements. When the process status node is in an active state, the process-related prompt statements can be determined based on the template nodes included in the corresponding logical tree. For example, all or part of the template nodes to which it belongs can be selected according to a preset rule, and the process-related prompt statements corresponding to the process status node are generated based on the selected template nodes. For the value of the template node, if the template node is a leaf node in the logical tree, the boolean value of the leaf node can be determined to be true. For example, when nodes a1 and a2 are template nodes, the values of nodes a1 and a2 are true; if the template node is a non-leaf node, the value of the template node is determined according to the values of its child nodes. For example, node a4 is a template node, and its child node is node a1. At this time, when the value of node a1 is true, the value of template node a4 is also true, and conversely, when the value of node a1 is false, the value of template node a4 is also false.

[0047] The logical calculation node represents the result of performing corresponding logical calculations on its child nodes. The logical calculations can include "AND", "OR", "NOT", etc. After performing the corresponding logical calculations on its child nodes, the obtained result is the value of the logical calculation node. For example, node a7 is a logical calculation node, and the corresponding logical operator is "OR". At this time, if its corresponding child nodes a4 and a5 are both false, the logical calculation node a7 is false; if at least one of the child nodes a4 and a5 is true, the logical calculation node a7 is true.

[0048] In some embodiments of the present application, when obtaining the active state of the process status node, the boolean values of the leaf nodes in the logical tree with the process status node as the root node can be obtained first. For example, in the logical tree with process status node 4 as the root node, the leaf nodes are nodes a1, a2, and a3. Since the value of the logical calculation node depends on its child nodes, and the leaf nodes do not have corresponding child nodes, the leaf nodes in this embodiment can be concept element nodes or template nodes. If the leaf node is a concept element node, the boolean value of the leaf node can be determined according to the input information, and if the leaf node is a template node, the boolean value of the leaf node can be directly determined to be true.

[0049] After obtaining the boolean values of the leaf nodes, the boolean value of the process status node can be calculated based on the relationships between the nodes in the logical tree according to the boolean values of the leaf nodes. For example, Figure 5The figure shows a logic tree with the process status node 4 as the root node in an embodiment of the present application. In this logic tree, nodes a1, a2, and a3 are concept element nodes, nodes a4, a5, and a6 are template nodes, and nodes a7 and a8 are logic calculation nodes. Starting from the leaf nodes, the Boolean values of the parent nodes are calculated layer by layer, and the Boolean value of the root node (i.e., the process status node) can be determined. In this embodiment, if the Boolean values of nodes a1, a2, and a3 are true, false, and true respectively, then the Boolean values of nodes a4 to a8 and the process status node 4 can be determined to be true, false, true, true, true, and true respectively.

[0050] In an actual scenario, the order of obtaining the Boolean values of nodes can be determined according to certain rules. For example, the post-order traversal method can be used to visit each node, and the Boolean value of the current node is determined when visiting each node. Thus, the Boolean values of all nodes including the process status node in the logic tree can be determined. If the Boolean value of the process status node is true, the activation status of the process status node is activated, and if the Boolean value of the process status node is false, the activation status of the process status node is not activated.

[0051] For an activated process status node, when generating its corresponding process prompt statement, the processing flow as Figure 6 shown can be adopted, including the following processing steps:

[0052] Step S601: Obtain the Boolean values of the leaf nodes in the logic tree with the process status node as the root node.

[0053] Step S602: According to the Boolean values of the leaf nodes, obtain the Boolean values of the template nodes included in the logic tree. In an actual scenario, based on the leaf nodes in the logic tree, the Boolean values of all nodes in the logic tree can be determined. If the Boolean values of the template nodes included in the logic tree have been calculated in the process of calculating the Boolean value of the foregoing root node, then the two partial calculation processes can be combined, and the foregoing calculation results can be directly called. Taking the Figure 5 shown logic tree as an example, if the Boolean values of the template nodes a4, a5, and a6 have been calculated in the process of calculating the Boolean value of the process status node 4, then the existing calculation results can be directly called without repeated calculation.

[0054] Step S603: Determine the template nodes with a Boolean value of true in the logic tree. When the Boolean values of nodes a1, a2, and a3 are true, false, and true respectively, the template nodes with a Boolean value of true are a4 and a6.

[0055] Step S604: Generate a process prompt statement corresponding to the process status node according to the text template information corresponding to the template node with a true Boolean value. For each template node, text template information corresponding to one or more process prompt statements can be pre-configured. When the Boolean value of the template node is true, the corresponding process prompt statement will be generated. Conversely, if the Boolean value of the template node is false, the corresponding process prompt statement will not be generated.

[0056] The content of the text template information in the template node can consist of fixed content and variable content. Among them, the variable content can be determined according to the input information. Filling the variable content into the text template information corresponding to the template node with a true Boolean value can generate the process prompt statement corresponding to the process status node. Here, the input information is similar to the input information for determining the values of the logical element nodes mentioned above, and can also be the statements of the trial participants, the submitted materials, etc. It is obtained through methods such as speech recognition, character recognition, or manual input, and the corresponding template content is determined by methods such as keyword extraction and neural network model classification.

[0057] For example, the text template information in a template node can be " <slot>Accepting Court< / slot> , today the plaintiff <slot>List of Plaintiffs< / slot> and the defendant <slot>List of Defendants< / slot> 's <slot>Subject Matter of the Case< / slot> case", and the variable content is marked with <slot>and< / slot> . The rest is fixed content. In this embodiment, if the accepting court determined according to the input information is XX Court, the plaintiff list includes AAA, the defendant list includes BBB, and the case name is YY case, after filling the variable content into the text template information, the following process prompt statement can be generated: "XX Court today publicly hears the case of plaintiff AAA and defendant BBB for the YY case in accordance with the law."

[0058] Under the logic tree corresponding to a process status node, there may be multiple template nodes with a boolean value of true. At this time, multiple process prompt statements may be generated. Therefore, the multiple generated process prompt statements can be saved in the form of a list, and this list is the statement list of the process status node. In an actual scenario, according to the user's output request, process prompt statements can be extracted from the statement list of the process status node and output. Among them, the user refers to the personnel who drive the process in various scenarios, such as the judge in a court trial scenario, the host in a meeting scenario, etc., and can send output requests through different operations. After the process prompt statement is extracted and output from the statement list, the statement list will reduce this process prompt statement until the statement list is empty. If the statement list is empty, it can be determined that all the process prompt statements corresponding to the process status node have been output, indicating that this process status node has been processed and can enter the next process status node for processing. For example, after all the process prompt statements corresponding to process status node 4 are output, the next process status node 6 can be entered.

[0059] In some embodiments of the present application, the template nodes in the logic tree are accessed according to a preset order, and the process prompt statements corresponding to these template nodes are added to the statement list of the process status node. For example, the nodes in the logic tree are accessed in a preorder traversal manner. If the boolean value of a node is true, continue to access the child nodes corresponding to the node. If the boolean value of a node is false, stop accessing the node and its corresponding child nodes until the template nodes with a boolean value of true in the logic tree are determined. Taking Figure 5 the shown logic tree as an example, if the boolean value of node a7 is false, there is no need to continue traversing all the child nodes a1, a2, a4, and a5 under this branch. On the contrary, if the boolean value of node a7 is true, it is necessary to continue traversing downward from nodes a4 and a5 until the leaf nodes.

[0060] When the boolean value of a node is true and it is necessary to continue traversing its child nodes, the access order during traversal can be preset. For example, when the boolean value of node a7 is true and it is necessary to continue traversing downward from nodes a4 and a5, it can be preset whether to traverse node a5 or node a4 first. In this embodiment, the traversal order can be set by adding sequence marks in the logic tree. Figure 7 The numbers between the node connections in it are sequence marks. Among them, the number between node a7 and node a5 is 1, and the number between node a7 and node a4 is 2, indicating that after accessing node a7, node a5 is traversed first, and then node a4.

[0061] When accessing the nodes in the logic tree in a pre-order traversal manner, it is possible to first determine whether the boolean value of the node is true. If the boolean value of the accessed node is true, it is possible to continue to determine whether the node is a template node, thereby improving the efficiency of traversal. When accessing a template node, a procedural prompt statement can be generated by the foregoing method of calling the text template information included in the node, and the generated procedural prompt statement can be added to the statement list of the process status node.

[0062] Step S104, if the activation status of the process status node is inactive, or all the procedural prompt statements corresponding to the process status node have been output, switch to the next process status node according to the finite state machine. For the currently processed process status node, if its activation status is inactive, or after all the procedural prompt statements corresponding to the process status node have been output, it means that the process status node has been processed. Determine the next process status node through the finite state machine, and then switch to the next process status node. For example, for the currently processed process status node being process status node 4, if the activation status of process status node 4 is inactive, or all the procedural prompt statements in the statement list of process status node 4 have been output, then it is possible to switch to process status node 6 for continued processing until the last process status node in the finite state machine has been processed.

[0063] The solution provided in the embodiments of the present application can be applied to various scenarios with relatively fixed interaction processes to automatically generate various procedural prompt statements for promoting the interaction process. For example, it can be applied to a court trial scenario to automatically generate statements for the judge to prompt the plaintiff and defendant to proceed with subsequent court trial sessions, such as "The plaintiff reads out the indictment" and "The defendant reads out the defense statement". Also, for example, it can be applied to a meeting scenario to automatically generate statements for the meeting host to prompt other participants to proceed with subsequent sessions, such as "Please invite the next guest to speak". In an actual scenario, the solution provided in the embodiments of the present application can be provided to users in the form of cloud services. After the user connects to the cloud platform through a terminal device, the statement generation solution can be used, thereby providing better empowerment services for users. In addition, it can also be used in arbitration, mediation and other departments; the output voice and intonation can be personalized to add emotional color; after the dialects of the plaintiff and defendant are recognized, the corresponding dialects can also be output.

[0064] Based on the same inventive concept, an embodiment of the present application also provides a statement generation device. The method corresponding to the device is the statement generation method in the foregoing embodiment, and the principle of solving problems is similar to that of the method.

[0065] The statement generation device provided by the embodiment of the present application adopts a method combining a finite state machine and a logical inference graph, that is, the process state nodes in the scenario are managed through the finite state machine representation, and the logical inference graph formed by the logical tree is used to control the generation of process prompt statements and the switching of process state nodes. For the court trial scenario, different case types can be adapted by flexibly configuring the states included in the finite state machine and the template nodes in the logical tree. Therefore, the workload for different case types can be reduced, and the generality is good.

[0066] In an actual scenario, the generation device may be a user device, a network device, or a device formed by integrating a user device and a network device through a network. In addition, it may also be a program running on the above devices. The user device includes but is not limited to various terminal devices such as computers, mobile phones, and tablet computers; the network device includes but is not limited to implementations such as a network host, a single network server, a set of multiple network servers, or a computer set based on cloud computing. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing (Cloud Computing), where cloud computing is a type of distributed computing and consists of a virtual computer formed by a group of loosely coupled computer sets.

[0067] Figure 8 The structure of a statement generation device provided by the embodiment of the present application is shown, including a state control module 810 and a statement generation module 820. Among them, the state control module 810 is used to determine the currently located process state node based on the finite element state machine, and if the activation state of the process state node is not activated, or all the process prompt statements corresponding to the process state node have been output, switch to the next process state node according to the finite element state machine. The statement generation module 820 is used to obtain the activation state of the process state node according to the logical tree with the process state node as the root node, and if the activation state of the process state node is activated, generate the process prompt statement corresponding to the process state node according to the template node in the logical tree.

[0068] This solution can be applied to scenarios with relatively fixed interaction processes, such as court trials, meetings, etc. In these scenarios, generally, specific personnel are required to promote the progress of the interaction process. Taking the court trial scenario as an example, the judge will use a series of prompt statements to let the participants in the court trial answer questions or state their opinions to promote the progress of the court trial. Among them, the judge's prompt statements may include factual prompt statements, mainly aimed at the indictment and answer of the plaintiff and defendant, and some questions related to the case facts asked by the judge; and the process prompt statements during the court trial refer to some relatively fixed statements used to promote the court trial, such as "identity information of the plaintiff and defendant", "the plaintiff and defendant read the indictment and answer", etc.

[0069] Figure 2 The figure shows a time sequence of prompt statements during the trial, where the start node is the node where the trial starts, the process node is the node where the process prompt statement is issued, the fact node is the node where the fact prompt statement is issued, and the end node is the node where the trial ends. The numbers represent the switching order between nodes. It can be seen that in the scenario corresponding to the figure, when the states corresponding to 1, 2, 5, and 6 are switched, the trial participants will issue process prompt statements first to promote the trial.

[0070] According to different actual scenarios, such as trials of different causes of action, meetings of different topics, etc., the entire process of scenario advancement can be divided into different process status nodes. Each process status node represents a state or branch in the process of scenario advancement. Under this state or branch, one or more process prompt statements may be proposed. For different scenarios, the total set of process status nodes can be predetermined. For example, at the beginning of the trial, a user will first issue a process prompt statement introducing the trial: XX Court will publicly hear the case of plaintiff AAA and defendant BBB regarding XX cause of action today in accordance with the law. Then, according to the actual attendance of the trial participants, a process prompt statement will be issued requiring all parties to verify their identity information, such as the identity of the plaintiff, the identity of the defendant, and the identity of the third party involved in the case.

[0071] Since the total set of process state nodes can be predetermined, and for similar scenarios, such as trials with similar causes and meetings with similar topics, the process state nodes in the process of scenario advancement will also be similar, a finite state machine (FSM) can be used to represent the process state nodes contained in the scenario, for example Figure 3 A schematic diagram of the node transfer state corresponding to a finite state machine is shown, from which it can be seen that the advancement process corresponding to this scenario will be transferred sequentially between process state nodes 4, 6, 7, and 8.

[0072] Therefore, when determining the current process state node based on the finite state machine, if it is the first processing, the first node in the finite state machine can be determined as the current process state node; if it is not the first processing, the current process state node can be determined based on the process state nodes that have been visited. Figure 3 Taking the node transfer state diagram shown as an example, if the process state node 4 has been processed last time, the process state node 6 can be determined as the current process state node during this processing.

[0073] Each process state node in the finite state machine corresponds to a logic tree with itself as the root node. These logic trees, i.e., the logical reasoning graphs, can be used to control the generation of process prompt statements and the switching of process state nodes. Figure 3The schematic diagram of the node transition state shown, and its corresponding logical inference graph can be as follows Figure 4 shown. Taking the process state node 4 as an example, it consists of the root node of the logical tree itself and other nodes a1 - a8 with it as the root node.

[0074] Among them, other nodes except the root node can be one of the concept element nodes, template nodes or logical calculation nodes. The association relationships between nodes and the specific content of each node can be preset according to the actual scenario requirements. When generating the process prompt statements, the corresponding logical tree in the logical inference graph can be directly called.

[0075] The concept element node represents the node represented by the actually collected information. For example, in the court trial scenario, the concept element nodes can be "whether the defendant appears in court", "whether it is a summary procedure", "whether it is an ordinary procedure", etc. The specific values of these concept element nodes can be boolean values, that is, their values can be true or false. In the actual scenario, the input information can be obtained in a preset manner to determine the values of the concept element nodes. For example, the input information can be the statements of the court trial participants, the submitted materials, etc., which are obtained through speech recognition, character recognition or manual input, and keyword extraction, neural network model classification and other methods are used to determine the values of the concept element nodes.

[0076] The template node contains the process prompt statements that may need to be issued in the process state nodes corresponding to the logical tree to which it belongs, such as "XX Court publicly hears the case of YY cause of action between plaintiff AAA and defendant BBB today in accordance with the law", "Can both parties guarantee that the above statements are true", "If there is false statement, the legal consequences of false litigation need to be borne. Have you heard clearly", and so on. In the actual scenario, a template node can correspond to one or more process prompt statements. When the process state node is in the active state, the process prompt statements can be determined according to the template nodes included in the corresponding logical tree. For example, all or part of the template nodes belonging to it can be selected according to the preset rules, and the process prompt statements corresponding to the process state nodes are generated according to the selected template nodes. For the value of the template node, if the template node is a leaf node in the logical tree, the boolean value of this leaf node can be determined to be true. For example, when nodes a1 and a2 are template nodes, the values of nodes a1 and a2 are true; if the template node is a non - leaf node, the value of this template node is determined according to the values of its child nodes. For example, node a4 is a template node, and its child node is node a1. At this time, when the value of node a1 is true, the value of template node a4 is also true, and vice versa, when the value of node a1 is false, the value of template node a4 is also false.

[0077] The logical calculation node represents the result of performing corresponding logical calculations on its child nodes. Logical calculations can include "AND", "OR", "NOT", etc. After performing the corresponding logical calculations on its child nodes, the obtained result is the value of the logical calculation node. For example, node a7 is a logical calculation node, and the corresponding logical operator is "OR". At this time, if its corresponding child nodes a4 and a5 are both false, then the logical calculation node a7 is false; if at least one of the child nodes a4 and a5 is true, then the logical calculation node a7 is true.

[0078] In some embodiments of the present application, when obtaining the activation status of the process status node, the statement generation module may first obtain the Boolean values of the leaf nodes in the logical tree with the process status node as the root node. For example, in the logical tree with the process status node 4 as the root node, the leaf nodes are nodes a1, a2, and a3. Since the value of the logical calculation node depends on its child nodes, and the leaf nodes do not have corresponding child nodes, the leaf nodes in this embodiment can be concept element nodes or template nodes. If the leaf node is a concept element node, the Boolean value of the leaf node can be determined according to the input information; if the leaf node is a template node, the Boolean value of the leaf node can be directly determined as true.

[0079] After obtaining the Boolean values of the leaf nodes, the statement generation module can calculate the Boolean value of the process status node based on the relationship between the nodes in the logical tree according to the Boolean values of the leaf nodes. For example, Figure 5 FIG. shows the logical tree with the process status node 4 as the root node in the embodiments of the present application. In this logical tree, nodes a1, a2, and a3 are concept element nodes, nodes a4, a5, and a6 are template nodes, nodes a7 and a8 are logical calculation nodes. Starting from the leaf nodes, calculating the Boolean values of the parent nodes layer by layer, the Boolean value of the root node (i.e., the process status node) can be determined. In this embodiment, if the Boolean values of nodes a1, a2, and a3 are true, false, and true respectively, then the Boolean values of nodes a4 to a8 and the process status node 4 can be determined to be true, false, true, true, true, and true respectively.

[0080] In an actual scenario, the order of obtaining the Boolean values of the nodes can be determined according to certain rules. For example, the post-order traversal method can be used to visit each node, and the Boolean value of the current node is determined when visiting each node. Thus, the Boolean values of all nodes including the process status node in the logical tree can be determined. If the Boolean value of the process status node is true, the activation status of the process status node is activated; if the Boolean value of the process status node is false, the activation status of the process status node is not activated.

[0081] For an activated process status node, when the statement generation module generates the corresponding process prompt statement, it can adopt, for example, Figure 6The processing flow shown includes the following processing steps:

[0082] Step S601, obtaining the boolean values of the leaf nodes in the logical tree with the process status node as the root node.

[0083] Step S602, obtaining the boolean values of the template nodes included in the logical tree according to the boolean values of the leaf nodes. In an actual scenario, based on the leaf nodes in the logical tree, the boolean values of all nodes in the logical tree can be determined. If the boolean values of the template nodes included in the logical tree have been calculated during the process of the boolean value of the foregoing root node, the two parts of the calculation process can be merged and the foregoing calculation result can be directly called. Taking Figure 5 the shown logical tree as an example, if the boolean values of the template nodes a4, a5, and a6 have been calculated during the process of calculating the boolean value of the process status node 4, the existing calculation results can be directly called without repeated calculation.

[0084] Step S603, determining the template nodes with true boolean values in the logical tree. When the boolean values of the nodes a1, a2, and a3 are true, false, and true respectively, the template nodes with true boolean values are a4 and a6.

[0085] Step S604, generating the process prompt statement corresponding to the process status node according to the text template information corresponding to the template node with true boolean value. For each template node, the text template information corresponding to one or more process prompt statements can be pre-configured. When the boolean value of the template node is true, the corresponding process prompt statement will be generated. On the contrary, if the boolean value of the template node is false, the corresponding process prompt statement will not be generated.

[0086] The content of the text template information in the template node can be composed of fixed content and variable content. Among them, the variable content can be determined according to the input information. Filling the variable content into the text template information corresponding to the template node with true boolean value can generate the process prompt statement corresponding to the process status node. Among them, the input information here is similar to the input information for determining the values of the logical element nodes mentioned above, and can also be the statements of the trial participants, the submitted materials, etc., which are obtained through voice recognition, character recognition or manual input, and the corresponding template content is determined by means of keyword extraction, neural network model classification, etc.

[0087] For example, the text template information in a template node can be " <slot>Accepting Court< / slot> , today the public trial of the plaintiff <slot>List of Plaintiffs< / slot> vs. the defendant <slot>List of Defendants< / slot> 's <slot>Subject Matter of the Case< / slot> case" is taken, and the variable content is filled with <slot>and< / slot>Make a mark, and the rest is fixed content. In this embodiment, if the accepting court determined according to the input information is XX Court, the plaintiff list includes AAA, the defendant list includes BBB, and the case cause is YY case cause. After filling the variable content into the text template information, the following process prompt statement can be generated: "XX Court publicly hears the case of YY case cause between plaintiff AAA and defendant BBB according to law today."

[0088] Under the logic tree corresponding to a process status node, there may be multiple template nodes with a boolean value of true. At this time, multiple process prompt statements may be generated. Therefore, the multiple generated process prompt statements can be saved in the form of a list, and this list is the statement list of the process status node. In an actual scenario, according to the user's output request, the process prompt statement can be extracted from the statement list of the process status node and output. Among them, the user refers to the person who promotes the process in each scenario, such as the judge in the court trial scenario, the host in the meeting scenario, etc., and the output request can be sent through different operations. After the process prompt statement is extracted and output from the statement list, the statement list will reduce this process prompt statement until the statement list is empty. If the statement list is empty, it can be determined that all the process prompt statements corresponding to the process status node have been output, indicating that this process status node has been processed and can enter the next process status node for processing. For example, after all the process prompt statements corresponding to process status node 4 are output, the next process status node 6 can be entered.

[0089] In some embodiments of the present application, the statement generation module accesses the template nodes in the logic tree according to a preset order, and adds the process prompt statements corresponding to these template nodes to the statement list of the process status node. For example, the nodes in the logic tree are accessed in a preorder traversal manner. If the boolean value of a node is true, continue to access the child nodes corresponding to the node. If the boolean value of a node is false, stop accessing the node and its corresponding child nodes until the template nodes with a boolean value of true in the logic tree are determined. Take Figure 5 the shown logic tree as an example. If the boolean value of node a7 is false, there is no need to continue traversing all the child nodes a1, a2, a4, and a5 under this branch. On the contrary, if the boolean value of node a7 is true, it is necessary to continue traversing downward from nodes a4 and a5 until the leaf nodes.

[0090] When the boolean value of a node is true and it is necessary to continue traversing its child nodes, the access order during traversal can be preset. For example, when the boolean value of node a7 is true and it is necessary to continue traversing downward from nodes a4 and a5, it can be preset whether to traverse node a5 or node a4 first. In this embodiment, the traversal order can be set by adding a sequence mark in the logic tree. Figure 7The numbers between the connections of the middle nodes are sequential labels. Among them, the number between node a7 and node a5 is 1, and the number between node a7 and node a4 is 2, indicating that after accessing node a7, node a5 is traversed first, and then node a4 is traversed.

[0091] When accessing the nodes in the logic tree in the pre-order traversal manner, the statement generation module can first judge whether the boolean value of the node is true. If the boolean value of the accessed node is true, it can continue to judge whether the node is a template node, thereby improving the traversal efficiency. When accessing a template node, a procedural prompt statement can be generated by the foregoing method of calling the text template information included in the node, and the generated process prompt statement is added to the statement list of the process status node.

[0092] For the currently processed process status node, if its activation status is inactive, or after all the procedural prompt statements corresponding to the process status node are output, it means that the process status node has been processed. By using a finite state machine to determine the next process status node, the next process status node can be switched. For example, for the currently processed process status node being process status node 4, if the activation status of process status node 4 is inactive, or after all the procedural prompt statements in the statement list of process status node 4 have been output, it can be switched to process status node 6 for continued processing until the last process status node in the finite state machine is processed.

[0093] The solution provided by the embodiments of the present application can be applied to various scenarios with relatively fixed interaction processes to automatically generate various procedural prompt statements for promoting the interaction process. For example, it can be applied to a court trial scenario to automatically generate statements for the judge to prompt the plaintiff and defendant to proceed with subsequent trial sessions, such as "The plaintiff reads out the indictment" and "The defendant reads out the defense statement". Also, for example, it can be applied to a meeting scenario to automatically generate statements for the meeting host to prompt other participants to proceed with subsequent sessions, such as "Please invite the next guest to speak". In an actual scenario, the solution provided by the embodiments of the present application can be provided to users in the form of cloud services. After the user connects to the cloud platform through a terminal device, the statement generation solution can be used, thereby providing better empowerment services for users. In addition, it can also be used in arbitration, mediation and other departments; the output voice and intonation can be personalized and the emotional color can be added; after the dialects of the plaintiff and defendant are recognized, the corresponding dialects can also be output.

[0094] Figure 9The system framework of an automatic questioning system applicable to a court trial scenario is shown, including the following modules: a speech recognition module 910, a semantic understanding module 920, a question management module 930, a question generation module 940, and a speech synthesis module 950. In this system, the sentence generation scheme provided in the implementation of this application is adopted to generate questions for questioning. Among them, the speech recognition module 910 and the semantic understanding module 920 can respectively obtain the input information required for generating procedural prompt sentences according to the conversations of each participating party in the court trial through relevant technologies of Automatic Speech Recognition (ASR) and Natural Language Understanding (NLU). The question management module 930 and the question generation module 940 are respectively used to implement the sentence generation scheme provided in the embodiments of this application, so as to generate the questions that need to be automatically asked during the court trial. The speech synthesis module 950 converts the text of the generated questions into voice playback output through Text To Speech (TTS) technology, thus completing the automatic questioning during the automatic court trial.

[0095] In addition, a part of this application can be applied as a computer program product, for example, computer program instructions. When executed by a computer, through the operation of this computer, it can call or provide the methods and / or technical solutions according to this application. The program instructions for calling the methods of this application may be stored in a fixed or removable recording medium, and / or transmitted through a data stream in a broadcast or other signal-bearing medium, and / or stored in the working memory of a computer device running according to the program instructions. Here, some embodiments according to this application include a computing device as Figure 10 shown, which device includes one or more memories 1010 storing computer-readable instructions and a processor 1020 for executing the computer-readable instructions. Among them, when the computer-readable instructions are executed by the processor, the device executes the methods and / or technical solutions based on the foregoing multiple embodiments of this application.

[0096] In addition, some embodiments of this application also provide a computer-readable medium, on which computer program instructions are stored, and the computer-readable instructions can be executed by a processor to implement the methods and / or technical solutions of the foregoing multiple embodiments of this application.

[0097] It should be noted that the present application can be implemented in software and / or a combination of software and hardware. For example, it can be implemented using an application specific integrated circuit (ASIC), a general purpose computer, or any other similar hardware device. In an embodiment, the software program of the present application can be executed by a processor to implement the above steps or functions. Similarly, the software program of the present application (including related data structures) can be stored in a computer-readable recording medium, such as a RAM memory, a magnetic or optical drive, or a floppy disk and similar devices. Additionally, some steps or functions of the present application can be implemented using hardware, for example, as a circuit that cooperates with a processor to execute each step or function.

[0098] Those skilled in the art can understand that each block in these structure diagrams and / or block diagrams and / or flowcharts, as well as combinations of blocks in these structure diagrams and / or block diagrams and / or flowcharts, can be implemented using computer program instructions. Those skilled in the art can understand that these computer program instructions can be provided to a processor of a general purpose computer, a special purpose computer, or other programmable data processing methods to be implemented, so that the schemes specified in the blocks or multiple blocks of the structure diagrams and / or block diagrams and / or flowcharts disclosed by the present invention are executed by the processor of the computer or other programmable data processing methods.

[0099] Those skilled in the art can understand that the steps, measures, and schemes in the various operations, methods, and processes discussed in the present invention can be alternated, changed, combined, or deleted. Further, other steps, measures, and schemes in the various operations, methods, and processes discussed in the present invention can also be alternated, changed, rearranged, decomposed, combined, or deleted. Further, the steps, measures, and schemes in the prior art that are the same as those disclosed in the various operations, methods, and processes of the present invention can also be alternated, changed, rearranged, decomposed, combined, or deleted.

[0100] For those skilled in the art, it is obvious that the present application is not limited to the details of the above exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or basic characteristics of the present application. Therefore, from any perspective, the embodiments should be regarded as exemplary and non-limiting. The scope of the present application is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be encompassed within the present application. Any reference signs in the claims should not be regarded as limiting the claims involved.

Claims

1. A method for generating statements, wherein, The method includes: Determining the current process state node based on a finite state machine; Obtaining the activation state of the process state node according to the logic tree with the process state node as the root node, where the activation state of the process state node is determined according to the Boolean value of the process state node; If the activation state of the process state node is activated, generating a process prompt statement corresponding to the process state node according to the template nodes in the logic tree, where the process prompt statement is generated by filling the variable content determined by the input information into the text template information corresponding to the template node with a true Boolean value; If the activation state of the process state node is not activated, or all the process prompt statements corresponding to the process state node have been output, switching to the next process state node according to the finite state machine.

2. The method according to claim 1, wherein, Obtaining the activation state of the process state node according to the logic tree with the process state node as the root node includes: Obtaining the Boolean values of the leaf nodes in the logic tree with the process state node as the root node; Obtaining the Boolean value of the process state node according to the Boolean values of the leaf nodes, where if the Boolean value of the process state node is true, the activation state of the process state node is activated, and if the Boolean value of the process state node is false, the activation state of the process state node is not activated.

3. The method according to claim 2, wherein, Obtaining the Boolean values of the leaf nodes in the logic tree with the process state node as the root node includes: If the leaf node is a concept element node, determining the Boolean value of the leaf node according to the input information; If the leaf node is a template node, determining the Boolean value of the leaf node as true.

4. The method according to claim 1, wherein, Generating a process prompt statement corresponding to the process state node according to the template nodes in the logic tree includes: Obtaining the Boolean values of the leaf nodes in the logic tree with the process state node as the root node; Obtaining the Boolean values of the template nodes included in the logic tree according to the Boolean values of the leaf nodes; Determining the template nodes in the logic tree with a true Boolean value; Generating a process prompt statement corresponding to the process state node according to the text template information corresponding to the template nodes with a true Boolean value.

5. The method according to claim 4, wherein, Determining the template nodes in the logic tree with a true Boolean value includes: Visiting the nodes in the logic tree in a pre-order traversal manner; If the Boolean value of a node is true, continuing to visit the child nodes corresponding to the node, and if the Boolean value of the node is false, stopping visiting the node and its corresponding child nodes until the template nodes in the logic tree with a true Boolean value are determined.

6. The method according to claim 4, wherein, Generating a process prompt statement corresponding to the process state node according to the text template information corresponding to the template nodes with a true Boolean value includes: Generating a process prompt statement corresponding to the process state node according to the text template information corresponding to the template nodes with a true Boolean value, and adding the process prompt statement to the statement list of the process state node.

7. The method according to claim 6, wherein, The method further includes: Extracting and outputting a process prompt statement from the statement list of the process state node according to the user's output request; If the statement list is empty, determine that all the process prompt statements corresponding to the process status node are output.

8. The method according to claim 4, wherein, Generate the process prompt statements corresponding to the process status node according to the text template information corresponding to the template node with a true boolean value, including: Determine the variable content corresponding to the text template information according to the input information; Fill the variable content into the text template information corresponding to the template node with a true boolean value to generate the process prompt statements corresponding to the process status node.

9. The method according to any one of claims 1 to 8, wherein, The process prompt statements are the process prompt statements during the court trial.

10. A statement generation device, wherein, The device includes: A status control module, configured to determine the currently located process status node based on a finite state machine, and if the activation status of the process status node is not activated, or all the process prompt statements corresponding to the process status node have been output, switch to the next process status node according to the finite state machine, where the activation status of the process status node is determined according to the boolean value of the process status node; A statement generation module, configured to obtain the activation status of the process status node according to the logic tree with the process status node as the root node. If the activation status of the process status node is activated, generate the process prompt statements corresponding to the process status node according to the template nodes in the logic tree. The process prompt statements are generated by filling the variable content determined by the input information into the text template information corresponding to the template node with a true boolean value.

11. The device according to claim 10, wherein, The statement generation module is configured to obtain the boolean value of the leaf node in the logic tree with the process status node as the root node, and obtain the boolean value of the process status node according to the boolean value of the leaf node. Among them, if the boolean value of the process status node is true, the activation status of the process status node is activated; if the boolean value of the process status node is false, the activation status of the process status node is not activated.

12. The device according to claim 11, wherein, The statement generation module is configured to determine the boolean value of the leaf node according to the input information if the leaf node is a concept element node; And if the leaf node is a template node, determine the boolean value of the leaf node as true.

13. The device according to claim 10, wherein, The statement generation module is configured to obtain the boolean value of the leaf node in the logic tree with the process status node as the root node; obtain the boolean value of the template node included in the logic tree according to the boolean value of the leaf node; Determine the template node with a true boolean value in the logic tree; And generate the process prompt statements corresponding to the process status node according to the text template information corresponding to the template node with a true boolean value.

14. The device according to claim 13, wherein, The statement generation module is configured to access the nodes in the logic tree in a pre-order traversal manner; if the boolean value of a node is true, continue to access the child nodes corresponding to the node; if the boolean value of a node is false, stop accessing the node and its corresponding child nodes until the template node with a true boolean value in the logic tree is determined.

15. The device according to claim 13, wherein, The statement generation module is configured to generate a process prompt statement corresponding to the process status node according to the text template information corresponding to the template node with a true Boolean value, and add the process prompt statement to the statement list of the process status node.

16. The device according to claim 15, wherein, The statement generation module is further configured to extract and output a process prompt statement from the statement list of the process status node according to the output request of the user; and if the statement list is empty, it is determined that all the process prompt statements corresponding to the process status node have been output.

17. The device according to claim 13, wherein, The statement generation module is configured to determine the variable content corresponding to the text template information according to the input information; fill the variable content into the text template information corresponding to the template node with a true Boolean value to generate a process prompt statement corresponding to the process status node.

18. The device according to any one of claims 10 to 17, wherein, The process prompt statement is a process prompt statement during a court trial.

19. A computing device, wherein, The device includes a memory for storing computer program instructions and a processor for executing the computer program instructions. Wherein, when the computer program instructions are executed by the processor, the device is triggered to execute the method according to any one of claims 1 to 9.

20. A computer-readable medium having computer program instructions stored thereon, the computer-readable instructions being executable by a processor to implement the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method, device and system for pushing court trial questions

    CN110866174A