Legal instrument auditing method and device and electronic equipment

Through the large language model, the key information of legal documents is extracted and automatic comparison is carried out, which solves the problems of high cost and low efficiency of court manual review, and realizes the efficiency of the consistency review of legal documents and original materials information, ensuring the timeliness of filing procedures .

CN118966993APending Publication Date: 2024-11-15SHENZHEN HAIGUI NETWORK TECH CO LTD

Patent Information

Application Number
CN202410755793.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

During the preparation process for filing, the review of information consistency between legal documents and original materials relies on manual comparisons one by one, resulting in high costs, low accuracy and efficiency, which affects the timeliness of filing procedures.

Method used

A large language model is used to extract key information in legal documents, and automatically compare it with the information in the original related documents based on preset comparison rules to generate audit information to improve the accuracy and efficiency of audits.

Benefits of technology

It realizes automatic review of information consistency between legal documents and original related documents, improves the accuracy and efficiency of the review in court filing preparations, and ensures the timeliness of filing procedures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118966993A_ABST
    Figure CN118966993A_ABST
Patent Text Reader

Abstract

The invention provides a legal instrument auditing method and device and electronic equipment. The legal instrument auditing method comprises the steps that a legal instrument to be audited and original related files and field information corresponding to the legal instrument to be audited are obtained; extracting first key information from the original related file based on the field information, and extracting second key information from the legal document to be audited based on a pre-trained large language model; comparing a first field value, corresponding to the first key information, of each field with a second field value, corresponding to the second key information, of each field based on a preset comparison rule; and generating auditing information of the to-be-audited legal document based on the comparison result of each field. By adopting the method and the device, the accuracy and the efficiency of legal document auditing in the case filing preparation work process of the court can be improved, so that the timeliness of the case filing procedure of the court can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information review, and in particular to a method, device and electronic equipment for reviewing legal documents. Background Art

[0002] When the court is preparing to file a case based on the relevant materials received, the court operator or court staff needs to review the consistency of information between the legal documents and the original materials. The existing technology usually adopts a manual one-by-one review method, which has high labor costs and low accuracy and efficiency, affecting the timeliness of the court's filing procedures. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a legal document review method, device and electronic equipment to improve the accuracy and efficiency of legal document review during the court's case filing preparation work, thereby facilitating the timeliness of the court's case filing procedures.

[0004] In a first aspect, an embodiment of the present invention provides a method for reviewing legal documents, the method comprising: obtaining a legal document to be reviewed and its corresponding original related files and field information; wherein the field information comprises one or more fields; extracting first key information from the original related files based on the field information, and extracting second key information from the legal document to be reviewed based on a pre-trained large language model; wherein the first key information comprises a first field value corresponding to each field, and the second key information comprises a second field value corresponding to each field; comparing the first field value corresponding to each field with the corresponding second field value based on a preset comparison rule; and generating the review information of the legal document to be reviewed based on the comparison results of each field.

[0005] In a second aspect, an embodiment of the present invention further provides a device for reviewing legal documents, the device comprising: an acquisition module, used to obtain the legal document to be reviewed and its corresponding original related files and field information; wherein the field information includes one or more fields; an extraction module, used to extract first key information from the original related files based on the field information, and to extract second key information from the legal document to be reviewed based on a pre-trained large language model; wherein the first key information includes a first field value corresponding to each field, and the second key information includes a second field value corresponding to each field; a comparison module, used to compare the first field value corresponding to each field with its corresponding second field value based on a preset comparison rule; and a generation module, used to generate the review information of the legal document to be reviewed based on the comparison results of each field.

[0006] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the legal document review method described in the first aspect above.

[0007] The embodiments of the present invention provide a method, device and electronic device for reviewing legal documents, which obtain the legal document to be reviewed and its corresponding original related files and field information; extract the first key information from the original related files based on the field information, and extract the second key information from the legal document to be reviewed based on the pre-trained large language model; compare the first field value of each field corresponding to the first key information with its second field value corresponding to the second key information based on the preset comparison rules; and generate the review information of the legal document to be reviewed based on the comparison results of each field. By adopting the above technology, the key information can be automatically extracted and compared using the corresponding legal documents to be reviewed, the original related files and the field information, so as to realize the information consistency review of the legal document to be reviewed and the original related files, which can improve the accuracy and efficiency of the review of legal documents in the process of the court's preparation for filing, thereby facilitating the timeliness of the court's filing procedures.

[0008] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0009] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0011] Figure 1 A flowchart of a method for reviewing a legal document in an embodiment of the present invention;

[0012] Figure 2 This is a display example diagram of comparison results of multiple different fields in an embodiment of the present invention;

[0013] Figure 3It is a structural schematic diagram of a legal document review device in an embodiment of the present invention;

