Method and system for extracting key contract information based on contract OCR recognition

Through the method based on contract OCR identification, the text information of the contract page is identified and chapters and paragraphs are determined, and the key content is screened out, which solves the problem that the existing technology cannot automatically extract the key content of the contract document, and achieves efficient contract review.

CN119763140APending Publication Date: 2025-04-04GOLDEN STAND FINANCIAL TECH PTY LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510274074.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The existing technology cannot automatically extract key contents in contract documents, which makes contract review difficult and labor-intensive and cost-effective.

Method used

The contract OCR recognition method is adopted to identify the text information of the contract page through the OCR identification system, and the chapter title, paragraph and signature position are determined in combination with the image recognition model, and then the key chapter title and text content are screened to generate a contract key content report.

Benefits of technology

It effectively reduces the difficulty and cost of contract review, improves audit efficiency, and can accurately screen out key contents in the contract.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119763140A_ABST
    Figure CN119763140A_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for extracting key information of a contract based on contract OCR recognition, and relates to the field of document processing technology. The method comprises: obtaining text information of a contract page through an ORC recognition system, and marking the contract page to which the text information belongs and first position information; recognizing the image of the contract page through an image recognition model, determining the first area of ​​the chapter title, the second area of ​​the paragraph, and the third area of ​​the signature or seal position; determining the text type of the text information and the chapter and paragraph to which it belongs according to the first position information, the first area, and the second area; screening key chapter titles according to the text type and the semantic recognition model; determining key text content according to the text information of the paragraph and the semantic recognition model. According to the present invention, key content in the contract can be screened, which is convenient for contract reviewers to view and review, effectively reducing the difficulty of contract review, as well as the manpower and cost consumed in reviewing the contract.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of document processing, and in particular to a method and system for extracting key contract information based on contract OCR recognition. Background Art

[0002] Contract review plays a vital role in the business and legal fields. It is an important part of ensuring the smooth progress of transactions, reducing risks, and protecting the rights and interests of both parties. The main purpose of contract review is to ensure the legality, compliance, fairness and enforceability of the contract, thereby reducing legal risks, protecting the rights and interests of both parties, and promoting the smooth progress of transactions.

[0003] With the development of electronic technology, in the related technologies of contract information extraction, it is possible to obtain a contract image set corresponding to a single contract document; identify each contract image in the contract image set to obtain the image features of each contract image; and determine the page category of each contract image and the contract type to which each contract image belongs based on the image features of each contract image. Although the related technologies can extract the image features in the contract file and classify the text, they cannot automatically extract the key content in the contract file, thereby failing to reduce the difficulty of contract review, nor can they reduce the manpower and cost consumed by contract review.

[0004] The information disclosed in the background technology section of this application is only intended to deepen the understanding of the general background technology of this application, and should not be regarded as an admission or any form of suggestion that the information constitutes the prior art already known to those skilled in the art. Summary of the invention

[0005] The present invention provides a method and system for extracting key contract information based on contract OCR recognition, which can solve the technical problems that related technologies cannot extract key content in contract documents and cannot reduce the manpower and cost consumed in reviewing contracts.

[0006] According to a first aspect of the present invention, a method for extracting key contract information based on contract OCR recognition is provided, comprising: Identify multiple contract pages through the ORC recognition system, obtain text information of each contract page, and mark the contract page to which each text information belongs, as well as the first position information of each text information in the contract page; Scan the contract page by using a scanning device to obtain an image of the contract page; Using an image recognition model, the contract page image is recognized to determine a first region of the contract page image for each chapter title, a second region of the contract page image for each paragraph in the chapter, and a third region of the contract page image for a signature or seal position; Determine the text type of each text information, and the chapter and paragraph to which each text information belongs according to the first position information, the first area, and the second area; According to the text type of each text and the semantic recognition model, the key chapter titles are selected from multiple chapter titles; Determine the key text content based on the text information of each paragraph of the chapter corresponding to the key chapter title and the semantic recognition model; Summarize key text contents and generate a report on key contract contents; The key contract page is determined according to the key chapter title, the key text content, the third area, and the contract page to which each text information belongs.

