Contract receipt identification and verification method based on large model
Patent Information
- Application Number
- CN202511453870.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2025-11-07
AI Technical Summary
[0002]在特高压工程项目物资合同支付流程中,涉及的单据类型复杂且专业性强,例如保函、交接单等文件往往包含大量非标准化字段,且存在多源异构数据的交叉验证需求
传统OCR仅能处理标准化模板(如身份证),而本方法通过自然语言处理(NLP)与大模型,可解析保函、交接单等复杂合同中的非结构化文本、行业术语及手写内容,解决字段提取准确率不足的问题;传统方案依赖人工定制模板,难以应对合同类型快速变化;本方法通过机器学习自动生成业务校验规则,可根据合同类型动态适配字段要求;通过关键词库与词性标注,快速定位合同中的关键实体,减少人工逐行核对成本;传统方法对模糊表述,无法量化校验,本方法通过语义相似度计算,将模糊字段与行业替代字段库对比,自动识别合规性。综上,本方法通过标准字段预设+NLP智能解析+语义相似度校验的技术路径,实现了合同单据校验从人工经验驱动到数据智能驱动升级,显著提升了复杂合同场景下的处理效率、准确性和扩展性,尤其适用于金融、供应链、特高压等对合同合规性要求高、单据类型复杂的行业。
Smart Images

