Contract recognition method and device based on artificial intelligence, equipment and storage medium

By acquiring and labeling historical contract data, and using the VL-Plus-Latest model to train and generate dynamic recognition templates, combined with semantic similarity calculation and structured comparison, the problems of poor generalization and high security risks in traditional contract recognition technologies are solved, achieving efficient and accurate contract information recognition.

CN120910573APending Publication Date: 2025-11-07SHANGHAI DONGPU INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510939373.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing AI-based contract recognition technologies suffer from poor generalization, strong template dependence, lack of semantic association, and high security risks, resulting in insufficient recognition efficiency and accuracy.

Method used

By acquiring historical contract data and labeling key information fields, a structured training dataset is formed. The VL-Plus-Latest basic model is used for training to generate dynamic recognition templates that are adapted to different contract types. By combining semantic similarity calculation and structured field comparison, the differences between offline target contracts and online reference contracts are identified.

Benefits of technology

It significantly improves the intelligence level of contract processing, solves the problems of insufficient adaptability and low recognition accuracy in traditional methods, improves the efficiency of automated processing, and reduces legal risks and labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910573A_ABST
    Figure CN120910573A_ABST
Patent Text Reader

Abstract

The invention relates to the field of contract risk control, and discloses a contract identification method and device based on artificial intelligence, equipment and a storage medium. The method comprises the following steps: marking historical contract data to obtain a training data set; training the initial contract information extraction model through the training data set to obtain a trained contract information extraction model; generating a dynamic identification template set adaptive to different contract types based on historical contract data; respectively extracting key information of the offline target contract data and the online reference contract data by using the trained contract information extraction model and the dynamic recognition template set to obtain offline target contract information and online reference contract information; and through semantic similarity calculation and structured field comparison, identifying the key difference between the offline target contract information and the online reference contract information. According to the method, the problems of low efficiency, poor adaptability and insufficient accuracy in multi-type contract key information extraction and difference comparison of a traditional contract identification method are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of contract risk control, and in particular to a contract identification method and device based on artificial intelligence, equipment and a storage medium. BACKGROUND

[0002] The existing contract identification technology based on artificial intelligence mostly relies on traditional optical character recognition (OCR), which has the following problems: poor generalization, low recognition accuracy of traditional OCR for contract layout, handwritten signature, seal occlusion and the like; lack of semantic association, only extracts text content, and cannot be compared with online contracts at the semantic level; insufficient security, sensitive information such as an ID number is easily leaked during transmission and storage; strong template dependency, requires pre-defined fixed templates, and cannot adapt to diversified contract types.

[0003] Therefore, the prior art still needs to be improved and developed. SUMMARY

[0004] The main purpose of the present application is to solve the problem of insufficient recognition efficiency and accuracy of traditional contract identification technology based on artificial intelligence in contract information recognition due to poor generalization, strong template dependency, lack of semantic association and high security risk.

[0005] The first aspect of the present application provides a contract identification method based on artificial intelligence, comprising: obtaining historical contract data, labeling the historical contract data to obtain a training data set; using a VL-Plus-Latest basic model as an initial contract information extraction model; training the initial contract information extraction model through the training data set, adjusting the parameters of the initial contract information extraction model to obtain a trained contract information extraction model; the historical contract data adapts to a dynamic recognition template set of different contract types; obtaining offline target contract data to be identified and corresponding online reference contract data, using the trained contract information extraction model and the dynamic recognition template set to extract key information of the offline target contract data and the online reference contract data respectively, to obtain offline target contract information and online reference contract information; identifying the key differences between the offline target contract information and the online reference contract information through semantic similarity calculation and structured field comparison.

[0006] Optionally, in the first implementation manner of the first aspect of the present application, the contract key information fields in the historical contract data are type-labeled; the text position, layout features of the contract key information fields are spatially position-labeled; the context logical relationship of the contract key information fields is semantically associated labeled; the labeled contract key information is de-duplicated and structured to obtain the training data set.

[0007] Optionally, in the second implementation form of the first aspect of the present application, the contract images in the training data set are preprocessed to form standardized samples; the standardized samples are input into the initial contract information extraction model, the standardized samples are calculated by forward propagation through the initial contract information extraction model, and contract key information prediction results are output; based on the contract key information prediction results and the labeled contract key information in the training data set, a loss function of the initial contract information extraction model is constructed; the loss function is derived through a back propagation algorithm, and the gradient value of the loss with respect to the parameters of the initial contract information extraction model is calculated; the preset optimizer is used to adjust the parameters of the initial contract information extraction model according to the gradient value, and a trained contract information extraction model is obtained.

[0008] Optionally, in the third implementation form of the first aspect of the present application, the text content features, format features and layout features of the historical contract data are extracted; a clustering algorithm is used to perform clustering analysis on the text content features, format features and layout features, and contract clusters of different contract types are obtained; the high-frequency occurrence positions and common formats of key information fields in the contract clusters of each contract type are counted, and dynamic recognition templates corresponding to the contract types are generated; the dynamic recognition templates corresponding to each contract type are summarized to form a dynamic recognition template set corresponding to the contract types one by one.

[0009] Optionally, in the fourth implementation form of the first aspect of the present application, the offline target contract data to be recognized and corresponding online reference contract data are obtained, and the offline target contract data and the online reference contract data are preprocessed; the features of the preprocessed offline target contract data are matched with the dynamic recognition templates of the corresponding types in the dynamic recognition template set; the trained contract information extraction model is used to extract the key information of the preprocessed offline target contract data and the key information of the preprocessed online reference contract data respectively in combination with the matched dynamic recognition templates; based on the format constraints of the matched dynamic recognition templates, the key information of the preprocessed offline target contract data and the key information of the preprocessed online reference contract data are verified, and structured offline target contract information and online reference contract information are output.

