Electronic contract key information extraction method, system and device and medium

Through preset large language model and preset prompt words, the electronic contract text is extracted and annotated, which solves the problem that the existing technology cannot adapt to different text types in real time, and achieves higher flexibility and scalability.

CN120087365AInactive Publication Date: 2025-06-03BEIJING ANZHENGTONG INFORMATION TECH HLDG CO LTD

Patent Information

Application Number
CN202510578853.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-06-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing method of extracting key information of electronic contracts cannot be applied to different text types in real time, limiting its flexibility and scalability in practical applications.

Method used

The first round of keyword extraction of the contract text of the electronic contract is performed through the preset large language model and the preset prompt word to determine whether the keyword text meets the preset conditions. If it is satisfied, the target keyword text will be obtained and its text coordinates will be marked.

Benefits of technology

Dynamically enhance the connection between electronic contract management and key information extraction, expand the types of extraction contracts, reduce the cost of early model training and development, and improve flexibility and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120087365A_ABST
    Figure CN120087365A_ABST
Patent Text Reader

Abstract

The invention relates to a natural language processing technology, and discloses an electronic contract key information extraction method, system and device and a medium. The method comprises the following steps: performing a first round of keyword extraction on a contract text corresponding to an electronic contract through a preset large language model and a preset cue word to obtain a keyword text corresponding to the contract text; judging whether the keyword text meets a preset condition or not; the preset condition comprises a preset format and a preset field requirement; if the preset condition is met, obtaining a target keyword text corresponding to a keyword in the keyword text; and obtaining a text coordinate corresponding to the target keyword text in the contract text, and labeling the keyword text according to the text coordinate. According to the method, the preset large language model and the natural language processing technology are combined, the connection of electronic contract management and key information extraction can be dynamically enhanced, the extracted contract type is expanded, the early-stage model training cost and development cost are reduced, and the flexibility and expandability 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 natural language processing, and in particular, to a method, system, device and medium for extracting key information of electronic contracts. Background Art

[0002] Currently, the keyword extraction technology for electronic contracts mainly relies on artificial intelligence and deep learning algorithms, including natural language processing (NLP) technologies such as semantic role labeling, named entity recognition (NER), etc.; and deep learning methods such as convolutional neural networks (CNNs), recurrent neural networks (RNNs), etc. The keyword extraction methods based on natural language processing technologies have disadvantages such as limited context understanding, lack of flexibility, and difficulty in maintenance. The keyword extraction methods based on deep learning have disadvantages such as strong data dependence, limited generalization ability, and high requirements for inference computing resources. Therefore, the existing technologies usually cannot adapt to the needs of different text types in real time, restricting their flexibility and scalability in practical applications. Summary of the Invention

[0003] In order to solve the problem that the existing methods for extracting key information of electronic contracts cannot be applied to different text types in real time, the present invention provides a method, system, device and medium for extracting key information of electronic contracts.

[0004] In a first aspect, the present invention provides a method for extracting key information of an electronic contract, including: Performing a first round of keyword extraction on the contract text corresponding to the electronic contract through a preset large language model and a preset prompt word to obtain a keyword text corresponding to the contract text; Judging whether the keyword text meets a preset condition; the preset condition includes a preset format and a preset field requirement; If the preset condition is met, obtaining a target keyword text corresponding to the keyword in the keyword text; Obtaining the text coordinates corresponding to the target keyword text in the contract text, and annotating the keyword text according to the text coordinates.

[0005] In an optional implementation manner, the preset large language model includes an input embedding layer, a position encoding layer, a self-attention mechanism layer, and an output layer. The performing a first round of keyword extraction on the contract text corresponding to the electronic contract through a preset large language model and a preset prompt word to obtain a keyword text corresponding to the contract text includes: Obtaining the contract text through the input embedding layer, converting the contract text into a text sequence, and mapping the text sequence into a corresponding high-dimensional vector; Inject position information into each vector in the high-dimensional vector through the position encoding layer, and perform position encoding on each vector through the rotation matrix in the position encoding layer to obtain the encoding information corresponding to each high-dimensional vector; Adjust the attention degree of the encoding information through the self-attention network of the self-attention mechanism layer to obtain the dependency relationship between each encoding information, and classify the encoding information according to the dependency relationship through the feed-forward neural network of the self-attention mechanism layer to obtain a classification result; Output the probability distribution corresponding to the text sequence through the output layer according to the classification result and the preset prompt word, and extract the keyword text in the contract text according to the probability distribution.