Figure CN120911482A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of contract document identification and verification, and particularly relates to a contract document identification and verification method based on a large model. BACKGROUND
[0002] In the material contract payment process of an extra-high voltage engineering project, the types of documents involved are complex and highly specialized. For example, files such as letters of guarantee and handover sheets often contain a large number of non-standardized fields, and there is a cross-verification requirement for multi-source heterogeneous data.
[0003] Although traditional general OCR technology performs stably in standardized scenarios such as ID cards and tickets, it has significant limitations when facing material contract business. On the one hand, the identification of special documents such as letters of guarantee requires adaptation to specific templates, and general models lack targeted training for industry terminology, complex table structures, and handwritten signature areas, resulting in insufficient accuracy of text extraction. On the other hand, the field differences of different material contract templates require the system to have dynamic configuration capabilities, and traditional solutions rely on manual annotation and customized model training, which is not only inefficient, but also difficult to cover rapidly changing business needs. In addition, the correlation verification between multi-source data requires structured data and logical reasoning capabilities. General OCR can only complete basic character recognition and cannot achieve automatic comparison and anomaly detection of data relationships. SUMMARY
[0004] The purpose of the present application is to provide a contract document identification and verification method based on a large model, which solves the following technical problems.
[0005] The purpose of the present application can be achieved by the following technical solutions: A contract document identification and verification method based on a large model, comprising the following steps: Step S1: presetting a plurality of standard fields of a contract document, and obtaining the field contents of the standard fields, and presetting business verification rules of the contract document according to the field contents; Step S2: obtaining a contract to be verified, obtaining all fields of the contract to be verified based on natural language processing technology, denoted as to-be-verified fields, and determining whether the to-be-verified fields are fuzzy fields, obtaining the remaining fields; obtaining the fuzzy field content and the remaining field content; determining the standard field corresponding to the fuzzy field content according to the business verification rules, denoted as the predicted standard field; Step S3: based on natural language processing technology, obtaining the semantic similarity of the predicted standard field and the fuzzy field corresponding to the fuzzy field content; setting a semantic similarity threshold, and determining whether the fuzzy field is abnormal; when all fuzzy fields of the contract to be verified are not abnormal, the verification and identification of the contract to be verified are not abnormal.
[0006] As a further scheme of the present application, the standard fields include signing date, effective date and price terms, and the field contents are specific contents corresponding to the standard fields.
[0007] As a further scheme of the present application, the setting process of the business verification rules of the contract document includes: setting a plurality of contract document types, the contract document types including a purchase contract, a service contract and a framework agreement; setting the business logic of each contract document type based on manual setting, the business logic including mandatory fields, total price calculation formula and payment ratio; generating the business verification rules based on the machine learning method according to the business logic.
[0008] As a further scheme of the present application, the contract to be verified is a contract document that needs to be identified and verified, the remaining fields are each field to be verified except the ambiguous field, the ambiguous field content is the field content of the ambiguous field, and the remaining field content is the field content of the remaining field.
[0009] As a further scheme of the present application, the process of obtaining the fields to be verified of the contract to be verified based on the natural language processing technology includes: establishing a keyword library composed of all standard fields; extracting the text content of the contract to be verified through an OCR tool; identifying all keywords in the text content through the keyword library, and recording as all fields to be verified.
[0010] As a further scheme of the present application, the process of identifying all keywords in the text picture includes: obtaining the parts of speech of all standard fields in the keyword library to obtain a part of speech set; dividing the text content by using a word segmentation tool to obtain a plurality of keywords, and performing part of speech tagging on each keyword; screening out the keywords whose parts of speech belong to the part of speech set, and recording as fields to be verified.
[0011] As a further scheme of the present application, the process of determining whether the field to be verified is an ambiguous field includes: obtaining the semantic vector of the field to be verified based on the natural language processing technology, and obtaining the semantic vector of each standard field, recording as a standard semantic vector, to obtain a semantic vector set of each standard field; for any standard semantic vector in the semantic vector set, obtaining the similarity between the standard semantic vector and the semantic vector; if the similarity between the standard semantic vector and the semantic vector exceeds a preset similarity threshold, recording that the semantic vector belongs to the semantic vector set; the setting range of the similarity threshold is [90%, 100%]; if the semantic vector does not belong to the semantic vector set, recording the field to be verified corresponding to the semantic vector as an ambiguous field.
[0012] As a further scheme of the present application: the process of judging whether the fuzzy field is abnormal includes: Obtaining contract documents of enterprise history to obtain contract document data; for any standard field, marking the alternative field of the standard field in each contract document of the contract document data to obtain an alternative field set, the alternative field being a synonym of the standard field in the contract document data; obtaining the semantic similarity of each synonym and the standard field, obtaining the mean of each semantic similarity, denoted as a semantic similarity threshold value; If the fuzzy field belongs to the alternative field set, it is directly recorded that the fuzzy field is not abnormal; if the fuzzy field does not belong to the alternative field set, the semantic similarity is obtained, and if the semantic similarity exceeds the semantic similarity threshold value, the fuzzy field is not abnormal.
[0013] The present application has the following beneficial effects: The traditional OCR can only process standardized templates (such as ID cards), but the present method can analyze unstructured text, industry terms and handwritten content in complex contracts such as performance bonds and handover sheets through natural language processing (NLP) and large models, solving the problem of insufficient accuracy of field extraction; the traditional scheme relies on manual customization of templates and is difficult to cope with rapid changes in contract types; the present method automatically generates business verification rules through machine learning, and can dynamically adapt to field requirements according to contract types; through keyword library and part-of-speech tagging, the key entities in the contract are quickly located, reducing the cost of manual line-by-line checking; the traditional method cannot quantify the verification of ambiguous expressions, and the present method compares the fuzzy field with the industry alternative field library through semantic similarity calculation to automatically identify compliance. In summary, the present method realizes the upgrade of contract document verification from manual experience-driven to data intelligent-driven through the technical path of standard field pre-setting + NLP intelligent analysis + semantic similarity verification, significantly improving the processing efficiency, accuracy and scalability in complex contract scenarios, and is especially suitable for industries such as finance, supply chain and extra-high voltage that have high requirements for contract compliance and complex document types. BRIEF DESCRIPTION OF DRAWINGS
[0014] The present application will be further described below in conjunction with the drawings.
[0015] Figure 1 is a structural schematic diagram of a contract document recognition and verification method based on a large model. DETAILED DESCRIPTION
[0016] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described, obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0017] Please refer to Figure 1 The present application is a contract document recognition and verification method based on a large model, comprising the following steps: Step S1: presetting a plurality of standard fields of a contract document, and obtaining field contents of the standard fields, and presetting business verification rules of the contract document according to the field contents; As a preferred embodiment of the present application, the standard fields include the signing date, the effective date and the price clause, and the field contents are the specific contents corresponding to the standard fields; As a preferred embodiment of the present application, the setting process of the business verification rules of the contract document comprises: Setting a plurality of contract document types, the contract document types including a purchase contract, a service contract and a framework agreement; setting the business logic of each contract document type based on artificial, the business logic including mandatory fields, total price calculation formula and payment proportion; generating the business verification rules based on the business logic according to the machine learning method; The setting process of the business verification rules further comprises: Obtaining all historical contract documents, extracting the historical contract documents using an OCR tool to obtain parsed texts of the historical contract documents, and generating text vectors of the parsed texts; pre-training a BiLSTM-CRF model, identifying key entity types in the historical contract documents through the BiLSTM-CRF model, the key entity types including amount, date and clause type; and identifying the logical relationship between each key entity type based on a relation extraction model (RE), the logical relationship including invoice amount ≤ contract total; and verifying the logical relationship through the business logic, directly recording the logical relationship that passes the verification as a business verification rule; for the logical relationship that does not pass the verification, correcting based on artificial, and obtaining the business verification rule after correction; It is worth noting that the fields in the historical contract documents are all standard fields; It should be noted that the business logic is a key link to ensure that the contract document meets the logic, compliance and business requirements in the business process; the mandatory fields are standard fields that must be present on the contract document, such as contract number, party names and signing date; the total price calculation formula is: total price = unit price × quantity + tax; and the payment proportion is: the sum of prepayment, progress payment and warranty payment proportion is 100%. It can be understood that, according to the business field, common clauses and industry specifications involved in the contract document, general and key fields such as contract amount, delivery date, and information of both parties are sorted out; these fields are carriers of core business information of the contract; through analysis of a large number of historical contract documents, high-frequency and representative fields are extracted as standard fields to construct a standard field system; Based on the business logic, compliance requirements and actual business needs of each standard field, corresponding rules are determined; for example, according to the financial system and business practices, for the contract amount field, set the rule that the amount must be positive and meet certain accuracy requirements; according to the project execution process, set the rule that the delivery date should be after the contract signing date for the delivery date field, etc. Step S2: Obtain a contract to be verified, obtain all fields of the contract to be verified based on natural language processing technology, denoted as to-be-verified fields, and determine whether the to-be-verified fields are fuzzy fields; all to-be-verified fields except the fuzzy fields are denoted as remaining fields. Obtain the field content of the fuzzy field and the remaining field, respectively denoted as fuzzy field content and remaining field content; determine the standard field corresponding to the fuzzy field content according to the business verification rule, denoted as the predicted standard field. As a preferred embodiment of the present application, the contract to be verified is a contract document that needs to be identified and verified. As a preferred embodiment of the present application, the process of obtaining the to-be-verified fields of the contract to be verified based on natural language processing technology includes: Establish a keyword library, which is composed of all standard fields; extract the text content of the contract to be verified through an OCR tool; identify all keywords in the text content through the keyword library, denoted as all to-be-verified fields. The process of identifying all keywords in the text picture includes: Obtain the parts of speech of all standard fields in the keyword library to obtain a set of parts of speech; divide the text content using a word segmentation tool to obtain a plurality of keywords, and perform part-of-speech tagging on each keyword; filter out the keywords whose parts of speech belong to the set of parts of speech, denoted as to-be-verified fields. As a preferred embodiment of the present application, the process of determining whether the to-be-verified field is a fuzzy field includes: obtaining a semantic vector of the to-be-verified field based on a natural language processing technology, and obtaining a semantic vector of each standard field, denoted as a standard semantic vector, to obtain a set of semantic vectors of each standard field; for any standard semantic vector in the set of semantic vectors, obtaining a similarity between the standard semantic vector and the semantic vector; if the similarity between the standard semantic vector and the semantic vector exceeds a preset similarity threshold, it is recorded that the semantic vector belongs to the set of semantic vectors; the setting range of the similarity threshold is [90%, 100%]; if the semantic vector does not belong to the set of semantic vectors, the to-be-verified field corresponding to the semantic vector is recorded as a fuzzy field; As a preferred embodiment of the present application, the determination process of the predicted standard field comprises: mapping the content of all the remaining fields to the business verification rule, and obtaining a plurality of vacancy field positions in the business verification rule; obtaining a standard field corresponding to the vacancy field position, denoted as a predicted standard field; It can be understood that the contract text is analyzed by using the word segmentation, part-of-speech tagging, named entity recognition and other technologies in natural language processing; for example, the contract text is segmented into individual words by word segmentation, and then the named entity recognition model is used to identify entities with specific meanings such as amount, date, and party name from the word sequence, so as to extract all the to-be-verified fields in the contract; According to the pre-set rule or the trained model, the to-be-verified field is analyzed; according to the business verification rule pre-set in step S1, the semantic analysis of the fuzzy field content is combined; the most matched standard field is found in the set of standard fields by calculating the semantic similarity; for example, for the fuzzy field of paying a fee, the semantic analysis and the business rule matching are used to correspond to the standard field of payment amount; Step S3: based on the natural language processing technology, obtaining the semantic similarity of the fuzzy field corresponding to the predicted standard field and the fuzzy field content; setting a semantic similarity threshold, and determining whether the fuzzy field is abnormal; when all the fuzzy fields of the to-be-verified contract are not abnormal, the verification and identification of the to-be-verified contract are not abnormal; As a preferred embodiment of the present application, the setting process of the semantic similarity threshold comprises: obtaining contract documents of the enterprise history to obtain contract document data; for any standard field, marking a substitute field of the standard field in each contract document of the contract document data to obtain a set of substitute fields, the substitute field being a synonym of the standard field in the contract document data; obtaining a semantic similarity between each synonym and the standard field, obtaining a mean value of each semantic similarity, denoted as a semantic similarity threshold; As a preferred embodiment of the present application, the process of determining whether the fuzzy field is abnormal comprises: If the ambiguous field belongs to the alternative field set, it is directly recorded that the ambiguous field does not exist exception; if the ambiguous field does not belong to the alternative field set, the semantic similarity is obtained, and if the semantic similarity exceeds the semantic similarity threshold, the ambiguous field does not exist exception; It can be understood that the content of the predicted standard field and the ambiguous field is converted into a vector form by using a word vector, a sentence vector and other technologies in natural language processing; for example, a word vector is generated by using a Word2Vec, GloVe and other models, or a sentence vector is obtained by using a BERT pre-training model; the semantic similarity between the two vectors is measured by calculating the distance (such as the cosine distance) between the two vectors, and the closer the distance, the higher the semantic similarity; A semantic similarity threshold is preset, and for the ambiguous field not belonging to the alternative field set, the calculated semantic similarity between the predicted standard field and the ambiguous field is compared with the threshold; if the similarity is greater than or equal to the threshold, it is considered that the ambiguous field is semantically consistent with the predicted standard field, and there is no exception; if it is less than the threshold, it is determined that the ambiguous field exists exception; only when all the ambiguous fields of the contract to be checked do not exist exception, it can be determined that the entire contract is recognized without exception; this step is the key link of the entire contract document recognition and verification process, and finally determines whether the contract passes the verification, and provides a basis for the subsequent execution and management of the contract.
[0018] The above has carried out the detailed description to one embodiment of the present application, but the content described is only the preferred embodiment of the present application, and cannot be considered for limiting the implementation scope of the present application. Any equivalent change and improvement made according to the scope of the present application application should still belong to the patent coverage range of the present application.
Claims
1. A large model-based contract document identification verification method, characterized in that, The method comprises the following steps: Step S1: presetting a plurality of standard fields of a contract document, obtaining field contents of the standard fields, and presetting business verification rules of the contract document according to the field contents; Step S2: obtaining a contract to be verified, obtaining all fields of the contract to be verified based on natural language processing technology, denoted as to-be-verified fields, and judging whether the to-be-verified fields are fuzzy fields to obtain remaining fields; obtaining fuzzy field contents and remaining field contents; determining a standard field corresponding to the fuzzy field contents according to the business verification rules, denoted as a predicted standard field; Step S3: based on natural language processing technology, obtaining semantic similarity of the predicted standard field and the fuzzy field corresponding to the fuzzy field contents; setting a semantic similarity threshold, and judging whether the fuzzy field is abnormal; When all fuzzy fields of the contract to be verified are not abnormal, the contract to be verified is verified and recognized as normal.
2. The large model-based contract document identification and verification method according to claim 1, characterized in that, In step S1, the standard fields include a signing date, an effective date and a price clause, and the field contents are specific contents corresponding to the standard fields.
3. The method of claim 1, wherein the method further comprises: In step S1, the setting process of the business verification rules of the contract document comprises: setting a plurality of contract document types, the contract document types including a purchase contract, a service contract and a framework agreement; setting business logic of each contract document type based on artificial setting, the business logic including mandatory fields, total price calculation formulas and payment proportions; and generating business verification rules based on machine learning according to the business logic.
4. The large model-based contract document identification and verification method of claim 1, wherein, In step S2, the contract to be verified is a contract document that needs to be recognized and verified, the remaining fields are to-be-verified fields other than the fuzzy fields, the fuzzy field contents are field contents of the fuzzy fields, and the remaining field contents are field contents of the remaining fields.
5. The large model-based contract document identification and verification method according to claim 1, characterized in that, In step S2, the process of obtaining to-be-verified fields of the contract to be verified based on natural language processing technology comprises: establishing a keyword library, the keyword library being composed of all standard fields; extracting text contents of the contract to be verified through an OCR tool; and identifying all keywords in the text contents through the keyword library, denoted as all to-be-verified fields.
6. The large model-based contract document identification and verification method of claim 5, wherein, In step S2, the process of identifying all keywords in the text picture comprises: obtaining parts of speech of all standard fields in the keyword library to obtain a part-of-speech set; dividing the text contents by using a word segmentation tool to obtain a plurality of keywords, and performing part-of-speech tagging on the keywords; and screening out keywords whose parts of speech belong to the part-of-speech set, denoted as to-be-verified fields.
7. The large model-based contract document identification and verification method according to claim 1, characterized in that, In step S2, the process of judging whether the to-be-verified fields are fuzzy fields comprises: The semantic vector of the to-be-verified field is obtained based on a natural language processing technology, and the semantic vector of each standard field is obtained, denoted as a standard semantic vector, to obtain a set of semantic vectors of the standard fields; for any standard semantic vector in the set of semantic vectors, the similarity between the standard semantic vector and the semantic vector is obtained; if the similarity between the standard semantic vector and the semantic vector exceeds a preset similarity threshold, the semantic vector is recorded as belonging to the set of semantic vectors; the setting range of the similarity threshold is [90%, 100%]; if the semantic vector does not belong to the set of semantic vectors, the to-be-verified field corresponding to the semantic vector is recorded as a fuzzy field.
8. The large model-based contract document identification and verification method according to claim 1, characterized in that, In step S3, the process of judging whether the fuzzy field is abnormal includes: Obtaining contract documents of the enterprise history to obtain contract document data; for any standard field, marking the substitute field of the standard field in each contract document of the contract document data to obtain a set of substitute fields, the substitute field being a synonym of the standard field in the contract document data; obtaining the semantic similarity between each synonym and the standard field, obtaining the mean of each semantic similarity, denoted as a semantic similarity threshold; If the fuzzy field belongs to the set of substitute fields, it is directly recorded that the fuzzy field is not abnormal; if the fuzzy field does not belong to the set of substitute fields, the semantic similarity is obtained, and if the semantic similarity exceeds the semantic similarity threshold, the fuzzy field is not abnormal.
Citation Information
Patent Citations
Service data automatic matching method and device
CN111652299A
Method and system for collecting text data for natural language processing (NLP)
CN111753540A
Health supervision law enforcement data retrieval system and method based on natural language processing
CN111858830A
Contract verification method and device, computer equipment and storage medium
CN118863813A
Contract verification method and device, electronic equipment and storage medium
CN119670730A
Cited By
Logistics document intelligent auditing and storage resource dynamic allocation method
CN121766898A