[0010] Optionally, in the fifth implementation form of the first aspect of the present application, the text content of the offline target contract information and the online reference contract information is converted into semantic vectors; the cosine similarity corresponding to the semantic vectors of the offline target contract information and the online reference contract information is calculated, the semantic expression difference of the offline target contract information and the online reference contract information is identified, and a semantic similarity calculation result is obtained; the structured field values corresponding to the structured fields of the offline target contract information and the online reference contract information are extracted, the field value difference of the offline target contract information and the online reference contract information is identified, and a structured difference detection result is obtained; and based on the semantic similarity calculation result and the structured difference detection result, a key difference position and a corresponding risk level are output.

[0011] Optionally, in the sixth implementation form of the first aspect of the present application, for sensitive fields in the offline target contract data and the online reference contract data, a homomorphic encryption algorithm is used for transmission encryption to form ciphertext data; the trained contract information extraction model and the dynamic recognition template set are deployed to a local terminal through a federated learning framework, and the local terminal completes the following operations based on the ciphertext data and non-sensitive fields in the offline target contract data and the online reference contract data: pre-processing and key information extraction are performed on the non-sensitive fields; field positioning is performed on the ciphertext data based on ciphertext features, and feature information in the form of ciphertext is retained.

[0012] The second aspect of the present application provides a contract recognition device based on artificial intelligence, which comprises: an acquisition module for acquiring historical contract data, labeling the historical contract data, and obtaining a training data set; a construction module for using a VL-Plus-Latest basic model as an initial contract information extraction model; training the initial contract information extraction model through the training data set, adjusting the parameters of the initial contract information extraction model, and obtaining a trained contract information extraction model; an adaptation module for generating a dynamic recognition template set adapted to different contract types based on the historical contract data; an extraction module for acquiring offline target contract data to be recognized and corresponding online reference contract data, using the trained contract information extraction model and the dynamic recognition template set to extract key information of the offline target contract data and the online reference contract data respectively, and obtaining offline target contract information and online reference contract information; and an identification module for identifying key differences between the offline target contract information and the online reference contract information through semantic similarity calculation and structured field comparison.

[0013] Optionally, in the first implementation manner of the second aspect of the present application, the obtaining module comprises: a labeling unit, configured to label the type of the contract key information field in the historical contract data; label the spatial position of the text position, layout feature of the contract key information field; label the semantic association of the context logical relationship of the contract key information field; a structure processing unit, configured to perform deduplication and structural processing on the labeled contract key information, to obtain the training data set.

[0014] Optionally, in the second implementation manner of the second aspect of the present application, the constructing module comprises: an image processing unit, configured to pre-process the contract image in the training data set to form a standardized sample; a result prediction unit, configured to input the standardized sample into the initial contract information extraction model, perform forward propagation calculation on the standardized sample through the initial contract information extraction model, and output a contract key information prediction result; a gradient calculation unit, configured to construct a loss function of the initial contract information extraction model based on the contract key information prediction result and the labeled contract key information in the training data set; derive the loss function through a back propagation algorithm, and calculate the gradient value of the loss with respect to the parameters of the initial contract information extraction model; and a parameter adjustment unit, configured to adjust the parameters of the initial contract information extraction model according to the gradient value by using a preset optimizer, to obtain a trained contract information extraction model.

[0015] Optionally, in the third implementation manner of the second aspect of the present application, the adapting module comprises: a feature extraction unit, configured to extract the text content feature, format feature and layout feature of the historical contract data; a clustering analysis unit, configured to perform clustering analysis on the text content feature, format feature and layout feature by using a clustering algorithm, to obtain a contract cluster of different contract types; a template generation unit, configured to count the high-frequency occurrence position and common format of the key information field in the contract cluster of each contract type, and generate a dynamic recognition template corresponding to the contract type; and a summarizing unit, configured to summarize the dynamic recognition templates corresponding to each contract type, to form a dynamic recognition template set corresponding to the contract type in one-to-one manner.

[0016] Optionally, in a fourth implementation form of the second aspect of the present application, the extraction module comprises: a data acquisition unit, configured to acquire offline target contract data to be identified and corresponding online reference contract data, and to pre-process the offline target contract data and the online reference contract data; a data matching unit, configured to match a dynamic identification template of a corresponding type in the dynamic identification template set according to a feature of the pre-processed offline target contract data; an information extraction unit, configured to extract key information of the pre-processed offline target contract data and key information of the pre-processed online reference contract data respectively by using the trained contract information extraction model in combination with the matched dynamic identification template; and an information output unit, configured to check the key information of the pre-processed offline target contract data and the key information of the pre-processed online reference contract data based on a format constraint of the matched dynamic identification template, and output structured offline target contract information and online reference contract information.

[0017] Optionally, in a fifth implementation form of the second aspect of the present application, the identification module comprises: an information conversion unit, configured to convert text content of the offline target contract information and the online reference contract information into semantic vectors; a first identification unit, configured to calculate a cosine similarity corresponding to the semantic vectors of the offline target contract information and the online reference contract information, identify semantic expression differences of the offline target contract information and the online reference contract information, and obtain a semantic similarity calculation result; a second identification unit, configured to extract field values corresponding to structured fields of the offline target contract information and the online reference contract information, identify field value differences of the offline target contract information and the online reference contract information, and obtain a structured difference detection result; and a difference output unit, configured to output a key difference position and a corresponding risk level based on the semantic similarity calculation result and the structured difference detection result.

