Case quality intelligent assessment method and system based on large language model
By building a dynamic evaluation standard library, designing a complete evaluation reasoning chain and a multi-agent system, the problems of untimely evaluation standard updates and low intelligence in existing technologies have been solved, and comprehensive and accurate evaluation and management of case quality have been achieved. The system's adaptability and processing capabilities have been improved, supporting legal decision-making.
Patent Information
- Application Number
- CN202510703458.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-05-29
AI Technical Summary
Existing case quality assessment technologies have problems such as untimely updates of assessment standards, incomplete assessment logic chains, and low system intelligence, making them difficult to adapt to the complex and changing needs of legal cases.
Build an evaluation standard library covering all types of cases, design a complete evaluation reasoning chain, establish a multi-agent system, apply the inexact alternating direction multiplier method algorithm for distributed task allocation, combine planning and reinforcement learning techniques to handle complex related cases, and use forced zero method sparse graph technology to achieve effective learning of case graphs, and finally build a case quality assessment knowledge graph.
It achieves real-time updating and optimization of evaluation standards, improves the adaptability to emerging legal norms and trial practices, realizes comprehensive evaluation and precise management of case quality, improves the accuracy and efficiency of evaluation, enhances the system's ability to handle sudden or unconventional cases, and enhances data support for legal decision-making.
Smart Images

