Artificial intelligence auxiliary judgment method, system and device, storage medium and product

By designing an artificial intelligence-assisted trial system, using the scenario application layer, model application layer and model service layer to match different types of service models, the problems of resource waste and single task processing in the existing technology are solved, and efficient and accurate legal documents are achieved deal with.

CN119477610AActive Publication Date: 2025-02-18SHENZHEN DIBO ENTERPRISE RISK MANAGEMENT TECH CO LTD +1

Patent Information

Application Number
CN202510055774.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-02-18
Estimated Expiration
2045-01-14

AI Technical Summary

Technical Problem

In the legal document processing in the field of justice, resources are wasteful because a single model can only handle a single task.

Method used

An artificial intelligence assisted trial system was designed, including the scenario application layer, the model application layer and the model service layer. By obtaining case information and business scenario information, matching different types of service models for processing, realizing multi-task parallel processing.

Benefits of technology

It improves the efficiency and accuracy of judicial trials, avoids waste of resources, and can handle massive and complex legal documents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477610A_ABST
    Figure CN119477610A_ABST
Patent Text Reader

Abstract

The invention provides an artificial intelligence auxiliary judgment method, system and device, a storage medium and a product. The system comprises a scene application layer, a model application layer and a model service layer. And the scene application layer is used for acquiring case information and business scene information of the task. And the model application layer is used for acquiring task configuration parameters of the tasks according to the business scene information. The model service layer is used for acquiring operation state information of a model instance and acquiring case information and task configuration parameters of a task; obtaining case information of the task, an input text vector of task configuration parameters and model capability vectors of different types of service models; according to the input text vector and the model capability vector, obtaining a matching degree between the task and different types of service models; and according to the matching degree and the model instance operation state information, distributing the case information and the task configuration parameters of the task to the corresponding model instance of the service model of the corresponding type for processing, and obtaining a reasoning result of the task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to an artificial intelligence-assisted trial system, an artificial intelligence-assisted trial method, a computer device, a computer-readable storage medium, and a computer program product. Background Art

[0002] In recent years, artificial intelligence and deep learning have been increasingly used in various vertical fields. In the judicial field, the research on artificial intelligence mainly focuses on legal principles, ethical issues, algorithmic risks, etc. How to deeply integrate law and technology to create intelligent applications of logical reasoning and decision-making capabilities is a practical need for smart justice. Faced with massive and complex legal documents, related technologies can only apply a single model to process a single task, which leads to a waste of resources. Summary of the invention

[0003] The disclosed embodiment provides an artificial intelligence-assisted trial system, which includes: a scenario application layer, which is used to obtain case information and business scenario information of a task; a model application layer, which is used to obtain case information and business scenario information of a task from the scenario application layer, and obtain task configuration parameters of the task according to the business scenario information; a model service layer, in which different types of service models are configured, and the same type of service model runs at least one model instance, and the model service layer is used to obtain model instance running status information, and obtain case information and task configuration parameters of the task from the model application layer; obtain input text vectors of the case information of the task and the task configuration parameters, and obtain model capability vectors of different types of service models; obtain the matching degree between the task and different types of service models according to the input text vector and the model capability vector; distribute the case information of the task and the task configuration parameters to the corresponding model instance of the corresponding type of service model for processing according to the matching degree and the model instance running status information, and obtain the reasoning result of the task for assisting the trial of the corresponding case.

[0004] The disclosed embodiments provide an artificial intelligence-assisted trial method, which includes: obtaining case information and business scenario information of a task; obtaining task configuration parameters of the task based on the business scenario information; obtaining model instance running status information; obtaining the case information of the task and an input text vector of the task configuration parameters, and obtaining model capability vectors of different types of service models; obtaining a matching degree between the task and different types of service models based on the input text vector and the model capability vector; and distributing the case information of the task and the task configuration parameters to corresponding model instances of corresponding types of service models for processing based on the matching degree and the model instance running status information, to obtain an inference result of the task for use in assisting the trial of the corresponding case.

[0005] An embodiment of the present disclosure provides a computer device, including a processor, a memory, and an input / output interface; the processor is connected to the memory and the input / output interface, respectively, wherein the input / output interface is used to receive and output data, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device including the processor executes the method in any embodiment of the present disclosure.

[0006] An embodiment of the present disclosure provides a computer-readable storage medium storing a computer program. The computer program is suitable for being loaded and executed by a processor so that a computer device having the processor executes a method in any embodiment of the present disclosure.

[0007] The embodiments of the present disclosure provide a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in various optional modes in any embodiment of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 It is a schematic diagram of an artificial intelligence assisted trial system provided by an embodiment of the present disclosure.

[0009] Figure 2 It is a schematic diagram of another artificial intelligence assisted trial system provided by an embodiment of the present disclosure.

[0010] Figure 3 It is a schematic diagram of another artificial intelligence assisted trial system provided by an embodiment of the present disclosure.

[0011] Figure 4 It is a schematic diagram of the output of a detection model provided by an embodiment of the present disclosure.

[0012] Figure 5 It is a schematic diagram of the output of an entity extraction model provided by an embodiment of the present disclosure.

[0013] Figure 6 It is a schematic diagram of the output of a generative model provided by an embodiment of the present disclosure.

[0014] Figure 7 It is a schematic diagram of another artificial intelligence assisted trial system provided by an embodiment of the present disclosure.

[0015] Figure 8 It is a schematic diagram of another artificial intelligence assisted trial system provided by an embodiment of the present disclosure.

[0016] Fig. 9 It is a schematic diagram of the formatting of entity extraction results provided by an embodiment of the present disclosure.

[0017] Fig.10 It is a flow chart of an artificial intelligence assisted trial method provided by an embodiment of the present disclosure.

[0018] Fig.11 It is a network architecture diagram for implementing an artificial intelligence assisted trial system provided by an embodiment of the present disclosure.

[0019] Fig.12 It is a structural diagram of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0021] First, some terms involved in the embodiments of the present disclosure are explained.

[0022] Artificial Intelligence (AI): It is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.

[0023] In the embodiments disclosed herein, machine learning technology in artificial intelligence is used to assist court personnel, such as judges, in conducting judicial trials to improve trial efficiency and accuracy.

[0024] Machine Learning (ML): It is a multi-disciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence.

[0025] like Figure 1 As shown, the artificial intelligence assisted trial system 10 provided in the embodiment of the present disclosure includes a scenario application layer 110, a model application layer 120 and a model service layer 130.

[0026] The scenario application layer 110 is used to obtain task case information and business scenario information.

[0027] The scenario application layer in the embodiment of the present disclosure refers to an application layer for receiving original case materials and / or extracting elements from the received original case materials. It can also be used to interact with the front end, and according to the task request sent from the front end, obtain the case information corresponding to the request from the original case materials and / or the extracted case element information, and can determine the corresponding business scenario information according to the request.

[0028] The task in the disclosed embodiment refers to a task triggered by a user in the artificial intelligence-assisted review system to request the completion of a task specified by the user and completed using a service model, and therefore can also be referred to as a model task. The case information of a task refers to any data and / or information related to the pending case corresponding to the task. Business scenario information refers to the type of task to be completed determined based on the request, and the type of service model to be called can be determined based on the business scenario information.

[0029] The model application layer 120 is used to obtain case information and business scenario information of the task from the scenario application layer 110, and obtain task configuration parameters of the task according to the business scenario information.

[0030] In some embodiments, the task configuration parameters include a model identifier corresponding to the business scenario information.

[0031] The model application layer in the embodiment of the present disclosure refers to the application layer that interacts with the scenario application layer and the model service layer respectively to determine how to schedule the tasks received from the scenario application layer and send the scheduled tasks to the model service layer. The model application layer can pre-configure task configuration parameters corresponding to various business scenario information. When the model application layer receives a request for a task from the scenario application layer, the corresponding task configuration parameters can be retrieved from it.

[0032] The task configuration parameters in the embodiments of the present disclosure refer to configuration parameters related to the task, which are used to indicate the scheduling of the task, the service model required for the task, and the relevant parameters of the task when performing reasoning using the service model.

[0033] The model identifier in the embodiments of the present disclosure is used to uniquely identify various types of service models in the model service layer. The model identifier can be an identifier (Identity, ID) / index of the service model, or the name of the service model, which is not limited in the present disclosure. The model ID is used as an example in the following embodiments, but the present disclosure is not limited to this.

[0034] The model service layer 130 is configured with different types of service models, and the same type of service model runs at least one model instance. The model service layer is used to obtain the model instance running status information, and obtain the case information of the task and the task configuration parameters from the model application layer; obtain the input text vector of the case information of the task and the task configuration parameters, and obtain the model capability vectors of different types of service models; obtain the matching degree between the task and different types of service models based on the input text vector and the model capability vector; distribute the case information of the task and the task configuration parameters to the corresponding model instance of the corresponding type of service model for processing based on the matching degree and the model instance running status information, and obtain the reasoning result of the task to assist in the trial of the corresponding case.

[0035] In the embodiment of the present disclosure, the model service layer refers to an application layer for providing a variety of different types of service models for performing reasoning services for various tasks.

[0036] The service model in the embodiments of the present disclosure refers to an artificial intelligence model, a machine learning model, or a deep learning model that can be used to assist in judicial trials. In the following embodiments, the model service layer includes two types of service models: deep learning models and generative models as an example, but the present disclosure is not limited to this, and other types of service models can be added to the model service layer according to specific judicial trial needs.

[0037] In the embodiment of the present disclosure, the model service layer can open one or more model instances for each type of service model according to demand, and each model instance can be used to process tasks of a corresponding type. For example, a model instance of a summary model can be used to process a task of generating a summary.

[0038] In the disclosed embodiment, the model instance running status information refers to the load, available resources, whether there is a fault, and other related information of each model instance.

[0039] In some embodiments, when the task includes a question, the system is also used to: convert the question into a question vector; obtain a legal text vector of laws, regulations and / or cases; calculate the semantic similarity between the question vector and the legal text vector; use the laws, regulations and / or cases, and the question as graph nodes, obtain the edge weights between the graph nodes based on the semantic similarity between the graph nodes and the preset logical relationship of the trial ideas, use the question as the starting node, and find the reasoning chain through graph search; obtain the credibility of the reasoning chain; obtain the priority index of the candidate legal text based on the semantic similarity between the question vector and the legal text vector, and the credibility of the reasoning chain; determine the laws, regulations and / or cases corresponding to the question based on the priority index.

[0040] The disclosed embodiment can match legal text with question content through natural language processing and semantic modeling to achieve efficient legal reasoning and question answering. , and / or, Case Library , where n represents the number of laws and regulations, and m represents the number of cases in the case library. Both n and m are positive integers greater than or equal to 1, that is, the legal texts included in the legal text set can be laws and regulations and / or cases. Get the natural language description Q of the legal issue. According to the issue Q, find the relevant legal clauses or cases , and derive the legal reasoning path or reasoning chain P.

[0041] Each legal text is converted into a high-dimensional vector through an encoder, which is called a legal text vector. or , where f and c are any laws, regulations or cases in the legal text set; convert the legal issue into a problem vector, that is, . Exemplarily, the Encoder is a large model specially trained using legal corpus.

[0042] In some embodiments, the semantic similarity between the legal text vector and the question vector can be calculated by the following formula : (1) Sort by semantic similarity and select the k items with the highest semantic similarity as the preliminary selection results, where k is a positive integer greater than or equal to 1.

