Intelligent legal case processing system based on multi-level cache architecture
By adopting a multi-level cache architecture and in-memory database in the legal litigation system, combined with intelligent case-sharing algorithms, the existing system's problems in case allocation, data management and process efficiency are solved, and more efficient case handling and response speed is achieved.
Patent Information
- Application Number
- CN202510290290.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-06-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing legal litigation system has problems such as low efficiency, slow response, long process and limited timed task capabilities in case allocation, data management, signature and ruling processes.
The intelligent legal case processing system based on a multi-level caching architecture is adopted to cache case key information and personnel workload information through in-memory databases (such as Redis), combine weighted scoring algorithms and dynamic weighted case segmentation algorithms to achieve intelligent case allocation and workload balancing, and improve system response speed and data consistency through distributed storage and data synchronization modules.
It significantly improves the system response speed, reduces system query delay, shortens case-sharing time, improves overall processing efficiency and workload balancing, and improves litigation cycle.
Smart Images

Figure CN120216518A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an intelligent processing system for legal cases, and in particular to an intelligent processing system for legal cases based on a multi-level cache architecture, belonging to the technical field of legal case management systems. Background Art
[0002] With the development of information technology, the legal litigation system has gradually become digitalized. The Java Spring Boot framework is widely used due to its modularity and scalability. Redis, as a high-performance cache technology, improves data access speed. Alibaba Cloud OSS provides distributed storage support, and PowerJob enhances the automation capabilities of scheduled tasks. The front-end framework Ant Design provides efficient UI components to facilitate user interaction experience. However, although the existing legal litigation systems mostly have case entry and task allocation functions, their intelligent case division, data management and process collaboration still need to be optimized.
[0003] The functions of existing legal litigation systems usually include case entry and pooling, task allocation, document management, caching technology and scheduled tasks. Cases are manually entered to form a case pool, and cases are allocated through simple rules. Local storage or OSS is used to upload files, and simple scheduling is achieved with the help of Quartz. Therefore, it has the following shortcomings: due to reliance on manual or simple rules, it does not combine real-time data and personnel capabilities, resulting in uneven case allocation and slow response, and inefficient case allocation; litigation materials are stored in a scattered manner, and due to the lack of efficient hierarchical storage, queries are slow and the process is fragmented; the signature and ruling modification processes are separated, lack of automated connection, prone to errors and time-consuming; due to the low efficiency of allocation, material query and signature, the lengthy process prolongs the overall litigation cycle; traditional scheduling such as Quartz does not support distributed high concurrency, making it difficult to optimize process efficiency, resulting in limited scheduled task capabilities. Summary of the invention
[0004] Based on the above background, the purpose of the present invention is to provide a legal case intelligent processing system based on a multi-level cache architecture, which can significantly improve the system response speed, reduce system query delay and shorten case distribution time.
[0005] In order to achieve the above-mentioned object of the invention, the present invention provides the following technical solutions:
[0006] A legal case intelligent processing system based on a multi-level cache architecture, comprising:
[0007] The case pool management module is used to upload case materials to the distributed storage server, store case metadata in the relational database, and cache key case information in the memory database;
[0008] An intelligent case splitting module, which is used to obtain data from the in-memory database based on a case splitting algorithm to calculate scores, and assign cases to appropriate processors;
[0009] A workbench module, which is used to obtain task status from the in-memory database and display tasks;
[0010] A litigation document management module, which is used to upload files to a distributed storage server, and store document metadata in the in-memory database and the relational database;
[0011] An electronic signature module, which is used to sign the stored files and cache the status information in the in-memory database;
[0012] A task monitoring module, which is used to schedule and execute periodic tasks and monitor case status; and,
[0013] A data synchronization module, which is used to synchronize the in-memory database and the relational database to maintain data consistency between the in-memory database and the relational database.
[0014] Preferably, the in-memory database is a Redis in-memory database. The in-memory database has multiple data structures for storing different types of information. The data structures include a key-value pair structure for storing case metadata, an ordered set structure for storing personnel workload information, a string structure for storing file path information, an ordered set structure for storing case deadline information, and a list structure for storing user task information.
[0015] Preferably, the case splitting algorithm is a weighted scoring algorithm. The parameter items of the weighted average algorithm include case complexity, case urgency, and the current workload of the processor.
[0016] Preferably, the case splitting algorithm is a dynamic weight case splitting algorithm. The comprehensive scoring calculation formula of the dynamic weight case splitting algorithm is:
[0017]
[0018] In the formula, S(c,p) represents the comprehensive score of case c assigned to person p, w i represents the weight of the i-th factor, and satisfies f i (c,p) represents the standardized score of the i-th evaluation factor, M(c,p) represents the professional matching degree between the case and the person, E(p) represents the historical efficiency coefficient of the person, L(p) represents the relative workload of the person, and α, β, and γ are all adjustment parameters.
[0019] Preferably, the calculation formula of the professional matching degree is:
[0020]
[0021] In the formula, T j (c) represents the demand intensity of case c in the j-th professional field, E j (p) represents the expertise level of person p in the j-th professional field.
[0022] Preferably, the calculation formula for the historical efficiency coefficient is:
[0023]
[0024] In the formula, T std (c i ) represents the standard processing time of case c, T act (c i ,p) represents the actual time taken for person p to process case c i The actual time taken, Q(c i ,p) represents the processing quality score, and k represents the number of historical cases for reference.
[0025] Preferably, the calculation formula for the relative workload of the person is:
[0026]
[0027] In the formula, W c (p) represents the current workload of person p, N represents the total number of personnel, CV(W) represents the coefficient of variation of the current workload distribution, and δ represents the workload balance adjustment parameter.
[0028] Preferably, the workbench module obtains the task status from the in-memory database and displays the task, which specifically includes the following steps:
[0029] Extract user task data from the in-memory database;
[0030] Sort and filter the user task data;
[0031] Render the task list in real time on the user interface.
[0032] Preferably, the data synchronization module synchronizes the in-memory database and the relational database, which specifically includes the following steps:
[0033] When writing data, first update the relational database, and then update the in-memory database;
[0034] When reading data, first query from the in-memory database. If there is no result, query the relational database and write back to the in-memory database;
[0035] Periodically compare the data in the in-memory database and the relational database, and update the inconsistent items;
[0036] Set the lifecycle for the data in the in-memory database, and it will be automatically updated after expiration.
[0037] Compared with the prior art, the present invention has the following advantages:
[0038] An intelligent legal case processing system based on a multi-level cache architecture of the present invention significantly improves the system response speed, reduces the system query latency and shortens the case splitting time through the application of an in-memory database; realizes a more reasonable case allocation through a case splitting algorithm, improves the workload balance, and enhances the overall processing efficiency; through the in-depth application of multiple data structures in the in-memory database, combined with distributed storage and a case splitting algorithm, the present invention constructs an efficient, reliable and intelligent legal case processing system. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0040] Figure 1 It is a schematic flowchart of the case splitting algorithm of an intelligent legal case processing system based on a multi-level cache architecture of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0041] The following will further specifically illustrate the technical solutions of the present invention through specific embodiments and in combination with the drawings. It should be understood that the implementation of the present invention is not limited to the following embodiments, and any formal modification and / or change made to the present invention will fall within the protection scope of the present invention.
[0042] In the present invention, unless otherwise specified, all parts and percentages are in weight units, and the equipment and raw materials used can be purchased from the market or are commonly used in the art. The methods in the following embodiments are conventional methods in the art unless otherwise specified. The components or equipment in the following embodiments are general standard parts or components known to those skilled in the art, and their structures and principles can all be learned from technical manuals by those skilled in the art or obtained through conventional experimental methods.
[0043] The following will make a detailed description of the embodiments of the present invention in combination with the drawings. In the following detailed description, for the purpose of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present invention. However, one or more embodiments can also be implemented by those skilled in the art without these specific details.
[0044] An embodiment of the present invention discloses an intelligent legal case processing system based on a multi-level cache architecture, including a case pool management module, an intelligent case allocation module, a workbench module, a litigation material management module, an electronic signature module, a task monitoring module, and a data synchronization module.
[0045] The case pool management module is used to upload case materials to a distributed storage server, store case metadata in a relational database, and cache case key information in an in-memory database.
[0046] The intelligent case allocation module is used to calculate scores based on case allocation algorithms by obtaining data from the in-memory database and allocate cases to appropriate processing personnel.
[0047] The workbench module is used to obtain task status from the in-memory database and display tasks.
[0048] The litigation material management module is used to upload files to a distributed storage server and store material metadata in the in-memory database and the relational database.
[0049] The electronic signature module is used to sign the stored files and cache status information in the in-memory database.
[0050] The task monitoring module is used to schedule and execute periodic tasks and monitor case status.
[0051] The data synchronization module is used to synchronize the in-memory database and the relational database to maintain data consistency between the in-memory database and the relational database.
[0052] The following makes a detailed description of each module of the intelligent legal case processing system based on the multi-level cache architecture.
[0053] The intelligent legal case processing system based on the multi-level cache architecture adopts a multi-layer architecture design. The multi-layer architecture includes a storage layer, a cache layer, a business logic layer, and a presentation layer. The storage layer uses a MySQL 8.0 relational database and an Alibaba Cloud OSS object storage service. The cache layer uses a Redis 6.0 in-memory database. The business logic layer is developed based on the Spring Boot 2.3 framework. The presentation layer is built using React 16.13.1 and the Ant Design 4.3.0 component library.
[0054] Among them, the in-memory database has multiple data structures for storing different types of information. The data structures include a key-value pair structure for storing case metadata, an ordered set structure for storing personnel workload information, a string structure for storing file path information, an ordered set structure for storing case deadline information, and a list structure for storing user task information. This design of multiple data structures makes full use of the characteristics of the in-memory database, selects the most suitable data structure for different business scenarios, and achieves the optimal performance of data processing. The ordered set structure naturally supports sorting by score and is very suitable for workload management and case priority sorting. The key-value pair structure is suitable for storing structured case metadata and supports fast field access. The list structure is suitable for managing an ordered task queue. This targeted design enables the system to maintain a response speed in milliseconds even under high-concurrency access.
[0055] In this embodiment, these data structures are specifically embodied as follows: a Hash structure for storing case metadata, with the key being case:{caseId}; a Sorted Set structure for storing personnel workload, with the key being staff:workload; a String structure for storing file paths, with the key being file:{caseId}:{fileId}; a ZSet structure for storing case deadlines, with the key being case:deadline; and a List structure for storing user tasks, with the key being task:{userId}.
[0056] The system uses Spring Boot as the core framework, conducts data access through Spring Data JPA 2.3.1, connects to the Redis cache using the Jedis 3.3.0 client, accesses the object storage service using the Alibaba Cloud OSS SDK 3.10.2, and realizes distributed task scheduling through PowerJob 3.3.1.
[0057] 1. Case Pool Management Module
[0058] The corresponding relationship between the case pool management module and the architecture layer is as follows: In the storage layer, MySQL stores case metadata and OSS stores the original Excel files; in the cache layer, the Hash structure of Redis caches the key information of cases; in the business logic layer, the Spring Boot controller processes upload requests and JPA realizes data access; in the presentation layer, the Upload and Table components of Ant Design implement file upload and case pool display.
[0059] Specifically, the case pool management module supports batch importing case materials through Excel. In this embodiment, EasyExcel 2.2.6 is used to parse the Excel file, and the parsing results are first uploaded to the "case-documents" bucket of Alibaba Cloud OSS, using "{year} / {month} / {case number} / " as the storage path format to achieve classified storage of materials.
[0060] The case metadata is stored in the "case_info" table of the MySQL database. The table structure includes fields such as case_id, case_type, urgency, complexity, and create_time. At the same time, the key information of the case is cached in Redis and stored using a Hash structure. The key name format is "case:{caseId}", and the fields include "type", "urgency", "complexity", etc.
[0061] 2. Intelligent case assignment module
[0062] The corresponding relationship between the intelligent case assignment module and the architecture layer is as follows: In the storage layer, MySQL records the case assignment results; in the cache layer, the Hash structure of Redis stores case information, and the Sorted Set stores the workload of personnel; in the business logic layer, Spring Boot implements the case assignment algorithm logic, and the Jedis client executes Redis operations; in the presentation layer, Ant Design components display the case assignment results and workload distribution.
[0063] The intelligent case assignment module realizes case assignment based on Redis. When the case assignment is triggered, the case information is obtained from the Hash structure of Redis, and the workload information of personnel is obtained from the SortedSet of Redis. Based on the dispersion algorithm, the case assignment score of each person is calculated, and the person with the lowest score is selected as the case handler. The case assignment result is updated to the "case_assignment" table of MySQL, and the workload of the corresponding person is increased through Redis.
[0064] Among them, the case assignment algorithm can be a relatively simple weighted scoring algorithm. The parameter items of this weighted scoring algorithm include case complexity, case urgency, and the current workload of the handler. The weight of case complexity is 0.4, the weight of case urgency is 0.3, and the weight of the current workload of the handler is 0.3.
[0065] In addition, the case assignment algorithm can also be a relatively complex dynamic weight case assignment algorithm, which integrates dimensions such as historical performance analysis, professional matching degree evaluation, and workload balance. The comprehensive scoring calculation formula of this dynamic weight case assignment algorithm is:
[0066]
[0067] Wherein, S(c, p) represents the comprehensive score of case c assigned to person p, and w i represents the weight of the i-th factor and satisfies f i (c, p) represents the standardized score of the i-th evaluation factor, M(c, p) represents the professional matching degree between the case and the person, E(p) represents the historical efficiency coefficient of the person, L(p) represents the relative workload of the person, and α, β, and γ are all adjustment parameters. In this embodiment, the values of α, β, and γ are 0.5, 0.3, and 1.5 respectively.
[0068] The first two terms of the comprehensive score calculation formula represent the unsuitability. The larger the value, the more unsuitable it is. The professional matching degree and the historical efficiency coefficient have been processed in reverse during the calculation, that is, the higher the professional matching degree, the lower the score of this item. Select the person with the lowest comprehensive score calculated by the comprehensive score calculation formula to handle the case.
[0069] Among them, the calculation formula of the professional matching degree is:
[0070]
[0071] Wherein, T j (c) represents the demand intensity of case c in the j-th professional field, and E j (p) represents the expertise level of person p in the j-th professional field.
[0072] The calculation formula of the historical efficiency coefficient is:
[0073]
[0074] Wherein, T std (c i ) represents the standard processing time of case c, T act (c i , p) represents the actual time consumed by person p to handle case c i , and Q(c i , p) represents the processing quality score, and k represents the number of reference historical cases.
[0075] The calculation formula of the relative workload of the person is:
[0076]
[0077] Wherein, W c (p) represents the current workload of person p, N represents the total number of personnel, CV(W) represents the coefficient of variation of the current workload distribution, and δ represents the workload balance adjustment parameter.
[0078] Compared with the traditional simple rule allocation, the above-mentioned case allocation algorithm better balances the workload and considers the matching degree between the case characteristics and the processing personnel's capabilities, thereby improving the overall processing efficiency. At the same time, since the scoring calculation is based on the real-time data of the in-memory database, the system can dynamically adjust the allocation strategy according to the latest status, avoiding the unreasonable allocation caused by data lag in the traditional system.
[0079] The process of the case division algorithm is as follows Figure 1 shown.
[0080] 3. Workbench module
[0081] The correspondence between the workbench module and the architecture level is: in the cache layer, the Redis List structure stores the user task list; in the business logic layer, the SpringBoot controller provides the task data API; in the presentation layer, the React+AntDesignTable component renders the task list to implement sorting and filtering functions.
[0082] The workbench module is implemented based on the Table component of AntDesign. This module obtains user task data from Redis and stores it in a List structure with a key name format of "task:{userId}". The acquisition process is as follows:
[0083] The front end initiates a request to obtain the task list;
[0084] The backend obtains the task ID list from Redis;
[0085] For each task ID, get detailed information;
[0086] Sort tasks by urgency and creation time by default;
[0087] Return the sorted task list to the front end, which is rendered and displayed by the AntDesignTable component.
[0088] 4. Litigation Information Management Module
[0089] The correspondence between the litigation information management module and the architecture level is as follows: in the storage layer, OSS stores file content and MySQL stores file metadata; in the cache layer, Redis's String structure caches file paths; in the business logic layer, SpringBoot handles file upload logic and OSSSDK implements file storage; in the presentation layer, the AntDesignUpload component implements drag-and-drop upload and the Table component displays the file list.
[0090] The litigation information management module supports uploading files by dragging and dropping through the AntDesignUpload component. The upload process is as follows:
[0091] The user selects or drags a file to the upload area; the front end performs file type verification (supporting formats such as PDF, Word, Excel, pictures, etc.) and size limit (the maximum size of a single file is 100MB);
[0092] The back end receives the file, generates a unique file ID (in UUID format), and uploads the file to Alibaba Cloud OSS;
[0093] The file metadata is stored in the "document_info" table of MySQL, including fields such as file_id, case_id, file_name, file_type, file_size, upload_time, upload_user, etc.;
[0094] At the same time, the file path information is cached in Redis using the String structure.
[0095] 5. Electronic signature module
[0096] The corresponding relationship between the electronic signature module and the architecture levels is as follows: in the storage layer, OSS stores the signed file, and MySQL records the signature records and adjudication modification history; in the cache layer, Redis caches the signature status and modification records; in the business logic layer, Spring Boot integrates the electronic signature API service; in the presentation layer, Ant Design components display the signature status and adjudication modification history.
[0097] The electronic signature module is integrated with the Alibaba Cloud digital signature service, and the specific implementation is as follows:
[0098] The system calls the electronic signature API to sign the file stored in OSS;
[0099] The signature result and status are cached in Redis;
[0100] After the signature is completed, the system automatically updates the document status in MySQL and notifies the relevant users of the completion of the signature through WebSocket.
[0101] 6. Task monitoring module
[0102] The corresponding relationship between the task monitoring module and the architecture levels is as follows: in the storage layer, MySQL records the execution history and results of scheduled tasks; in the cache layer, the ZSet structure of Redis stores the case deadlines; in the business logic layer, the PowerJob framework implements distributed scheduled task scheduling and execution; in the presentation layer, Ant Design components display the task monitoring status and statistical data.
[0103] The task monitoring module is implemented based on the PowerJob distributed task scheduling framework. The main functions of this module include:
[0104] The overdue case inspection runs at the set time every day to check the cases that are about to expire from the ZSet structure of Redis;
[0105] The data synchronization task runs at the set interval to ensure the data consistency between Redis and MySQL;
[0106] The statistical data update runs at the set interval to update the system running status and statistical information.
[0107] 7. Data Synchronization Module
[0108] The corresponding relationship between the data synchronization module and the architecture levels is as follows: in the storage layer, MySQL is used as the main data persistence storage; in the cache layer, Redis is used as the high-speed cache storage; in the business logic layer, the PowerJob framework schedules and executes the synchronization tasks, and Spring Boot implements the synchronization logic.
[0109] The data synchronization module synchronizes the in-memory database and the relational database, which specifically includes the following steps:
[0110] When writing data, the database-first and then-cache mode is adopted to ensure data security, that is, first update the relational database and then update the in-memory database;
[0111] When reading data, give priority to reading from Redis. If the cache is not hit, query MySQL and write back to the cache;
[0112] Through the PowerJob timed task, at each set interval, compare the data in Redis and MySQL and update the inconsistent items;
[0113] Set the TTL for Redis keys, usually 24 hours. After expiration, it will be reloaded from MySQL.
[0114] In this article, specific examples are applied to elaborate on the principles and implementation methods of the present invention. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and modifications can still be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A legal case intelligent processing system based on a multi-level cache architecture, characterized by: The legal case intelligent processing system based on multi-level cache architecture includes: The case pool management module is used to upload case materials to the distributed storage server, store case metadata in the relational database, and cache key case information in the memory database; Intelligent case allocation module, which is used to obtain data from the memory database based on the case allocation algorithm to calculate the score and allocate the case to the appropriate person to handle it; The workbench module is used to obtain task status from the in-memory database and display tasks; The litigation document management module is used to upload documents to the distributed storage server and store document metadata in the memory database and relational database; Electronic signature module, used to sign stored documents and cache status information in the memory database; A task monitoring module, used to schedule and execute periodic tasks and monitor case status; and, The data synchronization module is used to synchronize the in-memory database with the relational database to maintain data consistency between the in-memory database and the relational database.
2. According to claim 1, a legal case intelligent processing system based on a multi-level cache architecture is characterized by: The in-memory database is a Redis in-memory database, which has multiple data structures for storing different types of information, including a key-value pair structure for storing case metadata, an ordered set structure for storing personnel workload information, a string structure for storing file path information, an ordered set structure for storing case deadline information, and a list structure for storing user task information.
3. The legal case intelligent processing system based on a multi-level cache architecture according to claim 1 is characterized by: The case distribution algorithm is a weighted scoring algorithm, and the parameter items of the weighted average algorithm include case complexity, case urgency and current workload of the processing personnel.
4. The intelligent legal case processing system based on a multi-level cache architecture according to claim 1 is characterized by: The case division algorithm is a dynamic weighted case division algorithm, and the comprehensive score calculation formula of the dynamic weighted case division algorithm is: In the formula, S(c,p) represents the comprehensive score assigned to person p by case c, and w i represents the weight of the i-th factor and satisfies f i (c,p) represents the standardized score of the i-th evaluation factor, M(c,p) represents the professional matching degree between the case and the personnel, E(p) represents the historical efficiency coefficient of the personnel, L(p) represents the relative workload of the personnel, and α, β, and γ are all adjustment parameters.
5. The intelligent legal case processing system based on a multi-level cache architecture according to claim 4 is characterized by: The calculation formula for the professional matching degree is: Where, T j (c) represents the demand intensity of case c in the jth professional field, E j (p) represents the expertise level of person p in the jth professional field.
6. The legal case intelligent processing system based on a multi-level cache architecture according to claim 4 is characterized by: The calculation formula of the historical efficiency coefficient is: Where, T std (c i ) represents the standard processing time of case c, T act (c i ,p) indicates that person p handles case c i The actual time consumption, Q(c i ,p) represents the processing quality score, and k represents the number of historical cases of reference.
7. The legal case intelligent processing system based on a multi-level cache architecture according to claim 4 is characterized by: The relative workload of the personnel is calculated as: Where W c (p) represents the current workload of person p, N represents the total number of people, CV(W) represents the coefficient of variation of the current workload distribution, and δ represents the workload balancing adjustment parameter.
8. The intelligent legal case processing system based on a multi-level cache architecture according to claim 1 is characterized by: The workbench module obtains the task status from the memory database and displays the task, which specifically includes the following steps: Extract user task data from the in-memory database; Sort and filter user task data; Render the task list in real time in the user interface.
9. The intelligent legal case processing system based on a multi-level cache architecture according to claim 1 is characterized by: The data synchronization module synchronizes the memory database with the relational database, specifically including the following steps: When writing data, the relational database is updated first, and then the in-memory database; When reading data, the in-memory database is queried first. If no result is found, the relational database is queried and the data is written back to the in-memory database. Periodically compare the data in the in-memory database and the relational database and update any inconsistent items; The data in the memory database has a life cycle set and is automatically updated after it expires.
Citation Information
Cited By
Intelligent identification system and method applied to legal instruments
CN121581584A