CN113516044A - Paper contract credit enhancement method and system based on OCR and Hash algorithm - Google Patents

Paper contract credit enhancement method and system based on OCR and Hash algorithm Download PDF

Info

Publication number
CN113516044A
CN113516044A CN202110538654.XA CN202110538654A CN113516044A CN 113516044 A CN113516044 A CN 113516044A CN 202110538654 A CN202110538654 A CN 202110538654A CN 113516044 A CN113516044 A CN 113516044A
Authority
CN
China
Prior art keywords
contract
paper
paper contract
hash
ocr
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
CN202110538654.XA
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.)
Shandong New Generation Information Industry Technology Research Institute Co Ltd
Original Assignee
Shandong New Generation Information Industry Technology Research Institute 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 Shandong New Generation Information Industry Technology Research Institute Co Ltd filed Critical Shandong New Generation Information Industry Technology Research Institute Co Ltd
Priority to CN202110538654.XA priority Critical patent/CN113516044A/en
Publication of CN113516044A publication Critical patent/CN113516044A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The invention discloses a paper contract credit enhancement method based on OCR and Hash algorithm, which relates to the technical field of image processing and comprises the following steps: acquiring a paper contract sample, and training the paper contract sample by using a CNN convolutional neural network to obtain an OCR recognition model; acquiring a paper contract picture or an electronic contract document to be identified, extracting character contents in the paper contract picture or the electronic contract document by using an OCR (optical character recognition) model, and generating a continuous character string; carrying out hash hashing on the continuous character strings by using a hash algorithm to obtain corresponding hash values; and adding the obtained hash value to the appointed position of the paper contract picture or the electronic contract document, and storing or printing the paper contract picture or the electronic contract document. The invention also discloses a paper contract credit enhancement system based on OCR and Hash algorithm, which is combined with the method, can improve the safety index of the paper contract and realize the quick verification of the paper contract.

Description