[0014] Figure 4 The figure is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0015] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described in combination with the embodiments below. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0016] At present, when preparing for case filing, courts usually use a manual one-by-one comparison method to review the information consistency between legal documents and original materials. This review method has high labor costs and low accuracy and efficiency, which affects the timeliness of the court's case filing procedures.

[0017] Based on this, the legal document review method, device and electronic equipment provided by the present invention can improve the accuracy and efficiency of the legal document review during the court's case filing preparation process, thereby helping to ensure the timeliness of the court's case filing procedures.

[0018] To facilitate understanding of this embodiment, a method for reviewing a legal document disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, the method may include the following steps:

[0019] Step S102, obtaining the legal document to be reviewed and its corresponding original relevant files and field information.

[0020] The field information may include one or more fields. For example, the field information may include name, age, gender, ethnicity, mobile phone number, citizen ID number, date, address, amount, etc. The fields included in the field information may be customized according to actual needs and are not limited thereto.

[0021] Step S104, extracting the first key information from the original relevant file based on the field information, and extracting the second key information from the legal document to be reviewed based on the pre-trained large language model.

[0022] The first key information includes a first field value corresponding to each field, and the second key information includes a second field value corresponding to each field.

[0023] After obtaining a legal document to be reviewed and its corresponding original related files and field information, since the original related files are usually filled in or generated according to the corresponding template, this part of the field information can be used to match the corresponding template information (such as key-value pair matching, field name matching, etc.) to extract the values ​​corresponding to each defined field from the original related file as the first field value, and then obtain the first key information. The specific matching method can be selected according to actual needs and is not limited to this. The large language model can be pre-trained. After obtaining the legal document to be reviewed, the large language model can be used to extract information from the legal document to be reviewed to extract the values ​​corresponding to each field from the legal document to be reviewed as the second field value, and then obtain the second key information.

[0024] Step S106: compare the first field value corresponding to each field with its corresponding second field value based on a preset comparison rule.

[0025] In actual application, due to the complexity of the contents contained in the legal documents to be reviewed and the original relevant documents, it is necessary to define corresponding comparison rules in advance for the contents contained in different legal documents to be reviewed and the contents contained in different original relevant documents, so that after obtaining the first field value and the second field value with a corresponding relationship, the pre-defined comparison rules can be applied to specifically compare the first field value and the second field value, thereby ensuring the efficiency and accuracy of the comparison.

[0026] Step S108, based on the comparison results of each field, generate the review information of the legal document to be reviewed.

[0027] After extracting the corresponding first field value and the second field value from the corresponding legal document to be reviewed and the original relevant document and applying the pre-defined comparison rules to perform comparison to obtain the comparison result of each field, the corresponding information can be generated as the review information in combination with the comparison results of all fields to represent the review result of the legal document to be reviewed, so as to facilitate subsequent operations based on the review information (such as modifying the content of the legal document to be reviewed, adjusting the defined specific fields, manually reviewing the legal document to be reviewed, directly using the legal document to be reviewed to file a case, etc.).

[0028] A method for reviewing legal documents provided by an embodiment of the present invention obtains the legal document to be reviewed and its corresponding original related files and field information; extracts the first key information from the original related files based on the field information, and extracts the second key information from the legal document to be reviewed based on a pre-trained large language model; compares the first field value of each field corresponding to the first key information with its second field value corresponding to the second key information based on a preset comparison rule; and generates review information of the legal document to be reviewed based on the comparison results of each field. By adopting the above technology, key information can be automatically extracted and compared using the corresponding legal documents to be reviewed, the original related files and the field information, thereby realizing the information consistency review of the legal document to be reviewed and the original related files, which can improve the accuracy and efficiency of the review of legal documents in the process of the court's preparation for filing, thereby facilitating the timeliness of the court's filing procedures.

[0029] As a possible implementation, the preset comparison rule may include at least one of the following: a first comparison rule for comparing numerical fields, a second comparison rule for comparing text fields, a third comparison rule for comparing spatial fields, and a fourth comparison rule for comparing time fields; based on this, the above step S106 (i.e., comparing the first field value corresponding to each field with its corresponding second field value based on the preset comparison rule) may include at least one of the following operation modes:

[0030] (1) Apply the first comparison rule to compare the first field value corresponding to each numerical field with its corresponding second field value.

[0031] Among them, the first comparison rule includes corresponding processing (such as rounding, unit conversion, unit deletion, etc.) of the first field value and / or the second field corresponding to the numerical field.

[0032] For example, the large language model extracts that the liquidated damages in the legal document to be reviewed is 100.0 yuan (that is, the first field value corresponding to the liquidated damages field is "100.0 yuan"). In this case, the first field value "100.0 yuan" needs to be processed again according to the processing method defined in the first comparison rule. The processing method can be: first determine whether the digits after the decimal point of the extracted value are all 0, and if so, remove the decimal part and round it; secondly, remove the unit "yuan" to obtain the processed value "100"). Similarly, the extracted second field value can also be processed accordingly according to the processing method defined in the first comparison rule to obtain the processed value. After the first field value and the second field value with a corresponding relationship are processed according to the processing method defined in the first comparison rule, the processed values ​​corresponding to the first field value and the second field value can be directly compared to improve the comparison efficiency and accuracy.

