CN112001818A - Contract verification method and device, computer equipment and storage medium - Google Patents

Contract verification method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112001818A
CN112001818A CN202010837733.6A CN202010837733A CN112001818A CN 112001818 A CN112001818 A CN 112001818A CN 202010837733 A CN202010837733 A CN 202010837733A CN 112001818 A CN112001818 A CN 112001818A
Authority
CN
China
Prior art keywords
contract
image
text
picture
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010837733.6A
Other languages
Chinese (zh)
Inventor
孟江华
樊锐
龚亚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kmerit Suzhou Information Science & Technology Co ltd
Original Assignee
Kmerit Suzhou Information Science & Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kmerit Suzhou Information Science & Technology Co ltd filed Critical Kmerit Suzhou Information Science & Technology Co ltd
Priority to CN202010837733.6A priority Critical patent/CN112001818A/en
Publication of CN112001818A publication Critical patent/CN112001818A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/18Legal services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/758Involving statistics of pixels or of feature values, e.g. histogram matching

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Tourism & Hospitality (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Medical Informatics (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Technology Law (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Character Input (AREA)

Abstract

The invention discloses a contract verification method and device, computer equipment and a storage medium, and belongs to the technical field of image processing. The contract verification method comprises the following steps: analyzing the received contract verification request to obtain a scanned picture of the signed paper contract and a contract number of the paper contract; inquiring whether a text number associated with the contract number is stored in a preset database; when the text number is inquired, virtually printing the standard contract corresponding to the text number in the database to generate a standard contract picture; comparing the scanned picture with two text images in a preset area in the standard contract picture; and outputting a result for indicating whether the paper contract passes the verification or not according to the comparison result. The embodiment of the invention can realize automatic contract verification, improve the efficiency of contract verification and improve the accuracy of contract verification.

Description

Contract verification method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of image processing, in particular to a contract verification method, a contract verification device, computer equipment and a storage medium.
Background
At present, in the process of contract verification, after a mechanism branch and a client lay out a contract, the mechanism branch is generally uploaded to an online system for an organization head office to examine and approve, an online standard contract text is formed after the examination and approval is passed, then the mechanism branch downloads the standard contract text, the standard contract text is signed and stamped with the client and both sides after printing, the stamped paper contract is scanned to form a picture and uploaded to the online system, and finally the paper contract scanning picture is called from the online system manually and is manually checked and verified with the online standard contract text to check whether the standard contract text is tampered and signed and stamped after being downloaded by the mechanism branch. In the checking and verifying process, because the comparison is carried out manually, a large amount of time and energy are consumed, the efficiency is low, errors are easy to occur, and the accuracy is low.
Disclosure of Invention
In order to solve the problems mentioned in the background art, the invention provides a contract verification method, a contract verification device, a computer device and a storage medium, which realize automatic verification of a contract, improve the efficiency of contract verification and improve the accuracy of contract verification.
In a first aspect, a method for contract verification is provided, the method comprising:
analyzing the received contract verification request to obtain a scanned picture of a signed paper contract and a contract number of the paper contract;
inquiring whether a text number associated with the contract number is stored in a preset database;
when the text number is inquired, virtually printing a standard contract corresponding to the text number in the database to generate a standard contract picture;
comparing the scanned picture with two text images in a preset area in the standard contract picture;
and outputting a result for indicating whether the paper contract passes the verification or not according to the comparison result.
In a second aspect, there is provided a contract verification apparatus, the apparatus comprising:
the contract verification module is used for verifying the contract of the user according to the contract number of the user;
the data query module is used for querying whether a text number associated with the contract number is stored in a preset database;
the virtual printing module is used for virtually printing the standard contract corresponding to the text number in the database to generate a standard contract picture when the text number is inquired;
the image comparison module is used for comparing the scanned picture with two text images in a preset area in the standard contract picture;
and the result output module is used for outputting a result used for indicating whether the paper contract passes the verification or not according to the comparison result.
In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
analyzing the received contract verification request to obtain a scanned picture of a signed paper contract and a contract number of the paper contract;
inquiring whether a text number associated with the contract number is stored in a preset database;
when the text number is inquired, virtually printing a standard contract corresponding to the text number in the database to generate a standard contract picture;
comparing the scanned picture with two text images in a preset area in the standard contract picture;
and outputting a result for indicating whether the paper contract passes the verification or not according to the comparison result.
In a fourth aspect, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program which, when executed by a processor, performs the steps of:
analyzing the received contract verification request to obtain a scanned picture of a signed paper contract and a contract number of the paper contract;
inquiring whether a text number associated with the contract number is stored in a preset database;
when the text number is inquired, virtually printing a standard contract corresponding to the text number in the database to generate a standard contract picture;
comparing the scanned picture with two text images in a preset area in the standard contract picture;
and outputting a result for indicating whether the paper contract passes the verification or not according to the comparison result.
The invention provides a contract verification method, a contract verification device, computer equipment and a storage medium, wherein a received contract verification request is analyzed to obtain a scanned picture of a signed paper contract and a contract number of the paper contract; inquiring whether a text number associated with the contract number is stored in a preset database; when the text number is inquired, virtually printing a standard contract corresponding to the text number in the database to generate a standard contract picture; comparing the scanned picture with two text images in a preset area in the standard contract picture; and outputting a result for indicating whether the paper contract passes the verification or not according to the comparison result. Compared with the prior art, the method and the device can realize the automatic comparison of the offline paper contract and the online standard contract, improve the efficiency of contract verification, reduce the labor cost of contract verification and improve the accuracy of contract verification.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart illustrating a method for contract validation according to an embodiment of the present invention;
FIG. 2 shows a flow chart of step 104 of the method of FIG. 1;
FIG. 3 is a flowchart illustrating a scenario of a contract validation method provided by an embodiment of the present invention;
FIG. 4 is a block diagram illustrating a structure of a contract verification apparatus according to an embodiment of the present invention;
FIG. 5 is a block diagram of a computer device according to an embodiment of the present invention
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It is to be understood that, unless the context clearly requires otherwise, throughout the description and the claims, the words "comprise", "comprising", and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is, what is meant is "including, but not limited to".
Furthermore, in the description of the present invention, it is to be understood that the terms "first," "second," "third," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified.
As described in the foregoing background, in the prior art, a branch organization downloads and prints approved standard contracts, after stamping, uploads a paper contract to an online system in the form of a scan picture, and finally manually calls the scan picture of the paper contract from the online system to perform manual verification with an online standard contract text, so as to check whether the standard contract text is tampered after being downloaded by the branch organization, and then performs signature stamping during verification. Therefore, the invention provides a contract verification method, which is characterized in that an online standard contract is virtually printed into a picture mode and is compared with a scanned picture of a signed offline paper contract to realize automatic contract verification, the efficiency of contract verification is improved, and the accuracy of contract verification can be improved.
In one embodiment, a contract verification method is provided, which is applied to a contract verification apparatus, and the apparatus may be configured in any computer device, where the computer device may be a server, and the server may be an independent server or a server cluster composed of a plurality of servers.
As shown in fig. 1, the contract verification method provided by the embodiment of the present invention includes steps 101 to 105:
and 101, analyzing the received contract verification request to obtain a scanned picture of the signed paper contract and a contract number of the paper contract.
The contract number of the paper contract can be a number, a two-dimensional code and/or a one-dimensional code.
Specifically, the server may parse the contract verification request to obtain a scanned picture of the signed paper contract and a contract number of the paper contract, where the scanned picture of the paper contract is carried in the contract verification request, and the scanned picture of the paper contract is obtained by scanning the paper contract by the contract uploading party, where the "signed paper contract" may generally refer to a paper contract signed by both the contract uploading party (e.g., a bank branch) and the client for a specific related business, where the related business is, for example, a loan, a financing, and the like.
And 102, inquiring whether a text number associated with the contract number is stored in a preset database.
Specifically, the server may perform, according to the contract number, an inquiry as to whether there is a text number having an association relationship with the contract number among a plurality of text numbers stored in advance in the database.
The text number is used for uniquely identifying the standard contract, the standard contract and the text number are stored in the database in a one-to-one correspondence mode, and the contract number is used for identifying contract terms uploaded by a contract checking request party.
The standard contract may be generated as follows, and may include:
when the contract terms pass the examination, generating a standard contract containing the contract terms and a text number for identifying the standard contract; storing the standard contract into a database, and storing the text number and the contract number into the database in a correlation manner; and returning the download address of the standard contract to the contract auditing requester so that the contract auditing requester can download and print the standard contract.
When the contract terms pass the auditing, generating a standard contract containing the contract terms, wherein the process comprises the following steps:
determining a contract type corresponding to the contract terms, selecting a contract template corresponding to the contract type from a template database, inquiring a field to be filled contained in the contract template, acquiring term elements associated with the field to be filled from the contract terms, filling the term elements into the corresponding field to be filled, and generating a standard contract. In the example of bank loan contract, the contract term elements may include relevant fields such as transaction counter-parties, contract interest rate, interest date, expiration date, and the like.
103, when the text number is inquired, the standard contract corresponding to the text number in the database is virtually printed to generate a standard contract picture.
Specifically, according to preset printing parameters, virtual printing is performed on a standard contract corresponding to the text number, and a standard contract picture is generated, where the printing parameters may include but are not limited to: printing mode, printing area, printing proportion, type of printed paper and printing style.
And 104, comparing the scanned picture with two text images in a preset area in the standard contract picture.
Specifically, masking processing can be performed on the scanned picture and the standard contract picture through a preset masking image, a text image of a preset region in the scanned picture and a text image of a preset region in the standard contract picture are extracted, and then binarization processing is performed on the two text images to obtain two binarization images; and carrying out pixel difference calculation on the two binary images, calculating a pixel difference average value, comparing the two text images according to the pixel difference average value to obtain a comparison result, wherein the comparison result is used for indicating whether the first text image and the second text image are compared to be consistent or not.
The preset area is set according to actual conditions, and generally speaking, the preset area is a character area in the picture except for the signature stamping area and the perforation stamping area.
And 105, outputting a result for indicating whether the paper contract passes the verification according to the comparison result.
Specifically, if the comparison result shows that the scanned picture is consistent with the two text images in the preset area in the standard contract picture, the paper contract is determined to pass the verification, and the paper contract is filed in a database; and if the comparison result shows that the two text images in the preset area in the scanned picture and the standard contract picture are inconsistent, determining that the paper contract is not verified, and outputting prompt information to prompt a contract uploading party to sign and upload the contract again.
In one embodiment, the method may further comprise:
and returning an invalid prompt aiming at the paper contract to the contract uploading party in the case that the paper contract is not verified so that the contract uploading party re-signs the contract according to the standard contract.
Optionally, if the scanned picture is inconsistent with the two text images in the preset area in the standard contract picture, prompt information can be generated according to inconsistent text information of the two text images, so that a contract uploading party corrects the contract according to the prompt information.
The invention provides a contract verification method, which analyzes a received contract verification request to obtain a scanned picture of a signed paper contract and a contract number of the paper contract; inquiring whether a text number associated with the contract number is stored in a preset database; when the text number is inquired, virtually printing the standard contract corresponding to the text number in the database to generate a standard contract picture; comparing the scanned picture with two text images in a preset area in the standard contract picture; and outputting a result for indicating whether the paper contract passes the verification or not according to the comparison result. Compared with the prior art, the method and the device can realize the automatic comparison of the offline paper contract and the online standard contract, improve the efficiency of contract verification, reduce the labor cost of contract verification and improve the accuracy of contract verification.
In one embodiment, when the text number is queried, the method may further include, after the step of virtually printing a standard contract corresponding to the text number in the database and generating a standard contract picture:
and caching the contract number of the paper contract and the generated standard contract picture into a preset cache region by using Key-Value.
Specifically, the contract number of the paper contract is used as a Key, and the generated standard contract picture is stored in the cache area as Value corresponding to the contract number.
In this embodiment, the contract number of the paper contract and the generated standard contract picture are stored in the preset cache region in a one-to-one correspondence manner, so that after the same contract number is analyzed in the subsequent contract verification request received again, the content in the traversal database does not need to be queried, and only the contract number needs to be determined, and the corresponding standard contract picture is directly searched in the preset cache region, so that the query amount is greatly reduced, and the query speed is accelerated.
In one embodiment, before the step of comparing the scanned picture with the two text images in the preset area of the standard contract picture, the method further comprises:
and judging whether the scanned picture meets a preset condition, wherein the preset condition comprises a preset image size and an image inclination angle range, if so, acquiring two text images of a preset area from the scanned picture and a standard contract picture, and performing rotation correction on the text images acquired from the scanned picture.
Specifically, the process may include:
acquiring the actual size of a scanned picture, acquiring the actual inclination angle of the scanned picture by a Hough transform method, judging whether the actual size and the actual inclination angle of the scanned picture meet the preset image size and image inclination angle range, and if so, performing rotation correction on a text image acquired from the scanned picture by adopting bilinear interpolation values based on the inclination angle.
It should be noted that when the scanned picture of the paper contract does not satisfy the preset condition, for example, the scanning proportion of the document is incorrect, the document is folded during scanning or the image inclination angle is too large, which may cause the failure of comparing the scanned picture of the paper contract with the standard contract picture, a re-uploading instruction may be returned for the scanned picture of the paper contract that does not satisfy the preset condition, so as to prompt the contract uploading party to re-scan and upload the signed paper contract.
In one embodiment, as shown in fig. 2, the comparison between the scanned picture and the two text images in the preset area of the standard contract picture in step 104 includes steps 201 to 205:
and 201, acquiring a first binary image and a second binary image obtained by performing binarization processing on two text images.
Wherein the first binary image corresponds to one of the two text images and the second binary image corresponds to the other of the two text images.
Specifically, the process may include:
for each text image, carrying out noise reduction on the text image through a self-adaptive image noise reduction filter, and carrying out contrast enhancement on the text image after noise reduction by using a contrast stretching mode; and performing thresholding operation on the text image after the contrast enhancement according to multiple preset thresholding algorithms to obtain multiple binary images corresponding to the text image, and performing logic and operation on the multiple binary images to obtain a final binary image corresponding to the text image. Among these, various thresholding algorithms may include, but are not limited to: OTSU thresholding algorithms and locally adaptive thresholding algorithms.
202, the first binary image and the second binary image are registered.
Specifically, the size of the first binary image is registered to the size of the second binary image.
In this embodiment, the first binary image and the second binary image are registered, so that the problem of low contract verification accuracy caused by inconsistency of text content positions in the contract scanning picture and the standard contract picture can be avoided.
And 203, acquiring a plurality of image pairs from the registered first binary image and the second binary image, wherein each image pair comprises a first single-line text image in the first binary image and a second single-line text image in a corresponding position in the second binary image.
Specifically, the process may include:
respectively carrying out vertical projection on the first binary image and the second binary image to obtain respective vertical projection histograms of the first binary image and the second binary image; according to the respective vertical projection histograms of the first binary image and the second binary image, the first binary image and the second binary image are respectively divided into a plurality of single-line text images, a plurality of first single-line text images of the first binary image and a plurality of second single-line text images corresponding to the second binary image are obtained, the plurality of first single-line text images and the plurality of second single-line text images are paired based on line positions, and a plurality of image pairs are obtained.
And 204, carrying out similarity comparison on the first single-line text image and the second single-line text image in each image pair.
The implementation process of step 204 may include:
traversing each image pair, and performing the following operations on the traversed image pair:
comparing a first single-line text image with a second single-line text image in the image pair to obtain the similarity between the first single-line text image and the second single-line text image;
judging whether the similarity between the first single-line text image and the second single-line text image is lower than a first threshold value or not;
if the comparison result is lower than the first threshold value, recording the comparison result of the image pair as failing;
if the number of the preset symbols is not less than the first threshold value, judging whether the first single-line text image and the second single-line text image contain the preset symbols or not;
if the preset symbol is not included, recording the comparison result of the image pair as passing;
if the single-line text image contains the preset symbol, extracting a first sub-image containing the preset symbol in the first single-line text image and a second sub-image containing the preset symbol in the second single-line text image;
performing OCR recognition on the first sub-image and the second sub-image, and performing similarity comparison on the OCR recognition results to obtain the similarity of the OCR recognition results;
if the similarity of the OCR recognition result is lower than a second threshold value, recording the comparison result of the image pair as not passing;
if the similarity of the OCR recognition result is lower than a third threshold and not lower than a second threshold, recording the comparison result of the image pair as an in-doubt;
and if the similarity of the OCR recognition results is not lower than a third threshold, recording the comparison result of the image pair as passing.
The comparing the first single-line text image and the second single-line text image in the image pair to obtain the similarity between the first single-line text image and the second single-line text image may include:
and calculating the pixel difference value of each pixel point on the same position in the first single-line text image and the second single-line text image in the image pair by using an image difference algorithm, averaging the pixel difference values of all the pixel points to obtain a pixel difference average value, and taking the pixel difference average value as the similarity between the first single-line text image and the second single-line text image in the image pair. The difference between the first single-line text image and the second single-line text image is smaller as the pixel difference average value is smaller, and conversely, the difference between the first single-line text image and the second single-line text image is larger as the pixel difference average value is smaller.
The first threshold, the second threshold, and the third threshold may be set according to actual needs, for example, the first threshold is set to 98%, which is not specifically limited in the embodiment of the present invention; in addition, the preset symbol is used to identify a key field, where the key field includes a transaction counter-party, a contract number, a contract interest rate, a rest date, an expiration date, and the like, and the preset symbol may be a symbol such as an underline or a bracket, which is not specifically limited in this embodiment of the present invention.
In this embodiment, the similarity comparison is performed on the first single-line text image and the second single-line text image in each image pair, when the similarity does not reach the preset threshold, the comparison result of the image pair is recorded as not passing, and when the similarity reaches the preset threshold, the key fields included in the first single-line text image and the second single-line text image are further identified, the similarity comparison is performed on the identified fields, and then whether the comparison between the image pairs passes or not is judged according to the similarity between the fields, so that the efficiency of contract verification can be improved.
205, determining a comparison result between the first text image and the second text image according to the similarity result between the first single-line text image and the second single-line text image in each image pair.
The implementation process of step 205 may include:
counting comparison results of all recorded image pairs;
if the comparison results of all the image pairs are recorded as passing, judging that the comparison results of the first text image and the second text image are passing;
if the comparison result of any image pair is recorded as not passing, judging that the comparison result of the first text image and the second text image is not passing;
and if the comparison result of any image pair is recorded as the doubt, judging that the comparison result of the first text image and the second text image is the doubt.
When the comparison result of the first text image and the second text image is judged to be in doubt, the first text image and the second text image are sent to the preset terminal to be compared manually, and the comparison result of the first text image and the second text image returned by the preset terminal is obtained.
The following further describes, by taking a banking application scenario as an example, a contract verification method provided by the embodiment of the present invention with reference to fig. 3, where as shown in fig. 3, the method includes the following steps:
s1, the branch negotiates with the client about the contract to form the contract intention and form a unique contract number;
s2, the branch bank sends the contract intention to the head bank, and the head bank examines and approves the contract elements;
s3, refusing examination and approval, returning to the step S1 to renegotiate, or abandoning the contract;
s4, forming a contract text and storing the contract text according to the contract elements reported by the branch lines after approval, forming a unique text number and associating the unique text number with the contract number hook;
s5, downloading contract texts by lines, signing a contract with a client after printing and stamping;
s6, scanning the signed contract into a graphic file, and uploading the graphic file to a head office server;
s7, the head office server obtains the scanning graphic file which is uploaded by the branch and signed the contract;
s8, the chief executive server searches the text number related to the obtained contract number according to the obtained contract number, and finds the corresponding contract text;
s9, printing the text file into a graphic format in the memory by the head office server through a virtual printing algorithm;
s10, comparing the preset area images in the two graphic files generated in the steps S7 and S9 by the head office server by using a graphic comparison algorithm;
s11, if the comparison is passed, the contract is valid, and the contract is normally completed;
s12, if the comparison fails, the contract is invalid, the branch is returned to sign again, and warning is given to carry out offline responsibility tracing;
s13, comparing and backing up the question to form a two-side graphic screenshot of the backing part and prompting manual comparison;
s14, if the manual comparison is passed, the contract is valid, and the contract signing is normally completed;
and S15, if the manual comparison fails, the contract is invalid, the branch is returned to sign again, and a warning is given to perform offline responsibility tracing.
In one embodiment, as shown in FIG. 4, a contract validation apparatus is provided that may include:
a request analyzing module 41, configured to analyze the received contract verification request to obtain a scanned picture of a signed paper contract and a contract number of the paper contract;
a data query module 42, configured to query whether a text number associated with the contract number is stored in a preset database;
the virtual printing module 43 is configured to, when the text number is found, virtually print the standard contract corresponding to the text number in the database to generate a standard contract picture;
an image comparison module 44, configured to compare the scanned image with two text images in a preset region in the standard contract image;
and a result output module 45, configured to output a result used for indicating whether the paper contract passes the verification according to the comparison result.
In one embodiment, the apparatus further comprises:
and the storage module is used for caching the contract number of the paper contract and the standard contract picture into a preset cache region by using Key-Value.
In one embodiment, the contract number is used for identifying the contract terms uploaded by the contract auditing requester, and the apparatus further comprises:
the generating module is used for generating a standard contract containing the contract terms and a text number used for identifying the standard contract when the contract terms pass the auditing;
the storage module is used for storing the standard contract into the database and storing the text number and the contract number into the database in a correlation manner;
and the first sending module is used for returning the download address of the standard contract to the contract auditing requester so as to enable the contract auditing requester to download and print the standard contract.
In one embodiment, the apparatus further comprises:
the judging module is used for judging whether the scanned picture meets preset conditions or not, wherein the preset conditions comprise preset image size and image inclination angle range;
and the acquisition module is used for acquiring two text images of a preset area from the scanned picture and the standard contract picture if the scanned picture meets the preset condition, and performing rotation correction on the text images acquired from the scanned picture.
In one embodiment, the image alignment module comprises:
the binarization submodule is used for acquiring a first binary image and a second binary image which are obtained by performing binarization processing on the two text images;
the registration submodule is used for registering the first binary image and the second binary image;
the obtaining sub-module is used for obtaining a plurality of image pairs from the registered first binary image and the second binary image, wherein each image pair comprises a first single-line text image in the first binary image and a second single-line text image in a corresponding position in the second binary image;
the comparison submodule is used for carrying out similarity comparison on the first single-line text image and the second single-line text image in each image pair;
and the determining submodule is used for determining a comparison result of the first text image and the second text image according to the similarity result of the first single-line text image and the second single-line text image in each image pair.
In one embodiment, the pair sub-module is specifically configured to:
traversing each image pair, and performing the following operations on the traversed image pair:
comparing a first single-line text image with a second single-line text image in the image pair to obtain the similarity between the first single-line text image and the second single-line text image;
judging whether the similarity between the first single-line text image and the second single-line text image is lower than a first threshold value or not;
if the comparison result is lower than the first threshold value, recording the comparison result of the image pair as failing;
if the number of the preset symbols is not less than the first threshold value, judging whether the first single-line text image and the second single-line text image contain the preset symbols or not;
if the preset symbol is not included, recording the comparison result of the image pair as passing;
if the single-line text image contains the preset symbol, extracting a first sub-image containing the preset symbol in the first single-line text image and a second sub-image containing the preset symbol in the second single-line text image;
performing OCR recognition on the first sub-image and the second sub-image, and performing similarity comparison on the OCR recognition results to obtain the similarity of the OCR recognition results;
if the similarity of the OCR recognition result is lower than a second threshold value, recording the comparison result of the image pair as not passing;
if the similarity of the OCR recognition result is lower than a third threshold and not lower than a second threshold, recording the comparison result of the image pair as an in-doubt;
if the similarity of the OCR recognition result is not lower than a third threshold, recording the comparison result of the image pair as passing;
in one embodiment, the determination submodule is specifically configured to:
counting comparison results of all recorded image pairs;
if the comparison results of all the image pairs are recorded as passing, judging that the comparison results of the first text image and the second text image are passing;
if the comparison result of any image pair is recorded as not passing, judging that the comparison result of the first text image and the second text image is not passing;
and if the comparison result of any image pair is recorded as the doubt, judging that the comparison result of the first text image and the second text image is the doubt.
In one embodiment, the apparatus further comprises:
and the second sending submodule is used for returning an invalid prompt aiming at the paper contract to the contract uploading party under the condition that the paper contract is not verified so as to enable the contract uploading party to sign the contract again according to the standard contract.
It should be noted that: in the contract verification apparatus provided in the embodiment of the present invention, only the division of each function module is exemplified, and in practical applications, the function distribution may be completed by different function modules as needed, that is, the internal structure of the apparatus is divided into different function modules to complete all or part of the functions described above. In addition, the specific implementation process and beneficial effects of the contract verification apparatus in this embodiment are detailed in the contract verification method in the embodiment, and are not described herein again.
Fig. 5 is an internal structural diagram of a computer device according to an embodiment of the present invention. The computer device may be a server, and its internal structure diagram may be as shown in fig. 5. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a contract validation method.
Those skilled in the art will appreciate that the configuration shown in fig. 5 is a block diagram of only a portion of the configuration associated with aspects of the present invention and is not intended to limit the computing devices to which aspects of the present invention may be applied, and that a particular computing device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is also provided a computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
analyzing the received contract verification request to obtain a scanned picture of the signed paper contract and a contract number of the paper contract;
inquiring whether a text number associated with the contract number is stored in a preset database;
when the text number is inquired, virtually printing the standard contract corresponding to the text number in the database to generate a standard contract picture;
comparing the scanned picture with two text images in a preset area in the standard contract picture;
and outputting a result for indicating whether the paper contract passes the verification or not according to the comparison result.
In one embodiment, there is also provided a computer readable storage medium having a computer program stored thereon, the computer program when executed by a processor implementing the steps of:
analyzing the received contract verification request to obtain a scanned picture of the signed paper contract and a contract number of the paper contract;
inquiring whether a text number associated with the contract number is stored in a preset database;
when the text number is inquired, virtually printing the standard contract corresponding to the text number in the database to generate a standard contract picture;
comparing the scanned picture with two text images in a preset area in the standard contract picture;
and outputting a result for indicating whether the paper contract passes the verification or not according to the comparison result.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only show some embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of contract validation, the method comprising:
analyzing the received contract verification request to obtain a scanned picture of a signed paper contract and a contract number of the paper contract;
inquiring whether a text number associated with the contract number is stored in a preset database;
when the text number is inquired, virtually printing a standard contract corresponding to the text number in the database to generate a standard contract picture;
comparing the scanned picture with two text images in a preset area in the standard contract picture;
and outputting a result for indicating whether the paper contract passes the verification or not according to the comparison result.
2. The method according to claim 1, wherein after the step of virtually printing the corresponding standard contract of the text number in the database when the text number is queried and generating the standard contract picture, the method further comprises:
and caching the contract number of the paper contract and the standard contract picture into a preset cache region by using Key-Value.
3. The method according to claim 1, wherein before the step of comparing the two text images of the scanned picture and the preset region of the standard contract picture, the method further comprises:
judging whether the scanned picture meets a preset condition or not, wherein the preset condition comprises a preset image size and an image inclination angle range;
and if so, acquiring two text images of a preset area from the scanning picture and the standard contract picture, and performing rotation correction on the text images acquired from the scanning picture.
4. The method according to any one of claims 1 to 3, wherein the comparing the two text images of the scanned picture and the preset region of the standard contract picture comprises:
acquiring a first binary image and a second binary image obtained by performing binarization processing on the two text images;
registering the first binary image and the second binary image, and acquiring a plurality of image pairs from the registered first binary image and second binary image, wherein each image pair comprises a first single-line text image in the first binary image and a second single-line text image in a corresponding position in the second binary image;
carrying out similarity comparison on a first single-line text image and a second single-line text image in each image pair;
and determining a comparison result of the first text image and the second text image according to a similarity result of the first single-line text image and the second single-line text image in each image pair.
5. The method of claim 4, wherein the comparing the similarity of the first single-line text image and the second single-line text image in each image pair comprises:
traversing each of the image pairs, and performing the following operations on the traversed image pairs:
comparing a first single-line text image with a second single-line text image in the image pair to obtain the similarity between the first single-line text image and the second single-line text image;
judging whether the similarity between the first single-line text image and the second single-line text image is lower than a first threshold value or not;
if the comparison result is lower than the first threshold value, recording the comparison result of the image pair as failing;
if the first single-line text image and the second single-line text image do not contain the preset symbols, judging whether the first single-line text image and the second single-line text image contain the preset symbols or not;
if the preset symbol is not included, recording the comparison result of the image pair as passing;
if the preset symbol is contained, extracting a first sub-image containing the preset symbol in the first single-line text image and a second sub-image containing the preset symbol in the second single-line text image;
performing OCR recognition on the first sub-image and the second sub-image, and performing similarity comparison on an OCR recognition result to obtain the similarity of the OCR recognition result;
if the similarity of the OCR recognition results is lower than a second threshold value, recording the comparison result of the image pair as not passing;
if the similarity of the OCR recognition results is lower than a third threshold and not lower than the second threshold, recording the comparison result of the image pair as being in doubt;
and if the similarity of the OCR recognition results is not lower than the third threshold, recording the comparison result of the image pair as passing.
6. The method according to claim 5, wherein determining the comparison result of the first text image and the second text image according to the similarity result of the first single-line text image and the second single-line text image in each image pair comprises:
counting comparison results of all recorded image pairs;
if the comparison results of all the image pairs are recorded as passing, judging that the comparison results of the first text image and the second text image are passing;
if the comparison result of any image pair is recorded as not passing, judging that the comparison result of the first text image and the second text image is not passing;
and if the comparison result of any image pair is recorded as being in doubt, judging that the comparison result of the first text image and the second text image is in doubt.
7. The method of claim 1, further comprising:
and returning an invalid prompt aiming at the paper contract to a contract uploading party under the condition that the paper contract is not verified so that the contract uploading party re-signs the contract according to the standard contract.
8. A contract verification apparatus, the apparatus comprising:
the contract verification module is used for verifying the contract of the user according to the contract number of the user;
the data query module is used for querying whether a text number associated with the contract number is stored in a preset database;
the virtual printing module is used for virtually printing the standard contract corresponding to the text number in the database to generate a standard contract picture when the text number is inquired;
the image comparison module is used for comparing the scanned picture with two text images in a preset area in the standard contract picture;
and the result output module is used for outputting a result used for indicating whether the paper contract passes the verification or not according to the comparison result.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the contract validation method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out a contract verification method according to any one of claims 1 to 7.
CN202010837733.6A 2020-08-19 2020-08-19 Contract verification method and device, computer equipment and storage medium Pending CN112001818A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010837733.6A CN112001818A (en) 2020-08-19 2020-08-19 Contract verification method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010837733.6A CN112001818A (en) 2020-08-19 2020-08-19 Contract verification method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112001818A true CN112001818A (en) 2020-11-27

Family

ID=73472785

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010837733.6A Pending CN112001818A (en) 2020-08-19 2020-08-19 Contract verification method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112001818A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113487000A (en) * 2021-07-30 2021-10-08 深圳市链融科技股份有限公司 Contract document and service matching method and device, computer equipment and storage medium
CN115511473A (en) * 2022-11-02 2022-12-23 北京共识数信科技有限公司 Intelligent letter management method, system and storage medium based on big data

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117704A (en) * 2015-08-25 2015-12-02 电子科技大学 Text image consistency comparison method based on multiple features
CN105635169A (en) * 2016-01-26 2016-06-01 葛峰 Electronic contract signing method based on the internet
CN109033058A (en) * 2018-08-14 2018-12-18 深圳壹账通智能科技有限公司 Contract text verification method, device, computer equipment and storage medium
CN109255712A (en) * 2018-10-09 2019-01-22 重庆君子签科技有限公司 Electronic signature method, apparatus, storage medium and server
CN110046679A (en) * 2018-01-16 2019-07-23 上海市教育考试院 Paper document tamper resistant systems and method
CN110266906A (en) * 2019-06-21 2019-09-20 同略科技有限公司 The intelligent digitalized processing flowing water method of archives, system, terminal and storage medium
CN110264223A (en) * 2019-06-19 2019-09-20 中国工商银行股份有限公司 Verification method, generation method and the relevant apparatus of anti-fake contract
CN111292041A (en) * 2020-02-18 2020-06-16 上海东普信息科技有限公司 Electronic contract generating method, device, equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117704A (en) * 2015-08-25 2015-12-02 电子科技大学 Text image consistency comparison method based on multiple features
CN105635169A (en) * 2016-01-26 2016-06-01 葛峰 Electronic contract signing method based on the internet
CN110046679A (en) * 2018-01-16 2019-07-23 上海市教育考试院 Paper document tamper resistant systems and method
CN109033058A (en) * 2018-08-14 2018-12-18 深圳壹账通智能科技有限公司 Contract text verification method, device, computer equipment and storage medium
CN109255712A (en) * 2018-10-09 2019-01-22 重庆君子签科技有限公司 Electronic signature method, apparatus, storage medium and server
CN110264223A (en) * 2019-06-19 2019-09-20 中国工商银行股份有限公司 Verification method, generation method and the relevant apparatus of anti-fake contract
CN110266906A (en) * 2019-06-21 2019-09-20 同略科技有限公司 The intelligent digitalized processing flowing water method of archives, system, terminal and storage medium
CN111292041A (en) * 2020-02-18 2020-06-16 上海东普信息科技有限公司 Electronic contract generating method, device, equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113487000A (en) * 2021-07-30 2021-10-08 深圳市链融科技股份有限公司 Contract document and service matching method and device, computer equipment and storage medium
CN113487000B (en) * 2021-07-30 2022-09-20 深圳市链融科技股份有限公司 Contract document and service matching method and device, computer equipment and storage medium
CN115511473A (en) * 2022-11-02 2022-12-23 北京共识数信科技有限公司 Intelligent letter management method, system and storage medium based on big data

Similar Documents

Publication Publication Date Title
CN110287971B (en) Data verification method, device, computer equipment and storage medium
CN110569341B (en) Method and device for configuring chat robot, computer equipment and storage medium
WO2020073502A1 (en) Invoice verifying method and apparatus, financing checking method and apparatus, and device and medium
US8326041B2 (en) Machine character recognition verification
CN109033058B (en) Contract text verification method, apparatus, computer device and storage medium
CN109033150B (en) Sensitive word verification method, device, computer equipment and storage medium
CN110362799B (en) On-line arbitration-based method and device for generating and processing resolution book and computer equipment
WO2021042747A1 (en) Invoice picture recognition and verification method and system, device, and readable storage medium
WO2019227577A1 (en) Invoice authenticity verification method, apparatus, computer device, and storage medium
WO2020143325A1 (en) Electronic document generation method and device
CN112001818A (en) Contract verification method and device, computer equipment and storage medium
CN111275102A (en) Multi-certificate type synchronous detection method and device, computer equipment and storage medium
CN111858977B (en) Bill information acquisition method, device, computer equipment and storage medium
CN112396047B (en) Training sample generation method and device, computer equipment and storage medium
CN111932766A (en) Invoice verification method and device, computer equipment and readable storage medium
CN112215087A (en) Picture auditing method and device, computer equipment and storage medium
CN113420657A (en) Intelligent verification method and device, computer equipment and storage medium
WO2021174869A1 (en) User image data processing method, apparatus, computer device, and storage medium
CN112580499A (en) Text recognition method, device, equipment and storage medium
CN111931672A (en) Handwriting recognition method and device, computer equipment and storage medium
CN111191062B (en) Picture processing method, device, computer equipment and storage medium
CN110751140A (en) Character batch recognition method and device and computer equipment
CN115761745A (en) Bill data identification method and device, electronic equipment and storage medium
CN117133000A (en) Signature verification method, device, equipment and storage medium
CN117314691A (en) Electronic contract automatic auditing method, system, terminal and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination