Large-model-based full-duty investigation method and large-model-based full-duty investigation device
By introducing a large-model-based due diligence method in traditional due diligence systems, using OCR, natural language processing and large-language models to identify the types, structures and terms of contract documents, the problem of insufficient qualitative risk management in traditional due diligence systems is solved, and more efficient and accurate risk management is achieved.
Patent Information
- Application Number
- CN202510038862.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Qualitative risk management is the main body in traditional due diligence systems, and there are shortcomings such as narrow data acquisition dimensions, weak quantitative analysis capabilities, and difficulty in accurately measuring user characteristics, resulting in lagging risk management.
Using a large-model-based due diligence method, the contract documents are converted into editable text through OCR technology, key information is extracted using natural language processing technology, and the type, structure and terms of the contract documents are identified using the trained LLM model and BERT model, semantic analysis and similarity detection are carried out to identify potential legal risks.
It improves the reliability and accuracy of due diligence, enables more accurate identification of potential legal risks, and enhances the forward-looking and effective risk management.
Smart Images

Figure CN119886834A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of data processing, and in particular to a due diligence method and device based on a large model. Background Art
[0002] Due diligence is a comprehensive, risk-oriented investigation and assessment of a client before establishing a business relationship with the client. The purpose of due diligence is to conduct a series of investigations into the client's assets and liabilities, operating and financial conditions, legal relationships, and opportunities and potential risks faced by the target company.
[0003] In traditional due diligence systems, qualitative risk management is the mainstay, based on subjective rules and customer ratings, and has shortcomings such as narrow data acquisition dimensions, weak quantitative analysis capabilities, and difficulty in accurately identifying user characteristics. Evaluations are generally based on predictions of customer historical behaviors and data, and risk management lags behind. Therefore, it is necessary to provide a due diligence method and device based on a large model to solve the above problems. Summary of the invention
[0004] The purpose of the embodiments of the present application is to propose a due diligence method and device based on a large model, which uses a trained LLM model and a BERT model to identify the type, structure and terms of contract documents, thereby identifying potential legal risks and improving the reliability and accuracy of due diligence.
[0005] According to one aspect of the present invention, a due diligence method based on a large model is provided, the method comprising: Convert scanned contract documents into editable text using OCR technology; Extracting key information of the editable text using natural language processing technology; Using a first large model to understand the deep meaning of the key information and identify the type and structure of the contract document, the first large model being a trained LLM model; The second largest model is used to perform semantic analysis and similarity detection on the terms of the contract document to identify potential legal risks. The second largest model is the BERT model.
[0006] Preferably, the extracting key information of the editable text using natural language processing technology includes: extracting the key information through regular expressions and named entity recognition.
[0007] Preferably, extracting key information of the editable text by using a regular expression includes: Split according to the character length of the set block; Alternatively, segmentation is performed in combination with a hierarchical structure of key information of the editable text; Alternatively, the key information of the editable text is first taken as a whole as a block, and then gaps are added through a regular expression.
[0008] Preferably, recursive operations are performed while partitioning to achieve nested partitioning, and regular expressions are used for extraction, whereby the extracted output includes triple data groups, two of which are entity types, and the remaining one of which is a relationship type.
[0009] Preferably, each text block is indexed for subsequent retrieval, and the indexing includes: Chain indexing, sequentially indexing the text blocks through a chain list structure; Alternatively, a tree index is used to construct the text block into a hierarchical tree index structure; Alternatively, a keyword table index extracts keywords from the text block and constructs a many-to-many mapping between keywords and the text block; Alternatively, vector indexing, after mapping the text block into a vector, performs query through a similarity calculation method, mapping the text block into a vector specifically includes: mapping the high-dimensional text block into a low-dimensional space to generate a vector representation through a third largest model, the similarity calculation method includes an inner product, Euclidean distance and cosine distance, and the third largest model is an embedding model.
[0010] Preferably, querying by similarity calculation method specifically includes: after text vectorization and question vectorization, matching the text most similar to the question vector in the text vector, and adding the most similar text as context and question to the prompt module.
[0011] Preferably, the second large model can simultaneously capture the contextual information of the contract document by introducing the self-attention mechanism of Transformer, and the structural hierarchy of the second large model includes an input embedding layer, multiple encoder layers, a pre-training task layer and a fine-tuning layer.
[0012] According to another aspect of the present invention, a due diligence device based on a large model is provided, the device comprising: A contract document conversion module, which is used to convert the scanned contract document into editable text through OCR technology; A key information extraction module, which is used to extract key information of the editable text using natural language processing technology; A first large model recognition module, which is used to use a trained first large model to understand the deep meaning of the key information and identify the type and structure of the contract document, wherein the first large model is a trained LLM model; The second largest model identification module is used to use the second largest model to deeply analyze the terms of the contract document and identify potential legal risks, and the second largest model is the BERT model.
[0013] Compared with the prior art, the technical solution of the embodiment of the present invention has the following beneficial effects: An embodiment of the present invention provides a large-model-based due diligence method and device, the method comprising: converting a scanned contract document into an editable text by using OCR technology; extracting key information of the editable text by using natural language processing technology; using a trained first large model to understand the deep meaning of the key information and identify the type and structure of the contract document, the first large model is a trained LLM model; using a second large model to perform semantic analysis and similarity detection on the terms of the contract document to identify potential legal risks, the second large model is a BERT model, by using the trained LLM model and the BERT model to identify the type, structure and terms of the contract document, thereby identifying potential legal risks and improving the reliability and accuracy of due diligence. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are some embodiments of the present invention, not all embodiments. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor.
[0015] Figure 1 is a flowchart of a due diligence method based on a large model according to an embodiment of the present invention; Figure 2 is a module schematic diagram of a large model-based due diligence device according to an embodiment of the present invention; Figure 3 FIG. 4 is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. According to 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.
[0017] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0018] In view of the problems existing in the prior art, an embodiment of the present invention provides a due diligence method and device based on a large model, which uses a trained LLM model and a BERT model to identify the type, structure and terms of a contract document, thereby identifying potential legal risks and improving the reliability and accuracy of due diligence.
[0019] Figure 1 is a flow chart of a due diligence method based on a large model according to an embodiment of the present invention. Figure 1 According to one aspect of the present invention, a due diligence method based on a large model is provided, the method comprising: Step S101: converting the scanned contract document into editable text by using OCR (Optical Character Recognition) technology; Step S102: extracting key information of the editable text using natural language processing technology; Step S103: using the trained first large model to understand the deep meaning of the key information and identify the type and structure of the contract document, wherein the first large model is a trained LLM (Large Language Model) model; Step S104: Use the second largest model to perform semantic analysis and similarity detection on the terms of the contract document to identify potential legal risks, where the second largest model is the BERT model (Bidirectional Encoder Representations from Transformers, a pre-trained language model based on the Transformer architecture).
[0020] Specifically, the key information of the editable text includes the contract subject, contract amount, contract term, breach of contract liability, clause name, clause content, and clause number of the contract document.
[0021] In a specific implementation, the extracting key information of the editable text using natural language processing technology includes: extracting the key information through regular expressions and named entity recognition.
[0022] In a specific implementation, extracting key information of the editable text by using a regular expression includes: Split according to the character length of the set block; Alternatively, segmentation is performed in combination with a hierarchical structure of key information of the editable text; Alternatively, the key information of the editable text is first taken as a whole as a block, and then gaps are added through a regular expression.
[0023] Specifically, the editable text may be segmented according to semantics, and the editable text may be understood by combining the LLM model and the BERT model, and segmented and spliced according to semantics.
[0024] In a specific implementation, recursive operations are performed while partitioning to achieve nested partitioning, and regular expressions are used for extraction, and the extracted output includes triple data groups, two of which are entity types, and the remaining one of which is a relationship type.
[0025] In a specific implementation, an index is created for each text block for subsequent retrieval, and the index creation includes: Chain indexing, sequentially indexing the text blocks through a chain list structure; Alternatively, a tree index is used to construct the text block into a hierarchical tree index structure; Alternatively, a keyword table index extracts keywords from the text block and constructs a many-to-many mapping between keywords and the text block; Alternatively, vector indexing, after mapping the text block into a vector, querying is performed by a similarity calculation method, and mapping the text block into a vector specifically includes mapping the high-dimensional text block into a low-dimensional space to generate a vector representation through a third model. The similarity calculation method includes inner product, Euclidean distance and cosine distance, and the third model is an embedding model.
[0026] In a specific implementation, the query is performed by a similarity calculation method, specifically including text vectorization and question vectorization, and then the text most similar to the question vector is matched in the text vector, and the most similar text is added to the prompt module as context and question.
[0027] In a specific implementation, the second large model can simultaneously capture the contextual information of the contract document by introducing the self-attention mechanism of Transformer. The structural hierarchy of the second large model includes an input embedding layer, multiple encoder layers, a pre-training task layer and a fine-tuning layer.
[0028] Figure 2 is a schematic diagram of a module of a due diligence device based on a large model according to an embodiment of the present invention. Figure 2According to another aspect of the present invention, a due diligence device based on a large model is provided, the device comprising: A contract document conversion module 21, which is used to convert the scanned contract document into editable text by using OCR technology; A key information extraction module 22, which is used to extract key information of the editable text using natural language processing technology; A first large model recognition module 23, which is used to use the trained first large model to understand the deep meaning of the key information and identify the type and structure of the contract document, wherein the first large model is a trained LLM model; The second largest model identification module 24 is used to use the second largest model to deeply analyze the terms of the contract document and identify potential legal risks. The second largest model is a BERT model.
[0029] Figure 3 is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present application. Figure 3 As shown, an electronic device 300 provided in this embodiment includes: a processor 301 and a memory 302; wherein: The memory 302 is used to store computer programs, and the memory may also be a flash memory.
[0030] The processor 301 is used to execute the execution instructions stored in the memory to implement each step in the above method. For details, please refer to the relevant description in the above method embodiment.
[0031] Optionally, the memory 302 may be independent or integrated with the processor 401 .
[0032] When the memory 302 is a device independent of the processor 301, the electronic device 300 may further include: The bus 303 is used to connect the memory 302 and the processor 301 .
[0033] This embodiment further provides a readable storage medium, in which a computer program is stored. When at least one processor of an electronic device executes the computer program, the electronic device executes the methods provided in the above-mentioned various implementation modes.
[0034] This embodiment also provides a program product, which includes a computer program stored in a readable storage medium. At least one processor of the electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device implements the methods provided in the above various embodiments.
[0035] In summary, the embodiment of the present application discloses a due diligence method and device based on a large model, the method comprising: converting a scanned contract document into an editable text through OCR technology; extracting key information of the editable text using natural language processing technology; using a trained first large model to understand the deep meaning of the key information and identify the type and structure of the contract document, the first large model being a trained LLM model; using a second large model to perform semantic analysis and similarity detection on the terms of the contract document to identify potential legal risks, the second large model being a BERT model, by using the trained LLM model and the BERT model to identify the type, structure and terms of the contract document, thereby identifying potential legal risks and improving the reliability and accuracy of due diligence.
[0036] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.
[0037] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A due diligence method based on a large model, characterized in that: The method comprises: Convert scanned contract documents into editable text using OCR technology; Extracting key information of the editable text using natural language processing technology; Using a first large model to understand the deep meaning of the key information and identify the type and structure of the contract document, the first large model being a trained LLM model; The second largest model is used to perform semantic analysis and similarity detection on the terms of the contract document to identify potential legal risks. The second largest model is the BERT model.
2. The due diligence method based on a large model according to claim 1, characterized in that: The extracting key information of the editable text using natural language processing technology includes: extracting the key information through regular expressions and named entity recognition.
3. The due diligence method based on a large model according to claim 2, characterized in that: Extracting key information of the editable text by using a regular expression includes: Split according to the character length of the set block; Alternatively, segmentation is performed in combination with a hierarchical structure of key information of the editable text; Alternatively, the key information of the editable text is first taken as a whole as a block, and then gaps are added through a regular expression.
4. The due diligence method based on a large model according to claim 3, characterized in that: Recursive operations are performed while partitioning to achieve nested partitioning, and regular expressions are used for extraction, whereby the extracted output includes triple data groups, two of which are entity types, and the remaining one of which is a relationship type.
5. The due diligence method based on a large model according to claim 3, characterized in that: An index is created for each text block for subsequent retrieval, wherein the index creation includes: Chain indexing, sequentially indexing the text blocks through a chain list structure; Alternatively, a tree index is used to construct the text block into a hierarchical tree index structure; Alternatively, a keyword table index extracts keywords from the text block and constructs a many-to-many mapping between keywords and the text block; Alternatively, vector indexing, after mapping the text block into a vector, performs query through a similarity calculation method, mapping the text block into a vector specifically includes: mapping the high-dimensional text block into a low-dimensional space to generate a vector representation through a third largest model, the similarity calculation method includes an inner product, Euclidean distance and cosine distance, and the third largest model is an embedding model.
6. The due diligence method based on a large model according to claim 5, characterized in that: The query by similarity calculation method specifically includes: after text vectorization and question vectorization, matching the text most similar to the question vector in the text vector, and adding the most similar text as context and question to the prompt module.
7. The due diligence method based on a large model according to claim 1, characterized in that: The second largest model can simultaneously capture the contextual information of the contract document by introducing the self-attention mechanism of Transformer. The structural hierarchy of the second largest model includes an input embedding layer, multiple encoder layers, a pre-training task layer and a fine-tuning layer.
8. A due diligence device based on a large model, characterized in that: The device comprises: A contract document conversion module, which is used to convert the scanned contract document into editable text through OCR technology; A key information extraction module, which is used to extract key information of the editable text using natural language processing technology; A first large model recognition module, which is used to use a trained first large model to understand the deep meaning of the key information and identify the type and structure of the contract document, wherein the first large model is a trained LLM model; The second largest model identification module is used to use the second largest model to deeply analyze the terms of the contract document and identify potential legal risks, and the second largest model is the BERT model.
9. An electronic device, characterized in that: include: processor; as well as, A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
Citation Information
Patent Citations
Contract term risk check method, system and device and storage medium
CN116843175A
Contract review report generation method based on large model integrated optimization
CN118940732A
Special vehicle operation and maintenance knowledge retrieval method based on large model
CN119066144A
Contract evaluation method, system and equipment based on large model and medium
CN119149742A
Information extraction from document corpora
US20230132061A1