[0033] (2) Apply the second comparison rule to compare the first field value corresponding to each text field with its corresponding second field value.

[0034] The second comparison rule includes performing corresponding processing (such as deleting classifiers, etc.) on the first field value and / or the second field corresponding to the text field.

[0035] For example, the large language model extracts that the ethnicity in the legal document to be reviewed is Han (that is, the first field value corresponding to the ethnicity field is "Han"). In this case, the first field value "Han" needs to be processed again according to the processing method defined in the second comparison rule. The processing method can be: determine whether the extracted value contains the category word "ethnicity", and if so, remove "ethnicity". Similarly, the extracted second field value can also be processed accordingly according to the processing method defined in the second comparison rule to obtain the processed value. After the first field value and the second field value with a corresponding relationship are processed according to the processing method defined in the second comparison rule, the processed values ​​corresponding to the first field value and the second field value can be directly compared to improve the comparison efficiency and accuracy.

[0036] (3) Calling a third-party preset map interface to obtain spatial data corresponding to the corresponding first field value and the corresponding second field value of each spatial class field, and applying a third comparison rule to compare the spatial data corresponding to each spatial class field.

[0037] For example, the map interface can be called to convert the first field value and the second field value corresponding to the address field, which are represented by the street, house number, etc., into spatial data represented by longitude, latitude, altitude, etc., and then process the first field value and the second field value corresponding to the address field according to the processing method defined in the second comparison rule (such as converting into coordinate values ​​in the coordinate representation form under the same coordinate system, rounding the coordinate values, etc.), and then directly compare the processed values ​​corresponding to the first field value and the second field value to improve the comparison efficiency and accuracy.

[0038] (4) Apply the fourth comparison rule to compare the first field value corresponding to each time field with its corresponding second field value.

[0039] Among them, the fourth comparison rule includes corresponding processing of the first field value and / or the second field corresponding to the text field (such as: searching, replacing, deleting, etc. identifiers, identification words, etc., calculating the number of digits of numbers, adding numbers, deleting numbers, etc.).

[0040] For example, the large language model extracts that the date in the legal document to be reviewed is 2023-01-01 (that is, the first field value corresponding to the date field is "2023-01-01"). In this case, the first field value "2023-01-01" needs to be processed again according to the processing method defined in the fourth comparison rule. The processing method can be: determine whether the extracted value contains an identifier (such as "-", etc.), and if so, delete the identifier. For another example, the date extracted from the original relevant document is January 5, 2023 (that is, the second field value corresponding to the date field is "January 5, 2023"). At this time, the extracted second field value can be processed according to the processing method defined in the fourth comparison rule. The processing method can be: determine whether the extracted value contains the identifiers "year", "month", and "day" at the same time. If so, continue to calculate the part before the identifier "year" (that is, "2023"), the identifiers "year" and "month" If the number of digits in the corresponding part is calculated to be less than two, add "0" in front of the corresponding part (i.e., process "January 5, 2023" as "January 5, 2023"); then delete the identifier (i.e., process "January 5, 2023" as "2023-01-05"). After processing the first field value and the second field value having a corresponding relationship according to the processing method defined in the fourth comparison rule, the processed values ​​corresponding to the first field value and the second field value can be directly compared to improve the comparison efficiency and accuracy.

[0041] As a possible implementation, before performing the above step S106 (i.e., comparing the first field value corresponding to each field with its corresponding second field value based on a preset comparison rule), the first field value corresponding to each field may be assembled into a corresponding first object, and the second field value corresponding to each field may be assembled into a corresponding second object. Based on this, the above step S106 may include: for each field, obtaining the corresponding first field value and second field value from the first object and second object corresponding to the field respectively based on a preset expression, and comparing the first field value and second field value corresponding to the field by applying the preset comparison rule.

[0042] For example, after extracting the first field value and the second field value corresponding to a certain field, the first field value obtained can be assembled into a first Java object with a specific data format, and the second field value obtained can be assembled into a second Java object with a specific data format, and then the first Java object and the second Java object can be written into a script, and a Spel expression and a comparison rule can be written in the script at the same time; when executing the script, the written Spel expression can be used to extract the first field value from the first Java object and the second field value from the second Java object, and then the comparison rule can be applied to compare the first field value and the second field value corresponding to the field to obtain the comparison result corresponding to the field.