[0043] In the disclosed embodiment, a legal reasoning path or reasoning chain P can also be constructed based on legal reasoning combined with logical relationships, which can be achieved through graph representation.

[0044] Specifically, the legal clauses and / or cases are used as graph nodes. For example, the preliminary selection results of the k laws, regulations and / or cases mentioned above can be used as graph nodes. Question Q is used as an input node, which is also one of the graph nodes. Then, the edge weights between different graph nodes are determined.

[0045] In an exemplary embodiment, the semantic similarity between different graph nodes may be calculated and the semantic similarity may be used as a semantic similarity weight. For example, the semantic similarity weight may be calculated by the following formula: : .in, Represents the semantic similarity weight between the i-th graph node and the j-th graph node; and The vectors representing the i-th graph node and the j-th graph node respectively.

[0046] In the disclosed embodiment, logical relationships are preset based on the trial ideas provided by the judge, such as prior knowledge such as the trial ideas document provided by the judge, and similarity judgments are made based on the trial ideas of the judge or other information provided to determine the weights of the logical relationships between different graph nodes.

[0047] Exemplarily, the edge weights between different graph nodes, i.e., the comprehensive weights, are determined according to the semantic similarity weights and the logical relationship weights: .in, represents the edge weight between the i-th graph node and the j-th graph node; Represents the logical relationship weight between the i-th graph node and the j-th graph node; and Respectively represent the importance of semantic similarity weight and logical relationship weight, and All are greater than or equal to 0 and less than or equal to 1. Starting from Q, use the graph search algorithm to find the reasoning chain P, and build a multi-step reasoning path based on logical relationships (such as "causal relationship" and "inclusion relationship"). In this way, find the laws, regulations and / or classic cases corresponding to each reasoning chain as candidate entries.

[0048] In an exemplary embodiment, the priority index of each candidate entry may be calculated according to the following formula: : (2) In the above formula, , They are and The weights are all greater than or equal to 0 and less than or equal to 1. The credibility of the reasoning chain is calculated based on the reliability of the logical relationship in the path P. According to the priority index of each candidate entry, the candidate entry with the largest priority index is determined as the target entry, that is, the optimal legal clause and / or case is determined and returned as one of the response results of the question.

[0049] The artificial intelligence-assisted trial system provided in the embodiments of the present disclosure provides a general artificial intelligence-assisted system for various types of tasks for cases that may be encountered in judicial trials. The system can configure corresponding task configuration parameters for various tasks, and can determine what type of model service to use to process the case information of the task based on the task configuration parameters and case information, and can also determine which model instance to use to process the task based on the model instance running status information. That is, no matter what type of task is provided, the service model suitable for processing the task can be determined based on the business scenario information, thereby improving the efficiency and accuracy of judicial trials.

[0050] In an exemplary embodiment, if Figure 2 As shown, the AI-assisted trial system 10 also includes a front end 140. The front end 140 is used to display an AI-assisted trial interface 141. The AI-assisted trial interface 141 includes a task trigger control (not shown in the figure), and in response to a trigger operation on the corresponding task trigger control, sends a request for the task to the scenario application layer 110, wherein the request includes a case identifier and a request parameter. The scenario application layer 110 is used to determine a business scenario identifier according to the request parameter, and obtain corresponding case information according to the business scenario identifier and the case identifier, wherein the business scenario information includes the business scenario identifier.

[0051] In the embodiments of the present disclosure, case information and various task trigger controls can be displayed on the AI-assisted trial interface. Different task trigger controls can trigger different tasks, such as generating a summary of the case and extracting the focus of the dispute. The form, triggering method, and layout of the task trigger control on the interface are not limited in the present disclosure. For example, it can be triggered by voice, gesture, or by clicking a virtual button on the screen.

[0052] In the disclosed embodiment, when a user triggers a specific task trigger control, the system can determine the corresponding case identifier based on which case is currently displayed on the interface. The case identifier can uniquely identify the corresponding case, and its specific form is not limited.

[0053] In the disclosed embodiment, each task trigger control pre-corresponds to a corresponding request parameter, which is used to indicate how the user wishes to handle the case. In other embodiments, the user can also input a request parameter through the artificial intelligence assisted trial interface 141 to indicate how the case is desired to be handled.

[0054] In the disclosed embodiment, the business scenario identifier (business scenario ID) is used to indicate the type of the task, or is a unique identifier of what kind of processing the user wants to perform on the case.

[0055] In the exemplary embodiment, continue to refer to Figure 2 The scenario application layer 110 includes a case filing module 111 , a middle platform module 112 , an elementization module 113 and an intelligent software development kit (SDK) 114 .

[0056] The case filing module 111 is used to receive case materials and perform structured processing on the case materials to obtain structured case data. In an exemplary embodiment, the case data includes one or more of litigation opinions, court trial records, judgment documents, and evidence materials.

[0057] The elementization module 113 is used to obtain the case materials from the case filing module 111, extract elements from the case materials, and obtain case element information. In an exemplary embodiment, the case element information includes one or more of party information, evidence text, and case cause.

[0058] The middle platform module 112 is used to receive the request from the front end 140 and send the request to the smart SDK 114 .

[0059] The smart SDK 114 is used to determine the business scenario identifier according to the request parameter, obtain the corresponding case data from the case filing module 111 according to the business scenario identifier and the case identifier, and / or obtain the corresponding case element information from the elementization module 113; and send the obtained case data and / or case element information to the model application layer 120. The case information includes the case data and / or the case element information.

[0060] In the exemplary embodiment, continue to refer to Figure 2 The model application layer 120 includes a preprocessor 121 , a prompt word manager 122 , an asynchronous model priority queue 123 , a real-time model priority queue 124 and a scheduler 125 .

[0061] The preprocessor 121 is used to obtain the case information and business scenario information of the task from the scenario application layer 110 , and send the business scenario information to the prompt word manager 122 .

[0062] In an exemplary embodiment, in the AI-assisted trial system architecture provided by the embodiment of the present disclosure, the input information obtained by the preprocessor from the scenario application layer is mainly structured case data or extracted element information after being processed by the scenario application layer. It may include one or more of the following: (1) Case-related text information (i.e., case data): such as prosecution and defense opinions, court trial transcripts, judgment documents, and evidence materials. This text information is further cleaned, segmented, or parsed to adapt to the input format of subsequent models.

[0063] (2) Case element information: The scenario application layer extracts key information such as party information, evidence text, and case cause through the elementization module.

[0064] (3) Request parameters: Determined based on the specific request input by the user, such as analysis of litigation content, generation of judgment documents, etc.

[0065] (4) Business scenario ID representing a certain scenario application.

[0066] The information obtained by the preprocessor from the scenario application layer is a structured case text data (i.e., case data), and carries the corresponding business scenario ID according to different scenario requirements, so that the preprocessor can clean the data, convert the format, enhance the data, and convert it into the parameters required by the prompt words for subsequent model reasoning steps.

[0067] The prompt word manager 122 is used to receive the business scenario information, determine the corresponding model identification, task priority and timeliness configuration according to the business scenario information, and send the determined model identification, task priority and timeliness configuration to the preprocessor 121, wherein the task configuration parameters include the model identification, task priority and timeliness configuration.

[0068] The preprocessor 121 is further configured to push the task to the asynchronous model priority queue 123 or the real-time model priority queue 124 according to the task priority and timeliness configuration.

[0069] The real-time model priority queue and the asynchronous model priority queue are two task management mechanisms used in the system to schedule and process different types of tasks. The main difference between the two queues is the timeliness and priority of task processing. Essentially, they serve different business needs. The following is a detailed description of the two and their essential differences: (1) Real-time model priority queue (also called real-time queue): The real-time model priority queue is used to process tasks that have high requirements for timeliness (called real-time tasks). These tasks require immediate response, and the processing results (i.e., inference results) have a great impact on user experience or business processes. The tasks in this queue have the following characteristics: High timeliness: Tasks in the real-time queue require the system to process quickly and return results in a very short time. Task response time is a priority.

[0070] Higher priority: When allocating system resources, real-time tasks will be scheduled first to ensure that users can obtain results in a timely manner.

[0071] Scheduling mechanism: The real-time queue uses priority scheduling, usually First Input First Output (FIFO), but the system will dynamically adjust more urgent tasks to ensure that high-priority tasks can be processed immediately.

[0072] Resource allocation: The queue will occupy system resources according to priority to ensure fast response.

[0073] For example, during a court trial, the judge needs to generate trial transcripts, extract case key points, or analyze dispute points in real time. These tasks are critical to the trial progress and must be completed in a very short time. Therefore, these tasks are placed in the real-time model priority queue.

[0074] (2) Asynchronous model priority queue (also called asynchronous queue): The asynchronous model priority queue is used to process tasks that do not require high response time and can be processed later (called asynchronous tasks). These tasks do not need to get results immediately and can wait for system resources to be idle before processing. Tasks in the asynchronous queue have the following characteristics: Low timeliness requirement: The processing of asynchronous tasks does not need to be completed immediately and can wait for several minutes, hours, or even longer. This type of task is suitable for background batch processing or non-urgent business processes.

[0075] Lower priority: The system will give priority to tasks in the real-time queue. Asynchronous tasks will only be processed when tasks in the real-time queue are completed or system resources are sufficient.

[0076] Scheduling mechanism: Asynchronous queues use batch scheduling and dynamically schedule task processing based on system load and resource usage. Low-priority tasks will be postponed when resources are tight.

[0077] Resource allocation: Asynchronous tasks will not compete with real-time tasks for system resources. Resources will only be allocated to asynchronous tasks when the system load is low.

[0078] For example, batch processing of historical case data, periodic generation of document summaries, or batch classification of cases can be run in the background and do not need to return results immediately. Therefore, such tasks can be placed in the asynchronous model priority queue.

[0079] That is, the difference between the real-time model priority queue and the asynchronous model priority queue is reflected in the following aspects: a. Timeliness Real-time model priority queue: Tasks need to respond immediately and return results in real time, usually within a few seconds or minutes. Timeliness is the most core requirement.

[0080] Asynchronous model priority queue: Task processing can be delayed and is not time-sensitive, allowing background batch processing, which may be completed within a few minutes to a few hours.

[0081] b. Priority Real-time model priority queue: The higher the priority, the system will allocate more computing resources to the real-time task to ensure the fast execution of the task. The task usually directly affects the user's real-time operation experience or business process.

[0082] Asynchronous model priority queue: The priority is low, and the task will not preempt the resources of the real-time task. Resources will be allocated for processing only when the system is idle.

[0083] c. Scheduling strategy Real-time model priority queue: A first-come, first-served (FIFO) scheduling strategy is adopted, but according to the urgency of the task and the system load, the system may dynamically adjust the execution order of tasks to give priority to the most urgent tasks.

[0084] Asynchronous model priority queue: adopts a batch scheduling strategy, tasks will be processed in batches when resources are available, and the task execution order is relatively flexible, usually arranged according to the task creation time and system load.

[0085] d. System resource utilization Real-time model priority queue: Tasks will try their best to obtain the system's computing resources, and system resources are allocated to real-time tasks first to ensure that tasks can be completed in a timely manner.

[0086] Asynchronous model priority queue: Tasks do not compete for system resources and are usually processed when the system load is light and resources are idle. It is suitable for batch execution of resource-intensive tasks.

[0087] e. Applicable scenarios Real-time model priority queue: suitable for business scenarios that require quick response, such as online judgment document generation, real-time case analysis, and other operations with high immediacy requirements.