Paper contract credit enhancement method and system based on OCR and Hash algorithm
Technical Field
The invention relates to the technical field of image processing, in particular to a paper contract credit enhancement method and system based on an OCR (optical character recognition) and hash algorithm.
Background
With the development of the OCR technology, the mobile terminal can be used for realizing the accurate recognition of characters, particularly a neural network model which is specially trained, and the accuracy of the OCR recognition is greatly improved. The hash algorithm maps an arbitrary length binary value to a shorter fixed length binary value, and this small binary value is called a hash value. Hash values are a unique and extremely compact representation of a piece of data as a value. If a piece of plaintext is hashed and even if only one letter of the piece is altered, the subsequent hash will produce a different value. It is computationally infeasible to find two different inputs whose hash is the same value, so the hash value of the data can verify the integrity of the data.
Although technical means such as electronic contracts and electronic signatures can provide better guarantee for contract credit at present, traditional paper contracts are still widely used in many occasions. How to perform credit enhancement with low cost and prevent falsification aiming at the traditional paper contract also has practical significance.
Disclosure of Invention
Aiming at the requirements and the defects of the prior art development, the invention provides a paper contract credit enhancement method and a paper contract credit enhancement system based on an OCR (optical character recognition) and a Hash algorithm.
Firstly, the invention relates to a paper contract credit enhancement method based on OCR and Hash algorithm, which adopts the following technical scheme for solving the technical problems:
a paper contract credit enhancement method based on OCR and hash algorithm comprises the following implementation contents:
s1, obtaining a paper contract sample, and training the paper contract sample by using a CNN convolutional neural network to obtain an OCR recognition model;
s2, acquiring a paper contract picture or an electronic contract document to be identified, extracting the text content in the paper contract picture or the electronic contract document by using an OCR (optical character recognition) model, and generating a continuous character string;
step S3, carrying out hash hashing on the continuous character strings by using a hash algorithm to obtain corresponding hash values;
and step S4, adding the obtained hash value to the appointed position of the paper contract picture or the electronic contract document, and saving or printing the paper contract picture or the electronic contract document.
Optionally, the step S2-step S3 are executed again for the paper contract picture or the electronic contract document that has been identified, the hash value obtained this time is automatically compared with the hash value obtained for the first time, and the verification of the paper contract picture or the electronic contract document is completed through the comparison result.
Specifically, the related paper contract picture can be in a PNG or JPEG format;
and inserting the related paper contract picture into PDF or WORD to generate an electronic contract document in PDF or WORD format.
Specifically, the related hash algorithm is any one of an SM3 algorithm, an SHA128 algorithm, an SHA256 algorithm, and an MD5 algorithm.
Specifically, the obtained hash value is directly saved at the designated position of the paper contract picture or the electronic contract document in a watermark mode.
Specifically, the hash value obtained by hashing the continuous character string by using the hash algorithm may be separately stored.
Secondly, the paper contract credit enhancement system based on OCR and Hash algorithm of the invention adopts the following technical scheme to solve the technical problems:
a paper contract credit enhancement system based on OCR and hash algorithm comprises the following implementation structures:
the acquisition module is used for acquiring a paper contract sample and acquiring a paper contract picture or an electronic contract document to be identified;
the training module is used for training a paper contract sample by utilizing a CNN convolutional neural network to obtain an OCR recognition model;
the OCR recognition model is used for extracting the text content in the paper contract picture or the electronic contract document and generating a continuous character string;
the hash algorithm module is used for carrying out hash hashing on the continuous character strings to obtain corresponding hash values;
and the processing module is used for adding the obtained hash value to the specified position of the paper contract picture or the electronic contract document and storing or printing the paper contract picture or the electronic contract document.
The structure of the paper contract credit enhancement system also comprises a verification module;
and for the identified paper contract pictures or electronic contract documents, the verification module automatically compares the two hash values of the same paper contract picture or electronic contract document, and outputs the result of passing the verification when the comparison results are consistent.
Specifically, the related paper contract picture can be in a PNG or JPEG format;
and inserting the related paper contract picture into PDF or WORD to generate an electronic contract document in PDF or WORD format.
Specifically, the related hash algorithm module selects SM3 algorithm/SHA 128 algorithm/SHA 256 algorithm/MD 5 algorithm;
the processing module directly stores the obtained hash value at the designated position of the paper contract picture or the electronic contract document in a watermark mode, or the processing module independently stores the obtained hash value.
Compared with the prior art, the paper contract credit enhancement method and system based on OCR and Hash algorithm have the advantages that:
according to the invention, the watermark is added at the appointed position of the paper contract picture or the electronic contract document by utilizing the OCR and the Hash algorithm, so that the safety index of the paper contract picture or the electronic contract document is improved, and the quick verification of the paper contract picture or the electronic contract document is realized.
Drawings
FIG. 1 is a flow chart of a method according to a first embodiment of the present invention;
fig. 2 is a block diagram of module connection according to a second embodiment of the present invention.
The reference information in the drawings indicates:
1. an acquisition module, 2, a training module, 3, an OCR recognition model, 4, a Hash algorithm module,
5. and the processing module 6 is a checking module.
Detailed Description
In order to make the technical scheme, the technical problems to be solved and the technical effects of the present invention more clearly apparent, the following technical scheme of the present invention is clearly and completely described with reference to the specific embodiments.
The first embodiment is as follows:
with reference to fig. 1, the embodiment provides a paper contract credit enhancement method based on OCR and hash algorithm, and the implementation content of the method includes:
and S1, obtaining a paper contract sample, and training the paper contract sample by using the CNN convolutional neural network to obtain an OCR recognition model.
And step S2, acquiring the paper contract picture or the electronic contract document to be identified, extracting the text content in the paper contract picture or the electronic contract document by using an OCR (optical character recognition) model, and generating a continuous character string.
In this embodiment, the paper contract picture may be in a PNG or JPEG format;
the paper contract picture is inserted into PDF or WORD, and an electronic contract document in PDF or WORD format can be generated.
And step S3, carrying out hash hashing on the continuous character strings by using a hash algorithm to obtain corresponding hash values.
In this embodiment, the hash algorithm is any one of an SM3 algorithm, an SHA128 algorithm, an SHA256 algorithm, and an MD5 algorithm.
And step S4, directly storing the obtained hash value at the appointed position of the paper contract picture or the electronic contract document in a watermark mode, and storing or printing the paper contract picture or the electronic contract document.
Of course, the resulting hash value may also be saved separately.
Example two:
with reference to fig. 2, the embodiment provides a paper contract credit enhancement system based on OCR and hash algorithm, and the implementation structure of the system includes an obtaining module 1, a training module 2, an OCR recognition model 3, a hash algorithm module 4, and a processing module 5.
The acquisition module 1 is used for acquiring a paper contract sample on one hand and acquiring a paper contract picture or an electronic contract document to be identified on the other hand. The paper contract picture can be in PNG or JPEG format; and inserting the paper contract picture into PDF or WORD to generate an electronic contract document in PDF or WORD format.
The training module 2 is used for training a paper contract sample by using a CNN convolutional neural network to obtain an OCR recognition model 3.
The OCR recognition model 3 is used to extract text contents in a paper contract picture or an electronic contract document and generate a continuous character string.
The SM3 algorithm/SHA 128 algorithm/SHA 256 algorithm/MD 5 algorithm is selected as the hash algorithm module 4, and the hash algorithm module 4 performs hash on the continuous character strings to obtain corresponding hash values.
The processing module 5 directly stores the obtained hash value at the designated position of the paper contract picture or the electronic contract document in a watermark mode, or the processing module 5 separately stores the obtained hash value and then stores or prints the paper contract picture or the electronic contract document.
In order to further enhance the credit of the contract and avoid errors in extracting information, the structure of the paper contract credit enhancement system also comprises a verification module 6. For the identified paper contract pictures or electronic contract documents, the verification module 6 automatically compares the two hash values of the same paper contract picture or electronic contract document, and outputs the result of passing the verification when the comparison results are consistent.
In summary, the method and the system for enhancing the paper contract credit based on the OCR and the Hash algorithm can improve the safety index of the paper contract picture or the electronic contract document and realize the quick verification of the paper contract picture or the electronic contract document.
The principles and embodiments of the present invention have been described in detail using specific examples, which are provided only to aid in understanding the core technical content of the present invention. Based on the above embodiments of the present invention, those skilled in the art should make any improvements and modifications to the present invention without departing from the principle of the present invention, and therefore, the present invention should fall into the protection scope of the present invention.

