Legal evidence black box element extraction method and system

Through the black box element extraction method of legal evidence, the problem of balancing efficiency and accuracy in litigation evidence processing is solved, and the efficient and accurate extraction of multi-format evidence is achieved, which is suitable for batch litigation business.

CN120688482AActive Publication Date: 2025-09-23JUNKUN IND HLDG GRP CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510934538.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-09-23
Estimated Expiration
2045-07-08

AI Technical Summary

Technical Problem

In the litigation legal process, existing technologies have low efficiency in extracting elements from evidence documents and difficulty in ensuring accuracy. They are unable to effectively process diverse and non-standardized evidence documents, resulting in low manual processing efficiency and automated tools being limited by format or semantic understanding capabilities, forming a "semi-automation" bottleneck.

Method used

A black-box feature extraction method for legal evidence is adopted. By obtaining multi-format evidence and normalizing it into image and text lists, multimodal collaborative extraction is performed by combining visual and text language models. A reordering model is used to associate features with evidence slices, and low-confidence results are iteratively eliminated to achieve dynamic confidence verification.

Benefits of technology

It has achieved adaptive processing of multi-format evidence, significantly improved the accuracy and efficiency of feature extraction, increased processing speed by 50 times, reduced the error rate by more than 80%, and met the evidence traceability requirements of legal procedures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120688482A_ABST
    Figure CN120688482A_ABST
Patent Text Reader

Abstract

The invention provides a legal evidence black box element extraction method and system. The method comprises the following steps: acquiring a legal evidence black box and an element list; normalizing the legal evidence black box into a picture list and a text list; generating an element relation group according to the element list; converting the element relation group into a reordering cue word list, outputting the confidence of each evidence unit and the element relation group, and retaining the highest confidence result; converting the element relation group into a cue word list of the model; based on the cue word list and the corresponding evidence unit, obtaining an extraction element corresponding to the final element relation combination; traversing each element in the element list, collecting extraction results of the element in all the relation groups, and constructing a candidate result set; based on a confidence reordering algorithm, iteratively rejecting a candidate result set with the lowest confidence coefficient until each element only retains a unique high-confidence-coefficient result, and obtaining a target element set; and outputting the target element set and the corresponding original evidence slice. The efficiency and the accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of evidence processing, and in particular to a method for extracting black box elements of legal evidence. Background Art

[0002] In the litigation process, extracting key elements from evidence documents (such as party information, time, amount, and key facts) is a core part of case handling. However, this process currently relies primarily on manual labor, which presents the following pain points:

[0003] Inefficiency: Batch personal business (such as financial loan disputes, labor disputes, etc.) requires processing a large amount of evidence in different formats (contracts, bills, transaction records, etc.), and manually extracting them one by one is time-consuming and labor-intensive.

[0004] High accuracy requirements: Legal scenarios have extremely low tolerance for error in factor extraction. Minor errors may cause litigation strategies to fail or procedural delays, resulting in high subsequent repair costs.

[0005] Limitations of existing technologies:

[0006] General OCR / NLP technology: It can only perform text recognition or simple field extraction, cannot understand legal semantics, requires manual secondary verification, and has limited efficiency improvements.

[0007] Fixed pipeline systems: These rely on preset templates or structured inputs (e.g., tables in a specific format) and are difficult to adapt to diverse, non-standardized evidence documents (e.g., handwritten notes, scanned copies, mixed-format documents).

[0008] Therefore, existing solutions cannot take into account both adaptive processing of black box evidence and high-precision element verification: manual processing is flexible but inefficient; automated tools are limited by format or semantic understanding capabilities and require manual intervention, forming a "semi-automation" bottleneck. Summary of the Invention

[0009] The present invention aims to solve at least one of the technical problems existing in the prior art and proposes a method and system for extracting black box elements of legal evidence.

[0010] In a first aspect, the present invention provides a method for extracting black box elements of legal evidence, the method comprising:

[0011] Obtaining a legal evidence black box and an element list; wherein the legal evidence black box includes multi-format files, and the element list is a list of element names corresponding to the litigation type;

[0012] Normalizing the legal evidence black box into a picture list and a text list;

[0013] Generating element relationship groups according to the element list; wherein each group includes logically related elements;

[0014] Convert the element relationship group into a re-ordered prompt word list, output the confidence of each evidence unit and the element relationship group, and retain the highest confidence result;

[0015] Converting the element relationship groups into a visual prompt word list of a visual language model or a language prompt word list of a text language model;

[0016] Based on the visual prompt word list and the language prompt word list and the corresponding evidence units, obtaining the extraction elements corresponding to the final element relationship combination;

[0017] Traversing each element in the element list, collecting extraction results of the element in all relationship groups, and constructing a candidate result set;

[0018] Based on the confidence reranking algorithm, the candidate result set with the lowest confidence is iteratively eliminated from the candidate result set until only a unique high-confidence result is retained for each element, thereby obtaining the target element set;

[0019] Output the target feature set and the corresponding original evidence slices.