[0043] As a possible implementation, the large language model may include a first large language model and a second large language model, and the number of parameters of the second large language model is greater than the number of parameters of the first large language model. Based on this, the extraction of the second key information from the legal document to be reviewed based on the pre-trained large language model in the above step S104 may include: extracting the first-level field value of each field through the first large language model; if the first-level field value of the field is extracted successfully, the first-level field value extraction result of the field is used as the second field value corresponding to the field; if the first-level field value extraction of the field fails, the second-level field value of the field is extracted through the second large language model, and the second-level field value extraction result of the field is used as the second field value corresponding to the field.

[0044] For example, the first largest language model uses a 14b model (i.e., an open source model with 14 billion model parameters), and the second largest language model uses a 72b model (i.e., an open source model with 72 billion model parameters). For a certain field, the 14b model can be used to extract the field value of the field first. If the 14b model successfully extracts the field value, the field value extracted by the 14b model is retained as the second field value. If the 14b model does not successfully extract the field value, the 72b model is used to extract the field value of the field again. If the 72b model successfully extracts the field value, the field value extracted by the 72b model is retained as the second field value. Since the computing power of the 72b model is usually able to ensure that the field value corresponding to each defined field in the original related file is extracted successfully, the corresponding field value can be directly output through the 72b model after the 72b model is used to extract the field value of the corresponding field.

[0045] The two-level second field value extraction method implemented by the first large language model and the second large language model is adopted to further improve the accuracy of the second field value extraction.

[0046] As a possible implementation, the comparison result may include one of the following: a first result indicating that the corresponding field is correctly compared, a second result indicating that the corresponding field is incorrectly compared, and a third result indicating that the corresponding field cannot be compared; based on this, the step S108 (i.e., generating the review information of the legal document to be reviewed based on the comparison results of each field) may include:

[0047] Step a1: If the comparison results of all fields are the first results, the first review information of the legal document to be reviewed is generated.

[0048] Among them, the first review information can indicate that the legal document to be reviewed has passed the review.

[0049] Step a2: If the comparison result of the existing field is the second result and the comparison result of the non-existing field is the third result, the second review information of the legal document to be reviewed is generated.

[0050] The second review information may indicate that the legal document to be reviewed has failed the review and needs to be modified.

[0051] Step a3: If the comparison result of the existing field is the second result and the comparison result of the existing field is the third result, the third review information of the legal document to be reviewed is generated.

[0052] Among them, the third review information can indicate that the legal document to be reviewed has failed the review and needs to be modified and manually reviewed.

[0053] Step a4: If the comparison result of the non-existent field is the second result and the comparison result of the existing field is the third result, the fourth review information of the legal document to be reviewed is generated.

[0054] Among them, the fourth review information can indicate that the legal document to be reviewed has failed the review and requires manual review.

[0055] In order to facilitate understanding of the above steps a1 to a4, the operation methods of the above steps a1 to a4 are described as follows by taking a specific application as an example:

[0056] A graphical user interface may be provided by the electronic device for the user to configure fields. The fields configured by the user include ethnicity, citizen ID number, and the defendant's usual address. After the user completes configuring these fields, the electronic device extracts the corresponding first field value and the second field value, and compares the first field value and the second field value corresponding to each field according to a preset rule to obtain the comparison result corresponding to each field, and then displays the comparison result through the provided graphical user interface; see Figure 2As shown, in the graphical user interface, a circular mark containing a check mark indicates that the ethnic information contained in the legal document to be reviewed is consistent with the ethnic information contained in the corresponding original relevant file (that is, the comparison result of the ethnic field is the first result), a circular mark containing a cross indicates that the citizen ID number information contained in the legal document to be reviewed is inconsistent with the citizen ID number information contained in the corresponding original relevant file (that is, the comparison result of the citizen ID number field is the second result), and a circular mark containing a question mark indicates that it is impossible to determine whether the defendant's usual address information contained in the legal document to be reviewed is consistent with the defendant's usual address information contained in the corresponding original relevant file (indicating that the defendant's usual address field cannot be compared, that is, the comparison result of the defendant's usual address field is the third result), wherein the field whose comparison result is the third result requires manual review; when the comparison result corresponding to each field is known, an audit information can be generated in combination with the comparison results corresponding to all fields as the audit result of the legal document to be reviewed, and the audit information prompts relevant personnel to perform subsequent operations (such as manual review or other operations).

[0057] As a possible implementation, the above-mentioned preset comparison rules may include a fifth comparison rule for comparing multiple first field values ​​corresponding to a field with multiple second field values ​​and a sixth comparison rule for comparing a unique first field value corresponding to a field with a unique second field value; based on the preset comparison rules, the first field value corresponding to each field is compared with its corresponding second field value, including: if the field corresponds to multiple first field values ​​and multiple second field values, then the fifth comparison rule is applied to compare the first field value corresponding to the field with its corresponding second field value; if the field corresponds to a unique first field value and a unique second field value, then the sixth comparison rule is applied to compare the first field value corresponding to the field with its corresponding second field value.