[0006] In an alternative embodiment, the judging whether the keyword text meets a preset condition includes: Judging whether the format of the keyword text meets the preset format; If the preset format is not met, perform a second round of keyword extraction on the keyword text according to the preset prompt word.

[0007] In an alternative embodiment, the judging whether the format of the keyword text meets the preset format includes: If the format of the keyword text meets the preset format, judge whether the fields in the keyword text meet the preset field requirements; If the preset field requirements are not met, perform the second round of keyword extraction on the keyword text according to the preset prompt word.

[0008] In an alternative embodiment, the judging whether the fields in the keyword text meet the preset field requirements includes: If the preset field requirements are met, judge whether there is a positioning information of a first target keyword in the keyword text that cannot be obtained; If so, delete the field corresponding to the target keyword, and perform a first round of original text extraction on the contract text according to the preset prompt word to obtain a first round of original text extraction result.

[0009] In an alternative embodiment, the method further includes: Judging whether the format of the first round of original text extraction result meets the preset format; If not, perform a second round of original text extraction on the contract text according to the preset prompt word to obtain a second round of original text extraction result; Judging whether there is at least one positioning information of a second target keyword in the second round of original text extraction result that cannot be obtained; If it exists, obtaining the second key field corresponding to the second target keyword; The relative position of the second key field in the contract text is obtained, and the second key field is marked according to the relative position.

[0010] In an optional embodiment, the method further comprises: Obtaining extraction results corresponding to the second round of keyword extraction, and obtaining location information of each keyword in the extraction results; Generate a corresponding annotation according to the positioning information of the keyword.

[0011] In a second aspect, the present invention provides a system for extracting key information of an electronic contract, comprising: An extraction module, used to perform a first round of keyword extraction on the contract text corresponding to the electronic contract by using a preset large language model and preset prompt words, to obtain a keyword text corresponding to the contract text; A judgment module, used to judge whether the keyword text meets preset conditions; the preset conditions include preset format and preset field requirements; An acquisition module, configured to acquire a target keyword text corresponding to a keyword in the keyword text if the preset condition is met; The marking module is used to obtain the text coordinates corresponding to the target keyword text in the contract text, and mark the keyword text according to the text coordinates.

[0012] In a third aspect, the present invention provides a computer device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the method for extracting key information of an electronic contract described in the first aspect.

[0013] In a fourth aspect, the present invention provides a computer storage medium storing a computer program, which, when executed on a processor, implements the method for extracting key information of an electronic contract according to the first aspect.

[0014] The embodiments of the present invention have the following beneficial effects: The method for extracting key information from electronic contracts provided by the present invention, combined with a preset large language model and natural language processing technology, can dynamically enhance the connection between electronic contract management and key information extraction, expand the types of extracted contracts, reduce the initial model training costs and development costs, and improve flexibility and scalability. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] To more clearly illustrate the technical solutions of the present invention, the accompanying drawings required in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the protection scope of the present invention. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.

[0016] Figure 1 It shows a schematic flowchart of a method for extracting key information of an electronic contract provided by an embodiment of the present application; Figure 2 It shows a schematic flowchart of a method for judging a preset format provided by an embodiment of the present application; Figure 3 It shows a schematic framework diagram of a system for extracting key information of an electronic contract provided by an embodiment of the present application. Detailed Embodiments

[0017] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments.

[0018] Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention.

[0019] In the following text, the terms "including", "having" and their cognates that can be used in various embodiments of the present invention are only intended to represent specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.

[0020] In addition, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0021] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the present invention pertain. The terms (such as those defined in a general use dictionary) will be interpreted to have the same meaning as their contextual meaning in the relevant technical field and will not be interpreted to have an idealized or overly formal meaning unless clearly defined in various embodiments of the present invention.

[0022] The following will, with reference to the accompanying drawings, elaborate on some embodiments of the present invention. Without conflict, the following embodiments and the features in the embodiments may be combined with each other.