[0020] In some possible embodiments, the legal evidence black box includes image files, PDF files, video files, and audio files, and normalizing the legal evidence black box into an image list and a text list includes:

[0021] Convert the audio file into text using the Whisper model;

[0022] The video file is de-duplicated using FFmpeg and a list of pictures is extracted;

[0023] Convert the PDF file into an image using the Fitz library.

[0024] In some possible embodiments, converting the element relationship group into a reordered prompt word list, outputting the confidence of each evidence unit and the element relationship group, and retaining the highest confidence result includes:

[0025] The element relationship group is obtained through the following relationship to obtain a reordered prompt word list:

[0026] f(related_key)=pmpt_rerank

[0027] f(related_key) is the system's entry function, processing the user-entered related key sequence related_key = [k1, k2, ..., kn] input, where k1, k2, ..., kn are keys entered by the user through natural language interaction. Each key corresponds to an evidence cutting window, and pmpt_rerank is the input prompt word of the reranking model, which is used to locate related pages.

[0028] The reordered prompt word list is reordered to obtain the confidence of each evidence unit and the element relationship group and retain the highest confidence result.

[0029] In some possible embodiments, converting the element relationship group into a visual prompt word list of a visual language model or a language prompt word list of a text language model includes:

[0030] The element relationship group is converted into a visual clue word list of the visual language model through the following relationship: f(clues)=pmpt_vlm, where f(clues) is a branch processing function that selects a visual model or language model path according to the clue word, and pmpt_vlm is a clue word template of the visual language model;

[0031] The element relationship group is converted into a language clue word list of a text language model through the following relationship: f(clues)=pmpt_llm_json, where pmpt_llm_json is a language model clue word for converting unstructured text into JSON.

[0032] In some possible embodiments, the method further includes the steps of verifying and archiving:

[0033] Input the black box key value list of each defendant whose elements have been extracted into the embed model to generate the embedding vector matrix A;

[0034] Among them, the first column of matrix A is used for batch verification, and the matching of the number of black boxes m is verified by calculating the integer value of the determinant of the nxm matrix; the second column of matrix A is used for clustering and archiving. After dimensional reorganization, the automatic classification results of the current batch of black boxes are obtained through SVD orthogonal decomposition and k-means clustering algorithm.

[0035] In a second aspect, an embodiment of the present invention provides a legal evidence black box element extraction system, the system comprising:

[0036] An acquisition module, configured to acquire a legal evidence black box and an element list; wherein the legal evidence black box includes files in multiple formats, and the element list is a list of element names corresponding to the litigation type;

[0037] A normalization module, configured to normalize the legal evidence black box into an image list and a text list;

[0038] A generating module, configured to generate element relationship groups according to the element list; wherein each group includes logically related elements;

[0039] a conversion module, configured to convert the element relationship group into a reordered prompt word list, output the confidence level of each evidence unit and the element relationship group, and retain the highest confidence level result;

[0040] The conversion module is further configured to convert the element relationship group into a visual prompt word list of a visual language model or a language prompt word list of a text language model;

[0041] The generating module is further configured to obtain the extraction elements corresponding to the final element relationship combination based on the visual prompt word list and the language prompt word list and the corresponding evidence units;

[0042] A traversal module, configured to traverse each element in the element list, collect extraction results of the element in all relationship groups, and construct a candidate result set;

[0043] An iterative module is used to iteratively eliminate the candidate result set with the lowest confidence from the candidate result set based on the confidence reranking algorithm until only a unique high-confidence result is retained for each element, thereby obtaining a target element set;

[0044] The output module is used to output the target feature set and the corresponding original evidence slices.

[0045] In some possible embodiments, the legal evidence black box includes image files, PDF files, video files, and audio files, and the normalization module is further configured to:

[0046] Convert the audio file into text using the Whisper model;

[0047] The video file is de-duplicated using FFmpeg and a list of pictures is extracted;

[0048] Convert the PDF file into an image using the Fitz library.

[0049] In some possible embodiments, the conversion module is further configured to:

[0050] The element relationship group is obtained by the following relationship to obtain a re-ordering prompt word list: f(related_key) = pmpt_rerank, wherein f(related_key) is the system's entry function, processing the associated key sequence related_key = [k1, k2, ..., kn] input input by the user, k1, k2, ..., kn are the keys input by the user through natural language interaction, each key corresponds to an evidence cutting window, pmpt_rerank is the input prompt word of the re-ordering model, which is used to locate related pages; the re-ordering prompt word list is re-ordered to obtain the confidence of each evidence unit and the element relationship group and retain the highest confidence result.

[0051] In some possible embodiments, the conversion module is further configured to:

[0052] The element relationship group is converted into a visual cue word list of the visual language model through the following relationship: f(clues) = pmpt_vlm, where f(clues) is a branch processing function that selects a visual model or a language model path according to the clue word, and pmpt_vlm is a cue word template of the visual language model; and the element relationship group is converted into a language cue word list of the text language model through the following relationship: f(clues) = pmpt_llm_json, where pmpt_llm_json is a language model cue word for converting unstructured text into JSON.