[0058] The fifth matching rule and the sixth matching rule each correspond to one or more matching methods. For example, the fifth matching rule corresponds to a single-value matching matching method, and the sixth matching rule corresponds to a multi-value matching matching method. The specific matching method is not limited here.

[0059] For example, the defendants included in the indictment as the original relevant document are Zhang San and Li Si (that is, the second field value corresponding to the defendant field is "Zhang San, Li Si"). The value corresponding to the defendant field can be extracted from the legal document to be reviewed through the large language model as the first field value, and a loop statement is executed to search for "Zhang San" and "Li Si" in the values ​​extracted by the large language model to compare the first field value with the second field value; the method of executing the loop statement to find the corresponding data in this case is the comparison method corresponding to the fifth comparison rule mentioned above.

[0060] As a possible implementation, the above-mentioned step S106 (i.e., comparing the first field value corresponding to each field with its corresponding second field value based on a preset comparison rule) may also include: applying the preset comparison rule to compare the first field value and the second field value corresponding to each field to determine whether the first field value and the second field value corresponding to each field are equal; if the first field value and the second field value corresponding to the field are equal, the comparison result of the field is the first result; if the first field value and the second field value corresponding to the field are not equal, the comparison result of the field is the second result.

[0061] As a possible implementation, the above-mentioned method for reviewing legal documents may further include: storing the legal document to be reviewed and its corresponding original related files in a cloud server. Based on this, the above-mentioned step S102 (i.e., obtaining the legal document to be reviewed and its corresponding original related files and field information) may include: obtaining the storage addresses of the legal document to be reviewed and the original related files on the cloud server, and obtaining the legal document to be reviewed and the original related files from the cloud server based on the obtained storage addresses, and then obtaining the field information.

[0062] Exemplarily, the legal document to be reviewed and its corresponding original related file can be stored in advance in the corresponding storage locations of the cloud server respectively, and the storage locations corresponding to the legal document to be reviewed and the original related file respectively have corresponding file links; when it is necessary to review the information consistency between the legal document to be reviewed and the original related file, the file links corresponding to the legal document to be reviewed and the original related file respectively can be entered first, and then the legal document to be reviewed and the original related file can be downloaded from the cloud server through the file links, and then the pre-defined field information can be entered, so as to use the field information to extract the first field value and the second field value corresponding to the same field from the legal document to be reviewed and the original related file for comparison.

[0063] The above-mentioned method of first obtaining the file storage address and then obtaining the legal documents to be reviewed and the original relevant documents can improve the accuracy and stability of obtaining the legal documents to be reviewed and the original relevant documents, and thus help to ensure the efficiency and stability of the information consistency review of the legal documents to be reviewed and the original relevant documents.

[0064] To facilitate understanding, the review method of the above-mentioned legal documents is described exemplarily with reference to a specific application example.

[0065] The operation methods of the above-mentioned legal document review method may include:

[0066] Step 1: Script configuration comparison rules.

[0067] The fields to be compared and their comparison rules can be defined in advance by writing scripts. The output method of the comparison results can also be specified when writing scripts. For example, the output value of the comparison result of each field can be specified as 1 (indicating that the corresponding field is correctly compared) or 2 (indicating that the corresponding field is incorrectly compared) or 3 (indicating that the corresponding field cannot be compared because it is missing or not recognized). By specifying the output value of the comparison result, the consistency and reliability of the output methods of different fields can be ensured.

[0068] The pre-provided configuration page can also support users to dynamically configure the automation script on the configuration page to reduce the complexity of script writing. The script composition mainly includes: the file type to be identified, multiple processing methods for selecting files (such as rounding, replacement, unit conversion, etc.), matching rules (such as single-value matching rules, multi-value matching rules), etc. The matching rules mainly include: parsing the content of the first key information and assembling it into a first object with a specific data format, parsing the content of the second key information and assembling it into a second object with a specific data format, and comparing the first object and the second object through a specific expression). For example, the configuration part of the automation script is presented as shown in Table 1 below, where "src" in Table 1 represents the element value extracted from the original related file (that is, the first field value to be compared), and "dst" in Table 1 represents the second field value recognized by the AI ​​large model.

[0069] Table 1 Script configuration example table

[0070]

[0071] Step 2: Enter file information and field information.

[0072] The file information may include the file links of the legal documents to be reviewed and the original related documents on the cloud server, and the field information may include multiple pre-defined fields.

[0073] Step three: Obtain the legal documents and original relevant documents to be reviewed and extract key information.