[0023] Refer to Figure 1 , Figure 1 which is a schematic flowchart of a method for extracting key information of an electronic contract provided for this embodiment. The method includes: S101: Perform a first round of keyword extraction on the contract text corresponding to the electronic contract through a preset large language model and preset prompt words to obtain a keyword text corresponding to the contract text.

[0024] First, the electronic contract can be converted into a contract text in an extractable format through a format conversion model, and then all the text in the contract text can be recognized and extracted through optical character recognition technology. Then, the text is processed such as text cleaning, word segmentation, and denoising to obtain a processed text. Then, keyword extraction is performed on the processed text through a preset large language model and preset prompt words to obtain the keyword text in the contract text. The keyword text includes, but is not limited to, the names of both parties to the contract, contract amount, contract term, payment terms, liability for breach of contract, etc. in the contract text.

[0025] S102: Determine whether the keyword text meets preset conditions; the preset conditions include preset format and preset field requirements.

[0026] After obtaining the keyword text, it is also necessary to verify the keyword text through preset conditions. The preset conditions can be preset format and preset field requirements. For example, for telephone numbers, email addresses, bank accounts, etc. in the contract, it is necessary to determine that their formats are normal formats, such as a telephone number must be eleven digits, etc.

[0027] S103: If the preset conditions are met, obtain the target keyword text corresponding to the keyword in the keyword text.

[0028] If the keyword text meets all the preset conditions, the target keyword text corresponding to each keyword in the keyword text can be obtained. For example, the text corresponding to the contract amount can be found according to the keyword "contract amount", such as "contract amount: 12,000 yuan", and it is used as the target keyword text.

[0029] S104: Obtain text coordinates corresponding to the target keyword text in the contract text, and mark the keyword text according to the text coordinates.

[0030] A corresponding text positioning coordinate system may be generated first according to the contract text area, and then the text coordinates of the target key text may be determined according to the text positioning coordinate system, and the key text may be annotated according to the text coordinates.

[0031] This embodiment combines a preset large language model with natural language processing technology to dynamically enhance the connection between electronic contract management and key information extraction, expand the types of extracted contracts, reduce initial model training costs and development costs, improve flexibility and scalability, speed up the processing of electronic contracts, and enhance the intelligence level of business systems.

[0032] In one embodiment, the preset large language model includes an input embedding layer, a position encoding layer, a self-attention mechanism layer, and an output layer. The first round of keyword extraction is performed on the contract text corresponding to the electronic contract by using the preset large language model and the preset prompt words to obtain the keyword text corresponding to the contract text, including: Acquire the contract text through the input embedding layer, convert the contract text into a text sequence, and map the text sequence into a corresponding high-dimensional vector; Injecting position information into each vector in the high-dimensional vector through the position encoding layer, and performing position encoding on each vector through the rotation matrix in the position encoding layer to obtain encoding information corresponding to each high-dimensional vector; The attention degree of the coded information is adjusted by the self-attention network of the self-attention mechanism layer to obtain the dependency relationship between each coded information, and the coded information is classified according to the dependency relationship by the feedforward neural network of the self-attention mechanism layer to obtain a classification result; The output layer outputs the probability distribution corresponding to the text sequence according to the classification result and the preset prompt word, and extracts the keyword text in the contract text according to the probability distribution.

[0033] Among them, the pre-set large language model can be an improved Qwen model. The improved Qwen model mainly includes an input embedding layer, a position encoding layer, a self-attention mechanism layer, and an output layer. Among them, the self-attention mechanism layer can capture the global and local relationships of the input sequence layer by layer through the self-attention mechanism and the feed-forward network, construct a deep semantic expression, and thus achieve the accurate extraction of keywords by the model.

[0034] In this embodiment, the pre-set large language model is obtained by improving the large language model, so that the improved model has strong generalization ability and context understanding ability, thereby improving the efficiency and accuracy of keyword extraction.

[0035] Refer to Figure 2 , step S102 includes: steps S1021 - S1022.

[0036] S1021. Judge whether the format of the keyword text meets the pre-set format.

[0037] S1022. If it does not meet the pre-set format, perform a second round of keyword extraction on the keyword text according to the pre-set prompt words.