[0018] Optionally, in a sixth implementation form of the second aspect of the present application, the contract identification apparatus based on artificial intelligence further comprises: an encryption module, configured to perform transmission encryption on sensitive fields in the offline target contract data and the online reference contract data by using a homomorphic encryption algorithm, to form ciphertext data; and a deployment module, configured to deploy the trained contract information extraction model and the dynamic identification template set to a local terminal through a federated learning framework, and to complete the following operations based on the ciphertext data and non-sensitive fields in the offline target contract data and the online reference contract data by the local terminal: pre-processing and key information extraction on the non-sensitive fields; field positioning on the ciphertext data based on ciphertext features, and retaining feature information in the form of ciphertext.

[0019] The third aspect of the present application provides an artificial intelligence-based contract identification device, comprising a memory and at least one processor, the memory having computer readable instructions stored therein, and the memory and the at least one processor being interconnected by a circuit; the at least one processor invokes the computer readable instructions in the memory to enable the artificial intelligence-based contract identification device to perform the steps of the artificial intelligence-based contract identification method described above.

[0020] The fourth aspect of the present application provides a computer readable storage medium having computer readable instructions stored therein, which, when executed on a computer, cause the computer to perform the steps of the artificial intelligence-based contract identification method described above.

[0021] Beneficial effects: In the technical solution of the present application, first, historical contract data is obtained and the types, positions and semantic associations of key information fields are labeled to form a structured training data set; a VL-Plus-Latest basic model is used as an initial model, and model parameters are iteratively optimized through the training data set to enable the model to master the semantic features and layout features of contract texts; based on the text content, format and layout features of historical contract data, clustering analysis is performed to generate a dynamic recognition template set adapted to different types of rental contracts, procurement contracts, etc.; for an offline target contract to be identified and an online reference contract, the contract type is first matched through the dynamic template, and then the key information is extracted using the trained model, and finally the semantic similarity calculation and structured field comparison are combined to accurately locate the contract differences. The artificial intelligence-based contract identification method provided by the present application significantly improves the intelligent level of contract processing through the technical closed loop of model training-template matching-multi-dimensional comparison. On the one hand, the dynamic recognition template can automatically adjust the extraction rules of key information according to the differences in contract types, solving the problem of insufficient adaptability of traditional methods to complex format contracts; on the other hand, the dual verification mechanism combining semantic analysis and structured comparison can not only identify explicit field differences, but also detect implicit expression problems, improving the identification accuracy of contract key differences. In addition, the full-process automatic processing greatly shortens the contract review period, greatly improves the efficiency compared with manual processing, and effectively reduces legal risks and labor costs. BRIEF DESCRIPTION OF DRAWINGS

[0022] Figure 1 The first flowchart of the artificial intelligence-based contract identification method provided for the embodiments of the present application; Figure 2 The second flowchart of the artificial intelligence-based contract identification method provided for the embodiments of the present application; Figure 3 The third flowchart of the artificial intelligence-based contract identification method provided for the embodiments of the present application; Figure 4A fourth flowchart of the contract recognition method based on artificial intelligence provided by the embodiment of the present application is provided; Figure 5 A fifth flowchart of the contract recognition method based on artificial intelligence provided by the embodiment of the present application is provided; Figure 6 A sixth flowchart of the contract recognition method based on artificial intelligence provided by the embodiment of the present application is provided; Figure 7 A seventh flowchart of the contract recognition method based on artificial intelligence provided by the embodiment of the present application is provided; Figure 8 A structural schematic diagram of the contract recognition device based on artificial intelligence provided by the embodiment of the present application is provided; Figure 9 Another structural schematic diagram of the contract recognition device based on artificial intelligence provided by the embodiment of the present application is provided; Figure 10 A structural schematic diagram of the contract recognition device based on artificial intelligence provided by the embodiment of the present application is provided. DETAILED DESCRIPTION

[0023] The embodiment of the present application provides a contract recognition method, device and equipment based on artificial intelligence and a storage medium. The method comprises the following steps: obtaining historical contract data and marking the type, position and semantic association of a key information field to form a structured training data set; using a VL-Plus-Latest basic model as an initial model, iteratively optimizing model parameters through the training data set, so that the model masters the semantic features and layout features of contract text; performing cluster analysis based on the text content, format and layout features of the historical contract data to generate a dynamic recognition template set suitable for different types of contracts such as rental contracts and procurement contracts; for an offline target contract to be recognized and an online reference contract, first matching the contract type through the dynamic template, then extracting key information using the trained model, and finally combining semantic similarity calculation and structured field comparison to accurately locate the contract differences. The present application solves the problems of low efficiency, poor adaptability and insufficient accuracy in the extraction of key information and the comparison of differences in multiple types of contracts in the traditional contract recognition method.

[0024] The terms "first", "second", "third", "fourth" and the like in the description and in the claims of the present application, and above-mentioned drawings, if any, are used to distinguish between similar objects and are not necessarily used to describe a particular sequential or chronological order. It is to be understood that the use of the terms so-termed, where appropriate, can be interchanged with each other to the extent that embodiments described herein can be carried out in sequences other than those illustrated or described herein. Moreover, the terms "comprise" or "have" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or apparatus comprising a list of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products, or apparatuses.