[0053] In some possible embodiments, a verification and archiving module is further included, which is used to:

[0054] Input the black box key value list of each defendant whose elements have been extracted into the embed model to generate the embedding vector matrix A;

[0055] Among them, the first column of matrix A is used for batch verification, and the matching of the number of black boxes m is verified by calculating the integer value of the determinant of the nxm matrix; the second column of matrix A is used for clustering and archiving. After dimensional reorganization, the automatic classification results of the current batch of black boxes are obtained through SVD orthogonal decomposition and k-means clustering algorithm.

[0056] In a third aspect, the present invention provides an electronic device, characterized in that it includes:

[0057] one or more processors;

[0058] The storage unit is used to store one or more programs, which, when executed by the one or more processors, enable the one or more processors to implement the method described above.

[0059] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the method described above.

[0060] The method and system for extracting black box elements from legal evidence according to the embodiments of the present invention have the following beneficial effects:

[0061] 1. Break through format limitations and achieve black box adaptive processing

[0062] By normalizing multi-format evidence (images, PDFs, videos, audio) into a unified format (image / text list), the strong dependence of traditional OCR / NLP technology on input format is solved.

[0063] It can handle complex unstructured evidence in reality (such as handwritten contracts and blurry scans) and is suitable for various litigation scenarios (such as financial lending and labor disputes).

[0064] 2. Multimodal collaborative extraction to improve semantic understanding accuracy

[0065] Combining the visual model (Qwen-VL) and the text model (Qwen-LLM), the key fields in the image and the structured information in the text are analyzed respectively, and the elements and evidence slices are associated through the reranking model (Jina-Reranker).

[0066] It avoids the limitations of a single modality (such as the inability of a plain text model to identify the authenticity of a signature) and significantly improves the accuracy of feature extraction.

[0067] 3. Dynamic confidence check to ensure the reliability of results

[0068] Iteratively eliminates low-confidence results, ensuring that only unique and logically consistent high-confidence values ​​are retained for each element. This reduces manual review costs (for example, 90% of elements in a batch of cases can be automatically verified), and reduces the error rate by over 80% compared to manual extraction.

[0069] 4. End-to-end automation significantly improves efficiency

[0070] The entire process, from evidence input to factor output, is fully automated, supporting parallel processing of batch cases (e.g., processing 100+ loan agreements simultaneously). This increases processing speed by 50 times compared to manual extraction, making it suitable for high-throughput scenarios such as courts and law firms.

[0071] 5. Legal compliance assurance

[0072] The output is accompanied by a slice of the original evidence (such as a screenshot of the contract signature area), meeting the requirements for evidence traceability in legal proceedings. This avoids the possibility of breaking the chain of evidence due to technical processing and complies with regulations such as the "Regulations on Electronic Evidence."

[0073] In summary, the embodiments of this invention, through the two core technologies of multimodal fusion extraction and dynamic confidence checking, address the industry dilemma of achieving both efficiency and accuracy in legal evidence processing, making them particularly suitable for batch litigation. The technical benefits include: an end-to-end automated pipeline, a 50-fold increase in processing speed; a reduction in error rates below 1%, significantly reducing legal risks; and a reduction in manual review workload by over 80%. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 A schematic diagram of the structure of an example electronic device of a method for extracting black box elements of legal evidence according to an embodiment of the present invention;

[0075] Figure 2 A flowchart of a method for extracting black box elements from legal evidence according to another embodiment of the present invention;

[0076] Figure 3 This is a structural diagram of a legal evidence black box element extraction system according to another embodiment of the present invention. DETAILED DESCRIPTION

[0077] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0078] Figure 1 FIG. 1 is a schematic diagram of an exemplary electronic device for implementing a method for extracting black box elements from legal evidence according to an embodiment of the present invention. Figure 1 As shown, the electronic device 100 includes one or more processors 110, one or more storage devices 120, one or more input devices 130, one or more output devices 140, etc. These components are interconnected via a bus system 150 and / or other forms of connection mechanisms. It should be noted that Figure 1 The components and structures of the electronic device shown are merely exemplary and non-limiting. The electronic device may also have other components and structures as needed.

[0079] The processor 110 may be a central processing unit (CPU), or may be composed of multiple processing cores, or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 100 to perform desired functions.

[0080] The storage device 120 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor may run the program instructions to implement the client functions and / or other desired functions in the embodiments of the present disclosure (implemented by the processor) described below. Various applications and various data may also be stored in the computer-readable storage medium, such as various data used and / or generated by the application.

[0081] The input device 130 may be a device used by a user to input instructions, and may include one or more of a keyboard, a mouse, a microphone, a touch screen, and the like.

[0082] The output device 140 may output various information (eg, images or sounds) to the outside (eg, a user), and may include one or more of a display, a speaker, and the like.

[0083] Figure 2 FIG. 1 is a flow chart of a method for extracting black box elements of legal evidence according to another embodiment of the present invention. Figure 2 As shown, a method for extracting black box elements of legal evidence includes the following steps S201 to S209:

