Paper file tampering detection method and device
By receiving paper documents uploaded by users and performing identity verification, extracting and calculating the hash value of the file content in pages, and detecting file tampering combined with the original document database, the problem of low detection efficiency and accuracy in the existing technology is solved, and an efficient , accurate document tampering detection and traceability.
Patent Information
- Application Number
- CN202411253595.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-09-06
AI Technical Summary
The prior art is less efficient and accurate when detecting tampering of paper documents, and is overly dependent on OCR identification results, which makes false alarms prone to occur.
By receiving files to be detected uploaded by users, performing identity verification on the users, extracting the file contents in pages, using a preset target algorithm to calculate the hash value of the text content, and detecting it based on the original file database to determine whether the file has been tampered with.
It improves the accuracy and efficiency of text tampering detection, enables traceability of tampering when a file is tampered, and enhances the security and reliability of files.
Smart Images

Figure CN119337346A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image detection technology, and in particular to a method and device for detecting tampering of paper documents. Background Art
[0002] Important documents such as contracts, legal instruments, and certification documents on paper carriers are widely used as proof of contracts. However, with the rapid development and popularization of digital technology and image printing and reproduction technology, the authenticity and integrity of paper documents have also been challenged unprecedentedly. Illegal tampering with paper documents has brought adverse effects to social organizations and individuals.
[0003] At present, there are several ways to detect illegal tampering of paper documents: printing on a new page of a contract, modifying text by copying and patching, and reprinting after scanning and modification. In the prior art, the solution to the above problem is mainly to manually compare page by page to determine whether the paper document has been tampered with, but the efficiency and accuracy are low; or to perform OCR recognition on the paper document and then compare it with the text content in the original text, but this method is overly dependent on the OCR recognition results, there will be many false positives, and the recognition accuracy is also low. Therefore, it is particularly important to propose a technical solution that can improve the accuracy and efficiency of text tampering detection. Summary of the invention
[0004] The present invention provides a paper document tampering detection method and device, which can help improve the accuracy and efficiency of text tampering detection.
[0005] In order to solve the above technical problems, the first aspect of the present invention discloses a method for detecting tampering of a paper document, the method comprising:
[0006] Receive the file to be detected uploaded by the user, and perform identity verification on the user to obtain the identity verification result corresponding to the user;
[0007] When the identity verification result indicates that the user meets the preset identity requirements, extracting the to-be-detected file content of the to-be-detected file in pages, wherein the to-be-detected file content includes the to-be-detected file identifier and the to-be-detected text content;
[0008] Calculating the text content to be detected by a preset target algorithm to obtain a set of hash values to be detected corresponding to the text content to be detected, wherein the set of hash values to be detected includes at least one hash value to be detected corresponding to the text content to be detected;
[0009] The original file corresponding to the file to be detected is screened in a preset file database according to the file identifier to be detected, and whether the file to be detected has been tampered with is detected according to the original file and the set of hash values to be detected.
[0010] As an optional embodiment, in the first aspect of the present invention, the method further comprises:
[0011] Extracting a file image of an original file corresponding to the file to be detected, and performing image enhancement processing on the file image to obtain a target image;
[0012] Extracting the original file content corresponding to the target image in pages, wherein the original file content includes the original file identifier and original text content corresponding to the original file;
[0013] Calculating the original text content by using a preset target algorithm to obtain an original hash value set corresponding to the original text content;
[0014] The original file content and the original hash value set are encrypted and stored in a preset file database.
[0015] As an optional implementation, in the first aspect of the present invention, detecting whether the file to be detected has been tampered with according to the original file and the set of hash values to be detected includes:
[0016] For each of the hash values to be detected in the set of hash values to be detected, determining an original hash value corresponding to the hash value to be detected in the set of original hash values corresponding to the original file;
[0017] For each of the hash values to be detected, detect whether the hash value to be detected matches the original hash value. When the hash value to be detected matches the original hash value, determine that the text content to be detected corresponding to the hash value to be detected has not been tampered with. When the hash value to be detected does not match the original hash value, determine that the text content to be detected corresponding to the hash value to be detected has been tampered with.
[0018] As an optional implementation, in the first aspect of the present invention, the set of hash values to be detected further includes a position code corresponding to each of the hash values to be detected;
[0019] The method further comprises:
[0020] For each of the hash values to be detected, when the hash value to be detected does not match the original hash value, a private key is generated according to the original hash value, and the original file is decrypted according to the private key and the position code to obtain the original text content in the original file corresponding to the original hash value;
[0021] For each of the hash values to be detected, the text content to be detected corresponding to the hash value to be detected is compared with the original text content corresponding to the original hash value to obtain the text content difference between the text content to be detected and the original text content, and the text content difference is marked in the file to be detected according to the text content difference.
[0022] As an optional implementation manner, in the first aspect of the present invention, performing identity verification on the user to obtain an identity verification result corresponding to the user includes:
[0023] Collecting identity verification information of the user, the identity verification information including identity document information and biometric information of the user;
[0024] Determine whether the identity document information of the user matches the biometric information, and when the identity document information of the user matches the biometric information, determine the association relationship between the user and the to-be-detected file in a preset file database;
[0025] When the association relationship indicates that the user does not have the processing authority for the file to be detected, it is determined that the user does not meet the preset identity requirements; when the association relationship indicates that the user has the processing authority for the file to be detected, it is determined that the user meets the preset identity requirements.
[0026] As an optional embodiment, in the first aspect of the present invention, the method further comprises:
[0027] For each of the text content differences, collect the modification certification information of the user for the text content difference, wherein the modification certification information includes at least one of certification text, certification numbers and certification seals;
[0028] For each of the text content differences, when the modification proof information of the user for the text content difference is collected, the modification proof information is analyzed to determine whether the modification proof information can prove that the text content difference meets the preset modification legitimacy condition;
[0029] For each of the text content differences, when the modification proof information can prove that the text content difference meets the preset modification legality condition, the to-be-detected text content corresponding to the text content difference is updated into the file database;
[0030] For each of the text content differences, when the user's modification proof information for the text content difference is not collected, or when the modification proof information cannot prove that the text content difference meets the preset modification legitimacy conditions, the operation of marking the file to be detected based on the text content difference is triggered.
[0031] As an optional embodiment, in the first aspect of the present invention, the method further comprises:
[0032] For each of the text content differences, analyzing the text tampering type in the to-be-detected file according to the text content difference, the text tampering type including at least one of a text addition type, a text modification type, and a text deletion type;
[0033] For each of the text content differences, determining a tampering influence coefficient of the text content to be detected in the file to be detected relative to the original text content corresponding to the original hash value according to the text content difference and the text tampering type;
[0034] According to the tampering impact coefficient of each text content difference, the file tampering impact level corresponding to the to-be-detected file is determined, and the file tampering reminder is given to relevant personnel corresponding to the file tampering impact level.
[0035] A second aspect of the present invention discloses a paper document tampering detection device, the device comprising:
[0036] The receiving module is used to receive the file to be detected uploaded by the user, and perform identity verification on the user to obtain the identity verification result corresponding to the user;
[0037] An extraction module, configured to extract the to-be-detected file content of the to-be-detected file in pages when the identity authentication result indicates that the user meets the preset identity requirements, wherein the to-be-detected file content includes the to-be-detected file identifier and the to-be-detected text content;
[0038] A calculation module, used to calculate the text content to be detected by a preset target algorithm to obtain a set of hash values to be detected corresponding to the text content to be detected, wherein the set of hash values to be detected includes at least one hash value to be detected corresponding to the text content to be detected;
[0039] The screening module is used to screen the original file corresponding to the file to be detected in a preset file database according to the file identifier to be detected, and detect whether the file to be detected has been tampered with according to the original file and the set of hash values to be detected.
[0040] As an optional implementation, in the second aspect of the present invention, the extraction module is further used to extract a file image of an original file corresponding to the file to be detected, and perform image enhancement processing on the file image to obtain a target image;
[0041] The extraction module is further used to extract the original file content corresponding to the target image in pages, wherein the original file content includes the original file identifier and original text content corresponding to the original file;
[0042] The calculation module is further used to calculate the original text content by using a preset target algorithm to obtain an original hash value set corresponding to the original text content;
[0043] The device also includes:
[0044] The storage module is used to encrypt and store the original file content and the original hash value set in a preset file database.
[0045] As an optional implementation, in the second aspect of the present invention, the screening module detects whether the file to be detected has been tampered with according to the original file and the set of hash values to be detected. Specifically, the method includes:
[0046] For each of the hash values to be detected in the set of hash values to be detected, determining an original hash value corresponding to the hash value to be detected in the set of original hash values corresponding to the original file;
[0047] For each of the hash values to be detected, detect whether the hash value to be detected matches the original hash value. When the hash value to be detected matches the original hash value, determine that the text content to be detected corresponding to the hash value to be detected has not been tampered with. When the hash value to be detected does not match the original hash value, determine that the text content to be detected corresponding to the hash value to be detected has been tampered with.
[0048] As an optional implementation, in the second aspect of the present invention, the set of hash values to be detected further includes a position code corresponding to each of the hash values to be detected;
[0049] The device also includes:
[0050] A generating module, for each of the hash values to be detected, when the hash value to be detected does not match the original hash value, generating a private key according to the original hash value, and decrypting the original file according to the private key and the position code to obtain the original text content in the original file corresponding to the original hash value;
[0051] The comparison module is used to compare the text content to be detected corresponding to each of the hash values to be detected with the original text content corresponding to the original hash value, obtain the text content difference between the text content to be detected and the original text content, and mark the text content difference in the file to be detected according to the text content difference.
[0052] As an optional implementation, in the second aspect of the present invention, the receiving module performs identity verification on the user, and a method of obtaining an identity verification result corresponding to the user specifically includes:
[0053] Collecting identity verification information of the user, the identity verification information including identity document information and biometric information of the user;
[0054] Determine whether the identity document information of the user matches the biometric information, and when the identity document information of the user matches the biometric information, determine the association relationship between the user and the to-be-detected file in a preset file database;
[0055] When the association relationship indicates that the user does not have the processing authority for the file to be detected, it is determined that the user does not meet the preset identity requirements; when the association relationship indicates that the user has the processing authority for the file to be detected, it is determined that the user meets the preset identity requirements.
[0056] As an optional implementation, in the second aspect of the present invention, the device further includes:
[0057] A collection module, configured to collect, for each text content difference, modification certification information of the user for the text content difference, wherein the modification certification information includes at least one of certification text, certification number and certification seal;
[0058] A first analysis module is used for, for each text content difference, when the modification proof information of the user for the text content difference is collected, analyzing the modification proof information to determine whether the modification proof information can prove that the text content difference meets the preset modification legitimacy condition;
[0059] An updating module is used to update the to-be-detected text content corresponding to each of the text content differences into the file database when the modification proof information can prove that the text content difference satisfies the preset modification legitimacy conditions; for each of the text content differences, when the user's modification proof information for the text content difference is not collected, or when the modification proof information cannot prove that the text content difference satisfies the preset modification legitimacy conditions, trigger the comparison module to execute the operation of marking the to-be-detected file according to the text content difference.
[0060] As an optional implementation, in the second aspect of the present invention, the device further includes:
[0061] A second analysis module is used to analyze the text tampering type in the to-be-detected file according to each of the text content differences, wherein the text tampering type includes at least one of a text addition type, a text modification type, and a text deletion type;
[0062] A determination module, configured to determine, for each of the text content differences, a tampering influence coefficient of the text content to be detected in the file to be detected relative to the original text content corresponding to the original hash value according to the text content difference and the text tampering type;
[0063] The determination module is further used to determine the file tampering impact level corresponding to the to-be-detected file according to the tampering impact coefficient of each text content difference, and to provide file tampering reminders to relevant personnel corresponding to the file tampering impact level.
[0064] A third aspect of the present invention discloses another paper document tampering detection device, the device comprising:
[0065] A memory storing executable program code;
[0066] a processor coupled to the memory;
[0067] The processor calls the executable program code stored in the memory to execute the paper document tampering detection method disclosed in the first aspect of the present invention.
[0068] A fourth aspect of the present invention discloses a computer storage medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the paper document tampering detection method disclosed in the first aspect of the present invention.
[0069] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0070] In an embodiment of the present invention, a file to be detected uploaded by a user is received, and the user is identified and verified. When the identity verification result indicates that the user meets the preset identity requirements, the file content to be detected of the file to be detected is extracted in pages, and the text content to be detected is calculated by a preset target algorithm to obtain a set of hash values to be detected corresponding to the text content to be detected. The original file corresponding to the file to be detected is screened in a preset file database according to the file identifier to be detected, and whether the file to be detected has been tampered with is detected based on the original file and the set of hash values to be detected. It can be seen that the implementation of the present invention can improve the accuracy and efficiency of tampering detection of paper documents, and the identity verification of the user can realize tampering tracing when the file is tampered with, thereby improving the security and reliability of the file. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0072] Figure 1 It is a flow chart of a paper document tampering detection method disclosed in an embodiment of the present invention;
[0073] Figure 2 It is a flow chart of another paper document tampering detection method disclosed in an embodiment of the present invention;
[0074] Figure 3 It is a structural schematic diagram of a paper document tampering detection device disclosed in an embodiment of the present invention;
[0075] Figure 4 It is a structural schematic diagram of another paper document tampering detection device disclosed in an embodiment of the present invention;
[0076] Figure 5 It is a structural schematic diagram of another paper document tampering detection device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0077] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0078] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or end including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or ends.
[0079] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0080] The present invention discloses a paper document tampering detection method and device, which can improve the accuracy and efficiency of paper document tampering detection, and perform identity authentication on users, and can realize tampering tracing when the document is tampered, thereby improving the security and reliability of the document. The following are detailed descriptions.
[0081] Embodiment 1
[0082] See also Figure 1 , Figure 1 : is a flow chart of a paper document tampering detection method disclosed in an embodiment of the present invention. Figure 1 The paper document tampering detection method described can be applied to a paper document tampering detection device, wherein the paper document tampering detection device may include an intelligent device for collecting paper document images and performing tampering detection on the collected images. The intelligent device may include any one of an intelligent shooting device, an intelligent server or an intelligent platform. The intelligent shooting device includes but is not limited to at least one of a smart phone (Android phone, iOS phone, etc.), a camera and a smart printing device, etc. The intelligent server includes a local server or a cloud server, which is not limited in the embodiments of the present invention. Figure 1 As shown, the paper document tampering detection method may include the following operations:
[0083] 101. Receive the file to be tested uploaded by the user, perform identity verification on the user, and obtain the identity verification result corresponding to the user.
[0084] In an embodiment of the present invention, optionally, a user can upload a file to be detected through a mobile phone, a camera, a smart printing device, etc. Specifically, the user can obtain a document image corresponding to the paper file by taking a photo or scanning a paper document. When the file to be detected uploaded by the user is received, the user is identified and verified to obtain an identity verification result corresponding to the user. The identity verification result corresponding to the user includes that the user meets the preset identity requirements, or that the user does not meet the preset identity requirements. The present invention does not make any limitation.
[0085] 102. When the identity authentication result indicates that the user meets the preset identity requirements, extract the to-be-detected file content of the to-be-detected file in pages, where the to-be-detected file content includes the to-be-detected file identifier and the to-be-detected text content.
[0086] In an embodiment of the present invention, optionally, when the identity authentication result indicates that the user meets the preset identity requirements, the file content to be detected is extracted in pages, and the file content to be detected may include a file identifier to be detected and text content to be detected, wherein the file identifier to be detected may include a unique identifier corresponding to the file to be detected, and may also include a page number identifier corresponding to each page of the file to be detected, and the text content to be detected may include one or more of text, tables, seals, signatures, dates, data, etc. corresponding to each page of the file to be detected, and the present invention is not limited thereto.
[0087] 103. Calculate the text content to be detected by using a preset target algorithm to obtain a set of hash values to be detected corresponding to the text content to be detected.
[0088] In an embodiment of the present invention, optionally, the preset target algorithm may include the national secret SM3 algorithm, wherein the SM3 algorithm is a hash algorithm designed by Chinese cryptographers, is one of the national secret algorithms, and is one of the candidate algorithms of the SHA-3 algorithm. The design goal of the SM3 algorithm is to provide a high-security and high-efficiency hash algorithm that is suitable for scenarios such as digital signatures, authentication, and data integrity verification; the set of hash values to be detected corresponding to the text content to be detected may include at least one hash value to be detected corresponding to the text content to be detected, wherein each hash value to be detected may correspond to a section of text content to be detected, such as a section of text, a table, a seal, etc., and may also correspond to a keyword in a section of text content to be detected, such as a key noun, a keyword, etc., which is not limited by the present invention.
[0089] 104. Filter the original file corresponding to the file to be detected in a preset file database according to the identifier of the file to be detected, and detect whether the file to be detected has been tampered with according to the original file and the set of hash values to be detected.
[0090] In an embodiment of the present invention, optionally, an original file is pre-encrypted and stored in a preset file database, the original file has the same file identifier as the file to be detected, the original file is a file stored in the file database at a first time, and the file to be detected is an original file at a second time, the first time is earlier than the second time, and filtering the original file corresponding to the file to be detected in the preset file database according to the identifier of the file to be detected may include filtering the original file corresponding to the file to be detected in the preset file database according to the identifier of the file to be detected and a preset public key, and decrypting the original file by the public key to obtain the original file, and detecting whether the file to be detected has been tampered with based on the original file and the set of hash values to be detected, which is not limited by the present invention.
[0091] It can be seen that implementation Figure 1The described paper document tampering detection method can receive a file to be detected uploaded by a user and perform identity recognition and verification on the user. When the identity recognition result indicates that the user meets the preset identity requirements, the file content to be detected is extracted in pages, the text content to be detected is calculated by a preset target algorithm to obtain a set of hash values to be detected corresponding to the text content to be detected, the original file corresponding to the file to be detected is screened in a preset file database according to the file identifier to be detected, and whether the file to be detected has been tampered with is detected based on the original file and the set of hash values to be detected, which can improve the accuracy and efficiency of tampering detection of paper documents, and the identity recognition of the user can realize tampering tracing when the file is tampered with, thereby improving the security and reliability of the file.
[0092] In an optional embodiment, performing identity verification on a user and obtaining an identity verification result corresponding to the user may include the following operations:
[0093] Collect the user's identity verification information, which includes the user's identity document information and biometric information;
[0094] Determine whether the user's identity document information matches the biometric information. When the user's identity document information matches the biometric information, determine the association between the user and the file to be detected in a preset file database;
[0095] When the association relationship indicates that the user does not have the processing authority for the file to be detected, it is determined that the user does not meet the preset identity requirements. When the association relationship indicates that the user has the processing authority for the file to be detected, it is determined that the user meets the preset identity requirements.
[0096] In this optional embodiment, optionally, the user's identity authentication information may include the user's identification document information and biometric information, wherein the user's identification document information may be collected by the user uploading a picture, the user's identification document information may include an identification card, work permit, etc., the user's biometric information may be collected by a biometric information collection device, and the user's biometric information may include one or more of the user's facial information, iris information, fingerprint information, etc., which is not limited in this embodiment.
[0097] In this optional embodiment, it is optional to determine whether the user's identity document information matches the biometric information. When the user's identity document information matches the biometric information, the association relationship between the user and the file to be detected is determined in a preset file database. The association relationship between the user and the file to be detected can be used to indicate the user's processing authority over the file to be detected and the original file corresponding to the file to be detected. When the association relationship indicates that the user does not have the processing authority over the file to be detected, it is determined that the user does not meet the preset identity requirements. When the association relationship indicates that the user has the processing authority over the file to be detected, it is determined that the user meets the preset identity requirements. This embodiment does not make any limitation.
[0098] It can be seen that the implementation of this optional embodiment can collect the user's identity authentication information, the identity authentication information includes the user's identification document information and biometric information, and determine whether the user's identification document information matches the biometric information. When the user's identification document information matches the biometric information, the association relationship between the user and the file to be detected is determined in a preset file database. When the association relationship indicates that the user does not have the authority to process the file to be detected, it is determined that the user does not meet the preset identity requirements. When the association relationship indicates that the user has the authority to process the file to be detected, it is determined that the user meets the preset identity requirements. The user can be authenticated based on the document information and biometric information, thereby improving the accuracy of identity authentication, and determining the user's authority to process the file to be detected, thereby improving the security of the file, and realizing tampering traceability when the file is tampered with, thereby improving the security and reliability of the file.
[0099] Embodiment 2
[0100] See also Figure 2 , Figure 2 : is a flow chart of a paper document tampering detection method disclosed in an embodiment of the present invention. Figure 2 The paper document tampering detection method described can be applied to a paper document tampering detection device, wherein the paper document tampering detection device may include an intelligent device for collecting paper document images and performing tampering detection on the collected images. The intelligent device may include any one of an intelligent shooting device, an intelligent server or an intelligent platform. The intelligent shooting device includes but is not limited to at least one of a smart phone (Android phone, iOS phone, etc.), a camera and a smart printing device, etc. The intelligent server includes a local server or a cloud server, which is not limited in the embodiments of the present invention. Figure 2 As shown, the paper document tampering detection method may include the following operations:
[0101] 201. Receive a file to be detected uploaded by a user, perform identity verification on the user, and obtain an identity verification result corresponding to the user.
[0102] 202. When the identity authentication result indicates that the user meets the preset identity requirement, extract the to-be-detected file content of the to-be-detected file in pages, where the to-be-detected file content includes the to-be-detected file identifier and the to-be-detected text content.
[0103] 203. Calculate the text content to be detected by using a preset target algorithm to obtain a set of hash values to be detected corresponding to the text content to be detected.
[0104] 204. Extract the file image of the original file corresponding to the file to be detected, and perform image enhancement processing on the file image to obtain a target image.
[0105] In the embodiment of the present invention, optionally, the file image of the original file corresponding to the file to be detected can be extracted by a mobile phone, a camera, and an intelligent printing device. Specifically, the user can extract the file image of the original file corresponding to the file to be detected by taking a photo or scanning a paper file. The file image may include the image corresponding to each page of the original file. The file image can be enhanced by artificial intelligence CNN, GAN, and deep learning technologies to obtain the target image. Among them, the convolutional neural network (CNN) is an artificial neural network model that has been widely used in the field of image processing in recent years. The CNN model performs operations such as feature extraction and image classification on the image through a combination of multiple convolutional layers, pooling layers, and fully connected layers, and mines the intrinsic features inside the image. In the field of image enhancement, the use of the CNN model can effectively process complex image scenes and enhance image details, contrast, and other features; the generative adversarial network (GAN) is an artificial intelligence technology for image enhancement and synthesis. The GAN technology uses one network as a generator and the other network as a discriminator, and achieves the purpose of image enhancement through the adversarial learning of the two networks.
[0106] 205. Extract the original file content corresponding to the target image in pages, where the original file content includes the original file identifier and original text content corresponding to the original file.
[0107] In an embodiment of the present invention, optionally, intelligent OCR recognition can be performed on each page of the target image to extract the original file content corresponding to the target image. The original file content may include the original file identifier and original text content corresponding to the original file, which is not limited in this embodiment.
[0108] 206. Calculate the original text content using a preset target algorithm to obtain an original hash value set corresponding to the original text content, and encrypt and store the original file content and the original hash value set in a preset file database.
[0109] In an embodiment of the present invention, optionally, the preset target algorithm may include the national encryption SM3 algorithm, the original hash value set may include at least one original hash value corresponding to the original text content, and the original file content and the original hash value set are encrypted and stored in a preset file database.
[0110] 207 . Filter the original file corresponding to the file to be detected in a preset file database according to the identifier of the file to be detected, and detect whether the file to be detected has been tampered with according to the original file and the set of hash values to be detected.
[0111] In the embodiment of the present invention, for other descriptions of step 201 to step 203 and step 207, please refer to the detailed description of step 101 to step 104 in the first embodiment, and the embodiment of the present invention will not be repeated here.
[0112] It can be seen that implementation Figure 2 The paper document tampering detection method described can receive a to-be-detected file uploaded by a user and perform identity recognition and verification on the user. When the identity recognition result indicates that the user meets the preset identity requirements, the to-be-detected file content of the to-be-detected file is extracted in pages, the to-be-detected text content is calculated by a preset target algorithm to obtain a to-be-detected hash value set corresponding to the to-be-detected text content, the file image of the original file corresponding to the to-be-detected file is extracted, and the file image is enhanced to obtain a target image, the original file content corresponding to the target image is extracted in pages, the original text content is calculated by a preset target algorithm to obtain an original hash value set corresponding to the original text content, the original file content and the original hash value set are encrypted and stored in a preset file database, the original file can be identified and saved in advance, the accuracy and efficiency of subsequent file tampering detection are improved, the original file corresponding to the to-be-detected file is screened in the preset file database according to the to-be-detected file identifier, and whether the to-be-detected file is tampered with is detected according to the original file and the to-be-detected hash value set, the accuracy and efficiency of the tampering detection of the paper document can be improved, and the identity of the user is performed, and the tampering traceability can be realized when the file is tampered with, thereby improving the security and reliability of the file.
[0113] In an optional embodiment, based on the original file and the set of hash values to be detected, detecting whether the file to be detected has been tampered with may include the following operations:
[0114] For each hash value to be detected in the set of hash values to be detected, determining an original hash value corresponding to the hash value to be detected in the set of original hash values corresponding to the original file;
[0115] For each hash value to be detected, detect whether the hash value to be detected matches the original hash value. When the hash value to be detected matches the original hash value, determine that the text content to be detected corresponding to the hash value to be detected has not been tampered with. When the hash value to be detected does not match the original hash value, determine that the text content to be detected corresponding to the hash value to be detected has been tampered with.
[0116] In this optional embodiment, optionally, the set of hash values to be detected corresponds to the set of original hash values. Specifically, each hash value to be detected in the set of hash values to be detected corresponds one-to-one to the original hash value in the set of initial hash values. The original hash value corresponding to the hash value to be detected can be determined from the set of original hash values corresponding to the original file, and it is detected whether the hash value to be detected matches the original hash value. When the hash value to be detected matches the original hash value, it is determined that the text content to be detected corresponding to the hash value to be detected has not been tampered with. When the hash value to be detected does not match the original hash value, it is determined that the text content to be detected corresponding to the hash value to be detected has been tampered with.
[0117] It can be seen that the implementation of this optional embodiment can determine the original hash value corresponding to the hash value to be detected in the original hash value set corresponding to the original file, detect whether the hash value to be detected matches the original hash value, and when the hash value to be detected matches the original hash value, determine that the text content to be detected corresponding to the hash value to be detected has not been tampered with; when the hash value to be detected does not match the original hash value, determine that the text content to be detected corresponding to the hash value to be detected has been tampered with, and judge whether the file has been tampered with by matching the hash values, thereby improving the judgment efficiency and accuracy.
[0118] In another optional embodiment, the set of hash values to be detected further includes a position code corresponding to each hash value to be detected;
[0119] The paper document tampering detection method may further include the following operations:
[0120] For each hash value to be detected, when the hash value to be detected does not match the original hash value, a private key is generated according to the original hash value, and the original file is decrypted according to the private key and the position code to obtain the original text content corresponding to the original hash value in the original file;
[0121] For each hash value to be detected, the text content to be detected corresponding to the hash value to be detected is compared with the original text content corresponding to the original hash value to obtain the text content difference between the text content to be detected and the original text content, and the text content difference is marked in the file to be detected.
[0122] In this optional embodiment, optionally, the set of hash values to be detected may also include a position code corresponding to each hash value to be detected, and the position code may be used to indicate the page number of the text content to be detected corresponding to the hash value to be detected in the file to be detected and the specific coordinates in the page, such as the number of rows and columns. For each hash value to be detected, when the hash value to be detected does not match the original hash value, a private key may be generated based on the original hash value, and the original file may be decrypted based on the private key and the position code. Specifically, a private key may be generated based on the original hash value based on the national secret SM2 algorithm. The SM2 algorithm is an asymmetric encryption algorithm independently designed by Chinese cryptographers. It is a national commercial encryption algorithm with the characteristics of high efficiency, security, openness and transparency. The SM2 algorithm is a public key cryptographic algorithm based on the elliptic curve cryptography system, which is used in scenarios such as digital signatures, key negotiation and encryption, and is not limited in this embodiment.
[0123] In this optional embodiment, optionally, for each hash value to be detected, the text content to be detected corresponding to the hash value to be detected is compared with the original text content corresponding to the original hash value to obtain the text content difference between the text content to be detected and the original text content, and the text content difference may include one or more of text content missing difference, text content added difference and text content replaced difference, etc., and the text content difference is marked in the file to be detected according to the text content difference. Specifically, the marking method may include one or more of text marking, symbol marking, color marking, etc., which is not limited in this embodiment.
[0124] It can be seen that the implementation of this optional embodiment can generate a private key according to the original hash value for each hash value to be detected when the hash value to be detected does not match the original hash value, and decrypt the original file according to the private key and the position code to obtain the original text content corresponding to the original hash value in the original file. For each hash value to be detected, the text content to be detected corresponding to the hash value to be detected is compared with the original text content corresponding to the original hash value to obtain the text content difference between the text content to be detected and the original text content, and the text content difference is marked in the file to be detected according to the text content difference. When it is determined that the file hash values do not match, the file content difference can be determined by comparing the file content corresponding to the mismatching hash values, thereby reducing the comparison workload, improving the efficiency of determining the file content difference, and improving the accuracy of determining the file content difference.
[0125] In yet another optional embodiment, the paper document tampering detection method may further include the following operations:
[0126] For each text content difference, collect the user's modification certification information for the text content difference, where the modification certification information includes at least one of certification text, certification number, and certification seal;
[0127] For each text content difference, when the user's modification proof information for the text content difference is collected, the modification proof information is analyzed to determine whether the modification proof information can prove that the text content difference meets the preset modification legality conditions;
[0128] For each text content difference, when the modification proof information can prove that the text content difference meets the preset modification legality condition, the to-be-detected text content corresponding to the text content difference is updated into the file database;
[0129] For each text content difference, when the user's modification proof information for the text content difference is not collected, or when the modification proof information cannot prove that the text content difference meets the preset modification legitimacy conditions, the operation of marking in the file to be detected according to the text content difference is triggered.
[0130] In this optional embodiment, optionally, the user's modification proof information for the text content difference may include at least one of proof text, proof numbers and proof seals. The modification proof information can be used to prove the legality of the user's file modification operation corresponding to the text content difference. For each text content difference, when the user's modification proof information for the text content difference is collected, the modification proof information is analyzed to determine whether the modification proof information can prove that the text content difference meets the preset modification legality conditions. For example, when the text content difference is a modification of the amount in the contract, the user needs to upload proof documents regarding the modification of the amount, such as a supplementary contract regarding the modification of the amount, etc., to prove the legality of the modification of the amount, which is not limited in this embodiment.
[0131] In this optional embodiment, optionally, for each text content difference, when the modification proof information can prove that the text content difference satisfies the preset modification legitimacy conditions, the text content to be detected corresponding to the text content difference is updated to the file database, that is, the text content to be detected corresponding to the text content difference replaces the original text content stored in the file database; for each text content difference, when the user's modification proof information for the text content difference is not collected, or when the modification proof information cannot prove that the text content difference satisfies the preset modification legitimacy conditions, it is determined that the text content difference is an illegal modification, that is, the file to be detected has been tampered with, and then the operation of marking in the file to be detected according to the text content difference is triggered, which is not limited in this embodiment.
[0132] It can be seen that the implementation of this optional embodiment can collect the user's modification proof information for each text content difference. For each text content difference, when the user's modification proof information for the text content difference is collected, the modification proof information is analyzed to determine whether the modification proof information can prove that the text content difference meets the preset modification legitimacy condition. For each text content difference, when the modification proof information can prove that the text content difference meets the preset modification legitimacy condition, the text content to be detected corresponding to the text content difference is updated to the file database. For each text content difference, when the user's modification proof information for the text content difference is not collected, or when the modification proof information cannot prove that the text content difference meets the preset modification legitimacy condition, the operation of marking in the file to be detected according to the text content difference is triggered. When the user makes a legal modification to the file, the modified content can be updated to the database. When the modification is illegal, it is determined that the file content has been tampered with, and the tampered part is marked, thereby improving the flexibility and accuracy of file tampering detection and improving user experience.
[0133] In yet another optional embodiment, the paper document tampering detection method may further include the following operations:
[0134] For each text content difference, analyzing the text tampering type in the to-be-detected file according to the text content difference, the text tampering type including at least one of a text addition type, a text modification type, and a text deletion type;
[0135] For each text content difference, determining the tampering influence coefficient of the text content to be detected in the file to be detected relative to the original text content corresponding to the original hash value according to the text content difference and the text tampering type;
[0136] According to the tampering impact coefficient of each text content difference, the file tampering impact level corresponding to the file to be detected is determined, and the relevant personnel corresponding to the file tampering impact level are reminded of the file tampering.
[0137] In this optional embodiment, optionally, the text tampering type may include at least one of a text addition type, a text modification type and a text deletion type, wherein the text addition type may indicate that one or more new texts, tables, seals, signatures, dates, data, etc. are added to the file to be detected, the text modification type may include that one or more of the texts, tables, seals, signatures, dates, data, etc. in the file to be detected are modified or replaced, and the text deletion type may include that one or more of the texts, tables, seals, signatures, dates, data, etc. in the file to be detected are deleted, and this embodiment does not limit this.
[0138] In this optional embodiment, optionally, for each text content difference, based on the text content difference and the text tampering type, the tampering impact coefficient of the text content to be detected in the file to be detected relative to the original text content corresponding to the original hash value is determined, that is, the tampering impact coefficient of the difference in content meaning between the tampered text content in the file to be detected and the original text content in the original file is determined. For example, compared with the original file, some stains appear in the blank parts of the file to be detected, and the tampering impact coefficient is low at this time. Compared with the original file, the data "1100" in the file to be detected is changed to "11000", and the tampering impact coefficient is high at this time. According to the tampering impact coefficient of each text content difference, the file tampering impact level corresponding to the file to be detected is determined. The file tampering impact level can be user-defined, such as low level, medium level and high level, or level one, level two and level three, and each level can correspond to relevant personnel. The more serious the level, the higher the level or processing authority of the relevant personnel. The relevant personnel corresponding to the file tampering impact level are reminded of the file tampering, and the relevant personnel perform the next step of processing. This embodiment is not limited.
[0139] It can be seen that the implementation of this optional embodiment can analyze the type of text tampering in the file to be detected for each text content difference according to the text content difference, and for each text content difference, determine the tampering impact coefficient of the text content to be detected in the file to be detected relative to the original text content corresponding to the original hash value according to the text content difference and the text tampering type, determine the file tampering impact level corresponding to the file to be detected according to the tampering impact coefficient of each text content difference, and remind relevant personnel corresponding to the file tampering impact level of the file tampering, which can determine the impact coefficient of the tampered part, and then determine the tampering impact level of the entire file, and notify relevant personnel to perform graded processing on the tampered files, thereby improving the accuracy and efficiency of processing after determining that the file has been tampered with.
[0140] Embodiment 3
[0141] See also Figure 3 , Figure 3 : is a schematic diagram of the structure of a paper document tampering detection device disclosed in an embodiment of the present invention. Figure 3 The described paper document tampering detection device may include an intelligent device for collecting paper document images and performing tampering detection on the collected images. The intelligent device may include any one of an intelligent shooting device, an intelligent server or an intelligent platform. The intelligent shooting device includes but is not limited to at least one of a smart phone (Android phone, iOS phone, etc.), a camera and a smart printing device, etc. The intelligent server includes a local server or a cloud server, which is not limited in the embodiments of the present invention.
[0142] like Figure 3As shown, the paper document tampering detection device may include:
[0143] The receiving module 301 is used to receive the file to be detected uploaded by the user, and perform identity verification on the user to obtain the identity verification result corresponding to the user;
[0144] An extraction module 302 is used to extract the to-be-detected file content of the to-be-detected file in pages when the identity verification result indicates that the user meets the preset identity requirements, wherein the to-be-detected file content includes the to-be-detected file identifier and the to-be-detected text content;
[0145] The calculation module 303 is used to calculate the text content to be detected by using a preset target algorithm to obtain a set of hash values to be detected corresponding to the text content to be detected, wherein the set of hash values to be detected includes at least one hash value to be detected corresponding to the text content to be detected;
[0146] The screening module 304 is used to screen the original file corresponding to the file to be detected in the preset file database according to the file identifier to be detected, and detect whether the file to be detected has been tampered with according to the original file and the set of hash values to be detected.
[0147] It can be seen that implementation Figure 3 The described paper document tampering detection device can receive a file to be detected uploaded by a user and perform identity verification on the user. When the identity verification result indicates that the user meets the preset identity requirements, the file content to be detected is extracted in pages, the text content to be detected is calculated by a preset target algorithm to obtain a set of hash values to be detected corresponding to the text content to be detected, and the original file corresponding to the file to be detected is screened in a preset file database according to the file identifier to be detected, and based on the original file and the set of hash values to be detected, it is detected whether the file to be detected has been tampered with. The accuracy and efficiency of tampering detection of paper documents can be improved, and identity verification of the user can be performed, so that tampering traceability can be achieved when the file is tampered with, thereby improving the security and reliability of the file.
[0148] In an optional embodiment, if Figure 4 As shown, the extraction module 302 is also used to extract the file image of the original file corresponding to the file to be detected, and perform image enhancement processing on the file image to obtain a target image;
[0149] The extraction module 302 is further used to extract the original file content corresponding to the target image in pages, where the original file content includes the original file identifier and original text content corresponding to the original file;
[0150] The calculation module 303 is further used to calculate the original text content through a preset target algorithm to obtain an original hash value set corresponding to the original text content;
[0151] The paper document tampering detection device may further include:
[0152] The storage module 305 is used to encrypt and store the original file content and the original hash value set in a preset file database.
[0153] It can be seen that implementation Figure 4 The paper document tampering detection device described can receive a file to be detected uploaded by a user and perform identity recognition and verification on the user. When the identity recognition result indicates that the user meets the preset identity requirements, the file content to be detected of the file to be detected is extracted in pages, the text content to be detected is calculated by a preset target algorithm to obtain a set of hash values to be detected corresponding to the text content to be detected, the file image of the original file corresponding to the file to be detected is extracted, and the file image is enhanced to obtain a target image, the original file content corresponding to the target image is extracted in pages, the original text content is calculated by a preset target algorithm to obtain an original hash value set corresponding to the original text content, the original file content and the original hash value set are encrypted and stored in a preset file database, the original file can be identified and saved in advance, the accuracy and efficiency of subsequent file tampering detection are improved, the original file corresponding to the file to be detected is screened in the preset file database according to the file identifier to be detected, and whether the file to be detected is tampered with is detected according to the original file and the set of hash values to be detected, which can improve the accuracy and efficiency of tampering detection of paper documents, and the user is authenticated, and tampering tracing can be achieved when the file is tampered with, thereby improving the security and reliability of the file.
[0154] In another optional embodiment, Figure 4 As shown, the specific method in which the screening module 304 detects whether the file to be detected has been tampered with according to the original file and the set of hash values to be detected includes:
[0155] For each hash value to be detected in the set of hash values to be detected, determining an original hash value corresponding to the hash value to be detected in the set of original hash values corresponding to the original file;
[0156] For each hash value to be detected, detect whether the hash value to be detected matches the original hash value. When the hash value to be detected matches the original hash value, determine that the text content to be detected corresponding to the hash value to be detected has not been tampered with. When the hash value to be detected does not match the original hash value, determine that the text content to be detected corresponding to the hash value to be detected has been tampered with.
[0157] It can be seen that implementation Figure 4The described paper document tampering detection device can determine the original hash value corresponding to the hash value to be detected in the original hash value set corresponding to the original file, and detect whether the hash value to be detected matches the original hash value. When the hash value to be detected matches the original hash value, it is determined that the text content to be detected corresponding to the hash value to be detected has not been tampered with. When the hash value to be detected does not match the original hash value, it is determined that the text content to be detected corresponding to the hash value to be detected has been tampered with. Whether the file has been tampered with is judged by matching the hash values, thereby improving the judgment efficiency and accuracy.
[0158] In yet another optional embodiment, Figure 4 As shown, the set of hash values to be detected also includes a position code corresponding to each hash value to be detected;
[0159] The paper document tampering detection device may further include:
[0160] A generating module 306, for each hash value to be detected, when the hash value to be detected does not match the original hash value, generates a private key according to the original hash value, and decrypts the original file according to the private key and the position code to obtain the original text content in the original file corresponding to the original hash value;
[0161] The comparison module 307 is used to compare the text content to be detected corresponding to each hash value to be detected with the original text content corresponding to the original hash value, obtain the text content difference between the text content to be detected and the original text content, and mark it in the file to be detected according to the text content difference.
[0162] It can be seen that implementation Figure 4 The described paper document tampering detection device can, for each hash value to be detected, generate a private key according to the original hash value when the hash value to be detected does not match the original hash value, and decrypt the original file according to the private key and the position code to obtain the original text content corresponding to the original hash value in the original file. For each hash value to be detected, the text content to be detected corresponding to the hash value to be detected is compared with the original text content corresponding to the original hash value to obtain the text content difference between the text content to be detected and the original text content, and mark the text content difference in the file to be detected according to the text content difference. When it is determined that the file hash value does not match, the file content difference can be determined by comparing the file content corresponding to the mismatching hash value, thereby reducing the comparison workload, improving the efficiency of determining the file content difference, and improving the accuracy of determining the file content difference.
[0163] In yet another optional embodiment, Figure 4As shown, the receiving module 301 performs identity verification on the user, and the specific method of obtaining the identity verification result corresponding to the user includes:
[0164] Collect the user's identity verification information, which includes the user's identity document information and biometric information;
[0165] Determine whether the user's identity document information matches the biometric information. When the user's identity document information matches the biometric information, determine the association between the user and the file to be detected in a preset file database;
[0166] When the association relationship indicates that the user does not have the processing authority for the file to be detected, it is determined that the user does not meet the preset identity requirements. When the association relationship indicates that the user has the processing authority for the file to be detected, it is determined that the user meets the preset identity requirements.
[0167] It can be seen that implementation Figure 4 The described paper document tampering detection device can collect the user's identity authentication information, the identity authentication information includes the user's identification document information and biometric information, and judge whether the user's identification document information matches the biometric information. When the user's identification document information matches the biometric information, the association relationship between the user and the file to be detected is determined in a preset file database. When the association relationship indicates that the user does not have the processing authority to the file to be detected, it is determined that the user does not meet the preset identity requirements. When the association relationship indicates that the user has the processing authority to the file to be detected, it is determined that the user meets the preset identity requirements. The user can be authenticated based on the document information and biometric information, thereby improving the accuracy of identity authentication, and judging the user's processing authority to the file to be detected, thereby improving the security of the file. When the file is tampered with, tampering traceability can be achieved, thereby improving the security and reliability of the file.
[0168] In yet another optional embodiment, Figure 4 As shown, the paper document tampering detection device may also include:
[0169] A collection module 308 is used to collect, for each text content difference, modification certification information of the user for the text content difference, where the modification certification information includes at least one of certification text, certification number and certification seal;
[0170] The first analysis module 309 is used for analyzing the modification proof information of each text content difference when the modification proof information of the user for the text content difference is collected, and determining whether the modification proof information can prove that the text content difference meets the preset modification legality condition;
[0171] The updating module 310 is used to update the text content to be detected corresponding to each text content difference into the file database when the modification proof information can prove that the text content difference meets the preset modification legitimacy conditions for each text content difference; for each text content difference, when the user's modification proof information for the text content difference is not collected, or when the modification proof information cannot prove that the text content difference meets the preset modification legitimacy conditions, trigger the comparison module 307 to perform the operation of marking in the file to be detected according to the text content difference.
[0172] It can be seen that implementation Figure 4 The described paper document tampering detection device can collect the user's modification proof information for each text content difference. For each text content difference, when the user's modification proof information for the text content difference is collected, the modification proof information is analyzed to determine whether the modification proof information can prove that the text content difference meets the preset modification legality condition. For each text content difference, when the modification proof information can prove that the text content difference meets the preset modification legality condition, the text content to be detected corresponding to the text content difference is updated to the file database. For each text content difference, when the user's modification proof information for the text content difference is not collected, or when the modification proof information cannot prove that the text content difference meets the preset modification legality condition, the operation of marking in the file to be detected according to the text content difference is triggered. When the user makes a legal modification to the file, the modified content can be updated to the database. When the modification is illegal, it is determined that the file content has been tampered with and the tampered part is marked, thereby improving the flexibility and accuracy of file tampering detection and improving user experience.
[0173] In yet another optional embodiment, Figure 4 As shown, the paper document tampering detection device may also include:
[0174] The second analysis module 311 is used to analyze the text tampering type in the to-be-detected file according to each text content difference, where the text tampering type includes at least one of a text addition type, a text modification type, and a text deletion type;
[0175] A determination module 312 is used to determine, for each text content difference, a tampering influence coefficient of the text content to be detected in the file to be detected relative to the original text content corresponding to the original hash value according to the text content difference and the text tampering type;
[0176] The determination module 312 is further used to determine the file tampering impact level corresponding to the to-be-detected file according to the tampering impact coefficient of each text content difference, and to remind relevant personnel corresponding to the file tampering impact level of the file tampering.
[0177] It can be seen that implementation Figure 4 The described paper document tampering detection device can analyze the type of text tampering in the file to be detected according to each text content difference, and for each text content difference, determine the tampering impact coefficient of the text content to be detected in the file to be detected relative to the original text content corresponding to the original hash value according to the text content difference and the text tampering type, determine the file tampering impact level corresponding to the file to be detected according to the tampering impact coefficient of each text content difference, and remind relevant personnel corresponding to the file tampering impact level of the file tampering, and can determine the impact coefficient of the tampered part, and then determine the tampering impact level of the entire file, and notify relevant personnel to perform graded processing on the tampered files, so as to improve the processing accuracy and efficiency after determining that the file has been tampered.
[0178] Embodiment 4
[0179] See also Figure 5 , Figure 5 FIG. 1 is a schematic diagram of the structure of another paper document tampering detection device disclosed in an embodiment of the present invention. Figure 5 As shown, the paper document tampering detection device may include:
[0180] A memory 401 storing executable program codes;
[0181] a processor 402 coupled to the memory 401;
[0182] The processor 402 calls the executable program code stored in the memory 401 to execute the steps of the paper document tampering detection method described in the first embodiment of the present invention or the second embodiment of the present invention.
[0183] Embodiment 5
[0184] An embodiment of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute the steps of the paper document tampering detection method described in the first embodiment of the present invention or the second embodiment of the present invention.
[0185] Embodiment 6
[0186] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute the steps in the paper document tampering detection method described in Embodiment 1 or Embodiment 2.
[0187] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
[0188] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0189] Finally, it should be noted that the method and device for detecting tampering of a paper document disclosed in the embodiments of the present invention disclose only the preferred embodiments of the present invention, and are only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting tampering of paper documents, characterized in that: The method comprises: Receive the file to be detected uploaded by the user, and perform identity verification on the user to obtain the identity verification result corresponding to the user; When the identity verification result indicates that the user meets the preset identity requirements, extracting the to-be-detected file content of the to-be-detected file in pages, wherein the to-be-detected file content includes the to-be-detected file identifier and the to-be-detected text content; Calculating the text content to be detected by a preset target algorithm to obtain a set of hash values to be detected corresponding to the text content to be detected, wherein the set of hash values to be detected includes at least one hash value to be detected corresponding to the text content to be detected; The original file corresponding to the file to be detected is screened in a preset file database according to the file identifier to be detected, and whether the file to be detected has been tampered with is detected according to the original file and the set of hash values to be detected.
2. The paper document tampering detection method according to claim 1, characterized in that: The method further comprises: Extracting a file image of an original file corresponding to the file to be detected, and performing image enhancement processing on the file image to obtain a target image; Extracting the original file content corresponding to the target image in pages, wherein the original file content includes the original file identifier and original text content corresponding to the original file; Calculating the original text content by using a preset target algorithm to obtain an original hash value set corresponding to the original text content; The original file content and the original hash value set are encrypted and stored in a preset file database.
3. The paper document tampering detection method according to claim 2, characterized in that: The detecting, according to the original file and the set of hash values to be detected, whether the file to be detected has been tampered with comprises: For each of the hash values to be detected in the set of hash values to be detected, determining an original hash value corresponding to the hash value to be detected in the set of original hash values corresponding to the original file; For each of the hash values to be detected, detect whether the hash value to be detected matches the original hash value. When the hash value to be detected matches the original hash value, determine that the text content to be detected corresponding to the hash value to be detected has not been tampered with. When the hash value to be detected does not match the original hash value, determine that the text content to be detected corresponding to the hash value to be detected has been tampered with.
4. The paper document tampering detection method according to claim 3, characterized in that: The set of hash values to be detected further includes a position code corresponding to each of the hash values to be detected; The method further comprises: For each of the hash values to be detected, when the hash value to be detected does not match the original hash value, a private key is generated according to the original hash value, and the original file is decrypted according to the private key and the position code to obtain the original text content in the original file corresponding to the original hash value; For each of the hash values to be detected, the text content to be detected corresponding to the hash value to be detected is compared with the original text content corresponding to the original hash value to obtain the text content difference between the text content to be detected and the original text content, and the text content difference is marked in the file to be detected according to the text content difference.
5. The paper document tampering detection method according to any one of claims 1 to 4, characterized in that: The performing identity verification on the user to obtain an identity verification result corresponding to the user includes: Collecting identity verification information of the user, the identity verification information including identity document information and biometric information of the user; Determine whether the identity document information of the user matches the biometric information, and when the identity document information of the user matches the biometric information, determine the association relationship between the user and the to-be-detected file in a preset file database; When the association relationship indicates that the user does not have the processing authority for the file to be detected, it is determined that the user does not meet the preset identity requirements; when the association relationship indicates that the user has the processing authority for the file to be detected, it is determined that the user meets the preset identity requirements.
6. The paper document tampering detection method according to claim 4, characterized in that: The method further comprises: For each of the text content differences, collect the modification certification information of the user for the text content difference, wherein the modification certification information includes at least one of certification text, certification numbers and certification seals; For each of the text content differences, when the modification proof information of the user for the text content difference is collected, the modification proof information is analyzed to determine whether the modification proof information can prove that the text content difference meets the preset modification legitimacy condition; For each of the text content differences, when the modification proof information can prove that the text content difference meets the preset modification legality condition, the to-be-detected text content corresponding to the text content difference is updated into the file database; For each of the text content differences, when the user's modification proof information for the text content difference is not collected, or when the modification proof information cannot prove that the text content difference meets the preset modification legitimacy conditions, the operation of marking the file to be detected based on the text content difference is triggered.
7. The paper document tampering detection method according to claim 4 or 6, characterized in that: The method further comprises: For each of the text content differences, analyzing the text tampering type in the to-be-detected file according to the text content difference, the text tampering type including at least one of a text addition type, a text modification type, and a text deletion type; For each of the text content differences, determining a tampering influence coefficient of the text content to be detected in the file to be detected relative to the original text content corresponding to the original hash value according to the text content difference and the text tampering type; According to the tampering impact coefficient of each text content difference, the file tampering impact level corresponding to the to-be-detected file is determined, and the file tampering reminder is given to relevant personnel corresponding to the file tampering impact level.
8. A paper document tampering detection device, characterized in that: The device comprises: The receiving module is used to receive the file to be detected uploaded by the user, and perform identity verification on the user to obtain the identity verification result corresponding to the user; An extraction module, configured to extract the to-be-detected file content of the to-be-detected file in pages when the identity authentication result indicates that the user meets the preset identity requirements, wherein the to-be-detected file content includes the to-be-detected file identifier and the to-be-detected text content; A calculation module, used to calculate the text content to be detected by a preset target algorithm to obtain a set of hash values to be detected corresponding to the text content to be detected, wherein the set of hash values to be detected includes at least one hash value to be detected corresponding to the text content to be detected; The screening module is used to screen the original file corresponding to the file to be detected in a preset file database according to the file identifier to be detected, and detect whether the file to be detected has been tampered with according to the original file and the set of hash values to be detected.
9. A paper document tampering detection device, characterized in that: The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the paper document tampering detection method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the paper document tampering detection method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Anti-counterfeiting method for cloud monitoring image
CN112887757A
Cross-platform official document anti-counterfeiting printing management system used in local area network
CN113157223A
Contract management system and method for supply chain
CN115640591A
Paging-oriented block chain authentication method and system
CN117768092A
Authorising digital data from text and images
DE4344280A1