[0007] According to a second aspect of the present invention, a system for extracting key contract information based on contract OCR recognition is provided, comprising: An identification module, used to identify multiple contract pages through the ORC identification system, obtain text information of each contract page, and mark the contract page to which each text information belongs, as well as the first position information of each text information in the contract page; A scanning module, used to scan the contract page through a scanning device to obtain an image of the contract page; A region module, used to identify the contract page image through an image recognition model, determine a first region of each chapter title in the contract page image, a second region of each paragraph in the chapter in the contract page image, and a third region of a signature or seal position in the contract page image; a matching module, configured to determine the text type of each text information, and the chapter and paragraph to which each text information belongs, according to the first position information, the first area, and the second area; The key chapter title module is used to filter out key chapter titles from multiple chapter titles based on the text type of each text and the semantic recognition model; A key text content module is used to determine the key text content according to the text information of each paragraph of the chapter corresponding to the key chapter title and the semantic recognition model; The summary module is used to summarize key text content and generate a report on key contract content; The contract key page module is used to determine the contract key page according to the key chapter title, the key text content, the third area and the contract page to which each text information belongs.

[0008] By adopting the above technical solution, the present invention can achieve the following technical effects: According to the present invention, the text information in the contract can be identified based on the OCR recognition system, and the area in the contract page image can be determined through the image recognition model, so that the text information can be matched with the chapters and paragraphs of the contract, and then the key content can be screened based on the semantic information of the text in the chapter title and paragraph, and the key pages in the contract can be determined, which is convenient for the contract review personnel to view and review, effectively reducing the difficulty of contract review, as well as the manpower and cost consumed in reviewing the contract. When screening the key chapter titles, it can be determined by semantic similarity whether each chapter title contains preset keywords, so as to judge whether each chapter title is a key chapter title, thereby improving the accuracy and objectivity of the judgment. When screening the key text content to be determined, the semantic similarity between the category label of each word in the text and the content of the key chapter title can be determined based on the relationship between the category similarity between the content of the key chapter title and the main text, so as to screen out the key text paragraphs to be determined whose categories are consistent with the content described by the key chapter title, thereby improving the accuracy and objectivity of the screening. When determining the accuracy score of the pending key text content, the category similarity between the pending key text paragraph and the content described in the main text can be determined based on the consistency of the categories of the title and the main text content and the characteristic that the difference in categories between the pending key text paragraph and the key chapter title is equivalent to the difference in categories between the pending key text paragraph and the content described in the main text, thereby obtaining the accuracy score of the pending key text content based on both category similarity and semantic similarity, so as to comprehensively and accurately describe the overall similarity between the pending key text content and the main text.

[0009] It should be understood that the above general description and the following detailed description are exemplary and explanatory only and do not limit the present invention. Other features and aspects of the present invention will become more apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0011] Figure 1 The flowchart of the method for extracting key contract information based on contract OCR recognition according to an embodiment of the present invention is exemplarily shown.

[0012] Figure 2 The following is an exemplary illustration of a contract key information extraction system based on contract OCR recognition according to an embodiment of the present invention. DETAILED DESCRIPTION

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

[0014] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0015] Figure 1 A flow chart of a method for extracting key contract information based on contract OCR recognition according to an embodiment of the present invention is exemplarily shown, and the method includes: Step S101, identifying multiple contract pages through the ORC recognition system, obtaining text information of each contract page, and marking the contract page to which each text information belongs, as well as the first position information of each text information in the contract page; Step S102, scanning the contract page by a scanning device to obtain a contract page image; Step S103, identifying the contract page image through an image recognition model, determining a first area of ​​each chapter title in the contract page image, a second area of ​​each paragraph in the chapter in the contract page image, and a third area of ​​the signature or seal position in the contract page image; Step S104, determining the text type of each text information, and the chapter and paragraph to which each text information belongs according to the first position information, the first area, and the second area; Step S105, selecting key chapter titles from multiple chapter titles according to the text type of each text and the semantic recognition model; Step S106, determining the key text content according to the text information of each paragraph of the chapter corresponding to the key chapter title and the semantic recognition model; Step S107, summarizing the key text contents and generating a contract key content report; Step S108, determining the key contract page according to the key chapter title, the key text content, the third area, and the contract page to which each text information belongs.