[0088] Asynchronous model priority queue: suitable for background batch processing and scenarios where there is no rush to obtain results, such as historical case classification and data archiving.

[0089] In an exemplary embodiment, the scheduler 125 is used to obtain the task from the real-time model priority queue 124 and / or the asynchronous model priority queue 123 , and send the case information of the task and the task configuration parameters to the model service layer 130 .

[0090] The scheduler plays the role of coordinator of task allocation and execution in the system architecture. It is responsible for obtaining tasks from the real-time model priority queue and the asynchronous model priority queue and distributing them to the corresponding model service for inference. The following is a detailed process of how the scheduler obtains model tasks from these two queues: (1) Scheduler’s task priority strategy The scheduler usually adopts a priority scheduling strategy to ensure that real-time tasks are processed first, while processing asynchronous tasks when system resources allow. The following is the priority order of the scheduler processing tasks: Real-time model priority queue first: The scheduler will first check the tasks in the real-time model priority queue, because these tasks usually have high timeliness requirements and must be processed immediately. The scheduler will dynamically schedule tasks according to their priorities to ensure that the highest priority real-time tasks are processed first.

[0091] Asynchronous tasks are processed when resources are idle: If the tasks in the real-time queue are processed or the system resources are sufficient (such as idle GPU (Graphics Processing Unit, graphics processor), CPU (Central Processing Unit, central processing unit) and other computing resources), the scheduler will extract tasks from the asynchronous queue and process them. Asynchronous tasks do not need to be processed, and the scheduler can arrange the execution of these tasks when the system load is low.

[0092] (2) How does the scheduler obtain tasks from the real-time model priority queue? a. Checking and processing real-time tasks: The scheduler periodically or continuously checks the real-time model priority queue and obtains and processes tasks according to the following steps: Priority check: The scheduler checks the priority of tasks in the queue, usually using a first-come, first-served FIFO policy, but the system may also dynamically adjust the priority of tasks. For example, urgent tasks (such as transcript generation in court trials) will be directly extracted and processed first.

[0093] Task extraction: Based on the priority of the tasks in the queue, the scheduler selects the highest priority task for extraction and allocates it to the appropriate computing resources for inference processing.

[0094] Task execution: The scheduler assigns tasks to the corresponding model service. The model performs reasoning based on the task prompts, context information (including case information, or information processed from case information), etc., and generates reasoning results. After processing, the scheduler returns the reasoning results to the upper-layer application (such as the preprocessor and model application layer).

[0095] Load balancing: In scenarios with multiple real-time tasks, the scheduler may consider load balancing to ensure the proper allocation of system resources and avoid overuse of certain models or hardware resources, which may lead to degradation of system performance.

[0096] b. Real-time task timeout processing: If a real-time task takes longer than expected to execute (for example, the model inference time is long), the scheduler can handle the timeout according to the task time limit. The timed-out task may be rescheduled, or the system may return a default result and readjust its priority or directly discard it.

[0097] (3) How does the scheduler obtain tasks from the asynchronous model priority queue? a. Task extraction when resources are idle: The scheduler obtains tasks from the asynchronous model priority queue only when there are no high-priority real-time tasks in the system or when system resources are idle. The specific steps are as follows: Resource detection: The scheduler will periodically check the idle status of the model service. If an idle model service instance is found, the scheduler will turn to the asynchronous model priority queue for task scheduling.

[0098] Adjust the execution order as needed: Asynchronous tasks are usually not strictly processed in a first-come-first-served manner. The scheduler may adjust the execution order of tasks based on the urgency of the tasks, the current load of the system, etc. For example, when there is a serious backlog of tasks, the system may temporarily postpone some low-priority tasks.

[0099] Task execution and feedback: Similar to real-time tasks, after asynchronous tasks are assigned resources, they are processed by the corresponding model. After processing, the scheduler returns the results to the upper application layer. The results can be returned when the system is idle, and users do not need to obtain the results immediately.

[0100] b. Task retry and downgrade processing: For tasks in the asynchronous queue, the scheduler may retry or downgrade tasks that have not been processed for a long time: Task retry: If a task cannot be processed in time due to some reasons (such as shortage of service resources), the scheduler can push the task back to the asynchronous queue and wait for the next scheduling opportunity.

[0101] Demotion processing: If there is a large backlog of tasks, the scheduler can degrade low-priority asynchronous tasks, delay their execution, or even cancel some unnecessary tasks.

[0102] The disclosed embodiment deploys an asynchronous model priority queue and a real-time model priority queue in the model application layer, so that the preprocessor can determine to allocate the real-time task and the asynchronous task to the corresponding real-time model priority queue and the asynchronous model priority queue respectively according to the task priority and timeliness configuration obtained from the prompt word manager, so that the scheduler can give priority to the real-time task, ensure the timely response of the real-time task, and avoid delaying the progress of the judicial trial. At the same time, processing asynchronous tasks when resources are sufficient can improve the rationality of task processing and reduce the occupied resources.

[0103] In the exemplary embodiment, continue to refer to Figure 2 The model service layer 130 includes a unified standard model service gateway 131.

[0104] The scheduler 125 is also used to obtain the task from the real-time model priority queue 124 and / or the asynchronous model priority queue 123, use the case information as model input data, and encapsulate the model input data and the task configuration parameters into a remote procedure call (RPC) request packet, and pass the remote procedure call request packet to the unified standard model service gateway 131 through the remote procedure call protocol.

[0105] In an exemplary embodiment, when the type of service model determined according to the degree of matching is a generative model, the prompt word manager 122 is also used to provide the preprocessor 121 with a prompt word template corresponding to the business scenario information and model reasoning configuration options of the generative model, wherein the model reasoning configuration options include a generated content length limit and / or randomness control parameters.

[0106] In the embodiments of the present disclosure, the content length limit is used to guide the length of the text generated by the generative model not to exceed a certain limit. The specific limit can be set according to the actual scenario, and the present disclosure does not limit its value.

[0107] In an exemplary embodiment, the scheduler 125 is further configured to send the prompt word template and the model reasoning configuration options of the task to the model service layer 130. The task configuration parameters also include the prompt word template and the model reasoning configuration options.

[0108] In an exemplary embodiment, in the system architecture, the configuration obtained by the preprocessor from the prompt word manager is mainly related to the prompt words required for model reasoning and related task configuration. Specifically, the information provided by the prompt word manager to the preprocessor includes one or more of the following: (1) Prompt word template.

[0109] The prompt word manager will provide corresponding prompt word templates based on the business scenario ID (such as appeal analysis, dispute focus extraction, document generation, etc.). These prompt word templates are designed to guide the AI ​​model to produce accurate output that meets the needs of the scenario. Prompt words can be combined with the judge's thinking chain to help the model better understand the task context.

[0110] (2) Model name (model ID) Different business scenarios may require different big models (i.e., service models) for reasoning. The name of the big model (model ID) used for each business scenario is configured in the prompt word manager.

[0111] (3) Model parameters and strategy configuration The prompt word manager provides configuration options related to model reasoning (i.e., model reasoning configuration options), such as: generation strategy (length limit of generated content), randomness control, etc.), inference temperature, Top-K, Top-P (also known as kernel sampling), and other generation model parameters. Inference temperature, Top-K, and Top-P can also be called randomness control parameters, which are used to control the randomness of model output.

[0112] The reasoning process of the model is mainly based on the probability distribution of the generative model to gradually generate output. During the reasoning process, the model generates the entire sentence step by step by predicting the next most likely word (or subword). This process is affected by some parameters, such as temperature (also called temperature), Top-K, Top-P, etc.

[0113] In generation tasks, the inference temperature controls the smoothness of the output distribution. Higher temperatures lead to more randomness, while lower temperatures make the output more deterministic. Choosing the right temperature can help regulate the diversity and quality of the generated results.

[0114] The two parameters Top-K and Top-P are used to control the output of the generative model. Top-K sampling limits the number of candidate words generated each time, while Top-P sampling (cumulative probability threshold) selects words with cumulative probability exceeding p (a real number greater than 0 and less than 1). Properly setting these parameters can help improve the quality and diversity of generated text.

[0115] (4) Task priority and timeliness configuration According to the real-time asynchronous requirements of the system, the prompt word manager will configure different task priorities. High-priority tasks for real-time processing require the preprocessor to quickly process and push them to the real-time model queue (i.e., the real-time model priority queue). Tasks for asynchronous processing can be delayed and put into the asynchronous priority queue (i.e., the asynchronous model priority queue).

[0116] In the system architecture, after the preprocessor obtains the configuration of the prompt word manager (i.e., the task configuration parameters), it will allocate the model tasks to different queues according to the timeliness and priority of the tasks, namely, the real-time model priority queue and the asynchronous model priority queue. The following is the allocation process: (1) Judgment of timeliness The preprocessor first determines the timeliness of the task based on the configuration provided by the prompt word manager, which can be divided into the following two tasks: Real-time tasks: They need to be processed immediately and the results returned quickly. For example, analysis of controversial points in a court trial. Such tasks generally have a higher priority and strict response time requirements.

[0117] Asynchronous tasks: can be processed in a delayed manner and do not require immediate feedback results. For example, batch processing of historical case data, non-urgent document generation tasks, etc. These tasks have a lower priority and can be placed in the asynchronous model priority queue to wait for processing.

[0118] (2) Priority determination The preprocessor also makes a priority determination based on the specific configuration of the task (the preset priority level of the task).

[0119] High-priority tasks: For example, urgent cases in court, or tasks that require immediate feedback from users. Such tasks generally enter the real-time model priority queue directly and are queued according to priority.

[0120] Low-priority tasks: such as backend batch processing of case history data, which do not require immediate results. Such tasks usually enter the asynchronous model priority queue.

[0121] (3) Task allocation rules Based on the above two conditions, the preprocessor performs the following operations: Real-time model priority queue: If a task is judged as a real-time task and has a high priority, the preprocessor assigns the task to the real-time model priority queue. Tasks in this queue are immediately inferred and processed, and the results are returned quickly.

[0122] Asynchronous model priority queue: If a task is judged as non-urgent and can be processed later, the preprocessor will assign it to the asynchronous model priority queue. Tasks in this queue will be processed gradually according to the idle state of the system, and the results may be returned later.

[0123] (4) Task Scheduling Mechanism The task scheduling mechanisms of the two types of queues are different: the real-time model priority queue is usually scheduled in a first-come, first-served (FIFO) manner, but it will be dynamically adjusted according to the priority of the task to ensure that high-priority tasks can be processed quickly. The asynchronous model priority queue usually adopts a strategy of batch processing and maximizing resource utilization. Tasks in this queue will be gradually scheduled and processed when system resources are idle. If the task backlog is serious, the system may downgrade low-priority tasks or even delay processing until system resources are sufficient.

[0124] In an exemplary embodiment, the scheduler 125 is also used to obtain the task from the real-time model priority queue 124 and / or the asynchronous model priority queue 123, and then use the case information, the prompt word template and the model reasoning configuration options as model input data, and encapsulate the model input data and the task configuration parameters into a remote procedure call request package, and pass the remote procedure call request package to the unified standard model service gateway 131 through the remote procedure call protocol.