[0074] The file link contained in the incoming file information can be used to download the legal document to be reviewed and the original related documents, and then the field information is used to extract the first field value corresponding to each field from the original related documents through information matching as the first key information, and the pre-trained 14b model is used to extract the second key information of the document to be reviewed, and the second field value corresponding to the corresponding field extracted by the 14b model is used as a part of the second key information; the 72b model can also be used to extract the second key information again for the field where the 14b model fails to extract the second key information, and the second field value corresponding to the corresponding field extracted by the 72b model is used as another part of the second key information.

[0075] Step 4: Compare key information based on the comparison rules and output the comparison results.

[0076] The automated script can be executed to compare key information according to the configured comparison rules and output the comparison results of each field.

[0077] Step 5: Generate audit information.

[0078] Audit information of the legal document to be audited can be generated based on the comparison results of each field, so that relevant personnel can perform manual operations based on the audit information.

[0079] In the process of performing the above steps 1 to 5, a continuous monitoring system can also be introduced to track and record the performance of the model and script and make timely adjustments when deviations occur. For example, the operations performed by the continuous monitoring system may include: real-time continuous monitoring of fields that are incorrectly compared (wrong comparison or unable to be compared), and determining whether this type of failure (i.e., the type of field that is incorrectly compared) has existed before; and real-time message notification feedback triggered by the monitoring results and / or judgment results (such as sending a notification message to a specified device when it is determined that the number of incorrect comparisons of a field exceeds a preset number threshold).

[0080] In addition, a closed-loop mechanism of user feedback and case analysis can be established to collect real-time feedback data and instance data and use them as a basis for continuous optimization, thereby continuously improving system performance. For example, feedback data from court operators or court staff can be collected and used to iteratively optimize the parameters of the 14b model, and relevant personnel can analyze instance data to adjust or optimize script comparison rules.

[0081] By adopting the above-mentioned legal document review method, an automated script can be executed to automatically extract key information for comparison and output the comparison results, so as to achieve information consistency review between the legal document to be reviewed and the original relevant documents, thereby improving the accuracy and efficiency of the legal document review when the court files a case.

[0082] Based on the above-mentioned legal document review method, the embodiment of the present invention also provides a legal document review device, see Figure 3 As shown, the device may include the following modules:

[0083] The acquisition module 302 is used to acquire the legal document to be reviewed and its corresponding original related files and field information; wherein the field information includes one or more fields.

[0084] The extraction module 304 is used to extract the first key information from the original relevant file based on the field information, and to extract the second key information from the legal document to be reviewed based on the pre-trained large language model; wherein the first key information includes the first field value corresponding to each field, and the second key information includes the second field value corresponding to each field.

[0085] The comparison module 306 is used to compare the first field value corresponding to each field with the second field value corresponding to the field based on a preset comparison rule.

[0086] The generation module 308 is used to generate the review information of the legal document to be reviewed based on the comparison results of each field.

[0087] By using the above-mentioned legal document review device, key information can be automatically extracted for comparison using the corresponding legal documents to be reviewed, original related documents and field information, thereby achieving information consistency review between the legal documents to be reviewed and the original related documents, which can improve the accuracy and efficiency of the legal document review during the court's case filing preparation work, thereby helping to ensure the timeliness of the court's case filing procedures.

[0088] The above-mentioned preset comparison rules may include at least one of the following: a first comparison rule for comparing numerical fields, a second comparison rule for comparing text fields, a third comparison rule for comparing spatial fields, and a fourth comparison rule for comparing time fields; based on this, the above-mentioned comparison module 306 can also be used to perform at least one of the following operations: apply the first comparison rule to compare the first field value corresponding to each numerical field with its corresponding second field value; apply the second comparison rule to compare the first field value corresponding to each text field with its corresponding second field value; call the third-party preset map interface to obtain the spatial data corresponding to the corresponding first field value and the corresponding second field value of each spatial field, and apply the third comparison rule to compare the spatial data corresponding to each spatial field; apply the fourth comparison rule to compare the first field value corresponding to each time field with its corresponding second field value.

[0089] See also Figure 3 As shown, the device may also include:

[0090] The assembling module 310 is used to assemble the first field value corresponding to each field into a corresponding first object, and assemble the second field value corresponding to each field into a corresponding second object.

[0091] The above-mentioned comparison module 306 can also be used for: for each field, obtaining the corresponding first field value and second field value from the first object and second object corresponding to the field based on the preset expression, and applying the preset comparison rule to compare the first field value and second field value corresponding to the field.

[0092] The above-mentioned large language model may include a first large language model and a second large language model, and the number of parameters of the second large language model is greater than the number of parameters of the first large language model; based on this, the above-mentioned extraction module 304 can also be used to: extract the first-level field value of each field through the first large language model; if the first-level field value of the field is extracted successfully, then use the first-level field value extraction result of the field as the second field value corresponding to the field; if the first-level field value extraction of the field fails, then extract the second-level field value of the field through the second large language model, and use the second-level field value extraction result of the field as the second field value corresponding to the field.

