Civil and administrative case analysis method based on large model
Through the large-scale model-based civil and administrative case analysis method, case information is automatically processed and legal documents are generated, which solves the time-consuming and labor-intensive problems in traditional judicial work, realizes efficient and standardized document generation and intelligent question and answer, and improves the modernization level of legal institutions.
Patent Information
- Application Number
- CN202510676282.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-24
- Publication Date
- 2025-09-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In traditional judicial work, case review and document writing are time-consuming and labor-intensive, and are easily influenced by personal experience and emotions, leading to inconsistent and inaccurate judgments, making it difficult to meet the growing demand for case handling.
A large-scale model-based civil and administrative case analysis method is adopted, including the conversion of petition cases into clues, document generation, legal intelligent question and answer, and investigation of clues in the proprietary case system. Natural language processing technology and deep learning algorithms are used to automatically process case information, generate legal documents, and provide intelligent question and answer services.
It optimizes the generation of legal documents, reduces operating costs, improves work efficiency, enhances the informatization of legal institutions, reduces manual operations, and improves judicial fairness and the core issue handling capabilities of staff.
Smart Images

Figure CN120687587A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer software technology, and in particular to a civil and administrative case analysis method based on a large model. Background Art
[0002] With the rapid development of artificial intelligence (AI), its application in various fields has become a trend. In the legal field in particular, the application of AI not only improves work efficiency but also, to a certain extent, reduces subjective judgment errors and enhances judicial fairness. Legal work involves extensive case review, evidence analysis, and the drafting of legal documents, all of which can be optimized using big model technology.
[0003] In traditional judicial work, staff must handle a large number of cases, often accompanied by vast amounts of documentation and evidence. Manual review of these materials is not only time-consuming and labor-intensive, but also easily influenced by personal experience and emotions, leading to inconsistent judgments and errors. Furthermore, the speed and efficiency of manual processing cannot meet the growing demand for case handling.
[0004] Deep learning, particularly the development of convolutional neural networks (CNNs) and recurrent neural networks (RNNs), has revolutionized fields like image recognition and natural language processing. These technologies can be applied to relevant legal work, using image recognition to assist with evidence analysis and natural language processing to aid in document drafting and case analysis. To this end, we propose a method for analyzing civil and administrative cases based on large models. Summary of the Invention
[0005] This application provides a civil and administrative case analysis method based on a large model to solve the above-mentioned problems.
[0006] This application provides a civil and administrative case analysis method based on a large model, which includes the following steps:
[0007] S1: Convert petition case sources into clues, automatically identifying relevant information in petition case sources through natural language processing technology and converting them into case clues;
[0008] S2: Document generation, using natural language processing technology to assist legal staff in quickly generating legal documents, including protests and applications for support and supervision;
[0009] S3: Legal intelligent question and answer service, providing legal intelligent question and answer service to answer legal consultations of staff and the public, and with database query function to search relevant data in the system;
[0010] S4: Proprietary case system clue screening automatically screens cases based on business scenarios and identifies cases that require further review.
[0011] Preferably, the petition case source transfer includes the following steps:
[0012] S11: Expand the source of petition cases;
[0013] S12: Develop petition screening and scoring rules based on staff and expert recommendations;
[0014] S13: Train and adjust the embedding model based on petition data;
[0015] S14: Design prompt words.
[0016] Preferably, the training process of training and adjusting the embedding model based on the petition data is as follows:
[0017] X=E token +E segment +E position
[0018] Among them, E token is word embedding, E segment is the paragraph embedding, E position is the position embedding;
[0019] H = Transformer(X)
[0020] Among them, Transformer is composed of multiple layers of identical encoders, each layer includes a multi-head self-attention mechanism and a feedforward neural network;
[0021]
[0022] Among them, W is the weight matrix of the output layer, is the probability distribution of the predicted word;
[0023]
[0024] in, is the probability of the model predicting word w;
[0025] Use the backpropagation algorithm to update the weight W:
[0026]
[0027] Where η is the learning rate.
[0028] Preferably, the document generation module includes the following steps:
[0029] S21: Collect the document templates required by legal staff;
[0030] S22: vectorize the template and then store it in the vector library;
[0031] S23: Use special prompt words to guide the model to generate corresponding legal documents based on the template and input information.
[0032] Preferably, the template is vectorized and then stored in a vector library to design the following steps:
[0033] Text preprocessing, including word segmentation, stop word removal, and lowercase operations, the resulting text is T pre ;
[0034] Use the pre-trained word embedding model to embed T pre Each word in is mapped into a vector space of fixed dimension.
[0035] Preferably, the legal intelligent question-answering module implements the following specific steps:
[0036] S31: Collect all current laws and regulations from the Internet and collect relevant data and information from legal staff;
[0037] S32: Establish a legal and regulatory database and a legal and regulatory knowledge base, combining the two to reduce the interference of similar entries on enhanced retrieval of the knowledge base;
[0038] S33: Add a re-ranking model to perform targeted re-ranking on the items retrieved by the enhanced search;
[0039] S34: Use prompt word engineering to fuse input and search content, input into the large model for analysis and output, and realize intelligent question and answer.
[0040] Preferably, the steps of adding a reordering model and performing a targeted reordering on the items retrieved by the enhanced search are as follows:
[0041]
[0042] Where Q is the query vector, D is the document vector, · represents the dot product, ||Q|| and ||D|| are the Euclidean norms of the query vector and document vector respectively. This formula calculates the cosine similarity between the query vector and the document vector;
[0043] rank(D)=argsort(score(Q,D))
[0044] Among them, argsort is a permutation operation that returns the document index sorted from high to low by score(Q,D). This operation sorts the documents according to their relevance scores to the query.
[0045] Preferably, the system line investigation of the own case includes the following steps:
[0046] S41: Collect business rules for legal staff;
[0047] S42: Use OCR to obtain relevant file contents;
[0048] S43: Customized prompt words use the large model to extract relevant information from the file and output it in a structured manner;
[0049] S44: Make rule judgments based on business rules and the extracted file information, and output any violations.
[0050] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:
[0051] Compared with the prior art, the overall structure provided by the embodiment of the present application achieves:
[0052] 1. Optimize the generation of legal documents: The system can quickly generate legal documents, reducing the time spent by legal staff on document writing, while maintaining the standardization and professionalism of the documents.
[0053] 2. Reduce costs: By reducing manual operations, the system can reduce the operating costs of legal institutions and improve resource utilization efficiency.
[0054] 3. Improve staff work efficiency: Through automation and intelligent means, the system enables staff to devote more energy to the core issues of the case rather than tedious paperwork and evidence compilation.
[0055] 4. Enhance the informatization construction of legal institutions: The implementation of this system will further promote the informatization construction of legal institutions and improve the modernization level of the work of legal institutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0057] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0058] Figure 1 It is the overall principle diagram of the present invention;
[0059] Figure 2This is the S1 principle diagram of the present invention;
[0060] Figure 3 This is the S2 principle diagram of the present invention;
[0061] Figure 4 This is the S3 principle diagram of the present invention;
[0062] Figure 5 This is the S4 principle diagram of the present invention;
[0063] Figure 6 This is a diagram of the intelligent question-answering interface of the present invention;
[0064] Figure 7 This is a diagram of the interface for converting petitions to clues of the present invention;
[0065] Figure 8 This is a clue investigation rule diagram for the proprietary case system of the present invention;
[0066] Figure 9 This is the legal and regulatory database and case database diagram of the present invention. DETAILED DESCRIPTION
[0067] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0068] The various embodiments of the present application may be presented in the form of a range. It should be understood that the description in the form of a range is merely for convenience and brevity and should not be construed as a rigid limitation on the scope of the present application. Therefore, it should be considered that the range description has specifically disclosed all possible sub-ranges and single numerical values within the range. For example, it should be considered that the range description from 1 to 6 has specifically disclosed sub-ranges, such as from 1 to 3, from 1 to 4, from 1 to 5, from 2 to 4, from 2 to 6, from 3 to 6, etc., as well as single numbers within the range, such as 1, 2, 3, 4, 5 and 6, regardless of the range. In addition, whenever a numerical range is indicated in this application, it is intended to include any quoted number (fraction or integer) within the indicated range. Unless otherwise specified, the various raw materials, reagents, instruments and equipment used in this application are all commercially available or can be prepared using existing equipment.
[0069] In this application, unless otherwise specified, the directional words used, such as "upper" and "lower", specifically refer to the directions of the drawings in the accompanying drawings. In addition, in this application, the terms "including", "comprising", etc. mean "including but not limited to". In this application, relational terms such as "first" and "second" are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. In this application, "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. Wherein A and B can be singular or plural. In this application, "at least one" means one or more, and "plurality" means two or more. "At least one", "at least one of the following" or similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, "at least one of a, b, or c" or "at least one of a, b and c" can both mean: a, b, c, ab, i.e. a and b, ac, bc or abc, where a, b, c can be single or multiple.
[0070] like Figure 1-Figure 5 As shown: This embodiment of the application provides a civil and administrative case analysis method based on a large model, comprising the following steps:
[0071] S1: Convert petition case sources into clues, automatically identifying relevant information in petition case sources through natural language processing technology and converting them into case clues;
[0072] S2: Document generation, using natural language processing technology to assist legal staff in quickly generating legal documents, including protests and applications for support and supervision;
[0073] S3: Legal intelligent question and answer service, providing legal intelligent question and answer service to answer legal consultations of staff and the public, and with database query function to search relevant data in the system;
[0074] S4: Proprietary case system clue screening automatically screens cases based on business scenarios and identifies cases that require further review.
[0075] The petition case source transfer includes the following steps:
[0076] S11: Expand the source of petition cases;
[0077] S12: Develop petition screening and scoring rules based on staff and expert recommendations;
[0078] S13: Train and adjust the embedding model based on petition data;
[0079] S14: Design prompt words.
[0080] The training process of training and adjusting the embedding model based on petition data is as follows:
[0081] X=E token +E segment +E position
[0082] Among them, E token is word embedding, E segment is the paragraph embedding, E position is the position embedding;
[0083] H = Transformer(X)
[0084] Among them, Transformer is composed of multiple layers of identical encoders, each layer includes a multi-head self-attention mechanism and a feedforward neural network;
[0085]
[0086] Among them, W is the weight matrix of the output layer, is the probability distribution of the predicted word;
[0087]
[0088] in, is the probability of the model predicting word w;
[0089] Use the backpropagation algorithm to update the weight W:
[0090]
[0091] Where η is the learning rate.
[0092] The document generation module includes the following steps:
[0093] S21: Collect the document templates required by legal staff;
[0094] S22: vectorize the template and then store it in the vector library;
[0095] S23: Use special prompt words to guide the model to generate corresponding legal documents based on the template and input information.
[0096] The template is vectorized and then stored in a vector library to design the following steps:
[0097] Text preprocessing, including word segmentation, stop word removal, and lowercase operations, the resulting text is T pre ;
[0098] Use the pre-trained word embedding model to embed T pre Each word in is mapped into a vector space of fixed dimension.
[0099] The specific steps for implementing the legal intelligent question-answering module are as follows:
[0100] S31: Collect all current laws and regulations from the Internet and collect relevant data and information from legal staff;
[0101] S32: Establish a legal and regulatory database and a legal and regulatory knowledge base, combining the two to reduce the interference of similar entries on enhanced retrieval of the knowledge base;
[0102] S33: Add a re-ranking model to perform targeted re-ranking on the items retrieved by the enhanced search;
[0103] S34: Use prompt word engineering to fuse input and search content, input into the large model for analysis and output, and realize intelligent question and answer.
[0104] The steps for adding a reordering model and performing a targeted reordering on the items retrieved by the enhanced search are as follows:
[0105]
[0106] Where Q is the query vector, D is the document vector, · represents the dot product, ||Q|| and ||D|| are the Euclidean norms of the query vector and document vector respectively. This formula calculates the cosine similarity between the query vector and the document vector;
[0107] rank(D)=argsort(score(Q,D))
[0108] Among them, argsort is a permutation operation that returns the document index sorted from high to low by score(Q,D). This operation sorts the documents according to their relevance scores to the query.
[0109] The system line investigation of the own case includes the following steps:
[0110] S41: Collect business rules for legal staff;
[0111] S42: Use OCR to obtain relevant file contents;
[0112] S43: Customized prompt words use the large model to extract relevant information from the file and output it in a structured manner;
[0113] S44: Make rule judgments based on business rules and the extracted file information, and output any violations.
[0114] Example
[0115] according to Figures 6 to 9 As shown: The main structure uses a large model as the system engine to drive the operation of four functional modules, requiring one back-end server and one high-performance algorithm server.
[0116] The details are as follows:
[0117] 1. Build a database and Java service on the back-end server to store relevant data and coordinate operations between basic services.
[0118] 2. Expand case sources, specify specific rules, and deploy a petition case source-to-catch module on the algorithm server.
[0119] Specifically: Expand the petition case source, establish data interfaces with major petition platforms, and achieve automatic data synchronization. Establish a dedicated data synchronization team to monitor data synchronization status and ensure data real-time and integrity.
[0120] Develop petition screening and scoring rules. Legal experts and data analysts will be assembled to develop a set of screening criteria and scoring systems for petition cases based on historical case data. Based on this scoring system and criteria, scores will be automatically assigned based on key information in the petition content.
[0121] Train and adjust the embedding model, selecting an appropriate NLP framework for model training. Collect historical petition data as a training set and fine-tune the model to suit specific business needs. Establish a monitoring system to regularly evaluate model performance and make adjustments based on feedback.
[0122] Design prompt words and information extraction, collaborate with legal experts to design a series of prompt words to guide the model to identify key points in petition information.
[0123] 3. Collect document templates, vectorize and store them on the algorithm server, and deploy services related to the document generation module.
[0124] Specifically: collect document templates, collect commonly used document templates from legal archives, and digitize them.
[0125] Template vectorization: Preprocess the template, including tokenization and stop word removal, and vectorize it using an open-source word embedding model. Store the vectorized template in a database and create an index to speed up retrieval.
[0126] 4. Deploy the vector library on the algorithm server, collect legal related content, and deploy modules related to intelligent question answering.
[0127] Specifically: Collection of legal and regulatory content, collecting laws and regulations and internal related information from the national policy and regulations database;
[0128] Establish a legal and regulatory database and knowledge base, using the MySQL database management system to store legal and regulatory content. Leverage natural language processing technology to conduct semantic analysis of laws and regulations and build a knowledge graph.
[0129] Reranking model: Develop a reranking model based on b25 to optimize the relevance of search results. Regularly train and test the model to ensure the accuracy of search results.
[0130] To implement intelligent question-answering, we developed a Q&A interface where users can enter questions. The system automatically retrieves answers from the knowledge base, combines the question with the search results, and feeds the system into a large model using prompts. We also established an expert assistance module, where professional legal personnel can provide answers to complex or sensitive legal issues.
[0131] 5. Collect business rules, sort out business, and deploy the clue investigation module of the own case system.
[0132] Specifically: Collect business troubleshooting rules and collaborate with the legal department to collect and organize them. Digitize the rules and input them into the system to build a rule library.
[0133] OCR obtains the contents of the file, distinguishes the title and the text based on the size of the detected box, classifies different judgments, and splices the recognized content to obtain the complete content.
[0134] Customized prompts and information extraction: Based on business rules, customized prompts are designed to guide the model to extract relevant information from the case file. The large model is then used to extract information, automatically populating the extracted information into the case investigation template.
[0135] Rule judgment and output: Develop a rule engine to automatically determine whether a case requires further review based on business rules and extracted file information. Establish a manual review process, and staff will provide final confirmation for cases determined by the system to require further review.
[0136] The foregoing is merely a list of specific embodiments of the present application, intended to enable those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but rather is intended to conform to the broadest scope consistent with the principles and novel features claimed herein.
Claims
1. The civil and administrative case analysis method based on the large model is characterized by: The steps include: S1: Convert petition case sources into clues, automatically identifying relevant information in petition case sources through natural language processing technology and converting them into case clues; S2: Document generation, using natural language processing technology to assist legal staff in quickly generating legal documents, including protests and applications for support and supervision; S3: Legal intelligent question and answer service, providing legal intelligent question and answer service to answer legal consultations of staff and the public, and with database query function to search relevant data in the system; S4: Proprietary case system clue screening automatically screens cases based on business scenarios and identifies cases that require further review.
2. The large-scale model-based civil and administrative case analysis method according to claim 1 is characterized by: The petition case source transfer includes the following steps: S11: Expand the source of petition cases; S12: Develop petition screening and scoring rules based on staff and expert recommendations; S13: Train and adjust the embedding model based on petition data; S14: Design prompt words.
3. The large-scale model-based civil and administrative case analysis method according to claim 2 is characterized by: The training process of training and adjusting the embedding model based on petition data is as follows: X=E token +E segment +E position Among them, E token is word embedding, E segment is the paragraph embedding, E position is the position embedding; H = Transformer(X) Among them, Transformer is composed of multiple layers of identical encoders, each layer includes a multi-head self-attention mechanism and a feedforward neural network; Among them, W is the weight matrix of the output layer, is the probability distribution of the predicted word; in, is the probability of the model predicting word w; Use the backpropagation algorithm to update the weight W: Where η is the learning rate.
4. The large-scale model-based civil and administrative case analysis method according to claim 1 is characterized by: The document generation module includes the following steps: S21: Collect the document templates required by legal staff; S22: vectorize the template and then store it in the vector library; S23: Use special prompt words to guide the model to generate corresponding legal documents based on the template and input information.
5. The large-scale model-based civil and administrative case analysis method according to claim 4 is characterized by: The template is vectorized and then stored in a vector library to design the following steps: Text preprocessing, including word segmentation, stop word removal, and lowercase operations, the resulting text is T pre ; Use the pre-trained word embedding model to embed T pre Each word in is mapped into a vector space of fixed dimension.
6. The large-scale model-based civil and administrative case analysis method according to claim 1 is characterized by: The specific steps for implementing the legal intelligent question-answering module are as follows: S31: Collect all current laws and regulations from the Internet and collect relevant data and information from legal staff; S32: Establish a legal and regulatory database and a legal and regulatory knowledge base, combining the two to reduce the interference of similar entries on enhanced retrieval of the knowledge base; S33: Add a re-ranking model to perform targeted re-ranking on the items retrieved by the enhanced search; S34: Use prompt word engineering to fuse input and search content, input into the large model for analysis and output, and realize intelligent question and answer.
7. The large-scale model-based civil and administrative case analysis method according to claim 6 is characterized by: The steps for adding a reordering model and performing a targeted reordering on the items retrieved by the enhanced search are as follows: Where Q is the query vector, D is the document vector, · represents the dot product, ||Q|| and ||D|| are the Euclidean norms of the query vector and document vector respectively. This formula calculates the cosine similarity between the query vector and the document vector; rank(D)=argsort(score(Q,D)) Among them, argsort is a permutation operation that returns the document index sorted from high to low by score(Q,D). This operation sorts the documents according to their relevance scores to the query.
8. The large-scale model-based civil and administrative case analysis method according to claim 1 is characterized by: The system line investigation of the own case includes the following steps: S41: Collect business rules for legal staff; S42: Use OCR to obtain relevant file contents; S43: Customized prompt words use the large model to extract relevant information from the file and output it in a structured manner; S44: Make rule judgments based on business rules and the extracted file information, and output any violations.