[0016] According to the method for extracting key contract information based on contract OCR recognition in an embodiment of the present invention, the text information in the contract can be identified based on the OCR recognition system, and the area in the contract page image can be determined through the image recognition model, so as to correspond the text information with the chapters and paragraphs of the contract, and then the key content can be screened based on the semantic information of the text in the chapter title and paragraph, and the key pages in the contract can be determined, which is convenient for contract reviewers to view and review, and effectively reduces the difficulty of contract review, as well as the manpower and cost consumed in reviewing the contract.

[0017] According to one embodiment of the present invention, in step S101, the OCR system is an optical character recognition system, which can be used to identify text information on a paper contract page, that is, to identify the text on the contract page, and to mark the contract page to which each text information belongs, and to determine the first position information of each text information in the contract page, wherein the first position information is the position coordinates of the centroid of the rectangular box that selects each text on the paper contract page, and the center of the paper contract page or a vertex can be used as the coordinate origin to further determine the coordinates of the centroid of each rectangular box in the coordinate system as the first position information.

[0018] According to one embodiment of the present invention, in step S102, the contract page can be scanned by a scanning device to obtain a contract page image, the size of the contract page image is consistent with the paper contract page, and the method of establishing a coordinate system on the contract page image is the same as the above-mentioned method of establishing a coordinate system on the paper contract page.

[0019] According to one embodiment of the present invention, in step S103, the contract page image can be identified by an image recognition model to determine the first area of ​​the chapter title in the contract page image, the second area of ​​each paragraph of the chapter in the contract page image, and the third area of ​​the signature or seal position in the contract page image. Among them, the first area where the chapter title is located is the area where multiple continuous and large-sized characters are located, and the first area can be a rectangular box that selects all the characters of the chapter title. The second area where each paragraph is located is the area where multiple continuous and small-sized characters are located, and the second area can be a rectangular box that selects all the characters in the body of the paragraph. The third area is the area where the recognized signature or seal position is located, and the third area is a rectangular box that selects the signature or seal position.

[0020] According to one embodiment of the present invention, in step S104, the number of chapter titles can be multiple, and the number of paragraphs in each chapter can also be multiple, so the text information recognized by OCR can be matched with the chapter titles and paragraphs, that is, it is determined which text information is the chapter titles and which chapters these text information are the titles of, and it is determined which text information is the paragraph text and which paragraphs these text information are the text of.

[0021] According to one embodiment of the present invention, the text type of each text information, and the chapter and paragraph to which each text information belongs are determined based on the first position information, the first area, and the second area, including: obtaining the union of the first areas, and the union of the second areas; when the first position information belongs to the union of the first areas, determining the text type of the text information corresponding to the first position information as the chapter title; when the first position information belongs to the union of the second areas, determining the text type of the text information corresponding to the first position information as the chapter body; determining the chapter and paragraph to which each text information belongs based on the first position information, the text type, the first area, and the second area.

[0022] According to one embodiment of the present invention, the text type of each text message can be determined first, that is, whether each text message is a chapter title or a chapter text. The union of the first area can be obtained, that is, the set of positions of the first area in each contract page image. If the first position information of a text message belongs to the union of the first area, the text message is located at the position of the chapter title, and the text message is the text in the chapter title, and its text type is the chapter title. Similarly, the union of the second area can be obtained, that is, the set of positions of the second area in each contract page image. If the first position information of a text message belongs to the union of the second area, the text message is located at the position of the chapter text, and the text message is the text in the chapter text, and its text type is the chapter text.

[0023] According to an embodiment of the present invention, it is also possible to determine which chapter each text information belongs to or which paragraph its chapter text belongs to. According to the first position information, the text type, the first area and the second area, the chapter and paragraph to which each text information belongs are determined, including: determining the area where the i-th chapter is located according to the position information of the i-th first area and the position information of the i+1-th first area; determining the text information whose text type is a chapter title and whose first position information belongs to the area where the i-th chapter is located as the title text of the i-th chapter; determining the text information whose text type is a chapter text and whose first position information belongs to the j-th second area in the area where the i-th chapter is located as the body text of the j-th paragraph of the i-th chapter; determining the chapter and paragraph to which each text information belongs according to the title text of each chapter and the body text of multiple paragraphs of each chapter.

