Contract review method, device and storage medium based on element extraction
By preprocessing and rule division of contract documents, the accuracy and review efficiency of personalized contract elements are improved, the problems of low efficiency and insufficient risk control of traditional review methods are solved, and more efficient contract review is achieved.
Patent Information
- Application Number
- CN202111551351.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2041-12-17
AI Technical Summary
Traditional contract review methods are inefficient, consume large human resources and insufficient risk control efforts. The existing technology is poor in the extraction of personalized contract elements and cannot effectively match the characteristics of non-standard documents.
By preprocessing the document set of the review contract, it is divided into standard categories and personalized contract groups, different factor extraction rules are used, preset rules are used for standard contracts, user annotation information and rules are extracted for personalized contracts, and a user annotation information and rules are used for personalized contracts, and a Factorized structural contracts to improve review accuracy.
It improves the accuracy and accuracy of the extraction of personalized contract elements, improves the review efficiency, reduces human resource consumption and risks, and enhances the accuracy and controllability of contract review.
Smart Images

Figure CN114118098B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a contract review method, device and storage medium based on element extraction. Background Art
[0002] A contract is an agreement between civil subjects to establish, change, or terminate a civil legal relationship. It is usually freely concluded between civil subjects based on the terms they want to be bound by. Therefore, the formats of different contracts vary, and the descriptions vary. At various stages of the contract process, the parties involved in the contract often need to read and review the contract to ensure that the terms in the contract meet the wishes of the parties involved and comply with laws and industry regulations.
[0003] Taking power grid and financial companies as examples, the legal affairs department of a large company has to review tens of thousands of contracts of various types every year, and the number of words in a contract may be close to tens of thousands. The traditional contract review method is that the relevant departments of the company are equipped with multiple professional legal personnel to read and review at various stages of the contract process. There are several defects: 1) After the contract is written by the contract initiating department, it is submitted for manual review. The discovery of errors in the writing process needs to be realized through multiple communication interactions after submitting it to manual review, which is inefficient for contract review; 2) A large number of contracts need to be reviewed manually. Each contract review requires the manpower of both the contract initiator and the contract review professionals to carry out contract review-related writing, communication and discussion, which consumes a lot of human resources; 3) The control of contract risk review is not strong, because the risk identification of contract review is highly dependent on the professional ability of the reviewer, and the risk controllability is poor. Once the reviewer's work is not in place or mistakes are made, the contract risk is greatly increased, which in turn affects the smooth progress of the business process.
[0004] Based on the above problems, the existing technology also provides a method for extracting and reviewing the contract elements in the contract through information technology. During manual review, the contract element information extracted from the contract can be mainly reviewed. The existing method of extracting contract elements usually combines machine learning algorithms with rule matching technology, learns the knowledge of the contract sample library and builds an element extraction rule model, and uses the element extraction rule model to automatically identify and extract the key element information in the contract to obtain the final contract elements. However, since it is necessary to perform similarity detection of text structure and text content according to the contract samples in the contract sample library (as standard documents), for highly personalized contracts that cannot match the standard features of standard documents, the extracted key elements are often inaccurate because they cannot meet the standard features of standard documents, resulting in problems with the basis of contract review. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a contract review method, device and storage medium based on element extraction. The present invention preprocesses the contract document set to be reviewed, and divides the contracts in the contract document set to be reviewed into a standard contract group and a personalized contract group according to the preprocessing result, adopts different element extraction rules for the standard contract group and the personalized contract group, and generates an element structure contract for user review based on the extracted contract elements, thereby improving the element extraction precision and accuracy of the personalized contract and improving the accuracy of the element structure contract document used for review.
[0006] To achieve the above objectives, the present invention provides the following technical solutions:
[0007] A contract review method based on factor extraction includes the following steps:
[0008] Preprocess the input contract document set to be reviewed, parse each contract in the contract document set to obtain the document directory information of each contract, and establish the title index chain of each contract according to the title level information in the document directory;
[0009] The title index chain of each contract is compared with the title index chain of the preset classified contract template, and the contracts whose title hierarchical relationship of the title index chain can completely match any of the aforementioned contract templates are divided into standard contract groups, and the contracts whose hierarchical relationship of the title index chain cannot single-handedly match any of the aforementioned contract templates are divided into personalized contract groups; element extraction rules are preset for each type of contract template;
[0010] For each standard contract in the standard contract group, the contract elements are extracted according to the element extraction rules of the contract template matched by the standard contract; for the personalized contract in the personalized contract group, the element annotation information and element extraction rule information set by the user for the personalized contract through the element annotation tool are obtained, and the contract elements are extracted for the personalized contract according to the aforementioned element annotation information and element extraction rule information;
[0011] An elementized structure contract of each contract is generated according to the extracted contract elements, and the elementized structure contract of each contract is sent to a review terminal for output for user review.
[0012] Furthermore, the classification to which each standard contract in the standard contract group belongs is the contract type of the matching contract template. When the elementized structure contract of the standard contract is sent to the review terminal, it is sent in batches according to the contract type of the standard contract. Standard contracts of the same type are sent to the review terminal in the same batch, and the review terminal outputs the contract type to which it belongs corresponding to the standard contract.
[0013] Furthermore, the steps for extracting contract elements from the personalized contract group are as follows:
[0014] For all personalized contracts in the personalized contract group, secondary grouping is performed according to the title index chain of each personalized contract, and contracts whose title index chain similarity exceeds a preset similarity threshold are divided into the same group;
[0015] For each contract group in the personalized contract set, one contract is selected from each contract group as a sample contract;
[0016] Obtaining the element annotation information and element extraction rules set by the user for the aforementioned sample contract through the element annotation tool, extracting the key elements of the sample contract according to the aforementioned element annotation information and element extraction rules and forming a personalized element extraction rule for the sample contract, and using the personalized element extraction rule as the personalized element extraction rule for the contract group to which the sample contract belongs; contracts of different groups in the personalized contract group correspond to different personalized element extraction rules;
[0017] For other contracts in each contract group, after obtaining the corresponding personalized element extraction rules according to the contract group to which the contract belongs, the contract elements are extracted according to the personalized element extraction rules.
[0018] Furthermore, for each contract group in the personalized contract group, based on the comparison information between the title index chain of the sample contract in each contract group and the title index chain of the aforementioned contract template, the contract type contained in each sample contract is obtained based on the partial matching of the title index chain, and each contract corresponds to at least two contract types.
[0019] Furthermore, the steps for obtaining the contract types contained in the sample contract based on the partial matching method of the title index chain are as follows:
[0020] Obtaining title index chain information of the sample contract, and comparing the title index chain information with the title index chains of each type of contract template in the aforementioned contract templates, to obtain partial matching information between the sample contract and each type of contract template;
[0021] Based on the aforementioned partial matching information, the title index chain is disassembled according to the document chapter sequence of the aforementioned sample contract, so that each segment of the disassembled title index chain can match a title index chain of a contract template, and there is no repeated content between adjacent segments of the title index chain;
[0022] Acquire multiple contract templates corresponding to the multiple title index segments after disassembly, and establish a contract type correspondence between the aforementioned sample contract and the aforementioned multiple contract templates.
[0023] Further, according to the multiple contract types included in the sample contract, a second personalized element extraction rule for the sample contract is formed according to the element extraction rule preset for each type of contract;
[0024] Extract contract elements from the sample contract according to the aforementioned second personalized element extraction rule to generate a second element structure contract of the sample contract;
[0025] Compare the second factorized structure contract of the sample contract with the factorized structure contract based on user annotations;
[0026] When the two are judged to be inconsistent or the degree of distinction is greater than the preset threshold, a risk warning for the factor extraction rules is issued.
[0027] Furthermore, the steps for forming the second personalized element extraction rule of the sample contract are as follows:
[0028] According to the document chapter sequence of the sample contract, multiple contract types corresponding to the sample contract are obtained in sequence, including contract type 1, contract type 2, ..., contract type N, where N is an integer greater than or equal to 2;
[0029] Sequentially obtain the preset element extraction rules of the aforementioned contract type 1, contract type 2, ..., contract type N, and use them as the first paragraph element extraction rule, the second paragraph element extraction rule, ..., the Nth paragraph element extraction rule of the sample contract respectively;
[0030] The first to Nth element extraction rules are combined in the order of the contract types to generate the second personalized element extraction rules for the sample contract.
[0031] Furthermore, the element annotation information includes element keywords and element tags annotated by the user, and element extraction rule information selected by the user is set corresponding to the element keywords and element tags. The element keywords, element extraction rules and element tags are mapped and stored.
[0032] The present invention also provides an electronic device, comprising:
[0033] at least one processor; and,
[0034] The memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor to enable the at least one processor to perform the contract review method as described in any of the preceding items.
[0035] The present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the contract review method as described in any of the preceding items.
[0036] Due to the adoption of the above technical scheme, the present invention has the following advantages and positive effects compared with the prior art, as an example: by preprocessing the contract document set to be reviewed, and dividing the contracts in the contract document set to be reviewed into standard contract groups and personalized contract groups according to the preprocessing results, different element extraction rules are adopted for the standard contract groups and the personalized contract groups, and factorized structured contracts are generated according to the extracted contract elements for user review, thereby improving the precision and accuracy of element extraction of personalized contracts, and improving the accuracy of the factorized structured contract documents used for review. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A flowchart of a contract review method based on factor extraction provided in an embodiment of the present invention.
[0038] Figure 2 An example diagram of information processing for contract review provided in an embodiment of the present invention.
[0039] Figure 3 An example diagram of information processing for setting risk warnings for personalized factor extraction rules provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0040] The following is a further detailed description of the contract review method, device and storage medium based on factor extraction disclosed in the present invention in conjunction with the accompanying drawings and specific embodiments. It should be noted that the technical features or combinations of technical features described in the following embodiments should not be considered isolated, and they can be combined with each other to achieve better technical effects. In the drawings of the following embodiments, the same reference numerals appearing in each drawing represent the same features or components, which can be applied to different embodiments. Therefore, once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.
[0041] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the invention. Any modification of the structure, change of the proportion relationship or adjustment of the size should fall within the scope of the technical content disclosed by the invention without affecting the effects and purposes that can be achieved by the invention. The scope of the preferred embodiments of the present invention includes other implementations, in which the functions can be performed in a substantially simultaneous manner or in a reverse order according to the functions involved, which should be understood by those skilled in the art of the technical field to which the embodiments of the present invention belong.
[0042] Techniques, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the techniques, methods, and devices should be considered part of the authorization specification. In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0043] Example
[0044] See also Figure 1 As shown, a contract review method based on factor extraction is provided in this embodiment. The method comprises the following steps:
[0045] S100, pre-processing the input contract document set to be reviewed, parsing each contract in the contract document set to be reviewed to obtain document directory information of each contract, and establishing a title index chain of each contract according to the title level information in the document directory.
[0046] The contract document set to be reviewed is used as a contract document library to store contract texts in various fields, preferably various product contracts. For example, but not limited to, power product contracts, communications product contracts, financial product contracts, etc. Users can upload contracts to the contract document set to be reviewed by automatic uploading or manual uploading.
[0047] The grammatical structure information of the contract document may include the title information (titles at all levels), paragraphs, comment box text, footers, headers, line numbers and body text indentation information, body text context information, etc. of the document. The document directory may be set and generated according to the grammatical structure information of the document. In this embodiment, considering that the title levels of contracts of the same type for the same product (such as a certain communication product contract) are usually consistent, the title level information of the contract document is extracted to establish a title index chain of the contract document, and the title index chain includes the name of each title, the level of each title, the association relationship between each title, etc.
[0048] S200, compare the title index chain of each contract with the title index chain of the preset classified contract template, classify the contracts whose title hierarchical relationship of the title index chain can completely match any of the aforementioned contract templates into a standard contract group, and classify the contracts whose hierarchical relationship of the title index chain cannot single-handedly match any of the aforementioned contract templates into a personalized contract group; element extraction rules are preset for each type of contract template.
[0049] In this embodiment, contracts whose title hierarchy relationships in the title index chain are completely consistent with a certain contract template are divided into a standard contract group. That is to say, the document structure of the contract conforms to the document structure of the existing standard contract template, and the corresponding contract template can be found in the preset contract template library. One contract template corresponds to one type of contract, and corresponding element extraction rules are preset for each type of contract template.
[0050] For contracts with highly personalized document structures, it is difficult to classify them into a single contract type because the hierarchical relationship of the title index chain cannot be completely consistent with any contract template in the contract template library. Therefore, such highly personalized contracts are divided into personalized contract groups.
[0051] As an example but not a limitation, for example, suppose that there are 10,000 contracts stored in the contract documents to be reviewed, and the document directory information of each contract is obtained after the document is parsed for the above 10,000 contracts, and the title index chain of each contract is established according to the title level information in the document directory; then, according to the title index chain of each contract, the title index chain of each contract is compared with the title index chain of the contract template of the preset classification, and the contract products whose title index chain can completely match a certain contract template are divided into standard contract groups. The preset classification, as an example, is preset to be divided into 100 types of contract templates, each type of contract template corresponds to a contract type, including contract type 1, contract type 2, contract type 3, ..., contract type 100. Through the above comparison and matching, 9,900 of the 10,000 contracts can find contract templates with consistent title level relationships, and 9,900 contracts are divided into standard contract groups. Since there are still 100 contracts that cannot match the contract template of the above preset classification alone, they are divided into personalized contract groups.
[0052] S300, for each standard contract in the standard contract group, contract elements are extracted according to the element extraction rules of the contract template matched by the standard contract; for the personalized contract in the personalized contract group, the element annotation information and element extraction rule information set by the user for the personalized contract through the element annotation tool are obtained, and the contract elements are extracted for the personalized contract according to the aforementioned element annotation information and element extraction rule information.
[0053] See also Figure 2 As shown, the standard contract group and the personalized contract group are later processed by different methods for element extraction.
[0054] Specifically, each contract in the standard contract group can be called a standard contract. For the standard contract, contract elements are extracted according to the element extraction rules of the contract template matched by the standard contract.
[0055] Each contract in the personalized contract group can be called a personalized contract. For a personalized contract, the element annotation information and element extraction rule information set by the user for the personalized contract through the element annotation tool are obtained, and the contract elements of the personalized contract are extracted according to the aforementioned element annotation information and element extraction rule information. In other words, for a personalized contract, elements are extracted based on the element annotation of the user.
[0056] The element annotation information includes element keywords and element tags annotated by the user, and element extraction rule information selected by the user is set corresponding to the element keywords and element tags. The element keywords, element extraction rules and element tags are mapped and stored.
[0057] The corresponding element annotation tool is provided with an element extraction rule database, in which preset element extraction rules are stored. When the user sets element annotation information for the personalized contract, the element extraction rules are output through the user graphical interface for the user to select. Furthermore, the corresponding element annotation tool is also provided with an element label database, and the element label comes from the aforementioned element label database. When the user sets element annotation information for the reference contract, the element keywords annotated by the user in the contract document are collected, and the element label list is output through the user graphical interface for the user to select the matching element label.
[0058] The element extraction rules, as an example but not limitation, may include labeling extraction rules, regular extraction rules, combination rules, dictionary conversion rules and / or semantic conversion rules. The labeling extraction rules are applicable to relatively fixed or regular product elements. The regular extraction rules are applicable to relatively flexible elements, which are extracted by configuring regular expressions; in this case, the system needs to establish a regular library in advance, and the user only needs to select the corresponding regular expression according to the actual scenario to automatically extract the elements. The combination rules, i.e., element combination synthesis rules, are applicable to scenarios where multiple elements extracted from multiple paragraphs are combined to synthesize new elements. The system will provide the order of combining multiple paragraph elements, splicing conjunctions and other rules. The user can automatically combine elements after configuring the interface. The dictionary conversion rules are applicable to the need to convert the text description in the contract into the type information such as single-choice and multiple-choice boxes required for reporting. It can match and check the extracted elements with the dictionary library established in advance to automatically convert the elements. The semantic conversion rules, i.e., NLP semantic parsing conversion rules, are applicable to relatively flexible text descriptions.
[0059] S400, generating element-based structured contracts for each contract based on the extracted contract elements, and sending the element-based structured contracts for each contract to a review terminal for output for user review.
[0060] The element-structured contract only displays information related to the elements of the contract document, and when reviewing the contract document, the reviewer mainly reviews the information related to the various contract elements in the contract. In this way, the reviewer does not need to read the entire contract when reviewing the contract, which can improve the efficiency of contract review.
[0061] In this embodiment, the classification to which each standard contract in the standard contract group belongs is the contract type of the contract template it matches. Preferably, when the elementized structure contract of the standard contract is sent to the review terminal, it is sent in batches according to the contract type of the standard contract, and the standard contracts of the same type are sent to the review terminal at the same time or in the same batch, and the contract type to which they belong is outputted in the review terminal corresponding to the standard contract. In this way, it is convenient for the reviewers at the review terminal to classify and review various types of contracts by type, further improving the review efficiency. Optionally, according to the preset mapping relationship between reviewers and contract types, a type of contract can be sent to the reviewers responsible for the corresponding type of contract. At this time, different reviewers are responsible for the review of different types of contracts.
[0062] In this embodiment, the steps of extracting contract elements from the contracts in the personalized contract group in step S300 are as follows:
[0063] S311, for all personalized contracts in the personalized contract group, secondary grouping is performed according to the title index chain of each personalized contract, and contracts whose title index chain similarity exceeds a preset similarity threshold are divided into the same group.
[0064] S312, for each contract group in the personalized contract group, select a contract from each contract group as a sample contract; obtain the element annotation information and element extraction rules set by the user for the aforementioned sample contract through the element annotation tool, extract the key elements of the sample contract according to the aforementioned element annotation information and element extraction rules and form a personalized element extraction rule for the sample contract, and use the personalized element extraction rule as the personalized element extraction rule for the contract group to which the sample contract belongs; contracts of different groups in the personalized contract group correspond to different personalized element extraction rules.
[0065] S313, for other contracts in each contract group, after obtaining the corresponding personalized element extraction rules according to the contract group to which the contract belongs, the contract elements are extracted according to the personalized element extraction rules.
[0066] Specifically, by obtaining the user's element annotation information for the sample contract, including element keywords and element tags, as well as the element extraction rules selected by the user when annotating the elements, it is possible to find the font size, whether it is indented, whether it is bold, and context information of the keyword annotated by the user, find the line number of the keyword in the contract document, the position before and after the punctuation of the line, the paragraph it is in, and the index chain under which the title belongs. Based on the above information, a personalized element extraction rule for the sample contract is generated, and the personalized element extraction rule is used as the group personalized element extraction rule for the contract group to which the sample contract belongs. Then, this group of personalized element extraction rules is used to automatically extract the same contract elements in other contracts of the same group. The above scheme can reduce the user's workload for element annotation of personalized contracts.
[0067] In this embodiment, based on the partial matching principle of the title index chain of the contract template and the title index chain of the personalized contract, multiple contract template information that partially matches each personalized contract can be obtained and sent to the review terminal for reference by reviewers during review.
[0068] Specifically, it includes step S320: for each contract group in the personalized contract group, the contract type contained in each sample contract can be obtained based on the comparison information of the title index chain of the sample contract in each contract group and the title index chain of the aforementioned contract template based on the partial matching method of the title index chain, and each contract corresponds to at least two contract types.
[0069] As an example but not a limitation, for example, 100 personalized contracts in a personalized contract group are divided into 5 groups, namely, group A1, group A2, group A3, group A4 and group A5, wherein group A1 has 20 personalized contracts, and its partial document index chain can match some of the above 100 types of contract templates. As an example but not a limitation, for example, a personalized contract H includes 100 chapters, wherein the index chains of the first 50 chapters are consistent with contract type 11, the index chains of the last 30 chapters are consistent with those of contract type 2, and the last 20 chapters are consistent with those of contract type 15. In this way, this contract G can establish a corresponding relationship with 3 contract types, namely, contract type 11, contract type 2, and contract type 15. Of course, the number 3 of contract types contained in the above contract is taken as an example but not a limitation. According to the content of the contract, the contract type corresponding to a contract can be any number of 2-100, which is not a limitation to the present invention. By the above contract type corresponding method, a corresponding relationship between the 5 contract groups of the personalized contract group and the above-mentioned preset 100 types of contract templates can be established.
[0070] In this embodiment, preferably, the steps of obtaining the contract types included in the sample contract based on the partial matching method of the title index chain are as follows.
[0071] S321, obtaining the title index chain information of the sample contract, and comparing the title index chain information with the title index chains of each type of contract template in the aforementioned contract templates, to obtain partial matching information between the sample contract and each type of contract template.
[0072] S322, based on the aforementioned partial matching information, the title index chain is disassembled according to the document chapter sequence of the aforementioned sample contract, so that each segment of the disassembled title index chain can match a title index chain of a contract template, and there is no repeated chapter content between adjacent segments of the title index chain.
[0073] S323, obtaining multiple contract templates corresponding to the multiple title index segments after disassembly, and establishing a contract type correspondence between the aforementioned sample contract and the aforementioned multiple contract templates.
[0074] In another implementation of this embodiment, see Figure 3 As shown, after obtaining the contract type information contained in the personalized contract, it is also possible to form a second personalized element extraction rule for the sample contract according to the multiple contract type information contained in the sample contract and the element extraction rules preset for each type of contract, and compare the element extraction results of the second personalized element extraction rule with those of the aforementioned personalized element extraction rule, and perform risk warnings for the personalized element extraction rules based on the comparison results.
[0075] Specifically, the following steps can be performed: extract the contract elements of the sample contract according to the aforementioned second personalized element extraction rule to generate the second element structure contract of the sample contract; compare the second element structure contract of the sample contract with the element structure contract based on the user's annotation; and issue an element extraction rule risk warning when it is determined that the two are inconsistent or the difference is greater than a preset threshold. In other words, when the contract elements extracted based on the aforementioned second personalized element extraction rule and the contract elements extracted based on the personalized element extraction rule based on the user's annotation (corresponding to step S313) are inconsistent or the elements are greatly different, it means that at least one of the two extraction rules has a rule setting risk, and at this time, the element extraction rule risk warning is triggered.
[0076] In this embodiment, preferably, the steps for forming the second personalized element extraction rule of the sample contract are as follows.
[0077] S3241, according to the document chapter sequence of the sample contract, multiple contract types corresponding to the sample contract are obtained in sequence, including contract type 1, contract type 2, ..., contract type N, where N is an integer greater than or equal to 2.
[0078] S3242, sequentially obtain the preset element extraction rules of the aforementioned contract type 1, contract type 2, ..., contract type N, and use them as the first paragraph element extraction rules, the second paragraph element extraction rules, ..., the Nth paragraph element extraction rules of the sample contract, respectively.
[0079] S3243, merging the first to Nth element extraction rules in the order of the contract types to generate a second personalized element extraction rule for the sample contract.
[0080] Taking the personalized contract H in the above-mentioned contract group A1 as an example, the second personalized element extraction rule generation method of the contract group A1 is described. The personalized contract H (i.e., the sample contract) corresponds to contract type 11, contract type 2, and contract type 15 in sequence. Contract type 11 belongs to the standard contract group and is preset with element extraction rule 11. The aforementioned element extraction rule 11 is used as the first segment element extraction rule of contract group A1. Contract type 2 belongs to the standard contract group and is preset with element extraction rule 2. The aforementioned element extraction rule 2 is used as the second segment element extraction rule of contract group A1. Contract type 15 belongs to the standard contract group and is preset with element extraction rule 15. The aforementioned element extraction rule 15 is used as the third segment element extraction rule of contract group A1. After obtaining the element extraction rules of all three contract types, the first segment element extraction configuration information to the third segment element extraction configuration information are summarized to obtain the second personalized element extraction rule of contract group A1 (i.e., the sample contract H).
[0081] According to the above steps, the second personalized element extraction rules of all contract groups A1 of the personalized contract group can be obtained. Subsequently, the second personalized element extraction rules can be compared with the personalized element extraction rules obtained based on user annotations, and risk warnings for personalized element extraction rules can be issued based on the comparison results.
[0082] Another embodiment of the present invention further provides an electronic device.
[0083] The electronic device comprises:
[0084] at least one processor; and,
[0085] The memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can perform the following steps: preprocessing the input contract document set to be reviewed, parsing each contract in the contract document set to be reviewed to obtain document directory information of each contract, and establishing a title index chain for each contract according to the title level information in the document directory; comparing the title index chain of each contract with the title index chain of a preset classified contract template, classifying the contracts whose title level relationship of the title index chain can completely match any category in the aforementioned contract template into a standard contract group, and classifying the hierarchical relationship of the title index chain into a standard contract group. Contracts that cannot be matched with any of the aforementioned contract templates are divided into personalized contract groups; element extraction rules are preset for each type of contract template; for each standard contract in the standard contract group, contract elements are extracted according to the element extraction rules of the contract template matched by the standard contract; for personalized contracts in the personalized contract group, element annotation information and element extraction rule information set by the user for the personalized contract through the element annotation tool are obtained, and contract elements are extracted for the personalized contract according to the aforementioned element annotation information and element extraction rule information; elementized structure contracts of each contract are generated according to the extracted contract elements, and the elementized structure contracts of each contract are sent to the review terminal for output for user review.
[0086] The contract document set to be reviewed is used as a contract document library to store contract texts in various fields, preferably various product contracts. For example, but not limited to, power product contracts, communications product contracts, financial product contracts, etc. Users can upload contracts to the contract document set to be reviewed by automatic uploading or manual uploading.
[0087] The grammatical structure information of the contract document may include the title information (titles at all levels), paragraphs, comment box text, footers, headers, line numbers and body text indentation information, body text context information, etc. of the document. The document directory may be set and generated according to the grammatical structure information of the document. In this embodiment, considering that the title levels of contracts of the same type for the same product (such as a certain communication product contract) are usually consistent, the title level information of the contract document is extracted to establish a title index chain of the contract document, and the title index chain includes the name of each title, the level of each title, the association relationship between each title, etc.
[0088] In this embodiment, contracts whose title hierarchical relationship in the title index chain is completely consistent with a certain contract template are classified into a standard contract group, that is, the document structure of the contract is consistent with the document structure of the existing standard contract template, and the corresponding contract template can be found in the preset contract template library. One contract template corresponds to a type of contract, and corresponding element extraction rules are preset for each type of contract template. For contracts with a highly personalized document structure, because the hierarchical relationship of the title index chain cannot be completely consistent with any contract template in the contract template library, it is difficult to classify them into a single contract type, so such highly personalized contracts are divided into personalized contract groups. The standard contract group and the personalized contract group are later processed by different methods for element extraction.
[0089] Specifically, each contract in the standard contract group can be called a standard contract. For a standard contract, the contract elements are extracted according to the element extraction rules of the contract template matched by the standard contract. Each contract in the personalized contract group can be called a personalized contract. For a personalized contract, the element annotation information and element extraction rule information set by the user for the personalized contract through the element annotation tool are obtained, and the contract elements are extracted for the personalized contract according to the aforementioned element annotation information and element extraction rule information. In other words, for a personalized contract, elements are extracted based on the user's element annotation.
[0090] For other technical features, refer to the previous embodiments. The processor can be configured to perform corresponding information processing functions, which will not be repeated here.
[0091] Another embodiment of the present invention further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the computer program can achieve the following when executed by the processor of an electronic device: preprocessing the input contract document set to be reviewed, parsing each contract in the contract document set to be reviewed to obtain document directory information of each contract, and establishing a title index chain for each contract based on the title level information in the document directory; comparing the title index chain of each contract with the title index chain of a preset classified contract template, dividing the contracts whose title level relationship of the title index chain can completely match any of the aforementioned contract templates into a standard contract group, and dividing the title index chain into a standard contract group. Contracts whose hierarchical relationships cannot be matched to any of the aforementioned contract templates are divided into personalized contract groups; element extraction rules are preset for each type of contract template; for each standard contract in the standard contract group, contract elements are extracted according to the element extraction rules of the contract template matched by the standard contract; for personalized contracts in the personalized contract group, the element annotation information and element extraction rule information set by the user for the personalized contract through the element annotation tool are obtained, and contract elements are extracted for the personalized contract according to the aforementioned element annotation information and element extraction rule information; an elementized structure contract of each contract is generated according to the extracted contract elements, and the elementized structure contract of each contract is sent to the review terminal for output for user review.
[0092] The computer-usable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store used and created data, etc.
[0093] For other technical features, refer to the previous embodiments. When the computer program is executed by the processor of the electronic device, it can realize the corresponding information processing function, which will not be repeated here.
[0094] In the above description, the disclosure of the present invention is not intended to limit itself to these aspects. Rather, within the scope of the target protection of the present disclosure, the components can be selectively and operatively combined in any number. In addition, terms such as "include", "encompass" and "have" should be interpreted as inclusive or open by default, rather than exclusive or closed, unless they are explicitly defined to the contrary. All technical, scientific or other terms are consistent with the meanings understood by those skilled in the art, unless they are defined to the contrary. Common terms found in dictionaries should not be interpreted too idealistically or too impractically in the context of relevant technical documents, unless the present disclosure explicitly defines them as such. Any changes and modifications made by a person of ordinary skill in the field of the present invention based on the above disclosure belong to the scope of protection of the claims.
Claims
1. A contract review method based on factor extraction, characterized in that Includes steps: Preprocessing the input contract document set to be reviewed, wherein each contract in the contract document set to be reviewed is parsed to obtain document directory information of each contract, and a title index chain of each contract is established according to the title level information in the document directory; The title index chain of each contract is compared with the title index chain of the preset classified contract template, and the contracts whose title hierarchical relationship of the title index chain can completely match any of the aforementioned contract templates are divided into standard contract groups, and the contracts whose hierarchical relationship of the title index chain cannot single-handedly match any of the aforementioned contract templates are divided into personalized contract groups; element extraction rules are preset for each type of contract template; For each standard contract in the standard contract group, the contract elements are extracted according to the element extraction rules of the contract template matched by the standard contract; for the personalized contract in the personalized contract group, the element annotation information and element extraction rule information set by the user for the personalized contract through the element annotation tool are obtained, and the contract elements are extracted for the personalized contract according to the aforementioned element annotation information and element extraction rule information; Generate factorized structured contracts of each contract according to the extracted contract elements, and send the factorized structured contracts of each contract to the review terminal for output for user review; Among them, the steps of extracting contract elements for contracts in a personalized contract group are as follows: for all personalized contracts in the personalized contract group, secondary grouping is performed according to the title index chain of each personalized contract, and contracts whose title index chain similarity exceeds a preset similarity threshold are divided into the same group; for each contract group in the personalized contract group, a contract is selected from each contract group as a sample contract; the element annotation information and element extraction rules set by the user for the aforementioned sample contract through the element annotation tool are obtained, and the key elements of the sample contract are extracted according to the aforementioned element annotation information and element extraction rules to form a personalized element extraction rule for the sample contract, and the personalized element extraction rule is used as the personalized element extraction rule for the contract group to which the sample contract belongs; contracts in different groups in the personalized contract group correspond to different personalized element extraction rules; for other contracts in each contract group, after obtaining the corresponding personalized element extraction rule according to the contract group to which the contract belongs, contract elements are extracted according to the personalized element extraction rule; And, for each contract group in the personalized contract group, according to the comparison information between the title index chain of the sample contract in each contract group and the title index chain of the aforementioned contract template, the contract type contained in each sample contract is obtained based on the partial matching method of the title index chain, and each contract corresponds to at least two contract types; the steps of obtaining the contract type contained in the sample contract based on the partial matching method of the title index chain are as follows: obtain the title index chain information of the sample contract, and compare the title index chain information with the title index chain of each type of contract template in the aforementioned contract template, so as to obtain the partial matching information between the sample contract and each type of contract template; according to the aforementioned partial matching information, disassemble the title index chain according to the document chapter order of the aforementioned sample contract, so that each segment of the disassembled title index chain can match the title index chain of a contract template, and there is no repeated chapter content between adjacent segments of the title index chain; obtain multiple contract templates corresponding to the multiple disassembled title index chain segments, and establish a contract type correspondence between the aforementioned sample contract and the aforementioned multiple contract templates.
2. The contract review method according to claim 1, characterized in that: The classification to which each standard contract in the standard contract group belongs is the contract type of the matching contract template. When the elementized structure contract of the standard contract is sent to the review terminal, it is sent in batches according to the contract type of the standard contract. Standard contracts of the same type are sent to the review terminal in the same batch, and the review terminal outputs the contract type to which the standard contract belongs correspondingly.
3. The method according to claim 1, characterized in that: According to the multiple contract types included in the sample contract, a second personalized element extraction rule for the sample contract is formed according to the element extraction rule preset for each type of contract; Extract the contract elements of the sample contract according to the aforementioned second personalized element extraction rule to generate a second element structure contract of the sample contract; Compare the second factorized structure contract of the sample contract with the factorized structure contract based on user annotations; When the two are judged to be inconsistent or the degree of distinction is greater than the preset threshold, a risk warning for the factor extraction rules is issued.
4. The method according to claim 3, characterized in that: The steps to form the second personalized element extraction rule of the sample contract are as follows: According to the document chapter sequence of the sample contract, multiple contract types corresponding to the sample contract are obtained in sequence, including contract type 1, contract type 2, ..., contract type N, where N is an integer greater than or equal to 2; Sequentially obtain the preset element extraction rules of the aforementioned contract type 1, contract type 2, ..., contract type N, and use them as the first paragraph element extraction rule, the second paragraph element extraction rule, ..., the Nth paragraph element extraction rule of the sample contract respectively; The first to Nth element extraction rules are combined in the order of the contract types to generate the second personalized element extraction rules for the sample contract.
5. The method according to claim 1, characterized in that: The element annotation information includes element keywords and element tags annotated by the user, and element extraction rule information selected by the user is set corresponding to the element keywords and element tags. The element keywords, element extraction rules and element tags are mapped and stored.
6. An electronic device, characterized in that include: at least one processor; as well as, The memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor to enable the at least one processor to perform the contract review method based on factor extraction as described in any one of claims 1 to 5.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the contract review method based on factor extraction as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Artificial intelligence legal affair review engine system development method
CN111950286A
Social network systems and methods
US20100306249A1
Text review method and apparatus, and computer device, and readable storage medium
WO2021169208A1
