Simple case fast-handling intelligent auxiliary system based on large model
The intelligent auxiliary system for quick and easy case handling based on a large model dynamically extracts and verifies legal elements, monitors editing behavior in real time, and generates structured document blocks. This solves the problem of coordination between element verification and document generation in the existing system, improves the logical integrity and output accuracy of legal documents, and enhances the effectiveness of the system.
Patent Information
- Application Number
- CN202511145159.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-15
- Publication Date
- 2025-12-16
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing legal intelligent assistance systems have deficiencies in the coordination of element integrity verification and document generation processes, resulting in insufficient legal logic consistency in the output of structured blocks. Users need to make multiple manual corrections to meet the legal logic requirements, which weakens the effectiveness of the system.
The system employs a large-scale model-based intelligent assistance system for handling simplified cases quickly. It dynamically extracts legal elements through a semantic parsing module, generates two-way verification questions and updates the element set through an element verification module, judges the integrity of elements through an integrity judgment module, outputs structured document blocks step by step through a document generation module, and monitors user editing behavior in real time in a conflict detection module to generate legal logic conflict verification questions. Finally, the document synthesis module optimizes and generates judicial documents.
It achieves real-time dynamic verification of legal elements and synergy in document generation, improves the logical integrity and output accuracy of legal documents, reduces the number of manual corrections, and enhances the effectiveness of the system.
Smart Images