[0125] In the disclosed embodiment, after the scheduler obtains the model task from the queue (real-time model priority queue or asynchronous model priority queue), it interacts with the unified standard model service gateway to assign the task to a specific model for reasoning. The role of the unified standard model service gateway is to coordinate the calls of multiple models, provide a unified interface, shield the differences of the underlying model services, and ensure the load balancing and resource management of the model. The following is a detailed process of the interaction between the scheduler and the unified standard model service gateway: (1) Task acquisition and preprocessing After the scheduler obtains a task from the real-time model priority queue or the asynchronous model priority queue, it first checks the relevant configuration of the task, including: Task type: such as classification task, generation task, entity extraction task, etc.

[0126] Task parameters: including prompt words, context information, reasoning parameters (such as generation length (i.e., the length limit of generated content), temperature, Top-K, etc.).

[0127] Model requirements: Some tasks may require calling specific models, such as text classification models, entity recognition models (i.e. entity extraction models), or generative models.

[0128] Based on these parameters, the scheduler prepares the input data required for the task (i.e., model input data) and decides which type of model to call.

[0129] (2) Interacting with the unified standard model service gateway The scheduler interacts with the unified standard model service gateway to pass the task to the specific model for processing. The specific interaction process is as follows: a. Calling standardized interfaces The unified standard model service gateway provides a unified API (Application Programming Interface) interface for the scheduler to call. The scheduler sends a task request through this standard interface, which can include the following: Model type requested by the task: Based on the task configuration, the scheduler will specify which model needs to be called.

[0130] Input data (model input data): includes the input text of the task, context information, prompt words (i.e. prompt word templates), etc. All of these input data will be packaged into requests and passed to the model gateway (i.e. the unified standard model service gateway).

[0131] Model parameters: The scheduler passes necessary inference parameters according to the requirements of the task, such as the maximum length of the model generation task (i.e., the length limit of the generated content) and randomness control (such as temperature, Top-K, Top-P and other parameters).

[0132] b. Load balancing and model selection One of the functions of the unified standard model service gateway (sometimes referred to as "gateway") is to be responsible for balancing. After receiving the request from the scheduler, the gateway will dynamically select the appropriate model instance to handle the task based on the current load of the system. This process may involve the following operations.

[0133] Model instance selection: The unified standard model service gateway can maintain multiple instances of the same model (such as multiple classification model instances or generative model instances). The gateway will select a suitable model instance to process the task based on the current load and available resources of each instance.

[0134] Resource management: The gateway checks the system's computing resources (such as GPU, memory, CPU, etc.) to ensure that the resources allocated to the model instances are sufficient to perform the tasks while avoiding overloading some model instances.

[0135] c. gRPC (high performance remote procedure call protocol) protocol call In the actual system implementation, the communication between the scheduler and the unified standard model service gateway uses the gRPC (remote procedure call) protocol. gRPC is an efficient communication protocol that supports cross-language communication and can handle large-scale, low-latency service requests well. The following is a typical process of a gRPC call: Build request: The scheduler encapsulates the task input data (i.e., model input data), inference parameters, etc. into a gRPC request package (i.e., remote procedure call request package).

[0136] Send request: Through the gRPC protocol, the scheduler sends the request (i.e., remote procedure call request packet) to the gRPC server of the unified standard model service gateway.

[0137] Waiting for response: After receiving the request, the gateway will forward the task to the appropriate model instance for inference. After the inference is completed, the gateway will encapsulate the result into a response and return it to the scheduler.

[0138] d. Model reasoning process When the model instance performs the inference task, the unified standard model service gateway is responsible for detecting the execution status of the model and returning the result to the scheduler after the task is completed. The model inference process mainly includes the following steps: Model execution: After receiving a task, the model instance performs the corresponding reasoning operation. For example, a classification model (such as a text classification model) will classify the input data, and a generation model (i.e., a generative model) will generate the corresponding text based on the prompt word and input data.

[0139] Detection and feedback: The gateway detects the running status of the model instance to ensure that the task can be completed successfully. If an error or timeout occurs in the task, the gateway will feedback to the scheduler for further processing (such as retry or downgrade processing).

[0140] Result return: After the model inference is completed, the result will be returned to the gateway through the gRPC protocol, and the gateway will return the inference result to the scheduler.

[0141] In an exemplary embodiment, the model service layer 130 includes a unified standard model service gateway 131, and a deep learning model 132 and a generative model 133 are deployed in the model service layer 130, and each deep learning model and each generative model has at least one model instance running in the model service layer 130.

[0142] The unified standard model service gateway 131 is used to receive the case information of the task and the task configuration parameters from the scheduler 125, and obtain the running status information of the model instance; obtain the input text vector of the case information of the task and the task configuration parameters, and obtain the model capability vectors of different types of service models; obtain the matching degree between the task and different types of service models according to the input text vector and the model capability vector; determine the corresponding deep learning model 132 or generative model 133 according to the matching degree; determine the corresponding model instance from the determined deep learning model 132 or generative model 133 according to the running status information of the model instance; distribute the case information of the task and the task configuration parameters to the corresponding model instance in the determined deep learning model 132 or generative model 133 for processing.

[0143] In an exemplary embodiment, a suitable model is selected based on the service request text. This can be achieved by matching the characteristics of the text content with the applicable scenarios of each model. The service request text is converted into a vector representation, and q is used to represent the service vector, that is, the input text vector. (i=1, 2, ..., N) uses the corresponding model capability vector Indicates different service models. Where N is a positive integer greater than or equal to 1.

[0144] The business request text in the embodiment of the present disclosure refers to the text content formatted with case information and task configuration parameters (optionally, including prompt word templates). The natural language is converted into an input text vector q through an embedding layer.

[0145] In the embodiment of the present disclosure, the model capability vector is used to indicate the type of tasks that the service model can handle. For example, each service model has its description information (e.g., training data set information, all fine-tuning directions, supported languages, parameter sizes, and some examples of tasks that the model is good at). These description information are converted into vectors using an embedding layer, which is the model capability vector.

[0146] In some embodiments, the cosine similarity method is used to calculate the matching degree based on the model capability vector and the input text vector, and the final result is to select the service model with the highest matching degree. For example, the matching degree is calculated by the following formula to measure the matching degree between the business request (ie, task) and the service model: (3) Based on the calculated matching degree, select the service model with the highest matching degree: (4) The above formula means that the service model with the highest matching degree with the task is selected from N service models. A service model is used as the target model of this task. is a positive integer greater than or equal to 1 and less than or equal to N.

[0147] In the above embodiment, the type of model serving the task is determined according to the degree of match, such as whether to call a small parameter summary model or a large parameter simple inference model. Then, the model instance running status information of the model instance of the service model of this type can be considered to determine the model instance for the task. The model instance running status information may include the load factor and response time of the model instance. For example, assuming that there are Z model instances of the service model serving the task according to the degree of match, then the following formula can be used to determine which model instance handles the task from these Z model instances: (5) In the above formula, Represents the load factor of the z-th model instance. The load factor indicates an indicator of the current busyness of the model instance. Model instances with lower loads are given priority. represents the response time of the zth model instance. Model implementations with shorter response times are preferred to improve efficiency. z and are all positive integers greater than or equal to 1 and less than or equal to Z, express The largest model instance. Z is a positive integer greater than or equal to 1. The disclosed embodiment can comprehensively consider the service request and load conditions, give priority to scheduling the most suitable model and model instance, and improve the throughput and response speed of the system.

[0148] In the disclosed embodiment, each model instance has its own generation queue, and each model instance has an average single token generation time, and the queue length of the generation queue of each model instance at the current moment is The average single token generation time is used to determine the response time of the model instance at the current moment. The queue length changes over time, and the average single token generation time is a fixed value for each model instance (determined by the average value obtained from historical stress testing). The generation queue refers to the collection of elements to be generated in a certain order or rule when the model generates a sequence (such as text, code, etc.). The elements in this queue are tokens, which are the basic units of model processing. The generation queue determines the order and content of the model generation sequence in the sequence generation task. The model generates tokens one by one in the order in the queue until a certain termination condition is reached (such as a specific end symbol is generated or the preset maximum length is reached). The length of the generation queue refers to the number of tokens to be generated in the queue. This length can be fixed or dynamic, depending on the specific task, model structure, and training strategy. The single token generation time refers to the time required for the model to generate the output of the next token from receiving the input of the current token. This time includes all the processes of the model processing information, reasoning, and generating responses. In deep learning, token refers to the basic unit of the input text sequence. These units can be words, characters, subwords, or other forms of data fragments.

[0149] In an exemplary embodiment, the task configuration parameters also include the maximum response time of the task. In the disclosed embodiment, a corresponding maximum response time can be set for each task type. For example, the maximum response time for generating a summary task can be set smaller than the maximum response time for performing a complex reasoning task. The unified standard model service gateway is also used to determine the remaining execution time and deadline of the task based on the maximum response time of the task; determine the comprehensive priority of the task based on the task priority, remaining execution time and deadline of the task; and within the current scheduling cycle, select the corresponding model instance of the task in the determined deep learning model or generative model for processing according to the comprehensive priority of the task.

[0150] In the disclosed embodiment, after determining which model instance of which service model to assign the task to for processing, since the model instance may receive multiple tasks at the same time, it is possible to determine which task the model instance will process first based on the task priority. Task priority is used to reasonably schedule tasks in a multi-system multi-task environment to ensure that high-priority tasks are executed first. This embodiment adopts a hybrid priority scheduling algorithm and combines multiple systems for comprehensive scheduling.

[0151] In some embodiments, the hybrid priority scheduling algorithm includes the following.

[0152] Set tasks The static priority of (is pre-configured, each task has its own priority, which can be the task priority in the task configuration parameters), the remaining execution time is , the deadline is , then the task The overall priority Defined as: (6) in, , , They are , , The weight coefficients represent the relative importance of the static priority, the remaining execution time, and the deadline, respectively, and are all greater than or equal to 0 and less than or equal to 1. In the disclosed embodiment, when a task is generated, a deadline is automatically assigned to the task, that is, the task must be completed before the deadline. If the task does not receive a response after the deadline, it is considered that the task has an error and an exception is handled. Remaining execution time = deadline - current time. Different maximum response times are set for different tasks, and the current time plus the maximum response time is the deadline. "Comprehensive" here means taking into account both the global priority of the task and the urgency of the current task, ensuring both the limited execution of high-priority tasks and the execution of urgent tasks (tasks that are about to reach the deadline). In each scheduling cycle, the scheduler selects the task with the highest comprehensive priority for processing based on the comprehensive priority.

[0153] In an exemplary embodiment, for priority scheduling of multi-system tasks, the goal is to minimize the overall delay of the system or maximize the throughput, and the task scheduling strategy is obtained by optimizing the objective function. Assume that the task set is , N is the number of tasks, N is a positive integer greater than or equal to 1, then the task scheduling goal can be defined as: (7) That is, by maximizing the sum of the comprehensive priorities of the tasks, the task throughput is maximized. In other embodiments, a scheduling strategy that minimizes all task delays and response times may also be adopted.

[0154] The hybrid priority scheduling algorithm is aimed at how to prioritize each task within a single system. The multi-system task priority describes the resource preemption algorithm between different systems. There are different scheduling systems in the entire service platform, such as civil production systems, criminal production systems, demonstration environments, test environments, special judge service systems, etc. They share the same hardware service platform, and an algorithm is needed to balance the call of hardware resources between different systems.

[0155] In the disclosed embodiment, the unified standard model service gateway is an intermediate layer component used to manage and coordinate multiple model services (or service models) in the AI ​​system architecture. It provides a unified interface, shields the differences between different underlying model services, and simplifies the interaction between upper-layer applications and models. Through the unified standard model service gateway, the scheduler and upper-layer applications do not need to directly handle the details of each model, but can easily call, manage, detect and load balance multiple model services through this gateway. Specifically, the functions of the unified standard model service gateway include the following aspects: (1) Unified API interface The unified standard model service gateway uses a unified API interface to enable different model services to be called in the same way. Regardless of whether the underlying model is a deep learning model or a generative model, the scheduler and upper-level applications only need to interact with the gateway through a standard interface, avoiding the complexity of directly interacting with each model service.

[0156] Standardized request format: Regardless of the model type, the gateway requires all requests to be encapsulated in a unified format, such as task input, inference parameters, context information, etc. The specific request format is defined by gRPC's proto protocol (a binary data serialization protocol).

[0157] Unified return format: The gateway will standardize the output results of different models and return them to the upper-level application in a unified format, so that the outputs of different models are consistent when used.

[0158] (2) Load balancing The unified standard model service gateway is responsible for load balancing among multiple model instances to ensure efficient use of system resources and rapid processing of tasks.

[0159] (3) Model service detection and health check The unified standard model service gateway is responsible for detecting the health status of each model service to ensure the stability and high availability of the system. The gateway regularly performs health checks on each model instance to ensure that the model can respond to requests normally. If a model instance fails, the gateway will mark the instance as unavailable and automatically restart the service instance while transferring the task to other available instances. When a model instance fails, the gateway can automatically take the instance offline and automatically restart or restore the model service to ensure the stability and high availability of the system.

[0160] (4) Protocol management and scalability The unified standard model service gateway usually uses an efficient communication protocol (gRPC) to interact with each model instance to ensure low latency and high throughput of communication. At the same time, the gateway has good scalability and can easily add or update new model services as needed without changing the upper-level application.

[0161] (5) Security and access control The unified standard model service gateway can manage and control external access to ensure that only authorized services or users can call model services. It mainly uses identity authentication and authorization to ensure that only authenticated users or services can access model services.

[0162] In an exemplary embodiment, the corresponding model instance in the determined deep learning model 132 or generative model 133 is used to process the case information according to the task configuration parameters, obtain the reasoning result of the task, and return the reasoning result to the unified standard model service gateway 131.

[0163] The unified standard model service gateway 131 is also used to encapsulate the inference result into a response and return it to the scheduler 125.

[0164] In some embodiments, after receiving the result returned by the gateway, the scheduler may perform the following operations: Result processing: The scheduler further processes the results returned by the model, such as result formatting and logging.

[0165] Feedback to upper-layer applications: The scheduler sends the final inference results back to the upper-layer application module (such as the scenario application layer) through the global message queue service, and the upper-layer application displays or stores them according to business needs.

[0166] Task status update: The scheduler records the status of the task (such as success, failure, or timeout) and performs retries or error handling when necessary.

[0167] In some embodiments, the scheduler can also be used for exception handling and task retry. In the process of interacting with the unified standard model service gateway, the scheduler needs to handle possible exceptions, including: Timeout processing: If the model inference time exceeds the preset time limit, the scheduler can perform timeout processing, such as retrying the task or transferring the task to other model instances.

[0168] Model fault handling: If a model instance fails or cannot process a task, the unified standard model service gateway will return an error message. The scheduler can adjust the task execution strategy based on the error message, such as selecting other model instances for retry or downgrade processing.

[0169] Load regulation: If the system load is too high, the scheduler may temporarily postpone the execution of some low-priority tasks, or put the tasks back into the queue (asynchronous model priority queue or real-time model priority queue) to wait for resources to be restored.

[0170] In an exemplary embodiment, when the type of the service model determined according to the matching degree is a generative model, the task configuration parameters further include the prompt word template and the model reasoning configuration options.