[0024] According to one embodiment of the present invention, the i-th first area is a rectangular area, and the i+1-th first area is also a rectangular area. Therefore, the straight line where the upper edge of the rectangular area of ​​the i-th first area lies can be used as the starting position of the area where the i-th chapter is located, and the straight line where the upper edge of the rectangular area of ​​the i+1-th first area lies can be used as the ending position of the area where the i-th chapter is located. The area between the starting position and the ending position of the area where the i-th chapter is located is the area where the i-th chapter is located.

[0025] According to one embodiment of the present invention, among multiple text types that are chapter titles, the text information whose first position information belongs to the area where the i-th chapter is located is the title text of the i-th chapter. Similarly, the text type that is chapter body, and the text information whose first position information belongs to the j-th second area within the area where the i-th chapter is located is determined as the body text of the j-th paragraph of the i-th chapter. Based on the above method, the title text of each chapter and the body text of multiple paragraphs of each chapter can be determined, thereby determining the chapter and paragraph to which each text information belongs.

[0026] According to an embodiment of the present invention, in step S105, the title texts of multiple chapter titles may be processed by a semantic recognition model, thereby filtering out key chapter titles.

[0027] According to one embodiment of the present invention, based on the text type of each text and a semantic recognition model, key chapter titles are screened out from multiple chapter titles, including: obtaining a preset key semantic vector set, wherein the key semantic vector set includes multiple key semantic vectors; processing the title text of each chapter through the semantic recognition model to obtain a title semantic vector of each chapter title; and screening out key chapter titles from multiple chapter titles based on the title semantic vector of each chapter title and the key semantic vector set.

[0028] According to an embodiment of the present invention, multiple key semantic vectors can be preset. For example, key keywords of concern can be pre-listed, such as "price", "date", "payment method", "notes", "business requirements", etc. in the contract, and the key semantic vectors of these keywords can be obtained through the semantic recognition model to form a set of key semantic vectors. Furthermore, each chapter title can be processed by the semantic recognition model to obtain a title semantic vector, so that key chapter titles can be screened based on the comparison between the title semantic vector and the key semantic vector.

[0029] According to an embodiment of the present invention, based on the title semantic vector of each chapter title and the set of key semantic vectors, key chapter titles are selected from multiple chapter titles, including: determining a key chapter title selection condition C1 according to formula (1): (1) in, is the title semantic vector of the title text of the i-th chapter, for The transposed vector of is the kth key semantic vector, n is the number of key semantic vectors in the key semantic vector set, max is the maximum value function, is a preset first similarity threshold, k≤n, and i, k and n are all positive integers; if the title semantic vector of the title text of the i-th chapter meets the key chapter title screening condition C1, the chapter title of the i-th chapter is determined to be the key chapter title.

[0030] According to one embodiment of the present invention, in formula (1), is the cosine similarity between the title semantic vector of the title text of the i-th chapter and the k-th key semantic vector, which can be used as the semantic similarity between the title text of the i-th chapter and the keywords corresponding to the k-th key semantic vector. is the maximum value of the semantic similarity between the title text of the ith chapter and each keyword. If the maximum value is greater than or equal to the preset first similarity threshold, it indicates that the title text of the ith chapter contains keywords that need to be focused on, or synonyms of keywords, and the title text of the ith chapter is a key chapter title. That is, when the title semantic vector of the title text of the ith chapter meets the key chapter title screening condition C1, the chapter title of the ith chapter is determined to be a key chapter title. Further, the above method can be used to determine whether each chapter title is a key chapter title, thereby screening out all key chapter titles.

[0031] In this way, it is possible to determine whether each chapter title contains preset keywords by means of semantic similarity, thereby judging whether each chapter title is a key chapter title, thereby improving the accuracy and objectivity of the judgment.

[0032] According to one embodiment of the present invention, in step S106, the key text content is determined based on the text information of each paragraph of the chapter corresponding to the key chapter title and the semantic recognition model, including: determining the key title semantic vector of the title text of the key chapter title through the semantic recognition model; performing word segmentation processing on the text information of each paragraph to obtain multiple words of each paragraph; obtaining the category label of each word through the word type recognition model; processing the category label through the semantic recognition model to obtain the category semantic vector of the category label of each word; determining the key text content based on the key title semantic vector, the category semantic vector and the text information of each paragraph.