[0025] For ease of understanding, the specific flow of the embodiments of the present application is described below. Please refer to Figure 1 The first embodiment of the contract recognition method based on artificial intelligence in the embodiments of the present application comprises: S100, obtaining historical contract data, labeling the historical contract data to obtain a training data set; In this embodiment, first, historical contract data is obtained, and different types of contract documents are collected from enterprise historical contract archives, public contract sample library and the like, covering leasing contracts, procurement contracts, labor contracts and the like. The collected contract data is labeled and processed: first, the type of the key information fields in the contract such as the amount, the signing date, the ID number is labeled; then, the spatial position of the text position of the field such as located in the third clause, the layout feature such as inside a table or at the end of a paragraph is labeled; finally, the semantic association of the context logical relationship of the field such as the semantic association of the "amount" field and the "payment method" field is labeled. After labeling, the repeated information is removed, and the labeling result is structured into a table form and stored in a relational database to form a training data set. As an example, 2000 different types of contracts are collected, including 800 leasing contracts, 700 procurement contracts and 500 labor contracts, and 2500 amount fields and 1800 date fields are manually labeled and stored in the training database.

[0026] S200, using a VL-Plus-Latest basic model as an initial contract information extraction model; In this embodiment, the VL-Plus-Latest basic model of Tongyi Qianwen is selected as the initial contract information extraction model. The VL-Plus-Latest basic model of Tongyi Qianwen has the ability to extract multi-modal features, can process the text content and layout features of the contract image at the same time, and provides a basic framework for subsequent customized training in the contract field.

[0027] S300, training the initial contract information extraction model by using the training data set, adjusting parameters of the initial contract information extraction model, and obtaining a trained contract information extraction model; In the embodiment, the contract images in the training data set are preprocessed, including adaptive noise reduction, perspective correction and local contrast enhancement, and the contract text is cleaned to remove special characters and unify the font to form standardized samples. The standardized samples are input into the initial contract information extraction model (i.e. the general-purpose VL-Plus-Latest base model) for forward propagation, and the key information prediction result is output. Based on the key information prediction result and the contract key information labeled in step S100, a loss function is constructed, the gradient value of the loss to the parameters of the initial contract information extraction model is calculated by the back propagation algorithm, and the SGD (Stochastic Gradient Descent) optimizer is used to update the parameters of the initial contract information extraction model according to the gradient value to iteratively adjust the weights and biases of the initial contract information extraction model, so that the loss function gradually converges, and finally the trained contract information extraction model is obtained.

[0028] S400, the historical contract data is adapted to a dynamic recognition template set of different contract types; In the embodiment, text content features such as keywords "rental" and "party A", format features such as table proportion and paragraph separator, and layout features such as field position heat map are extracted from the historical contract data. After converting the extracted features into vector representation, the K-Means (K-Means, k-means clustering algorithm) clustering algorithm is used to classify the historical contract data, and different contract type clusters are obtained. For each cluster, the high-frequency occurrence position of the key information field is counted, for example, the "rental amount" field in the rental contract appears 90% in the 5th clause, and the common format is "XXXX year XX month XX day", and the corresponding type of dynamic recognition template is generated, and finally the dynamic recognition template set is formed. As an example, after clustering 2000 historical contracts, 3 main contract type clusters are obtained, among which the "rental period" field in the rental contract cluster appears 85% in the 4th clause, and the format is mostly "from XXXX year XX month XX day to XXXX year XX month XX day", and the rental contract dynamic recognition template is generated accordingly.

[0029] S500, obtaining offline target contract data to be recognized and corresponding online reference contract data, using the trained contract information extraction model and the dynamic recognition template set to extract key information of the offline target contract data and the online reference contract data respectively, and obtaining offline target contract information and online reference contract information; In this embodiment, the scanned copy of the offline paper contract is obtained as the target contract data, and the electronically stored version is obtained as the reference contract data. The two types of data are preprocessed, including image denoising, tilt correction, and text normalization, such as unifying fonts and removing unnecessary spaces; the text keywords of the preprocessed target contract, such as "purchase", and layout features are extracted, and the corresponding type template, such as the purchase contract template, in the dynamic recognition template set is matched; the trained contract information extraction model is called in combination with the matched template, and the high-frequency position of the key information field recorded in the matched template, such as the "lease period" field in the lease contract, is commonly found in the 4th clause, and the format constraint, such as the date format "XXX year XX month XX day". The key information extraction is performed on the offline target contract data and the corresponding online reference contract data: the trained contract information extraction model locates the candidate area by analyzing the text semantics and layout features, and extracts the field content such as the amount and the ID number; finally, the extracted key information is format checked, such as the amount needs to contain both numbers and capitalized Chinese characters, and integrity verified, such as whether the mandatory field is missing, the key information that meets the requirements is structured and integrated to form the offline target contract information and the online reference contract information. As an example, a scanned copy of an offline purchase contract and an online electronic version are obtained, and after preprocessing, the "purchase" keyword is matched with the purchase contract template, and the trained contract information extraction model extracts the "goods name" field from the template specified table row 2 as "server equipment", and stores it after format checking.

[0030] S600, by semantic similarity calculation and structured field comparison, identifying the key differences between the offline target contract information and the online reference contract information.

[0031] In this embodiment, the text content of the target contract and the reference contract is input into the BERT (BERT, Bidirectional Encoder Representations from Transformers) pre-training model to generate high-dimensional semantic vectors; the cosine similarity of the semantic vectors of the two is calculated to identify the semantic deviation caused by expression differences such as synonym replacement, and the semantic similarity result is obtained. At the same time, the field values of the structured fields of the two, such as the amount and the date, are extracted, and the numerical values or text contents are directly compared to obtain the structured difference result. The semantic similarity and the structured difference result are integrated, and the key difference position is determined according to the preset rule, such as semantic similarity < 0.7 or field value difference > 10%, and the risk level is output, for example, high risk level, medium risk level, and low risk level.