[0038] The pre-set format can include various types. For example, for the contract amount, it is necessary to ensure that the amount must end with yuan or ten thousand yuan, and the telephone number and bank account number must be numbers with a pre-set number of digits, etc. If the format of at least one keyword text does not meet the pre-set format, it is necessary to perform a second round of keyword extraction on the keyword text according to the pre-set prompt words.

[0039] In this embodiment, by constructing the pre-set format requirements in advance, then judging whether all keyword texts meet the pre-set format, and if there are keyword texts that do not meet the pre-set format, performing a second round of keyword extraction on the keyword texts, so as to ensure that all keyword texts meet the pre-set format requirements, making the accuracy of the extracted key information higher.

[0040] In one implementation manner, the judgment of whether the format of the keyword text meets the pre-set format includes: If the format of the keyword text meets the pre-set format, judge whether the fields in the keyword text meet the pre-set field requirements; If it does not meet the pre-set field requirements, perform the second round of keyword extraction on the keyword text according to the pre-set prompt words.

[0041] If the formats of all keyword texts meet the preset formats, then determine whether the keyword texts meet the preset field requirements. The preset field requirements can be to determine whether there are additional fields in the keyword texts. For example: determine whether there are symbols or Chinese characters in the phone number and bank account number. If there are, it can be determined that the keyword text does not meet the preset field requirements, and a second round of keyword extraction is performed on the keyword text.

[0042] The preset prompt words for the second round of keyword extraction can be the same as those for the first round of keyword extraction. The process of the second round of keyword extraction can be formulated according to the preset conditions. For keyword texts that do not meet the preset formats, format adjustment is also required during the second round of keyword extraction. For keyword texts that do not meet the preset field requirements, field adjustment is performed during the second round of keyword extraction.

[0043] For example, for a phone number, if there are symbols or Chinese characters, then during the second round of keyword extraction, the symbols and Chinese characters need to be removed, and only the numbers are retained. If the number of digits of the phone number is missing, then it is necessary to search the context before and after the phone number, etc.

[0044] In this embodiment, when the keyword text does not meet the preset conditions, a second round of keyword extraction is performed on the keyword text according to the type of the preset conditions, thereby reducing the error rate of the keyword text and improving the accuracy of keyword extraction.

[0045] In one implementation manner, the method further includes: constructing a text positioning coordinate system according to the contract text.

[0046] Specifically, when extracting keywords, a corresponding text detection box can be generated to construct a corresponding text positioning coordinate system. For example, when there is only one text detection box in the contract text, the text positioning coordinate system can be constructed according to the left edge, right edge, upper edge, and lower edge of the text detection box. If there are multiple text detection boxes, the corresponding text positioning coordinate system can be constructed according to the number and positions of the text detection boxes in the contract text. According to the text positioning coordinate system, the positioning information of each character can be determined, and the positioning information can be reflected in the form of coordinates.

[0047] In one implementation manner, determining whether the fields in the keyword text meet the preset field requirements includes: If the preset field requirements are met, then determine whether there is a positioning information of a first target keyword that cannot be obtained in the keyword text; If there is, then delete the field corresponding to the target keyword, and perform the first round of original text extraction on the contract text according to the preset prompt words to obtain the first round of original text extraction result.

[0048] Specifically, when the location information of the extracted keyword text cannot be obtained from the contract text, the first-round original text extraction result corresponding to the keyword text needs to be extracted from the contract text, where the first-round original text extraction result can be the original sentence or paragraph where the keyword text is located.

[0049] After obtaining the first-round original text extraction result, it is then determined whether the format of the first-round original text extraction result meets the preset format; If not, the contract text is subjected to a second-round original text extraction according to the preset prompt words to obtain a second-round original text extraction result; It is determined whether there is at least one positioning information of a second target keyword that cannot be obtained in the second-round original text extraction result; If so, the second keyword field corresponding to the second target keyword is obtained; The relative position of the second keyword field in the contract text is obtained, and the second keyword field is marked according to the relative position.