[0033] According to one embodiment of the present invention, the title text of the key chapter title can be processed by a semantic recognition model to obtain a key title semantic vector. In addition, the title usually includes a description of the word category, for example, "price", "quantity", "quality standard", etc. In other words, the words in the title are usually category information of the meaning described in the text. For example, if the text is described as 500 yuan / piece, its category is "price", which is the word in the title. Therefore, the semantics of the title text is similar to the semantics of the category corresponding to the text content in the paragraph. The text may also include other content. Therefore, the key text content can be screened based on the semantics of the category of each word in the text, and other content can be excluded, thereby refining the key content to facilitate the review by the auditor.

[0034] According to one embodiment of the present invention, the text information of a paragraph can be segmented to obtain multiple words included in a paragraph, and processing such as removing stop words can be performed to remove words without actual meaning, simplify words, and reduce the amount of calculation.

[0035] According to one embodiment of the present invention, the word type recognition model is a deep learning neural network model, for example, a recursive neural network model, which can be used to determine the category label of each word. For example, if the word is "500 yuan / piece", its category label is "price"; if the word is "air transport" or "train transport", its category label is "transportation method", etc.

[0036] According to an embodiment of the present invention, after obtaining the category label, the key text content can be filtered by the category label, that is, the important words among multiple words can be filtered. The category label can be processed by the semantic recognition model to obtain the category semantic vector of the category label of each word, so as to determine whether the category of the word is similar to the semantics of the chapter title.

[0037] According to an embodiment of the present invention, determining the key text content according to the key title semantic vector, the category semantic vector and the text information of each paragraph includes: determining the key text content screening condition C2 according to formula (2): (2) in, is the key title semantic vector of the title text of the sth key chapter title, for The transposed vector of is the category semantic vector of the category label of the t-th word, is a preset second similarity threshold; if the category semantic vector of the category label of the t-th word meets the key text content screening condition C2, the t-th word is determined as the pending key text content; all the pending key text contents are combined to obtain the pending key text paragraph; according to the pending key text paragraph, the text information of each paragraph and the key title semantic vector, the accuracy score of the pending key text content is determined; if the accuracy score of the pending key text content is higher than or equal to the preset score threshold, the pending key text paragraph is determined as the key text content; if the accuracy score of the pending key text content is lower than the preset score threshold, the semantic recognition model and the word type recognition model are retrained, and the key text content is re-determined.

[0038] According to one embodiment of the present invention, The semantic similarity between the key title semantic vector of the title text of the s-th key chapter title and the category semantic vector of the category label of the t-th word can be used to represent the semantic similarity between the s-th key chapter title and the category label of the t-th word. If the semantic similarity is greater than or equal to the second similarity, it indicates that the content described by the t-th word is highly relevant to the content described in the key chapter title, and the word can be determined as the pending key text content and further judgment can be made.

[0039] In this way, based on the category similarity relationship between the content of the key chapter title and the main text, the semantic similarity between the category label of each word in the main text and the content of the key chapter title can be determined, thereby screening out the pending key text paragraphs whose categories match the content described by the key chapter title, thereby improving the accuracy and objectivity of the screening.

[0040] According to one embodiment of the present invention, all the key text contents to be determined can be combined, that is, the key words selected from the large text are combined to obtain the key text paragraphs to be determined. The key text paragraphs to be determined can be used as a simplified version of the original paragraphs, retaining only the key content and removing the content with low relevance to the title. In theory, the semantics of the key text paragraphs to be determined are the same as those of the original paragraphs. If the semantic similarity between the two is low, that is, the semantics are greatly different, there may be errors or omissions in the selection of key text contents.

[0041] According to an embodiment of the present invention, the accuracy score of the content of the key text to be determined is determined based on the key text paragraph to be determined, the text information of each paragraph and the semantic vector of the key title, including: processing the key text paragraph to be determined through a semantic recognition model to obtain the key text semantic vector of the key text paragraph to be determined; processing the text information of multiple paragraphs through a semantic recognition model to obtain the body text semantic vector; determining the accuracy score A of the content of the key text to be determined according to formula (3): (3) in, is the semantic vector of the key text to be determined, for The transposed vector of is the semantic vector of the text, is the category semantic vector of the category label of the hth key text content to be determined, N is the number of key text contents to be determined, h≤N, and both h and N are positive integers.