[0084] Step S201: Obtain a legal evidence black box and an element list; wherein the legal evidence black box includes multi-format files, and the element list is a list of element names corresponding to the litigation type.

[0085] Step S202: normalize the legal evidence black box into a picture list and a text list.

[0086] Specifically, in this step, the legal evidence black box includes image files, PDF files, video files and audio files. The normalization of the legal evidence black box into an image list and a text list includes: converting the audio file into text through the Whisper model; deduplicating frames of the video file and extracting the image list through FFmpeg; and converting the PDF file into an image through the Fitz library.

[0087] In some embodiments, the legal evidence black box is normalized by a pre-processing module into an image (encoded in base64) list v_img = [url1, ..., url_n] and a text list v_text = [str1, ..., str_n].

[0088] Step S203: Generate element relationship groups based on the element list; wherein each group contains logically related elements.

[0089] Specifically, in this step, the evidence elements can be expressed as keys = [clue1, clue2..., clue_n], and the element relationship combination can be expressed as related_keys = [(clue1, clue3, clue6), (clue1, clue3), (clue2, clue7)].

[0090] Step S204: convert the element relationship group into a reordered prompt word list, output the confidence of each evidence unit and the element relationship group, and retain the highest confidence result.

[0091] Specifically, in this step, the feature relationship group is converted into a reordering prompt word list, the confidence of each evidence unit and the feature relationship group is output, and the highest confidence result is retained, including: the feature relationship group is obtained through the following relationship formula to obtain a reordering prompt word list: f(related_key) = pmpt_rerank, wherein f(related_key) is the entry function of the system, processing the associated key sequence related_key = [k1, k2, ..., kn] input input by the user, k1, k2, ..., kn are the keys input by the user through natural language interaction, each key corresponds to an evidence cutting window, pmpt_rerank is the input prompt word of the reordering model, used to locate related pages; the reordering prompt word list is reordered to obtain the confidence of each evidence unit and the feature relationship group and retain the highest confidence result.

[0092] Specifically, the system's end-user enters the related_key keyword through natural language in the interactive interface. Each key is entered, and after submission, the next key is entered. The related_key keyword equals [k1, k2, ..., kn]. The order of related_key keywords and the use of synonymous words within them can affect the final result to some extent. The related_key keyword is the only interaction between the end-user and the system; all other steps are completed iteratively by the system. The end-user can easily adjust the related_key keyword based on the results.

[0093] The relate of related_key is directly related to the cutting window of the black box evidence. For example, the default cutting window of an image is A4 size. A related_key is the set of identifiers and clues on this image, and the next page is another related_key.

[0094] A clue refers to the term whose content will be extracted. For example, if a clue is 'date', the result will be 'December 31, 2025'.

[0095] Identifiers are non-key characters on the same page, such as obvious titles on the page, or characters in seals, which do not need to be recognized but can help the re-ranking model locate the characters on the page.

[0096] pmpt_rerank=f"{'f{identifiers}':str(clues)}", a string generated by the interpolation function.

[0097] After pmpt_rerank submits the reranker model, the results returned include page index and probability.

[0098] The list of indices and probabilities returned by the model is shown in Table 1 below:

[0099] Table 1

[0100]

[0101] In some embodiments, the element relationship combination is used to generate a reordered list of prompt words using the above equation: pmpts = [pmpt1, pmpt2, ..., pmpt_n]. This list of prompt words is fed into the reordering module in parallel to obtain the confidence level of each element relationship combination for each evidence element, {v_1:q_1, v_2:q_2}. Only the highest confidence level is retained as the q_i required by the confidence module. Each element relationship in this step corresponds to a file slice in the original evidence black box, which may be text, an image, video, or audio.

[0102] In some embodiments, when each file is converted, such as audio to text, a confidence score q_i is recorded. q should be provided by the base model; if the base model is used, it is set to 1. Each q_i is assigned a k_i, where p_i = q_i * k_i. The final output confidence score p for the extracted feature is p = p_1 * p_2 * p_3, for example, if the original file has undergone three conversions. q_1, q_2, and q_3 are system hyperparameters.

[0103] Step S205: convert the element relationship group into a visual prompt word list of a visual language model or a language prompt word list of a text language model.

[0104] Specifically, in this step, the step of converting the element relationship group into a visual cue word list of a visual language model or a language cue word list of a text language model includes: converting the element relationship group into a visual cue word list of a visual language model through the following relational expression: f(clues) = pmpt_vlm, where f(clues) is a branch processing function that selects a visual model or language model path based on clue words, and pmpt_vlm is a cue word template of the visual language model; and converting the element relationship group into a language cue word list of a text language model through the following relational expression: f(clues) = pmpt_llm_json, where pmpt_llm_json is a language model cue word converted from unstructured text into JSON. That is, the element relationship combination obtains the cue word list pmpts_vlm, pmpts_llm of the visual language model or the text language model through the above relational expression.