Figure CN121145849A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of legal intelligent assistance, and particularly relates to a simple case fast handling intelligent assistance system based on a large model. BACKGROUND
[0002] With the in-depth application of artificial intelligence technology in the legal field, the element recognition and document generation system based on a large model has gradually replaced the traditional rule engine. The prior art dynamically extracts the legal elements of a case through a semantic analysis model, and constructs a structured document block by using a generative framework, which significantly improves the drafting efficiency of judicial documents. The introduction of a legal element dependency graph further strengthens the logical association modeling between elements, and the multi-head attention mechanism of the pre-trained large model optimizes the analysis accuracy of the legal entity and behavior relationship.
[0003] However, the existing system has significant defects in the coordination of element integrity verification and document generation processes. The semantic boundary ambiguity problem generated in the element verification link cannot be fed back to the document generation module in real time, resulting in insufficient consistency of the legal logic output by the structured block. Especially when the user edits the document and triggers element changes, the system lacks a dynamic detection mechanism for legal conflicts, which makes the judicial documents need to be manually corrected several times to meet the legal logic requirements, greatly weakening the effectiveness of the intelligent assistance system. SUMMARY
[0004] In view of the above existing problems, the present application is proposed.
[0005] Therefore, the present application provides a simple case fast handling intelligent assistance system based on a large model to solve the problem of insufficient logical integrity and output accuracy caused by the lack of real-time coordination between dynamic verification of legal elements and the document generation process.
[0006] To solve the above technical problems, the present application provides the following technical solutions:
[0007] The application provides a large model-based simple case fast handling intelligent auxiliary system, which comprises a semantic analysis module, a case description text input by a user is received, semantic analysis of the case description text is performed through a pre-trained large model, and a legal element set of the case is dynamically extracted; an element verification module, based on the legal element set, a two-way verification question is generated by the pre-trained large model, is fed back to a user interface and receives a correction response, and the legal element set is updated; an integrity judgment module, according to the updated legal element set, the integrity state of the legal element is dynamically judged, if the legal element is complete, a document generation process is triggered, if the legal element is missing, a new two-way verification question is regenerated until the legal element is complete; a document generation module, when the integrity state of the legal element is complete, a generative dialogue guide framework is enabled, and a structured document block is step-by-step output by the pre-trained large model; a conflict detection module, in the process of outputting the structured document block, a user editing behavior is monitored in real time, if modification occurs, an adversarial verification mechanism is triggered, and a legal logic conflict verification question is generated; and a document synthesis module, according to a response of the user to the legal logic conflict verification question, a structured document block generation process is dynamically optimized, an optimization weight of a user editing path is recorded, and a judicial document is generated by combining a document content block.
[0008] As a preferred scheme of the large model-based simple case fast handling intelligent auxiliary system, the case description text is natural language text containing legal elements of case facts input by the user through an interactive interface.
[0009] As a preferred scheme of the large model-based simple case fast handling intelligent auxiliary system, the semantic analysis of the case description text through the pre-trained large model and the dynamic extraction of the legal element set of the case comprise the following specific steps,
[0010] The pre-trained large model is obtained by joint training of legal field text and general corpus.
[0011] The case description text is input into the pre-trained large model for semantic coding, and a text embedding vector is output.
[0012] The legal entities and behavior relationships are analyzed based on the text embedding vector, and illegal subjects, behavior types and situation degrees are identified as legal elements.
[0013] Logical dependency relationships between the legal elements are associated, and a legal element dependency graph is generated.
[0014] According to the node weight of the legal element dependency graph, the legal element set is dynamically screened by the weight legal element.
[0015] As a preferred scheme of the simple case fast handling intelligent auxiliary system based on a large model, wherein: the node weight of the legal element dependency graph is a quantitative index obtained by jointly modeling the legal association rules and semantic similarity between legal elements through a pre-trained large model.
[0016] As a preferred scheme of the simple case fast handling intelligent auxiliary system based on a large model, wherein: the updating of the legal element set includes the following specific steps,
[0017] Based on the semantic boundary clarity of each legal element in the legal element set, a legal element ambiguity score is calculated.
[0018] The legal element with the highest legal element ambiguity score is selected to generate a bidirectional verification question;
[0019] The bidirectional verification question includes a positive situation hypothesis and a reverse exception hypothesis.
[0020] The bidirectional verification question is fed back to the user interface, and the user's selection response to the positive situation hypothesis and the reverse exception hypothesis is received.
[0021] According to the user's selection response, the node relationship of the legal element dependency graph is corrected, and the legal element set is updated.
[0022] As a preferred scheme of the simple case fast handling intelligent auxiliary system based on a large model, wherein: according to the legal element set, the completeness state of the legal element is dynamically judged, and the specific steps are as follows,
[0023] The number of legal elements in the legal element set that do not pass the bidirectional verification question check is counted, and when the number of unchecked legal elements is zero, the completeness state of the legal element is marked as complete.
[0024] When the number of unchecked legal elements is greater than zero, the completeness state of the legal element is marked as missing.
[0025] As a preferred scheme of the simple case fast handling intelligent auxiliary system based on a large model, wherein: the generative dialogue guidance framework refers to an interactive mechanism for decomposing a document into document components and generating the content of each document component in a legal logic topology order through a pre-trained large model.
[0026] As a preferred scheme of the simple case fast handling intelligent auxiliary system based on a large model, wherein: the step-by-step output of the structured document block by the pre-trained large model includes the following specific steps,
[0027] According to the legal element set, the structure of the document template is matched to determine the generation order list of the structured document block.
[0028] The pre-trained large model is called in generation order to output the initial content of each structured document block in turn, and a user editing detection node is inserted after the output of each structured document block.
[0029] As a preferred scheme of the large model-based simple case fast handling intelligent auxiliary system, the generation of the legal logic conflict verification question comprises the following steps,
[0030] Capture the editing operation of the user on the structured document block, and extract the difference segment of the edited content and the original content.
[0031] Logical consistency comparison of the difference segment and the legal element dependency graph is performed to identify the contradiction node.
[0032] Based on the legal article conflict rule associated with the contradiction node, a legal logic conflict verification question is generated, and the legal logic conflict verification question is embedded in the associated context position of the structured document block and output.
[0033] As a preferred scheme of the large model-based simple case fast handling intelligent auxiliary system, the combination of the document content block generates a judicial document, and the specific steps are as follows,
[0034] The response result of the user to the legal logic conflict verification question is counted, and the user operation path weight is calculated.
[0035] According to the user operation path weight, the block generation priority of the subsequent structured document block is sorted, and the structured document block generation step whose block generation priority is lower than the preset priority threshold is skipped.
[0036] The generated structured document block is combined according to the legal logic topology order, the content after combination is subjected to legal clause reference number verification, and a judicial document is output.
[0037] The present application has the following advantages: through the node-level conflict detection of the legal element dependency graph and the text coordinate anchoring technology, the legal logic error can be accurately intercepted. In the user editing process, the difference segment and the node relationship of the legal element dependency graph are compared in real time, the contradiction node is identified, the legal article conflict verification question is generated, and the verification question is accurately embedded in the text coordinate of the specific editing position. The editing path weight dynamically adjusts the document block generation order, and the necessary block is automatically selected based on the legal rule topology constraint. The rigidity verification of the legal element dependency relationship is carried out throughout each modification behavior, forming a closed loop self-maintenance mechanism from conflict detection to correction verification. BRIEF DESCRIPTION OF DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.
[0039] Fig. 1 A module diagram of a big model-based simple case quick handling intelligent auxiliary system.
[0040] Fig. 2 A flowchart of a legal element extraction process.
[0041] Fig. 3 A flowchart of a bidirectional verification mechanism.
[0042] Fig. 4 A flowchart of a document generation optimization process. DETAILED DESCRIPTION
[0043] In order to make the above objectives, features and advantages of the present application more apparent and comprehensible, the specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0044] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application, but the present application can be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the concept of the present application, therefore the present application is not limited to the specific embodiments disclosed below.
[0045] Secondly, the "one embodiment" or "embodiment" referred to herein means that the specific features, structures or characteristics can be included in at least one implementation of the present application. "In one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an independent or alternative embodiment that excludes other embodiments.
[0046] REFERENCE Figs. 1-4 For one embodiment of the present application, the embodiment provides a big model-based simple case quick handling intelligent auxiliary system, comprising the following modules:
[0047] A semantic analysis module receives a case description text input by a user, performs semantic analysis on the case description text through a pre-trained big model, and dynamically extracts a legal element set of the case.
[0048] It should be noted that the case description text refers to a natural language text containing case fact legal elements input by a user through an interactive interface, wherein the natural language text content relates to legal fact description and has not been structured.
[0049] A pre-trained large model is obtained by jointly training legal field text and general corpus.
[0050] Specifically, legal field text data and general corpus data are collected.
[0051] The legal field text data is derived from public legal regulation libraries and case judgment documents, such as drunk driving case texts in the Chinese Judgment Documents Network; the general corpus data is derived from public corpus libraries such as Wikipedia and news articles. Legal field text data needs to remove personal privacy information (such as names, ID numbers) and sensitive content (such as classified case descriptions) by using regular expressions or keyword matching.
[0052] The legal field text data and general corpus data are alternately mixed and sliced in equal proportions (such as 1:1) to form a joint training dataset. A Transformer architecture is used as the large model architecture (such as a multi-layer bidirectional Transformer encoder), with random initialization of parameters; the joint training dataset is input, and masked language modeling tasks are used for training, with a cross-entropy loss function used as the training loss function.
[0053] The Transformer architecture uses a multi-head self-attention mechanism, and the calculation process is as follows:
[0054] ;
[0055] In the formula, represents the calculation process of the multi-head self-attention mechanism, represents the query vector matrix, represents the key vector matrix, represents the value vector matrix, represents the transpose symbol, represents the feature dimension of the key vector, represents the mathematical symbol identification of the key vector (Key Vector), is a normalization function used to generate an attention weight matrix that explicitly associates the probability of tokens;
[0056] It should be noted that the masked language modeling task is a self-supervised pre-training method, and the core operation is to randomly mask part of the token in the input text sequence and train the large model to predict the original content that is masked. Token is the smallest unit of text processing, used to convert the original natural language text (such as "defendant drunk driving") into a numerical representation that can be processed by the large model.
[0057] Through the cross-entropy loss function, the difference between the predicted probability value of the large model and the true token is calculated, and the expression is:
[0058] ;
[0059] wherein, represents the value of the cross-entropy loss function, is the total number of tokens in the current batch, is the one-hot encoding vector of the true token, is the predicted probability distribution of the large model for the token, represents the index variable of the token, represents the logarithm of the probability of the token;
[0060] The large model parameters are updated by minimizing the cross-entropy loss function (learning rate set to 2e-5, batch size set to 32) through the Adam optimizer.
[0061] Further, the large model is iteratively trained on the joint training dataset until the cross-entropy loss function value converges (for example, stop when the validation set loss decreases by less than 0.001 for 3 consecutive epochs) and output the trained large model.
[0062] The case description text is input into the pre-trained large model for semantic encoding, and the text embedding vector is output.
[0063] Specifically, the case description text is standardized, including word segmentation (using existing word segmentation tools such as jieba or BERT tokenizer), and converting to token sequence (adding [CLS] token and [SEP] token, representing the beginning of the sequence and the end of the sequence, respectively);
[0064] The token sequence is input into the pre-trained large model. The pre-trained large model processes the input through multiple layers of Transformer encoder to generate the context embedding representation of each token;
[0065] The [CLS] token embedding of the pre-trained large model is extracted as the semantic representation of the entire text (i.e. the text embedding vector). The [CLS] token embedding is a fixed dimension vector (e.g. 768 dimensions) used to capture the overall semantics of the case description text.
[0066] Based on the text embedding vector, the legal entity and behavior relationship are parsed to identify the illegal subject, behavior type and degree of circumstances as legal requirements.
[0067] Specifically, the context embedding representation of each token generated by the pre-trained large model is used to perform classification operations on the tokens in the case description text.
[0068] It should be noted that the classification operation is realized by a legal element classification layer at the top of the pre-trained large model, which obtains the illegal subject category, behavior type category or degree of circumstances category through supervised learning of legal domain text during the training process (using cross-entropy loss function);
[0069] Specifically, after pre-training, a three-layer fully connected classifier (input dimension 768, hidden layer dimension 256, output dimension 3) is added to the large model, and a judgment document data set annotated with legal elements (annotated token-level category labels) is used for fine-tuning training. The context embedding representation of each token is normalized and input into the classifier, and the illegal subject category, behavior type category or degree of circumstances category is output;
[0070] It should be noted that the illegal subject category includes entities representing individuals or organizations (such as names or institutional names), the behavior type category includes phrases representing illegal behavior (such as "driving" or "theft"), and the degree of circumstances category includes modifiers representing the severity of illegal behavior (such as "drunk" or "serious").
[0071] For token sequences continuously classified into the same category, they are merged into complete phrases to form corresponding legal element instances. For example, when multiple token sequences "Li" and "some" are classified into the illegal subject category, they are merged into "Li some" as an illegal subject instance; when token sequences "drunk" and "drive" are classified into the behavior type category, they are merged into "drunk driving" as a behavior type instance; and when token "serious" is classified into the degree of circumstances category, it is taken as a degree of circumstances instance.
[0072] By analyzing the dependency relationship between tokens through the attention weight matrix of the pre-trained large model, the behavior association between illegal subjects and behavior types (such as illegal subjects being the executors of behavior types) and the modification association between behavior types and degrees of circumstances (such as degrees of circumstances describing the attributes of behavior types) are identified. The corresponding legal element instances are output to form a legal element set. For example, token pairs with high attention weights indicate that there is a direct association relationship.
[0073] The logical dependency relationship between associated legal elements is generated to generate a legal element dependency graph.
[0074] Specifically, based on the legal element set, the semantic embedding vector is extracted by performing mean pooling operation on all token embedding vectors of each legal element phrase through the pre-trained large model.
[0075] The semantic embedding vector is calculated by cosine similarity measurement, and the semantic similarity score between legal elements is output, which is expressed as:
[0076] ;
[0077] wherein, denotes the semantic similarity score between legal elements, is the Euclidean norm, and are the vector representations of any two legal elements, denotes the Euclidean norm of denotes the Euclidean norm of denotes the dot product of and
[0078] The pre-trained large model is used to predict the statutory association rule score between each pair of legal elements.
[0079] Specifically, a pair of legal element phrases is input into the pre-trained large model, which outputs an association probability score based on the statutory rule knowledge in the joint training dataset, indicating whether there is a statutory logical dependency between the pair of legal element phrases (such as a causal relationship between the violator and the behavior type, or a conditional relationship between the behavior type and the degree of circumstances).
[0080] The semantic similarity score and the statutory association rule score are jointly modeled to generate a dependency strength score for each pair of elements through a weighted average operation. The weight proportion of the semantic similarity score is automatically determined according to the legal domain features learned by the pre-trained large model during training.
[0081] For example, the weight proportion of the semantic similarity score is 0.4, and the weight proportion of the statutory association rule score is 0.6.
[0082] If the dependency strength score exceeds a preset dependency strength threshold, a directed edge is added to the legal element dependency graph to connect the pair of legal elements, indicating the dependency relationship (such as from the violator to the behavior type). The dependency strength score is used as the weight of the edge.
[0083] It should be noted that the dependency strength threshold is a critical value automatically learned by the pre-trained large model based on legal domain text data during training. When the dependency strength score between legal elements exceeds this critical value, it is determined that there is a statutory logical dependency relationship between the elements. The dependency strength threshold is determined by the pre-trained large model during the training phase by statistical analysis of the weight distribution of all edges in the legal element dependency graph.
[0084] The node weight of each node (i.e., each legal element) in the legal element dependency graph is calculated, and the generated legal element dependency graph is output. The node weight is obtained by summing the dependency strength scores of all outgoing edges of the node, representing the global importance of the legal element.
[0085] According to the node weight of the legal element dependency graph, the weight legal element is dynamically screened to form a legal element set.
[0086] The node weight of the legal element dependency graph refers to a quantitative index obtained by jointly modeling the legal association rules and semantic similarity between legal elements through a pre-trained large model.
[0087] Specifically, all nodes in the legal element dependency graph are sorted in descending order of node weight. The higher the node weight, the more important the legal element.
[0088] Based on the sorting result, the top K legal elements with the highest node weight are dynamically selected as weight legal elements. The value of K is dynamically adjusted according to the complexity of the case description text (for example, K=3 for simple cases and K=5 for complex cases).
[0089] Example: When K is set to 3, if the node weight distribution is uneven, select legal elements with node weight greater than or equal to the weight threshold The weight threshold is a critical value dynamically set by the sum of all node weights in percentage.
[0090] The weight threshold is a critical value dynamically set by the sum of all node weights in percentage.
[0091] ;
[0092] In the formula, is a percentage parameter, represents the weight of the i-th node in the legal element dependency graph, is the index variable of the node, is the sum of all node weights, represents the total number of nodes in the legal element dependency graph, i.e., the number of all legal elements involved in the current case; If the weight threshold
[0093] is set to 20% of the total sum of all node weights, the selected weight legal elements are combined into a legal element set. The percentage parameter is an empirical value calculated by the pre-trained large model during training based on the statistical distribution characteristics (such as standard deviation and skewness coefficient) of the node weights in the legal element dependency graph, to ensure that the selected legal elements cover key elements and avoid redundancy.
[0094] an element verification module, based on the legal element set, generating an ambiguity semantic question by the pre-trained large model, feeding back to the user interface and receiving a correction response, updating the legal element set.
[0095] based on the semantic boundary clarity of each legal element in the legal element set, calculating a legal element ambiguity score.
[0096] Specifically, each legal element phrase in the legal element set (such as "driving on the highway") is input into the pre-trained large model to obtain the semantic embedding vector corresponding to the legal element phrase.
[0097] For each legal element semantic embedding vector, the cosine similarity standard deviation with the standard definition of the same type of legal element in the pre-trained large model training data is calculated by the approximate nearest neighbor search (ANN) method based on the Faiss library.
[0098] The cosine similarity standard deviation is taken as the legal element ambiguity score. The higher the legal element ambiguity score, the more ambiguous the semantic boundary of the legal element.
[0099] Select the legal element with the highest legal element ambiguity score to generate a two-way verification question.
[0100] Among them, the two-way verification question contains a positive situation hypothesis and a reverse exception hypothesis.
[0101] Specifically, the legal element set is arranged in descending order of legal element ambiguity score, and the legal element with the highest legal element ambiguity score is selected as the verification target.
[0102] Call the pre-trained large model to construct a positive situation hypothesis question, with an example format of: "Is [standard situation description of legal element]?" Call the pre-trained large model to construct a reverse exception hypothesis question, with an example format of: "Is there [legal element statutory exception situation]?".
[0103] Combine the positive situation hypothesis question and the reverse exception hypothesis question into a single interactive question, with an example format of: Please confirm: A. [positive situation hypothesis]; B. [reverse exception hypothesis].
[0104] The two-way verification question is fed back to the user interface to receive the user's selection response to the positive situation hypothesis and the reverse exception hypothesis.
[0105] Specifically, the two-way verification question is displayed in the form of a single selection button on the user interface, with option A corresponding to the positive situation hypothesis question and option B corresponding to the reverse exception hypothesis question.
[0106] Receiving the user's selection result of option A or B and recording as a binary identifier: selection A: marked as positive confirmation; selection B: marked as negative confirmation.
[0107] According to the user's selection response, the node relationship of the legal element dependency graph is corrected, and the legal element set is updated.
[0108] Specifically, if the user selects positive confirmation, the dependency strength scores of all outgoing edges connected to the current legal element in the legal element dependency graph are increased by a fixed percentage, and the verification state of the current legal element is set to "verified".
[0109] Example: If the user selects positive confirmation for the "driving on the highway" legal element, the outgoing dependency strength scores of the legal element in the dependency graph are increased from 0.7 and 0.5 to 0.84 and 0.6 (20% increase), and the verification state is set to "verified".
[0110] If the user selects negative confirmation, the corresponding legal element node in the legal element dependency graph is deleted, the corresponding legal element is removed from the legal element set, and the verification state of the current legal element is set to "removed". The node weights of the remaining nodes in the legal element dependency graph are recalculated, the legal element set is reorganized in descending order of node weight, only the legal elements corresponding to the non-zero weight nodes are retained, and the updated legal element set is output.
[0111] The integrity judgment module dynamically judges the legal element integrity state according to the updated legal element set. If the legal element is complete, it triggers the document generation process. If the legal element is missing, a new two-way verification question is generated until the legal element is complete.
[0112] The number of legal elements in the updated legal element set that do not pass the two-way verification question check is counted. When the number of unchecked legal elements is zero, the legal element integrity state is marked as complete.
[0113] Specifically, the verification state of the legal element set is traversed, and the verification state of each legal element in the legal element set is checked. If all elements are "verified" or "removed", the integrity state is marked as "complete", otherwise it is marked as "missing".
[0114] When the number of unchecked legal elements is greater than zero, the legal element integrity state is marked as missing.
[0115] The legal element integrity state "missing" is used as a return signal to generate a new two-way verification question.
[0116] The document generation module generates the generative dialogue guidance framework when the legal element integrity state is complete, and outputs the structured document block in steps by the pre-trained large model.
[0117] The generative dialogue guidance framework refers to the interactive mechanism of decomposing the document into document components and generating the content of each document component in steps by the pre-trained large model according to the legal logic topology order.
[0118] According to the matching of the legal element set and the document template structure, the generation order list of the structured document block is determined.
[0119] Specifically, based on the key elements (such as "drunk driving" and "surrender") in the legal element set, the document template in the pre-set legal document template library is matched. The matching rule is: calculate the comprehensive similarity score of the legal element keyword and the template description field, and select the document template with the highest comprehensive similarity score;
[0120] When matching the document template, first, the key elements in the legal element set are subjected to keyword extraction and semantic normalization processing, converting the colloquial expression into standardized legal terminology, then traversing the template description field in the pre-set legal document template library, after word segmentation and stop word filtering of each template description field, the remaining valid terms are mapped to a unified semantic vector space together with the normalized legal element keywords, and the comprehensive similarity score is evaluated by calculating the degree of direction coincidence of the two sets of terms in the vector space, wherein the weight of the legal element keyword is dynamically adjusted according to its importance in the legal element set, and the importance of the element keyword occupies a larger proportion in the comprehensive similarity score calculation, and the influence of the association between elements on the matching result is also considered, if multiple elements point to a specific case type, the comprehensive similarity score of the corresponding document template will be additionally added, and finally the document template with the highest comprehensive similarity score is selected as the matching result.
[0121] Preferably, the process of matching the document template fully combines the literal matching of the keywords and the deep semantic association, and can effectively handle the difference between the diversified expression of legal elements and the standardized description of the document template.
[0122] It should be noted that the pre-set legal document template library refers to the internally stored structured document template set designed in advance for different case types (such as traffic violations, contract disputes, criminal cases, etc.). Each document template includes: template description field: a text description (such as "drunk driving case judgment sheet template") for matching the legal element set. Fixed document components (block type): such as "party information", "fact finding", etc. Block generation order: dynamically arranged according to legal logic dependency (such as "fact finding" must be generated before "legal application").
[0123] extract the block generation order defined in the matched document template, and output a list of structured document block generation orders.
[0124] Call the pre-trained large model in the generation order to output the initial content of each structured document block in turn, and insert a user editing detection node after the output of each structured document block, and output the structured document block.
[0125] Specifically, for each structured document block in the generation order list, input the pre-trained large model according to the current structured document block name, legal element set and historical generation content;
[0126] Among them, the historical generation content is defined as: the initial generation content (unedited state) or the final content after user editing (edited state) of all other blocks that have been output according to the generation order list before the current block is generated.
[0127] The text content output by the pre-trained large model is taken as the initial generation content of the current block;
[0128] Embed the editing detection mark in the user interface, convert the initial generation content into an editable rich text field, and bind a text modification event listener;
[0129] Capture the following three types of operations in real time through the text modification event listener and generate block difference data sets: text addition and deletion: record the character-level difference and position index before and after modification; change of law article reference: record the added / deleted legal clause number and associated text segment; element association correction: record the changed legal element keyword and context.
[0130] Take the initial generation content output by the large model for the first time as the baseline version, and store the block difference data set in JSON format, including operation type, timestamp, modification position and content change amount;
[0131] According to the operation sequence in the difference data set, generate the current effective version in real time as the output of the structured document block to the user interface;
[0132] Among them, the structured document block contains an editable field, a listener logic and a version management component.
[0133] The conflict detection module monitors user editing behavior in real time during the output of the structured document block, and if modification occurs, triggers an adversarial verification mechanism to generate a legal logic conflict verification question.
[0134] Capture the user's editing operation on the structured document block, and extract the difference segment between the edited content and the original content.
[0135] Specifically, through the text modification event listener, real-time capture text content change events, when the user completes the editing operation (such as focus out of the edit box), get the current edited complete text content, compare the edited text content with the initial content of the structured document block character by character;
[0136] Use the longest common subsequence algorithm to identify three parts of the segment difference: new content segment, deleted content segment, and modified content segment;
[0137] It should be noted that the new content segment: the continuous character sequence that exists in the edited text but does not exist in the initial text; the deleted content segment: the continuous character sequence that exists in the initial text but does not exist in the edited text; the modified content segment: the text paragraph whose character sequence position or content changes;
[0138] Mark the operation type (add / delete / modify) and text position range for each difference segment, and output the difference segment set.
[0139] Compare the difference segment with the legal element dependency graph for logical consistency, and identify the conflict nodes.
[0140] Specifically, extract structured legal elements (including subject, behavior, and scenario elements and attribute values corresponding to the elements) from the difference segment, and calculate the cosine similarity between the semantic vector and all nodes in the legal element dependency graph;
[0141] If the cosine similarity exceeds the preset dynamic correlation threshold, mark this node as a correlation node;
[0142] It should be noted that the dynamic correlation threshold is generated by dynamically adjusting the matching critical value by statistically analyzing the distribution of semantic correlation strength between elements in historical cases and combining the rigid constraint requirements of legal provisions on element correlation.
[0143] For each correlation node, check whether the difference operation and the edge relationship of the legal element dependency graph conflict, specifically including: deletion operation: if the deleted element node has an incoming edge dependency (other elements depend on this element), mark it as a conflict; addition operation: if the added element has a legal exclusion relationship with an existing element node (such as "ordinary highway" and "heavy punishment" have no correlation), mark it as a conflict; modification operation: if the modification causes the dependency strength score between elements to reverse (such as reducing the alcohol content value to make the heavy scenario become a general scenario), mark it as a conflict;
[0144] Summarize all conflicting correlation nodes and their corresponding difference operation types (delete / add / modify) to form a conflict node set.
[0145] Based on the legal clause conflict rules associated with contradictory nodes, legal logic conflict verification questions are generated, and these questions are embedded into the associated context positions of structured document blocks for output.
[0146] Specifically, for each conflicting node in the set of conflicting nodes, the corresponding related legal provisions are extracted, and a pre-trained large model is called to generate natural language interrogative sentences.
[0147] By using natural language questions, the system locates the specific position of the difference fragments within the structured document block, inserts a prominent mark (such as a red underline) at the specific position and attaches a question prompt, and adds an interactive question area at the bottom of the structured document block.
[0148] The document synthesis module dynamically optimizes the structured document block generation process based on the user's response to the legal logic conflict verification question, records the optimization weight of the user's editing path, and combines document content blocks to generate judicial documents.
[0149] Analyze user responses to legal logic conflict verification questions and calculate the weight of user operation paths.
[0150] Specifically, it iterates through all generated legal logic conflict verification questions and user response results;
[0151] The user response results are derived from the question interaction area embedded in the context of the structured document block. Each user response result is a binary identifier: for example, the user selects "Confirm Conflict" (indicating that the user accepts the legal logic conflict raised by the system) or "Ignore Conflict" (indicating that the user rejects or does not modify the conflict). If the user does not respond to the conflict question within the set time limit (e.g., 30 seconds), it is considered "Ignore Conflict" by default, and the weight component is calculated according to the current deviation level; if the user modifies the content and no new conflict detection is triggered, the weight component is set to 0 (considered as corrected).
[0152] For each user response, extract the associated editing operations and difference fragments, and calculate the degree of deviation based on the character difference ratio to quantify the degree of deviation between the editing operation and the initial content;
[0153] The expression for calculating the degree of deviation is:
[0154] ;
[0155] Among them, the number of newly added characters refers to the total number of consecutive characters that exist in the edited text but not in the initial content; the number of deleted characters refers to the total number of consecutive characters that exist in the initial content but not in the edited text; and the total number of characters in the initial content refers to the total number of characters in the initial content of the structured document block (excluding spaces and punctuation).
[0156] It should be noted that the range of deviation values is as follows: The greater the value, the more significant the deviation of the user's editing behavior from the initial content.
[0157] Further, if the user response is "confirm conflict", the user operation path weight is set to 0 (indicating that the user accepts the suggestion and the deviation is corrected);
[0158] If the user response is "ignore conflict", the user operation path weight is set to the degree of deviation (indicating that the user insists on modification and the degree of deviation is high);
[0159] If there are multiple editing operations (corresponding to multiple difference fragments) in the structured document block, the user operation path weight is the average of all user operation path weights. Output the user operation path weight value of each structured document block.
[0160] According to the user operation path weight, the block generation priority of the subsequent structured document block is sorted, and the structured document block whose block generation priority is lower than the preset priority threshold is skipped in the block generation step.
[0161] Specifically, based on the generation order list of the structured document block, the generation order list is based on the legal logic topology order (such as "party information" block first and "treatment result" block last);
[0162] Retrieve the user operation path weight of each generated structured document block (the weight value has been calculated and stored in the previous step), and group them by block type. Calculate the average user operation path weight of each block type, and establish a block type-weight reference mapping table.
[0163] For each subsequent structured document block , according to the block type-weight reference mapping table, obtain the corresponding weight reference value , calculate the block generation priority , the expression is:
[0164] ;
[0165] In the formula, is the block generation priority index variable, is the legal logic order compensation coefficient;
[0166] It should be noted that by analyzing the topological relationship between the current block type and the legal element dependency graph through a pre-trained large model, a compensation value is output as the legal logic order compensation coefficient (example range: , if the block violates the logical order , the key block is forced to be placed in front );
[0167] Set the preset priority threshold , all subsequent blocks in are arranged in descending order to generate an optimized generation order list . The preset priority threshold is a dynamic empirical threshold set by clustering analysis (such as K-means algorithm) of the importance scores of all block types in the legal document template library in the training phase of the pre-trained large model.
[0168] If , it is marked as a high-priority block, and the pre-trained large model will be called to generate complete content.
[0169] If , it is marked as a low-priority block: if the block allows to be left empty (such as procedural instructions), it is skipped; if it is a necessary block (such as party information), fill in the default value.
[0170] When the user edits the generated content, the value of the corresponding block type is updated in real time, and the recalculation of is triggered.
[0171] The generated structured document blocks are combined in the order of legal logical topology, and the combined content is checked for legal clause reference labels to output judicial documents.
[0172] Based on the generation order list of structured document blocks, all block contents are spliced in topological order to generate an initial document draft;
[0173] Scan the initial document draft and extract all legal clause reference labels (such as "Article XX of the Criminal Law" or "Article XX of the Criminal Law") through regular expressions to establish a list of labels to be verified;
[0174] For each legal clause reference label in the list of labels to be verified, perform string matching verification in the predefined legal clause library. The predefined legal clause library is loaded from the public legal regulations library, and string matching is used to check the validity of the label;
[0175] If the label cannot pass the string matching verification, input the invalid label and the corresponding context text into the pre-trained large model for verification; the pre-trained large model outputs three candidate corrected labels (sorted by confidence) based on the legal knowledge base; automatically select the label with the highest confidence to replace the original text, and record the correction log;
[0176] Save the verified content as a judicial document in the format of a text file or rich text, which can be directly printed or exported.
[0177] In summary, this invention achieves precise interception of legal logic errors through node-level conflict detection of legal element dependency graphs and text coordinate anchoring technology. During user editing, the system compares discrepancies with the node relationships of the legal element dependency graph in real time. After identifying contradictory nodes, it generates legal clause conflict verification questions and precisely embeds these questions into the text coordinates of the specific editing location. The editing path weight dynamically adjusts the document block generation order, and necessary blocks are automatically selected based on statutory rule topological constraints. Rigid verification of legal element dependencies is implemented at every modification, forming a closed-loop self-maintaining mechanism from conflict detection to correction verification.
[0178] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A simplified and rapid case handling intelligent assistance system based on a large model, characterized in that: include, The semantic parsing module receives case description text input by the user, performs semantic parsing on the case description text using a pre-trained large model, and dynamically extracts the set of legal elements of the case. The element verification module, based on a set of legal elements, generates two-way verification and questioning questions from a pre-trained large model, feeds them back to the user interface and receives correction responses, and updates the set of legal elements. The integrity judgment module dynamically judges the integrity status of legal elements based on the updated set of legal elements. If the legal elements are complete, the document generation process is triggered. If the legal elements are missing, new two-way verification and challenge questions are regenerated until the legal elements are complete. In the document generation module, when the legal elements are in a complete state, a generative dialogue guidance framework is initiated, and the pre-trained large model outputs structured document blocks step by step. The conflict detection module monitors user editing behavior in real time during the output of structured document blocks. If modifications are made, an adversarial verification mechanism is triggered to generate legal logic conflict verification questions. The document synthesis module dynamically optimizes the structured document block generation process based on the user's response to the legal logic conflict verification question, records the optimization weight of the user's editing path, and combines document content blocks to generate judicial documents.
2. The intelligent auxiliary system for quick and easy handling of simplified cases based on a large model as described in claim 1, characterized in that: The case description text refers to the natural language text containing the facts and legal elements of the case, which is entered by the user through the interactive interface.
3. The intelligent auxiliary system for quick and easy handling of simplified cases based on a large model as described in claim 2, characterized in that: The process involves semantic parsing of the case description text using a pre-trained large model to dynamically extract the set of legal elements of the case. The specific steps are as follows. A large pre-trained model is obtained by jointly training legal texts and general corpora. The case description text is input into a pre-trained large model for semantic encoding, and the output is a text embedding vector. Based on text embedding vector analysis, the relationship between legal entities and behaviors is identified to determine the illegal subject, type of behavior, and severity of circumstances as legal elements. The logical dependencies between related legal elements are used to generate a legal element dependency graph. Based on the node weights of the legal element dependency graph, the legal elements with weights are dynamically selected to form a legal element set.
4. The intelligent auxiliary system for quick and easy handling of simplified cases based on a large model as described in claim 3, characterized in that: The node weights of the legal element dependency graph refer to the quantitative indicators obtained by jointly modeling the legal association rules and semantic similarity between legal elements through a pre-trained large model.
5. The intelligent auxiliary system for quick and easy handling of simplified cases based on a large model as described in claim 4, characterized in that: The specific steps for updating the set of legal elements are as follows. Based on the semantic boundary clarity of each legal element in the legal element set, the fuzziness score of the legal elements is calculated; Select the legal element with the highest ambiguity score and generate a two-way verification question. The two-way verification challenge includes a positive case assumption and a negative exception assumption; The two-way verification challenge is fed back to the user interface, and the user's response to the positive scenario hypothesis and the negative exception hypothesis is received; Based on the user's selected response, the node relationships of the legal element dependency graph are modified, and the legal element set is updated.
6. The intelligent auxiliary system for quick and easy handling of simplified cases based on a large model as described in claim 5, characterized in that: The specific steps for dynamically determining the completeness status of legal elements based on the set of legal elements are as follows: The number of legal elements in the set of legal elements that have not passed the two-way verification and questioning is counted. When the number of unverified legal elements is zero, the integrity status of the legal elements is marked as complete. When the number of unverified legal elements is greater than zero, the integrity status of the legal elements is marked as missing.
7. The intelligent auxiliary system for quick and easy handling of simplified cases based on a large model as described in claim 6, characterized in that: The generative dialogue guidance framework refers to an interactive mechanism that decomposes a document into its components and generates the content of each component step by step according to the legal logical topology through a pre-trained large model.
8. The intelligent auxiliary system for quick and easy handling of simplified cases based on a large model as described in claim 7, characterized in that: The process of outputting structured document blocks step by step from a pre-trained large model is as follows: Based on the legal element set, match the document template structure to determine the generation order list of structured document blocks; The pre-trained large model is called in the order of generation to output the initial content of each structured document block in sequence, and a user-edited detection node is inserted after the output of each structured document block to output the structured document block.
9. The intelligent auxiliary system for quick and easy handling of simplified cases based on a large model as described in claim 8, characterized in that: The specific steps for generating the legal logic conflict verification problem are as follows. Capture user editing operations on structured document blocks and extract the differences between the edited content and the original content; By comparing the logical consistency of the differing fragments with the legal element dependency graph, contradictory nodes can be identified. Based on the legal clause conflict rules associated with contradictory nodes, legal logic conflict verification questions are generated, and these questions are embedded into the associated context positions of structured document blocks for output.
10. The intelligent auxiliary system for quick and easy handling of simplified cases based on a large model as described in claim 9, characterized in that: The specific steps for generating judicial documents by combining document content blocks are as follows. Analyze user responses to legal logic conflict verification questions and calculate user operation path weights. The block generation priority of subsequent structured document blocks is sorted according to the weight of the user operation path, and the block generation steps of structured documents with block generation priority lower than the preset priority threshold are skipped. The generated structured document blocks are combined according to the legal logical topology order, the combined content is validated by legal clause citation numbers, and the judicial document is output.