[0032] The embodiment provides an artificial intelligence-based contract identification method, which significantly improves the intelligent level of contract processing through a technical closed loop of model training-template matching-multi-dimensional comparison, and solves the problems of low recognition efficiency and accuracy caused by poor generalization, strong template dependence, lack of semantic association and high security risk in traditional artificial intelligence-based contract identification technology in contract information identification.

[0033] Referring to Figure 2 The second embodiment of the artificial intelligence-based contract identification method in the embodiment includes the following steps. S110, type labeling is performed on contract key information fields in the historical contract data; S120, spatial position labeling is performed on text positions and layout features of the contract key information fields; S130, semantic association labeling is performed on context logical relationships of the contract key information fields; S140, the labeled contract key information is de-duplicated and structured to obtain a training data set.

[0034] In the embodiment, historical contract data such as lease contracts, procurement contracts, labor contracts and other types of contract documents are first obtained. The contract key information fields in the obtained historical contract data are labeled as follows: first, type labeling is performed on the key information fields in the contract, such as amount, signing date and ID number; second, spatial position labeling is performed on the text positions of the fields, such as being located in clause 3, layout features such as being in a table or at the end of a paragraph; and finally, semantic association labeling is performed on the context logical relationships of the fields, such as the semantic association between the “amount” field and the “payment method” field. After the above type labeling, spatial position labeling and semantic association labeling are completed, the repeatedly labeled information is de-duplicated, and the labeling results are structured into a table form and stored in a relational database to form a training data set.

[0035] Referring to Figure 3 The third embodiment of the artificial intelligence-based contract identification method in the embodiment includes the following steps. S310, preprocessing is performed on contract images in the training data set to form standardized samples; S320, the standardized samples are input into the initial contract information extraction model, forward propagation calculation is performed on the standardized samples by the initial contract information extraction model, and a contract key information prediction result is output; S330, based on the contract key information prediction result and the labeled contract key information in the training data set, a loss function of the initial contract information extraction model is constructed; S340, derive the loss function by a back propagation algorithm, and calculate a gradient value of the loss with respect to the initial contract information extraction model parameter; S350, adjust the parameter of the initial contract information extraction model according to the gradient value by using a preset optimizer, and obtain a trained contract information extraction model.

[0036] In the embodiment, the contract image in the training data set is preprocessed, including adaptive noise reduction, perspective correction and local contrast enhancement, and the contract text is cleaned to remove special characters and unify the font to form a standardized sample. The standardized sample is input into an initial contract information extraction model (i.e. a general-purpose VL-Plus-Latest base model) for forward propagation, and a key information prediction result is output. A loss function is constructed based on the key information prediction result and the contract key information labeled in step S100, the gradient value of the loss with respect to the initial contract information extraction model parameter is calculated by a back propagation algorithm, and the initial contract information extraction model parameter is updated according to the gradient value by using an SGD (Stochastic Gradient Descent) optimizer to iteratively adjust the weight and bias of the initial contract information extraction model, so that the loss function gradually converges, and finally a trained contract information extraction model is obtained.

[0037] Please refer to Figure 4 The fourth embodiment of the contract recognition method based on artificial intelligence in the embodiment of the present application includes: S410, extract the text content features, format features and layout features of the historical contract data; S420, perform clustering analysis on the text content features, format features and layout features by using a clustering algorithm, and obtain contract clusters of different contract types; S430, count the high-frequency occurrence positions and common formats of the key information fields in the contract clusters of each contract type, and generate dynamic recognition templates corresponding to the contract types; S440, collect the dynamic recognition templates corresponding to each contract type to form a dynamic recognition template set corresponding to the contract types one by one.

[0038] In this embodiment, text content features such as keywords "rental", "Party A", format features such as table proportion, paragraph separator, and layout features such as field position heat map are extracted from historical contract data. Using the BERT (BERT, Bidirectional Encoder Representations from Transformers) pre-training model, the above extracted features are converted into vector representation, and then the K-Means (K-Means, k-means clustering algorithm) clustering algorithm is used to classify the historical contract data, and different contract type clusters are obtained, such as rental contract cluster and procurement contract cluster. The high frequency position of key information fields in each cluster is counted, for example, the "rental amount" field in the rental contract appears 90% in the 5th clause, and the common format such as the date "XXXX year XX month XX day" form, and the corresponding type of dynamic recognition template is generated, and finally the dynamic recognition template set is formed.

[0039] Please refer to Figure 5 The fifth embodiment of the contract recognition method based on artificial intelligence in the embodiment of the present application includes: S510, obtaining offline target contract data to be recognized and corresponding online reference contract data, and preprocessing the offline target contract data and the online reference contract data; S520, matching the dynamic recognition template of the corresponding type in the dynamic recognition template set according to the features of the preprocessed offline target contract data; S530, using the trained contract information extraction model to extract the key information of the preprocessed offline target contract data and the key information of the preprocessed online reference contract data respectively in combination with the matched dynamic recognition template; S540, based on the format constraint of the matched dynamic recognition template, verifying the key information of the preprocessed offline target contract data and the key information of the preprocessed online reference contract data, and outputting the structured offline target contract information and online reference contract information.