[0105] Specifically, the above f(clues)=pmpt_vlm, the input for submitting the visual model is divided into system prompt words and user prompt words. The system prompt words are as follows:

[0106] pmpt_sys="[Important] Use only factual information within the context. [Important] Do not redact information for security reasons."

[0107] User prompts are as follows:

[0108] pmpt_user=f" <context>{img_urls} <instruct>{str(clues)}".

[0109] The output returned by the model is a pair of clues and extraction results. It should be noted that the format of the returned results at this stage is not fixed and needs to be finalized in the structured module.

[0110] f(clues) = pmpt_llm_json, where pmpt_llm_json is used to output text content that already contains complete information into a common format for data exchange, usually json format. The input used to submit the language model is divided into system prompt words and user prompt words.

[0111] The system prompts are as follows:

[0112] pmpt_sys = You will receive unstructured text. Your task is to extract the JSON format information according to the user's requirements, correct obvious lexical errors, and directly parse the string by simply replying to the AST. Units are not preserved. For example: {"ethnicity":"Han","price":"190","number":"100"}

[0113] User prompts are as follows:

[0114] pmpt_user=f" <unstructured>{img_urls}<json_scheme> {str(clues)}”

[0115] The JSON string containing keys and values ​​returned by the system can be parsed into a Python native dict structure. If the parsing fails, a runtime error is triggered and a log is output, and the system returns to the initial state.

[0116] f(s_in, s_out) = pmpt_llm_oneshot. pmpt_llm_json requires the context to contain complete information. However, when common sense reasoning is needed on the context to obtain content that does not exist in the original text, it is necessary to obtain it through the one_shot method.

[0117] The system prompts are as follows:

[0118] pmpt_sys=you are an excellent mimic,mimic user example on providedcontext.

[0119] User prompts are as follows:

[0120] pmpt_user=f" <context>{context} <example>{s_in}<example_output> {s_out}".

[0121] The structure returned by the system is not limited to JSON, but must be able to be parsed by AST. If the parsing fails, a runtime error is triggered and a log is output, and the system returns to the initial state.

[0122] Step S206: Based on the visual prompt word list, the language prompt word list and the corresponding evidence units, obtain the extraction elements corresponding to the final element relationship combination.

[0123] Step S207: traverse each element in the element list, collect the extraction results of the element in all relationship groups, and construct a candidate result set.