[0042] According to an embodiment of the present invention, the key text paragraph to be determined can be directly input into the semantic recognition model to obtain the key text semantic vector to be determined. The body of the original paragraph can also be directly input into the semantic recognition model to obtain the body text semantic vector. is the cosine similarity between the semantic vector of the pending key text and the semantic vector of the main text, which can be used to describe the semantic similarity between the pending key text paragraph and the original paragraph text. This semantic similarity is affected by the screening method of the pending key text, that is, when screening the pending key text, the selected pending key text is the text whose semantic similarity between the category label and the key chapter title is higher than or equal to the second similarity threshold. Although it is highly correlated with the key chapter title, the semantic similarity between the category label and the key chapter title of the pending key text is not 100%, that is, there is still a certain difference between the two. Therefore, the category of the content described by the pending key text paragraph and the key chapter title composed of the pending key text may be different. In theory, the title reflects the category information of the main text content. Therefore, in theory, there is no difference between the category of the title and the main text content. Therefore, the difference in the category of the content described by the pending key text paragraph and the key chapter title can be equivalent to the difference in the category of the content described by the pending key text paragraph and the main text. That is, the average semantic similarity between the category semantic vectors of the category labels of multiple key text contents to be determined and the key title semantic vectors of the title text of the key chapter title, which can be used to describe the category similarity between the key text paragraph to be determined and the content described in the main text. By multiplying the above semantic similarity and the category similarity, the accuracy score A of the key text content to be determined can be obtained, thereby describing the overall similarity between the key text content to be determined and the main text.

[0043] In this way, the category similarity of the content described in the pending key text paragraph and the main text can be determined based on the consistency of the categories of the title and the main text content and the characteristic that the difference in categories between the content described in the pending key text paragraph and the key chapter title is equivalent to the difference in categories between the content described in the pending key text paragraph and the main text description, thereby obtaining an accuracy score for the pending key text content based on both category similarity and semantic similarity, so as to comprehensively and accurately describe the overall similarity between the pending key text content and the main text.

[0044] According to one embodiment of the present invention, if the accuracy score of the pending key text content is higher than or equal to a preset score threshold, the pending key text paragraph is determined as the key text content; otherwise, the screened out pending key text content has errors or there are screening omissions, and the semantic recognition model and the word type recognition model can be retrained. The semantic recognition model and the word category recognition model are both recursive neural network models used in related technologies. Both can be retrained based on the training method in the related technology, and after retraining, the pending key text paragraph is determined again, and the accuracy score of the pending key text content is determined. The above process can be iteratively performed until the accuracy score of the pending key text content is higher than or equal to the preset score threshold, and the key text content can be obtained.

[0045] According to an embodiment of the present invention, in step S107, key text contents may be summarized to obtain a contract key contents report, that is, a brief summary of key contents of multiple key chapters may be obtained to facilitate review by reviewers.

[0046] According to one embodiment of the present invention, in step S108, the sources of the key text content and key chapter titles can also be determined, that is, which page of the contract they come from, so as to count the sources of the key text content and key chapter titles, and obtain the contract page containing the most key text content and key chapter titles as the contract key page. At the same time, the page belonging to the third area where the signature or seal is located can also be used as the contract key page.

[0047] According to the method for extracting key contract information based on contract OCR recognition of an embodiment of the present invention, the text information in the contract can be identified based on the OCR recognition system, and the area in the contract page image can be determined through the image recognition model, so as to correspond the text information with the chapters and paragraphs of the contract, and then the key content can be screened based on the semantic information of the text in the chapter title and paragraph, and the key pages in the contract can be determined, which is convenient for the contract review personnel to view and review, and effectively reduces the difficulty of contract review, as well as the manpower and cost consumed in reviewing the contract. When screening key chapter titles, it can be determined by semantic similarity whether each chapter title contains preset keywords, so as to judge whether each chapter title is a key chapter title, thereby improving the accuracy and objectivity of the judgment. When screening the key text content to be determined, the semantic similarity between the category label of each word in the text and the content of the key chapter title can be determined based on the relationship between the category similarity between the content of the key chapter title and the main text, so as to screen out the key text paragraphs to be determined whose categories are consistent with the content described by the key chapter title, thereby improving the accuracy and objectivity of the screening. When determining the accuracy score of the pending key text content, the category similarity between the pending key text paragraph and the content described in the main text can be determined based on the consistency of the categories of the title and the main text content and the characteristic that the difference in categories between the pending key text paragraph and the key chapter title is equivalent to the difference in categories between the pending key text paragraph and the content described in the main text, thereby obtaining the accuracy score of the pending key text content based on both category similarity and semantic similarity, so as to comprehensively and accurately describe the overall similarity between the pending key text content and the main text.