[0040] In this embodiment, the scanned copy of the offline paper contract is obtained as the target contract data, and the online stored electronic version is obtained as the reference contract data. The two types of data are preprocessed, including image noise reduction, tilt correction and text normalization, such as unified font and removal of extra spaces; the text keywords of the preprocessed target contract, such as “purchase”, and the layout features are extracted, and the corresponding type template in the dynamic recognition template set, such as the purchase contract template, is matched; the trained contract information extraction model is called in combination with the matched template, and the high-frequency position of the key information field recorded in the matched template, such as the “lease period” field in the lease contract, is commonly found in the fourth clause, and the format constraint, such as the date format “XXX year XX month XX day”. The key information extraction is performed on the offline target contract data and the corresponding online reference contract data: the trained contract information extraction model locates the candidate area by analyzing the text semantics and layout features, extracts the field content such as the amount and the ID number, and finally, the extracted key information is format checked, such as the amount needs to contain both numbers and capitalized Chinese characters, and integrity verified, such as whether the mandatory field is missing, the key information structure that meets the requirements is structured and integrated to form the offline target contract information and the online reference contract information.

[0041] Referring to Figure 6 The sixth embodiment of the contract recognition method based on artificial intelligence in the embodiment of the present application includes: S610, converting the text content of the offline target contract information and the online reference contract information into semantic vectors; S620, calculating the cosine similarity corresponding to the semantic vectors of the offline target contract information and the online reference contract information, identifying the semantic expression difference of the offline target contract information and the online reference contract information, and obtaining the semantic similarity calculation result; S630, extracting the field values corresponding to the structured fields of the offline target contract information and the online reference contract information, identifying the field value difference of the offline target contract information and the online reference contract information, and obtaining the structured difference detection result; S640, based on the semantic similarity calculation result and the structured difference detection result, outputting the key difference position and the corresponding risk level.

[0042] In the embodiment, the text content of the target contract and the reference contract is input into a BERT (Bidirectional Encoder Representations from Transformers) pre-training model to generate high-dimensional semantic vectors; the cosine similarity of the semantic vectors of the two is calculated to identify semantic deviation caused by differences in expression such as synonym replacement, and a semantic similarity result is obtained. At the same time, the field values of the structured fields of the two, such as the amount and the date, are directly compared in value or text content to obtain a structured difference result. The semantic similarity and the structured difference result are integrated, and the key difference position is determined according to a preset rule such as semantic similarity < 0.7 or field value difference > 10%, and a risk level is output, for example, a high risk level, a medium risk level, and a low risk level.

[0043] Please refer to Figure 7 The seventh embodiment of the contract identification method based on artificial intelligence in the embodiment of the application includes: S700, the sensitive fields in the offline target contract data and the online reference contract data are transmitted and encrypted using a homomorphic encryption algorithm to form ciphertext data; S800, the trained contract information extraction model and the dynamic identification template set are deployed to the local terminal through a federated learning framework, and the local terminal completes the following operations based on the ciphertext data and the non-sensitive fields in the offline target contract data and the online reference contract data: The non-sensitive fields are preprocessed and key information is extracted; The ciphertext data is field-positioned based on ciphertext features, and the feature information in the ciphertext form is retained.

[0044] In the embodiment, after obtaining the offline target contract and the online reference contract data, the sensitive fields such as the ID number and the contact number are transmitted and encrypted using a Paillier homomorphic encryption algorithm to form ciphertext data. It should be understood that after the ciphertext data is formed, decryption logic is triggered only when the difference comparison between the offline target contract information and the online reference contract information is performed; The non-sensitive fields are directly preprocessed and information is extracted, and the ciphertext data is field-positioned based on the ciphertext feature analysis technology of the trained contract information extraction model, such as identifying the layout features of the ciphertext area, and the feature information in the ciphertext form is retained; the server end only receives the trained contract information extraction model parameter update information uploaded by the local terminal, rather than the original data, aggregates and then issues the updated global model to ensure that the data is recognized and compared locally.

[0045] The contract identification method based on artificial intelligence in the embodiment of the application is described above, and the contract identification device based on artificial intelligence in the embodiment of the application is described below. Please refer toFigure 8 An embodiment of the contract recognition device based on artificial intelligence in the present application comprises: The acquisition module 10 is configured to acquire historical contract data, label the historical contract data, and obtain a training data set; The construction module 20 is configured to use a VL-Plus-Latest base model as an initial contract information extraction model, train the initial contract information extraction model based on the training data set, adjust parameters of the initial contract information extraction model, and obtain a trained contract information extraction model; The adaptation module 30 is configured to generate a dynamic recognition template set adapted to different contract types based on the historical contract data; The extraction module 40 is configured to acquire offline target contract data to be recognized and corresponding online reference contract data, use the trained contract information extraction model and the dynamic recognition template set to extract key information of the offline target contract data and the online reference contract data respectively, and obtain offline target contract information and online reference contract information; The recognition module 50 is configured to identify key differences between the offline target contract information and the online reference contract information through semantic similarity calculation and structured field comparison.

[0046] Please refer to Figure 9 In the present embodiment, the acquisition module comprises: The labeling unit 11 is configured to type label contract key information fields in the historical contract data, spatially position label text positions, layout features of the contract key information fields, and semantically associate label context logical relationships of the contract key information fields; The structure processing unit 12 is configured to de-duplicate and structure process the labeled contract key information, and obtain a training data set.