[0050] For example, for some special texts, since they exist alone and their exact coordinates cannot be accurately obtained, at this time, a second-round original text extraction can be performed on the second target keyword field where the second target keyword is located. The second-round original text extraction mainly extracts the context where the second target keyword field is located, determines the relative position of the context where the second target keyword field is located according to the context information, and then marks the second keyword field according to the relative position.

[0051] Marking the field is mainly used to highlight the position of the key information, facilitating the user to view and check the key information of the contract and improving the efficiency of contract checking.

[0052] If the phone number information cannot be accurately located, and it is determined through the second-round original text extraction that the previous information of the phone number information is the email information and the subsequent information is the bank account information, at this time, the area where the phone number information is located can be determined according to the positions of the email information and the bank account information, and then the accurate position of the phone number information can be found by using text detection and other methods.

[0053] In this embodiment, for the second target keyword field that cannot be accurately located, through the second-round original text extraction, the context information of the second keyword field is determined, and then the relative position of the second target keyword field is determined. The second target keyword field is marked according to the relative position, which improves the accuracy of contract key information extraction and standardization.

[0054] Refer to Figure 3 , Figure 3 FIG. 300 is a schematic structural diagram of a framework of an electronic contract key information extraction system provided by this embodiment. The system includes: An extraction module 301 is configured to perform a first-round keyword extraction on the contract text corresponding to the electronic contract through a preset large language model and preset prompt words, and obtain a keyword text corresponding to the contract text; A judgment module 302 is configured to judge whether the keyword text meets a preset condition; the preset condition includes a preset format and a preset field requirement; An acquisition module 303 is configured to, if the preset condition is met, acquire a target keyword text corresponding to the keyword in the keyword text; A marking module 304 is configured to acquire the text coordinates corresponding to the target keyword text in the contract text, and mark the keyword text according to the text coordinates.

[0055] It can be understood that the electronic contract key information extraction system in this embodiment corresponds to the electronic contract key information extraction method in the above embodiment, and the optional items in the above embodiment are also applicable to this embodiment, so they will not be described again here.

[0056] The present invention also provides a computer device. Exemplarily, the computer device includes a processor and a memory. Among them, the memory stores a computer program, and the processor runs the computer program to enable the computer device to execute the above-mentioned electronic contract key information extraction method or the functions of each module in the above-mentioned electronic contract key information extraction system.

[0057] Among them, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention.

[0058] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electric Erasable Programmable Read-Only Memory (EEPROM), etc. Among them, the memory is used to store a computer program, and after receiving an execution instruction, the processor can execute the computer program accordingly.

[0059] The present invention also provides a computer storage medium for storing the computer program used in the above computer device. Among them, the computer storage medium can be a readable storage medium, a non-volatile storage medium or a volatile storage medium. For example, the computer storage medium can include, but is not limited to: USB flash drives, mobile hard disks, Read Only Memory (ROM), Random Access Memory (RAM), magnetic disks or optical discs and other various media that can store program codes.

[0060] In several embodiments provided by the present invention, it should be understood that the disclosed device and method can also be implemented in other ways. The device embodiments described above are only illustrative. For example, the flowcharts and structure diagrams in the drawings show the possible architectures, functions and operations of the device, method and computer program product according to multiple embodiments of the present invention. In this regard, each block in the flowchart or block diagram can represent a module, a program segment or a part of code, and the module, program segment or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the blocks can occur in a different order than marked in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the structure diagram and / or flowchart, and the combination of blocks in the structure diagram and / or flowchart, can be implemented by a dedicated hardware-based system that executes the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0061] In addition, each functional module or unit in various embodiments of the present invention may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.

[0062] If the above-mentioned function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention.

[0063] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered by the protection scope of the present invention.

Claims

1. A method for extracting key information of an electronic contract, characterized in that: include: Performing a first round of keyword extraction on the contract text corresponding to the electronic contract by using a preset large language model and preset prompt words to obtain a keyword text corresponding to the contract text; Determining whether the keyword text meets a preset condition; The preset conditions include preset formats and preset field requirements; If the preset condition is met, obtaining a target keyword text corresponding to the keyword in the keyword text; The text coordinates corresponding to the target keyword text in the contract text are obtained, and the keyword text is marked according to the text coordinates.