[0048] Figure 2 A system for extracting key contract information based on contract OCR recognition according to an embodiment of the present invention is exemplarily shown, and the system includes: An identification module, used to identify multiple contract pages through the ORC identification system, obtain text information of each contract page, and mark the contract page to which each text information belongs, as well as the first position information of each text information in the contract page; A scanning module, used to scan the contract page through a scanning device to obtain an image of the contract page; A region module, used to identify the contract page image through an image recognition model, determine a first region of each chapter title in the contract page image, a second region of each paragraph in the chapter in the contract page image, and a third region of a signature or seal position in the contract page image; a matching module, configured to determine the text type of each text information, and the chapter and paragraph to which each text information belongs, according to the first position information, the first area, and the second area; The key chapter title module is used to filter out key chapter titles from multiple chapter titles based on the text type of each text and the semantic recognition model; A key text content module is used to determine the key text content according to the text information of each paragraph of the chapter corresponding to the key chapter title and the semantic recognition model; The summary module is used to summarize key text content and generate a report on key contract content; The contract key page module is used to determine the contract key page according to the key chapter title, the key text content, the third area and the contract page to which each text information belongs.

[0049] It should be understood by those skilled in the art that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The purpose of the present invention has been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments, and the embodiments of the present invention may be deformed or modified in any way without departing from the principles.

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

Claims

1. A method for extracting key contract information based on contract OCR recognition, characterized in that: include: Identify multiple contract pages through the ORC recognition system, obtain text information of each contract page, and mark the contract page to which each text information belongs, as well as the first position information of each text information in the contract page; Scan the contract page by using a scanning device to obtain an image of the contract page; Using an image recognition model, the contract page image is recognized to determine a first region of the contract page image for each chapter title, a second region of the contract page image for each paragraph in the chapter, and a third region of the contract page image for a signature or seal position; Determine the text type of each text information, and the chapter and paragraph to which each text information belongs according to the first position information, the first area, and the second area; According to the text type of each text and the semantic recognition model, the key chapter titles are selected from multiple chapter titles; Determine the key text content based on the text information of each paragraph of the chapter corresponding to the key chapter title and the semantic recognition model; Summarize key text contents and generate a report on key contract contents; The key contract page is determined according to the key chapter title, the key text content, the third area, and the contract page to which each text information belongs.

2. The method for extracting key contract information based on contract OCR recognition according to claim 1 is characterized in that: Determining the text type of each text information and the chapter and paragraph to which each text information belongs according to the first position information, the first area, and the second area includes: Obtaining a union of the first regions and a union of the second regions; In a case where the first position information belongs to the union of the first region, determining the text type of the text information corresponding to the first position information as a chapter title; In the case where the first position information belongs to the union of the second region, determining the text type of the text information corresponding to the first position information as chapter text; The chapter and paragraph to which each text information belongs are determined according to the first position information, the text type, the first area, and the second area.

3. The method for extracting key contract information based on contract OCR recognition according to claim 2 is characterized in that: Determining the chapter and paragraph to which each text information belongs according to the first position information, the text type, the first area, and the second area, includes: Determine the region where the i-th chapter is located according to the position information of the i-th first region and the position information of the i+1-th first region; Determine the text information whose text type is chapter title and whose first position information belongs to the area where the i-th chapter is located as the title text of the i-th chapter; Determine the text information of the jth second area in the area where the i-th chapter is located, whose text type is chapter body and whose first position information belongs to, as the body text of the jth paragraph of the i-th chapter; According to the title text of each chapter and the body text of the multiple paragraphs of each chapter, the chapter and paragraph to which each text information belongs are determined.

4. The method for extracting key contract information based on contract OCR recognition according to claim 3 is characterized in that: According to the text type of each text and the semantic recognition model, the key chapter titles are screened out from multiple chapter titles, including: Acquire a preset key semantic vector set, wherein the key semantic vector set includes a plurality of key semantic vectors; Through the semantic recognition model, the title text of each chapter is processed to obtain the title semantic vector of each chapter title; According to the title semantic vector of each chapter title and the key semantic vector set, key chapter titles are screened out from multiple chapter titles.