[0047] Please refer to Figure 9 In the present embodiment, the construction module comprises: The image processing unit 21 is configured to pre-process contract images in the training data set, and form standardized samples; The result prediction unit 22 is configured to input the standardized samples into the initial contract information extraction model, perform forward propagation calculation on the standardized samples by the initial contract information extraction model, and output contract key information prediction results; The gradient calculation unit 23 is configured to construct a loss function of the initial contract information extraction model based on the contract key information prediction results and the labeled contract key information in the training data set, and calculate gradient values of the loss with respect to parameters of the initial contract information extraction model by a back propagation algorithm; The parameter adjustment unit 24 is configured to adjust parameters of the initial contract information extraction model according to the gradient value by using a preset optimizer, to obtain a trained contract information extraction model.

[0048] Referring to Figure 9 In this embodiment, the adaptation module comprises: The feature extraction unit 31 is configured to extract text content features, format features and layout features of the historical contract data. The clustering analysis unit 32 is configured to perform clustering analysis on the text content features, format features and layout features by using a clustering algorithm, to obtain contract clusters of different contract types. The template generation unit 33 is configured to count high-frequency occurrence positions and common formats of key information fields in the contract clusters of each contract type, and generate dynamic recognition templates corresponding to the contract types. The summary unit 34 is configured to summarize the dynamic recognition templates corresponding to the contract types, to form a dynamic recognition template set corresponding to the contract types.

[0049] Referring to Figure 9 In this embodiment, the extraction module comprises: The data acquisition unit 41 is configured to acquire offline target contract data to be recognized and corresponding online reference contract data, and perform preprocessing on the offline target contract data and the online reference contract data. The data matching unit 42 is configured to match a dynamic recognition template of a corresponding type in the dynamic recognition template set according to features of the preprocessed offline target contract data. The information extraction unit 43 is configured to extract key information of the preprocessed offline target contract data and key information of the preprocessed online reference contract data respectively by using the trained contract information extraction model in combination with the matched dynamic recognition template. The information output unit 44 is configured to check the key information of the preprocessed offline target contract data and the key information of the preprocessed online reference contract data based on format constraints of the matched dynamic recognition template, and output structured offline target contract information and online reference contract information.

[0050] Referring to Figure 9 In this embodiment, the recognition module comprises: The information conversion unit 51 is configured to convert text content of the offline target contract information and the online reference contract information into semantic vectors. The first recognition unit 52 is configured to calculate cosine similarity corresponding to the semantic vectors of the offline target contract information and the online reference contract information, recognize semantic expression differences of the offline target contract information and the online reference contract information, and obtain a semantic similarity calculation result. The second identification unit 53 is configured to extract field values corresponding to structured fields of the offline target contract information and the online reference contract information, identify differences between the field values of the offline target contract information and the online reference contract information, and obtain a structured difference detection result. The difference output unit 54 is configured to output a key difference position and a corresponding risk level based on the semantic similarity calculation result and the structured difference detection result.

[0051] Please refer to Figure 9 In this embodiment, the contract identification device based on artificial intelligence further includes: The encryption module 60 is configured to perform transmission encryption on sensitive fields in the offline target contract data and the online reference contract data by using a homomorphic encryption algorithm to form ciphertext data. The deployment module 70 is configured to deploy the trained contract information extraction model and the dynamic identification template set to a local terminal through a federated learning framework, and perform the following operations on the local terminal based on the ciphertext data and non-sensitive fields in the offline target contract data and the online reference contract data: pre-processing and key information extraction on the non-sensitive fields; and field positioning on the ciphertext data based on ciphertext features to retain feature information in the form of ciphertext.

[0052] The above Figure 8 And Figure 9 The contract identification device based on artificial intelligence in the embodiment is described in detail from the perspective of a modular functional entity, and the contract identification device based on artificial intelligence in the embodiment is described in detail from the perspective of hardware processing.

[0053] Figure 10 is a structural schematic diagram of a contract identification device based on artificial intelligence provided by the embodiment. The contract identification device based on artificial intelligence 1000 can have great differences due to different configurations or performances, and can include one or more processors (central processing units, CPUs) 1100 (for example, one or more processors) and a memory 1200, one or more storage media 1300 (for example, one or more mass storage devices) storing application programs 1310 or data 1320. The memory 1200 and the storage medium 1300 can be temporary storage or persistent storage. The programs stored in the storage medium 1300 can include one or more modules (not shown in the figure), and each module can include a series of instruction operations in the contract identification device based on artificial intelligence 1000. Further, the processor 1100 can be configured to communicate with the storage medium 1300 and execute a series of instruction operations in the storage medium 1300 on the contract identification device based on artificial intelligence 1000.

[0054] The artificial intelligence-based contract recognition device 1000 can further include one or more power supplies 1400, one or more wired or wireless network interfaces 1500, one or more input / output interfaces 1600, and / or one or more operating systems 1330 such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art can understand that, Figure 10 The illustrated device structure does not constitute a limitation on the artificial intelligence-based contract recognition device 1000, and can include more or fewer components than illustrated, or combine certain components, or different component arrangements.

[0055] The present application also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, and the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the artificial intelligence-based contract recognition method.

[0056] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system or device, unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0057] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art, or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.