Claims (10)

1. A paper contract credit enhancement method based on OCR and hash algorithm is characterized in that the realization content comprises the following steps:
s1, obtaining a paper contract sample, and training the paper contract sample by using a CNN convolutional neural network to obtain an OCR recognition model;
s2, acquiring a paper contract picture or an electronic contract document to be identified, extracting the text content in the paper contract picture or the electronic contract document by using an OCR (optical character recognition) model, and generating a continuous character string;
step S3, carrying out hash hashing on the continuous character strings by using a hash algorithm to obtain corresponding hash values;
and step S4, adding the obtained hash value to the appointed position of the paper contract picture or the electronic contract document, and saving or printing the paper contract picture or the electronic contract document.
2. An OCR and Hash algorithm based paper contract credit enhancement method as claimed in claim 1, wherein the steps S2-S3 are executed again for the identified paper contract picture or electronic contract document, the hash value obtained this time is compared with the hash value obtained for the first time automatically, and the verification of the paper contract picture or electronic contract document is completed through the comparison result.
3. An OCR and Hash algorithm based paper contract credit enhancement method as claimed in claim 1, wherein the paper contract picture can be in PNG or JPEG format;
and inserting the paper contract picture into PDF or WORD to generate an electronic contract document in PDF or WORD format.
4. An OCR and hash algorithm based paper contract credit enhancement method as claimed in claim 1, wherein the hash algorithm selects any one of SM3 algorithm, SHA128 algorithm, SHA256 algorithm, MD5 algorithm.
5. An OCR and hash algorithm based paper contract credit enhancement method as claimed in claim 1, wherein the obtained hash value is directly saved at the designated position of the paper contract picture or the electronic contract document by means of watermark.
6. An OCR and Hash algorithm based paper contract credit enhancement method as claimed in claim 1, wherein the hash value obtained by Hash hashing consecutive character strings using Hash algorithm can also be stored separately.
7. A paper contract credit enhancement system based on OCR and hash algorithm is characterized in that the implementation structure comprises:
the acquisition module is used for acquiring a paper contract sample and acquiring a paper contract picture or an electronic contract document to be identified;
the training module is used for training a paper contract sample by utilizing a CNN convolutional neural network to obtain an OCR recognition model;
the OCR recognition model is used for extracting the text content in the paper contract picture or the electronic contract document and generating a continuous character string;
the hash algorithm module is used for carrying out hash hashing on the continuous character strings to obtain corresponding hash values;
and the processing module is used for adding the obtained hash value to the specified position of the paper contract picture or the electronic contract document and storing or printing the paper contract picture or the electronic contract document.
8. An OCR and hashing algorithm based paper contract credit enhancement system according to claim 7, further comprising a verification module;
and for the identified paper contract pictures or electronic contract documents, the verification module automatically compares the two hash values of the same paper contract picture or electronic contract document, and outputs the result of passing the verification when the comparison results are consistent.
9. An OCR and Hash algorithm based paper contract credit enhancement system in accordance with claim 7, wherein the paper contract picture can be in PNG or JPEG format;
and inserting the paper contract picture into PDF or WORD to generate an electronic contract document in PDF or WORD format.
10. An OCR and hash algorithm based paper contract credit enhancement system as claimed in claim 7, wherein said hash algorithm module selects SM3 algorithm/SHA 128 algorithm/SHA 256 algorithm/MD 5 algorithm;
the processing module directly stores the obtained hash value at the designated position of the paper contract picture or the electronic contract document in a watermark mode, or the processing module independently stores the obtained hash value.
CN202110538654.XA 2021-05-18 2021-05-18 Paper contract credit enhancement method and system based on OCR and Hash algorithm Pending CN113516044A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110538654.XA CN113516044A (en) 2021-05-18 2021-05-18 Paper contract credit enhancement method and system based on OCR and Hash algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110538654.XA CN113516044A (en) 2021-05-18 2021-05-18 Paper contract credit enhancement method and system based on OCR and Hash algorithm