5. The method for extracting key contract information based on contract OCR recognition according to claim 4 is characterized in that: According to the title semantic vector of each chapter title and the key semantic vector set, key chapter titles are screened out from multiple chapter titles, including: According to the formula: in, is the title semantic vector of the title text of the i-th chapter, for The transposed vector of is the kth key semantic vector, n is the number of key semantic vectors in the key semantic vector set, max is the maximum value function, is a preset first similarity threshold, k≤n, and i, k and n are all positive integers; If the title semantic vector of the title text of the i-th chapter meets the key chapter title screening condition C1, the chapter title of the i-th chapter is determined to be the key chapter title.

6. The method for extracting key contract information based on contract OCR recognition according to claim 4 is characterized in that: According to the text information of each paragraph of the chapter corresponding to the key chapter title and the semantic recognition model, the key text content is determined, including: Determine the key title semantic vector of the title text of the key chapter title through the semantic recognition model; Perform word segmentation on the text information of each paragraph to obtain multiple words of each paragraph; Obtain the category label of each word through the word type recognition model; Processing the category label through a semantic recognition model to obtain a category semantic vector of the category label of each word; The key text content is determined according to the key title semantic vector, the category semantic vector and the text information of each paragraph.

7. The method for extracting key contract information based on contract OCR recognition according to claim 6 is characterized in that: Determining key text content according to the key title semantic vector, the category semantic vector and the text information of each paragraph includes: According to the formula: in, is the key title semantic vector of the title text of the sth key chapter title, for The transposed vector of is the category semantic vector of the category label of the t-th word, is a preset second similarity threshold; If the category semantic vector of the category label of the t-th word meets the key text content screening condition C2, the t-th word is determined as the pending key text content; Combine all pending key text contents to obtain pending key text paragraphs; Determining the accuracy score of the content of the undetermined key text according to the undetermined key text paragraph, the text information of each paragraph and the key title semantic vector; If the accuracy score of the key text content to be determined is higher than or equal to the preset score threshold, the key text paragraph to be determined is determined as the key text content; If the accuracy score of the pending key text content is lower than a preset score threshold, the semantic recognition model and the word type recognition model are retrained, and the key text content is re-determined.

8. The method for extracting key contract information based on contract OCR recognition according to claim 7 is characterized in that: Determining the accuracy score of the content of the key text to be determined according to the key text paragraph to be determined, the text information of each paragraph, and the key title semantic vector, including: The pending key text paragraph is processed by the semantic recognition model to obtain the pending key text semantic vector of the pending key text paragraph; Through the semantic recognition model, the text information of multiple paragraphs is processed to obtain the semantic vector of the text; According to the formula: in, is the semantic vector of the key text to be determined, for The transposed vector of is the semantic vector of the text, is the category semantic vector of the category label of the hth key text content to be determined, N is the number of key text contents to be determined, h≤N, and both h and N are positive integers.

9. A contract key information extraction system based on contract OCR recognition, characterized in that: include: An identification module, used to identify multiple contract pages through the ORC identification system, obtain text information of each contract page, and mark the contract page to which each text information belongs, as well as the first position information of each text information in the contract page; A scanning module, used to scan the contract page through a scanning device to obtain an image of the contract page; A region module, used to identify the contract page image through an image recognition model, determine a first region of each chapter title in the contract page image, a second region of each paragraph in the chapter in the contract page image, and a third region of a signature or seal position in the contract page image; a matching module, configured to determine the text type of each text information, and the chapter and paragraph to which each text information belongs, according to the first position information, the first area, and the second area; The key chapter title module is used to filter out key chapter titles from multiple chapter titles based on the text type of each text and the semantic recognition model; A key text content module is used to determine the key text content according to the text information of each paragraph of the chapter corresponding to the key chapter title and the semantic recognition model; The summary module is used to summarize key text content and generate a report on key contract content; The contract key page module is used to determine the contract key page according to the key chapter title, the key text content, the third area and the contract page to which each text information belongs.

Citation Information

Patent Citations

  • Contract information extraction method and device

    CN114118053A

  • Automatic literature directory identification method and device

    CN118799908A

  • Reading sequence detection method and system combining layout analysis and language model

    CN119380363A