2. The method for extracting key information of an electronic contract according to claim 1, characterized in that: The preset large language model includes an input embedding layer, a position encoding layer, a self-attention mechanism layer and an output layer. The first round of keyword extraction is performed on the contract text corresponding to the electronic contract through the preset large language model and the preset prompt words to obtain the keyword text corresponding to the contract text, including: Acquire the contract text through the input embedding layer, convert the contract text into a text sequence, and map the text sequence into a corresponding high-dimensional vector; Injecting position information into each vector in the high-dimensional vector through the position encoding layer, and performing position encoding on each vector through the rotation matrix in the position encoding layer to obtain encoding information corresponding to each high-dimensional vector; The attention degree of the coded information is adjusted by the self-attention network of the self-attention mechanism layer to obtain the dependency relationship between each coded information, and the coded information is classified according to the dependency relationship by the feedforward neural network of the self-attention mechanism layer to obtain a classification result; The output layer outputs the probability distribution corresponding to the text sequence according to the classification result and the preset prompt word, and extracts the keyword text in the contract text according to the probability distribution.

3. The method for extracting key information of an electronic contract according to claim 1, characterized in that: The determining whether the keyword text meets a preset condition includes: Determining whether the format of the keyword text satisfies the preset format; If the preset format is not satisfied, a second round of keyword extraction is performed on the keyword text according to the preset prompt word.

4. The method for extracting key information of an electronic contract according to claim 3, characterized in that: The determining whether the format of the keyword text satisfies the preset format includes: If the format of the keyword text meets the preset format, determining whether the fields in the keyword text meet the preset field requirements; If the preset field requirement is not met, the second round of keyword extraction is performed on the keyword text according to the preset prompt word.

5. The method for extracting key information of an electronic contract according to claim 4, characterized in that: The determining whether the field in the keyword text meets the preset field requirement includes: If the preset field requirement is met, determining whether there is a first target keyword in the keyword text whose location information cannot be obtained; If it exists, the field corresponding to the target keyword is deleted, and the first round of original text extraction is performed on the contract text according to the preset prompt words to obtain the first round of original text extraction results.

6. The method for extracting key information of an electronic contract according to claim 5, characterized in that: The method further comprises: Determining whether the format of the first round of original text extraction results meets the preset format; If not, performing a second round of original text extraction on the contract text according to the preset prompt words to obtain a second round of original text extraction result; Determining whether there is at least one second target keyword whose location information cannot be obtained in the second round of original text extraction results; If it exists, obtaining the second key field corresponding to the second target keyword; The relative position of the second key field in the contract text is obtained, and the second key field is marked according to the relative position.

7. The method for extracting key information of an electronic contract according to claim 5, characterized in that: The method further comprises: Obtaining extraction results corresponding to the second round of keyword extraction, and obtaining location information of each keyword in the extraction results; Generate a corresponding annotation according to the positioning information of the keyword.

8. An electronic contract key information extraction system, characterized in that: include: An extraction module, used to perform a first round of keyword extraction on the contract text corresponding to the electronic contract by using a preset large language model and preset prompt words, to obtain a keyword text corresponding to the contract text; A judgment module, used to judge whether the keyword text meets a preset condition; The preset conditions include preset formats and preset field requirements; An acquisition module, configured to acquire a target keyword text corresponding to a keyword in the keyword text if the preset condition is met; The marking module is used to obtain the text coordinates corresponding to the target keyword text in the contract text, and mark the keyword text according to the text coordinates.

9. A computer device, characterized in that: The computer device comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the method for extracting key information of an electronic contract according to any one of claims 1 to 7.

10. A computer storage medium, characterized in that: It stores a computer program, which, when executed on a processor, implements the method for extracting key information of an electronic contract according to any one of claims 1-7.

Citation Information

Patent Citations

  • Document key information extraction method and system based on keyword splitting technology

    CN113850056A

  • Receipt identification method, apparatus and device, and medium

    CN119418350A

  • Contract auditing method, device and equipment and computer readable storage medium

    CN119600634A

  • Official document element extraction and auditing system based on large model

    CN119808759A

  • Document information extraction method, storage medium and terminal

    US20220058214A1

Cited By

  • Document information extraction method for realizing AI Agent by combining RPA, AI and LLM and related product

    CN121542445A