Automatic indexing system for legal file key information based on natural language processing
By integrating multimodal preprocessing and intelligent extraction technologies, the problem of low efficiency in legal case file management has been solved, achieving high-precision, adaptive key information extraction and indexing, thereby improving case file management efficiency and data quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 浙江和义观达律师事务所
- Filing Date
- 2026-01-19
- Publication Date
- 2026-04-28
AI Technical Summary
Existing technologies are inefficient in legal case file management, relying on manual reading and annotation, with inconsistent indexing standards, information omissions or errors, and a lack of multimodal information fusion processing capabilities, making it difficult to adapt to the information structure and indexing needs of different types of case files.
An automatic indexing system for key information in legal case files based on natural language processing is adopted. It includes multimodal preprocessing of case files, intelligent extraction of key information, dynamic indexing rule engine, indexing quality assessment and feedback optimization module. It integrates pre-trained language model, graph neural network and sequence labeling model to achieve unified processing and high-precision extraction of multimodal data and adapt to different case file types.
It improves the efficiency of legal case file management, ensures information consistency, generates high-quality structured data, supports similar case recommendations and judicial statistics, has self-evolution capabilities, and continuously optimizes indexing quality.
Smart Images

Figure CN121936433A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to judicial informatization, and in particular to an automatic indexing system for key information in legal case files based on natural language processing. Background Technology
[0002] With the deepening of judicial informatization and the continuous development of "smart courts," the electronic and digital management of legal case files has become an inevitable trend. Massive amounts of legal case files, including indictments, answers, evidence materials, court transcripts, and judgments, constitute the core data assets of judicial work. However, the management and utilization of legal case files still face many challenges. Traditional case file management relies heavily on manual reading, understanding, and annotation of key information, such as party information, cause of action, amount involved, applicable legal provisions, and judgment results. This process is inefficient, time-consuming, and prone to inconsistencies in indexing standards, omissions, or errors due to differences in individual experience. Existing information technology tools are mostly limited to simple full-text searches or matching based on fixed keywords, lacking a deep understanding of the semantics of case file texts. They cannot accurately and automatically identify complex legal entities and their logical relationships, and are even less adaptable to the differences in information structure and indexing needs among different types of case files, such as civil, criminal, and administrative files. In addition, case file materials are diverse in form, including structured text, as well as a large number of scanned images, handwritten documents, and even audio transcribed text. Existing technical solutions often lack effective multimodal information fusion processing capabilities, resulting in insufficient completeness and accuracy of information extraction. Summary of the Invention
[0003] Purpose of the invention: The purpose of this invention is to provide a system that can automatically, intelligently, accurately and adaptably extract and index key information from multimodal legal files, so as to improve the efficiency of file management, ensure information consistency, and provide a high-quality structured data foundation for subsequent in-depth applications such as similar case recommendation, judicial statistics, and trial supervision.
[0004] Technical solution: An automatic indexing system for key information in legal case files based on natural language processing, comprising: The case file multimodal preprocessing module is used to receive and process the input raw data of legal case files, including text format data, image scan data, and / or audio transcribed text data. For image scan data, the module integrates an optical character recognition unit to convert it into processable text data. For all text data, preprocessing operations such as word segmentation, stop word removal, part-of-speech tagging, and legal terminology recognition are performed to output a standardized case file text sequence. A key information intelligent extraction module, connected to the case file multimodal preprocessing module, is used to automatically identify and extract key information entities and their relationships from the standardized case file text sequence, each with predefined categories. This module employs a hybrid natural language processing model architecture, including: a named entity recognition sub-model based on the pre-trained language model BERT, used for high-precision extraction of entities such as parties, courts, time, location, amount involved, and legal citations; a relationship extraction sub-model based on graph neural networks, used to analyze and extract legal relationships between entities, such as the "relationship between plaintiff and defendant" and the "correspondence between cited legal provisions and judgment results"; and an event extraction sub-model based on sequence labeling, used to identify legal events such as "lawsuit," "appeal," "mediation," and "judgment," along with their core arguments and elements. The dynamic indexing rule engine module, connected to the key information intelligent extraction module, is used to automatically generate structured indexing information based on the extracted key information entities, relationships, and events, combined with case file metadata. This engine has a built-in configurable indexing rule library, and rules are adaptively loaded and matched according to case file type, which includes at least civil, criminal, administrative, and enforcement types. The indexing rules define the mapping logic from information entities to indexing fields, the formatting standards for field values, and the method for constructing association indexes between different information entities. The final output is structured indexing data containing indexing keys, indexing values, confidence levels, and associated entity IDs. The indexing quality assessment and feedback optimization module, connected to the dynamic indexing rule engine module and the key information intelligent extraction module, is used to perform automated quality assessment and closed-loop optimization of the generated indexing data. This module includes: an evaluation unit based on rules and machine learning models, used to calculate the accuracy, completeness, and consistency scores of the indexing data; a manual verification interface, allowing users to confirm or correct the evaluation results; and a feedback learning unit, which feeds back the high-quality indexing data and correction records after manual verification as incremental training data to the corresponding sub-model in the key information intelligent extraction module, achieving continuous iterative optimization of model performance. The indexing data storage and retrieval service module is used to persistently store the structured indexing data, original case file text and their relationships, and provides an efficient multi-dimensional retrieval interface. This module establishes an inverted index and a relationship graph database, supports fast querying by party name, case number, legal provision, time range, event type and combinations of the above conditions, and returns the associated original case file fragments and a complete indexing information view.
[0005] Furthermore, the optical character recognition unit in the case file multimodal preprocessing module integrates a legal document format recognition model, which can identify and distinguish different areas in the case file, such as titles, paragraphs, tables, seals, and handwritten annotations. It also applies differentiated OCR processing strategies and confidence calibration to different areas to improve the accuracy of text conversion under complex formats.
[0006] Furthermore, the graph neural network-based relation extraction sub-model in the key information intelligent extraction module constructs a graph structure with the extracted entities as nodes and the co-occurrence relationship, syntactic dependency relationship, and semantic role relationship of the entities in the text as initial edges. It uses a multi-layer graph attention network to propagate and aggregate information, and finally predicts and outputs the specific legal relationship type and strength between node pairs.
[0007] Furthermore, the indexing rule library in the dynamic indexing rule engine module supports adding, deleting, modifying, and querying rules through a visual interface. Each rule consists of three parts: triggering conditions, execution actions, and priority. The triggering conditions support logical combinations based on entity type, context keywords, regular expressions, and machine learning model prediction results. The execution actions define the generation, filling, and association operations of indexing fields.
[0008] Furthermore, the evaluation unit in the indexing quality assessment and feedback optimization module adopts an integrated evaluation strategy, combining a rule evaluator based on indexing rule compliance, a statistical evaluator based on historical indexing data distribution, and an anomaly detection evaluator based on a lightweight neural network to comprehensively generate the final quality score and suspicious item prompts.
[0009] Furthermore, the system also includes a case file classification and triage preprocessing module, which is located before the case file multimodal preprocessing module. This module is used to perform preliminary case classification and urgency marking on the input case files based on the case file title, first paragraph content, and file attributes using a fast text classification model. The classification results are then provided as metadata to subsequent modules to guide the dynamic indexing rule engine module to prioritize loading relevant rule sets.
[0010] Furthermore, the indexing data storage and retrieval service module provides a retrieval interface that supports natural language question queries. This interface integrates a query understanding submodule, which can parse the natural language questions entered by the user into structured query intents and query conditions, and then convert them into precise query instructions for the inverted index and relational graph database.
[0011] The system is deployed as a software service, providing services to users through application programming interfaces or web interfaces; the indexing data generated by the system can be exported as standardized JSON or XML formats or directly connected to court business systems, electronic case file management systems, and legal research databases.
[0012] Beneficial effects: (1) By integrating multimodal preprocessing capabilities, this system can uniformly process case materials from various sources such as text, images, and audio, which broadens the scope of application of the system, ensures the integrity of the original information acquisition, and lays a reliable foundation for subsequent accurate analysis.
[0013] (2) This system adopts a hybrid intelligent extraction architecture that integrates pre-trained language models, graph neural networks and sequence labeling models, which realizes high-precision and deep semantic understanding and extraction of various entities, complex relationships and legal events in legal files, and improves the accuracy and comprehensiveness of key information identification.
[0014] (3) The dynamic indexing rule engine in this system can adapt the indexing strategy according to the case file type, realize the flexibility and standardization of the indexing process, effectively solve the problem of inconsistent information indexing caused by differences in case causes, and generate indexing data with high structure and strong correlation.
[0015] (4) The closed-loop quality assessment and feedback optimization mechanism introduced in this system can continuously monitor and improve indexing quality. Through human-machine collaboration, the model and rules are continuously optimized, enabling the system to have self-evolution capabilities and maintain a high level of service performance in the long term. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the system architecture. Detailed Implementation
[0017] To make the technical solution of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0018] Example 1 The system is deployed in the cloud and provides a web service interface for court clerks through the judicial intranet.
[0019] Multimodal Preprocessing Module for Case Files: A user uploads an electronic case file compressed package containing: a complaint (Word document), quantity verification sheets (scanned JPEG images), correspondence between the parties (PDF files), and a portion of a pre-trial conference recording (MP3 format). The module first decompresses and categorizes the data. Text from Word and PDF files is extracted directly. For JPEG images, an integrated high-precision OCR component (using the deep learning-based PaddleOCR engine) is used for text recognition and layout analysis to output text. For MP3 audio, a speech recognition service (such as iFlytek or Alibaba Cloud speech recognition API) is used for transcription to generate text. Subsequently, all texts are integrated into a unified preprocessing pipeline: the Harbin Institute of Technology LTP toolkit is used for preliminary analysis including word segmentation, part-of-speech tagging, and named entity recognition; a custom legal domain stop word list is loaded (filtering out formal phrases such as "Sincerely" and "Respectfully yours" as well as common function words); and a pre-built legal terminology database (including terms such as "completion acceptance," "statute of limitations for claims," and "force majeure") is used for proper noun matching and tagging. Finally, a clean, segmented, and pre-annotated standardized text sequence is output for use by downstream modules.
[0020] Key Information Intelligent Extraction Module: This module receives the aforementioned text sequence. Its core consists of three collaborative sub-models: Named Entity Recognition Sub-model: The RoBERTa-large model is further pre-trained on publicly available documents from the China Judgments Online website and fine-tuned on a manually annotated legal entity dataset. This model accurately identifies entities such as "Plaintiff: A certain construction company" (ORG), "Defendant: A certain real estate development company" (ORG), "Place of contract signing: Shanghai" (LOC), "Disputed amount: RMB 8 million" (MONEY), and "Based on Article 803 of the Civil Code" (LAW), and assigns a type label and confidence level to each entity.
[0021] Relation Extraction Sub-model: A heterogeneous graph neural network model based on dependency syntax trees and semantic role labeling is adopted. This model analyzes the sentence structure, extracts the "contractual counterparty" relationship between "a certain construction company" and "a certain real estate development company", and identifies "disputed amount: eight million yuan" as the core component of the "claim" and is associated with the plaintiff entity.
[0022] Event Extraction Sub-model: Employing a sequence-to-sequence model based on pointer networks, this model is specifically designed to identify legal procedural and factual events. It identifies "breach of contract" as the core cause of action from the text and extracts key elements: Breaching Party = a real estate development company; Breach of contract = overdue payment of construction fees; Affected Party = a construction company.
[0023] Dynamic indexing rule engine module: Based on "Case: Civil - Contract Dispute - Construction Project Contract Dispute" judged from the file metadata or extraction results, the engine automatically loads the indexing rule template configured for this type. The rule library is defined in XML format and contains: Mapping rule: It stipulates that for an entity of "ORG" type extracted by the NER sub - model, if its role in the text is "plaintiff", it is mapped to the indexing field "<Full name of the plaintiff>".
[0024] Formatting rule: It stipulates that entity values of "MONEY" type need to be uniformly converted to Arabic numeral format. For example, "Eight million yuan" is formatted as "8000000 yuan" and stored in the indexing field "<Litigation amount>".
[0025] Associated indexing rule: It stipulates that when the "contract counterpart" relationship is recognized, the system establishes a two - way index link for the two fields "<Full name of the plaintiff>" and "<Full name of the defendant>" in the indexing data.
[0026] The engine executes these rules to generate the final structured indexing entries. Each entry contains the field name, the processed value, the position of the original text segment of the data source, and the extraction confidence.
[0027] Indexing quality assessment and feedback optimization module: The system starts an automatic assessment process for the generated preliminary indexing results. The assessment unit combines rules (such as non - empty check of key fields) and a lightweight machine - learning classifier (to judge the context rationality of the indexing value) to give scores of "accuracy" and "completeness". Entries with scores lower than the set threshold will be presented to the clerk for review in a highlighted manner through the manual verification interface. The clerk can correct incorrect indexing or supplement missing information. All manual correction behaviors are recorded and form a feedback data packet, which is regularly used for: Model incremental training: The corrected entity and relationship labels are used as new training samples to update sub - models such as NER and relationship extraction.
[0028] Rule library optimization: Frequently occurring manual correction patterns can be analyzed, and it is recommended that the administrator modify or add corresponding dynamic indexing rules.
[0029] This closed - loop process ensures the continuous improvement of the system's performance during continuous use.
[0030] Embodiment 2 This embodiment discloses the application of the same system in the processing of criminal case files suspected of fraud to demonstrate its adaptability across case types.
[0031] Multimodal preprocessing module for case files: Electronic case files transferred by public security organs for review and prosecution include: indictment opinion (PDF), interrogation records of criminal suspects (scanned images), bank statement screenshots (PNG), victim statement audio recordings (WAV), and a list of seized items (Excel spreadsheet). The module processing flow is as follows: Text is directly extracted from PDF and Excel; interrogation record images and bank statement screenshots are recognized using an OCR component (in this embodiment, Google Tesseract 4.0 with an LSTM engine), with a handwriting recognition optimization mode specifically enabled for handwritten paragraphs; WAV audio is transcribed using the open-source tool Kaldi. After removing irrelevant characters and uniformly encoding all text, it is sent to a Chinese processing pipeline customized based on the spaCy framework for word segmentation and part-of-speech tagging, and keyword enhancement is performed using a loaded criminal law terminology library (such as "fraud," "illegal possession for the purpose of possession," "fabricating facts," etc.), outputting standardized text.
[0032] Key Information Intelligent Extraction Module: The named entity recognition sub-model (which uses the same BERT model but with slight adjustments for criminal corpora) identified: "suspect Wang" (PERSON), "victim Li" (PERSON), "amount of fraud totaling 500,000 yuan" (MONEY), "tool of the crime: one mobile phone" (OBJECT), and "suspected of Article 266 of the Criminal Law" (LAW).
[0033] The relation extraction sub-model (graph neural network) analyzes the transcripts and statements to construct the relationship between "Wang" and "Li" in committing "fraudulent acts", and associates "a mobile phone" as a "tool for committing the crime" with "Wang".
[0034] The event extraction sub-model (sequence labeling model) identified "fraud" as the core criminal event. Extracted elements: time span = January to March 2023, means = fictitious investment project, result = victim lost 500,000 yuan.
[0035] Dynamic indexing rule engine module: The system loads a set of indexing rules for criminal fraud cases based on "Case Nature: Criminal" and "Suspected Crime: Fraud". The rule set defines field mappings different from those for civil cases, for example: Map the "PERSON" entity to either the "Suspect's Name" or "Victim's Name" field, depending on the context role.
[0036] Map "one mobile phone" in the "OBJECT" entity to the "seized items" field and trigger the formatting rules to generate a standardized description "mobile phone (1 unit)".
[0037] Establishing a network of links between "criminal suspects" and "victims," and between "tools of the crime" and "criminal acts" facilitates the tracing of case details.
[0038] Indexing Quality Assessment and Feedback Optimization Module: In criminal cases, quality assessment is particularly crucial. In addition to routine checks, the assessment unit adds rules for checking "procedural legality elements" (such as whether "interrogation time" and "interrogator" are identified). Prosecutors review and confirm key indexes generated by the system, such as "amount involved" and "method of crime," through a manual verification interface. Any modifications will be incorporated into the feedback loop to optimize models and rules in the criminal field, ensuring the system's understanding of criminal legal language becomes increasingly accurate.
[0039] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. An automatic indexing system for key information in legal case files based on natural language processing, characterized in that, include: The case file multimodal preprocessing module is used to receive and process the input raw data of legal case files, including text format data, image scan data, and / or audio transcribed text data. For image scan data, the module integrates an optical character recognition unit to convert it into processable text data. For all text data, preprocessing operations such as word segmentation, stop word removal, part-of-speech tagging, and legal terminology recognition are performed to output a standardized case file text sequence. The key information intelligent extraction module is connected to the case file multimodal preprocessing module and is used to automatically identify and extract predefined categories of key information entities and their relationships from the standardized case file text sequence. This module adopts a hybrid natural language processing model architecture, including: a named entity recognition sub-model based on the pre-trained language model BERT, used to extract entities such as parties, courts, time, place, amount involved, and legal citations with high accuracy; a relationship extraction sub-model based on graph neural networks, used to analyze and extract legal relationships between entities; and an event extraction sub-model based on sequence labeling, used to identify legal events and their core arguments and elements. The dynamic indexing rule engine module, connected to the key information intelligent extraction module, is used to automatically generate structured indexing information based on the extracted key information entities, relationships, and events, combined with dossier metadata. The engine has a built-in indexing rule library, and the rules are adaptively loaded and matched according to the dossier type. The indexing rules define the mapping logic from information entities to indexing fields, the formatting standards for field values, and the construction method of association indexes between different information entities. Finally, it outputs structured indexing data containing indexing keys, indexing values, confidence levels, and associated entity IDs. The indexing quality assessment and feedback optimization module, connected to the dynamic indexing rule engine module and the key information intelligent extraction module, is used to perform automated quality assessment and closed-loop optimization of the generated indexing data. This module includes: an evaluation unit based on rules and machine learning models, used to calculate the accuracy, completeness, and consistency scores of the indexing data; a manual verification interface, allowing users to confirm or correct the evaluation results; and a feedback learning unit, which feeds back the high-quality indexing data and correction records after manual verification as incremental training data to the corresponding sub-model in the key information intelligent extraction module, achieving continuous iterative optimization of model performance. The indexing data storage and retrieval service module is used to persistently store the structured indexing data, original case file text and their relationships, and provides an efficient multi-dimensional retrieval interface. This module establishes an inverted index and a relationship graph database, supports fast querying by party name, case number, legal provision, time range, event type and combinations of the above conditions, and returns the associated original case file fragments and a complete indexing information view.
2. The automatic indexing system for key information in legal case files based on natural language processing according to claim 1, characterized in that, The optical character recognition unit in the case file multimodal preprocessing module integrates a legal document format recognition model, which can identify and distinguish different areas in the case file and apply differentiated OCR processing strategies and confidence calibration to different areas.
3. The automatic indexing system for key information in legal case files based on natural language processing according to claim 1, characterized in that, The key information intelligent extraction module's relation extraction sub-model based on graph neural networks constructs a graph structure with extracted entities as nodes and co-occurrence relationships, syntactic dependency relationships, and semantic role relationships of entities in the text as initial edges. It uses a multi-layer graph attention network to propagate and aggregate information, and finally predicts and outputs the specific legal relationship type and strength between node pairs.
4. The automatic indexing system for key information in legal case files based on natural language processing according to claim 1, characterized in that, The indexing rule library in the dynamic indexing rule engine module supports adding, deleting, modifying, and querying rules through a visual interface. Each rule consists of three parts: triggering conditions, execution actions, and priority. The triggering conditions support logical combinations based on entity type, context keywords, regular expressions, and machine learning model prediction results. The execution actions define the generation, filling, and association operations of indexing fields.
5. The automatic indexing system for key information in legal case files based on natural language processing according to claim 1, characterized in that, The evaluation unit in the indexing quality assessment and feedback optimization module adopts an integrated evaluation strategy, combining a rule evaluator based on indexing rule compliance, a statistical evaluator based on historical indexing data distribution, and an anomaly detection evaluator based on a lightweight neural network to comprehensively generate the final quality score and suspicious item prompts.
6. The automatic indexing system for key information in legal case files based on natural language processing according to claim 1, characterized in that, The system also includes a case file classification and triage preprocessing module, which is located before the case file multimodal preprocessing module. This module is used to perform preliminary case classification and urgency marking on the input case files based on the case file title, first paragraph content, and file attributes using a fast text classification model. The classification results are then provided as metadata to subsequent modules to guide the dynamic indexing rule engine module to prioritize loading relevant rule sets.
7. The automatic indexing system for key information in legal case files based on natural language processing according to claim 1, characterized in that, The indexing data storage and retrieval service module provides a retrieval interface that supports natural language question queries. This interface integrates a query understanding submodule, which can parse the natural language questions entered by the user into structured query intents and query conditions, and then convert them into precise query instructions for the inverted index and relational graph database.