[0093] The above-mentioned comparison result may include one of the following: a first result indicating that the corresponding field is correctly compared, a second result indicating that the corresponding field is incorrectly compared, and a third result indicating that the corresponding field cannot be compared; based on this, the above-mentioned generation module 308 can also be used for: if the comparison results of all fields are the first result, then generating the first audit information of the legal document to be reviewed; wherein, the first audit information indicates that the legal document to be reviewed has been reviewed; if the comparison result of the existing field is the second result and the comparison result of the non-existent field is the third result, then generating the second audit information of the legal document to be reviewed; wherein, the first audit information indicates that the legal document to be reviewed has been reviewed; The second review information indicates that the legal document to be reviewed has failed the review and needs to be modified in content; if the comparison result of the existing field is the second result and the comparison result of the existing field is the third result, the third review information of the legal document to be reviewed is generated; wherein, the third review information indicates that the legal document to be reviewed has failed the review and needs to be modified in content and manually reviewed; if the comparison result of the non-existent field is the second result and the comparison result of the existing field is the third result, the fourth review information of the legal document to be reviewed is generated; wherein, the fourth review information indicates that the legal document to be reviewed has failed the review and needs manual review.

[0094] The above-mentioned preset comparison rules may include a fifth comparison rule for comparing multiple first field values ​​corresponding to a field with multiple second field values ​​and a sixth comparison rule for comparing a unique first field value corresponding to a field with a unique second field value; based on this, the above-mentioned comparison module 306 can also be used for: if the field corresponds to multiple first field values ​​and multiple second field values, then the fifth comparison rule is applied to compare the first field value corresponding to the field with its corresponding second field value; if the field corresponds to a unique first field value and a unique second field value, then the fifth comparison rule is applied to compare the first field value corresponding to the field with its corresponding second field value.

[0095] The above-mentioned comparison module 306 can also be used to: apply the preset comparison rule to compare the first field value and the second field value corresponding to each field to determine whether the first field value and the second field value corresponding to each field are equal; if the first field value and the second field value corresponding to the field are equal, then the comparison result of the field is the first result; if the first field value and the second field value corresponding to the field are not equal, then the comparison result of the field is the second result.

[0096] See also Figure 3 As shown, the device may also include:

[0097] The storage module 312 is used to store the legal document to be reviewed and its corresponding original related files in the cloud server.

[0098] The acquisition module 302 can also be used to obtain the storage addresses of the legal document to be reviewed and the original relevant file on the cloud server, and obtain the legal document to be reviewed and the original relevant file from the cloud server based on the obtained storage addresses, and then obtain the field information.

[0099] The legal document review device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned legal document review method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0100] The embodiment of the present invention further provides an electronic device, such as Figure 4 As shown, it is a schematic diagram of the structure of the electronic device, wherein the electronic device includes a processor 41 and a memory 40, the memory 40 stores computer executable instructions that can be executed by the processor 41, and the processor 41 executes the computer executable instructions to implement the above-mentioned legal document review method.

[0101] exist Figure 4In the illustrated embodiment, the electronic device further includes a bus 42 and a communication interface 43 , wherein the processor 41 , the communication interface 43 and the memory 40 are connected via the bus 42 .

[0102] Among them, the memory 40 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 43 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 42 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 42 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0103] The processor 41 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 41 or the instruction in the form of software. The above processor 41 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor 41 reads the information in the memory and completes the steps of the legal document review method of the aforementioned embodiment in combination with its hardware.

[0104] Unless otherwise specifically stated, the relative steps, numerical expressions and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present invention.

[0105] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0106] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0107] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for reviewing a legal document, characterized in that: The method comprises: Obtaining the legal document to be reviewed and its corresponding original relevant documents and field information; wherein the field information includes one or more fields; Extracting first key information from the original relevant document based on the field information, and extracting second key information from the legal document to be reviewed based on the pre-trained large language model; wherein the first key information includes a first field value corresponding to each field, and the second key information includes a second field value corresponding to each field; Compare the first field value corresponding to each field with the second field value corresponding to the field based on a preset comparison rule; Based on the comparison results of each field, the review information of the legal document to be reviewed is generated.

2. The method according to claim 1, characterized in that The preset comparison rule includes at least one of the following: a first comparison rule for comparing numerical fields, a second comparison rule for comparing text fields, a third comparison rule for comparing spatial fields, and a fourth comparison rule for comparing time fields; comparing the first field value corresponding to each field with its corresponding second field value based on the preset comparison rule, including at least one of the following: Applying the first comparison rule to compare the first field value corresponding to each numerical field with its corresponding second field value; Applying the second comparison rule to compare the first field value corresponding to each text field with its corresponding second field value; Calling a third-party preset map interface to obtain spatial data corresponding to the corresponding first field value and the corresponding second field value of each spatial class field, and applying the third comparison rule to compare the spatial data corresponding to each spatial class field; The fourth comparison rule is applied to compare the first field value corresponding to each time field with its corresponding second field value.