[0058] The above-described embodiments are merely used to illustrate the technical solutions of the present application, rather than limiting them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An artificial intelligence-based contract recognition method, characterized by, The artificial intelligence-based contract identification method comprises: acquiring historical contract data, labeling the historical contract data to obtain a training data set; adopting a VL-Plus-Latest basic model as an initial contract information extraction model; training the initial contract information extraction model through the training data set, adjusting parameters of the initial contract information extraction model to obtain a trained contract information extraction model; the historical contract data adapts a dynamic recognition template set of different contract types; acquiring offline target contract data to be identified and corresponding online reference contract data, using the trained contract information extraction model and the dynamic recognition template set to extract key information of the offline target contract data and the online reference contract data respectively to obtain offline target contract information and online reference contract information; through semantic similarity calculation and structured field comparison, identifying key differences between the offline target contract information and the online reference contract information. 2.The AI-based contract recognition method of claim 1, wherein, The step of labeling the historical contract data to obtain a training data set comprises: type labeling of contract key information fields in the historical contract data; spatial position labeling of text position and layout features of the contract key information fields; semantic association labeling of context logical relationships of the contract key information fields; de-duplication and structured processing of the labeled contract key information to obtain a training data set. 3.The AI-based contract recognition method of claim 1, wherein, The step of training the initial contract information extraction model through the training data set, adjusting parameters of the initial contract information extraction model to obtain a trained contract information extraction model comprises: preprocessing contract images in the training data set to form standardized samples; inputting the standardized samples into the initial contract information extraction model, performing forward propagation calculation on the standardized samples through the initial contract information extraction model, and outputting contract key information prediction results; based on the contract key information prediction results and the labeled contract key information in the training data set, constructing a loss function of the initial contract information extraction model; deriving the loss function through a back propagation algorithm to calculate gradient values of the loss with respect to parameters of the initial contract information extraction model; using a preset optimizer to adjust the parameters of the initial contract information extraction model according to the gradient values to obtain a trained contract information extraction model. 4.The AI-based contract recognition method of claim 1, wherein, The step of generating a dynamic recognition template set adapted to different contract types based on the historical contract data comprises: extracting text content features, format features and layout features of the historical contract data; using a clustering algorithm to perform clustering analysis on the text content features, format features and layout features to obtain contract clusters of different contract types; statistically analyzing high-frequency occurrence positions and common formats of key information fields in the contract clusters of each contract type to generate dynamic recognition templates corresponding to the contract types; summarizing the dynamic recognition templates corresponding to each contract type to form a dynamic recognition template set corresponding to the contract types one by one. 5.The AI-based contract recognition method of claim 1, wherein, The step of obtaining offline target contract data to be identified and corresponding online reference contract data, using the trained contract information extraction model and a dynamic recognition template set to respectively extract key information of the offline target contract data and the online reference contract data, to obtain offline target contract information and online reference contract information, comprises: Obtain offline target contract data to be identified and corresponding online reference contract data, and preprocess the offline target contract data and the online reference contract data; According to the characteristics of the preprocessed offline target contract data, match the corresponding type of dynamic recognition template in the dynamic recognition template set; Use the trained contract information extraction model combined with the matched dynamic recognition template to extract the key information of the preprocessed offline target contract data and the key information of the preprocessed online reference contract data; Based on the format constraint of the matched dynamic recognition template, the key information of the preprocessed offline target contract data and the key information of the preprocessed online reference contract data are checked, and the structured offline target contract information and online reference contract information are output. 6.The AI-based contract recognition method of claim 1, wherein, The step of identifying the key differences between the offline target contract information and the online reference contract information by calculating the semantic similarity and comparing the structured fields comprises: Convert the text content of the offline target contract information and the online reference contract information into semantic vectors; Calculate the cosine similarity of the semantic vectors of the offline target contract information and the online reference contract information, identify the semantic expression differences of the offline target contract information and the online reference contract information, and obtain the semantic similarity calculation result; Extract the field values corresponding to the structured fields of the offline target contract information and the online reference contract information, identify the field value differences of the offline target contract information and the online reference contract information, and obtain the structured difference detection result; Based on the semantic similarity calculation result and the structured difference detection result, output the key difference position and the corresponding risk level. 7.The AI-based contract recognition method of claim 1, wherein, After the step of obtaining offline target contract data to be identified and corresponding online reference contract data, further comprising: Sensitive fields in the offline target contract data and the online reference contract data are transmitted and encrypted using a homomorphic encryption algorithm to form ciphertext data; Deploy the trained contract information extraction model and the dynamic recognition template set to the local terminal through the federated learning framework, and based on the ciphertext data and the non-sensitive fields in the offline target contract data and the online reference contract data, complete the following operations: Preprocess and extract key information of the non-sensitive fields; Based on the ciphertext characteristics, complete field positioning on the ciphertext data, and retain the feature information in the ciphertext form.

8. An artificial intelligence-based contract recognition apparatus, characterized by, The contract recognition device based on artificial intelligence comprises: An acquisition module is configured to obtain historical contract data, label the historical contract data, and obtain a training data set; The construction module is configured to use a VL-Plus-Latest base model as an initial contract information extraction model, train the initial contract information extraction model by using the training data set, and adjust parameters of the initial contract information extraction model to obtain a trained contract information extraction model. The adaptation module is configured to generate a dynamic recognition template set adapted to different contract types based on the historical contract data. The extraction module is configured to obtain offline target contract data to be recognized and corresponding online reference contract data, extract key information of the offline target contract data and the online reference contract data by using the trained contract information extraction model and the dynamic recognition template set, and obtain offline target contract information and online reference contract information. The recognition module is configured to recognize key differences between the offline target contract information and the online reference contract information by performing semantic similarity calculation and structured field comparison. 9.A contract recognition device based on artificial intelligence, characterized by, The computer readable instructions are executed by the processor to implement the steps of the contract recognition method based on artificial intelligence according to any one of claims 1-7. The computer readable instructions are executed by the processor to implement the steps of the contract recognition method based on artificial intelligence according to any one of claims 1-7.

10. A computer-readable storage medium having stored thereon computer-readable instructions, wherein, ​

Citation Information

Cited By

  • Bidding document auxiliary checking method, device and equipment

    CN121145796A