Data calculation method and device for legal cases, computer readable medium and electronic device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN DIBO ENTERPRISE RISK MANAGEMENT TECH CO LTD
- Filing Date
- 2026-05-27
- Publication Date
- 2026-08-07
AI Technical Summary
这不仅对人员的经验要求较高,而且效率较低,成本较高,数据计算的准确性也无法保证
[0015]根据本申请实施例的一个方面,提供了一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中,计算机设备的处理器从所述计算机可读存储介质读取所述计算机指令,所述处理器执行所述计算机指令,使得所述计算机设备执行如上述实施例中所述的法律案件的数据计算方法。
Smart Images

Figure CN122262083B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information processing technology, and more specifically, to a data calculation method, apparatus, computer-readable medium, and electronic device for legal cases. Background Technology
[0002] Currently, data calculations in legal cases are typically performed manually by legal professionals, which usually requires specialized industry knowledge. This not only demands a high level of experience from personnel but is also inefficient, costly, and cannot guarantee the accuracy of the data calculations. Summary of the Invention
[0003] The embodiments of this application provide a data calculation method, apparatus, computer-readable medium, and electronic device for legal cases, which can at least to some extent help users to efficiently, quickly, and accurately calculate the data required in legal cases, thereby improving work efficiency.
[0004] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0005] According to one aspect of the embodiments of this application, a data calculation method for legal cases is provided. The method includes: obtaining a data extraction configuration file and a calculation rule configuration file, wherein the data extraction configuration file defines the types of structured conceptual data to be extracted, and the calculation rule configuration file defines calculation rules; based on the data extraction configuration file, calling a large language model to extract data from the target legal case materials to obtain structured conceptual data related to data calculation; and based on the structured conceptual data, performing numerical calculations according to the calculation rule configuration file to obtain a final calculation result.
[0006] According to one aspect of the embodiments of this application, a data calculation apparatus for legal cases is provided. The apparatus includes: a file acquisition unit, configured to acquire a data extraction configuration file and a calculation rule configuration file, wherein the data extraction configuration file defines the types of structured conceptual data to be extracted, and the calculation rule configuration file defines calculation rules; a data extraction unit, configured to extract data from target legal case materials by calling a large language model based on the data extraction configuration file to obtain structured conceptual data related to data calculation; and a numerical calculation unit, configured to perform numerical calculations based on the structured conceptual data and according to the calculation rule configuration file to obtain a final calculation result.
[0007] In some embodiments of this application, based on the foregoing scheme, the document acquisition unit is configured to: acquire the target case type to which the target legal case materials belong; and acquire the data extraction configuration file and calculation rule configuration file corresponding to the target case type.
[0008] In some embodiments of this application, based on the foregoing scheme, the data extraction configuration file includes fields corresponding to the structured conceptual data to be extracted and natural language prompt templates corresponding to the structured conceptual data to be extracted; the data extraction unit is configured to: input each natural language prompt template in the data extraction configuration file and the target legal case materials into a large language model to obtain structured conceptual data corresponding to each natural language prompt template; for each natural language prompt template, assign the structured conceptual data corresponding to the natural language prompt template to the field corresponding to the structured conceptual data.
[0009] In some embodiments of this application, based on the foregoing scheme, the data extraction configuration file includes a sequence of calculation rules, which includes multiple ordered calculation rules; the numerical calculation unit is configured to: perform numerical calculations sequentially according to each calculation rule in the sequence of calculation rules in the configuration file based on the structured concept data, to obtain at least one intermediate result and a final calculation result; wherein, each time numerical calculation is performed based on a calculation rule, the numerical calculation is performed based on at least one of the following: the structured concept data, and the intermediate result that has already been calculated.
[0010] In some embodiments of this application, based on the foregoing scheme, the device further includes a data display unit and a recalculation unit; after obtaining the final calculation result, the data display unit is used to: display the structured concept data and / or the at least one intermediate result on a visualization page; the recalculation unit is used to: when a correction instruction for the structured concept data and / or the at least one intermediate result is received through the visualization page, re-execute the numerical calculation affected by the correction instruction based on the corrected data obtained according to the correction instruction.
[0011] In some embodiments of this application, based on the foregoing scheme, the device further includes a trajectory generation unit and a report construction and output unit; after receiving a correction instruction for the structured conceptual data and / or the at least one intermediate result through the visualization page, the trajectory generation unit is configured to: generate an audit trajectory according to the correction instruction, the audit trajectory including data before correction, data after correction, and at least one of the following: operator identity, timestamp; the report construction and output unit is configured to: construct an audit report according to the audit trajectory, and output the audit report.
[0012] In some embodiments of this application, based on the foregoing scheme, the device further includes an information display unit; after numerical calculations are performed sequentially according to each calculation rule in the calculation rule sequence of the calculation rule configuration file based on the structured concept data, the information display unit is used to: display the calculation process through a visualization page, and display a reference entry for the source material of the structured concept data used in the calculation process on the visualization page.
[0013] According to one aspect of the embodiments of this application, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the data calculation method for legal cases as described in the above embodiments.
[0014] According to one aspect of the embodiments of this application, an electronic device is provided, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the data calculation method for legal cases as described in the above embodiments.
[0015] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium, a processor of a computer device reading the computer instructions from the computer-readable storage medium, and the processor executing the computer instructions, causing the computer device to perform the data calculation method for legal cases as described in the above embodiments.
[0016] In some embodiments of this application, after obtaining a data extraction configuration file that defines the types of structured conceptual data to be extracted and a calculation rule configuration file that defines the calculation rules, the system first uses a large language model to extract data from the target legal case materials based on the data extraction configuration file to obtain structured conceptual data related to data calculation. Then, based on the structured conceptual data, numerical calculations are performed according to the calculation rule configuration file to obtain the final calculation result. Therefore, this application realizes automatic calculation of data in legal cases, improves calculation efficiency and personnel efficiency, lowers the threshold for data calculation in legal cases and the experience requirements for personnel, and reduces labor costs. Moreover, since the entire calculation process is based on pre-configured data extraction configuration files and calculation rule configuration files, it reduces model output illusion and improves the accuracy of data calculation. In addition, since the data extraction configuration files and calculation rule configuration files can be customized by users, different data extraction configuration files and calculation rule configuration files can be used for different types of cases, thus improving the flexibility and universality of the system.
[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0019] Figure 1 A flowchart illustrating a data calculation method for legal cases according to an embodiment of this application is shown.
[0020] Figure 2 An embodiment according to this application is shown. Figure 1 A flowchart detailing step 110 in the embodiment.
[0021] Figure 3 An embodiment according to this application is shown. Figure 1 A flowchart detailing step 120 in the embodiment.
[0022] Figure 4 A block diagram of a data computing apparatus for legal cases according to an embodiment of this application is shown.
[0023] Figure 5 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation
[0024] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0025] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0026] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0027] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0028] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0029] This application first provides a method for calculating data in legal cases. This method can provide services to users in the legal profession, such as judges, judicial assistants, lawyers, and paralegals.
[0030] Therefore, the solutions in this application can be applied to terminals or servers. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein.
[0031] The implementation details of the technical solutions in the embodiments of this application are described in detail below:
[0032] Figure 1A flowchart illustrating a data calculation method for legal cases according to an embodiment of this application is shown. This data calculation method for legal cases can be executed by various devices with processing and computing capabilities. Specifically, it can be executed by a target device, such as a user terminal or a cloud server. User terminals include, but are not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, in-vehicle terminals, aircraft, smartwatches, etc. Please refer to... Figure 1 As shown, the data calculation method for this legal case may include at least the following steps: In step 110, a data extraction configuration file and a calculation rule configuration file are obtained. The data extraction configuration file defines the types of structured conceptual data to be extracted, and the calculation rule configuration file defines the calculation rules.
[0033] The data extraction configuration file can include the fields corresponding to the structured conceptual data to be extracted. The type of structured conceptual data to be extracted can be defined by the fields corresponding to the structured conceptual data to be extracted. When performing calculations on legally related data, the fields corresponding to the structured conceptual data to be extracted are the legal concept fields.
[0034] The calculation rules in the calculation rule configuration file can be calculation formulas, which can be written in Chinese or in other languages such as English.
[0035] For example, the calculation rules in the calculation rule configuration file can be calculation rules related to labor remuneration in labor arbitration cases. These calculation rules can be defined in accordance with laws and regulations such as the Labor Law and the Labor Contract Law.
[0036] Specifically, if it is necessary to calculate the wages that a company needs to pay to employees for normal working hours, the calculation rules (formulas) involved may include: Full-month normal working hours wage = monthly base salary × number of months worked; Wage for normal working hours in a non-complete month = daily wage base × number of working days; Normal working hours wage = Normal working hours wage for a full month + Normal working hours wage for a partial month; The amount of back pay should be equal to the normal working hours pay minus the pay already received.
[0037] Of course, the following detailed calculation rules (calculation formulas) can also be included: Daily wage base = MAX (monthly wage base, local minimum monthly wage standard) / legally required number of working days; Working days = actual number of working days; Wages paid = total amount actually paid from bank statements.
[0038] The data extraction configuration file and / or calculation rule configuration file can be pre-configured by the system developers, or the system can provide a custom configuration page through which users can customize the data extraction configuration file and / or calculation rule configuration file. In other words, the data extraction configuration file and calculation rule configuration file can be customized and modified by the user.
[0039] Figure 2 An embodiment according to this application is shown. Figure 1 A flowchart detailing step 110 in the embodiment is provided. Please refer to [link / reference]. Figure 2 As shown, obtaining the data extraction configuration file and calculation rule configuration file may include the following steps: In step 111, the target case type to which the target legal case materials belong is obtained.
[0040] The target case type to which the target legal case materials belong can be user-defined or obtained by analyzing the target legal case materials using a large model. When the target case type is user-defined, a page can be provided allowing users to enter the case type via a text input box; alternatively, a page can be provided that includes a drop-down list with multiple case type options, allowing users to define the target case type by selecting the option corresponding to the target case type from the drop-down list.
[0041] The target legal case materials may include one or more legal case materials.
[0042] Before obtaining the target case type to which the target legal case materials belong, the target legal case materials themselves can be obtained first. A pre-defined mapping table between case identifiers and case types for each legal case material can be set up. Alternatively, the case identifier of the target legal case material can be obtained first, and then the target case type corresponding to that case identifier can be retrieved from the mapping table. The case identifier of the target legal case material can be entered by the user through a front-end visual page. After the user enters the case identifier, when the submit or query control on the visual page is triggered, the back-end service can receive a query request containing the case identifier of the target legal case material.
[0043] In step 112, the data extraction configuration file and calculation rule configuration file corresponding to the target case type are obtained.
[0044] The data extraction configuration file and / or calculation rule configuration file can include the corresponding case type (such as the target case type). Different data extraction configuration files and calculation rule configuration files can be pre-set for different case types; the data extraction configuration file and calculation rule configuration file corresponding to the target case type can be loaded based on the target case type. The target case type could be, for example, a labor arbitration case, a labor remuneration case, a labor dispute case, or a labor contract dispute.
[0045] When it is necessary to calculate the back wages payable in a labor dispute case, an example of the content of the corresponding calculation rule configuration file can be: { "formula_sequence": [ "full_month_wage = monthly_base_salary × work_months_full", "daily_base = MAX(monthly_base_salary, local_min_monthly_wage) / statutory_attendance_days", "partial_month_wage = daily_base ×work_days_partial", "total_normal_wage = full_month_wage + partial_month_wage", "arrears = total_normal_wage - salary_paid" ], "output_fields": [ "arrears", "total_normal_wage", "daily_base ] }
[0046] The calculation rule configuration file can define multi-step calculation logic in the form of an ordered formula list, supporting mathematical operations, conditional judgments, and built-in functions (such as MAX and MIN).
[0047] In step 120, based on the data extraction configuration file, the large language model is invoked to extract data from the target legal case materials to obtain structured conceptual data related to data calculation.
[0048] Large language models can be models with more than one billion parameters and can be multimodal models.
[0049] The target legal case materials can be case files related to the legal case. These materials may include one or more legal case materials. When the target legal case materials include materials from multiple legal cases, multiple large language models can be used to extract data from each case material in parallel to improve extraction efficiency.
[0050] The data extraction configuration file and target legal case materials can be input into the large language model, and the large language model can be called to parse the target legal case materials and extract the structured conceptual data related to data calculation.
[0051] Structured conceptual data related to data computation can be data related to monetary calculations in legal cases.
[0052] In one embodiment of this application, the data extraction configuration file also includes a natural language prompt template corresponding to the structured conceptual data to be extracted.
[0053] The natural language prompt template corresponding to the structured conceptual data to be extracted is the natural language prompt template corresponding to the field.
[0054] When it is necessary to calculate the back wages payable in a labor dispute case, an example of the content of the corresponding data extraction configuration file can be: { "fields": [ { "name": "monthly_base_salary", "source_docs": [ "employment_contract", "payroll_records" ], "prompt": "Extract the agreed monthly salary base (yuan)" }, { "name": "work_months_full", "source_docs": [ "attendance_record" ], "prompt": "Extracts the complete number of working months" }, { "name": "work_days_partial", "source_docs": [ "attendance_record" ], "prompt": "Extract the actual number of days worked in incomplete months" }, { "name": "salary_paid", "source_docs": [ "bank_statement", "payroll_records" ], "prompt": "Retrieve the total wages already paid by the employer (in yuan)" }, { "name": "local_min_monthly_wage", "source_docs": [ "government_notice" ], "prompt": "Retrieves the latest published monthly minimum wage standard (in yuan) in the jurisdiction where the case is being heard." }, { "name": "statutory_attendance_days", "value": 21.75 / / Statutory monthly working days, configurable ] }
[0055] Here, "name" refers to the field name. For example, "monthly_base_salary" refers to the monthly salary base number field corresponding to the structured conceptual data of monthly salary base. "prompt" is the natural language prompt template. For example, "extract the agreed monthly salary base (yuan)" can be the natural language prompt template corresponding to the structured conceptual data of monthly salary base.
[0056] The data extraction configuration file can also include preset structured conceptual data, which can include preset fields and their corresponding field values.
[0057] When data calculations are required, they can be performed directly based on preset structured conceptual data without the need to extract the corresponding structured conceptual data. For example, in the data extraction configuration file mentioned above, `statutory_attendance_days` can be a preset field, and 21.75 can be the field value corresponding to that preset field.
[0058] The data extraction configuration file can also include the filenames corresponding to the structured conceptual data to be extracted. The system can extract the structured conceptual data from the target legal case material with the filename corresponding to the structured conceptual data to be extracted. For example, as can be seen in the above data extraction configuration file, the data corresponding to source_docs is the filename, and the structured conceptual data corresponding to the field "work_months_full" can be extracted from the target legal case material with the filename attendance_record.
[0059] Figure 3 An embodiment according to this application is shown. Figure 1 A flowchart detailing step 120 in the embodiment is provided. Please refer to [link / reference]. Figure 3 As shown, based on the data extraction configuration file, a large language model is invoked to extract data from the target legal case materials, obtaining structured conceptual data related to data computation. Specifically, this may include the following steps: In step 121, the natural language prompt templates in the data extraction configuration file and the target legal case materials are input into the large language model to obtain the structured concept data corresponding to each natural language prompt template.
[0060] A thesaurus containing multiple synonyms can be pre-set. When the large model extracts data based on the natural language prompt template, if it cannot find keywords that match the natural language prompt template (keywords consistent with the keywords in the natural language prompt template) in the target legal case materials, it can use the thesaurus to find synonyms of the keywords in the natural language prompt template, and then find the structured concept data corresponding to the synonym in the target legal case materials to ensure the fault tolerance of the system.
[0061] All natural language prompt templates and target legal case materials can be input into the large language model at once. The large language model will then output the structured concept data corresponding to each natural language prompt template, which is the structured concept data corresponding to the fields of each natural language prompt template.
[0062] Each natural language prompt template and the target legal case materials can be combined to form a prompt word, resulting in prompt words corresponding to each natural language prompt template. Then, each prompt word is input into the large language model to obtain structured concept data corresponding to each natural language prompt template generated by the large language model based on each prompt word.
[0063] In step 122, for each natural language prompt template, the structured concept data corresponding to the natural language prompt template is assigned to the field corresponding to the structured concept data.
[0064] For example, in the data extraction configuration file mentioned above, the structured conceptual data obtained from the natural language prompt template "extract the full number of working months" can be assigned to the "work_months_full" field.
[0065] After the assignment is completed, the results can be: monthly_base_salary=4000; work_months_full=6; work_days_partial=10; salary_paid=5000; local_min_monthly_wage=2600.
[0066] In step 130, based on the structured concept data, numerical calculations are performed according to the calculation rule configuration file to obtain the final calculation result.
[0067] Numerical calculations can be performed by calling large language models based on structured conceptual data and computation rule configuration files, or by utilizing code-based computational systems based on structured conceptual data and computation rule configuration files.
[0068] In one embodiment of this application, the data extraction configuration file includes a sequence of calculation rules, which includes multiple ordered calculation rules. The step of performing numerical calculations based on the structured concept data and the configuration file to obtain a final calculation result includes: performing numerical calculations sequentially based on the structured concept data and each calculation rule in the sequence of calculation rules in the configuration file to obtain at least one intermediate result and a final calculation result. Each time a numerical calculation is performed based on a calculation rule, the numerical calculation is performed based on at least one of the following: the structured concept data and the intermediate result that has already been calculated.
[0069] The data extraction configuration file includes a sequence of calculation rules, i.e., a sequence of formulas. To calculate the final result, the formulas must be calculated sequentially according to the order of the formulas in the sequence.
[0070] Each formula in the formula sequence represents a calculation step, and all calculation steps constitute a complete calculation process. The result obtained based on the last calculation step is the final calculation result, and the results obtained based on the other calculation steps are intermediate results.
[0071] For example, the complete calculation process for calculating the back pay based on the formula sequence can be shown in Table 1:
[0072] Table 1 The calculation result 839.10 is the final calculation result, while the calculation results other than 839.10, such as 24,000.00, are intermediate results. When calculating the data corresponding to partial_month_wage, it is necessary to use the intermediate result of 183.91 that has already been calculated.
[0073] Once a calculation step is completed, the calculation process and results can be displayed on a visual page, and after receiving confirmation from the user, the next calculation step can be performed.
[0074] In one embodiment of this application, after performing numerical calculations sequentially according to each calculation rule in the calculation rule sequence of the calculation rule configuration file based on the structured concept data, the method includes: displaying the calculation process through a visualization page, and displaying a reference entry for the source material of the structured concept data used in the calculation process on the visualization page.
[0075] The visualization page can display the thought process of the large model, the content introduction of each step, the calculation formula of each step, and the reference entry of the source material of the structured conceptual data used in the calculation formula.
[0076] The reference entry can be a reference link, which allows users to open the legal case materials containing the corresponding structured concept data with one click. The corresponding structured concept data can be highlighted in bold, underlined, or highlighted in red on the display page of the legal case materials.
[0077] Each time a calculation step is completed, it can be immediately displayed on the visualization page, thus enabling real-time display of the calculation process.
[0078] In one embodiment of this application, the data extraction configuration file may further include a data output field; after obtaining the final calculation result, the method further includes: outputting the data corresponding to the data output field, wherein the data output field includes a field corresponding to the final calculation result and / or at least one intermediate result.
[0079] As mentioned earlier, the `output_fields` field in the calculation rule configuration file refers to the data output fields, which can include, etc. The data corresponding to these fields can be output through methods such as displaying on a webpage or saving to a file.
[0080] In one embodiment of this application, after obtaining the final calculation result, the data calculation method for the legal case further includes: displaying the structured concept data and / or the at least one intermediate result on a visualization page; when a correction instruction for the structured concept data and / or the at least one intermediate result is received through the visualization page, re-executing the numerical calculation affected by the correction instruction based on the corrected data obtained according to the correction instruction.
[0081] Users can trigger correction commands for the structured conceptual data and / or at least one intermediate result through a visual interface. After a user requests a correction, the calculation steps affected by the correction command can be re-executed based on the corrected structured conceptual data and / or at least one intermediate result.
[0082] In this application, the system can provide a visual page that allows users to review, edit, and lock extracted data or intermediate variables; the visual page will call a manual intervention interface to receive user instructions to correct field values, and the system can re-execute the affected subsequent calculation steps based on the corrected data.
[0083] Although in the above embodiments the correction instruction is received after the final calculation result is obtained, as mentioned earlier, the calculation process can be displayed in real time on the visualization page. Therefore, the correction instruction can also be obtained during the calculation process. The correction instruction can include data before correction and data after correction.
[0084] For example, if a user (such as a judicial assistant or lawyer) discovers that the "work days in a partial month" should actually be 12 days (due to 2 days of sick leave not being counted in attendance records), the user can click the edit button on the visual page to bring up a correction panel. This panel allows the user to directly modify the input field `work_days_partial` to 12, or directly overwrite `partial_month_wage` to 2206.92. The user can then click the submit button to trigger the correction. After submission, the system marks the field as "manually corrected" and allows subsequent formulas to be re-executed. The corrected calculation process and result can be: partial_month_wage=183.91×12=2,206.92; total_normal_wage=24,000+2,206.92 =26,206.92; arrays=26,206.92-25,000=1,206.92.
[0085] In one embodiment of this application, after receiving a correction instruction for the structured conceptual data and / or the at least one intermediate result through the visualization interface, the method further includes: generating an audit trail according to the correction instruction, the audit trail including data before correction, data after correction, and at least one of the following: operator identity, timestamp; constructing an audit report according to the audit trail, and outputting the audit report.
[0086] Audit reports can include the calculation process (calculation details). Audit reports can be displayed on a visualization page.
[0087] An example of the final audit trail can be: { "arrears": 1206.92, "audit_trail": [ {"field": "work_days_partial", "auto_value": 10, "corrected_value":12, "corrected_by": "user_001", "timestamp": "2026-01-05T18:20:00"}, {"field": "partial_month_wage", "recalculated": true} ] }
[0088] Among them, work_days_partial is the corrected field, auto_value is the data before correction, corrected_value is the data after correction, corrected_by is the operator's identity, and timestamp is the timestamp; the final calculated result after correction for this audit trajectory is 1,206.92.
[0089] In summary, the solution proposed in this application solves the reliability problem of automated calculation in judicial scenarios by combining automatic extraction, rule calculation, and manual verification in a closed loop. It is particularly suitable for monetary payment cases that require high-precision processing, such as labor remuneration, liquidated damages, and compensation for damages.
[0090] The following describes an embodiment of the apparatus described in this application, which can be used to execute the data calculation method for legal cases described in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the data calculation method for legal cases described in the above applications.
[0091] Figure 4 A block diagram of a data computing apparatus for legal cases according to one embodiment of this application is shown. (Refer to...) Figure 4 As shown, a data calculation apparatus 400 for legal cases according to an embodiment of this application includes: a document acquisition unit 410, a data extraction unit 420, and a numerical calculation unit 430. The document acquisition unit 410 acquires a data extraction configuration file and a calculation rule configuration file. The data extraction configuration file defines the types of structured conceptual data to be extracted, and the calculation rule configuration file defines the calculation rules. The data extraction unit 420, based on the data extraction configuration file, calls a large language model to extract data from the target legal case materials to obtain structured conceptual data related to data calculation. The numerical calculation unit 430, based on the structured conceptual data, performs numerical calculations according to the calculation rule configuration file to obtain the final calculation result.
[0092] In some embodiments of this application, based on the foregoing scheme, the document acquisition unit 410 is configured to: acquire the target case type to which the target legal case materials belong; and acquire the data extraction configuration file and calculation rule configuration file corresponding to the target case type.
[0093] In some embodiments of this application, based on the foregoing scheme, the data extraction configuration file includes fields corresponding to the structured conceptual data to be extracted and natural language prompt templates corresponding to the structured conceptual data to be extracted; the data extraction unit 420 is configured to: input each natural language prompt template in the data extraction configuration file and the target legal case materials into a large language model to obtain structured conceptual data corresponding to each natural language prompt template; for each natural language prompt template, assign the structured conceptual data corresponding to the natural language prompt template to the field corresponding to the structured conceptual data.
[0094] In some embodiments of this application, based on the foregoing scheme, the data extraction configuration file includes a sequence of calculation rules, which includes multiple ordered calculation rules; the numerical calculation unit 430 is configured to: perform numerical calculations sequentially according to each calculation rule in the sequence of calculation rules in the calculation rule configuration file based on the structured concept data, to obtain at least one intermediate result and a final calculation result; wherein, each time numerical calculation is performed based on a calculation rule, numerical calculation is performed based on at least one of the following: the structured concept data, and the intermediate result that has already been calculated.
[0095] In some embodiments of this application, based on the foregoing scheme, the device further includes a data display unit and a recalculation unit; after obtaining the final calculation result, the data display unit is used to: display the structured concept data and / or the at least one intermediate result on a visualization page; the recalculation unit is used to: when a correction instruction for the structured concept data and / or the at least one intermediate result is received through the visualization page, re-execute the numerical calculation affected by the correction instruction based on the corrected data obtained according to the correction instruction.
[0096] In some embodiments of this application, based on the foregoing scheme, the device further includes a trajectory generation unit and a report construction and output unit; after receiving a correction instruction for the structured conceptual data and / or the at least one intermediate result through the visualization page, the trajectory generation unit is configured to: generate an audit trajectory according to the correction instruction, the audit trajectory including data before correction, data after correction, and at least one of the following: operator identity, timestamp; the report construction and output unit is configured to: construct an audit report according to the audit trajectory, and output the audit report.
[0097] In some embodiments of this application, based on the foregoing scheme, the device further includes an information display unit; after numerical calculations are performed sequentially according to each calculation rule in the calculation rule sequence of the calculation rule configuration file based on the structured concept data, the information display unit is used to: display the calculation process through a visualization page, and display a reference entry for the source material of the structured concept data used in the calculation process on the visualization page.
[0098] Figure 5 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown.
[0099] It should be noted that, Figure 5 The computer system 500 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0100] like Figure 5 As shown, the computer system 500 includes a CPU 501, which can perform various appropriate actions and processes according to a program stored in ROM 502 or a program loaded into RAM 503 from storage section 508, such as performing the methods described in the above embodiments. The RAM 503 also stores various programs and data required for system operation. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An I / O interface 505 is also connected to the bus 504.
[0101] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. Removable media 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 510 as needed so that computer programs read from them can be installed into storage section 508 as needed.
[0102] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by CPU 501, it performs various functions defined in the system of this application.
[0103] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0104] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0105] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0106] In one aspect, this application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.
[0107] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0108] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the methods according to the embodiments of this application.
[0109] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0110] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for calculating data in legal cases, characterized in that, The method includes: Obtain a data extraction configuration file and a calculation rule configuration file. The data extraction configuration file defines the type of structured conceptual data to be extracted, and the calculation rule configuration file defines the calculation rules. The data extraction configuration file includes a sequence of calculation rules, which includes multiple ordered calculation rules. The data extraction configuration file includes fields corresponding to the structured conceptual data to be extracted and natural language prompt templates corresponding to the structured conceptual data to be extracted. The natural language prompt templates and target legal case materials in the data extraction configuration file are input into the large language model to obtain the structured concept data corresponding to each natural language prompt template; For each natural language prompt template, the structured concept data corresponding to the natural language prompt template is assigned to the field corresponding to the structured concept data; Based on the structured concept data, numerical calculations are performed sequentially according to each calculation rule in the calculation rule sequence of the calculation rule configuration file to obtain at least one intermediate result and a final calculation result; wherein, each time a numerical calculation is performed based on a calculation rule, the numerical calculation is performed based on at least one of the following: the structured concept data, and the intermediate result that has already been calculated.
2. The data calculation method for legal cases according to claim 1, characterized in that, The data extraction configuration file and calculation rule configuration file are obtained, including: Obtain the target case type to which the materials for the target legal case belong; Obtain the data extraction configuration file and calculation rule configuration file corresponding to the target case type.
3. The data calculation method for legal cases according to claim 1, characterized in that, After obtaining the final calculation result, the method further includes: The structured conceptual data and / or at least one intermediate result are displayed on a visual page. When a correction instruction for the structured conceptual data and / or at least one intermediate result is received through the visualization page, the numerical calculations affected by the correction instruction are re-executed based on the corrected data obtained according to the correction instruction.
4. The data calculation method for legal cases according to claim 3, characterized in that, After receiving a correction instruction for the structured conceptual data and / or the at least one intermediate result via the visualization page, the method further includes: An audit trail is generated based on the correction instruction. The audit trail includes data before correction, data after correction, and at least one of the following: operator identity and timestamp. An audit report is constructed based on the audit trajectory, and the audit report is output.
5. The data calculation method for legal cases according to claim 1, characterized in that, After performing numerical calculations sequentially according to each calculation rule in the calculation rule sequence of the calculation rule configuration file based on the structured conceptual data, the method includes: The calculation process is displayed through a visual page, which also provides access to the source materials of the structured conceptual data used in the calculation process.
6. A data calculation device for legal cases, characterized in that, The device includes: The file acquisition unit is used to acquire a data extraction configuration file and a calculation rule configuration file. The data extraction configuration file defines the type of structured conceptual data to be extracted, and the calculation rule configuration file defines the calculation rules. The data extraction configuration file includes a sequence of calculation rules, which includes multiple ordered calculation rules. The data extraction configuration file includes fields corresponding to the structured conceptual data to be extracted and natural language prompt templates corresponding to the structured conceptual data to be extracted. A data extraction unit is used to extract data from the target legal case materials by calling a large language model based on the data extraction configuration file, thereby obtaining structured conceptual data related to data computation. The data extraction unit is configured to: input each natural language prompt template in the data extraction configuration file and the target legal case materials into the large language model to obtain structured conceptual data corresponding to each natural language prompt template; and assign the structured conceptual data corresponding to each natural language prompt template to the corresponding field of the structured conceptual data for each natural language prompt template. The numerical calculation unit is used to perform numerical calculations based on the structured concept data and according to each calculation rule in the calculation rule sequence of the calculation rule configuration file in sequence, to obtain at least one intermediate result and a final calculation result; wherein, each time numerical calculation is performed based on a calculation rule, the numerical calculation is based on at least one of the following: the structured concept data and the intermediate result that has already been calculated.
7. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the data calculation method for legal cases as described in any one of claims 1 to 5.
8. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the data calculation method for legal cases as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Cost calculation management method and device, electronic equipment, storage medium and product
CN115660880A
Method and system for converting legal documents into structured data using ai
US20240427985A1