3. The method according to claim 1, characterized in that Before comparing the first field value corresponding to each field with the second field value corresponding to each field based on a preset comparison rule, the method further includes: Assemble the first field value corresponding to each field into a corresponding first object, and assemble the second field value corresponding to each field into a corresponding second object; Comparing the first field value corresponding to each field with the second field value corresponding to the field based on a preset comparison rule includes: For each field, the corresponding first field value and second field value are obtained from the first object and second object corresponding to the field respectively based on the preset expression, and the first field value and second field value corresponding to the field are compared by applying the preset comparison rule.

4. The method according to claim 1, characterized in that: The large language model includes a first large language model and a second large language model, the number of parameters of the second large language model is greater than the number of parameters of the first large language model; The second key information is extracted from the legal document to be reviewed based on the pre-trained large language model, including: Performing first-level field value extraction on each field through the first language model; If the first-level field value of the field is extracted successfully, the first-level field value extraction result of the field is used as the second field value corresponding to the field; If the first-level field value extraction of the field fails, the second-level field value of the field is extracted using the second largest language model, and the second-level field value extraction result of the field is used as the second field value corresponding to the field.

5. The method according to claim 1, characterized in that The comparison result includes one of the following: a first result indicating that the corresponding field is correctly compared, a second result indicating that the corresponding field is incorrectly compared, and a third result indicating that the corresponding field cannot be compared; Based on the comparison results of each field, the review information of the legal document to be reviewed is generated, including: If the comparison results of all fields are the first results, the first review information of the legal document to be reviewed is generated; wherein the first review information indicates that the legal document to be reviewed has passed the review; If the comparison result of the existing field is the second result and the comparison result of the non-existing field is the third result, second review information of the legal document to be reviewed is generated; wherein the second review information indicates that the legal document to be reviewed has not passed the review and needs to be modified; If the comparison result of the existing field is the second result and the comparison result of the existing field is the third result, the third review information of the legal document to be reviewed is generated; wherein the third review information indicates that the legal document to be reviewed has not passed the review and needs to be modified and manually reviewed; If the comparison result of the non-existent field is the second result and the comparison result of the existing field is the third result, the fourth review information of the legal document to be reviewed is generated; wherein, the fourth review information indicates that the legal document to be reviewed has failed the review and requires manual review.

6. The method according to claim 1, characterized in that The preset comparison rules include a fifth comparison rule for comparing a plurality of first field values ​​corresponding to a field with a plurality of second field values ​​and a sixth comparison rule for comparing a unique first field value corresponding to a field with a unique second field value; Comparing the first field value corresponding to each field with the second field value corresponding to the field based on a preset comparison rule includes: If the field corresponds to a plurality of first field values ​​and a plurality of second field values, then the first field value corresponding to the field is compared with its corresponding second field value by applying the fifth comparison rule; If the field corresponds to a unique first field value and a unique second field value, the fifth comparison rule is applied to compare the first field value corresponding to the field with the second field value corresponding to the field.

7. The method according to claim 5, characterized in that Comparing the first field value corresponding to each field with the second field value corresponding to the field based on a preset comparison rule includes: Applying the preset comparison rule to compare the first field value and the second field value corresponding to each field to determine whether the first field value and the second field value corresponding to each field are equal; If the first field value and the second field value corresponding to the field are equal, the comparison result of the field is the first result; If the first field value and the second field value corresponding to the field are not equal, the comparison result of the field is the second result.

8. The method according to claim 1, characterized in that The method further comprises: Storing the legal documents to be reviewed and their corresponding original relevant documents in the cloud server; Obtain the legal documents to be reviewed and their corresponding original relevant documents and field information, including: The storage addresses of the legal document to be reviewed and the original relevant file on the cloud server are obtained, and based on the obtained storage addresses, the legal document to be reviewed and the original relevant file are obtained from the cloud server, and then the field information is obtained.

9. A device for reviewing legal documents, characterized in that: The device comprises: An acquisition module is used to acquire the legal document to be reviewed and its corresponding original related documents and field information; wherein the field information includes one or more fields; An extraction module, configured to extract first key information from the original relevant file based on the field information, and to extract second key information from the legal document to be reviewed based on a pre-trained large language model; wherein the first key information includes a first field value corresponding to each field, and the second key information includes a second field value corresponding to each field; A comparison module, used to compare the first field value corresponding to each field with its corresponding second field value based on a preset comparison rule; The generation module is used to generate the review information of the legal document to be reviewed based on the comparison results of each field.

10. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • RPA and AI combined information auditing method and device and electronic equipment

    CN114445836A

  • Automatic auditing method and device, electronic equipment and storage medium

    CN116189215A

Cited By

  • File auditing method and equipment

    CN121581017A