Method for manufacturing and verifying anti-counterfeiting paper file
Through image processing and digital signature technology, the problem of easy forgery of paper documents is solved, low-cost and efficient anti-counterfeiting verification of paper documents is achieved, and important certificates such as admission notices and other admissions in the field of education are suitable.
Patent Information
- Application Number
- CN202510319986.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-07-08
AI Technical Summary
The anti-counterfeiting methods of existing paper documents are easily imitated and forged, especially in the field of education, the authenticity of important certificates such as admission notices are difficult to verify. Traditional anti-counterfeiting costs are high and the reliability is insufficient.
Image processing and digital signature technology are used to obtain images with information, convert pixel color and encode them, combine SM2 signatures to create anti-counterfeiting paper files, and verify their authenticity through image positioning and digital signatures.
It realizes that the authenticity of paper documents can be verified by taking photos without an Internet connection. The anti-counterfeiting cost is low and difficult to forge, improving the security and anti-cracking capabilities of paper documents.
Smart Images

Figure CN120278868A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of anti-counterfeiting of paper documents, and particularly relates to a method for manufacturing and verifying an anti-counterfeiting paper document. Background Art
[0002] Paper documents are irreplaceable in many key fields. For example, they have higher authority in legal and formal occasions, especially for documents with strong legal effects such as contracts and certificates. The physical form of paper documents can provide a more intuitive sense of trust and certainty. In addition, the long-term preservation reliability of paper documents, the convenience under the condition of no electronic devices, and the cultural and psychological sense of trust make them of important value in aspects such as file management and historical record preservation.
[0003] Forging paper documents is a common problem. Since the process of forging documents is simple and the cost is low, many people take advantage of this loophole to seek huge benefits. For example, some people may forge academic certificates in order to obtain better jobs; they may forge test certificates in order to reduce costs. At present, the anti-counterfeiting of most paper documents still relies on signatures or seals, but both of these methods are easily imitated and forged. Traditional anti-counterfeiting means for paper documents, such as watermarks, ultraviolet fluorescence, intaglio printing, etc., have relatively high anti-counterfeiting costs, and with the continuous upgrading of forging means, their reliability faces challenges.
[0004] The anti-counterfeiting problem of paper documents is becoming increasingly prominent, especially in the education field. As an important voucher for students to receive higher education, the authenticity of admission notices is directly related to the rights and interests of students and the fairness of education. The present invention draws on the usage scenario of admission notices and provides a method for anti-counterfeiting paper documents by introducing advanced image processing, digital signature and other technologies. The verification process of this method does not rely on any database and does not require an Internet connection. Verification can be achieved by taking pictures, with relatively low anti-counterfeiting costs and being not easily forged. Summary of the Invention
[0005] In order to solve the above technical problems, the present invention provides a method for manufacturing and verifying an anti-counterfeiting paper document, which can enhance the security of paper documents.
[0006] To achieve the above invention purpose, the technical solution of the present invention includes the following content.
[0007] A method for manufacturing an anti-counterfeiting paper document:
[0008] Obtain a first image with information, wherein the pixel colors of the information part are different from those of the remaining part;
[0009] Process the pixels of the remaining part to obtain a second image; the processing includes converting the pixel colors of the remaining part into two or more non-information part colors according to a set rule;
[0010] Encode the second image, read the data of the set rows therein and perform digital signature;
[0011] Draw the signed result on the second image to obtain a third image;
[0012] Expand each pixel of the same value of the third image into a square and then print it to obtain a made anti-counterfeiting paper document.
[0013] Furthermore, obtain a first image with information. The resolution of the first image is (x, y), where x and y are integers, that is, the number of row pixels and the number of column pixels. The information part of the first image, that is, the text, pattern, seal, etc., has only a limited number of color brightness values.
[0014] Furthermore, the rules of the processing are as follows:
[0015] 1) Add the content of the personalized accessory information to be added to the first image and keep only a limited number of color brightness values;
[0016] 2) Perform pixel color conversion on the pixels of the remaining part. When the sum of the abscissa and ordinate of any pixel is even, set the pixel to color 1 of the non-information part; otherwise, set it to color 2 of the non-information part.
[0017] Furthermore, use SM2 signature for the digital signature. Use the private key corresponding to the digital certificate to perform digital signature on the data of the first (x - n) rows in the second image to obtain a signature value. The signature value is scribed in segments on the (x - n + 1)-th row and subsequent rows of the second image to obtain a third image.
[0018] A verification method for the above anti-counterfeiting paper document:
[0019] Perform image positioning by using the color and shape features of each square of the document to be verified;
[0020] Extract the information content and signature value of the document to be verified;
[0021] Perform signature verification by using a cryptographic algorithm based on the extracted content;
[0022] Obtain the verification information of the document through the verification result.
[0023] If the verification result is correct, it indicates that the paper document is genuine.
[0024] Furthermore, take a photo of the document to be verified with a mobile phone, and identify the color features of each square by recognizing each color square of the photographed document.
[0025] Further, grid points are determined through the color and shape features of each grid square for image positioning, and the grid pointsis the upper left vertex of each square grid.
[0026] Furthermore, perform SM2 signature verification on the said document and take multiple photos. As long as one photo passes the verification, it can be judged as genuine. After all multiple photos fail the verification, adopt the "majority voting" mechanism, that is, vote on all the square grids at the same positions of multiple photos to obtain the final information content and signature value, and perform digital signature verification. If the judgment passes, it can still be judged as genuine.
[0027] The present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to implement the steps of the above method.
[0028] The beneficial effects of the present invention are as follows:
[0029] Through the method of the present invention, anti-counterfeiting paper documents of any type can be made. When making and verifying images, complex operations are performed based on the pixels of the images, so that the anti-counterfeiting paper documents have the ability to prevent cracking. In this method, the anti-counterfeiting feature is at the image level rather than the paper document level, greatly improving the encryption and anti-cracking capabilities of the anti-counterfeiting documents. At the same time, the method of the present invention takes into account the actual situations encountered when verifying paper documents. For example, the paper document is not ideally flat. Therefore, when making the anti-counterfeiting image, preparations are made for image positioning during verification, making the method of the present invention highly practical. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 is a flowchart of a specific embodiment of the present invention.
[0031] Figure 2 is a flowchart of the first embodiment of the present invention.
[0032] Figure 3 is a schematic diagram of the first image in the first embodiment of the present invention.
[0033] Figure 4 is a schematic diagram of the second image in the first embodiment of the present invention.
[0034] Figure 5 is a schematic diagram of the anti-counterfeiting image in a specific embodiment of the present invention.
[0035] Figure 6 is a schematic diagram of the interface of the admission notice generator in the first embodiment of the present invention.
[0036] Figure 7 is a flowchart of the second embodiment of the present invention.
[0037] Figure 8 is a schematic diagram of the admission notice photo in the second embodiment of the present invention.
[0038] Figure 9 It is a schematic diagram of the positioning effect in the second embodiment of the present invention.
[0039] Figure 10 It is a schematic diagram of verifying the admission notice APP interface in the second embodiment of the present invention. Specific Embodiments
[0040] The following elaborates on the preferred embodiments of the present invention in conjunction with the accompanying drawings, so as to illustrate the advantages and features of the present invention The energy collection can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.
[0041] The specific embodiments of the present invention provide a method for manufacturing and verifying an anti-counterfeiting paper document. In the specific embodiments, taking the production of an admission notice with anti-counterfeiting function as an example. After manufacturing the anti-counterfeiting image of the admission notice, it is printed to obtain the admission notice with anti-counterfeiting function, and finally the admission notice is verified. The specific process is as Figure 1 shown.
[0042] The first embodiment of the present invention discloses a method for manufacturing the anti-counterfeiting image of the admission notice. The specific process is as Figure 2 shown. The admission notice is made with a first image having a resolution of 300 dpi. The admission notice includes two parts: a message area and a signature area. Users can use the upper message area, and the lower signature area is reserved for drawing signatures. The admission notice is initially white, that is, all pixels are (255, 255, 255).
[0043] The size of the first image is 750 pixels × 500 pixels. In the message area, elements such as the text and patterns on the admission notice are designed, and an electronic school seal is added, leaving blanks for the name, major, etc. The bottom 60 rows of pixels of the first image are all white pixels, serving as the signature area. The first image and the admitted student information form are read to obtain information such as the student's name and major, and the blanks for the name, major, etc. are filled. The above content is referred to as the information part of the admission notice.
[0044] The first image is subjected to a limited value processing, that is, the information part of the admission notice is processed into dots of two fixed colors, red and blue, and the background part is all changed into white dots, as Figure 3 .
[0045] For the white pixels in the first image, perform binarization processing according to the coordinates to form a result with alternating green and white dots. Specifically, traverse each pixel point in the image, check the color information of each pixel point one by one, and determine whether the current pixel is a white pixel. If the pixel is a white pixel, determine its color according to the parity of the sum of the row number and column number of the pixel in the image: when the sum of the row number and column number is even, set the pixel to green; when the sum of the row number and column number is odd, keep the pixel white. According to the above method, the pixels in the non-white area remain their original colors without any modification, and the original white area is replaced with an alternating white and green effect to obtain the second image, as Figure 4 .
[0046] Perform binary encoding according to the pixel color, where white and green are represented as 0, and blue and red are represented as 1. Read the first 440 rows of the array stored in the second image, perform SM2 signature, and convert the signature result into a 512-bit binary array, which contains two parts, r and s; add {0, 1, 0, 1} at the end of the r and s parts of the signature array to modify the signature array to 520 bits, with every 10 bits as a group, and add {0, 0} between two groups, When drawing a signature, 1 is represented by red pixels and 0 is represented by white pixels. At the 470th row of the anti-counterfeiting piece, starting from the 70th Figure 5 Start drawing the signature from the column to obtain the third image. In an embodiment not shown, dual-bit encoding can also be used, where white is represented as 00, green is represented as 01, blue is represented as 10, and red is represented as 11.
[0047] Among them, the specific steps of the SM2 signature include: S1: Obtain the key pair from the USB Key. The private key d is a random number that satisfies 1 ≤ d ≤ n - 1, where n is the order of the elliptic curve, and the public key P = d × G, where G is the elliptic curve base point. S2: Combine the user identification information, public key information, and data content, and compress the data through the SM3 hashing algorithm to generate a fixed-length digest value e. S3: Select a random number k that satisfies 1 ≤ k ≤ n - 1, where n is the order of the elliptic curve. S4: Calculate the signature value r, calculate the elliptic curve point k × G = (x1, y1), and calculate r = (e + x1) mod n. If r = 0 or r + k = n, regenerate the random number k. S5: Calculate the signature value s, calculate s = ((1 + d) -1 ×(k - r × d)) mod n. If s = 0, regenerate the random number k. S6: Output the signature result. The signature result is (r, s), where r and s are the two parts of the signature respectively.
[0048] The third image is magnified according to the grid. Each pixel is expanded to 4×4 pixels with the same value. The grids in the first row and the first column are green grids. A column of grids is added to the rightmost side and a row of grids is added to the bottommost side to identify the vertices of the anti-counterfeiting area. After processing, there are 501 rows and 751 columns of grids in total. The grids formed by the information part are called information grids, that is, red grids and blue grids; the remaining grids are background grids, that is, white grids and green grids. Except for the white grids and green grids used to determine the vertices in the last row and the last column, the remaining white grids and green grids represent 0, and the red grids and blue grids represent 1.
[0049] To prevent the diffusion of colors during printing and photographing, white grids are set around the information grids as isolation grids, representing 0. After processing, a grid-based anti-counterfeiting document of the admission notice is formed, which stores a two-dimensional binary array.
[0050] A canvas of 3508×2480 pixels is newly created, and the result image of S7 is pasted in the central area of the canvas, as The added position. The user sets the font of the added content. The user selects the save root path of the admission notice. Use shown. Print the anti-counterfeiting admission notice. Use a laser printer, select A4 paper, set the resolution to 300 dpi, do not print with borders, and cooperate with high-gram coated paper to print the grid-based anti-counterfeiting admission notice. When distributing the notice, it is necessary to ensure the flatness of the paper.
[0051] In the first embodiment of the present invention, an anti-counterfeiting admission notice generator is also disclosed. The user provides the paths of the first image and the student information form. The generator automatically reads the student information form and the electronic picture, displays the electronic picture in the display area, and obtains the names of all columns of the student information form into the combo box for the user to select. The user selects which columns of content to add to the template from all the column names in the table and selects by clicking the mouse in the display area Figure 6 Figure 7 The user inserts a USB KEY to read the private key for the signature process. The user clicks to run and start. The generator realizes adding the content of the specified columns to the template, generates an admission notice for each student on the student table and saves it to the directory specified by the user. The generator can realize mass production of anti-counterfeiting admission notices, which is beneficial to promoting the practical application of anti-counterfeiting admission notices. The interface of the admission notice generator is as Figure 8 shown.
[0052] The second embodiment of the present invention discloses a method for verifying anti-counterfeiting documents, and the specific process is as Figure 9 shown.
[0053] Take a photo of the admission notice paper document, as Figure 10 shown. It is required that the taken photo keeps the upper and lower sides of the anti-counterfeiting area of the admission notice as parallel as possible, the left and right sides as parallel as possible, there is no shadow on the photo, and the number of photos meeting the requirements should reach 5;
[0054] For each photo, extract the signature line and the first 440 lines of the admission notice array to obtain the r and s parts of the signature. The squares in the photo may not be the same size as the 4×4 squares in the original enlarged third image. The specific square size depends on the pixels of the mobile phone, the shooting angle and distance. Although the shooting causes a slight change in the shape of the squares, the present invention still regards the squares as squares. Since it is required that the upper and lower sides of the photographed photo are approximately parallel, the side lengths of the squares in each row are approximately equal, and a calculation formula for the side length of the squares in each row can be derived. In order to extract the photo array, the present invention needs to determine the coordinates of the upper left vertex of each square, hereinafter referred to as the "grid point". In the photo, it is impossible to guarantee the neatness of the squares. The squares in each row are no longer completely horizontal, and their upper left vertices are not on the same horizontal line. The vertex coordinates cannot be obtained by simple calculation, so further positioning is required to complete the extraction of the array. The effect after positioning is as shown.
[0055] The steps for extracting the photo array specifically include:
[0056] S1: Find the four vertices of the green area of the photo. Convert the color space of the photo to the HSV space, select an appropriate HSV range for green, generate a mask, and obtain the green part in the photo. Obtain the largest green contour, approximate it as a quadrilateral using the Ramer-Douglas-Peucker algorithm, and obtain the four vertices of the quadrilateral as the four vertices of the green area of the photo.
[0057] The distance between the upper right vertex and the upper left vertex is topDistance, the distance between the lower right vertex and the lower left vertex is bottomDistance, the distance between the upper left vertex and the lower left vertex is VerticalDistance, the number of columns cols of the squares in the anti-counterfeiting area is 751, and the number of rows rows of the squares is 501. Calculate the side length of the squares in the first row The side length of the squares in the row rows xsum represents the sum of the side lengths of the squares from the first row to the k - 1 row, k ∈ [2, 500], and k is an integer. The side lengths of the squares in the rows except the first and last rows are expressed as:
[0058]
[0059] S3: Determine the grid points of the first row of squares. After determining the upper-left vertex and x1, the position and size of the first square are determined. Determine the remaining grid points in the first row. Calculate the starting position based on the coordinates of the previous square and the side length of the square. If the square has a positioning function, then according to the scoring function, move to find the position with the maximum score, that is, the optimal position; if there is no positioning function, do not move. Classify the squares by color. Green squares always have a positioning function. When the squares above and below a white square are not white, it has an up-and-down positioning function. When the squares to the left and right of a white square are not white, it has a left-and-right positioning function. The subsequent judgment of the positioning ability and the moving method are all like this. Judge the information stored according to the color. Blue and red squares correspond to 1, and green and white squares correspond to 0.
[0060] S4: Determine the grid points of the squares in the remaining rows. First, determine the starting point. Calculate the position of the first green grid point in the current row based on the position of the first green square in the previous row. Calculate the score of the green square to find the optimal position, and then calculate the position of the first white grid point in the current row. Next, determine the remaining points in this row. The abscissa of the starting position is determined by the position of the nearest known grid point in the same column, and the ordinate is determined by the ordinate of the nearest known grid point in the same row. Then classify the squares by color, judge the positioning ability, move and position the grid points, and judge the information stored according to the color.
[0061] In S3 and S4, the specific steps of color classification include:
[0062] S301: Maintain the green template and white template of the square pixel mean. The initial green template is (0, 255, 0), and the initial white template is (255, 255, 255);
[0063] S302: Judge whether this position is a green square position or a white square position. If the parity of the row number and column number is the same, it is a green square position, and go to step B3; otherwise, it is a white square position, and go to step B4;
[0064] S303: Judge whether the square is a green square. Compare the B value and R value of the square pixel mean with the green square template. If it is greater than 80% of the corresponding color, it is judged as a non-green square; if the G value of the square pixel mean is greater than the B value or the G value is greater than the R value, it is judged as a non-green square; in addition, in the LAB color space, if the color difference between the square pixel mean and the green square template calculated in the CIE76 color difference calculation is greater than 60, it is determined as a non-green square. Otherwise, the square is recognized as a green square.
[0065] S304: Determine whether the square is a white square. If the B value, G value, and R value of the average pixel value of the square are not greater than 50% of the white template, it is determined as a non - white square. In addition, in the LAB color space, if the color difference between the average pixel value of the square and the white square template calculated in the CIE76 color difference calculation is greater than 60, it is determined as a non - green square. Otherwise, the square is recognized as a white square.
[0066] S305: Update the template of this type of square, and calculate the template according to the average pixel value of the green squares or white squares within a certain adjacent area. The specific steps include: Determine the size of the row number g and column number c where the current square is located; if both the row number g and column number c where the current square is located are greater than 100, execute S3051; if the row number where the current square is located is less than 100, execute S3052; if the column number where the current square is located is less than 100, execute S3053.
[0067] S3051: Calculate the average pixel value of the green or white squares in the area from row number g - 100 to g and column number c - 100 to c.
[0068] S3052: Calculate the average pixel value of the green or white squares in the area from row number 1 to g and column number c - 100 to c.
[0069] S3053: Calculate the average pixel value of the green or white squares in the area from row number g - 100 to g and column number 1 to c.
[0070] In S3 and S4, calculate the score of the green square. The specific steps include:
[0071] S301: Traverse all pixels within the square. Let b, g, and r represent the values of the blue, green, and red channels of the pixel.
[0072] S302: brightGreen represents the brightness of the point (r, g, b), and the calculation method is
[0073] S303: Consider the RGB color space as a cube. dGreen represents the distance from the point (r, g, b) to the line representing pure green in the color space, that is, the line "Red = 0, Blue = 0". The calculation method is
[0074] S304: weightMatrix represents a weight matrix with the same size as the square.
[0075] S305: The method for calculating the score of the green squares in the k - th row is to perform a weighted sum of the brightness and distance values of all pixels within the square. The formula:
[0076]
[0077] In S3 and S4, calculate the scores of white squares. The specific steps include:
[0078] S301: Traverse all the pixels within the square. Let b, g, and r represent the values of the blue, green, and red channels of the pixel.
[0079] S302: Let brightWhite represent the brightness of the point (r, g, b). The calculation method is
[0080] S303: Consider the RGB color space as a cube. Let dWhite represent the distance from the point (r, g, b) to the line representing white in the color space, that is, the line "Red = Blue = White". The calculation method is
[0081] S304: Let weightMatrix represent the weight matrix with the same size as the square.
[0082] S305: The method to calculate the score of the white squares in the k-th row is to perform a weighted sum of the brightness and distance values of all the pixels within the square. The formula is:
[0083]
[0084] The verification program obtains the public key from the digital certificate and verifies the signature of the first 440-line array of the notice. The specific steps include:
[0085] S1: Verify whether the public key used for signature is legal. The public key should meet the condition that the public key is P = d × G, where G is the base point of the elliptic curve, d is the private key, and P is the public key.
[0086] S2: Use the SM3 hashing algorithm to hash the user identification information, public key information, and data content to obtain the message digest e.
[0087] S3: Verify the legality of the signature parameters. Verify whether r and s in the signature meet the conditions: 0 < r < n and 0 < s < n, where n is the order of the elliptic curve. If the conditions are not met, the signature verification fails.
[0088] S4: Calculate the auxiliary parameter t. The formula is as follows: t = (r + s) mod n. If t = 0, the signature verification fails.
[0089] S5: Calculate the elliptic curve point (x2, y2). The formula is as follows: (x2, y2) = s × G + t × P, where G is the base point of the elliptic curve and P is the public key. If the calculation result is the infinite point, the signature verification fails.
[0090] S6: Calculate the signature verification value R using the following formula: R = (e + x2) mod n, where e is the message digest and x2 is the abscissa of the elliptic curve point obtained in the previous step. Then verify whether R is equal to r in the signature. If R = r, the signature verification passes; otherwise, the signature verification fails.
[0091] S7: Output the signature verification result, which is either "Signature verification passed" or "Signature verification failed".
[0092] In addition to performing individual signature verification on each photo, if there are no samples for signature verification among the 5 photos, the "majority voting" method is finally used to form the final array, that is, for the content of the 5 arrays, for each grid at the same position, if there are more photos with a determination of 1, it is set to 1; otherwise, it is set to 0.
[0093] Output a prompt message to the user according to the signature verification result.
[0094] In the second embodiment of the present invention, an APP for verifying the admission notice is also disclosed. The functions and usage methods of the APP for verifying the admission notice include: the user takes and uploads 5 photos of the admission notice, and the APP will use OpenCV for image processing and perform digital signature verification on the uploaded information through the SM2 algorithm in the GMSSL library to ensure the authenticity and data security of the admission notice. The usage method is simple. After the user takes and uploads the photos, clicks the "Start Verification" button, the system will automatically perform the verification and give the verification result. If there are photos that the user is not satisfied with or of poor quality, the user can click on the photo to select delete and then take a new photo. The APP interface for verifying the admission notice on the mobile device is as shown.
[0095] The above are only the embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structural or equivalent process transformations made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, are similarly included in the patent protection of the present invention.
Claims
1. A method for manufacturing an anti-counterfeiting paper document: Obtain a first image with information, where the pixel colors of the information part are different from those of the rest part; Process the pixels of the rest part to obtain a second image; the processing includes converting the pixel colors of the rest part into two or more non-information part colors according to a set rule; Encode the second image and read the data of the set rows therein for digital signature; Draw the signed result on the second image to obtain a third image; Expand each pixel of the same value in the third image into a square grid and then print it to obtain the manufactured anti-counterfeiting paper document.
2. The method according to claim 1, characterized in that Obtain a first image with information, the resolution of the first image is (x, y), where x and y are integers, that is, the number of row pixels and the number of column pixels, and the information part of the first image, namely text, pattern, seal, etc., has only a limited number of color brightness values.
3. The method according to claim 1, wherein The rules of the processing are as follows: 1) Add the content of personalized attached information to be added to the first image and keep only a limited number of color brightness values; 2) Perform pixel color conversion on the pixels of the rest part. When the sum of the abscissa and ordinate of any pixel is an even number, set the pixel to the color 1 of the non-information part; Otherwise, set it to the color 2 of the non-information part.
4. The method according to claim 1, characterized in that Use SM2 signature for the digital signature, use the private key corresponding to the digital certificate to digitally sign the first (x - n) rows of data in the second image to obtain a signature value, and segmentally write the signature value in the (x - n + 1)th row and subsequent rows of the second image to obtain a third image.
5. A method for verifying the anti-counterfeiting paper document according to claim 1: Perform image positioning by using the color and shape features of each square grid of the document to be verified; Extract the information content and signature value of the document to be verified; Perform signature verification by using a cryptographic algorithm based on the extracted content; Obtain the verification information of the document through the verification result; If the verification result is correct, it indicates that the paper document is genuine.
6. The method according to claim 5, wherein Take a photo of the document to be verified with a mobile phone, and identify the color features of each square grid by recognizing each color square grid of the photographed document.
7. The method according to claim 5, characterized in that Determine the grid points for image positioning through the color and shape features of each square grid, and the grid points are the upper left vertices of each square grid.
8. The anti-counterfeiting method according to claim 5, wherein Perform SM2 signature verification on the document. Take multiple photos. As long as one photo passes the verification, it can be judged as genuine; after all multiple photos fail the verification, adopt the "majority voting" mechanism, that is, vote on all square grids at the same position of multiple photos to obtain the final information content and signature value, and perform digital signature verification. If the judgment passes, it can still be judged as genuine.
9. An electronic device, including a memory and a processor, where the memory stores a computer program, and the computer program is executed by the processor to implement the steps of the method according to claims 1 - 8.