Figure CN120235512B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of legal artificial intelligence technology, and in particular to a method and system for intelligent case quality assessment based on a large language model. Background Art
[0002] Case quality assessment is a crucial component of legal affairs, crucial for ensuring judicial fairness and improving the quality of legal services. With the continued growth and increasing complexity of legal cases, traditional manual assessment methods are no longer able to meet the demands of the modern legal system, necessitating the support and assistance of intelligent technology.
[0003] Currently, common case quality assessment technologies primarily include rule-based assessment systems and simple statistical analysis systems. Rule-based assessment systems use a pre-set rule base to examine cases, such as procedural legality and document formatting; statistical analysis systems assess cases using quantitative metrics like case processing time and appeal rates. While these systems can assist in case quality assessment to a certain extent, their limited evaluation dimensions make them difficult to adapt to the complex and ever-changing demands of legal cases.
[0004] Advanced existing technologies use machine learning to assess case quality. By analyzing historical case data and building assessment models to predict case quality, this technology utilizes natural language processing to parse legal documents and implements feature extraction and classification algorithms to perform preliminary case quality assessments, improving both objectivity and efficiency.
[0005] However, existing technologies have obvious shortcomings when dealing with complex and ever-changing case types: first, there is a lack of a dynamically updated evaluation standard library, which makes it difficult to adapt to ever-changing regulatory requirements; second, the evaluation logic chain is incomplete, making it difficult to comprehensively evaluate the procedural legality, substantive handling appropriateness and legal document standardization of the case; third, the system's intelligence level is not high, and it is unable to achieve accurate management and intelligent evaluation of case quality, especially in handling unplanned online tasks and multi-agent case-related issues. There are obvious shortcomings. Summary of the Invention
[0006] In view of this, the present application provides a case quality intelligent assessment method and system based on a large language model, which solves the problems in the prior art of untimely updating of assessment standards, incomplete assessment logic chain, and low level of system intelligence.
[0007] The present application provides a method for intelligently assessing case quality based on a large language model, including:
[0008] Build an evaluation standard library covering various types of cases based on legal normative documents and trial practices;
[0009] Based on the evaluation criteria library, a complete evaluation reasoning chain is designed, including procedural legitimacy evaluation, substantive treatment appropriateness evaluation, and legal document normativeness evaluation;
[0010] Based on the evaluation reasoning chain, a multi-agent system is constructed, including a case review agent, a quality scoring agent, and an improvement suggestion agent, to achieve intelligent evaluation and analysis of case quality;
[0011] Based on the multi-agent system, the inexact alternating direction multiplier method algorithm is applied to realize distributed task allocation for unplanned online tasks, thereby improving the system's ability to handle sudden or unconventional cases;
[0012] Based on the distributed task allocation results, combined with planning and reinforcement learning technology, the problem of multi-agent case association is solved, and the intelligent processing of complex related cases is realized;
[0013] Based on the multi-agent case association processing results, applying the forced zero method sparse graph technology to achieve effective learning based on case graphs;
[0014] Based on the effective learning results of the case graph, a case quality assessment knowledge graph is constructed to achieve intelligent and precise case quality management and provide data support for legal decision-making.
[0015] Optionally, based on legal normative documents and trial practices, an evaluation standard library covering various types of cases is constructed, including:
[0016] Based on legal normative documents and trial practices, we extract normative requirements and standards related to case quality assessment through text extraction and semantic analysis technology to form a structured normative requirement dataset;
[0017] Based on the data set of the specification requirements, classify it according to case type and evaluation dimension, build a hierarchical evaluation standard model, and generate an initial evaluation standard library;
[0018] Based on the initial evaluation standard library, a dynamic update mechanism is designed that includes new specification document detection, semantic change recognition, and automatic update of standard items to achieve real-time update capabilities of the evaluation standard library;
[0019] Based on the dynamic update mechanism, a standard conflict detection algorithm and coordination strategy are developed to resolve possible conflict problems that may arise during the standard update process through semantic similarity analysis and rule priority determination, thereby achieving real-time update and optimization of the evaluation standard library.
[0020] Optionally, based on legal normative documents and trial practices, text extraction and semantic analysis techniques are used to extract normative requirements and standards related to case quality assessment to form a structured normative requirement dataset, including:
[0021] Based on legal normative documents and trial practices, collect normative documents and form a collection of original documents;
[0022] Based on the original document set, preprocessing the documents using natural language processing technology, including text cleaning, word segmentation, part-of-speech tagging and syntactic analysis, to generate structured text;
[0023] Based on the structured text, named entity recognition and relationship extraction technology are applied to identify evaluation elements and standard items in the text, extract the semantic relationships between them, and construct a preliminary standard element network;
[0024] Based on the specification element network, repeated or similar evaluation elements are merged and standardized through semantic similarity calculation and cluster analysis to form a structured specification requirement data set.
[0025] Optionally, the design of a complete evaluation reasoning chain based on the evaluation criteria library includes:
[0026] Based on the procedural specifications in the evaluation standard library and combined with the reasoning ability of the multi-agent system, a procedural legality evaluation subchain covering the case filing procedure, service procedure, evidence production procedure, and trial procedure is designed to achieve a comprehensive evaluation of the procedural legality of the case;
[0027] Based on the substantive norms in the evaluation standard library and the procedural legality evaluation results, a subchain for evaluating the appropriateness of substantive handling of cases is designed, covering the stages of fact finding, acceptance of various evidences, application of law, and adjudication reasoning, to achieve an accurate assessment of the appropriateness of substantive handling of cases.
[0028] Based on the document specifications in the evaluation standard library and the evaluation results of the appropriateness of the entity processing, a sub-chain for evaluating the standardization of legal documents is designed, including document format, language expression, logical structure, and content integrity, to achieve a detailed evaluation of the standardization of legal documents;
[0029] Based on the procedural legality evaluation subchain, the entity processing appropriateness evaluation subchain and the legal document standardization evaluation subchain, through the multi-task learning and chain reasoning technology of the large language model, each evaluation subchain is integrated, and an inference control mechanism including evaluation sequence control, intermediate result feedback, and evaluation depth adjustment is developed to form a complete case quality evaluation reasoning chain.
[0030] Optionally, based on the evaluation reasoning chain, a multi-agent system including a case review agent, a quality scoring agent, and an improvement suggestion agent is constructed to achieve intelligent evaluation and analysis of case quality, including:
[0031] Based on the evaluation and reasoning chain, a case retrospective agent with the ability to analyze the entire case process is developed. Through time series analysis and causal reasoning, it can perform retrospective analysis of the entire case handling process and identify key nodes and existing problems in case handling.
[0032] Based on the case retrospective analysis results and the evaluation reasoning chain, a quality scoring agent is developed to achieve quantitative scoring of case quality through multi-dimensional evaluation and weight adaptive algorithm, generating evaluation results including overall score and sub-dimensional score;
[0033] Based on the quality scoring results and the evaluation criteria library, an improvement suggestion agent is developed to generate specific and actionable improvement suggestions for dimensions with scores below a first preset threshold through gap analysis and best practice matching, thereby providing guidance for improving case quality;
[0034] Based on the case backtracking agent, the quality scoring agent and the improvement suggestion agent, an agent collaboration framework including task allocation, information sharing and result fusion is designed. Through reinforcement learning to optimize the collaboration strategy, efficient collaborative work among the agents is achieved, forming a complete multi-agent system to realize intelligent evaluation and analysis of case quality.
[0035] Optionally, based on the multi-agent system, an inexact alternating direction multiplier method algorithm is applied to implement distributed task allocation for unplanned online tasks, thereby improving the system's ability to handle sudden or unconventional cases, including:
[0036] Based on the multi-agent system, feature extraction and mathematical modeling are performed on unplanned online tasks to build a task allocation optimization model that includes task features, resource constraints, and time windows;
[0037] Based on the task allocation optimization model, an inexact alternating direction multiplier method algorithm framework is designed. Through problem decomposition, variable update, and multiplier adjustment steps, the global optimization problem is converted into multiple sub-problems that can be solved in parallel. Based on the inexact alternating direction multiplier method algorithm framework, an inexact update strategy including adaptive precision control, early stopping strategy, and approximate solution is developed. By reducing the computational precision requirement of each iteration, the algorithm convergence speed is accelerated.
[0038] Based on the non-precise update strategy, a distributed computing framework that supports multi-node parallel computing is developed. Through task division, node coordination, and result aggregation, efficient distributed processing of unplanned online tasks is achieved.
[0039] Optionally, based on the distributed task allocation results, combining planning and reinforcement learning techniques to solve the multi-agent case association problem and realize intelligent processing of complex related cases, including:
[0040] Based on the distributed task allocation results, a case relevance recognition model is constructed through text similarity analysis, entity recognition, relationship extraction and other technologies to achieve automatic identification of case groups with intrinsic connections;
[0041] Based on the inherently connected case groups, a hierarchical task planning framework is designed, which includes goal decomposition, constraint identification, and action sequence generation. Through symbolic planning and heuristic search, a preliminary action plan is generated for handling related cases.
[0042] Based on the preliminary action plan, develop a reinforcement learning optimization model that includes state representation, reward mechanism, and policy network. Through interaction with the environment and policy iteration, optimize the handling strategy of related cases and improve the handling effect;
[0043] Based on the reinforcement learning optimization model and the hierarchical task planning framework, a dynamic fusion mechanism of planning and learning is realized. Through a two-way feedback mechanism in which planning guides exploration and learning optimizes planning, the adaptability of the strategy is improved while ensuring the rationality of planning, thereby realizing intelligent processing of complex related cases.
[0044] Optionally, based on the multi-agent case association processing results, applying forced zero method sparse graph technology to achieve effective learning based on case graphs and enhance the knowledge representation and reasoning capabilities of the system, including:
[0045] Based on the results of the multi-agent case association processing, a case knowledge graph containing case elements, legal concepts, and processing procedures is constructed through technologies such as entity extraction, relationship recognition, and knowledge fusion, providing a data foundation for graph learning;
[0046] Based on the case knowledge graph, a graph neural network model including a graph convolution layer, an attention mechanism, and a message passing mechanism is designed. Through node feature extraction and edge relationship learning, a preliminary modeling of the case graph structure is achieved.
[0047] Based on the graph neural network model, a forced zero-method sparsification mechanism including L0 regularization, gated activation, and gradient estimation is implemented, by explicitly controlling the model complexity and the number of activated nodes;
[0048] Based on the forced zero-method sparsification mechanism, an adaptive learning algorithm including meta-learning, knowledge distillation, and incremental training is developed. By dynamically adjusting the learning strategy and model structure, it adapts to the graphical characteristics of different types of cases and realizes effective learning based on case graphs.
[0049] Optionally, the effective learning results based on the case graph are used to construct a case quality assessment knowledge graph to achieve intelligent and precise case quality management and provide data support for legal decision-making, including:
[0050] Based on the effective learning results of the case graph, through data cleaning, format conversion, and redundancy elimination technology, multi-source evaluation data including evaluation criteria, case characteristics, evaluation results, and improvement suggestions are integrated to form a unified data set;
[0051] Based on the unified dataset, a knowledge graph model is designed that includes concept hierarchy, relationship types, and attribute definitions. Through ontology engineering and semantic modeling, a conceptual framework for case quality assessment is constructed to guide the construction of the knowledge graph.
[0052] Based on the knowledge graph model and the unified data set, unstructured and semi-structured data are converted into knowledge triples through named entity recognition, relationship extraction, event detection and other technologies to construct an initial case quality assessment knowledge graph;
[0053] Based on the initial case quality assessment knowledge graph, a knowledge reasoning engine including rule reasoning, path reasoning, and statistical reasoning is developed, and a standardized application interface is designed to support multi-dimensional query, intelligent analysis, and precise recommendation of case quality management, thereby realizing intelligent and precise case quality management and providing data support for legal decision-making.
[0054] An embodiment of the present application also provides a computer system, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the above-mentioned case quality intelligent assessment method based on a large language model.
[0055] An embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the above-mentioned case quality intelligent assessment method based on a large language model.
[0056] An embodiment of the present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the above-mentioned case quality intelligent assessment method based on a large language model.
[0057] This application has the following technical effects:
[0058] By building a dynamically updated evaluation standard library, we can achieve real-time updating and optimization of evaluation standards, and improve the system's adaptability to emerging legal norms and trial practices;
[0059] By designing a complete chain of evaluation and reasoning, we can achieve a comprehensive assessment of case quality, covering multiple dimensions such as procedural legality, substantive appropriateness, and legal document standardization;
[0060] Through the construction of a multi-agent system, intelligent assessment and analysis of case quality can be achieved, improving the accuracy and efficiency of assessment;
[0061] By applying the inexact alternating direction multiplier method algorithm, efficient distributed task allocation for unplanned online tasks is achieved, improving the system's ability to handle sudden or unconventional cases;
[0062] By combining planning and reinforcement learning technologies, we can achieve intelligent processing of complex and related cases, improving the efficiency and consistency of related case processing;
[0063] By applying the forced zero method to sparse graph technology, effective learning based on case graphs is achieved, improving the system's knowledge representation and reasoning capabilities;
[0064] By constructing a case quality assessment knowledge graph, we can achieve intelligent and precise case quality management and provide data support for legal decision-making. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for describing the embodiments. The following drawings only show certain aspects of the present application.
[0066] Figure 1 Schematic diagram of the process of intelligent case quality assessment method based on large language model provided in an embodiment of the present application;
[0067] Figure 2 This is a flow chart of the construction and dynamic update mechanism of the case quality assessment standard library provided by the embodiment of the present application;
[0068] Figure 3 This is a flowchart of a case quality assessment reasoning chain based on a large language model provided in an embodiment of the present application;
[0069] Figure 4 This is a flow chart of a specialized intelligent agent system provided by an embodiment of the present application;
[0070] Figure 5 This is a schematic diagram of the distributed task allocation process based on the inexact alternating direction multiplier method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0071] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the disclosure for which protection is sought, but merely represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present disclosure.
[0072] like Figure 1 As shown, an embodiment of the present application provides a case quality intelligent assessment method based on a large language model, which is applied to a case quality intelligent assessment system, including.
[0073] S1: Based on legal normative documents and trial practices, build an evaluation standard library covering various types of cases.
[0074] Step S1 aims to build a comprehensive evaluation criteria library covering all types of cases and design a dynamic update mechanism. This forms the foundation of the entire intelligent case quality assessment system. In actual legal work, the accuracy and timeliness of evaluation criteria directly impact the reliability of the assessment results.
[0075] First, the system needs to collect and organize legal normative documents. Using text extraction and semantic analysis techniques, it extracts the normative requirements and standards related to case quality assessment from various legal provisions, legal interpretations, guiding opinions, and other normative documents.
[0076] Specifically, the system preprocesses the collected raw documents, including text cleaning, word segmentation, part-of-speech tagging, and syntactic analysis. For example, using natural language processing technology, the system can parse the clause "relevant departments shall review and determine the various evidence provided by the parties" into a structured representation of the subject (relevant departments), the obligation (review and determination), and the object (the various evidence provided by the parties).
[0077] Next, the system applies named entity recognition and relationship extraction techniques to identify evaluation elements and criteria within the text and extract the semantic relationships between them. For example, it identifies "acceptance of various types of evidence" as an evaluation element and "the legality, relevance, and authenticity of various types of evidence" as specific criteria. It then establishes a semantic relationship like "acceptance - inclusion - legality judgment of various types of evidence," thereby constructing a preliminary network of standard elements.
[0078] Then, through semantic similarity calculation and cluster analysis, duplicate or similar assessment elements are merged and standardized. For example, "Review of various bases" and "Judgment of various bases" are highly semantically similar and can be merged into a unified "Review and Judgment of various bases" element. This process creates a structured dataset of regulatory requirements.
[0079] Based on this dataset, the system categorizes cases by type (e.g., civil and commercial) and evaluation dimensions (e.g., procedural legality, substantive adequacy, and legal document compliance), constructs a hierarchical evaluation standard model, and generates an initial evaluation standard library. For example, for a particular type of case, an evaluation standard system can be constructed encompassing multiple dimensions, including case filing procedures, service procedures, mediation procedures, and trial procedures.
[0080] Specifically, when constructing a hierarchical evaluation standard model, a top-down, multi-level classification structure is employed, scientifically stratifying the evaluation criteria by case type and assessment dimension. First, at the top level, cases are divided into major categories such as civil and commercial cases based on their nature. Then, at the second level, the categories are further subdivided based on specific areas. For example, civil cases can be subdivided into family disputes and labor disputes, while commercial cases can be subdivided into contract disputes, intellectual property rights, and corporate governance. Within each case type, the system constructs a third level based on the assessment dimensions, uniformly categorizing them into three dimensions: procedural legality, substantive adequacy, and legal document standardization. At the fourth level, the system further refines each assessment dimension into multiple specific indicators. For example, procedural legality includes filing procedures, service procedures, and evidence production procedures; substantive adequacy includes fact determination, acceptance of various evidence, and application of law; and document standardization includes format requirements, language expression, and logical structure.
[0081] The initial evaluation criteria library is generated using a combination of templates and knowledge incorporation. The system first designs a standardized data structure template for each leaf node (specific evaluation indicator), including fields such as indicator name, description, scoring criteria, source, and scope of application. Then, based on the aforementioned regulatory requirements dataset, the system uses a semantic matching algorithm to match and infill the extracted regulatory requirements with the corresponding indicator templates, generating structured evaluation criteria entries. For example, for the "delivery procedures" indicator, the system inscribes specific scoring criteria such as "delivery method complies with statutory requirements, delivery deadlines meet regulations, and delivery records are complete." To ensure the quality and applicability of the criteria library, the system also incorporates an expert review mechanism, inviting legal experts to verify and optimize the initial criteria library to further enhance the scientific and practical nature of the evaluation criteria.
[0082] The resulting initial evaluation criteria library is stored in a graph database, preserving its hierarchical structure while supporting flexible queries and correlation analysis. Through its tree-like index structure, the system can quickly locate the appropriate set of evaluation criteria based on case type and assessment requirements, providing a precise standard basis for subsequent case quality assessments. This hierarchical evaluation criteria model design not only makes the organization of evaluation criteria clearer and more systematic, but also provides a structural foundation for intelligent screening and prioritization during the evaluation process.
[0083] To ensure the timeliness of evaluation standards, the system has designed a dynamic update mechanism. This mechanism includes new regulatory document detection, semantic change identification, and automatic standard item updates. When new regulations or legal interpretations are released, the system automatically detects and extracts the relevant evaluation standards, updating them into the standard library. For example, when relevant departments issue new legal interpretations, the system automatically identifies the content related to case quality assessment and integrates it into the existing evaluation standard library.
[0084] The system has also developed a standard conflict detection algorithm and coordination strategy. Through semantic similarity analysis and rule priority determination, it resolves potential conflicts that may arise during standard updates. For example, when a new legal interpretation differs from the original specification, the system automatically coordinates the conflict based on factors such as legal effectiveness level and enactment time, ensuring the consistency and reliability of the evaluation standard library.
[0085] Through the above steps, the system successfully built an evaluation standard library covering various types of cases, and realized its dynamic update and optimization, providing a reliable standard basis for subsequent case quality assessment.
[0086] S2: Based on the evaluation standard library, design a complete evaluation reasoning chain, including procedural legality evaluation, substantive processing appropriateness evaluation, and legal document normativeness evaluation.
[0087] In this embodiment of the application, based on the procedural specifications in the evaluation standard library and combined with the reasoning ability of the multi-agent system, a sub-chain for program legality evaluation is designed. This sub-chain covers the entire process of case handling.
[0088] Taking the case filing procedure as an example, the system can check whether the case meets the acceptance conditions, whether the case filing review is completed within the statutory period, whether the parties are informed of their rights and obligations in accordance with regulations, and other procedural requirements, thereby achieving a comprehensive assessment of the legality of the case procedure.
[0089] Specifically, the system represents procedural norms as a series of checkpoints and logical relationships. Leveraging the reasoning capabilities of a large language model, it analyzes procedural descriptions in case materials to determine whether they comply with the corresponding norms. For example, regarding service procedures, the system can extract information such as the time, method, and recipient of service from case materials, compare it with statutory requirements, and assess the legality of the service procedure.
[0090] Secondly, based on the substantive norms and procedural legality assessment results in the evaluation standard library, the system designs a sub-chain for the assessment of the appropriateness of substantive handling. This sub-chain focuses on the substantive handling process of the case, including fact finding, acceptance of various evidence, application of law, and reasoning of the judgment.
[0091] For example, in the stage of accepting various types of evidence, the system can evaluate whether the legality, relevance and probative force of various types of evidence in the case have been fully considered, and whether the contradictions between various types of evidence have been reasonably resolved.
[0092] In practice, the system leverages the powerful semantic understanding and logical reasoning capabilities of a large language model to analyze the substantive content of case materials and assess the appropriateness of their handling. For example, in the legal application phase, the system can analyze whether the legal basis in a document is accurate and complete, and whether there are any errors or omissions in the application of the law, thereby assessing the appropriateness of the application of the law.
[0093] Third, based on the document standards and entity processing appropriateness assessment results in the evaluation standard library, the system designs a legal document standardization assessment sub-chain. This sub-chain focuses on the formal and content standards of legal documents, including document format, language expression, logical structure, content integrity and other aspects.
[0094] For example, the system can evaluate whether the format of a document is standardized, whether the language is accurate and concise, whether the arguments are well-structured, and whether the reasoning is sufficient.
[0095] In terms of implementation, the system uses the text analysis capabilities of a large language model to conduct multi-dimensional evaluations of legal documents.
[0096] For example, by analyzing the paragraph structure, keyword distribution and language style of the document, the logical structure and language expression of the document can be evaluated; by comparing the content of the document with the facts of the case and legal provisions, the completeness and accuracy of the document content can be evaluated.
[0097] Finally, the system integrates these evaluation sub-chains, forming a complete case quality assessment reasoning chain through multi-task learning and chain reasoning techniques using a large language model. The system also develops a reasoning control mechanism that includes evaluation sequence control, feedback on intermediate results, and adjustment of evaluation depth to ensure the efficiency and accuracy of the evaluation process.
[0098] For example, the system first assesses the procedural legality of a case. If procedural flaws are found, the depth of subsequent assessments will be reduced accordingly. If the procedural legality assessment is favorable, further in-depth assessments will be conducted on the appropriateness of the substantive handling and the standardization of legal documents. Through this dynamically adjusted assessment strategy, the system can focus assessment resources on key issues and improve assessment efficiency.
[0099] Through the above steps, the system successfully designed a case quality assessment reasoning chain based on a large language model, achieved a comprehensive and accurate assessment of case quality, and provided a methodological basis for subsequent intelligent evaluation and analysis.
[0100] S3: Based on the evaluation reasoning chain, a multi-agent system including a case backtracking agent, a quality scoring agent, and an improvement suggestion agent is constructed to realize intelligent evaluation and analysis of case quality.
[0101] The multi-agent system consists of a case review agent, a quality scoring agent, and an improvement suggestion agent. Each agent is an independent artificial intelligence model with specific functions and structural designs.
[0102] Taking the case backtracking agent as an example, its internal structure includes the following key components:
[0103] Data preprocessing module: responsible for processing the input case materials, including text cleaning, word segmentation, feature extraction, etc.
[0104] The specific implementation uses Python's NLTK and spaCy libraries to perform word segmentation, part-of-speech tagging, and named entity recognition on the text to extract key information.
[0105] Time Series Analysis Module: Uses a sequence model based on the Transformer architecture to identify key events and time points in case processing.
[0106] The sequence model consists of a 6-layer Transformer encoder with a hidden layer dimension of 512, 8 attention heads, and a feedforward network dimension of 2048. The model is trained using the cross-entropy loss function and the Adam optimizer. The initial learning rate is set to 0.0001, and the learning rate is adjusted using cosine annealing. The batch size is 32 and the number of training epochs is 30. To avoid overfitting, weight decay (weight 0.01) and dropout (ratio 0.1) techniques are used.
[0107] Causal reasoning module: Analyzes the causal relationship between events based on the causal graph model and rule engine.
[0108] The causal graph model uses a method based on structural equation modeling (SEM), consisting of three steps: variable selection, edge direction determination, and weight estimation. Variable selection utilizes feature engineering based on domain knowledge; edge direction determination utilizes a scoring-based algorithm (such as the BIC score); and weight estimation utilizes maximum likelihood estimation. The rule engine utilizes the Rete algorithm for efficient pattern matching. The rule base contains approximately 200 domain-specific rules, written by experts and regularly updated.
[0109] The approximately 200 domain-specific rules included in the rule library primarily fall into four categories: case handling procedural rules, causal relationship inference rules, case element association rules, and quality assessment reasoning rules. Case handling procedural rules describe the standard steps and sequential relationships in the case handling process, such as "material review must be completed within 7 days of acceptance" and "party identity verification must be completed before certain procedures." These rules, which account for approximately 30% of the total, are primarily used to determine whether the case handling process complies with procedural requirements.
[0110] Causal inference rules are used to analyze the causal relationships between various links in the case handling process. For example, "If insufficient evidence is collected during the case investigation stage, it will make it difficult to determine the facts" and "If the parties are not fully informed of their rights and obligations, the fairness of the procedure may be questioned." This type of rule accounts for approximately 25% of the total and is mainly used to identify key issues and their root causes in case handling.
[0111] Case element association rules describe the logical relationship between different elements in a case. For example, "If multiple pieces of evidence point to the same fact and corroborate each other, the reliability of the fact finding is improved" and "If there is a clear correlation between the applicable legal standards and the facts of the case, the accuracy of the application of the law is improved." This type of rule accounts for approximately 20% of the total and is mainly used to evaluate the internal logic and consistency of case handling.
[0112] Quality assessment reasoning rules directly target comprehensive judgments on case quality. For example, "If the procedural legality score is lower than 70 points, the case faces a risk of major procedural flaws" and "If the logical structure of the judgment document is confusing and the reasoning is insufficient, the document quality rating shall not be higher than C." These rules account for approximately 25% of the total and are primarily used to derive comprehensive conclusions on case quality based on the evaluation results of various indicators.
[0113] These rules are expressed in a formal language and consist of two parts: a premise and a conclusion. Each rule is assigned a different confidence weight, reflecting its universal applicability and importance. The rule base is constructed using expert knowledge engineering methods and continuously optimized and expanded based on real-world case analysis. During system operation, the rule engine uses the Rete algorithm to achieve efficient pattern matching and rule triggering. It supports forward and backward chaining reasoning, automatically activating relevant rules based on case characteristics and processing status, and enabling intelligent analysis and quality assessment of the case processing process.
[0114] Results Integration Module: This module uses a weighted voting mechanism to integrate the results of time series analysis and causal reasoning to generate the final retrospective analysis report. Weights are dynamically adjusted based on the historical accuracy of each module, with an initial weighting of 0.4 for time series analysis and 0.6 for causal reasoning.
[0115] The training of the entire multi-agent system adopts a phased strategy:
[0116] First, each agent is trained independently, and then optimized collaboratively.
[0117] In the collaborative optimization stage, a reinforcement learning method based on the Actor-Critic architecture is used. Both the Actor network and the Critic network adopt a multi-layer perceptron structure. The Actor network has three hidden layers (sizes of 256, 128, and 64, respectively), uses the ReLU activation function, and the output layer uses Softmax activation; the Critic network has two hidden layers (sizes of 256 and 128, respectively) and uses ReLU activation.
[0118] Training uses the Proximal Policy Optimization (PPO) algorithm with a discount factor γ = 0.99, an advantage estimation parameter λ = 0.95, a learning rate of 3e-4, and a training batch size of 10,000 cases. The reward function is designed to comprehensively evaluate accuracy, efficiency, and consistency: specifically, R = 0.5 × accuracy + 0.3 × efficiency score + 0.2 × consistency score.
[0119] Specifically, in step S3, the system develops a case backtracking agent based on the evaluation reasoning chain. This agent has the ability to analyze the entire case process, and through time series analysis and causal reasoning, it can perform a backtracking analysis of the entire case handling process.
[0120] Specifically, the agent uses timeline analysis and event extraction techniques to extract key events and time points in the case from case materials, constructing a time-series diagram of the case. Then, using causal reasoning techniques, it analyzes the causal relationships between events, identifying key nodes and potential problems in the case. For example, the agent can discover that deficiencies in evidence collection have led to difficulties in subsequent fact-finding, or that insufficient pre-trial preparation has reduced trial efficiency.
[0121] Furthermore, the system develops a quality scoring agent based on case retrospective analysis results and evaluation reasoning chains. This agent uses a multi-dimensional assessment and weighted adaptive algorithm to quantitatively score case quality. For example, for a civil case, the agent can evaluate it based on three dimensions: procedural legality, substantive adequacy, and legal document standardization. These dimensions are further broken down into multiple sub-dimensions, including case filing procedures, service procedures, fact finding, applicable law, document format, and argument logic. Weights are assigned to each dimension and sub-dimension, and both an overall score and sub-dimension scores are calculated.
[0122] In implementation, the intelligent agent uses a multi-level evaluation model to organize the evaluation indicators into a hierarchical structure, and dynamically adjusts the weight of each indicator through an adaptive weight algorithm.
[0123] For example, depending on the type and complexity of the case, the intelligent agent may increase the weight of the fact-finding and law application dimensions, or increase the weight of relevant evaluation dimensions based on the focus of the case dispute, to ensure that the scoring results objectively reflect the quality of the case.
[0124] The multi-level assessment model is a structured evaluation framework that achieves a comprehensive and systematic assessment of case quality through a hierarchical organization of evaluation indicators. The model adopts a tree-like design and consists of four levels: an overall scoring level, a dimensional scoring level, a sub-dimensional scoring level, and a specific indicator level. The overall scoring level represents a comprehensive score of case quality and serves as the final output of the entire assessment. The dimensional scoring level includes three basic dimensions: procedural legality, substantive processing adequacy, and legal document standardization, assessing different aspects of case handling. The sub-dimensional scoring level further breaks down each basic dimension into several key aspects, such as procedural legality, which is divided into case filing procedures, service procedures, and evidence production procedures. The specific indicator level contains the most granular assessment items, such as "completeness of case filing materials" and "compliance with filing time limits" under the case filing procedure.
[0125] Evaluation indicators are the fundamental elements at the bottom level of the multi-level evaluation model. Each indicator is designed to address a specific aspect of case handling, with clear assessment content, scoring criteria, and weighting. For example, within the procedural legality dimension, the service procedure sub-dimension includes specific indicators such as "legality of service method," "timeliness of service," and "standardization of service records." Each indicator has a clear scoring range (usually 0-100) and detailed scoring criteria. For example, the scoring criteria for the "legality of service method" indicator might specify: 100 points for using the legal service method; 80 points for using an alternative service method with sufficient justification; 50 points for using an irregular service method; and 0 points for completely failing to comply with regulations.
[0126] The process of establishing a multi-level evaluation model includes four main steps: indicator system design, weight allocation, scoring rule formulation, and model verification. During the indicator system design phase, the system determines the evaluation factors and hierarchical relationships at each level based on legal norms and expert knowledge, forming a complete indicator tree structure. During the weight allocation phase, the system uses a combination of the Analytic Hierarchy Process (AHP) and the Delphi method to determine the initial weight values of indicators at each level, reflecting the relative importance of different indicators. For example, in the overall scoring, the initial weights of the three dimensions of procedural legality, substantive appropriateness, and legal document standardization may be set to 0.3, 0.5, and 0.2, respectively, indicating that substantive appropriateness occupies a more important position in the case quality assessment.
[0127] The adaptive weighting algorithm can dynamically adjust the weights of each indicator based on the characteristics of the case and the evaluation context, making the evaluation results more accurate. The algorithm adjusts the weights based on three key factors: case type characteristics, case complexity, and focus of dispute. For different types of cases, the algorithm will strengthen the weights of corresponding key dimensions. For example, for commercial contract disputes, the weight of the sub-dimension of applicable law may be increased; for certain types of civil cases, the weight of the sub-dimension of fact determination may be increased. In response to the complexity of the case, the algorithm will calculate the complexity coefficient based on indicators such as the amount of case materials and the number of parties involved, and adjust the weights accordingly. In response to the focus of dispute, the algorithm will identify the main controversial points in the case and increase the weights of the relevant evaluation dimensions to ensure that the evaluation results can reflect the core quality issues of the case.
[0128] Furthermore, the algorithm possesses learning capabilities, continuously optimizing its weight adjustment strategy based on historical evaluation data and expert feedback. Through this adaptive mechanism, the multi-level evaluation model can provide more accurate and targeted quality assessments for different case types and characteristics, significantly improving the reliability and practical value of the evaluation results.
[0129] The system develops an improvement suggestion agent based on the quality scoring results and evaluation standard library.
[0130] Through gap analysis and best practice matching, the agent generates specific, actionable improvement suggestions for dimensions with scores below a first preset threshold. For example, for cases with scores below the first preset threshold for the application of law, the agent can identify errors or omissions in the application of law and provide corrective legal application suggestions. For cases with scores below the first preset threshold for the standardization of documents, the agent can provide specific methods for optimizing the document's structure or enriching its reasoning.
[0131] Specifically, the agent uses gap analysis technology to compare case handling processes with best practices and identify deficiencies. Then, using best practice matching technology, it retrieves similar cases from the knowledge base that have been handled with higher quality, extracts successful experiences, and generates targeted improvement recommendations. For example, based on the case's characteristics, the agent can recommend appropriate evidence collection methods, fact-finding strategies, or applicable legal cases to help improve case handling quality.
[0132] Finally, based on the three agents described above, the system designs an agent collaboration framework. Through reinforcement learning, it optimizes collaboration strategies and enables efficient collaboration among the agents. For example, the analysis results of the Case Review Agent are directly input into the Quality Scoring Agent, which in turn feeds the Suggestion Agent's scoring results into the Improvement Suggestion Agent, forming a closed loop of information flow. Furthermore, the output of the Improvement Suggestion Agent can be fed back to the Case Review Agent to help it refine its analysis methods, forming a feedback optimization mechanism.
[0133] In practice, the system uses a collaborative strategy optimization method based on reinforcement learning. By continuously adjusting the interaction methods and information sharing strategies between agents, it improves overall collaborative efficiency. For example, the system can learn when in-depth information exchange between agents is necessary and when they can work in parallel, thereby improving evaluation efficiency while ensuring quality.
[0134] Through the above steps, the system successfully built a professional multi-agent system, realized the intelligent evaluation and analysis of case quality, and provided strong technical support for improving the efficiency and quality of legal work.
[0135] S4: Based on the multi-agent system, the inexact alternating direction multiplier method algorithm is applied to realize distributed task allocation for unplanned online tasks, thereby improving the system's ability to handle sudden or unconventional cases.
[0136] Step S4 aims to achieve distributed task allocation for unplanned online tasks using the inexact alternating direction multiplier method. In actual legal work, sudden or unconventional cases often require urgent processing. The system needs to be able to efficiently allocate resources to ensure that these tasks are handled in a timely manner.
[0137] First, the system is based on a multi-agent system to perform feature extraction and mathematical modeling of unplanned online tasks.
[0138] For example, for a batch of sudden case quality assessment tasks, the system can extract the characteristics of each task, such as case type, complexity, priority, estimated processing time, etc., and build a task allocation optimization model that includes task characteristics, resource constraints, and time windows.
[0139] The system extracts case task features using multi-source data fusion and feature engineering. For case type characteristics, the system first automatically identifies the case category through text classification technology. Using a BERT-based hierarchical classification model, the system maps case documents to predefined case types, such as civil, commercial, and administrative, and further breaks them down into specific subcategories. This classification model utilizes a transfer learning strategy, fine-tuning the model using annotated data based on a pre-trained model of legal texts, achieving classification accuracy exceeding 95%.
[0140] The BERT-based hierarchical classification model is used for case type identification. Its construction and training process is as follows:
[0141] The model architecture adopts a two-level classification structure: the first level corresponds to broad case categories (such as civil, administrative, and enforcement), and the second level corresponds to subcategories (such as contract disputes under civil law). The basic pre-trained model uses the Chinese Legal BERT (Legal-BERT-Chinese). This model is domain-adapted and pre-trained on 5 million legal documents based on the general Chinese BERT. It consists of a 12-layer Transformer encoder with a hidden layer dimension of 768, 12 attention heads, and a total of approximately 110M parameters.
[0142] On this basis, a hierarchical classifier is constructed: the first-level classifier uses BERT's [CLS] tag output connected to a fully connected layer (768×5, corresponding to 5 major categories), using softmax activation; the second level contains multiple classifiers, each corresponding to a sub-category under a major category, with a structure of BERT's [CLS] tag output connected to a fully connected layer (the dimension depends on the number of subcategories under each major category, such as if there are 12 subcategories under civil cases, it is 768×12), also using softmax activation.
[0143] The training process is divided into two stages:
[0144] In the first stage, the first-level classifier is trained, the parameters of the bottom 9 layers of BERT are frozen, and only the top 3 layers and the classification layer are fine-tuned. A weighted cross-entropy loss function is used (the weights are set inversely proportional to the number of samples in each category to address the problem of class imbalance).
[0145] In the second stage, each second-level classifier is trained separately, and the bottom parameters of BERT are also frozen, using the weighted cross entropy loss function.
[0146] Training hyperparameter range:
[0147] Learning rate: [1e-5, 2e-5, 3e-5, 5e-5], finally choosing 2e-5;
[0148] Batch size: [16, 32, 64], 32 was finally selected;
[0149] Number of training rounds: [3, 4, 5, 6], 4 rounds were finally selected;
[0150] Weight decay: [0.01, 0.05, 0.1], finally choosing 0.01;
[0151] Learning rate warm-up ratio: [0.05, 0.1, 0.15], finally 0.1 is selected;
[0152] Dropout rate: [0.1, 0.2, 0.3], finally 0.1 is selected;
[0153] The training data consists of 50,000 annotated cases, divided into training, validation, and test sets in an 8:1:1 ratio. Training utilizes the AdamW optimizer with a cosine learning rate scheduling strategy. On an RTX 3090 GPU, the first phase of training takes approximately four hours, while the second phase of training for each classifier takes approximately one to two hours. The model achieved an overall accuracy of 95.3% on the test set, with F1 scores exceeding 92% for all major categories.
[0154] Case complexity feature extraction is based on a comprehensive calculation of multiple indicators, including: document volume (total number of pages and words in the case materials), entity quantity (number of parties involved), factual complexity (number of disputed points and evidentiary materials), and legal application (involvement of legal requirements and difficulty level of legal application). The system uses a weighted summation model to calculate complexity scores, with weights for each indicator determined through regression analysis. The complexity score is ultimately standardized to a 1-10 scale for ease of subsequent processing.
[0155] The priority feature is based on case urgency and importance. The system automatically extracts time constraints from case information (such as statutory processing deadlines and applicant-requested deadlines) to calculate urgency. It also assesses importance based on factors such as the scope of the case, the amount involved, and public attention. Using a decision tree model, the system maps these factors into three priority levels: high, medium, and low, and assigns numerical weights (high: 5, medium: 3, low: 1).
[0156] Estimated processing times are calculated based on historical data and machine learning models. The system builds a random forest regression model that incorporates characteristics such as case type, complexity, and handler experience. By analyzing the actual processing times of similar historical cases, the system predicts the processing time for new cases. This model uses ten-fold cross-validation and maintains an average prediction error of less than 15%, providing a reliable basis for time estimation for task allocation.
[0157] The random forest regression model is used to estimate case processing time. Its construction and training process is as follows:
[0158] The model input features contain 25 dimensions, which are divided into four categories:
[0159] Basic characteristics of the case (7 dimensions): case type (one-hot encoding), amount involved (logarithmic transformation), number of parties involved, whether it involves foreign parties, etc.;
[0160] Complexity features (8 dimensions): number of evidence, number of legal citations, number of dispute points, professional and technical difficulty score, etc.
[0161] Historical statistical features (6 dimensions): average processing time for similar cases, historical efficiency of processing personnel, caseload during the same period, etc.
[0162] Procedural characteristics (4 dimensions): whether an appraisal is required, whether a hearing is required, the expected number of procedures, etc.
[0163] The model is built using the scikit-learn library, and the core parameter setting range is:
[0164] Number of decision trees (n_estimators): [100, 200, 300, 500, 1000], 500 was finally selected;
[0165] Maximum tree depth (max_depth): [10, 15, 20, 25, 30, None], 20 is finally selected;
[0166] Minimum number of samples required for splitting (min_samples_split): [2, 5, 10, 15], 5 is finally selected;
[0167] Minimum number of leaf node samples (min_samples_leaf): [1, 2, 4, 8], 2 is finally selected;
[0168] Feature sampling ratio (max_features): ['auto', 'sqrt', 'log2', 0.7, 0.8], finally choose 'sqrt';
[0169] Sample sampling ratio (bootstrap): [True, False], ultimately select True;
[0170] Use sample weight (sample weight is based on the case time limit): [True, False], finally select True
[0171] The training data consists of 100,000 historical case records. After data cleaning and outlier processing (using the IQR method to remove outliers in processing time), it is split into a training set (80%) and a test set (20%) in chronological order. Parameter optimization uses a grid search combined with 5-fold cross-validation, with root mean square error (RMSE) and mean absolute percentage error (MAPE) as evaluation metrics.
[0172] The final model achieved a MAPE of 13.7% and an RMSE of 2.6 days on the test set. Feature importance analysis showed that case type, amount of evidence, and number of disputed points were the three most significant factors influencing processing time. The model training time was approximately 15 minutes (on a 16-core CPU), and prediction time for a single case was less than 10 milliseconds, meeting the requirements of real-time applications.
[0173] The task allocation optimization model is built based on the mixed integer linear programming framework. The model defines the decision variables x ij Indicates whether task i is assigned to agent j. The objective function is designed as a multi-objective optimization: minimize the weighted sum of the total completion time and the agent load imbalance. The mathematical expression is:
[0174] minimize α∑ j max(∑ i x ij ×t i )+β∑ j |∑ i x ij ×t i -∑ i t i / m|
[0175] Among them, t i represents the estimated processing time of task i, m is the number of agents, and α and β are weight coefficients. The constraints include: each task must and can only be assigned to one agent (∑ j x ij = 1); Agent capability limit (∑ i x ij ×t i ≤C j , C jis the upper limit of agent j's processing capacity); priority constraints (higher-priority tasks must be assigned first); and time window constraints (tasks must be completed within a specified time window). This model integrates task characteristics, resource constraints, and time requirements to form a structured optimization problem, providing a clear mathematical framework for subsequent algorithmic solutions.
[0176] In specific implementation, the system models the task allocation problem as an optimization problem:
[0177] minimize f(x)+g(z) subject to Ax + Bz =c
[0178] Here, f(x) represents the efficiency goal for task allocation, g(z) represents the resource constraint goal, and Ax+Bz=c represents the constraint that tasks must be fully allocated. For example, f(x) can represent the goal of minimizing task completion time, g(z) can represent the goal of balancing resource utilization, and the constraint ensures that all tasks are allocated without exceeding resource capacity.
[0179] Secondly, the system designs an inexact alternating direction method of multipliers (ADMM) algorithmic framework based on the task allocation optimization model. This algorithm transforms the global optimization problem into multiple subproblems that can be solved in parallel through problem decomposition, variable updating, and multiplier adjustment steps. For example, if 10 agents need to handle 30 evaluation tasks, the system can decompose the global task allocation problem into local problems for 10 agents, with each agent computing its assigned subset of tasks in parallel.
[0180] The core of the algorithm framework is to solve the problem iteratively: Update x:
[0181] x(k+1)≈argmin(f(x)+ρ / 2||Ax+Bzk-c+uk||²)
[0182] Update z:
[0183] z(k+1)≈argmin(g(z)+ρ / 2||Ax(k+1)+Bz-c+uk||²)
[0184] Update the multiplier u:
[0185] u(k+1)=uk+(Ax(k+1)+Bz(k+1)-c)
[0186] Specifically, the system designs an inexact alternating direction method of multipliers (ADMM) algorithm framework based on problem decomposition and distributed optimization principles. First, the system reformulates the global task allocation optimization problem into a form with a separation structure:
[0187] minimize f(x) + g(z)
[0188] subject to Ax + Bz = c
[0189] Here, x represents the local variables distributed among the agents, such as the task selection plan of each agent; z represents the globally shared variables, such as the final task allocation result; f(x) represents the objective function related to the local variables, such as the agent processing efficiency; g(z) represents the objective function related to the global variables, such as the load balancing degree; the constraint Ax + Bz = c ensures the consistency between the local and global variables.
[0190] The ADMM algorithm framework designed by the system consists of three core steps, forming an iterative solution process. The first step is to update local variables, and each agent solves its own sub-problem in parallel:
[0191] x k+1 = argmin x { f(x) + (ρ / 2)||Ax + Bz k - c + u k || 2}
[0192] Where ρ is the penalty parameter, u is the Lagrange multiplier, and k is the number of iterations. This step enables each agent to optimize its own task selection plan based on the current global allocation plan and the multiplier.
[0193] The second step is the update of global variables, which is performed by the central coordinator:
[0194] z k+1 = argmin_z { g(z) + (ρ / 2)||Ax k+1 + Bz - c + u k || 2}
[0195] This step comprehensively considers the latest solutions of all intelligent agents, optimizes the global task allocation plan, and ensures the realization of the overall system goals (such as load balancing).
[0196] The third step is the multiplier update, which is also performed by the central coordinator:
[0197] u k+1 = u k + (Ax k+1 + Bz k+1 - c)
[0198] This step adjusts the Lagrange multiplier, penalizes the behavior of violating the constraints, and guides the algorithm to converge to a feasible solution.
[0199] In order to improve the efficiency of the algorithm, the system designed an imprecise update strategy, which allows the use of approximate solutions in the process of solving subproblems. The specific implementation includes: (1) dynamic precision control strategy, which uses a lower precision threshold ε0 (such as 0.1) in the early stage of the algorithm, and gradually improves the precision as the iteration proceeds, following the formula εk = max{ε0γ k , ε min}, where γ is the attenuation factor (such as 0.9), ε min is the minimum accuracy requirement (such as 0.001); (2) early stopping strategy, when the improvement of consecutive iterations in the subproblem solution is less than the threshold δ (such as 0.01), the solution is terminated early; (3) hot start technology, using the result of the previous iteration as the initial solution of the current iteration to accelerate convergence.
[0200] The algorithm framework also includes an adaptive parameter adjustment mechanism that dynamically adjusts the penalty parameter ρ to accelerate convergence. When the ratio of the primal residual to the dual residual exceeds a preset threshold μ (e.g., 10), ρ is increased (ρ = τρ, where τ > 1); when the ratio of the dual residual to the primal residual exceeds μ, ρ is decreased (ρ = ρ / τ). Furthermore, the system incorporates a distributed communication protocol based on exponential backoff. When a node fails to communicate, retries are performed at exponentially increasing intervals, with a maximum of eight retries, ensuring robustness in a distributed environment.
[0201] Third, the system develops an imprecise update strategy based on the ADMM algorithm framework. This strategy accelerates algorithm convergence by reducing the computational precision required for each iteration. Traditional ADMM algorithms require exact solutions to subproblems at each iteration, which is computationally expensive. This imprecise update strategy allows approximate solutions to be used in each iteration, as long as they meet certain precision requirements, significantly improving algorithm efficiency.
[0202] In its implementation, the system uses adaptive precision control, early stopping strategies, and approximate solution methods. For example, a lower-precision solution can be used in the early stages of the algorithm, with the precision requirement gradually increased as the iterations approach convergence. Alternatively, an early-termination iteration method can be used to solve subproblems, stopping the iteration as soon as the improvement in the solution falls below a certain threshold. These strategies significantly reduce computational complexity and improve the system's responsiveness to real-time tasks.
[0203] Finally, the system developed a distributed computing framework based on an imprecise update strategy that supports multi-node parallel computing. This framework achieves efficient distributed processing of unscheduled online tasks through task partitioning, node coordination, and result aggregation. For example, the system can process subproblems in parallel across multiple compute nodes, synchronizing the computational results across nodes through a central coordinator and adjusting the global allocation plan.
[0204] The system utilizes a master-slave architecture, with a central node responsible for task decomposition and result aggregation, while slave nodes solve subproblems. Nodes communicate via message passing, sharing necessary variables and results. This distributed architecture allows the system to fully utilize computing resources, improving processing throughput and responsiveness.
[0205] Through the above steps, the system successfully implemented distributed task allocation based on the inexact ADMM algorithm, improved the system's ability to handle sudden or unconventional cases, and ensured efficient task allocation and processing under limited resources.
[0206] S5: Based on the distributed task allocation results, combined with planning and reinforcement learning technology, the problem of relational multi-agent case association is solved to achieve intelligent processing of complex related cases.
[0207] Step S5 aims to combine planning and reinforcement learning techniques to solve the problem of relational multi-agent case association and achieve intelligent processing of complex and connected cases. In legal practice, multiple cases often have relationships between them. Collaborative processing of these related cases is crucial to improving legal efficiency and consistency.
[0208] First, based on the distributed task allocation results, the system constructs a case relevance identification model using techniques such as text similarity analysis, entity recognition, and relationship extraction. This model automatically identifies clusters of cases with inherent connections, providing a foundation for subsequent collaborative processing. For example, the system can identify the following relevance patterns: entity overlap (e.g., multiple cases involving individuals associated with the same case), factual connections (e.g., multiple cases arising from a traffic incident), and legal relationship connections (e.g., multiple cases arising from a corporate dispute).
[0209] Specifically, the system uses a text similarity algorithm to calculate the similarity between cases. It then uses named entity recognition to extract key entities (such as parties, locations, and events) within each case. Relationship extraction analyzes the relationships between these entities, thereby identifying potential case connections. For example, the system can detect the presence of the same person associated with the case, "Zhang," in multiple cases, or multiple cases involving the same traffic accident, thereby determining a connection between the cases.
[0210] The case relevance identification model utilizes multimodal feature fusion and deep learning methods. The model comprises four key components: a text similarity analysis module, an entity recognition and association module, a relationship extraction module, and a multi-feature fusion classification module, forming an end-to-end case relevance identification process.
[0211] The text similarity analysis module first preprocesses the case documents, including word segmentation, stop word removal, and synonym replacement. It then uses the Sentence Transformer (BERT) model to extract semantic features and generate a 768-dimensional text vector representation. For any two cases, the cosine similarity and Euclidean distance between their text vectors are calculated. A thresholding method (similarity greater than 0.7 or distance less than 0.3) is used to preliminarily screen for potentially related case pairs. To improve efficiency, the system uses locality-sensitive hashing (LSH) technology to construct an index, reducing the similarity calculation complexity from O(n²) to O(n log n), enabling rapid retrieval of large-scale case databases.
[0212] The entity recognition and association module is responsible for extracting key entities from case text and establishing associations between them. This module utilizes a BiLSTM-CRF (bidirectional long short-term memory network-conditional random field) sequence annotation model to identify entity types such as names, organizations, locations, time periods, and legal clauses in cases. Model training utilizes a transfer learning strategy, using 10,000 annotated cases for domain adaptation based on a common Chinese NER model, achieving an F1 score of 92% for entity recognition. The entity association stage utilizes a combination of rule-based and learning methods: For entities with the same name, the system determines whether they are identical by comparing attributes (such as ID number and registered address). For entities with different names, the system identifies potential associations through knowledge graph queries and entity linking techniques. The system calculates entity overlap as a key feature of case association.
[0213] The BiLSTM-CRF model is used for entity recognition in case texts. Its construction and training process is as follows:
[0214] The model architecture consists of four layers:
[0215] Word embedding layer: concatenates pre-trained legal domain word vectors (300 dimensions) with character vectors (200 dimensions), while integrating part-of-speech features (20-dimensional one-hot encoding).
[0216] Feature extraction layer: bidirectional LSTM network, extracting context-related feature representations;
[0217] Nonlinear mapping layer: a time-distributed fully connected layer that maps LSTM features to the label space;
[0218] Label decoding layer: Conditional Random Field (CRF), considering the dependency between labels and decoding the optimal label sequence;
[0219] The target entity types include 12 categories: person name, organization name, location, time, amount, legal terms, cause of action, legal document, judicial authority, case number, evidence type, and litigation request.
[0220] Training hyperparameter range:
[0221] LSTM hidden layer dimensions: [128, 256, 384, 512], ultimately choosing 256 (512 dimensions after bidirectional stacking);
[0222] Number of LSTM layers: [1, 2, 3], ultimately choosing 2;
[0223] Dropout rate: [0.3, 0.4, 0.5, 0.6], finally 0.5 is selected;
[0224] Learning rate: [0.0005, 0.001, 0.002, 0.005], finally choosing 0.001;
[0225] Batch size: [16, 32, 64, 128], 64 was finally selected;
[0226] L2 regularization strength: [1e-5, 1e-4, 1e-3], finally choosing 1e-4;
[0227] Gradient clipping threshold: [1.0, 3.0, 5.0, 10.0], 5.0 was finally selected;
[0228] The training data consists of 10,000 manually annotated legal documents, totaling approximately 5 million words, annotated using the BIO annotation scheme. The data is divided into training, validation, and test sets in an 8:1:1 ratio. Training is performed using the Adam optimizer with an early stopping strategy (stopping if the validation set F1 score shows no improvement after five consecutive epochs). The model takes approximately 8 hours to train on a single RTX 2080Ti GPU, with a total of 30 epochs.
[0229] The model achieved an overall F1 score of 92.3% on the test set, with F1 scores of 94.7% for person names, 95.2% for legal clauses, 96.8% for time entities, 98.1% for case numbers, and 89.3% for organization names. In terms of inference speed, processing a 1,000-word text on a CPU takes an average of approximately 200 milliseconds.
[0230] The Relationship Extraction module analyzes the semantic relationships between entities in a case and identifies key relationship types that may indicate case connections. This module utilizes a BERT-based relationship classification model to identify relationship types such as "different parties involved in the same incident," "multiple cases involving the same party," and "a case and its derivatives." Model training utilizes a remote supervision method to automatically construct a training set and fine-tune the model using high-quality, manually annotated data, achieving a relationship classification accuracy of 85%. To handle long-range entity relationships in long texts, the system incorporates dependency parsing and shortest dependency path features to enhance the model's ability to capture relationships in complex contexts.
[0231] The multi-feature fusion classification module integrates the output features of the first three modules to construct a final judgment model for case relevance. This module uses the Gradient Boosting Decision Tree (GBDT) algorithm. Input features include: text similarity scores (cosine similarity, Euclidean distance, Jaccard coefficient), entity overlap features (number of shared entities, matching degree of important entities), relationship features (key relationship types and their confidence levels), temporal features (chronological proximity of cases), and case attribute features (case type similarity, correlation of case amounts involved). The model outputs the type of association between case pairs (e.g., entity association, factual association, legal relationship association) and its confidence level.
[0232] The gradient boosted decision tree (GBDT) model is used to judge case relevance. Its construction and training process is as follows:
[0233] The model input features contain 35 dimensions and are divided into five categories:
[0234] Text similarity features (7 dimensions): TF-IDF cosine similarity, bag-of-words Jaccard similarity, BM25 similarity, BERT semantic similarity, etc.
[0235] Entity overlap features (10 dimensions): the number and proportion of shared personal name entities, the number and proportion of shared organizational entities, the number and proportion of shared location entities, the temporal proximity of shared time entities, the number and proportion of shared legal clauses, etc.
[0236] Relationship characteristics (6 dimensions): strength of the connection between the case subjects, similarity of legal relationships, degree of connection between case facts, etc.;
[0237] Time characteristics (4 dimensions): time difference between case occurrence, case filing, case closing, time overlap, etc.
[0238] Case attribute characteristics (8 dimensions): similarity of case types, relevance of the amount involved, identity of the handling agency, identity of the judge, etc.;
[0239] The model is implemented using the XGBoost library, with core parameter settings ranging from:
[0240] Number of weak learners (n_estimators): [100, 200, 300, 500, 1000], 500 was finally selected;
[0241] Learning rate (learning_rate): [0.01, 0.05, 0.1, 0.2], finally choosing 0.05;
[0242] Maximum tree depth (max_depth): [3, 4, 5, 6, 7, 8], 6 is finally selected;
[0243] Subsample ratio: [0.7, 0.8, 0.9, 1.0], 0.8 is finally selected;
[0244] Column sampling ratio (colsample_bytree): [0.7, 0.8, 0.9, 1.0], 0.8 is finally selected;
[0245] Minimum child node weight (min_child_weight): [1, 3, 5, 7], 3 is finally selected;
[0246] L1 regularization parameter (alpha): [0, 0.001, 0.01, 0.1, 1], 0.01 was finally chosen;
[0247] L2 regularization parameter (lambda): [0.1, 1, 10, 100], finally choose 1;
[0248] Early stopping rounds (early_stopping_rounds): [10, 20, 30, 50], 30 is finally selected;
[0249] The training data consists of 50,000 case pairs, each labeled as "no association," "weak association," "moderate association," or "strong association," along with the specific association type (entity association, factual association, or legal relationship association). The data is divided into training, validation, and test sets in a 7:1:2 ratio. Class imbalance is addressed by increasing the weight of minority class samples, with the weight inversely proportional to the class frequency.
[0250] Parameter optimization was performed using the Bayesian optimization method, with the weighted F1 score (taking into account the importance of each category) as the evaluation metric. The final model achieved a weighted F1 score of 89.7% on the test set. The model achieved 94.3% precision and 92.1% recall for strongly correlated categories, 88.2% precision and 86.5% recall for moderately correlated categories, 82.7% precision and 80.4% recall for weakly correlated categories, and 95.8% precision and 97.2% recall for uncorrelated categories.
[0251] Feature importance analysis shows that BERT semantic similarity, the proportion of shared personal names, the strength of case subject association, and the temporal proximity of cases are the four most important features for determining case relevance. The model trains in approximately 30 minutes (on a 16-core CPU) and predicts the relevance of a single case pair in approximately 20 milliseconds, supporting both batch processing and real-time applications.
[0252] To enhance the model's interpretability, the system incorporates a correlation evidence extraction mechanism that automatically identifies key text fragments, entities, and relationships that lead to correlation judgments and generates explanatory explanations. For example, for two cases determined to be "factually related," the system extracts and identifies the common event descriptions, highlighting key time and location information to help users understand the basis for the correlation judgment. The model utilizes an online learning mechanism, enabling continuous optimization based on user feedback. The accuracy of correlation judgments has increased from an initial 83% to over 90%, effectively supporting the intelligent identification and management of complex, connected cases.
[0253] Next, the system designs a hierarchical task planning framework based on the identified interconnected case clusters. This framework generates preliminary action plans for handling related cases through goal decomposition, constraint identification, and action sequence generation. For example, for a group of interconnected financial cases, the system can design a hierarchical processing plan: the first layer determines the case processing sequence and dependencies, the second layer plans the specific processing steps for each case, and the third layer arranges resource allocation and time scheduling.
[0254] The system uses symbolic planning and heuristic search methods. Symbolic planning represents case processing as a series of states and actions, defining preconditions and effects to construct a state transition model for case processing. Heuristic search leverages domain knowledge to design heuristic functions that guide the search process and find high-quality preliminary action plans. For example, the system might plan to handle key core cases first, followed by dependent cases, to ensure efficient and consistent overall processing.
[0255] The heuristic function design, based on expertise and empirical patterns in the case handling field, is a key component guiding the search algorithm in exploring the solution space. The heuristic function h(n) developed by the system evaluates the estimated cost from the current state node n to the target state, using a weighted combination of multiple features: h(n) = w1f1(n) + w2f2(n) + ... + w k f k (n), where f1 to f k is the characteristic function, w1 to w k The core feature functions include: the processing step distance function (estimates the cost of completing the remaining necessary steps), the resource matching function (evaluates the degree of match between current resource allocation and case requirements), the quality risk function (predicts the quality issues that may be caused by the current path), and the processing efficiency function (estimates the time efficiency of processing cases according to the current path).
[0256] The processing step distance function, based on critical path analysis of case processing, calculates the minimum distance between the current state and the target state in terms of processing steps. For example, for a case in the "evidence investigation" stage, the system uses a case-specific processing flow template to identify the necessary steps required to reach a closed state, such as "fact determination," "applicable law," and "judgment document production." The system then estimates the standard processing cost for each step based on historical data, accumulating the total distance estimate. The resource matching function assesses the degree to which current resource allocation supports case processing, taking into account the match between the expertise and experience level of the case handlers and the case type and complexity. A higher match indicates a lower estimated cost.
[0257] The quality risk function uses case characteristics and the current processing status to predict the risk of potential quality issues, such as procedural flaws, unclear factual determination, and legal application errors. This function is implemented using a random forest model trained with historical case quality assessment data. It takes case characteristics and current status characteristics as input and outputs a quality risk score. The processing efficiency function assesses the time efficiency of the current processing path, taking into account case complexity, resource utilization, and the possibility of parallel processing steps, to estimate the time cost required to reach the target status.
[0258] The heuristic function weighting employs an adaptive mechanism, dynamically adjusting the weights of various characteristic functions based on case type and processing stage. For example, for urgent cases approaching expiration, the system increases the weight of the processing efficiency function; for cases with significant social impact, the weight of the quality risk function is increased. Weight adjustment follows a Bayesian optimization approach, continuously optimizing the weight configuration based on historical case processing results. The heuristic function design ensures admissibility (does not overestimate actual costs) and consistency (satisfies the triangle inequality), guaranteeing the optimality and efficiency of the search algorithm.
[0259] The heuristic function guides the search process through the A algorithm, which combines heuristic evaluation with actual known costs. It selects nodes to expand according to the principle f(n) = g(n) + h(n), where g(n) is the known cost from the initial state to the current node n, and h(n) is the estimated cost from n to the target state. To handle large search spaces, the system employs an iteratively deepening variant of A. By gradually increasing the search depth limit, it finds suboptimal solutions within a limited time and supports interruption and return to the current best solution at any time, meeting real-time response requirements. During the search process, the system uses pruning techniques to reduce the search space. These include pruning invalid paths based on domain knowledge, pruning infeasible paths based on resource constraints, and pruning suboptimal paths based on upper bound estimates.
[0260] The generation of a high-quality preliminary action plan adopts a three-stage strategy: skeleton planning, detail enrichment, and quality optimization. During the skeleton planning stage, the system uses heuristic search to identify the main processing paths and key nodes based on the standard processing templates and key decision points of the case type, forming the plan skeleton. During the detail enrichment stage, the system assigns specific resources, time, and execution methods to each processing step in the skeleton, completing the action details. During the quality optimization stage, the system applies quality inspection rules to evaluate the quality risks of the preliminary plan and make targeted adjustments, such as adding review steps for key links, optimizing resource allocation, and adjusting the processing sequence.
[0261] To handle the complexity of connected cases, the system incorporates a hierarchical planning mechanism. This mechanism first formulates an overall handling strategy for a cluster of connected cases, determining the priorities and dependencies between cases. It then plans specific handling paths for each case. Finally, it conducts cross-case coordination and optimization to ensure consistent and efficient handling of connected cases. This heuristic search approach, combined with domain knowledge, enables the system to generate high-quality case handling action plans within a reasonable timeframe, effectively supporting the intelligent handling of complex cases.
[0262] Third, based on the initial action plan, the system develops a reinforcement learning optimization model. This model optimizes the handling strategy of related cases through state representation, reward mechanism, and policy network.
[0263] Specifically, the system uses the case processing status as its environment. The agent's actions include case analysis, evaluation, and recommendation generation. Reward signals are derived from processing efficiency and consistency metrics. Through interaction with the environment and strategy iteration, the system continuously adjusts and optimizes its processing strategies to improve results.
[0264] In its implementation, the system uses deep reinforcement learning methods, such as deep Q-learning or policy gradient methods. It designs a suitable state representation to capture the key characteristics of case processing; a multi-objective reward function to balance processing efficiency, quality, and consistency; and a deep neural network as the policy network to learn the mapping from states to optimal actions. By continuously trying different strategies and learning from experience, the system discovers the optimal solution.
[0265] Finally, the system implements a dynamic fusion mechanism of planning and learning. This mechanism ensures the rationality of planning while improving the adaptability of the strategy through two-way feedback: planning guides exploration and learning optimizes planning.
[0266] For example, the initial plan provides the overall framework and constraints for handling the case, and reinforcement learning explores and optimizes specific strategies within this framework. At the same time, the learning results can in turn adjust and improve the plan.
[0267] Specifically, the system uses a hybrid architecture that organically combines symbolic planning and reinforcement learning. The planning module provides high-level structured knowledge to guide the exploration direction of reinforcement learning. The reinforcement learning module discovers more optimal execution strategies through practical interaction experience and feeds learning results back to the planning module to optimize subsequent planning.
[0268] For example, the system may discover through reinforcement learning that when handling related financial cases, it is more efficient to handle the core cases with the largest amounts first and then its derivative cases. This discovery can be integrated into planning knowledge to guide the handling of similar cases in the future.
[0269] Through the above steps, the system successfully achieved intelligent processing of complex related cases, improved the efficiency and consistency of related case processing, and provided strong support for legal work.
[0270] S6: Based on the multi-agent case association processing results, apply the forced zero method sparse graph technology to achieve effective learning based on case graphs.
[0271] Step S6 applies graph sparsification techniques using forced zeros to achieve effective learning based on case graphs, improving the system's knowledge representation and reasoning capabilities. Case data typically exhibits complex graph structures, containing numerous entities and relationships. Effectively learning this graph structure is crucial for case quality assessment.
[0272] First, the system constructs a case knowledge graph based on the results of multi-agent case association processing.
[0273] This graph contains information such as case elements, legal concepts, and the handling process, providing a data foundation for graph learning. For example, for a certain type of intellectual property case, the graph may contain the following nodes: Case-related Company A, Case-related Company B, Patent X, Witness C, Appraisal Report D, etc.
[0274] Specifically, the system uses entity extraction technology to identify key entities from case materials, relationship recognition technology to discover connections between entities, and knowledge fusion technology to integrate information from different sources into a unified knowledge graph. For example, the system can extract entities such as parties, various references, and legal standards from certain documents, identify the reference and support relationships between them, and construct a knowledge graph representing the case structure.
[0275] Secondly, the system designs a graph neural network model based on the case knowledge graph.
[0276] This graph neural network model incorporates graph convolutional layers, an attention mechanism, and a message passing mechanism. By extracting node features and learning edge relationships, it achieves a preliminary modeling of the case graph structure. A typical graph neural network architecture includes: an input layer (initial node features), a graph convolutional layer (aggregating information about adjacent nodes), an attention mechanism (focusing on important nodes and edges), and an output layer (node or graph representation).
[0277] In terms of implementation, the system adopts advanced graph neural network architectures such as Graph Convolutional Network (GCN) or Graph Attention Network (GAT).
[0278] For example, using GCN, the system can aggregate node neighborhood information and learn node representations; using GAT, the system can focus on important nodes and edges, improving learning efficiency. These models can capture complex patterns and structural features in case graphs, providing effective representations for subsequent tasks.
[0279] The graph attention network is used for structural learning of case knowledge graphs. Its construction and training process is as follows:
[0280] The model architecture adopts a multi-layer graph attention network structure:
[0281] Input layer: node initial feature vector (128 dimensions), which is composed of text semantic features (64 dimensions) and structural features (64 dimensions);
[0282] The first graph attention layer has 8 attention heads, each of which outputs 32-dimensional features, which are combined into 256 dimensions.
[0283] Batch normalization layer: standardizes feature distribution and stabilizes the training process;
[0284] The second graph attention layer has 8 attention heads, each of which outputs 32-dimensional features, which are combined into 256 dimensions.
[0285] Global pooling layer: uses graph pooling with an attention mechanism to compress graph-level features into a 384-dimensional vector;
[0286] Output layer: designed according to the downstream task, such as the case classification task uses the Softmax output layer;
[0287] Key parameters for attention mechanism implementation:
[0288] Attention vector dimension: 64;
[0289] LeakyReLU negative slope: 0.2;
[0290] Attention dropout rate: 0.6;
[0291] Feature dropout rate: 0.5;
[0292] L0 sparsification regularization parameter:
[0293] Temperature parameter (initial value): 2.0;
[0294] Temperature lower limit: 0.5;
[0295] Temperature annealing rate: 0.99;
[0296] Gating variable initialization method: uniform distribution U(-0.1, 0.1);
[0297] L0 regularization coefficient (λ): 0.001;
[0298] Training hyperparameter range:
[0299] Learning rate: [0.0001, 0.0005, 0.001, 0.005], finally 0.001;
[0300] Learning rate scheduling: ReduceLROnPlateau, factor 0.5, patience value 10;
[0301] Batch size: [16, 32, 64], 32 was finally chosen (based on GPU memory limitations);
[0302] Number of training rounds: 200, using early stopping strategy and patience value of 30;
[0303] Gradient clipping threshold: 1.0;
[0304] Weight decay: [0.0001, 0.0005, 0.001], finally 0.0005 is selected;
[0305] The training data consists of 10,000 case subgraphs, each containing an average of 30 nodes and 80 edges. Node types include cases, individuals, organizations, legal standards, facts, and documents. Downstream tasks include case classification, association prediction, and quality assessment. The data is divided into training, validation, and test sets in a 7:1:2 ratio.
[0306] The training process implements a dynamic temperature adjustment mechanism. As training progresses, the temperature parameter is gradually reduced, shifting the distribution of gating variables from continuous to discrete, promoting the formation of a sparse structure. Furthermore, the model employs a weight initialization technique, assigning larger values to the initial gating variables of important edges to accelerate convergence.
[0307] The model trained on a GPU for approximately four hours, achieving a case classification accuracy of 94.2% on the test set, an F1 score of 91.3% for association prediction, and a mean squared error of 0.043 for quality assessment. The sparsification effect was significant, ultimately retaining approximately 25% of the original edges and reducing the number of model parameters from 3.5M to 1.2M. The inference speed increased by approximately three times, and the average processing time for a medium-sized case graph (50 nodes) on a CPU decreased from 120 milliseconds to 40 milliseconds.
[0308] Importantly, the sparse model retains the key case knowledge structure. Visual analysis shows that the retained edges are mainly concentrated in the connections between core legal relationships, key factual basis and case subjects, which greatly improves the interpretability and practical value of the model.
[0309] Third, the system implements a forced-zero sparsification mechanism based on graph neural network models. This mechanism, which includes L0 regularization, gated activation, and gradient estimation, reduces the redundancy of the graph representation and improves learning efficiency by explicitly controlling model complexity and the number of activated nodes. Unlike traditional L1 regularization, forced-zero sparsification uses L0 regularization to directly force unimportant connections to be exactly zero, significantly reducing model complexity.
[0310] In terms of specific implementation, the system adds a binary gating variable to each edge to decide whether to retain the edge; implements L0 regularized differentiable optimization through hard gating approximation technology (such as Concrete Distribution); and automatically learns the optimal sparse structure during training. In typical cases, most edges can be pruned while maintaining performance.
[0311] For example, when the system analyzes a complex commercial litigation case, the original case graph may contain more than 300 entities and more than 2,000 relationships. After applying forced zero-method sparsification, only about 400 key relationships may be retained, but these relationships accurately capture the core legal relationships of the case.
[0312] Finally, the system developed an adaptive learning algorithm based on the forced zero sparsification mechanism. This algorithm incorporates meta-learning, knowledge distillation, and incremental training. By dynamically adjusting learning strategies and model structures, it adapts to the graph characteristics of different case types. For example, when handling a new type of environmental pollution liability case, the system can quickly adapt to the graph structure characteristics of the new case type through meta-learning, extract key knowledge from complex models through knowledge distillation, and continuously optimize the model through incremental training.
[0313] In practice, the system uses meta-learning to learn the common features of different case types, accelerating the adaptation process to new types of cases. It also uses knowledge distillation to transfer knowledge from complex models to simpler and more efficient models. It also employs an incremental training strategy to efficiently update the model as new case data arrives, avoiding the cost of retraining. These technologies collectively improve the system's learning efficiency and adaptability.
[0314] Through the above steps, the system successfully achieved effective learning based on case graphs, improved computational efficiency and model interpretability, and provided strong technical support for case quality assessment.
[0315] S7: Based on the effective learning results of the case graph, a case quality assessment knowledge graph is constructed to achieve intelligent and precise case quality management and provide data support for legal decision-making.
[0316] As a powerful knowledge representation and reasoning tool, knowledge graph can support complex query, analysis and recommendation functions, and provide data support for legal decision-making.
[0317] In this embodiment of the application, the system integrates multi-source evaluation data based on the effective learning results of case graphs. This data contains information such as evaluation criteria, case characteristics, evaluation results, and improvement suggestions. Through data cleaning, format conversion, and redundancy elimination, a unified data set is formed.
[0318] For example, the system can integrate the results from different evaluation agents, including case retrospective analysis, quality scores, improvement suggestions, etc., convert them into a unified data format, eliminate redundancy and inconsistency, and form a high-quality data foundation.
[0319] Specifically, the system uses data integration technology to process heterogeneous data sources, data cleansing technology to identify and correct errors, data conversion technology to unify data formats, and redundancy elimination technology to improve data efficiency. For example, for multiple evaluation results for the same case, the system can extract commonalities and differences and merge them into a more comprehensive evaluation record, improving data quality and efficiency.
[0320] Secondly, the system designs a knowledge graph model based on a unified dataset. This model encompasses concept hierarchies, relationship types, and attribute definitions. Through ontology engineering and semantic modeling, it constructs a conceptual framework for case quality assessment, guiding the construction of the knowledge graph. For example, the system can define concepts such as cases, assessment dimensions, assessment indicators, and assessment results, as well as the hierarchical and associative relationships between them, forming a structured knowledge system.
[0321] In implementation, the system uses ontology engineering to define domain concepts and relationships, and semantic modeling techniques to build semantic connections between concepts. For example, the system can define the concept of "case" to include subconcepts such as "civil and commercial case," define the relationship between the concepts of "assessment" and "case," and define the attributes and value ranges of "assessment results," thereby building a complete domain knowledge framework.
[0322] Third, the system uses a knowledge graph model and a unified dataset to extract knowledge and construct a graph. This process uses technologies such as named entity recognition, relationship extraction, and event detection to transform unstructured and semi-structured data into knowledge triples and construct an initial case quality assessment knowledge graph.
[0323] For example, the system can extract case ID, evaluation dimension, score, problem description and other information from the evaluation report and convert it into knowledge triples such as "Case A - in dimension B - score C" and "Case A - has problems - problem D".
[0324] In terms of specific implementation, the system uses natural language processing technology to process text data, uses information extraction technology to identify entities and relationships, and uses knowledge representation technology to organize information into knowledge triples.
[0325] For example, the system can use named entity recognition to identify entities such as case numbers, case handler names, and evaluation indicators in the text, and use relationship extraction to identify relationships such as "evaluation" and "existing problems" to construct a triple network representing case quality assessment knowledge.
[0326] Finally, based on the initial knowledge graph, the system develops knowledge reasoning and application interfaces. This component includes knowledge reasoning engines for rule-based reasoning, path-based reasoning, and statistical reasoning, as well as standardized application interfaces. These support multi-dimensional querying, intelligent analysis, and precise recommendations for case quality management. For example, the system can infer the root causes of case quality issues based on the knowledge graph, analyze common problems across different case types, and recommend targeted improvement solutions, providing data support for legal decision-making.
[0327] In practice, the system uses rule-based reasoning to process explicit logical relationships, path-based reasoning to discover implicit associations, and statistical reasoning to analyze data patterns and trends. For example, rule-based reasoning can infer a high risk of procedural violations based on a low procedural legitimacy score; path-based reasoning can identify the association between cases handled by case handler A and high evaluation scores; and statistical reasoning can analyze the distribution of evaluations across different case types, identifying potential issues and optimization opportunities.
[0328] The system also develops standardized application interfaces that support a variety of query and analysis functions. For example, the interface allows querying assessment results by case type, assessment dimension, time period, and other criteria; analyzing case quality trends and type distribution over time; and recommending improvement solutions for specific issues. These features provide legal affairs managers with powerful decision-making support tools, enabling intelligent and precise case quality management.
[0329] Through the above steps, the system successfully constructed a case quality assessment knowledge graph, realized the intelligence and precision of case quality management, provided data support for legal decision-making, and promoted the digital transformation and quality improvement of legal work.
[0330] Among them, combined Figure 1 and Figure 2 , step S1 specifically includes:
[0331] S1.1: Based on legal normative documents and trial practices, through text extraction and semantic analysis technology, extract the normative requirements and standards related to case quality assessment to form a structured normative requirements dataset.
[0332] In practice, the accuracy and timeliness of evaluation criteria directly impact the reliability of evaluation results. The system first collects relevant regulations, explanatory documents, guidelines, and other normative documents to form a source document set. These documents contain various standards and requirements for case handling and serve as the foundational data source for building the evaluation criteria library.
[0333] For example, specific indicators for case evaluation can be extracted from relevant case quality review methods, and normative requirements for case handling can be extracted from guiding cases issued by authoritative departments.
[0334] In a specific embodiment, S1.1 may include:
[0335] S1.1.1: Based on legal normative documents and trial practices, collect various legal provisions, legal interpretations, guiding opinions and other normative documents to form an original document collection.
[0336] S1.1.2: Based on the original document set, pre-process the documents using natural language processing technology, including text cleaning, word segmentation, part-of-speech tagging and syntactic analysis, to generate structured text.
[0337] S1.1.3: Based on the structured text, apply named entity recognition and relationship extraction techniques to identify the evaluation elements and standard items in the text, extract the semantic relationships between them, and construct a preliminary standard element network.
[0338] S1.1.4: Based on the regulatory element network, repeated or similar evaluation elements are merged and standardized through semantic similarity calculation and cluster analysis to form a structured regulatory requirement data set.
[0339] S1.2: Based on the data set required by the specification, classify it according to case type and evaluation dimension, build a hierarchical evaluation standard model, and generate an initial evaluation standard library.
[0340] The extracted evaluation criteria are categorized and organized according to case types (e.g., civil cases, commercial cases) and evaluation dimensions (e.g., procedural standardization, substantive processing adequacy, and document standardization), to construct a clearly structured evaluation standard system. For example, for commercial dispute cases, an evaluation standard system could be constructed encompassing multiple dimensions, including acceptance procedures, service procedures, mediation procedures, trial procedures, and certain documents. Each dimension would contain multiple specific indicators, forming a complete standard system.
[0341] S1.3: Based on the initial evaluation standard library, a dynamic update mechanism is designed that includes new specification document detection, semantic change identification, and automatic update of standard items to achieve real-time update capabilities of the evaluation standard library.
[0342] Step S1.3 is based on the initial evaluation standard library and designs a dynamic update mechanism that includes new specification document detection, semantic change identification, and automatic update of standard items to achieve real-time update capabilities of the evaluation standard library.
[0343] To maintain the timeliness of evaluation standards, the system needs to be able to automatically identify and process newly released regulatory documents. When new regulations or explanatory documents are released, the system can automatically detect and extract the relevant evaluation standards, updating them into the standard library. For example, when an authoritative department releases a new explanatory document, the system can automatically identify the content related to case quality assessment and integrate it into the existing evaluation standard library, ensuring the timeliness and authority of the standard library.
[0344] S1.4: Based on the dynamic update mechanism, develop a standard conflict detection algorithm and coordination strategy, resolve conflicts that may arise during the standard update process through semantic similarity analysis and rule priority determination, and achieve real-time update and optimization of the evaluation standard library.
[0345] During the standards update process, inconsistencies or conflicts may arise between the old and new specifications, requiring algorithms to automatically detect and reconcile these conflicts. The system identifies potential conflicts through semantic similarity analysis and automatically reconciles them by prioritizing rules (e.g., based on validity level and development time), ensuring the consistency and reliability of the evaluation standards library. For example, when a new interpretive document differs from the original specification, the system automatically determines which version of the standard to adopt based on factors such as the document's validity level and publication time, thus ensuring the authority and consistency of the standards library.
[0346] The standard conflict detection algorithm is an automated mechanism for identifying potential contradictions or inconsistencies within a library of evaluation standards. The algorithm first uses a formal method to represent the evaluation standards as a triple structure: <subject, attribute, value>, for example, <delivery procedure, time limit requirement, within 3 days>. The algorithm implements conflict detection through three core steps: semantic equivalence analysis, standard requirement comparison, and logical conflict deduction. Semantic equivalence analysis uses word embedding models and a synonym database to identify standard items with different wordings but similar semantics. For example, "delivery time requirements" and "delivery deadline regulations" are identified as semantically equivalent. The standard requirement comparison phase compares the values of semantically equivalent standard items for consistency. For example, if one standard stipulates "delivery deadline is within 3 days" while another stipulates "delivery time is no more than 5 days," a potential conflict is flagged. Logical conflict deduction uses automatic reasoning technology to identify indirect conflicts based on predefined conflict patterns. For example, if Standard A requires that "evidence exchange must be completed before a certain procedure", Standard B requires that "evidence exchange must be conducted after the expiration of the evidence submission period", and Standard C requires that "the evidence submission period must end no later than the day before a certain procedure", then through reasoning, it can be found that there is a logical conflict between these three standards.
[0347] The standard conflict detection algorithm utilizes a graph structure representation and path analysis. The system represents the evaluation criteria as a knowledge graph, with nodes representing entities and values and edges representing attribute relationships. Conflict detection is transformed into a search for specific patterns within the graph. Subgraph matching is performed using six designed conflict pattern templates (direct contradiction, numerical inconsistency, inclusion conflict, mutual exclusion, timing conflict, and inference conflict) to identify potential conflicts. The algorithm has a time complexity of O(n²), where n is the number of criteria items. This complexity can be reduced to O(n log n) through index optimization, supporting real-time conflict detection for large-scale standard libraries.
[0348] A coordination strategy is a systematic approach to resolving identified conflicting standards. It comprises four key components: conflict classification, rule prioritization, an expert consultation mechanism, and a conflict resolution record. Conflict classification categorizes detected conflicts into hard conflicts (completely mutually exclusive provisions) and soft conflicts (partially overlapping or ambiguous provisions). Rule prioritization is based on five criteria: legal effectiveness (superior laws prevail over inferior laws), recency (newer rules prevail over older rules), specialized relevance (specialized provisions prevail over general provisions), source authority (provisions issued by authoritative bodies prevail), and scope of application (provisions with a clear scope of application prevail). The system assigns a priority score to each standard and uses a weighted calculation to determine the order of precedence among conflicting standards.
[0349] For hard conflicts, the coordination strategy uses an automatic replacement method, retaining high-priority standards and discarding low-priority ones. For example, when a department's new regulations issued in 2023 conflict with old regulations from 2018, the system automatically adopts the new regulations and marks the old regulations as obsolete. For soft conflicts, the coordination strategy uses a merge and reconcile method, attempting to retain the reasonable parts of both and eliminate the contradictions. For example, if one standard stipulates that "the quality review ratio for major cases shall not be less than 15%," and another standard stipulates that "the overall quality review ratio shall be controlled between 10% and 20%," the system will automatically merge them to "the quality review ratio for major cases shall be 15%-20%, and for other cases, 10%-15%."
[0350] When automatic coordination fails to resolve complex conflicts, the system activates an expert consultation mechanism, forwarding conflict details, analysis, and potential solutions to designated domain experts for manual judgment. Expert decisions are recorded by the system, establishing conflict resolution precedents to guide future resolution of similar conflicts. The system maintains a conflict resolution knowledge base, documenting all conflict cases and their resolutions. This supports case-based reasoning and enables continuous optimization and learning of coordination strategies. This multi-layered coordination strategy enables the system to effectively handle various conflicts during standard updates, ensuring the consistency and reliability of the evaluation standards library.
[0351] Combine Figure 1 and Figure 3 , step S2 specifically includes:
[0352] S2.1: Based on the procedural specifications in the evaluation standard library and combined with the reasoning ability of the multi-agent system, a procedural legality evaluation sub-chain is designed, which includes the case filing procedure, service procedure, evidence production procedure, and trial procedure, to achieve a comprehensive evaluation of the procedural legality of the case.
[0353] This subchain covers the entire case handling process, including key steps such as acceptance, service, evidence presentation, and trial. Taking the acceptance process as an example, the system can verify whether the case meets acceptance criteria, whether the review is completed within the prescribed time limit, and whether the parties are informed of their rights and obligations as required, thereby achieving a comprehensive assessment of the procedural compliance of the case. The system represents procedural norms as a series of checkpoints and logical relationships. Using the reasoning capabilities of the multi-agent system, it analyzes the procedural descriptions in the case materials and determines whether they conform to the corresponding norms.
[0354] S2.2: Based on the substantive specifications in the evaluation standard library and the procedural legality evaluation results, a sub-chain for evaluating the appropriateness of substantive handling of cases is designed, which includes fact finding, acceptance of various types of evidence, application of law, and reasoning of judgments, to achieve an accurate evaluation of the appropriateness of substantive handling of cases.
[0355] In S2.2, based on the substantive and procedural normative assessment results in the evaluation standard library, a subchain for assessing the appropriateness of substantive handling is designed. This subchain focuses on the substantive handling process of a case, including fact finding, acceptance of various evidence, applicable regulations, and adjudication reasoning. For example, in the acceptance of various evidence stages, the system can assess whether the compliance, relevance, and probative force of various evidence in the case have been fully considered, and whether conflicts between different evidence types have been reasonably resolved.
[0356] The system leverages its powerful semantic understanding and logical reasoning capabilities to analyze the substantive content of case materials and assess the appropriateness of their handling. For example, regarding the application of regulations, the system can analyze whether the basis in certain documents is accurate and complete, and whether there are any errors or omissions in its application, thereby assessing the appropriateness of the applicable regulations.
[0357] S2.3: Based on the document specifications in the evaluation standard library and the evaluation results of the appropriateness of entity processing, a legal document standardization evaluation sub-chain is designed, which includes document format, language expression, logical structure, and content integrity, to achieve a detailed evaluation of the standardization of legal documents.
[0358] This subchain focuses on the formal and content standards of documents, including aspects such as format, language expression, logical structure, and content completeness. For example, the system can assess whether certain documents are formatted correctly, the language is accurate and concise, the arguments are clearly structured, and the reasoning is sufficient.
[0359] The system uses text analysis capabilities to conduct multi-dimensional assessments of documents. For example, it analyzes the paragraph structure, keyword distribution, and language style to assess the document's logical structure and linguistic expression; and it compares the document's content with case facts and relevant regulations to assess its completeness and accuracy.
[0360] S2.4: Based on the procedural legality evaluation subchain, the entity processing appropriateness evaluation subchain and the legal document standardization evaluation subchain, through the multi-task learning and chain reasoning technology of the large language model, the various evaluation subchains are integrated, and a reasoning control mechanism including evaluation sequence control, intermediate result feedback, and evaluation depth adjustment is developed to form a complete case quality evaluation reasoning chain.
[0361] By integrating the procedural standardization assessment subchain, the subchain for the appropriateness of substantive handling, and the subchain for the appropriateness of documentation, and developing reasoning control mechanisms such as assessment sequence control, feedback on intermediate results, and adjustment of assessment depth, a comprehensive and orderly assessment of case quality is achieved. For example, the system first assesses the procedural standardization of the case. If procedural flaws are found, the depth of the assessment of subsequent links is reduced accordingly. If the procedural standardization assessment results are favorable, further in-depth assessments of the appropriateness of substantive handling and the appropriateness of documentation are conducted. Through this dynamically adjusted assessment strategy, the system is able to focus assessment resources on key issues, improve assessment efficiency, and ensure the comprehensiveness and accuracy of the assessment.
[0362] Through these steps, the system successfully established a comprehensive evaluation standard library covering all types of cases, along with a dynamic update mechanism. It also designed a complete case quality assessment reasoning chain, providing a solid foundation for subsequent intelligent evaluation and analysis. These technological innovations effectively address issues inherent in traditional evaluation methods, such as delayed standard updates and incomplete assessments, significantly improving the accuracy and efficiency of case quality assessments.
[0363] Combine Figure 1 and Figure 4 , step S3 specifically includes:
[0364] S3.1: Based on the evaluation and reasoning chain, develop a case retrospective agent capable of analyzing the entire case process. Through time series analysis and causal reasoning, realize retrospective analysis of the entire case handling process and identify key nodes and existing problems in case handling.
[0365] Step S3.1 involves developing a case retrospective agent capable of analyzing the entire case process based on the evaluation reasoning chain. This agent uses temporal analysis and causal reasoning to retrospectively analyze the entire case handling process, identifying key nodes and existing problems in the case handling process.
[0366] For example, for a complex commercial case, the agent can chronologically analyze the entire process from acceptance, preliminary preparation, investigation and discussion to conclusion, identify key nodes such as the exchange of various evidence, the determination of the main points of dispute, and the testimony of key witnesses, and analyze the processing quality of these nodes. Specifically, the agent uses timeline analysis and event extraction technology to extract key events and time points in the case handling from the case materials and construct a chronological map of the case handling. Then, through causal reasoning technology, it analyzes the causal relationship between events and identifies key nodes and potential problems in the case handling. For example, the agent can discover that insufficient evidence collection has led to difficulties in subsequent fact finding, or that insufficient preliminary preparation has reduced processing efficiency.
[0367] S3.2: Based on the case retrospective analysis results and the evaluation reasoning chain, develop a quality scoring agent, and through multi-dimensional evaluation and weight adaptive algorithm, achieve quantitative scoring of case quality and generate evaluation results including overall score and sub-dimensional score.
[0368] Step S3.2 is to develop a quality scoring agent based on the case retrospective analysis results and the evaluation reasoning chain. This agent uses multi-dimensional evaluation and weighted adaptive algorithms to achieve quantitative scoring of case quality.
[0369] For example, for a livelihood case, the agent can evaluate it from three dimensions: procedural standardization, proper substantive handling, and document standardization. This is further broken down into multiple sub-dimensions, including acceptance procedures, service procedures, fact finding, applicable regulations, document format, and argument logic. It then assigns weights to each dimension and sub-dimension, calculating both an overall score and a sub-dimension score. In practice, the agent uses a multi-level evaluation model, organizing evaluation indicators into a hierarchical structure and dynamically adjusting the weights of each indicator through an adaptive weighting algorithm.
[0370] For example, depending on the type and complexity of the case, the agent might increase the weighting of fact finding and applicable regulations, or increase the weighting of relevant assessment dimensions based on the focus of the dispute, ensuring that the scoring results objectively reflect the quality of the case. This flexible weighting adjustment mechanism allows the evaluation system to adapt to the characteristics of different case types and provide more accurate quality assessments.
[0371] S3.3: Based on the quality scoring results and the evaluation standard library, develop an improvement suggestion agent to generate specific and actionable improvement suggestions for dimensions with scores below the first preset threshold through difference analysis and best practice matching, and provide guidance for improving case quality.
[0372] The agent generates specific, actionable improvement recommendations for dimensions whose scores are below a first preset threshold (e.g., 70 points) through gap analysis and best practice matching.
[0373] For example, for cases where the score of the applicable dimension of regulations is lower than the first preset threshold, the intelligent agent can point out the existing application errors or omissions and provide correct application suggestions; for cases where the score of the standardization of documents is lower than the first preset threshold, the intelligent agent can provide specific methods to optimize the document structure or enrich the reasoning.
[0374] Specifically, the agent uses gap analysis technology to compare case handling processes with best practices and identify deficiencies. Then, using best practice matching technology, it retrieves cases similar to the current case but with higher-quality handling from the knowledge base, extracts successful experiences from these cases, and generates targeted improvement suggestions. For example, based on the characteristics of the case, the agent can recommend appropriate evidence collection methods, fact-finding strategies, or applicable cases to help improve case handling quality. These specific and actionable suggestions not only help improve the handling of the current case but also provide opportunities for case handlers to learn and improve.
[0375] S3.4: Based on the case backtracking agent, the quality scoring agent and the improvement suggestion agent, an agent collaboration framework including task allocation, information sharing and result fusion is designed. The collaboration strategy is optimized through reinforcement learning to achieve efficient collaboration among the agents, forming a complete multi-agent system to realize intelligent evaluation and analysis of case quality.
[0376] Based on the above three intelligent agents, an intelligent agent collaboration framework is designed, and the collaboration strategy is optimized through reinforcement learning to achieve efficient collaborative work among the intelligent agents.
[0377] For example, the analysis results of the case retrospective agent are directly input into the quality scoring agent, and the scoring results of the quality scoring agent are input into the improvement suggestion agent, forming a closed loop of information flow; at the same time, the output of the improvement suggestion agent can be fed back to the case retrospective agent to help it improve its analysis methods and form a feedback optimization mechanism.
[0378] In practice, the system uses a collaborative strategy optimization method based on reinforcement learning. By continuously adjusting the interaction methods and information sharing strategies between agents, it improves overall collaborative efficiency. For example, the system can learn when in-depth information exchange between agents is necessary and when parallel work is feasible, thereby improving evaluation efficiency while ensuring quality. This intelligent collaborative framework enables the entire evaluation system to operate as an integrated whole, fully leveraging the expertise of each agent and maximizing overall effectiveness.
[0379] Combine Figure 1 and Figure 5 , step S4 specifically includes:
[0380] S4.1: Based on the multi-agent system, feature extraction and mathematical modeling are performed on unplanned online tasks to construct a task allocation optimization model that includes task characteristics, resource constraints, and time windows.
[0381] Step S4.1 is to extract features and perform mathematical modeling on unplanned online tasks based on a multi-agent system, and to construct a task allocation optimization model that includes task features, resource constraints, and time windows.
[0382] In actual work, there are often sudden or unconventional cases that need to be handled urgently. The system needs to be able to efficiently allocate resources to ensure that these tasks are handled in a timely manner.
[0383] For example, for a batch of sudden case quality assessment tasks, the system can extract the characteristics of each task, such as case type, complexity, priority, estimated processing time, etc., and build a mathematical model for task allocation.
[0384] Specifically, the system models the task allocation problem as an optimization problem: minimizing f(x) + g(z), where f(x) represents the efficiency objective (e.g., total completion time) and g(z) represents the resource constraint objective (e.g., workload balancing), while also satisfying the constraints that tasks must be fully allocated and within resource capacity. This mathematical modeling provides a theoretical foundation for subsequent algorithm design, ensuring the scientific and rational nature of task allocation.
[0385] S4.2: Based on the task allocation optimization model, an inexact alternating direction multiplier method algorithm framework is designed. Through problem decomposition, variable updating, and multiplier adjustment steps, the global optimization problem is converted into multiple sub-problems that can be solved in parallel.
[0386] Step S4.2 is to design an inexact alternating direction multiplier method algorithm framework based on the task allocation optimization model.
[0387] The algorithm transforms the global optimization problem into multiple sub-problems that can be solved in parallel through problem decomposition, variable updating, and multiplier adjustment steps.
[0388] For example, if 10 agents need to process 30 evaluation tasks, the system can decompose the global task allocation problem into local problems for 10 agents, and each agent calculates the subset of tasks it should receive in parallel.
[0389] The core of the algorithmic framework is an iterative approach: first, the task allocation variable x is updated, then the resource usage variable z is updated, and finally, the Lagrange multiplier u is updated. This iterative approach enables efficient task allocation in a distributed environment, adapting to the demands of large-scale task allocation. This decomposition-based solution significantly reduces computational complexity, enabling the system to cope with large bursts of unexpected tasks.
[0390] S4.3: Based on the framework of the inexact alternating direction multiplier method, develop an inexact update strategy that includes adaptive precision control, early stopping strategy, and approximate solution, and accelerate the convergence of the algorithm by reducing the computational precision requirements of each iteration.
[0391] Step S4.3 develops an imprecise update strategy based on the imprecise alternating direction multiplier algorithm framework. This strategy accelerates the convergence of the algorithm by reducing the computational accuracy requirement for each iteration.
[0392] In traditional algorithms, each iteration requires an exact solution to the subproblem, which is computationally expensive. The inexact update strategy allows an approximate solution to be used in each iteration, as long as it meets certain accuracy requirements, greatly improving the efficiency of the algorithm.
[0393] In its implementation, the system utilizes adaptive precision control, early stopping strategies, and approximate solution methods. For example, a lower-precision solution can be used in the early stages of the algorithm, with the precision requirement gradually increased as the iterations approach convergence. Alternatively, an early-termination iteration method can be used to solve subproblems, stopping the iteration as soon as the improvement in the solution falls below a certain threshold. These strategies significantly reduce computational complexity and improve the system's responsiveness to real-time tasks, making them particularly suitable for handling bursty tasks requiring rapid response.
[0394] S4.4: Based on the above-mentioned imprecise update strategy, a distributed computing framework that supports multi-node parallel computing is developed to achieve efficient distributed processing of unplanned online tasks through task partitioning, node coordination, and result aggregation.
[0395] Step S4.4 is to develop a distributed computing framework that supports multi-node parallel computing based on the imprecise update strategy. This framework achieves efficient distributed processing of unplanned online tasks through task partitioning, node coordination, and result aggregation.
[0396] For example, the system can process subproblems in parallel across multiple computing nodes, synchronizing the computational results across nodes through a central coordinator and adjusting the global allocation plan. In practice, the system employs a master-slave architecture, with the central node responsible for task decomposition and result aggregation, while the slave nodes are responsible for solving the subproblems. Nodes communicate with each other through a message-passing mechanism, sharing necessary variables and results. This distributed architecture allows the system to fully utilize computing resources, improving processing throughput and responsiveness.
[0397] For example, when 10 high-priority cases enter the system simultaneously, the distributed framework can distribute them to three agents with different expertise within seconds. Each agent receives a subset of tasks tailored to its expertise and current workload, ensuring optimal overall assessment quality and the shortest possible completion time. Compared to traditional methods, this allocation significantly improves processing efficiency and ensures that important tasks are handled promptly.
[0398] For example, taking actual application as an example, suppose the system suddenly receives a batch of 10 new cases that need to be handled urgently on Monday morning. These cases come from different business entities and require preliminary evaluation within 48 hours.
[0399] The system first extracts features from these cases, including case type (e.g., commercial disputes, intellectual property-related, etc.), case complexity (calculated based on document size, number of disputed points, etc.), and priority (based on time urgency and importance). For example, Case 1 might be an intellectual property-related case with a complexity score of 8.5 (out of 10), a high priority, and an estimated processing time of 6 hours; Case 2 might be a commercial contract dispute with a complexity score of 6.3, a medium priority, and an estimated processing time of 4 hours.
[0400] The system also considers available resources, such as the current availability of five agents, each with different areas of expertise and remaining processing capacity. The system constructs this information into a mathematical optimization model: the objective function is to minimize the weighted sum of total completion time and load imbalance, with constraints such as ensuring that all cases are assigned, that each agent's load does not exceed its capacity limit, and that high-priority cases are prioritized. This mathematical modeling approach formalizes the complex task allocation problem into a solvable optimization problem, laying the foundation for subsequent algorithmic applications.
[0401] Taking the above scenario where 10 cases are assigned to 5 agents as an example, the traditional method needs to consider all possible allocation combinations, and the computational complexity is extremely high. Using the ADMM algorithm, the system decomposes the problem into: each agent independently decides which cases it should handle (local sub-problems), and then ensures that global constraints are met through a central coordination mechanism (such as no repeated allocation of cases). Specifically, the algorithm framework contains three main steps: first, update the agent variable x (indicating which cases each agent should handle), then update the resource allocation variable z (indicating the final allocation plan of the case), and finally update the Lagrange multiplier u (adjust the consistency of the local solution with the global solution). Expressed in mathematical form, at the kth iteration:
[0402]
[0403]
[0404]
[0405] Where fi(xi) represents the local objective function of agent i (e.g., minimizing processing time), g(z) represents the global objective function (e.g., load balancing), A and B are constraint matrices, c is the constraint vector, and ρ is the penalty parameter. This decomposition allows the system to solve each agent's subproblem in parallel on different computing nodes, greatly improving computational efficiency.
[0406] In practical applications, accurately solving each subproblem usually has a high computational cost and is often unnecessary, especially in the early stages of algorithm iteration. The non-exact update strategy allows the use of approximate solutions while meeting certain accuracy conditions, thereby speeding up the entire algorithm process. Taking the above-mentioned case allocation problem as an example, suppose that agent 1 needs to solve its local subproblem to decide which cases to handle. Traditional methods may require precise solutions through methods such as quadratic programming, which takes a long time to calculate. Using the non-exact update strategy, the agent can use the gradient descent method for a finite number of iterations (such as 10 steps) to obtain an approximate solution to the local subproblem. Specifically, the system designs three non-exact update techniques:
[0407] Adaptive precision control: Use a lower precision (e.g., a relative error of 0.1) in the early stages of the algorithm. As the iterations approach convergence, gradually increase the precision requirement (ultimately to 0.001). For example, in a case assignment problem, the initial iterations may only require a rough determination of which agents are best suited to handle which case types, with fine-tuning of the specific assignments later.
[0408] Early stopping: During the subproblem-solving process, an iteration is terminated early if the improvement in the solution falls below a preset threshold (e.g., 0.01). For example, if an agent's case allocation solution does not change by more than 5% after three consecutive iterations, it is considered close to the optimal solution and the subproblem is terminated early.
[0409] Approximate solutions: Use heuristic algorithms or simplified models with lower computational complexity to solve subproblems. For example, for the agent case selection subproblem, a greedy algorithm can be used to make preliminary assignments based on case-agent matching, rather than solving the full combinatorial optimization problem.
[0410] Through these non-exact update strategies, in actual tests, although the number of algorithm iterations may increase slightly (for example, from 50 to 60 times), the calculation time for each iteration is significantly reduced (for example, from 2 seconds to 0.2 seconds). The overall calculation time can be reduced by more than 80%, greatly improving the system's response speed to sudden tasks.
[0411] In practical systems, when faced with a large number of sudden cases (such as 100 related cases simultaneously entering the system due to a major business event), single-machine computing may not be able to meet real-time processing requirements. A distributed computing framework allows the system to handle task allocation problems in parallel across multiple servers. The specific architecture adopts a master-slave design: a central node (master node) is responsible for problem decomposition, task allocation, and result aggregation; multiple compute nodes (slave nodes) are responsible for solving subproblems in parallel. To illustrate, when the system needs to handle the allocation problem of the aforementioned 100 cases, the master node first decomposes the problem into local subproblems for 20 agents. These subproblems are then assigned to five compute nodes, with each node handling subproblems for four agents. Each compute node solves the problem in parallel and returns the results. The master node aggregates these results, updates the global variable z and the multiplier u, and then enters the next iteration.
[0412] To ensure the efficiency and reliability of distributed computing, the system implements the following key mechanisms:
[0413] Dynamic load balancing: Task allocation is dynamically adjusted based on the performance and current load of the compute nodes. For example, if a compute node is found to be processing slowly, its workload will be reduced in the next iteration or its tasks will be reallocated to other nodes.
[0414] Fault-tolerance: If a computational node fails, the system automatically reassigns its tasks to other nodes to ensure the algorithm continues to execute. For example, if node 3 suddenly loses connection during processing, the four agent subproblems it is responsible for will automatically be transferred to other available nodes.
[0415] Asynchronous communication: Using asynchronous communication, different nodes can process subproblems at different speeds, eliminating the need for strict synchronization at each iteration. This further improves the system's flexibility and efficiency. For example, after a computational node solves a subproblem, it can immediately return the result to the master node without waiting for other nodes.
[0416] Sparse communication: Optimize inter-node communication content, transmitting only necessary variable updates to reduce communication overhead. For example, if an agent's allocation plan has not changed in this iteration, it does not need to transmit its entire plan to the master node; it only needs to send a "no change" flag.
[0417] This distributed computing framework enables the system to optimize large-scale task allocation within seconds to minutes (depending on the problem size and complexity), meeting real-time processing requirements. For example, a traditional centralized algorithm might take 30 minutes to complete the allocation of the 100 cases mentioned above. However, using this distributed framework, with five computing nodes, the optimization process can be completed in just two minutes, significantly improving the system's ability to handle sudden or unusual cases.
[0418] In practical applications, this distributed task allocation method based on inexact ADMM has been successfully applied in multiple scenarios.
[0419] For example, when handling a large number of related cases arising from a particular business event, the system intelligently allocated 78 cases within 5 minutes, optimizing the matching based on case type, complexity, and agent expertise. This improved processing efficiency by approximately 60% compared to traditional manual allocation, while also ensuring load balancing across agents and avoiding resource bottlenecks. Another key advantage of this approach is its strong scalability. As the number of cases or agents increases, efficient computing performance can be maintained by simply adding more computing nodes. This provides strong support for the system to handle unplanned tasks of various sizes.
[0420] Through these steps, the system successfully built a specialized multi-agent system, enabling intelligent assessment and analysis of case quality. It also developed a distributed task allocation mechanism based on the inexact alternating direction multiplier method, improving the system's ability to handle sudden and unconventional cases. These innovative technologies effectively address the shortcomings of traditional methods in handling complex, ever-changing cases and unexpected tasks, providing strong technical support for improving work efficiency and quality.
[0421] Step S5 specifically includes:
[0422] S5.1: Based on the distributed task allocation results, a case correlation identification model is constructed through text similarity analysis, entity recognition, relationship extraction and other technologies to achieve automatic identification of case groups with intrinsic connections.
[0423] Step S5.1 is to build a case relevance recognition model based on the distributed task allocation results through text similarity analysis, entity recognition, relationship extraction and other technologies.
[0424] In real-world work, multiple cases often have relationships between them. Collaborative processing of these cases is crucial for improving work efficiency and consistency. This model can automatically identify clusters of cases with inherent connections, providing a foundation for subsequent collaborative processing.
[0425] For example, the system can identify the following association patterns: entity overlap (e.g., multiple cases involving the same party), factual associations (e.g., multiple cases arising from a single event), and rule-based associations (e.g., multiple cases arising from a single commercial dispute). Specifically, the system uses a text similarity algorithm to calculate the similarity between cases, named entity recognition to extract key entities in the cases (e.g., parties, locations, and events), and relationship extraction to analyze the relationships between entities, thereby discovering potential case connections. This automated association identification significantly reduces the workload of manual screening and improves the efficiency and accuracy of discovering connected cases.
[0426] S5.2: Based on the aforementioned intrinsically connected case groups, a hierarchical task planning framework is designed that includes goal decomposition, constraint identification, and action sequence generation. Through symbolic planning and heuristic search, a preliminary action plan is generated for handling related cases.
[0427] Step S5.2 is to design a hierarchical task planning framework based on the identified clusters of internally connected cases. This framework generates a preliminary action plan for handling the related cases through goal decomposition, constraint identification, and action sequence generation.
[0428] For example, for a group of interrelated commercial dispute cases, the system can design a hierarchical processing plan: the first layer determines the case processing order and dependencies, the second layer plans the specific processing steps for each case, and the third layer arranges resource allocation and time scheduling.
[0429] In its implementation, the system uses symbolic planning and heuristic search methods. Symbolic planning represents case processing as a series of states and actions, defining preconditions and effects to construct a state transition model for case processing. Heuristic search leverages domain knowledge to design heuristic functions that guide the search process and find a high-quality preliminary action plan. For example, the system might plan to handle core cases first, followed by dependent cases, to ensure efficient and consistent overall processing. This hierarchical planning approach makes the complex problem of handling interrelated cases structured and manageable, significantly improving processing efficiency.
[0430] The state transition model of case processing is a computational model that formally represents the case processing process and is built using the state-action-transition framework.<S, A, T, I, G> Represented as [ ], where S is the state space, A is the set of actions, T is the transition function, I is the initial state set, and G is the target state set. The state space S is designed as a multidimensional feature vector, encompassing key dimensions such as the case processing stage, completed processing steps, resource allocation, and document generation status. For example, the status of a commercial case can be represented as [Stage = Fact Investigation, Completed Steps = {Evidence Collection, Evidence Exchange}, Resource Allocation = {Judge A, Clerk B}, Document Status = {Generated: Case Filing Notice, Delivery Receipt}]. The design of the state space fully considers the domain characteristics of case processing to ensure the completeness and compactness of the state representation.
[0431] Action set A includes all actions that can be performed during case handling. These actions are categorized by function into procedural actions (e.g., case filing, scheduling a procedure, adjourning a trial), substantive actions (e.g., evidence investigation, fact finding), and administrative actions (e.g., resource allocation, priority adjustment, and related case handling). Each action is represented in a structured form, consisting of an action name, a parameter list, preconditions, and effects. For example, the "Schedule a procedure" action can be represented as follows: Name = Schedule a procedure, Parameters = {Date, Location, Participants}, Preconditions = {Case filing completed = Yes, Service completed = Yes, Evidence submission deadline expired = Yes}, Effects = {Phase = Trial preparation, Procedure date = Set value, Trial plan = Generated}.
[0432] The transition function T defines the evolution rules between states, using the mapping T: S×A→S. Given a current state s and an executed action a, the transition function checks whether the preconditions of a are satisfied in s. If so, it applies the effects of a to generate a new state s'. The transition function is implemented using a rule-based reasoning engine, supporting operations such as conditional judgment, value assignment, and list updates. To address uncertainty in case processing, the model supports probabilistic transitions, using T: S×A×S→[0,1] to represent the probability of transitioning from state s to state s' after executing action a. This is suitable for situations where the outcome is uncertain, such as the probability of success of a mediation attempt.
[0433] The initial state set I defines the starting state of case processing, typically corresponding to the case acceptance stage. The system automatically generates appropriate initial state representations based on the case type and characteristics. The target state set G defines the final state of case processing, typically including various possible closure methods such as judgment, mediation, and withdrawal. The definition of the target state takes into account both procedural completion indicators and quality standards.
[0434] The state transition model is constructed using a three-phase approach: pattern extraction, rule formalization, and model validation. In the pattern extraction phase, a large number of historical case processing records are systematically analyzed, using process mining techniques to identify common processing paths and decision points. In the rule formalization phase, the extracted processing patterns are converted into structured state, action, and transition rules, incorporating legal expert knowledge. In the model validation phase, historical case data is used to verify the model's completeness and correctness, ensuring that it accurately represents the processing processes of various cases.
[0435] To enhance the model's practicality, the system implements a state visualization tool that transforms abstract state representations into intuitive flowcharts, helping users understand the current state and potential paths of case processing. Furthermore, the model supports dynamic updates, automatically adjusting state definitions and transition rules based on regulatory changes and evolving processing practices, ensuring the model always reflects the latest case processing standards and best practices.
[0436] S5.3: Based on the preliminary action plan, develop a reinforcement learning optimization model that includes state representation, reward mechanism, and policy network. Through interaction with the environment and policy iteration, optimize the handling strategy of related cases and improve the handling effect;
[0437] Step S5.3 is to develop a reinforcement learning optimization model based on the preliminary action plan. This model optimizes the handling strategy of related cases through state representation, reward mechanism, and policy network.
[0438] Specifically, the system uses the case processing status as its environment. The agent's actions include case analysis, evaluation, and recommendation generation. Reward signals are derived from processing efficiency and consistency metrics. Through interaction with the environment and strategy iteration, the system continuously adjusts and optimizes its processing strategies to improve results.
[0439] In its implementation, the system uses deep reinforcement learning methods, such as deep Q-learning or policy gradient methods. The system designs an appropriate state representation to capture the key features of case handling; a multi-objective reward function to balance processing efficiency, quality, and consistency; and a deep neural network as a policy network to learn the mapping from state to optimal action. For example, the system may learn that among related cases, handling the most substantiated cases first can provide a reference standard for other cases; or that among incident-related cases, responsibility determination cases should be handled first. This data-driven optimization method can learn from actual handling experience, continuously improve handling strategies, and adapt to complex and changing case situations.
[0440] The following details the construction and training of this model:
[0441] Model architecture design: The reinforcement learning optimization model adopts a deep reinforcement learning architecture based on Advantage Actor-Critic (A2C), which includes two core components: the policy network (Actor) and the value network (Critic).
[0442] Policy network (Actor) structure:
[0443] Input layer: receives the state vector, dimension is 128;
[0444] The first fully connected layer: 128→256, using ReLU activation;
[0445] The second fully connected layer: 256→128, using ReLU activation;
[0446] The third fully connected layer: 128→64, using ReLU activation;
[0447] Output layer: 64 action space dimensions, using Softmax activation to output the probability distribution of each action;
[0448] Value Network (Critic) Structure:
[0449] Input layer: receives the state vector, dimension is 128;
[0450] The first fully connected layer: 128→256, using ReLU activation;
[0451] The second fully connected layer: 256→128, using ReLU activation;
[0452] Output layer: 128→1, no activation function, directly outputs state value estimation;
[0453] State representation design: The state vector (128 dimensions) contains the following information:
[0454] Case features (64 dimensions): including case type (one-hot encoding, 8 dimensions), complexity score (scalar), urgency (scalar), processing stage (one-hot encoding, 6 dimensions), and association strength matrix (compressed representation, 48 dimensions);
[0455] Resource status (16 dimensions): including the current load (vector) and expertise matching degree (vector) of each processing staff;
[0456] Time status (16 dimensions): includes the processing time of each case, the remaining time window, and the global time progress;
[0457] Action history (32 dimensions): includes the encoding representation of the recent history of actions and their results;
[0458] Action space design: The action space defines the actions that the agent can take, including:
[0459] Case priority allocation: Assign a processing priority to each case (5 priority levels);
[0460] Resource Allocation: assigning processing staff to specific cases;
[0461] Processing strategy selection: select a handling strategy for the case (e.g., "in-depth investigation," "quick processing," etc.);
[0462] Coordination of related cases: Adjust information sharing and processing dependencies between related cases;
[0463] Reward mechanism design: The reward function takes multiple factors into consideration.
[0464] The formula is:
[0465] R = w1*R efficiency + w2*R quality + w3*R consistency- w4*R penalty
[0466] in:
[0467] R efficiency : Efficiency bonus, based on the ratio of completion time to baseline time, the formula is:
[0468] max(0, 1 - actual time / baseline time) * 10
[0469] R quality : Quality reward, based on case handling quality score, ranging from 0-10;
[0470] R consistency : Consistency reward, based on the consistency measurement of the results of related cases, ranging from 0 to 5;
[0471] R penalty : Violation penalties, for violations of processing rules or constraints, such as over-allocation of resources, wrong priorities, etc.
[0472] Weight settings: w1=0.4, w2=0.3, w3=0.3, w4=1.0, obtained through hyperparameter search optimization;
[0473] Training algorithm implementation: Use the Proximal Policy Optimization (PPO) algorithm for training, which is more stable than the standard A2C. Key parameter settings:
[0474] Discount factor (γ): 0.99, controls the importance of future rewards;
[0475] GAE parameter (λ): 0.95, used for advantage estimation;
[0476] Value function coefficient: 0.5, controls the proportion of value loss in total loss;
[0477] Entropy coefficient: 0.01, encouraging exploration;
[0478] PPO clipping parameter (ε): 0.2, limiting the strategy update amplitude;
[0479] Learning rate: 3e-4, using Adam optimizer;
[0480] Maximum gradient norm: 0.5 to prevent gradient explosion;
[0481] Training process design: The training is carried out in the following steps:
[0482] Initialization: Use pre-trained action plans as the initial strategy to accelerate training convergence;
[0483] Experience collection: Collect experience from 2048 environmental steps per round;
[0484] Batch update: Divide the collected experience into 64 small batches and perform 10 rounds of parameter updates;
[0485] Strategy evaluation: After every 10 rounds of training, the current strategy is evaluated in the verification environment;
[0486] Early stopping mechanism: If there is no improvement after 20 consecutive evaluation rounds, training is stopped;
[0487] Model saving: save the model parameters with the best performance;
[0488] Experience replay and sample reuse:
[0489] Maintain an experience replay buffer of size 10,000;
[0490] Adopting the Prioritized Experience Replay mechanism, the sampling probability is allocated according to the TD error.
[0491] The importance sampling weight parameter β is linearly increased from 0.4 to 1.0 to compensate for sampling bias;
[0492] Explore strategy design:
[0493] The first 1000 rounds use the ε-greedy strategy, with ε linearly decaying from 0.5 to 0.1;
[0494] Then, entropy-based exploration is used to adaptively control the degree of exploration by adjusting the entropy coefficient;
[0495] Increase exploration probability in complex or rare case types (curiosity-driven exploration);
[0496] Environmental Simulator Implementation: To implement reinforcement learning training, a case processing environment simulator was developed:
[0497] Case generation: Generate simulated cases based on historical data distribution, including attributes such as type and complexity;
[0498] Relationship generation: Generate a relationship network between cases based on actual relationship patterns;
[0499] Processing time model: simulates the time consumption under different types of cases and different processing strategies;
[0500] Processing quality model: simulate the impact of different processing methods on the final quality;
[0501] Consistency assessment: Calculate consistency indicators of related case handling results;
[0502] Model evaluation and tuning:
[0503] Performance indicators: average completion time, average quality score, consistency score, resource utilization;
[0504] Offline evaluation: Backtesting on historical case data;
[0505] Benchmark comparison: Compare with rule-based methods and supervised learning methods;
[0506] Sensitivity analysis: Analyze the sensitivity of the model to changes in various hyperparameters;
[0507] Abnormal situation testing: testing the model's performance under extreme circumstances (such as resource constraints and sudden high-priority cases);
[0508] Implementation technology stack:
[0509] Framework: Use PyTorch to implement neural networks, and RLlib to provide reinforcement learning algorithm support;
[0510] Environment simulation: Use a custom Python environment that follows the OpenAI Gym interface specification;
[0511] Distributed training: Use the Ray framework to implement parallel data collection and gradient updates;
[0512] Training hardware: 8 NVIDIA V100 GPUs, training time approximately 48 hours;
[0513] Deployment and online learning:
[0514] The model deployment adopts a microservice architecture and provides decision services through RESTful API;
[0515] Implement a lightweight online learning mechanism to continuously adjust strategies based on actual feedback;
[0516] Set a trust threshold. When the model confidence falls below the threshold, manual intervention is required.
[0517] Maintain a case library to record typical decision-making scenarios and optimal decisions for continuous improvement.
[0518] S5.4: Based on the reinforcement learning optimization model and the hierarchical task planning framework, a dynamic fusion mechanism of planning and learning is implemented. Through a two-way feedback mechanism in which planning guides exploration and learning optimizes planning, the adaptability of the strategy is improved while ensuring the rationality of planning, thereby realizing intelligent processing of complex related cases.
[0519] Step S5.4 implements a dynamic fusion mechanism for planning and learning. This mechanism, through two-way feedback—planning guides exploration, and learning optimizes planning—ensures planning rationality while improving the adaptability of the strategy. For example, the initial plan provides the overall framework and constraints for handling the case, while reinforcement learning explores and optimizes specific strategies within this framework. Furthermore, the learning results can in turn adjust and improve the plan.
[0520] Specifically, the system uses a hybrid architecture that organically combines symbolic planning and reinforcement learning. The planning module provides high-level structured knowledge to guide the exploration direction of reinforcement learning. The reinforcement learning module discovers more optimal execution strategies through practical interaction experience and feeds learning results back to the planning module to optimize subsequent planning.
[0521] For example, through reinforcement learning, the system might discover that, when handling related commercial disputes, it's more efficient to first address the core case with the largest amount, followed by its derivative cases. This discovery can be incorporated into planning knowledge to guide the handling of similar cases in the future. This dynamic fusion of planning and learning combines the advantages of rule-based knowledge and data-driven learning, ensuring standardized handling while improving the adaptability of strategies. It is particularly suitable for handling complex, related cases.
[0522] Step S6 specifically includes:
[0523] S6.1: Based on the results of the multi-agent case association processing, through entity extraction, relationship recognition, knowledge fusion and other technologies, a case knowledge graph containing case elements, legal concepts, and processing procedures is constructed to provide a data foundation for graph learning.
[0524] Step S6.1 is to construct a case knowledge graph based on the results of multi-agent case association processing. This graph contains information such as case elements, rule concepts, and processing procedures, providing a data foundation for graph learning.
[0525] Case data usually exhibits complex graph structure characteristics, containing a large number of entities and relationships. Effectively learning this graph structure is crucial for case quality assessment.
[0526] Specifically, the system uses entity extraction technology to identify key entities from case materials, relationship recognition technology to discover connections between entities, and knowledge fusion technology to integrate information from different sources into a unified knowledge graph. For example, the system can extract entities such as parties, various bases, and applicable regulations from case documents, identify reference and support relationships between them, and construct a knowledge graph representing the case structure. This structured knowledge representation lays the foundation for subsequent graph learning.
[0527] S6.2: Based on the case knowledge graph, design a graph neural network model that includes a graph convolution layer, an attention mechanism, and a message passing mechanism. Through node feature extraction and edge relationship learning, achieve preliminary modeling of the case graph structure.
[0528] Step S6.2 designs a graph neural network model based on the case knowledge graph. This model includes a graph convolution layer, an attention mechanism, and a message passing mechanism. By extracting node features and learning edge relationships, it achieves a preliminary modeling of the case graph structure.
[0529] The typical architecture of a graph neural network includes: input layer (initial node features), graph convolution layer (aggregating information of adjacent nodes), attention mechanism (focusing on important nodes and edges), and output layer (node representation or graph representation).
[0530] In its implementation, the system utilizes advanced graph neural network architectures such as graph convolutional networks (GCNs) and graph attention networks (GATs). For example, GCNs allow the system to aggregate node neighborhood information and learn node representations; GATs focus on important nodes and edges, improving learning efficiency. These models are capable of capturing complex patterns and structural features within case graphs, providing effective representations for subsequent tasks. Compared to traditional vector representations, graph neural networks can better capture the relationships and structural information between entities, making them particularly well-suited for processing relationally rich data types like case data.
[0531] The graph neural network model is used to learn the structural features of the case knowledge graph. The detailed construction and training process of this model is as follows:
[0532] Model Architecture: This model uses a hierarchical architecture based on the Graph Attention Network (GAT), consisting of the following layers:
[0533] Input layer: receives the initial feature vector of the node, with a dimension of 128;
[0534] The first graph attention layer: 8 attention heads, each head outputs 32-dimensional features, which are combined into 256 dimensions;
[0535] Batch normalization layer: standardizes feature distribution and stabilizes the training process;
[0536] The second graph attention layer has 8 attention heads, each of which outputs 32-dimensional features, which are combined into 256 dimensions.
[0537] Global pooling layer: uses graph pooling with an attention mechanism to compress graph-level features into a 384-dimensional vector;
[0538] Fully connected layer: two layers, 384->192 and 192->64, using ReLU activation;
[0539] Output layer: Designed according to specific tasks, for example, case classification tasks use Softmax to output category probabilities
[0540] Feature design: Node features consist of two parts:
[0541] Text semantic features: extracted using the pre-trained BERT model with a dimension of 768, and then reduced to 64 dimensions through linear mapping;
[0542] Structural features: including node type (one-hot encoding, the dimension depends on the number of node types), node degree, centrality measure, etc., which are combined into 64 dimensions;
[0543] The final node feature is obtained by connecting the two parts of the feature to obtain a 128-dimensional vector;
[0544] Attention mechanism: A multi-head self-attention mechanism is used, and the calculation formula is:
[0545] e ij = LeakyReLU(aT [Wh i || Wh j ])
[0546] α ij = softmax j (e ij )
[0547] h' i = σ(∑ j α ij W h j )
[0548] Among them, W is the weight matrix (128×32), a is the attention vector (64×1), and the negative slope of LeakyReLU is 0.2.
[0549] Forced zero-method sparsification mechanism: This is achieved by applying L0 regularization to each attention head. The specific method is as follows:
[0550] Introduce a gating variable z for each edge ij , parameterized by Hard Concrete distribution to make it differentiable during training;
[0551] The parameter θ of the gate variable ij Through model learning, initialized to 0;
[0552] During forward propagation, the edge weights are passed through w ij × z ij Calculate, where z ij is 0 or 1;
[0553] Loss function adds L0 regularization term: λ∑ij P(z ij =1), λ is the regularization strength, which is set to 0.001;
[0554] Training configuration:
[0555] Optimizer: Adam, learning rate 0.001, β1=0.9, β2=0.999;
[0556] Learning rate scheduling: use ReduceLROnPlateau with a factor of 0.5 and a patience value of 10;
[0557] Batch size: adjusted according to GPU memory, typical value is 16-32;
[0558] Number of training rounds: 200 rounds, using early stopping strategy and patience value of 30;
[0559] Loss function: main task loss (selected according to the specific task, such as cross entropy for classification tasks) plus L0 regularization term;
[0560] Gradient clipping: The maximum gradient norm is set to 1.0 to prevent gradient explosion;
[0561] Adaptive learning strategy:
[0562] Meta-learning: Model-Agnostic Meta-Learning (MAML) algorithm was used with an inner loop learning rate of 0.01, an outer loop learning rate of 0.001, and a meta-batch size of 5.
[0563] Knowledge distillation: the teacher model is full GAT, the student model is sparse GAT, the temperature parameter is 2.0, and the distillation weight is 0.5;
[0564] Incremental training: Use the Elastic Weight Combination (EWC) method with an importance factor of 1000 to preserve the original knowledge when fine-tuning on new data;
[0565] Evaluation Metrics:
[0566] Accuracy (classification task) or mean square error (regression task);
[0567] model sparsity (percentage of retained edges);
[0568] Inference time (milliseconds / sample);
[0569] interpretability score (assessed by experts);
[0570] Implementation Technology: Implemented using PyTorch and the PyTorch Geometric library. Training is performed on NVIDIA Tesla V100 GPUs, and batch inference can also be performed efficiently on CPUs.
[0571] S6.3: Based on the graph neural network model, implement a forced zero-method sparsification mechanism including L0 regularization, gated activation, and gradient estimation, by explicitly controlling the model complexity and the number of activated nodes.
[0572] Step S6.3 implements the forced zero-method sparsification mechanism based on the graph neural network model.
[0573] This mechanism, which includes L0 regularization, gated activation, and gradient estimation, reduces the redundancy of graph representations and improves learning efficiency by explicitly controlling model complexity and the number of activated nodes. Unlike traditional L1 regularization, forced zero sparsification uses L0 regularization to directly force unimportant connections to be exactly zero, significantly reducing model complexity.
[0574] In terms of specific implementation, the system adds a binary gating variable to each edge to decide whether to retain the edge; implements L0 regularized differentiable optimization through hard gating approximation technology (such as Concrete Distribution); and automatically learns the optimal sparse structure during training. In typical cases, most edges can be pruned while maintaining performance.
[0575] For example, when the system analyzes a complex commercial dispute case, the original case graph may contain over 300 entities and over 2,000 relationships. After applying forced zero sparsification, only about 400 key relationships may be retained, but these relationships accurately capture the core rule relationships of the case. This sparsification process not only improves computational efficiency but also enhances the model's interpretability, allowing the system to focus on the key elements and relationships of the case.
[0576] S6.4: Based on the forced zero-method sparsification mechanism, develop an adaptive learning algorithm that includes meta-learning, knowledge distillation, and incremental training. By dynamically adjusting the learning strategy and model structure, it can adapt to the graphical characteristics of different types of cases and achieve effective learning based on case graphs.
[0577] Step S6.4 develops an adaptive learning algorithm based on the forced zero sparsification mechanism. This algorithm incorporates meta-learning, knowledge distillation, and incremental training. By dynamically adjusting the learning strategy and model structure, it adapts to the graphical characteristics of different case types.
[0578] For example, when dealing with new types of environmental protection-related cases, the system can quickly adapt to the graph structure characteristics of the new case type through meta-learning, use knowledge distillation to extract key knowledge from complex models, and continuously optimize the model through incremental training.
[0579] In its implementation, the system uses meta-learning to learn common features across different case types, accelerating its adaptation to new types of cases. It also employs knowledge distillation to transfer knowledge from complex models to simpler and more efficient models. Finally, it employs an incremental training strategy to efficiently update the model as new case data arrives, avoiding the cost of retraining. These techniques collectively improve the system's learning efficiency and adaptability, making it particularly well-suited for handling diverse case types and evolving regulatory requirements. Through adaptive learning, the system continuously accumulates and leverages experience, improving the model's generalization and performance.
[0580] Through the above steps, the system successfully achieved intelligent processing of complex related cases and effective learning based on case graphs, improved the efficiency and consistency of related case processing, and enhanced the system's knowledge representation and reasoning capabilities.
[0581] These innovative technologies effectively address the difficulties traditional methods face in handling complex, interconnected cases and learning case graph structures, providing strong technical support for improving the quality and efficiency of case processing. In particular, the combination of planning and reinforcement learning, along with the zero-forced graph sparsification technique, represents a cutting-edge research direction in case processing and analysis, with significant theoretical and practical value.
[0582] Step S7 specifically includes:
[0583] S7.1: Based on the effective learning results of the case graph, through data cleaning, format conversion, and redundancy elimination technology, integrate multi-source evaluation data including evaluation criteria, case characteristics, evaluation results, and improvement suggestions to form a unified data set.
[0584] Step S7.1 is based on the effective learning results of the case graph and integrates multi-source evaluation data.
[0585] The data contains information such as evaluation criteria, case characteristics, evaluation results, and improvement suggestions. Through data cleaning, format conversion, redundancy elimination and other technologies, a unified data set is formed.
[0586] For example, the system can integrate the results of different assessment agents, including case retrospective analysis, quality scores, and improvement suggestions, and convert them into a unified data format, eliminating redundancy and inconsistencies and forming a high-quality data foundation. In actual implementation, the system first standardizes various data sources, including data format unification, field name normalization, and value range consistency checking. For example, date formats from different sources may differ, such as "2023 / 03 / 25," "2023-03-25," or "20230325." The system will standardize them into the ISO standard format.
[0587] Secondly, the system performs quality checks and cleansing on the data, identifying and handling missing values, outliers, and duplicate records. For example, for outliers in the scoring data, the system may use an anomaly detection method based on the interquartile range or a rationality check based on domain rules.
[0588] Finally, the system integrates data and eliminates redundancy, merging data from different sources but describing the same entity or event to build a complete and non-redundant unified data set, providing a high-quality data foundation for subsequent knowledge graph construction.
[0589] S7.2: Based on the unified dataset, design a knowledge graph model that includes concept hierarchy, relationship types, and attribute definitions. Through ontology engineering and semantic modeling, construct a conceptual framework in the field of case quality assessment to guide the construction of the knowledge graph.
[0590] Step S7.2 is to design a knowledge graph model based on a unified dataset.
[0591] This model includes concept hierarchy, relationship type, and attribute definition. Through ontology engineering and semantic modeling, it constructs a conceptual framework in the field of case quality assessment and guides the construction of knowledge graphs.
[0592] In schema design, the system first defines core concept classes, such as "case," "assessment," "assessment dimension," and "improvement suggestion." Each concept class has a clearly defined set of attributes. For example, the "case" concept might include attributes such as "number," "type," and "processing date," while the "assessment" concept might include attributes such as "assessment time," "assessor," and "total score." Next, the system defines relationship types between concepts, such as "case - belongs to - case type," "assessment - evaluation - case," "assessment - includes - assessment dimension," and "assessment dimension - generates - improvement suggestion."
[0593] Each relationship type has a clear definition, directionality, and constraints. For example, the "Assessment-Assessment-Case" relationship indicates that the assessment object must be a case, that a case can have multiple assessments, and that an assessment can only assess one case.
[0594] Finally, the system establishes a hierarchical hierarchy of concepts, forming a conceptual classification tree. For example, the "assessment dimension" can be broken down into subconcepts such as "procedural standardization," "property of entity handling," and "documentary standardization." These subconcepts can be further subdivided. Through this hierarchical design, the system constructs a structured conceptual framework, providing a theoretical foundation for subsequent knowledge representation and reasoning.
[0595] S7.3: Based on the knowledge graph model and the unified dataset, unstructured and semi-structured data are converted into knowledge triples through named entity recognition, relationship extraction, event detection and other technologies to construct an initial case quality assessment knowledge graph.
[0596] Step S7.3 involves extracting knowledge and constructing a knowledge graph based on the knowledge graph model and unified dataset. This process uses techniques such as named entity recognition, relationship extraction, and event detection to transform unstructured and semi-structured data into knowledge triples and construct an initial case quality assessment knowledge graph.
[0597] During the knowledge extraction process, the system first uses named entity recognition technology to identify key entities from text data. For example, it can identify case numbers, assessment dimension names, and score values from assessment reports.
[0598] The system uses a sequence tagging model based on BiLSTM-CRF (bidirectional long short-term memory network-conditional random field), combined with domain-specific dictionaries and rules, to achieve high-precision entity recognition. Secondly, the system uses relationship extraction technology to identify semantic relationships between entities.
[0599] For example, to identify the relationship "Case A scored 85 points in the procedural standardization dimension," the system uses dependency parsing and graph pattern matching, combined with remote supervised learning technology, to automatically extract structured relationships from text.
[0600] Finally, the system organizes the extracted entities and relationships into knowledge triples based on predefined knowledge graph patterns, such as (Case A, Score_Procedural Standardization, 85 points) and (Case A, Problems, Non-standardized Delivery Procedures). These triples are then imported into a graph database to construct a knowledge graph. In this way, the system can transform large amounts of unstructured and semi-structured data into structured knowledge representations, laying the foundation for subsequent knowledge reasoning and application.
[0601] S7.4: Based on the initial case quality assessment knowledge graph, develop a knowledge reasoning engine that includes rule reasoning, path reasoning, and statistical reasoning, and design a standardized application interface to support multi-dimensional query, intelligent analysis, and precise recommendation of case quality management, thereby realizing intelligent and precise case quality management and providing data support for legal decision-making.
[0602] Step S7.4 develops knowledge reasoning and application interfaces based on the initial knowledge graph. This includes knowledge reasoning engines for rule-based reasoning, path-based reasoning, and statistical reasoning, as well as standardized application interfaces, supporting multi-dimensional query, intelligent analysis, and precise recommendations for case quality management.
[0603] In terms of knowledge reasoning, the system first implements a rule-based reasoning engine, supporting deductive reasoning based on ontology axioms and a rule base. For example, if a rule is defined such as "If a case's procedural standardization score is less than 70, the case has a procedural risk," the system can automatically infer which cases are at risk of procedural issues.
[0604] Secondly, the system implements path-based reasoning, discovering implicit relationships by analyzing path patterns in the knowledge graph. For example, by analyzing the path patterns of "handler A - handling - case set B" and "case set B - score higher than 90 points - case set B", the system can discover the connection between handler A and high-quality case handling.
[0605] Finally, the system implements statistical reasoning, using aggregated analysis to identify patterns and trends in data. For example, it can analyze the distribution of scores for different types of cases to identify which types of cases have more quality issues.
[0606] In terms of application interfaces, the system has developed standardized RESTful APIs that support flexible queries based on case type, time period, and rating range; analysis of case quality trends and distribution over time; and recommendations for improvements based on similar cases. These interfaces provide rich data services for upper-level applications, enabling intelligent and precise case quality management.
[0607] In summary, the case quality intelligent assessment method based on the large language model provided by this application, by constructing a dynamically updated assessment standard library, designing a complete assessment reasoning chain, building a professional multi-agent system, applying the non-exact alternating direction multiplier method to realize distributed task allocation, combining planning and reinforcement learning to solve case association problems, applying the forced zero method sparse graph technology to realize case graph learning, and constructing a case quality assessment knowledge graph, realizes the intelligence and precision of case quality management, effectively solves the problems of untimely evaluation standard updates, incomplete evaluation logic chain, and low system intelligence in the existing technology, improves the accuracy, comprehensiveness and efficiency of case quality assessment, and provides strong technical support for legal work.
[0608] An embodiment of the present application also provides a case quality intelligent assessment system based on a large language model, wherein the computer system includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the above-mentioned case quality intelligent assessment method based on the large language model.
[0609] The present application also provides a computer-readable storage medium storing computer instructions for causing a computer to execute the aforementioned method for intelligently assessing case quality based on a large language model. The present application also provides a computer program product comprising computer instructions that, when executed by a processor, implement the steps of the aforementioned method for intelligently assessing case quality based on a large language model.
[0610] The above description is only a preferred embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structural transformation made by using the contents of the present application specification and drawings under the inventive concept of the present application, or directly / indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A case quality intelligent assessment method based on a large language model, characterized by: include: Build an evaluation standard library covering various types of cases based on legal normative documents and trial practices; Based on the evaluation criteria library, a complete evaluation reasoning chain is designed, including procedural legitimacy evaluation, substantive treatment appropriateness evaluation, and legal document normativeness evaluation; Based on the evaluation and reasoning chain, a multi-agent system is constructed, including a case review agent, a quality scoring agent, and an improvement suggestion agent, to achieve intelligent evaluation and analysis of case quality, including: Based on the evaluation reasoning chain, a case retrospective agent with the ability to analyze the entire case process is developed. Through time series analysis and causal reasoning, a retrospective analysis of the entire case handling process is realized, and key nodes and existing problems in case handling are identified; Based on the case retrospective analysis results and the evaluation reasoning chain, a quality scoring agent is developed. Through multi-dimensional evaluation and weight adaptive algorithm, quantitative scoring of case quality is realized, and evaluation results including overall scores and sub-dimensional scores are generated; Based on the quality evaluation results and the evaluation standard library, an improvement suggestion agent is developed. Through difference analysis and best practice matching, specific and actionable improvement suggestions are generated for dimensions with scores below the first preset threshold, providing guidance for improving case quality; Based on the case retrospective agent, the quality scoring agent and the improvement suggestion agent, an agent collaboration framework including task allocation, information sharing and result fusion is designed. Through reinforcement learning to optimize the collaboration strategy, efficient collaborative work between agents is achieved, forming a complete multi-agent system, and realizing intelligent evaluation and analysis of case quality; Based on the multi-agent system, the non-exact alternating direction multiplier method algorithm is applied to realize distributed task allocation for unplanned online tasks, thereby improving the system's processing capability for sudden or unconventional cases, including: based on the multi-agent system, feature extraction and mathematical modeling of unplanned online tasks are performed, and a task allocation optimization model including task characteristics, resource constraints, and time windows is constructed; Based on the task allocation optimization model, an non-exact alternating direction multiplier method algorithm framework is designed, and the global optimization problem is converted into multiple sub-problems that can be solved in parallel through problem decomposition, variable updating, and multiplier adjustment steps; Based on the non-exact alternating direction multiplier method algorithm framework, an non-exact update strategy including adaptive precision control, early stopping strategy, and approximate solution is developed, and the algorithm convergence speed is accelerated by reducing the computational precision requirement of each iteration; Based on the non-exact update strategy, a distributed computing framework that supports multi-node parallel computing is developed, and efficient distributed processing of unplanned online tasks is realized through task division, node coordination, and result aggregation; Based on the distributed task allocation results, combined with planning and reinforcement learning technology, the problem of multi-agent case association is solved, and the intelligent processing of complex related cases is realized; Based on the multi-agent case association processing results, the forced zero-method sparsification graph technology is applied to achieve effective learning based on case graphs, including: based on the multi-agent case association processing results, through entity extraction, relationship recognition and knowledge fusion technology, a case knowledge graph containing case elements, legal concepts, and processing procedures is constructed to provide a data basis for graph learning; based on the case knowledge graph, a graph neural network model including a graph convolution layer, an attention mechanism, and a message passing mechanism is designed, and preliminary modeling of the case graph structure is achieved through node feature extraction and edge relationship learning; based on the graph neural network model, a forced zero-method sparsification mechanism including L0 regularization, gated activation, and gradient estimation is implemented, by explicitly controlling the model complexity and the number of activated nodes; based on the forced zero-method sparsification mechanism, an adaptive learning algorithm including meta-learning, knowledge distillation, and incremental training is developed, and the learning strategy and model structure are dynamically adjusted to adapt to the graph characteristics of different types of cases to achieve effective learning based on case graphs; Based on the effective learning results of the case graph, a case quality assessment knowledge graph is constructed to achieve intelligent and precise case quality management and provide data support for legal decision-making.
2. The method according to claim 1, characterized in that Based on legal normative documents and trial practices, we will build an evaluation standard library covering various types of cases, including: Based on legal normative documents and trial practices, we extract normative requirements and standards related to case quality assessment through text extraction and semantic analysis technology to form a structured normative requirement dataset; Based on the data set of the regulatory requirements, classify the data according to case type and evaluation dimension, build a hierarchical evaluation standard model, and generate an initial evaluation standard library; Based on the initial evaluation standard library, a dynamic update mechanism is designed that includes new specification document detection, semantic change recognition, and automatic update of standard items to achieve real-time update capabilities of the evaluation standard library; Based on the dynamic update mechanism, a standard conflict detection algorithm and coordination strategy are developed to resolve possible conflict problems that may arise during the standard update process through semantic similarity analysis and rule priority determination, thereby achieving real-time update and optimization of the evaluation standard library.
3. The method according to claim 2, characterized in that Based on legal normative documents and trial practices, text extraction and semantic analysis technologies are used to extract normative requirements and standards related to case quality assessment, forming a structured normative requirement dataset, including: Based on legal normative documents and trial practices, collect normative documents to form a collection of original documents; Based on the original document set, preprocessing the documents using natural language processing technology, including text cleaning, word segmentation, part-of-speech tagging and syntactic analysis, to generate structured text; Based on the structured text, named entity recognition and relationship extraction technology are applied to identify evaluation elements and standard items in the text, extract the semantic relationships between them, and construct a preliminary standard element network; Based on the specification element network, repeated or similar evaluation elements are merged and standardized through semantic similarity calculation and cluster analysis to form a structured specification requirement data set.
4. The method according to claim 1, wherein Based on the evaluation standard library, a complete evaluation reasoning chain is designed, including: Based on the procedural specifications in the evaluation standard library and combined with the reasoning ability of the multi-agent system, a procedural legality evaluation subchain covering the case filing procedure, service procedure, evidence production procedure, and trial procedure is designed to achieve a comprehensive evaluation of the procedural legality of the case; Based on the substantive norms in the evaluation standard library and the procedural legality evaluation results, a subchain for evaluating the appropriateness of substantive handling of cases is designed, covering the stages of fact finding, acceptance of various evidences, application of law, and adjudication reasoning, to achieve an accurate assessment of the appropriateness of substantive handling of cases. Based on the document specifications in the evaluation standard library and the evaluation results of the appropriateness of the entity processing, a sub-chain for evaluating the standardization of legal documents is designed, including document format, language expression, logical structure, and content integrity, to achieve a detailed evaluation of the standardization of legal documents; Based on the procedural legality evaluation subchain, the entity processing appropriateness evaluation subchain and the legal document standardization evaluation subchain, through the multi-task learning and chain reasoning technology of the large language model, each evaluation subchain is integrated, and an inference control mechanism including evaluation sequence control, intermediate result feedback, and evaluation depth adjustment is developed to form a complete case quality evaluation reasoning chain.
5. The method according to claim 1, wherein Based on the distributed task allocation results, combined with planning and reinforcement learning technology, the problem of multi-agent case association is solved to achieve intelligent processing of complex related cases, including: Based on the distributed task allocation results, a case relevance recognition model is constructed through text similarity analysis, entity recognition, relationship extraction and other technologies to achieve automatic identification of case groups with intrinsic connections; Based on the inherently connected case groups, a hierarchical task planning framework is designed, which includes goal decomposition, constraint identification, and action sequence generation. Through symbolic planning and heuristic search, a preliminary action plan is generated for handling related cases. Based on the preliminary action plan, develop a reinforcement learning optimization model that includes state representation, reward mechanism, and policy network. Through interaction with the environment and policy iteration, optimize the handling strategy of related cases and improve the handling effect; Based on the reinforcement learning optimization model and the hierarchical task planning framework, a dynamic fusion mechanism of planning and learning is realized. Through a two-way feedback mechanism in which planning guides exploration and learning optimizes planning, the adaptability of the strategy is improved while ensuring the rationality of planning, thereby realizing intelligent processing of complex related cases.
6. The method according to claim 1, characterized in that Based on the effective learning results of the case graph, a case quality assessment knowledge graph is constructed to achieve intelligent and precise case quality management and provide data support for legal decision-making, including: Based on the effective learning results of the case graph, through data cleaning, format conversion, and redundancy elimination technology, multi-source evaluation data including evaluation criteria, case characteristics, evaluation results, and improvement suggestions are integrated to form a unified data set; Based on the unified dataset, a knowledge graph model is designed that includes concept hierarchy, relationship types, and attribute definitions. Through ontology engineering and semantic modeling, a conceptual framework for case quality assessment is constructed to guide the construction of the knowledge graph. Based on the knowledge graph model and the unified data set, unstructured and semi-structured data are converted into knowledge triples through named entity recognition, relationship extraction, event detection and other technologies to construct an initial case quality assessment knowledge graph; Based on the initial case quality assessment knowledge graph, a knowledge reasoning engine including rule reasoning, path reasoning, and statistical reasoning is developed, and a standardized application interface is designed to support multi-dimensional query, intelligent analysis, and precise recommendation of case quality management, thereby realizing intelligent and precise case quality management and providing data support for legal decision-making.
7. A case quality intelligent assessment system based on a large language model, characterized by: include: A processor and a memory, wherein the memory stores computer-executable instructions, and the processor executes the computer-executable instructions to implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Quality detection and evaluation method and system for judgment documents
CN112365372A
Complex information retrieval system and method
CN118779364A