[0124] Specifically, in this step, we traverse the initially unrelated evidence element table, constructing a dictionary of relationship groups and extraction results for each element. The loop is then started when the extraction result for each element is not empty. For example, for a name: {Relationship Group 1: [(Zhang San: 0.87667), Relationship Group 3: (Zhang Qi: 0.41231), Relationship Group 4: (Zhang San: 0.37667)}, and so on.

[0125] Step S208: Based on the confidence reranking algorithm, the candidate result set with the lowest confidence is iteratively eliminated from the candidate result set until only a unique high-confidence result is retained for each element, thereby obtaining a target element set.

[0126] Specifically, in this step, a confidence reordering algorithm is used for the extraction results of individual elements: first, the results are reordered by confidence, then the first extracted element (i.e., the highest confidence) is checked in turn. If the results are inconsistent, they are placed at the end of the sort. After the sorting is complete, the last element is the relationship group with the lowest confidence, and all extraction results of this relationship group are eliminated. If the extraction result for a certain element is empty after extraction, then this relationship group cannot be eliminated. Finally, the target feature set is obtained.

[0127] Step S209: Output the target feature set and the corresponding original evidence slice.

[0128] The legal evidence black box element extraction method of the embodiment of the present invention achieves efficient and accurate extraction of legal evidence elements through multimodal fusion and dynamic verification mechanism, and has the following significant advantages:

[0129] 1. Break through format limitations and achieve black box adaptive processing

[0130] By normalizing multi-format evidence (images, PDFs, videos, audio) into a unified format (image / text list), the strong dependence of traditional OCR / NLP technology on input format is solved.

[0131] It can handle complex unstructured evidence in reality (such as handwritten contracts and blurry scans) and is suitable for various litigation scenarios (such as financial lending and labor disputes).

[0132] 2. Multimodal collaborative extraction to improve semantic understanding accuracy

[0133] Combining the visual model (Qwen-VL) and the text model (Qwen-LLM), the key fields in the image and the structured information in the text are analyzed respectively, and the elements and evidence slices are associated through the reranking model (Jina-Reranker).

[0134] It avoids the limitations of a single modality (such as the inability of a plain text model to identify the authenticity of a signature) and significantly improves the accuracy of feature extraction.

[0135] 3. Dynamic confidence check to ensure the reliability of results

[0136] Iteratively eliminates low-confidence results, ensuring that only unique and logically consistent high-confidence values ​​are retained for each element. This reduces manual review costs (for example, 90% of elements in a batch of cases can be automatically verified), and reduces the error rate by over 80% compared to manual extraction.

[0137] 4. End-to-end automation significantly improves efficiency

[0138] The entire process, from evidence input to factor output, is fully automated, supporting parallel processing of batch cases (e.g., processing 100+ loan agreements simultaneously). This increases processing speed by 50 times compared to manual extraction, making it suitable for high-throughput scenarios such as courts and law firms.

[0139] 5. Legal compliance assurance

[0140] The output is accompanied by a slice of the original evidence (such as a screenshot of the contract signature area), meeting the requirements for evidence traceability in legal proceedings. This avoids the possibility of breaking the chain of evidence due to technical processing and complies with regulations such as the "Regulations on Electronic Evidence."

[0141] In summary, the embodiments of this invention, through the two core technologies of multimodal fusion extraction and dynamic confidence checking, address the industry's dilemma of achieving both efficiency and accuracy in legal evidence processing, making them particularly suitable for batch litigation. The technical benefits include: an end-to-end automated pipeline, a 50-fold increase in processing speed; a reduction in error rates below 1%, significantly mitigating legal risks; and a reduction in manual review workload by over 80%.

[0142] In some embodiments, the method further comprises the steps of verifying and archiving:

[0143] The key-value list of the evidence black boxes corresponding to each defendant who has completed feature extraction is input into the embed model to generate an embedding vector matrix A. The first column of matrix A is used for batch verification, and the matching of the number of black boxes m is verified by calculating the integer value of the determinant of the nxm matrix. The second column of matrix A is used for clustering and archiving. After dimensional reorganization, the automatic classification results of the current batch of black boxes are obtained through SVD orthogonal decomposition and k-means clustering algorithm.

[0144] Specifically, in this step, each defendant has one evidence black box. The purpose of this system is to build a black box processing pipeline. The greater the number of black boxes, the more stable the system. Maintaining stability primarily relies on the verification and archiving modules. The service core of this module is an embedding model, such as Qwen3-Embedding-0.6B. The extracted key-value list is converted into an nx2 matrix A using the following formula:

[0145] embeddings=torch.tensor([data.embedding for data in self.embed.embeddings.create(input=[(str(k),str(v))for(k,v)in guy.items()],model=self.embed_name,).data]).

[0146] Let m be the number of black boxes in a batch. Take the first column of matrix A and form an nxm matrix. The determinant of this matrix should be rounded to m. Take the second column of matrix A. Note that the default dimension of the embed model is l. The second column can be reorganized into an mxl matrix. Use SVD to obtain an orthogonal matrix. Run the k-means clustering algorithm to obtain several clusters of this batch of black boxes.

[0147] The actual user usage process is as follows:

[0148] 1. Users determine the clue terms that need to be captured based on their professional knowledge.

[0149] 2. Read the random black box to initially understand the relationship and word expressions between clue entries.

[0150] 3. Type relate_keys and identifiers in the interactive interface.

[0151] 4. The system selects a random black box for extraction and outputs the results and slices.

[0152] 5. The user adjusts the expression and order of clue terms until the results of a single black box meet the expectations.

[0153] 6. The system operates in batch mode to extract all black boxes.

[0154] 7. The system feeds the extracted results into the verification and archiving template to divide the batch of black boxes into corresponding clusters.

[0155] 8. The system extracts the cluster selected by the user and writes it into the database.

[0156] 9. Randomly infer a black box from the next cluster and return to step 2.

[0157] 10. The remaining black boxes usually have defects such as missing pages or blurry pages. After replenishing the raw materials, return to step 7.

[0158] 11. All black box processing is completed.

[0159] Based on the same inventive concept, an embodiment of the present invention also provides a legal evidence black box element extraction system, which can be applied to the method described above. For details, please refer to the relevant records above and will not be repeated here.

[0160] Figure 3 FIG. 1 is a structural diagram of a legal evidence black box element extraction system according to another embodiment of the present invention. Figure 3 As shown, a legal evidence black box element extraction system includes: an acquisition module 301, a normalization module 302, a generation module 303, a conversion module 304, a traversal module 305, an iteration module 306 and an output module 307.

[0161] Specifically, such as Figure 3 As shown, the acquisition module 301 is used to obtain the legal evidence black box and the element list; wherein, the legal evidence black box includes a multi-format file, and the element list is a list of element names corresponding to the litigation type; the normalization module 302 is used to normalize the legal evidence black box into a picture list and a text list; the generation module 303 is used to generate element relationship groups based on the element list; wherein, each group contains logically related elements; the conversion module 304 is used to convert the element relationship group into a reordered prompt word list, output the confidence of each evidence unit and the element relationship group and retain the highest confidence result; the conversion module 304 is also used to convert the element relationship group into a visual language model respectively. The visual cue word list or the language cue word list of the text language model; the generation module 303 is also used to obtain the extraction elements corresponding to the final element relationship combination based on the visual cue word list and the language cue word list and the corresponding evidence units; the traversal module 305 is used to traverse each element in the element list, collect the extraction results of the element in all relationship groups, and construct a candidate result set; the iteration module 306 is used to iteratively eliminate the candidate result set with the lowest confidence in the candidate result set based on the confidence reranking algorithm, until only a unique high-confidence result is retained for each element, and a target element set is obtained; the output module 307 is used to output the target element set and the corresponding original evidence slice.

[0162] This embodiment of the present invention leverages two core technologies: multimodal fusion extraction and dynamic confidence checking. It addresses the industry challenge of achieving both efficiency and accuracy in legal evidence processing, making it particularly suitable for batch litigation. Its technical benefits include: an end-to-end automated pipeline, a 50-fold increase in processing speed, a reduction in error rates below 1%, significantly mitigating legal risks, and a reduction in manual review workload by over 80%.

[0163] In some embodiments, as Figure 3 As shown, the legal evidence black box includes image files, PDF files, video files and audio files. The normalization module 302 is specifically used to: convert the audio file into text through the Whisper model; deduplicate frames of the video file and extract the image list through FFmpeg; and convert the PDF file into an image through the Fitz library.

[0164] In some embodiments, as Figure 3 As shown, the conversion module 304 is specifically used to: obtain a reordering prompt word list from the element relationship group through the following relationship formula: f(related_key) is the system's entry function, processing the associated key sequence related_key=[k1,k2,...,kn] input input by the user, k1,k2,...,kn are the keys input by the user through natural language interaction, each key corresponds to an evidence cutting window, pmpt_rerank is the input prompt word of the reordering model, which is used to locate related pages; reorder the reordering prompt word list to obtain the confidence of each evidence unit and the element relationship group and retain the highest confidence result.

[0165] In some embodiments, the conversion module 304 is further specifically used to: convert the element relationship group into a visual cue word list of the visual language model through the following relationship: f(clues) = pmpt_vlm, where f(clues) is a branch processing function that selects a visual model or language model path according to the clue word, and pmpt_vlm is a cue word template of the visual language model; and convert the element relationship group into a language cue word list of the text language model through the following relationship: f(clues) = pmpt_llm_json, where pmpt_llm_json is a language model cue word for converting unstructured text into JSON.

[0166] In some embodiments, as Figure 3 As shown, the system also includes a verification and archiving module 308, which is used to: input the evidence black box key value list corresponding to each defendant who has completed the element extraction into the embed model to generate an embedding vector matrix A; wherein the first column of the matrix A is used for batch verification, and the matching of the number of black boxes m is verified by calculating the integer value of the determinant of the nxm matrix; the second column of the matrix A is used for clustering and archiving, and after dimensional reorganization, the automatic classification results of the current batch of black boxes are obtained through SVD orthogonal decomposition and k-means clustering algorithm.

[0167] Another aspect of the embodiments of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program can implement the method described above when executed by a processor.

[0168] The computer-readable medium may be included in the apparatus, device, or system of the present disclosure, or may exist independently.

[0169] Among them, computer-readable storage media can be any tangible medium that contains or stores a program, which can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment. More specific examples include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, an optical fiber, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0170] The computer-readable storage medium may also include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code, specific examples of which include but are not limited to electromagnetic signals, optical signals, or any suitable combination thereof.