[0171] refer to Figure 3 In an exemplary embodiment, the generative model 133 includes one or more of the following models: Summary models (e.g. Figure 3 The small parameter summary model 1331 in the example is used to generate one or more summaries such as prosecution opinions, defense opinions, and appeal opinions based on the case information, the prompt word template, and the model reasoning configuration options.

[0172] The first type of inference model (e.g. Figure 3 The large parameter simple reasoning model 1332 in the example is used to process the case information, the prompt word template and the model reasoning configuration options, perform legal reasoning and generate text. In some embodiments, for example, it can be used to perform dispute focus extraction and legal clause application suggestions.

[0173] The second type of inference models (e.g. Figure 3 The large-parameter complex reasoning model 1333 in the example is used to process the case information, the prompt word template and the model reasoning configuration options to generate legal documents, which may include one or more of a judgment and an opinion.

[0174] In the generative model provided in the embodiment of the present disclosure, different models have different parameter scales and complexities, and are suitable for different generation tasks. The following is a detailed introduction to the small parameter summary model, the larger parameter simple reasoning model, and the large parameter complex reasoning model, as well as their specific functions.

[0175] A small parameter summary model refers to a vertical domain model with a parameter size of less than 10B (for example only, not limited to this) based on sample training in the legal field. Its specific function is to generate a summary of case materials in the AI-assisted trial system, including prosecution opinions, defense opinions, appeal opinions, etc., so that judges and legal practitioners can quickly understand the key information of the case.

[0176] A large-parameter simple reasoning model refers to a vertical domain model with a parameter size between 30B and 40B (for example only, not limited to this) based on sample training in the legal field. Its specific function is to perform simple legal reasoning tasks and generate texts of medium complexity in the AI-assisted trial system. For example, the following tasks.

[0177] Extraction of dispute focus: Generates the main dispute focus based on the case content and provides simple legal explanations to assist judges in analyzing the case.

[0178] Suggestions on applicable legal provisions: Based on the description of the case, provide suggestions on applicable legal provisions, generate legal basis related to the case, and help judges refer to relevant legal provisions.

[0179] A large-parameter complex reasoning model refers to a vertical domain model with a parameter volume of more than 70B (for example only, not limited to this) based on sample training in the legal field. Its specific function is to handle very complex generative reasoning tasks in the AI-assisted trial system, especially in tasks involving multiple rounds of reasoning or long document generation. For example, complex legal document generation: generating detailed and complex legal documents, including judgments, opinions, etc., and being able to generate long, structured legal documents, which is suitable for handling complex cases.

[0180] It should be noted that the "small parameters", "large parameters" and "large parameters" in the embodiments of the present disclosure are relative, that is, different generative models have different amounts of model parameters after training. According to the different numbers of these model parameters, they are divided into small parameter summary models, large parameter simple reasoning models and large parameter complex reasoning models.

[0181] The generative model in the disclosed embodiments learns the joint probability distribution P(x,y) of the data, i.e., the joint distribution between feature x and label y. This means that it can not only predict the label of a given feature, but also generate new data instances. The generative model attempts to model the generation process of data, so the generated data can be sampled directly from the model.

[0182] In the embodiments of the present disclosure, any one or more of the following major generative models can be used to implement the above-mentioned small parameter summary model, large parameter simple reasoning model and large parameter complex reasoning model: 1. Recurrent Neural Networks (RNNs), which are characterized by their ability to process sequence data, such as text or time series data. Each time step of RNNs accepts the current input and the hidden state of the previous time step, and outputs a new hidden state and a predicted value. Through continuous iteration, RNNs are able to perform well in generating text.

[0183] 2. Long Short-Term Memory (LSTM) is an improved RNNs, specially designed to solve the problem of long-term dependency. It controls the flow of information by introducing a gating mechanism (forget gate, input gate, and output gate) to learn long-term dependencies more effectively. When generating new samples, new data samples that meet the characteristics of the input data can be generated by continuously iterating the LSTM unit.

[0184] 3. Transformer is a model based on the self-attention mechanism. It can process input sequences in parallel, so it has advantages in training and reasoning speed. A Transformer model contains multiple attention heads and multiple self-attention layers. When generating new samples, you can generate new data samples that meet the characteristics of the input data by inputting some initial values ​​into the model and continuously iterating the model.

[0185] 4. Generative Adversarial Networks (GANs) consist of a generator network and a discriminator network. The generator network is responsible for generating fake data samples, while the discriminator network is responsible for distinguishing between real data and fake data. Through adversarial training, the generator is constantly improved to deceive the discriminator, and the discriminator is also constantly improved to better distinguish between the real and the fake. Through continuous iterative training, the adversarial relationship between the generator and the discriminator will become more and more intense, and eventually the generator will be able to generate new samples that are very similar to real data.

[0186] 5. Autoregressive Models are a type of generative model based on probability distribution modeling. Its principle is to generate sequence data by establishing a joint distribution of data and using conditional probability. During the training process, the model optimizes parameters by maximizing the posterior probability of observed data and latent variables, so that the model can generate new samples that meet the characteristics of the input data.

[0187] 6. Variational autoencoder is a generative model based on probability coding, which combines the ideas of autoencoder and variational inference. It consists of an encoder network and a decoder network. The encoder network maps the input data to the probability distribution in the latent space, while the decoder network samples and generates data samples from the distribution in the latent space. The deep learning model in the embodiments of the present disclosure is a special machine learning model that learns the feature representation of data through multiple layers of nonlinear transformations. The deep learning model can be applied to generative models, such as generative adversarial networks and variational autoencoders.

[0188] Continue to refer Figure 3In an exemplary embodiment, the deep learning model 132 includes one or more of the following models: The detection model 1321 is used to detect the image information in the case information.

[0189] The text classification model 1322 includes a case classification model, and the case classification model is used to process the case information and determine the case category of the case.

[0190] The entity extraction model 1323 is used to extract entity information from the case information.

[0191] The deep learning model provided in the embodiments of the present disclosure includes a detection model, a text classification model, and an entity extraction model, each of which is responsible for different tasks and uses a deep learning algorithm suitable for its task. The following are the deep learning algorithms of these models (it can be understood that they are not limited to the following algorithms, and other applicable deep learning algorithms can also be used, which are only used for example) and their specific roles in the AI-assisted trial system: (1) Detection model YOLO (You Only Look Once): A real-time detection algorithm that can quickly identify and locate targets, suitable for scenarios that require efficient detection. The disclosed embodiment trains multiple detection models based on yolov6, specifically including the detection of identity cards, vehicle registration certificates, driver's licenses, lawyer's licenses, household registration books, seals, QR codes, etc. in case materials. The detection model detects the content of case materials at the front end and classifies them so that the corresponding recognition model can be used for information extraction.

[0192] (2) Text Classification Model BERT (Bidirectional Encoder Representations from Transformers): BERT is a text classification model that can use the bidirectional Transformer structure to learn the contextual meaning of text and is suitable for complex legal text classification tasks. RoBERTa is an improved version of BERT that can process large corpus data more efficiently and is suitable for high-precision text classification tasks. In the disclosed embodiment, a case classification model is trained based on RoBERTa. By inputting case materials or case descriptions, the case is automatically classified into 486 types of civil and commercial cases.

[0193] (3) Entity Extraction Model UIE (Universal Information Extraction) model, based on a pre-trained language model, is suitable for sequence labeling and information extraction tasks, can capture contextual information in text, and accurately extract element information in legal documents. In the disclosed embodiment, the UIE model based on paddle is used to extract company abbreviations, authorized client information, lawyer letter identity information, etc. through legal data retraining.

[0194] In actual applications, how the gateway decides which model to call depends on the task configuration parameters and gateway proxy configuration obtained by the scheduler from the upstream. The model to be called is obtained based on the task configuration parameters, and the unified standard model service gateway distributes the task to the corresponding model through the proxy based on the model ID parameter. The part of the task configuration parameter other than the model ID is passed through the RPC method in the proto protocol to call the model service.

[0195] For example, in the task of generating a summary, the scheduler obtains the input context information and task configuration parameters of the task from the model asynchronous model priority queue and / or the real-time model priority queue. The context information includes the prompt word template (also called the prompt word instruction) and the case information content of the summary, and is the complete content after processing. The task configuration parameters include the model ID, reasoning strategy parameters (i.e. the above-mentioned reasoning parameters), etc. The unified standard model service gateway matches the corresponding model service address in the proxy according to the model ID and passes the task content request to it.

[0196] The specific information output by the model depends on the type of task and the model used. The following are the information output by the model for several scenarios: The output of a text classification model is usually a classification label, which is used to indicate the specific category to which the input text belongs. The output information includes: Classification tags: such as case causes, sales contract disputes, marriage disputes, motor vehicle traffic accidents, agency contract disputes, labor disputes, financial loans, credit card disputes, etc.

[0197] Classification confidence: When the model outputs the classification results, it usually provides a confidence classification for each category, indicating the model's confidence in the classification, such as 0.95.

[0198] The detection model is usually used for structural analysis of document images, and the output includes the detected document elements and their location information. The output information includes: Detected document elements: such as paragraphs, headings, tables, signatures, seals, etc.

[0199] Position coordinates: The position information of each element in the image (usually the coordinates of the bounding box), which is used to locate the specific position of the element in the document.

[0200] Figure 4 The embodiment is a schematic diagram of detecting each document element in an image of a business license by using a detection model and locating it with a bounding box.

[0201] The output of the entity extraction model is the key entities identified and annotated from the input text, such as names, places, legal terms, etc. The output information includes: Entity list: such as the name of the party, the name of the lawyer, the location of the incident, etc.

[0202] Entity type: The type of each entity, such as "personal name", "address", "legal terms", etc.

[0203] Entity position: The position in the original text, used to mark the start and end of the entity.

[0204] Figure 5 It is a schematic diagram of the output of an entity extraction model provided by an embodiment of the present disclosure.

[0205] The output of the generative model is usually natural language text, which generates corresponding content based on the input prompt words and context, and outputs the case summary content. Figure 6 Taking the generation of a summary as an example, the following example is shown: The input prompt template is "You are a judge. Your task is to briefly summarize the facts and reasons in the plaintiff's complaint. The results are output in the following three directions: 1. Basic facts: <…> 2. Focus of appeal: <…> 3. Legal provisions: <…> The output format is: "Summary:" After being processed by the generative model, the output is: “1. Basic facts: 1.XXXXXXXXXXXXXXXXXXXXX 2.… 2. Focus of appeal: 1. XXXXXXXXXXXXXXXXXXXXX 2. XXXXXXXXXXXXXXXXXXXXX 3. Legal provisions: 1. XXXXXXXXXXXXXXXXXXXXX 2.…” In an exemplary embodiment, when the type of the service model determined according to the matching degree is a generative model, the task configuration parameters further include the prompt word template and the model reasoning configuration options.

[0206] refer to Figure 7 In an exemplary embodiment, the model service layer 130 also includes a first coordinator 134 .

[0207] The first coordinator 134 is used to obtain the case information of the task, the task configuration parameters, the prompt word template and the model reasoning configuration options from the unified standard model service gateway 131; obtain the model instance running status information corresponding to the generative model 133; determine to adopt the corresponding generative model according to the task configuration parameters; determine the corresponding model instance from the determined generative model according to the model instance running status information corresponding to the determined generative model; distribute the case information of the task, the prompt word template and the model reasoning configuration options to the corresponding model instance in the determined generative model for processing, obtain the reasoning result, and return the reasoning result to the unified standard model service gateway 131.

[0208] In the disclosed embodiment, the first coordinator mainly schedules the generative model tasks and allocates resources reasonably. The core role of the first coordinator is task management and scheduling. Its main functions in the execution process of the generative model are as follows: Concurrency control: When multiple tasks are submitted at the same time, the coordinator is responsible for controlling the concurrency of the tasks to avoid system overload.

[0209] Load balancing: The coordinator detects the load of each model instance and ensures that the tasks are distributed across multiple model instances based on the minimum connection algorithm to avoid overloading some model instances while other instances are idle.

[0210] Task retry: If a build task fails due to resource issues or model failure, the coordinator can reschedule the task execution or assign it to another model instance.

[0211] Continue to refer Figure 7 In an exemplary embodiment, the model service layer 130 also includes a second coordinator 135 .

[0212] The second coordinator 135 is used to obtain the case information of the task and the task configuration parameters from the unified standard model service gateway 131; obtain the model instance running status information corresponding to the deep learning model 132; determine to adopt the corresponding deep learning model according to the task configuration parameters; determine the corresponding model instance from the model instances of the determined deep learning model according to the model instance running status information corresponding to the determined deep learning model; distribute the case information of the task to the corresponding model instance in the determined deep learning model for processing, obtain the reasoning result, and return the reasoning result to the unified standard model service gateway 131.

[0213] In an exemplary embodiment, a second coordinator can be configured on the side of the deep learning model. The main function of the second coordinator is load balancing and concurrency control. As the volume of business increases, even if the deep learning model consumes less resources than the generative model and has a faster processing speed, the second coordinator is still needed to control the load, so as to ensure that the business system remains stable in high-concurrency scenarios.

[0214] Figure 8 It is a schematic diagram of another artificial intelligence assisted trial system provided by an embodiment of the present disclosure. Figure 8 The artificial intelligence assisted trial system provided by the embodiment is Figure 7 Compared with the embodiment, the model application layer 120 further includes a feedback information processing node 126 .

[0215] In the disclosed embodiments, the information output by the model refers to the inference results generated and returned by the generative model or deep learning model after completing the inference task. These output information have different forms and contents depending on the model type, task requirements, and application scenarios. The feedback information processing node is responsible for further processing and formatting these model outputs to ensure that the output results can be correctly understood and used by the upper system or user.

[0216] Continue to refer Figure 8 In an exemplary embodiment, the artificial intelligence assisted trial system 10 also includes a global message queue service 150.

[0217] In the disclosed embodiment, the global message queue service is a mechanism for asynchronous communication, task scheduling, and data transmission between modules in the system. Its role is to ensure that messages can be effectively transmitted between different components, services, and modules, and to coordinate the overall workflow of the system, especially when processing concurrent and asynchronous tasks. The following are the specific functions of the global message queue service: (1) Asynchronous task management and scheduling The core function of the global message queue service is to manage asynchronous tasks and ensure that tasks can be effectively scheduled and executed between different modules.

[0218] Long-running tasks: Some generative tasks (such as the generation of complex legal documents) may take a long time to complete. The global message queue can asynchronously process these long-running tasks to avoid blocking other operations in the system.

[0219] Notification after task execution: When a task is completed, the processing service sends the execution result back to the message queue, and the queue service sends the notification to the upper-level application to ensure that the task status is fed back to the user or system in a timely manner.

[0220] (2) Decoupling and asynchronous communication between modules The global message queue service effectively decouples the various modules of the system, allowing them to communicate in an asynchronous manner without having to directly depend on each other or wait for each other's response. This improves the flexibility of the system, and the various modules (such as the model application layer, generative model service, feedback information processing node, etc.) do not need to communicate synchronously, and can send tasks to the message queue and continue to process other tasks. This avoids direct dependencies between modules and improves the parallel processing capabilities of the system.

[0221] Prevent system blocking: The message queue can temporarily store tasks or data, and continue to schedule the next task after processing a task, preventing the entire system from being blocked due to delays or bottlenecks in a certain module.

[0222] Asynchronous communication scenarios: Asynchronous transmission of model output: After the inference task of the generative model or deep learning model is completed, the inference result is asynchronously transmitted to the feedback information processing node through the message queue, avoiding direct call dependency between the inference service and the feedback information processing node.

[0223] System notification and result delivery: When a module completes a task, it can notify other modules through the global message queue to ensure that the task status is synchronized between various parts of the system. For example, when the document generation task is completed, the document review module or user interface is notified.

[0224] (3) Task reliability and fault tolerance mechanism The global message queue service can also provide task reliability guarantees for the system, ensuring that tasks will not be lost during the process of sending, executing and feedback, and can be recovered even if the system has partial failures.

[0225] Reliability assurance methods: Message persistence: The message queue can persist the sent tasks, ensuring that even if the system fails during processing, the task information will not be lost, and the task can continue to execute after the system is restored.

[0226] Task retry mechanism: When a task fails during execution, the message queue can resend the task to other model instances for processing through the built-in retry mechanism to ensure that the task is eventually processed successfully.

[0227] (4) Event-driven processing mechanism The global message queue service can support event-driven task processing. When an event is triggered (such as task completion, model inference success, etc.), the message queue can push the message to the module that subscribes to the event to trigger subsequent operations. Event-driven scenarios include: Reasoning task completion notification: When the generative model or deep learning model completes a task, the message queue will push the completion information to the feedback information processing node or user interface, triggering subsequent feedback processing or result display.

[0228] Case analysis progress update: When asynchronously batch processing cases, the message queue can update the progress of the task and regularly send update information to the user interface or task management module to ensure that users are informed of the progress of the task in a timely manner.

[0229] (5) System scalability and high availability The global message queue service provides support for the scalability and high availability of the system. Through the message queue, the system can easily expand new modules or model instances without modifying the existing business logic.

[0230] Manifestation of scalability: Dynamic expansion of modules or model instances: When the system needs to add new model instances or modules, new services can be dynamically connected through the message queue. The message queue will automatically distribute tasks to the new modules without the need to reconstruct existing services.

[0231] High availability of the system: The message queue can improve the system's fault tolerance through asynchronous processing of tasks and load balancing, avoiding the impact of a module failure on the overall business process.

[0232] Continue to refer Figure 8 In an exemplary embodiment, the artificial intelligence assisted trial system 10 also includes a global real-time communication service 160.

[0233] In the disclosed embodiment, the global real-time communication service refers to the communication component used for real-time transmission and synchronization of information within the system, ensuring efficient coordination and instant messaging between various modules and services. The following is the specific implementation mechanism of the global real-time communication service, and the specific meaning of "global" in this context.

[0234] Implementation mechanism of global real-time communication service: The global real-time communication service implements low-latency and instant messaging between multiple components and modules in the system, ensuring that tasks, status and data can be quickly delivered to the required services or users. It is achieved through the following technical means: a. Real-time communication based on message queues: The global real-time communication service relies on message queue systems (such as RabbitMQ) to achieve real-time communication between multiple modules. Message queues support high-throughput, low-latency message delivery and can ensure real-time performance. Including: Message publish-subscribe mode: Each module in the system (such as model service, preprocessing node, feedback processing node) can publish and subscribe to related messages. When a module generates a message, it is published to the queue, and all subscribers (related modules or services) can receive these messages immediately, ensuring real-time delivery of messages.

[0235] High availability and redundancy mechanisms: Message queue systems usually have high availability and redundancy mechanisms to ensure that messages are not lost in the event of network failure or service downtime.

[0236] b. WebSocket real-time two-way communication: For scenarios that interact with users (such as the front end of an AI-assisted trial system), real-time two-way communication can be achieved through WebSocket. WebSocket can maintain a long connection between the server and the client, allowing the server to actively push messages to the client, providing faster message delivery, such as the following scenarios: Real-time push of task progress: For example, when a user initiates a case analysis task, the system can provide real-time feedback to the user on the progress of task execution (such as status updates of document generation) through a WebSocket connection.

[0237] Instant notifications and reminders: When document generation is completed or case information processing is completed, the system can immediately notify the front-end or user end through WebSocket, without the client needing to poll the server to obtain the status.

[0238] c. Efficient inter-service communication based on gRPC: In real-time communication between services, gRPC (Google Remote Procedure Call) is a commonly used and efficient communication protocol. gRPC supports multiplexed, low-latency inter-service calls through the HTTP / 2 protocol, which is particularly suitable for real-time messaging within the system.

[0239] Efficient binary transmission: gRPC uses Protocol Buffers for serialization and can transmit data in binary form, greatly improving the speed and efficiency of communication.

[0240] Bidirectional streaming communication: gRPC supports bidirectional streaming communication, which means that services can continuously exchange information in the same connection, making it suitable for real-time communication service scenarios.

[0241] "Global" in this context has two meanings: a. System global: "Global" refers to all modules and services within the system, which means that each component, service, and model instance within the system can participate in the real-time communication network and communicate with each other instantly. Information can be transmitted across services and modules and is not limited to a specific service or module.

[0242] Real-time coordination between modules: For example, the document generation module (i.e., calling the AI-assisted trial system provided in the embodiment of the present disclosure to generate documents), the case analysis module (i.e., calling the AI-assisted trial system provided in the embodiment of the present disclosure to analyze cases), and the feedback information processing node all exchange information with each other through the global real-time communication service to coordinate task status.

[0243] Seamless service connection: Different services, such as generative model services and deep learning model services, can also interact through real-time communication services. For example, the classification results of a text classification model can be immediately passed to a generative model service to generate personalized legal documents.

[0244] In an exemplary embodiment, the global real-time communication service 160 includes a real-time communication service for enabling interaction between the deep learning model 132 and the generative model 133 .

[0245] b. Global across scenarios: Global also means that the communication service can support unified messaging and synchronization across multiple business scenarios, not limited to a specific business process. Whether it is real-time case analysis, batch document generation, or even historical case data archiving, all these tasks can be messaged and synchronized through the same set of global real-time communication services.

[0246] Support for multiple business scenarios: The scope of real-time communication services is not limited to case processing, but also includes multiple business modules such as data archiving and user management, ensuring that all scenarios in the system can receive relevant notifications and messages.

[0247] In the embodiment of the present disclosure, the role of the feedback information processing node is to further process the model output to make it meet the requirements of the system or the needs of the user. The specific processing process varies depending on the task type and application scenario. The following is an example: a. Result formatting and structuring: The raw data output by the model may be unprocessed or semi-structured. The feedback information processing node will format or structure these data for easy use by the system or users.

[0248] Text classification result formatting: Convert the output of the text classification model into standardized labels or readable text information. For example, convert the classification result of "classification label 1" into the cause of sale contract dispute that can be understood by the judge.

[0249] Formatting entity extraction results: Structuring the entities and their types output by the entity extraction model, such as converting them into JSON format, to facilitate subsequent system calls or displays. Fig. 9 It is a schematic diagram of the formatting of entity extraction results provided by an embodiment of the present disclosure.

[0250] b. Error handling and correction: Model output may sometimes contain erroneous or incomplete information, and the feedback information processing node needs to correct or filter these results. Common processing includes: Confidence screening: For text classification or entity extraction models, if the confidence of an output is lower than the set threshold, the feedback information processing node will discard or mark the result to prevent erroneous information from affecting subsequent processing.

[0251] Post-processing of generated text: Generative models may sometimes output lengthy or repetitive text. The feedback information processing node will trim, deduplicate, or semantically adjust the text according to the rules.

[0252] For example, for the judgment documents output by the generative model, the feedback information processing node may check whether the legal provisions are invalid to ensure that the generated document complies with the specifications of the legal document.

[0253] c. Logging and traceability: The feedback information processing node may also log the results of each model inference for subsequent tracking and debugging. The log content includes: model input, model output, processed output, generation time, etc.

[0254] Fig.10 : is a flow chart of an artificial intelligence assisted trial method provided by an embodiment of the present disclosure. Fig. 9 As shown, the method provided by the embodiment of the present disclosure may include the following steps.

[0255] In S110 , case information and business scenario information of the task are obtained.

[0256] In S120, task configuration parameters of the task are acquired according to the business scenario information.

[0257] In S130, the model instance running status information is obtained.

[0258] In S140, the case information of the task and the input text vector of the task configuration parameters are obtained, and the model capability vectors of different types of service models are obtained.

[0259] In S150, the matching degree between the task and different types of service models is obtained according to the input text vector and the model capability vector.

[0260] In S160, based on the matching degree and the model instance running status information, the case information of the task and the task configuration parameters are distributed to the corresponding model instance of the corresponding type of service model for processing to obtain the reasoning result of the task to assist in the trial of the corresponding case.

[0261] Fig.10 The other contents of the embodiment can be referred to the other embodiments above, which will not be described in detail here. The following two practical application scenarios are used to illustrate the operation of the AI-assisted trial system and method provided in the above embodiment.

[0262] Scenario 1, generating the focus of dispute: The focus of dispute module (i.e., generating the focus of dispute of the case by calling the above-mentioned AI-assisted trial system) clearly sorts out the focus of dispute of the case by deeply and meticulously comparing the prosecution opinions, defense opinions and court debate contents of the parties involved in the case. The user clicks the "Join Generation Queue" button (i.e., the task trigger control for generating the focus of dispute) in the "Case Analysis-Trial Points" module of the front-end artificial intelligence-assisted trial interface to send a request for the task of generating the focus of dispute. Specifically, it may include the following execution steps: 1. Request reception and analysis: The Intelligent-SDK service receives the request and analyzes the required input content, such as prosecution opinions, defense opinions, and court transcripts (if any). The Intelligent-SDK service requests these case element information from the elementization module.

[0263] 2. Generate input content: After obtaining the required case element information, the Intelligent-SDK service assembles the case element information content into a request body and sends it to the preprocessor. The preprocessor obtains the prompt word template for generating the focus of dispute and the relevant task configuration from the configuration of the prompt word manager as task configuration parameters, and then combines the case element information content with the prompt word template to form a complete input content (i.e., model input data).

[0264] 3. Task queue and allocation: The preprocessor composes a new request body with the input content (i.e., case information) and task configuration parameters according to the proto protocol, and passes the request to the real-time model priority queue according to the task configuration parameters. After the scheduler obtains the task from the real-time model priority queue, it sends the task to the first coordinator through the unified standard model service gateway according to the task configuration parameters. The first coordinator uses the minimum connection load algorithm (i.e., the minimum connection algorithm) to allocate tasks to idle model instances.

[0265] 4. Model processing and feedback: After the model instance completes the task, it returns the result to the scheduler through the unified standard model service gateway. The scheduler sends the result to the feedback information processing node for post-processing to generate the final result.

[0266] 5. Result display: The result is returned to the Intelligent-SDK service through the global message queue service. The Intelligent-SDK service displays the result on the front-end page for the judge to view.

[0267] Scenario 2: Generate and identify facts: The fact determination module (i.e., determining the facts of the case by calling the above-mentioned AI-assisted trial system) collects and organizes case materials, conducts a preliminary review of the case facts, and provides users with a clear case fact framework to facilitate subsequent in-depth review and adjustment. The specific process is as follows: 1. Request reception and material collection: The user initiates a request to generate a fact finding in the fact finding module of the front-end AI-assisted trial interface (i.e. triggers the corresponding task trigger control). The Intelligent-SDK service receives the request and analyzes and generates the required basic materials, including the complaint, evidence materials, cross-examination opinions, and trial transcripts. The Intelligent-SDK service obtains and summarizes these basic materials from the elementization module as case information.

[0268] 2. Information sorting and integration: The Intelligent-SDK service organizes the collected materials into structured input content and sends it to the preprocessor. The preprocessor obtains the prompt word template and related task configuration required for fact identification generation as task configuration parameters based on the configuration of the prompt word manager, and combines the case element information and prompt word template into complete input content.

[0269] 3. Task queue and distribution: The preprocessor forms a request body with the input content and task configuration parameters according to the proto protocol, and passes the request to the asynchronous model priority queue according to the task configuration parameters. The scheduler extracts tasks from the asynchronous model priority queue and sends them to the second coordinator through the unified standard model service gateway. The second coordinator selects idle model instances according to the load and assigns tasks.

[0270] 4. Model processing and preliminary fact generation: The model instance generates a preliminary fact framework of the case based on the input content, and returns the result to the scheduler through the unified standard model service gateway. The scheduler sends the result to the feedback information processing node for post-processing to ensure that the output meets the requirements.

[0271] 5. Results presentation and further adjustment: The generated preliminary factual framework is returned to the Intelligent-SDK service through the global message queue service, and the results are displayed on the front-end page for user reference. Users can review, check and adjust the generated factual framework based on their professional knowledge to form the final complete case factual content.

[0272] In any of the above embodiments, when the front end interacts with the scene application layer, and when the Intelligent-SDK service interacts with the preprocessor, it can be implemented through the http (Hypertext Transfer Protocol) protocol, and the present disclosure does not limit this.

[0273] It should be noted that in the technical solution of the present disclosure, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.

[0274] Fig.11 This is a network architecture diagram for implementing an artificial intelligence-assisted trial system provided by the embodiment of the present disclosure. Fig.11 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present disclosure.

[0275] like Fig.11 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0276] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. For example, the terminal device serves as the front end 140 in the above-mentioned AI-assisted trial system, and the scenario application layer 110, the model application layer 120, and the model service layer 130 are implemented through server 105. Among them, terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptops, desktop computers, wearable devices, virtual reality devices, smart homes, etc.

[0277] It is understandable that the terminal mentioned in the embodiments of the present disclosure may be a computer device, and the computer device in the embodiments of the present disclosure includes but is not limited to a terminal or a server. In other words, the computer device may be a server or a terminal, or a system consisting of a server and a terminal. Among them, the terminal mentioned above may be an electronic device, including but not limited to a mobile phone, a tablet computer, a desktop computer, a laptop computer, a PDA, a vehicle-mounted device, an augmented reality / virtual reality (AR / VR) device, a helmet display, a smart TV, a wearable device, a smart speaker, a digital camera, a camera, and other mobile Internet devices (mobile internet device, MID) with network access capabilities, or terminals in scenarios such as trains, ships, and flights.

[0278] The server 105 may be a server that provides various services, such as a background management server that provides support for devices operated by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received request data, and feed back the processing results to the terminal device.

[0279] The server can be an independent physical server or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as basic cloud computing services such as big data and artificial intelligence platforms, etc. The present disclosure does not impose any restrictions on this.

[0280] It should be understood that Fig.11 The number of terminal devices, networks and servers in the figure is only for illustration. The server 105 may be a physical server or may be composed of multiple servers. According to actual needs, it may have any number of terminal devices, networks and servers.

[0281] Optionally, the data involved in the embodiments of the present disclosure may be stored in a computer device, or the data may be stored based on cloud storage technology, which is not limited here.

[0282] Fig.12 Schematic diagram of a computer device provided by an embodiment of the present disclosure. Fig.12 , Fig.12 Schematic diagram of a computer device provided by an embodiment of the present disclosure. Fig.12As shown, the computer device in the embodiment of the present disclosure may include: one or more processors 1201, a memory 1202, and an input-output interface 1203. The processor 1201, the memory 1202, and the input-output interface 1203 are connected via a bus 1204. The memory 1202 is used to store a computer program, which includes program instructions. The input-output interface 1203 is used to receive data and output data, such as for data interaction between a host machine and a computer device, or for data interaction between various virtual machines in a host machine; the processor 1201 is used to execute the program instructions stored in the memory 1202. Among them, the processor 1201 can execute each step of the method shown in any of the above embodiments.

[0283] The embodiments of the present disclosure provide a computer device, including a processor, an input / output interface, and a memory. The processor obtains a computer program in the memory to execute each step of the method shown in any of the above embodiments.

[0284] The embodiments of the present disclosure also provide a computer-readable storage medium, which stores a computer program, and the computer program is suitable for being loaded by the processor and executing the artificial intelligence assisted trial system provided by each step in any of the above embodiments. For details, please refer to the implementation method provided by each step in any of the above embodiments, which will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in the present disclosure, please refer to the description of the method embodiment of the present disclosure. As an example, the computer program can be deployed to be executed on one computer device, or on multiple computer devices located in one location, or on multiple computer devices distributed in multiple locations and interconnected by a communication network.

[0285] The present disclosure also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in any of the above-mentioned optional modes.

Claims

1. An artificial intelligence assisted trial system, characterized in that: include: The scenario application layer is used to obtain task case information and business scenario information; The model application layer is used to obtain case information and business scenario information of the task from the scenario application layer, and obtain task configuration parameters of the task according to the business scenario information; A model service layer, in which different types of service models are configured, and the same type of service model runs at least one model instance, the model service layer is used to obtain model instance running status information, and obtain the case information of the task and the task configuration parameters from the model application layer; obtain the input text vector of the case information of the task and the task configuration parameters, and obtain the model capability vector of different types of service models; obtain the matching degree between the task and different types of service models based on the input text vector and the model capability vector; distribute the case information of the task and the task configuration parameters to the corresponding model instance of the corresponding type of service model for processing based on the matching degree and the model instance running status information, and obtain the reasoning result of the task to assist in the trial of the corresponding case.

2. The system according to claim 1, characterized in that When the task includes a question, the system is further used to: convert the question into a question vector; obtain a legal text vector of laws, regulations and / or cases; calculate the semantic similarity between the question vector and the legal text vector; use the laws, regulations and / or cases, and the question as graph nodes, obtain the edge weights between the graph nodes according to the semantic similarity between the graph nodes and the preset logical relationship of the trial ideas, use the question as the starting node, and find the reasoning chain through graph search; obtain the credibility of the reasoning chain; According to the semantic similarity between the question vector and the legal text vector, and the credibility of the reasoning chain, a priority index of the candidate legal text is obtained; and according to the priority index, the laws, regulations and / or cases corresponding to the question are determined.

3. The system according to claim 1, characterized in that The model application layer includes a preprocessor, a prompt word manager, an asynchronous model priority queue, a real-time model priority queue and a scheduler; wherein, The preprocessor is used to obtain the case information and business scenario information of the task from the scenario application layer, and send the business scenario information to the prompt word manager; The prompt word manager is used to receive the business scenario information, determine the model identification, task priority and timeliness configuration corresponding to the business scenario information according to the business scenario information, and send the determined model identification, task priority and timeliness configuration to the preprocessor, wherein the task configuration parameters include the model identification, task priority and timeliness configuration; The preprocessor is further used to push the task to the asynchronous model priority queue or the real-time model priority queue according to the task priority and timeliness configuration; The scheduler is used to obtain the task from the real-time model priority queue and / or the asynchronous model priority queue, and send the case information of the task and the task configuration parameters to the model service layer.

4. The system according to claim 3, characterized in that The model service layer includes a unified standard model service gateway; The scheduler is also used to obtain the task from the real-time model priority queue and / or the asynchronous model priority queue, use the case information as model input data, and encapsulate the model input data and the task configuration parameters into a remote procedure call request packet, and pass the remote procedure call request packet to the unified standard model service gateway through the remote procedure call protocol.

5. The system according to claim 3, characterized in that When the type of the service model determined according to the matching degree is a generative model, the prompt word manager is further used to provide the preprocessor with a prompt word template corresponding to the business scenario information and a model reasoning configuration option of the generative model, wherein the model reasoning configuration option includes a generated content length limit and / or a randomness control parameter; The scheduler is also used to send the prompt word template of the task and the model reasoning configuration options to the model service layer; The task configuration parameters also include the prompt word template and the model reasoning configuration options.

6. The system according to claim 5, characterized in that The model service layer includes a unified standard model service gateway; The scheduler is also used to obtain the task from the real-time model priority queue and / or the asynchronous model priority queue, use the case information, the prompt word template and the model reasoning configuration options as model input data, and encapsulate the model input data into a remote procedure call request packet, and pass the remote procedure call request packet to the unified standard model service gateway through the remote procedure call protocol.

7. The system according to claim 3, characterized in that The model service layer includes a unified standard model service gateway, and a deep learning model and a generative model are deployed in the model service layer, and each deep learning model and each generative model runs at least one model instance in the model service layer; The unified standard model service gateway is used to receive the case information of the task and the task configuration parameters from the scheduler, and obtain the running status information of the model instance; Obtain the case information of the task and the input text vector of the task configuration parameters, and obtain the model capability vectors of different types of service models; obtain the matching degree between the task and different types of service models according to the input text vector and the model capability vector; determine to adopt the corresponding deep learning model or generative model according to the matching degree; determine the corresponding model instance from the determined deep learning model or generative model according to the model instance running state information; distribute the case information of the task and the task configuration parameters to the corresponding model instance in the determined deep learning model or generative model for processing; The corresponding model instance in the determined deep learning model or generative model is used to process the case information according to the task configuration parameters, obtain the reasoning result of the task, and return the reasoning result to the unified standard model service gateway; The unified standard model service gateway is also used to encapsulate the inference result into a response and return it to the scheduler.

8. The system according to claim 7, characterized in that The task configuration parameters also include the maximum response time of the task; The unified standard model service gateway is also used to determine the remaining execution time and deadline of the task based on the maximum response time of the task; determine the comprehensive priority of the task based on the task priority, remaining execution time and deadline of the task; within the current scheduling cycle, select the corresponding model instance of the task in the determined deep learning model or generative model for processing according to the comprehensive priority of the task.

9. The system according to claim 7, characterized in that When the type of the service model determined according to the matching degree is a generative model, the task configuration parameters further include a prompt word template and the model reasoning configuration options; the model service layer further includes a first coordinator; The first coordinator is used to obtain the case information of the task, the matching degree, the prompt word template and the model reasoning configuration option from the unified standard model service gateway; Obtaining the model instance running status information corresponding to the generative model; determining to adopt the corresponding generative model according to the matching degree; determining the corresponding model instance from the determined generative model according to the model instance running status information corresponding to the determined generative model; distributing the case information of the task, the prompt word template and the model reasoning configuration options to the corresponding model instance in the determined generative model for processing, obtaining the reasoning result, and returning the reasoning result to the unified standard model service gateway.

10. The system according to claim 7, characterized in that When the type of the service model determined according to the matching degree is a generative model, the task configuration parameters further include a prompt word template and the model reasoning configuration options; wherein the generative model includes one or more of the following models: A summary model, used for generating a summary based on the case information, the prompt word template and the model reasoning configuration options; The first type of reasoning model is used to process the case information, the prompt word template and the model reasoning configuration options, perform legal reasoning and generate text; The second type of reasoning model is used to process the case information, the prompt word template and the model reasoning configuration options to generate legal documents.

11. The system according to claim 7 or 9, characterized in that The model service layer also includes a second coordinator; The second coordinator is used to obtain the case information and the matching degree of the task from the unified standard model service gateway; obtain the model instance running status information corresponding to the deep learning model; determine the corresponding deep learning model according to the matching degree; determine the corresponding model instance from the model instances of the determined deep learning model according to the model instance running status information corresponding to the determined deep learning model; distribute the case information of the task to the corresponding model instance in the determined deep learning model for processing, obtain the reasoning result, and return the reasoning result to the unified standard model service gateway.

12. The system according to claim 7, characterized in that The deep learning model includes one or more of the following models: A detection model, used for detecting image information in the case information; A text classification model, including a case classification model, wherein the case classification model is used to process the case information and determine the case category of the case; The entity extraction model is used to extract entity information from the case information.

13. The system according to claim 7, characterized in that Also includes: A real-time communication service is used to implement interaction between the deep learning model and the generative model.

14. The system of claim 1, wherein: Also includes: A front end, for displaying an AI-assisted trial interface, wherein the AI-assisted trial interface includes a task trigger control, and in response to a trigger operation on a corresponding task trigger control, sends a request for the task to the scenario application layer, wherein the request includes a case identifier and request parameters; The scenario application layer is used to determine the business scenario identifier according to the request parameter, and obtain corresponding case information according to the business scenario identifier and the case identifier, wherein the business scenario information includes the business scenario identifier.

15. The system of claim 14, wherein: The scenario application layer includes a case filing module, a middle platform module, an elementization module and an intelligent software development toolkit; The case filing module is used to receive case materials and perform structured processing on the case materials to obtain structured case data; The elementization module is used to obtain the case materials from the case filing module, extract elements from the case materials, and obtain case element information; The middle platform module is used to receive the request from the front end and send the request to the intelligent software development toolkit; The intelligent software development toolkit is used to determine the business scenario identifier according to the request parameter, obtain corresponding case data from the case filing module according to the business scenario identifier and the case identifier, and / or obtain corresponding case element information from the elementization module; and sending the obtained case data and / or case element information to the model application layer; The case information includes the case data and / or the case element information.

16. An artificial intelligence assisted trial method, characterized in that: include: Obtain task case information and business scenario information; Acquire task configuration parameters of the task according to the business scenario information; Get the model instance running status information; Obtaining case information of the task and input text vectors of configuration parameters of the task, and obtaining model capability vectors of different types of service models; Obtaining a matching degree between the task and different types of service models according to the input text vector and the model capability vector; According to the matching degree and the running status information of the model instance, the case information of the task and the task configuration parameters are distributed to the corresponding model instance of the corresponding type of service model for processing to obtain the reasoning result of the task to assist in the trial of the corresponding case.

17. A computer device, characterized in that: Includes processor, memory, input and output interfaces; The processor is connected to the memory and the input / output interface respectively, wherein the input / output interface is used to receive and output data, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method of claim 16.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method of claim 16 .

19. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to claim 16 is implemented.

Citation Information

Patent Citations

  • court case intelligent case division auxiliary method and system

    CN109872052A

  • Law case deep reasoning method and system

    CN118861197A

  • Data analysis method and device based on large model and nonvolatile storage medium

    CN119004026A

  • Interactive semantic document mapping and navigation with meaning-based features

    US20240338393A1

Cited By

  • Large model business indicator monitoring method, device and storage medium

    CN119759700A

  • Data synchronization method and device of server

    CN120091024A

  • Data processing method and device

    CN121166619A

  • Self-adaptive process auxiliary case handling method and system and electronic equipment

    CN121235877A