Publications (1)

Publication Number Publication Date
CN113516044A true CN113516044A (en) 2021-10-19

Family

ID=78064648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110538654.XA Pending CN113516044A (en) 2021-05-18 2021-05-18 Paper contract credit enhancement method and system based on OCR and Hash algorithm

Country Status (1)

Country Link
CN (1) CN113516044A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102880874A (en) * 2012-09-29 2013-01-16 重庆新媒农信科技有限公司 Character recognition method and character recognizer
CN110287732A (en) * 2019-05-15 2019-09-27 杭州趣链科技有限公司 One kind depositing card method based on block chain electronic contract
CN110674523A (en) * 2019-09-30 2020-01-10 民生科技有限责任公司 Method for confirming electronic contract signer by combining digital signature with handwritten signature
CN111832423A (en) * 2020-06-19 2020-10-27 北京邮电大学 Bill information identification method, device and system
CN112784838A (en) * 2021-01-28 2021-05-11 佛山市南海区广工大数控装备协同创新研究院 Hamming OCR recognition method based on locality sensitive hashing network
CN112784220A (en) * 2020-06-12 2021-05-11 深圳市迪博企业风险管理技术有限公司 Paper contract tamper-proof verification method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102880874A (en) * 2012-09-29 2013-01-16 重庆新媒农信科技有限公司 Character recognition method and character recognizer
CN110287732A (en) * 2019-05-15 2019-09-27 杭州趣链科技有限公司 One kind depositing card method based on block chain electronic contract
CN110674523A (en) * 2019-09-30 2020-01-10 民生科技有限责任公司 Method for confirming electronic contract signer by combining digital signature with handwritten signature
CN112784220A (en) * 2020-06-12 2021-05-11 深圳市迪博企业风险管理技术有限公司 Paper contract tamper-proof verification method and system
CN111832423A (en) * 2020-06-19 2020-10-27 北京邮电大学 Bill information identification method, device and system
CN112784838A (en) * 2021-01-28 2021-05-11 佛山市南海区广工大数控装备协同创新研究院 Hamming OCR recognition method based on locality sensitive hashing network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
庞博 等: "基于QR 码数字水印技术的研究与实现", 《网络安全技术与应用》, vol. 2017, no. 11, pages 68 *

Similar Documents

Publication Publication Date Title
CN109543690B (en) Method and device for extracting information
JP5090369B2 (en) Automated processing using remotely stored templates (method for processing forms, apparatus for processing forms)
Guo et al. Eaten: Entity-aware attention for single shot visual text extraction
WO2022057707A1 (en) Text recognition method, image recognition classification method, and document recognition processing method
US8254692B2 (en) Document comparison method and apparatus
CN110569832A (en) text real-time positioning and identifying method based on deep learning attention mechanism
US8326041B2 (en) Machine character recognition verification
CN112508011A (en) OCR (optical character recognition) method and device based on neural network
US9330323B2 (en) Redigitization system and service
CN112434690A (en) Method, system and storage medium for automatically capturing and understanding elements of dynamically analyzing text image characteristic phenomena
CN112784220B (en) Paper contract tamper-proof verification method and system
CN112396047B (en) Training sample generation method and device, computer equipment and storage medium
CN108897862A (en) One kind being based on government document picture retrieval method and system
CN111353492A (en) Image identification and information extraction method and device for standardized document
CN110209759B (en) Method and device for automatically identifying page
US8170289B1 (en) Hierarchical alignment of character sequences representing text of same source
CN109508712A (en) A kind of Chinese written language recognition methods based on image
RU2648636C2 (en) Storage of the content in converted documents
CN115994232B (en) Online multi-version document identity authentication method, system and computer equipment
CN113516044A (en) Paper contract credit enhancement method and system based on OCR and Hash algorithm
US10546218B2 (en) Method for improving quality of recognition of a single frame
CN109532255B (en) Printing control platform of printer
CN114238731A (en) Domestic CPU retrieval method, system, device and computer readable medium
CN112348024A (en) Image-text identification method and system based on deep learning optimization network
JP2020047031A (en) Document retrieval device, document retrieval system and program

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