[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.< / example> < / context> < / unstructured> < / instruct> < / context>

Claims

1. A method for extracting black box elements of legal evidence, characterized by: The method comprises: Obtaining a legal evidence black box and an element list; wherein the legal evidence black box includes multi-format files, and the element list is a list of element names corresponding to the litigation type; Normalizing the legal evidence black box into a picture list and a text list; Generating element relationship groups according to the element list; wherein each group includes logically related elements; Convert the element relationship group into a re-ordered prompt word list, output the confidence of each evidence unit and the element relationship group, and retain the highest confidence result; Converting the element relationship groups into a visual prompt word list of a visual language model or a language prompt word list of a text language model; Based on the visual prompt word list and the language prompt word list and the corresponding evidence units, obtaining the extraction elements corresponding to the final element relationship combination; Traversing each element in the element list, collecting extraction results of the element in all relationship groups, and constructing a candidate result set; Based on the confidence reranking algorithm, the candidate result set with the lowest confidence is iteratively eliminated from the candidate result set until only a unique high-confidence result is retained for each element, thereby obtaining the target element set; Output the target feature set and the corresponding original evidence slices.

2. The method for extracting black box elements of legal evidence according to claim 1, characterized in that: The legal evidence black box includes image files, PDF files, video files, and audio files. The normalization of the legal evidence black box into an image list and a text list includes: Convert the audio file into text using the Whisper model; The video file is de-duplicated using FFmpeg and a list of pictures is extracted; Convert the PDF file into an image using the Fitz library.

3. The method for extracting black box elements of legal evidence according to claim 1, characterized in that: The step of converting the element relationship group into a reordered prompt word list, outputting the confidence level of each evidence unit and the element relationship group, and retaining the highest confidence level result includes: The element relationship group is obtained through the following relationship to obtain a reordered prompt word list: f(related_key)=pmpt_rerank f(related_key) is the system's entry function, processing the user-entered related key sequence related_key = [k1, k2, ..., kn] input, where k1, k2, ..., kn are keys entered by the user through natural language interaction. Each key corresponds to an evidence cutting window, and pmpt_rerank is the input prompt word of the reranking model, which is used to locate related pages. The reordered prompt word list is reordered to obtain the confidence of each evidence unit and the element relationship group and retain the highest confidence result.

4. The method for extracting black box elements of legal evidence according to any one of claims 1 to 3, characterized in that: The step of converting the element relationship group into a visual prompt word list of a visual language model or a language prompt word list of a text language model includes: The element relationship group is converted into a visual clue word list of the visual language model through the following relationship: f(clues)=pmpt_vlm, where f(clues) is a branch processing function that selects a visual model or language model path according to the clue word, and pmpt_vlm is a clue word template of the visual language model; The element relationship group is converted into a language clue word list of a text language model through the following relationship: f(clues)=pmpt_llm_json, where pmpt_llm_json is a language model clue word for converting unstructured text into JSON.

5. The method for extracting black box elements of legal evidence according to any one of claims 1 to 3, characterized in that: The method further comprises the steps of verifying and archiving: Input the black box key value list of each defendant whose elements have been extracted into the embed model to generate the embedding vector matrix A; Among them, the first column of matrix A is used for batch verification, and the matching of the number of black boxes m is verified by calculating the integer value of the determinant of the nxm matrix; the second column of matrix A is used for clustering and archiving. After dimensional reorganization, the automatic classification results of the current batch of black boxes are obtained through SVD orthogonal decomposition and k-means clustering algorithm.

6. A legal evidence black box element extraction system, characterized by: The system comprises: An acquisition module, configured to acquire a legal evidence black box and an element list; wherein the legal evidence black box includes files in multiple formats, and the element list is a list of element names corresponding to the litigation type; A normalization module, configured to normalize the legal evidence black box into an image list and a text list; A generating module, configured to generate element relationship groups according to the element list; wherein each group includes logically related elements; a conversion module, configured to convert the element relationship group into a reordered prompt word list, output the confidence level of each evidence unit and the element relationship group, and retain the highest confidence level result; The conversion module is further configured to convert the element relationship group into a visual prompt word list of a visual language model or a language prompt word list of a text language model; The generating module is further configured to obtain the extraction elements corresponding to the final element relationship combination based on the visual prompt word list and the language prompt word list and the corresponding evidence units; A traversal module, configured to traverse each element in the element list, collect extraction results of the element in all relationship groups, and construct a candidate result set; An iterative module is used to iteratively eliminate the candidate result set with the lowest confidence from the candidate result set based on the confidence reranking algorithm until only a unique high-confidence result is retained for each element, thereby obtaining a target element set; The output module is used to output the target feature set and the corresponding original evidence slices.

7. The legal evidence black box element extraction system according to claim 6 is characterized in that: The legal evidence black box includes image files, PDF files, video files, and audio files. The normalization module is further used to: Convert the audio file into text using the Whisper model; The video file is de-duplicated using FFmpeg and a list of pictures is extracted; Convert the PDF file into an image using the Fitz library.

8. The legal evidence black box element extraction system according to claim 6 is characterized in that: The conversion module is further configured to: The element relationship group is obtained by the following relationship formula to obtain a re-ordering prompt word list: f(related_key)=pmpt_rerank, wherein f(related_key) is the system entry function, which processes the related key sequence related_key=[k1, k2, ..., kn] input input by the user, k1, k2, ..., kn are keys input by the user through natural language interaction, each key corresponds to an evidence cutting window, and pmpt_rerank is the input prompt word of the re-ordering model, which is used to locate related pages; the re-ordering prompt word list is re-ordered to obtain the confidence of each evidence unit and the element relationship group and retain the highest confidence result; and / or, The element relationship group is converted into a visual cue word list of the visual language model through the following relationship: f(clues) = pmpt_vlm, where f(clues) is a branch processing function that selects a visual model or a language model path according to the clue word, and pmpt_vlm is a cue word template of the visual language model; and the element relationship group is converted into a language cue word list of the text language model through the following relationship: f(clues) = pmpt_llm_json, where pmpt_llm_json is a language model cue word for converting unstructured text into JSON.

9. The legal evidence black box element extraction system according to any one of claims 6 to 8, characterized in that: Also includes verification and archiving modules for: Input the black box key value list of each defendant whose elements have been extracted into the embed model to generate the embedding vector matrix A; Among them, the first column of matrix A is used for batch verification, and the matching of the number of black boxes m is verified by calculating the integer value of the determinant of the nxm matrix; the second column of matrix A is used for clustering and archiving. After dimensional reorganization, the automatic classification results of the current batch of black boxes are obtained through SVD orthogonal decomposition and k-means clustering algorithm.

10. An electronic device, characterized in that: include: one or more processors; A storage unit for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the legal evidence black box element extraction method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Legal element extraction method and device

    CN115034199A

  • Knowledge-driven underground building design scheme intelligent examination method, system and equipment

    CN120216671A

  • System and method for interactive multi-dimensional visual representation of information content and properties

    EP1667034A2

  • Data identification and extraction from unstructured documents

    US20240311581A1