A contract seal recognition method based on machine learning
By using machine learning technology to screen, analyze and extract features from contract seal images, combined with pattern recognition and verification comparison, the problems of traditional seal recognition methods being time-consuming, labor-intensive and low in accuracy are solved, and the legality of contract seals can be quickly and accurately determined.
Patent Information
- Application Number
- CN202411676128.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2044-11-21
AI Technical Summary
Traditional seal recognition methods rely on manual operations, which are time-consuming, labor-intensive, and easily affected by human factors, resulting in low recognition accuracy and making it difficult to quickly and accurately identify the authenticity and type of contract seals.
Using machine learning technology, we acquire contract seal images in real time, perform image screening, analysis, processing and feature extraction, use machine learning algorithms for pattern recognition, and verify and compare with reference seals to determine the legality of the contract.
It can quickly and accurately identify the authenticity and type of contract seals, determine the legality of the contract, improve recognition efficiency and accuracy, and reduce human errors.
Smart Images

Figure CN119832203B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine learning technology, and in particular to a contract seal recognition method based on machine learning. Background Art
[0002] During the contract signing process, seals serve as crucial authentication and document signing tools, possessing irreplaceable legal validity. However, traditional seal recognition methods often rely on manual labor, which is not only time-consuming and labor-intensive but also susceptible to human error, resulting in low recognition accuracy. Therefore, how to quickly and accurately identify the authenticity of contract seals and determine the legality of existing contracts has become a major research topic.
[0003] Therefore, the present invention provides a contract seal recognition method based on machine learning. Summary of the Invention
[0004] The present invention provides a contract seal recognition method based on machine learning, which is used to obtain target image features by performing image screening, analysis processing and feature extraction on images of contract seals obtained in real time; based on the first seal recognition result obtained by performing pattern recognition on the target image features using a machine learning algorithm, the current contract seal is verified and compared with a reference seal to determine whether the current contract is legal. The method can quickly and accurately identify the authenticity and type of the contract seal, and then determine the legality of the current contract.
[0005] The present invention provides a contract seal recognition method based on machine learning, comprising:
[0006] Step 1: Use the set acquisition tool to obtain the image of the contract seal of the target contract in real time, and perform image screening to obtain the target seal image;
[0007] Step 2: Analyze and process the target seal image and extract features to obtain target image features;
[0008] Step 3: Introduce a machine learning algorithm to perform pattern recognition on the target image features to obtain a first seal recognition result;
[0009] Step 4: Based on the first seal recognition result, the contract seal of the current target contract is verified and compared with the reference seal to determine whether the current target contract is legal.
[0010] Preferably, the image of the contract seal of the target contract is acquired in real time using a set acquisition tool and image screening is performed to obtain the target seal image, including:
[0011] Scanning the contract seal of the current target contract using a set scanner to obtain a first scanned image;
[0012] Using a set camera to take a preset number of photos of the contract seal of the current target contract to obtain a first set of photographed images;
[0013] performing clarity analysis on all images in the first captured image set based on a set clarity index, and outputting the image with the highest clarity as the first camera image;
[0014] performing usability analysis on the first scanned image and the first camera image to obtain a usability coefficient;
[0015] The calculation formula of the available coefficient is as follows:
[0016] Where, Represented as the available coefficients of the current image; It is represented as the i-th available evaluation index of the current image, where i=1, 2, , n; n represents the number of available evaluation indicators; It is expressed as the influence weight of the i-th available evaluation index on the evaluation of image usability;
[0017] The image with the larger available coefficient between the first scanned image and the first camera image is used as the target seal image.
[0018] Preferably, the clarity index is set to include gradient mean, gradient variance and Laplacian variance.
[0019] Preferably, analyzing and processing the target seal image and extracting features to obtain target image features include:
[0020] Step 11: performing image preprocessing on the target seal image to obtain a first image;
[0021] Step 12: Calculate the usability coefficient of the first image. If the usability coefficient of the first image is greater than a set usability threshold, the current first image is output as the applicable image.
[0022] Step 13: Otherwise, re-photograph the contract seal of the current target contract using the set camera to obtain a second photographed image set;
[0023] Step 14: selecting an image with the highest definition from the second captured image set and performing preprocessing to obtain a second image;
[0024] Step 15: Calculating the usability coefficient of the second image. If the usability coefficient of the second image is greater than a set usability threshold, outputting the current second image as an applicable image.
[0025] If the usability coefficient of the second image is not greater than the set usability threshold, repeating steps 13-15 until a suitable image is output;
[0026] Step 16: Extract features from the applicable image to obtain target image features.
[0027] Preferably, performing feature extraction on the applicable image to obtain target image features includes:
[0028] Step 21: Inputting the applicable image into a pre-established feature extraction model to obtain a first feature set;
[0029] Step 22: extracting features from the applicable image using a set feature extraction algorithm to obtain a second feature set;
[0030] Step 23: performing feature comparison of the same feature category on the first feature set and the second feature set to obtain a first feature comparison result;
[0031] Step 24: If the first feature comparison result is completely consistent, the feature category corresponding to the current first feature comparison result is marked as a valid feature category;
[0032] Outputting corresponding feature content of the valid feature category in the first feature set as target image features;
[0033] If the first feature comparison result shows that there is a difference, the feature category corresponding to the current first feature comparison result is marked as a suspicious feature category;
[0034] Step 25: Comparing the corresponding feature content of the suspicious feature category in the first feature set with the corresponding feature content in the second feature set, and marking the identical parts as useful feature content;
[0035] Step 26: Comparing the corresponding feature content of the suspicious feature category in the first feature set with the corresponding feature content in the second feature set, and obtaining the difference in content, marking it as the first pending feature content;
[0036] Comparing the corresponding feature content of the suspicious feature category in the second feature set with the corresponding feature content in the first feature set to obtain different content, marking them as second undetermined feature content;
[0037] Step 27: Perform credibility analysis on the first undetermined feature content and the second undetermined feature content to obtain usable feature content;
[0038] Step 28: Supplement the available feature content to the useful feature content, and then output it as the target image feature;
[0039] Step 29: If the first feature comparison result is completely different, optimize the current feature extraction model and repeat steps 21-28 until the target image feature output is obtained or the maximum number of iterations is reached;
[0040] When the maximum number of iterations is reached and the target image features still cannot be obtained, a warning signal is sent to the maintenance personnel for manual processing.
[0041] Preferably, performing credibility analysis on the first undetermined feature content and the second undetermined feature content to obtain usable feature content includes:
[0042] Using the first undetermined feature content and the second undetermined feature content as matching conditions, traversing a set available feature database to obtain available frequencies of the first undetermined feature content and the second undetermined feature content respectively;
[0043] Extracting feature values of the first undetermined feature content and the second undetermined feature content under different preset association conditions from a preset feature data set, and obtaining a first feature value set and a second feature value set respectively;
[0044] Normalize the first eigenvalue set and the second eigenvalue set respectively to obtain a first set and a second set;
[0045] sequentially constructing a first eigenvalue change curve using the eigenvalues in the first set;
[0046] sequentially constructing a second eigenvalue change curve using the eigenvalues in the second set;
[0047] Extracting curve features of the first eigenvalue change curve and performing weighted averaging to obtain an eigenvalue change coefficient of the first eigenvalue change curve under the current preset association condition;
[0048] Extracting curve features of the second eigenvalue change curve and performing weighted averaging to obtain an eigenvalue change coefficient of the second eigenvalue change curve under the current preset association condition;
[0049] By combining the acquired characteristic value variation coefficient under each type of preset association condition with the available frequency, the credibility index of the current first undetermined characteristic content and the second undetermined characteristic content is calculated;
[0050] If the credibility indexes of the first undetermined feature content and the second undetermined feature content are both greater than the set credibility threshold, the current first undetermined feature content and the second undetermined feature content are used as available feature content, and the current first undetermined feature content and the second undetermined feature content and the corresponding current feature values are stored in the set available feature database;
[0051] If the credibility indexes of the first pending feature content and the second pending feature content are not both greater than the set credibility threshold, the pending feature content with a larger credibility index among the current first pending feature content and the second pending feature content will be used as the available feature content, and stored in the set available feature database in combination with the corresponding current feature value.
[0052] Preferably, the calculation formula of the credibility index is as follows:
[0053] Where, It is expressed as the credibility index of the current undetermined feature content; 1 represents the available frequency of the currently undetermined feature content; 2 represents the available frequency of another pending feature content that belongs to the same suspicious feature category as the current pending feature content; It is expressed as the influence weight of available frequency on the credibility of the analysis of current feature content; It is expressed as the characteristic value variation coefficient of the current undetermined characteristic content under the j-th preset association condition, where j=1, 2, , m; m represents the total number of types of preset association conditions; It is expressed as the influence weight of the degree of change of the feature value under the j-th preset association condition on the reliability of the analysis of the current feature content; 2 represents the influence weight of feature stability on the credibility of analyzing the current feature content; e represents the natural base.
[0054] Preferably, based on the first seal recognition result, the contract seal of the current target contract is verified and compared with the reference seal to determine whether the current target contract is legal, including:
[0055] Analyzing the first seal recognition result, and if the authenticity recognition result of the first seal recognition result indicates that the seal is forged, determining that the current target contract is illegal;
[0056] If the first seal recognition result is that the seal is authentic, obtaining a reference seal from a set seal library according to the seal type extracted from the first seal recognition result;
[0057] Extracting the image features of the reference seal and performing feature comparison with the target image features corresponding to the same feature category; if there is a discrepancy between the feature comparisons, determining that the current target contract is illegal;
[0058] If there is no inconsistency in feature comparison, similarity calculation is performed on the seal features of the reference seal and the target image features using a set similarity algorithm to obtain a first similarity coefficient;
[0059] When the first similarity coefficient is greater than a set similarity threshold, the current target contract is judged to be legal;
[0060] When the first similarity coefficient is not greater than the set similarity threshold, the current target contract is determined to be illegal.
[0061] Compared with the prior art, the present invention has the following advantages:
[0062] By performing image screening, analysis, processing and feature extraction on the image of the contract seal obtained in real time, the target image features are obtained; based on the first seal recognition result obtained by pattern recognition of the target image features using the introduction of a machine learning algorithm, the current contract seal is verified and compared with the reference seal to determine whether the current contract is legal. This can quickly and accurately identify the authenticity and type of the contract seal, and then determine the legality of the current contract.
[0063] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.
[0064] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0066] Figure 1 The present invention is a flowchart of a method for recognizing contract seals based on machine learning in an embodiment of the present invention. DETAILED DESCRIPTION
[0067] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0068] The embodiment of the present invention provides a contract seal recognition method based on machine learning, such as Figure 1 Shown, including:
[0069] Step 1: Use the set acquisition tool to obtain the image of the contract seal of the target contract in real time, and perform image screening to obtain the target seal image;
[0070] Step 2: Analyze and process the target seal image and extract features to obtain target image features;
[0071] Step 3: Introduce a machine learning algorithm to perform pattern recognition on the target image features to obtain a first seal recognition result;
[0072] Step 4: Based on the first seal recognition result, the contract seal of the current target contract is verified and compared with the reference seal to determine whether the current target contract is legal.
[0073] In this embodiment, the target contract refers to the contract whose legality currently needs to be verified; the set acquisition tool includes a set scanner and a set camera, wherein the set scanner is predetermined; the set camera is a predetermined high-resolution camera; the target seal image refers to an image with high usability screened out from the images acquired by the set scanner and the set camera; the target image features are features obtained after analysis and feature extraction of the target seal image, including color features, shape features, and texture features, etc.; the first seal recognition result is composed of the seal type and the authenticity recognition result, wherein the authenticity recognition result includes two results: the seal is forged and the seal is real; the reference seal refers to a pre-stored real seal template.
[0074] In this embodiment, a machine learning algorithm is introduced to perform pattern recognition on the target image features to obtain a first seal recognition result, including:
[0075] Obtain analysis image data of contract seals of all seal types and authentic and counterfeit contract seals under different preset association conditions;
[0076] After the acquired analysis image data is labeled with seal type and authenticity, the analysis image data is divided according to the set data ratio to obtain training image data and test image data;
[0077] Extracting image features from the training image data to obtain training features and outputting them as training data;
[0078] In combination with a random forest algorithm, the model is trained using the training data to obtain a first recognition model;
[0079] Using the test image data to input the first recognition model to obtain a test result;
[0080] By analyzing the test results, obtaining a performance evaluation coefficient of the current first recognition model;
[0081] When the performance evaluation coefficient is greater than the set evaluation threshold, the current first recognition model is used as the pattern recognition model;
[0082] When the performance evaluation coefficient is not greater than the set evaluation threshold, the key parameters in the current first recognition model are optimized to generate a pattern recognition model;
[0083] The target image features are input into the pattern recognition model to obtain a pattern recognition result and output it as a first seal recognition result.
[0084] The preset association conditions refer to size, color, background, and lighting; the seal type refers to the category of contract seals, such as official seals and financial seals; the analyzed image data refers to contract seal images of different seal types or authentic and fake contract seal images collected under different association conditions; the set data ratio is pre-set, generally 4:1, that is, the training image data accounts for 80% of all analyzed image data, and the test image data accounts for 20% of all analyzed image data;
[0085] The training features refer to the features extracted from the training image data using the pre-trained feature extraction layer of the convolutional neural network; the first recognition model is obtained by combining the random forest algorithm and training the model using the training data, wherein the training data refers to the training features; the test result refers to the recognition result output after the test image data is input into the first recognition model, including the seal type and the authenticity of the seal; the performance evaluation coefficient is used to evaluate the model performance of the current first recognition model, and refers to the accuracy obtained by comparing the seal type recognition result and the seal authenticity recognition result of the test image data in the test result with the real seal type and the real seal authenticity of the test image data; the evaluation threshold is set in advance, generally 0.8; the key parameters refer to the depth of the tree and the splitting criterion; the first seal recognition result is the pattern recognition result obtained by inputting the target image features into the pattern recognition model, which is composed of the seal type and authenticity recognition results.
[0086] The beneficial effects of the above technical solution are: by performing image screening, analysis processing and feature extraction on the image of the contract seal obtained in real time, the target image features are obtained; based on the first seal recognition result obtained by performing pattern recognition on the target image features based on the introduction of a machine learning algorithm, the current contract seal is verified and compared with the reference seal to determine whether the current contract is legal, thereby realizing rapid and accurate identification of the authenticity and type of the contract seal, and thus determining the legality of the current contract.
[0087] The embodiment of the present invention provides a contract seal recognition method based on machine learning, which uses a set acquisition tool to obtain an image of the contract seal of a target contract in real time and performs image screening to obtain the target seal image, including:
[0088] Scanning the contract seal of the current target contract using a set scanner to obtain a first scanned image;
[0089] Using a set camera to take a preset number of photos of the contract seal of the current target contract to obtain a first set of photographed images;
[0090] performing clarity analysis on all images in the first captured image set based on a set clarity index, and outputting the image with the highest clarity as the first camera image;
[0091] performing usability analysis on the first scanned image and the first camera image to obtain a usability coefficient;
[0092] The calculation formula of the available coefficient is as follows:
[0093] Where, Represented as the available coefficients of the current image; It is represented as the i-th available evaluation index of the current image, where i=1, 2, , n; n represents the number of available evaluation indicators; It is expressed as the influence weight of the i-th available evaluation index on the evaluation of image usability;
[0094] The image with the larger available coefficient between the first scanned image and the first camera image is used as the target seal image.
[0095] In this embodiment, the scanner setting is pre-set; the camera setting is pre-set; the target contract refers to the contract whose legality currently needs to be verified; the first scanned image is an image obtained by scanning the contract seal of the current target contract using the pre-set scanner; the preset number of times is pre-set, generally 8 times; the first captured image set is an image set obtained by taking the contract seal of the current target contract using the pre-set camera a preset number of times; the image clarity is obtained by obtaining the set clarity index of the current image and performing weighted averaging, wherein the set clarity index includes the gradient mean, gradient variance, and Laplacian variance, which are indicators determined by calculating the gradient of the image in the horizontal and vertical directions using the Sobel operator and then calculating the gradient amplitude of each pixel point, and then determining it based on the gradient amplitude of the entire image; the weight assigned to the set clarity index is obtained by solving a matrix constructed by comparing the set clarity indexes pairwise and scoring them with relative importance using the hierarchical analysis method; the usability coefficient is used to indicate the usability of the current image; the target seal image refers to the image with the larger usability coefficient between the first scanned image and the first camera image, providing data basis for subsequent seal recognition.
[0096] The beneficial effect of the above technical solution is that by combining a scanner and a camera to acquire images and perform clarity analysis and usability analysis, the impact of errors or failures that may occur in a single device on subsequent seal recognition can be reduced.
[0097] The embodiment of the present invention provides a contract seal recognition method based on machine learning, which analyzes and processes the target seal image and extracts features to obtain target image features, including:
[0098] Step 11: performing image preprocessing on the target seal image to obtain a first image;
[0099] Step 12: Calculate the usability coefficient of the first image. If the usability coefficient of the first image is greater than a set usability threshold, the current first image is output as the applicable image.
[0100] Step 13: Otherwise, re-photograph the contract seal of the current target contract using the set camera to obtain a second photographed image set;
[0101] Step 14: selecting an image with the highest definition from the second captured image set and performing preprocessing to obtain a second image;
[0102] Step 15: Calculating the usability coefficient of the second image. If the usability coefficient of the second image is greater than a set usability threshold, outputting the current second image as an applicable image.
[0103] If the usability coefficient of the second image is not greater than the set usability threshold, repeating steps 13-15 until a suitable image is output;
[0104] Step 16: Extract features from the applicable image to obtain target image features.
[0105] In this embodiment, image preprocessing includes denoising, enhancement and binarization, the purpose of which is to improve the quality of the current image; the first image is obtained after image preprocessing of the target seal image; the set usable threshold is predetermined and is generally 0.8; the second captured image set refers to an image set obtained by re-shooting the contract seal of the current target contract a preset number of times using a set camera when the usable coefficient of the first image is not greater than the set usable threshold; the second image refers to the image with the highest clarity in the second captured image set, wherein the clarity is obtained by obtaining the set clarity index of the current image and performing weighted averaging, wherein the set clarity index includes the gradient mean , gradient variance and Laplacian variance, are indicators determined by calculating the gradient of the image in the horizontal and vertical directions and then calculating the gradient amplitude of each pixel, and then determining it according to the gradient amplitude of the entire image; the weight assigned to the set clarity index is obtained by solving the matrix constructed after pairwise comparison and relative importance scoring of the clarity indexes using the hierarchical analysis method; the applicable image refers to an image with an available coefficient greater than the set available threshold; the feature extraction model is pre-established for extracting features of the current applicable image, including color, texture, etc.; the target image features are obtained by extracting features of the applicable image using the feature extraction model.
[0106] The beneficial effect of the above technical solution is: by performing image preprocessing and image quality analysis on the current target seal image, and automatically triggering the reshooting and screening process when the image quality does not meet the requirements, feature extraction is performed until a suitable image that meets the requirements is found, thereby effectively ensuring image quality and improving the accuracy of feature extraction.
[0107] The embodiment of the present invention provides a contract seal recognition method based on machine learning, which extracts features from the applicable image to obtain target image features, including:
[0108] Step 21: Inputting the applicable image into a pre-established feature extraction model to obtain a first feature set;
[0109] Step 22: extracting features from the applicable image using a set feature extraction algorithm to obtain a second feature set;
[0110] Step 23: performing feature comparison of the same feature category on the first feature set and the second feature set to obtain a first feature comparison result;
[0111] Step 24: If the first feature comparison result is completely consistent, the feature category corresponding to the current first feature comparison result is marked as a valid feature category;
[0112] Outputting corresponding feature content of the valid feature category in the first feature set as target image features;
[0113] If the first feature comparison result shows that there is a difference, the feature category corresponding to the current first feature comparison result is marked as a suspicious feature category;
[0114] Step 25: Comparing the corresponding feature content of the suspicious feature category in the first feature set with the corresponding feature content in the second feature set, and marking the identical parts as useful feature content;
[0115] Step 26: Comparing the corresponding feature content of the suspicious feature category in the first feature set with the corresponding feature content in the second feature set, and obtaining the difference in content, marking it as the first pending feature content;
[0116] Comparing the corresponding feature content of the suspicious feature category in the second feature set with the corresponding feature content in the first feature set to obtain different content, marking them as second undetermined feature content;
[0117] Step 27: Perform credibility analysis on the first undetermined feature content and the second undetermined feature content to obtain usable feature content;
[0118] Step 28: Supplement the available feature content to the useful feature content, and then output it as the target image feature;
[0119] Step 29: If the first feature comparison result is completely different, optimize the current feature extraction model and repeat steps 21-28 until the target image feature output is obtained or the maximum number of iterations is reached;
[0120] When the maximum number of iterations is reached and the target image features still cannot be obtained, a warning signal is sent to the maintenance personnel for manual processing.
[0121] In this embodiment, the feature extraction model is a model obtained by training a neural network using a pre-established training data set, wherein the training data set is composed of pre-processed image data containing various image features and defined feature types, and the feature types include shape, texture, color, etc.; the first feature set is obtained by aggregating the features obtained by extracting features from the current applicable image using the feature extraction model; the set feature extraction algorithm is predetermined, including color segmentation algorithm, contour extraction and edge detection algorithm, etc.; the second feature set is obtained by aggregating the features obtained by extracting features from the current applicable image using the set feature extraction algorithm; the feature category refers to the image feature type, including shape, color, texture, etc.; the first feature comparison result refers to the comparison result of corresponding features of the same feature category in the first feature set and the second feature set, including three comparison results: completely consistent, different, and completely different.
[0122] In this embodiment, the valid feature category refers to the feature category whose corresponding first feature comparison result is completely consistent; the suspicious feature category refers to the feature category whose corresponding first feature comparison result is different; the first pending feature content refers to the different part of the content obtained by comparing the corresponding feature content of the suspicious feature category in the first feature set with the corresponding feature content in the second feature set; the second pending feature content refers to the different part of the content obtained by comparing the corresponding feature content of the suspicious feature category in the second feature set with the corresponding feature content in the first feature set; the useful feature content refers to the same part of the content obtained by comparing the corresponding feature content of the suspicious feature category in the first feature set with the corresponding feature content in the second feature set; the available feature content is obtained by performing credibility analysis on the first pending feature content and the second pending feature content; the maximum number of iterations is predetermined; it is used by maintenance personnel to maintain the contract seal recognition process; the warning signal is used to remind maintenance personnel that there is a problem with the current image feature extraction and manual processing is required.
[0123] The beneficial effects of the above technical solution are: by using a pre-established feature extraction model and a set feature extraction algorithm to perform dual feature extraction, refine suspicious features, iteratively optimize the model, and timely manual intervention, etc., the accuracy of feature extraction and the reliability of the system are significantly improved, which in turn helps to improve the efficiency and automation level of image processing.
[0124] An embodiment of the present invention provides a contract seal recognition method based on machine learning, which performs credibility analysis on the first undetermined feature content and the second undetermined feature content to obtain usable feature content, including:
[0125] Using the first undetermined feature content and the second undetermined feature content as matching conditions, traversing a set available feature database to obtain available frequencies of the first undetermined feature content and the second undetermined feature content respectively;
[0126] Extracting feature values of the first undetermined feature content and the second undetermined feature content under different preset association conditions from a preset feature data set, and obtaining a first feature value set and a second feature value set respectively;
[0127] Normalize the first eigenvalue set and the second eigenvalue set respectively to obtain a first set and a second set;
[0128] sequentially constructing a first eigenvalue change curve using the eigenvalues in the first set;
[0129] sequentially constructing a second eigenvalue change curve using the eigenvalues in the second set;
[0130] Extracting curve features of the first eigenvalue change curve and performing weighted averaging to obtain an eigenvalue change coefficient of the first eigenvalue change curve under the current preset association condition;
[0131] Extracting curve features of the second eigenvalue change curve and performing weighted averaging to obtain an eigenvalue change coefficient of the second eigenvalue change curve under the current preset association condition;
[0132] By combining the acquired characteristic value variation coefficient under each type of preset association condition with the available frequency, the credibility index of the current first undetermined characteristic content and the second undetermined characteristic content is calculated;
[0133] If the credibility indexes of the first undetermined feature content and the second undetermined feature content are both greater than the set credibility threshold, the current first undetermined feature content and the second undetermined feature content are used as available feature content, and the current first undetermined feature content and the second undetermined feature content and the corresponding current feature values are stored in the set available feature database;
[0134] If the credibility indexes of the first pending feature content and the second pending feature content are not both greater than the set credibility threshold, the pending feature content with a larger credibility index among the current first pending feature content and the second pending feature content will be used as the available feature content, and stored in the set available feature database in combination with the corresponding current feature value.
[0135] In this embodiment, the available feature database is set to be a pre-established database used to store feature content with actual value and significance and the corresponding historical usage times; the available frequency refers to the corresponding historical usage times of the first pending feature content or the second pending feature content in the set available feature database within a unit time. When the first pending feature content or the second pending feature content cannot be successfully matched in the set available feature database, the available frequency is 0.
[0136] In this embodiment, the preset feature data set is pre-composed of various feature contents and corresponding feature values obtained under different preset association conditions, wherein the preset association conditions include size, color, background and lighting; the purpose of standardizing the first feature value set and the second feature value set respectively is to eliminate the dimension; the first set is a set obtained by standardizing all the feature values in the first feature value set; the second set is a set obtained by standardizing all the feature values in the second feature value set; the first feature value change curve is a curve constructed in sequence using the feature values in the first set; the second feature value change curve is a curve constructed in sequence using the feature values in the second set; setting the trust threshold is pre-set, generally 0.8.
[0137] In this embodiment, the curve features include the slope of the curve, the acceleration of the curve, the curvature, and the sum of the deviations between the extreme points and the average value; the weights assigned to the curve features are obtained by solving a matrix constructed after pairwise comparison and relative importance scoring of the curve features using the hierarchical analysis method; the eigenvalue variation coefficient is used to express the degree of change of the eigenvalue of the first to be determined feature content or the second to be determined feature content under preset association conditions, that is, the feature stability, which is obtained by weighted averaging the curve features extracted from the corresponding eigenvalue change curve of the first to be determined feature content or the second to be determined feature content; the credibility index is used to express the credibility of the current to be determined feature content.
[0138] In this embodiment, for example, the curve features of the first characteristic value change curve of the first undetermined characteristic content L1 are the curve slope s1, the curve acceleration s2, the sum of the deviations of the extreme points from the average value s3, and the curvature s4, and the corresponding weights are 0.3, 0.21, 0.32, and 0.17 respectively;
[0139] At this time, the corresponding characteristic value variation coefficient of the current first undetermined characteristic content L1 is .
[0140] The beneficial effects of the above technical solution are: through the comprehensive use of feature matching, feature value extraction and standardization, feature value change curve construction and credibility index calculation, scientific screening and evaluation of feature content are achieved, providing strong support for improving the accuracy and efficiency of data analysis.
[0141] The embodiment of the present invention provides a contract seal recognition method based on machine learning. The calculation formula of the trust index is as follows:
[0142] Where, It is expressed as the credibility index of the current undetermined feature content; 1 represents the available frequency of the currently undetermined feature content; 2 represents the available frequency of another pending feature content that belongs to the same suspicious feature category as the current pending feature content; It is expressed as the influence weight of available frequency on the credibility of the analysis of current feature content; It is expressed as the characteristic value variation coefficient of the current undetermined characteristic content under the j-th preset association condition, where j=1, 2, , m; m represents the total number of types of preset association conditions; It is expressed as the influence weight of the degree of change of the feature value under the j-th preset association condition on the credibility of the analysis of the current feature content; 2 represents the influence weight of feature stability on the credibility of analyzing the current feature content; e represents the natural base.
[0143] In this embodiment, the weights assigned to the available frequency and the characteristic stability are obtained by solving the matrix constructed after pairwise comparison and relative importance scoring using the hierarchical analysis method; the influence weights assigned to the degree of change of the characteristic value under the preset correlation conditions are obtained by solving the matrix constructed after pairwise comparison and relative importance scoring using the hierarchical analysis method.
[0144] The beneficial effect of the above technical solution is: by calculating the credibility index, it provides an effective data basis for selecting the feature content to be determined, thereby realizing the scientific screening and evaluation of the feature content, and providing strong support for improving the accuracy and efficiency of data analysis.
[0145] An embodiment of the present invention provides a contract seal recognition method based on machine learning. Based on the first seal recognition result, the contract seal of the current target contract is verified and compared with the reference seal to determine whether the current target contract is legal, including:
[0146] Analyzing the first seal recognition result, and if the authenticity recognition result of the first seal recognition result indicates that the seal is forged, determining that the current target contract is illegal;
[0147] If the first seal recognition result is that the seal is authentic, obtaining a reference seal from a set seal library according to the seal type extracted from the first seal recognition result;
[0148] Extracting the image features of the reference seal and performing feature comparison with the target image features corresponding to the same feature category; if there is a discrepancy between the feature comparisons, determining that the current target contract is illegal;
[0149] If there is no inconsistency in feature comparison, similarity calculation is performed on the seal features of the reference seal and the target image features using a set similarity algorithm to obtain a first similarity coefficient;
[0150] When the first similarity coefficient is greater than a set similarity threshold, the current target contract is judged to be legal;
[0151] When the first similarity coefficient is not greater than the set similarity threshold, the current target contract is determined to be illegal.
[0152] In this embodiment, the first seal recognition result is composed of the seal type and the authenticity recognition result, wherein the authenticity recognition result includes two results: the seal is forged and the seal is real; the set seal library is composed of corresponding reference seals of different seal types; the reference seal refers to the real seal template pre-stored in the set seal library; the image features of the reference seal are obtained by pre-feature extraction, including features such as texture, shape and color; the feature category refers to the type of image feature, such as shape and color; the target image feature refers to the feature extracted from the applicable image using a pre-established feature extraction model; the set similarity measurement algorithm refers to the cosine similarity algorithm; the first similarity coefficient refers to the sum of the feature similarities calculated by using the cosine similarity algorithm between the image features of the reference seal and the target image features; the set similarity threshold is pre-set, and is generally taken as t1, t1 represents the total number of image features; the target contract refers to the contract that currently needs to be verified for legality.
[0153] In this embodiment, for example, there are seal features a1, a2, a3 of the reference seal A1 and target image features z1, z2, z3, among which a1 is consistent with z1 corresponding to the same feature category, and a2 is inconsistent with z2 corresponding to the same feature category. In this case, the current contract is determined to be illegal.
[0154] In this embodiment, for example, the first similarity coefficient between the image feature of the reference seal A2 and the current target image feature is 7.2, the total number of image features t1 is 10, and the currently set similarity threshold is 8;
[0155] The first similarity coefficient 7.2 between the image feature of the reference seal A2 and the current target image feature is less than 8, and the current contract is determined to be illegal.
[0156] The beneficial effects of the above technical solution are: through automated seal recognition and obtaining reference seals from the set seal library for feature comparison according to the seal type to ensure the consistency of the seal, it provides a more objective and quantitative basis for the judgment of the legality of the contract, thereby realizing the rapid judgment of the authenticity and legality of the contract seal, shortening the contract review time and improving work efficiency.
[0157] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A contract seal recognition method based on machine learning, characterized in that: include: Step 1: Use the set acquisition tool to obtain the image of the contract seal of the target contract in real time, and perform image screening to obtain the target seal image; Step 2: Analyze and process the target seal image and extract features to obtain target image features; Step 3: Introduce a machine learning algorithm to perform pattern recognition on the target image features to obtain a first seal recognition result; Step 4: Based on the first seal recognition result, the contract seal of the current target contract is verified and compared with the reference seal to determine whether the current target contract is legal; Analyzing and processing the target seal image and extracting features to obtain target image features include: Step 11: performing image preprocessing on the target seal image to obtain a first image; Step 12: Calculate the usability coefficient of the first image. If the usability coefficient of the first image is greater than a set usability threshold, the current first image is output as the applicable image. Step 13: Otherwise, use the set camera to re-photograph the contract seal of the current target contract to obtain a second captured image set; Step 14: selecting an image with the highest definition from the second captured image set and performing preprocessing to obtain a second image; Step 15: Calculating the usability coefficient of the second image. If the usability coefficient of the second image is greater than a set usability threshold, outputting the current second image as an applicable image. If the usability coefficient of the second image is not greater than the set usability threshold, repeating steps 13-15 until a suitable image is output; Step 16: extracting features from the applicable image to obtain target image features; Performing feature extraction on the applicable image to obtain target image features includes: Step 21: Inputting the applicable image into a pre-established feature extraction model to obtain a first feature set; Step 22: extracting features from the applicable image using a set feature extraction algorithm to obtain a second feature set; Step 23: performing feature comparison of the same feature category on the first feature set and the second feature set to obtain a first feature comparison result; Step 24: If the first feature comparison result is completely consistent, the feature category corresponding to the current first feature comparison result is marked as a valid feature category; Outputting corresponding feature content of the valid feature category in the first feature set as target image features; If the first feature comparison result shows that there is a difference, the feature category corresponding to the current first feature comparison result is marked as a suspicious feature category; Step 25: Comparing the corresponding feature content of the suspicious feature category in the first feature set with the corresponding feature content in the second feature set, and marking the identical parts as useful feature content; Step 26: Comparing the corresponding feature content of the suspicious feature category in the first feature set with the corresponding feature content in the second feature set, and obtaining the difference in content, marking it as the first pending feature content; Comparing the corresponding feature content of the suspicious feature category in the second feature set with the corresponding feature content in the first feature set to obtain different content, marking them as second undetermined feature content; Step 27: performing credibility analysis on the first undetermined feature content and the second undetermined feature content respectively, and obtaining usable feature content corresponding to the first undetermined feature content and the usable feature content corresponding to the second undetermined feature content respectively; Step 28: Supplement the available feature content to the useful feature content, and then output it as the target image feature; Step 29: If the first feature comparison result is completely different, optimize the current feature extraction model and repeat steps 21-28 until the target image feature output is obtained or the maximum number of iterations is reached; When the maximum number of iterations is reached and the target image features still cannot be obtained, a warning signal is sent to the maintenance personnel for manual processing.
2. The contract seal recognition method based on machine learning according to claim 1 is characterized in that: Use the set acquisition tool to obtain the image of the contract seal of the target contract in real time and perform image screening to obtain the target seal image, including: Scanning the contract seal of the current target contract using a set scanner to obtain a first scanned image; Using a set camera to take a preset number of photos of the contract seal of the current target contract to obtain a first set of photographed images; performing clarity analysis on all images in the first captured image set based on a set clarity index, and outputting the image with the highest clarity as the first camera image; performing usability analysis on the first scanned image and the first camera image to obtain a usability coefficient; The calculation formula of the available coefficient is as follows: Where, Represented as the available coefficients of the current image; It is represented as the i-th available evaluation index of the current image, where i=1, 2, , n; n represents the number of available evaluation indicators; It is expressed as the influence weight of the i-th available evaluation index on the evaluation of image usability; The image with the larger available coefficient between the first scanned image and the first camera image is used as the target seal image.
3. The method for contract seal recognition based on machine learning according to claim 2, characterized in that: The clarity indicators are set to include gradient mean, gradient variance and Laplacian variance.
4. The method for contract seal recognition based on machine learning according to claim 1, characterized in that: Performing credibility analysis on the first undetermined feature content and the second undetermined feature content respectively to obtain usable feature content corresponding to the first undetermined feature content and usable feature content corresponding to the second undetermined feature content respectively includes: Using the first undetermined feature content and the second undetermined feature content as matching conditions, traversing a set available feature database to obtain available frequencies of the first undetermined feature content and the second undetermined feature content respectively; Extracting feature values of the first undetermined feature content and the second undetermined feature content under different preset association conditions from a preset feature data set, and obtaining a first feature value set and a second feature value set respectively; Normalize the first eigenvalue set and the second eigenvalue set respectively to obtain a first set and a second set; sequentially constructing a first eigenvalue change curve using the eigenvalues in the first set; sequentially constructing a second eigenvalue change curve using the eigenvalues in the second set; Extracting curve features of the first eigenvalue change curve and performing weighted averaging to obtain an eigenvalue change coefficient of the first eigenvalue change curve under the current preset association condition; Extracting curve features of the second eigenvalue change curve and performing weighted averaging to obtain an eigenvalue change coefficient of the second eigenvalue change curve under the current preset association condition; By combining the acquired characteristic value variation coefficient under each type of preset association condition with the available frequency, the credibility index of the current first undetermined characteristic content and the second undetermined characteristic content is calculated; If the credibility indexes of the first undetermined feature content and the second undetermined feature content are both greater than the set credibility threshold, the current first undetermined feature content and the second undetermined feature content are used as available feature content, and the current first undetermined feature content and the second undetermined feature content and the corresponding current feature values are stored in the set available feature database; If the credibility indexes of the first pending feature content and the second pending feature content are not both greater than the set credibility threshold, the pending feature content with a larger credibility index among the current first pending feature content and the second pending feature content will be used as the available feature content, and stored in the set available feature database in combination with the corresponding current feature value.
5. The method for contract seal recognition based on machine learning according to claim 2, characterized in that: The calculation formula of the credibility index is as follows: Where, It is expressed as the credibility index of the current undetermined feature content; 1 represents the available frequency of the currently undetermined feature content; 2 represents the available frequency of another pending feature content that belongs to the same suspicious feature category as the current pending feature content; It is expressed as the influence weight of available frequency on the credibility of the analysis of current feature content; It is expressed as the characteristic value variation coefficient of the current undetermined characteristic content under the j-th preset association condition, where j=1, 2, , m; m represents the total number of types of preset association conditions; It is expressed as the influence weight of the degree of change of the feature value under the j-th preset association condition on the reliability of the analysis of the current feature content; 2 represents the influence weight of feature stability on the credibility of analyzing the current feature content; e represents the natural base.
6. The method for contract seal recognition based on machine learning according to claim 1, characterized in that: Based on the first seal recognition result, the contract seal of the current target contract is verified and compared with the reference seal to determine whether the current target contract is legal, including: Analyzing the first seal recognition result, and if the authenticity recognition result of the first seal recognition result indicates that the seal is forged, determining that the current target contract is illegal; If the first seal recognition result is that the seal is authentic, obtaining a reference seal from a set seal library according to the seal type extracted from the first seal recognition result; Extracting the image features of the reference seal and performing feature comparison with the target image features corresponding to the same feature category; if there is a discrepancy between the feature comparisons, determining that the current target contract is illegal; If there is no inconsistency in feature comparison, similarity calculation is performed on the seal features of the reference seal and the target image features using a set similarity algorithm to obtain a first similarity coefficient; When the first similarity coefficient is greater than a set similarity threshold, the current target contract is judged to be legal; When the first similarity coefficient is not greater than the set similarity threshold, the current target contract is determined to be illegal.
Citation Information
Patent Citations
Authenticity identification method of circular seal
CN112016563A
KR20240135308A