Method, device and equipment for processing target electronic file containing electronic signature

By generating vector graphics and verifying electronic signature data, the problem of electronic signature technology adapting to multiple file formats and compliance verification is solved, and the versatility and security of electronic file processing are improved.

CN120744979AActive Publication Date: 2025-10-03HEFEI TANOVO INFORMATION SECURITY TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510971377.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-15
Publication Date
2025-10-03
Estimated Expiration
2045-07-15

AI Technical Summary

Technical Problem

Existing electronic signature technology is difficult to adapt to multiple electronic file formats at the same time, especially PDF and OFD formats, and can only view content data, lacking compliance verification of electronic signatures.

Method used

Provided are a method and device that can parse a target electronic file to generate vector graphics, and extract and verify electronic signature data, including generating a canvas, parsing the text image layout, extracting electronic seal and signature data, performing compliance verification, and finally displaying the verification results on the vector graphics.

Benefits of technology

It achieves adaptation to a variety of electronic file formats, improves the versatility and practicality of the method, ensures the compliance and reliability of electronic signatures, and allows users to intuitively obtain file content and signature compliance information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744979A_ABST
    Figure CN120744979A_ABST
Patent Text Reader

Abstract

The invention provides a method, a device and equipment for processing a target electronic file containing an electronic signature. The processing method comprises the following steps: acquiring the target electronic file containing the electronic signature; analyzing the content of the target electronic file to generate a vector graph; extracting electronic signature data of the electronic signature; performing compliance verification on the electronic signature data to obtain a verification result; and displaying the vector graph and the verification result. According to the embodiment of the invention, the electronic signature processing requirements of various electronic file formats can be met at the same time, the vector graph after analysis of the electronic file is displayed, and the verification result of the electronic signature data is synchronously displayed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of electronic signatures, and in particular to a method, apparatus, and device for processing a target electronic file containing an electronic signature. Background Art

[0002] With the widespread use of electronic documents, electronic signatures, as a key technology for ensuring the integrity, authentication, and immutability of electronic documents, have become an essential component of modern information exchange and e-commerce. Current electronic signature display methods primarily focus on electronic signatures in PDF (Portable Document) format and are not well adapted for electronic signatures in OFD (Open Document) format. Furthermore, electronic signatures can only be viewed within the content of the signature, with limited verification capabilities. Summary of the Invention

[0003] The technical problem to be solved by the embodiments of the present invention is to provide a method, device and equipment for processing target electronic files containing electronic signatures, which can simultaneously adapt to the electronic signature processing requirements of multiple electronic file formats, and not only display the vector graphics after electronic file parsing, but also synchronously present the verification results of the electronic signature data.

[0004] To solve the above technical problems, the technical solutions of the embodiments of the present invention are as follows: A method for processing a target electronic file containing an electronic signature, comprising: Obtain the target electronic file containing the electronic signature; Parsing the content of the target electronic file to generate vector graphics; Extracting electronic signature data of the electronic signature; Performing compliance verification on the electronic signature data to obtain a verification result; The vector graphics and verification results are displayed.

[0005] Optionally, parsing the content of the target electronic file to generate a vector graphic includes: Generate the canvas to be rendered according to the display parameters of the current screen; Parsing the text, image, and layout of the target electronic file to obtain parsing results; The analysis result is drawn on the canvas using a graphics rendering engine to generate a vector graphic.

[0006] Optionally, extracting the electronic signature data of the electronic signature includes: If the target electronic file is in a portable document format, parsing the signature dictionary of the electronic signature to obtain first electronic seal data and first electronic signature data; The first electronic seal data includes: first seal information, first seal maker certificate, first seal signature algorithm identifier and first seal signature value; the first seal information includes: first seal header, first seal identifier, first seal attribute and first seal image data; The first electronic signature data includes: first signature information, first signer certificate, first signature algorithm identifier, first signature value and first signature timestamp; the first signature information includes: first version number, first electronic seal, first signature time, first original hash value and first original attribute.

[0007] Optionally, performing compliance verification on the electronic signature data to obtain a verification result includes: Verifying the formats of the first electronic seal data and the first electronic signature data to obtain a first format verification result; Verifying the first seal maker certificate and the first signer certificate to obtain a verification result of the first seal maker certificate and a verification result of the first signer certificate; Verifying the first seal signature value according to the first seal maker certificate and the first seal signature algorithm identifier to obtain a first seal signature value verification result; Verifying the first signature value according to the first signer certificate and the first signature algorithm identifier to obtain a first signature value verification result; Verifying the first seal attribute and the first signing time to obtain a first validity period verification result; Obtaining a first content verification result according to the first original text attribute and the first original text hash value; A first timestamp verification result is obtained according to the first signature timestamp, the first seal attribute and the first signature time.

[0008] Optionally, extracting the electronic signature data of the electronic signature includes: If the target electronic file is in an open file format, parsing the content under the signature path in the electronic signature to obtain the second electronic seal data and the second electronic signature data; The second electronic seal data includes: second seal information, second seal maker certificate, second seal signature algorithm identifier and second seal signature value; the second seal information includes: second seal header, second seal identifier, second seal attributes and second seal image data; The second electronic signature data includes: second signature information, second signer certificate, second signature algorithm identifier, second signature value and second signature timestamp; the second signature information includes: second version number, second electronic seal, second signature time, second original hash value and second original attributes.

[0009] Optionally, performing compliance verification on the electronic signature data to obtain a verification result includes: Verifying the formats of the second electronic seal data and the second electronic signature data to obtain a second format verification result; Verifying the second seal maker certificate and the second signer certificate to obtain a second seal maker certificate verification result and a second signer certificate verification result; Verifying the second seal signature value according to the second seal maker certificate and the second seal signature algorithm identifier to obtain a second seal signature value verification result; Verifying the second signature value according to the second signer certificate and the second signature algorithm identifier to obtain a second signature value verification result; Verifying the second seal attribute and the second signing time to obtain a second validity period verification result; Obtain a second timestamp verification result according to the second signature timestamp, the second seal attribute, and the second signature time; A second content verification result is obtained according to the second original text attribute and the second original text hash value.

[0010] Optionally, the processing method further includes: The electronic signature data is marked on the vector graphics for display.

[0011] An embodiment of the present invention further provides a device for processing a target electronic file containing an electronic signature, comprising: An acquisition module is used to acquire a target electronic file containing an electronic signature; The processing module is used to parse the content of the target electronic file and generate a vector graphic; extract the electronic signature data of the electronic signature; perform compliance verification on the electronic signature data to obtain a verification result; and display the vector graphic and the verification result.

[0012] An embodiment of the present invention further provides a computing device, including: one or more processors; The storage device is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.

[0013] An embodiment of the present invention further provides a computing device readable storage medium, wherein the computing device readable storage medium stores a program, and when the program is executed by a processor, the method described above is implemented.

[0014] The above solution of the embodiment of the present invention has at least the following beneficial effects: The above-mentioned solution of the embodiment of the present invention generates vector graphics by parsing the content of the target electronic file, which can simultaneously adapt to the electronic signature processing requirements of multiple electronic file formats, meet the support for diverse file formats in different scenarios, and improve the versatility and practicality of the method.

[0015] By extracting electronic signature data and performing compliance verification, not only can the signature content be viewed, but the compliance and reliability of the electronic signature are also ensured from a technical level, enhancing the security of electronic documents.

[0016] It not only displays the vector graphics of the electronic file after analysis, but also simultaneously presents the verification results of the electronic signature data, allowing users to intuitively and comprehensively obtain the content information and signature compliance information of the electronic file. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a flowchart of a method for processing a target electronic file containing an electronic signature provided by an embodiment of the present invention.

[0018] Figure 2 It is a module diagram of a target electronic document processing device containing an electronic signature provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0019] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0020] like Figure 1 As shown, an embodiment of the present invention provides a method for processing a target electronic file containing an electronic signature, comprising: Step 11: Obtain the target electronic file containing the electronic signature; Step 12: parsing the content of the target electronic file to generate a vector graphic; Step 13, extracting the electronic signature data of the electronic signature; Step 14: Perform compliance verification on the electronic signature data to obtain a verification result; Step 15: Display the vector graphics and verification results.

[0021] In step 11, obtaining the target electronic file containing the electronic signature includes: Check the integrity of the target electronic file to ensure that the target electronic file is not damaged and conforms to the standard structure of the corresponding format.

[0022] In this embodiment, by parsing the target electronic file content to generate vector graphics, it can simultaneously adapt to the electronic signature processing requirements of multiple electronic file formats, meet the support for diverse file formats in different scenarios, and improve the versatility and practicality of the method.

[0023] By extracting electronic signature data and performing compliance verification, not only can the signature content be viewed, but the compliance and reliability of the electronic signature are also ensured from a technical level, enhancing the security of electronic documents.

[0024] It not only displays the vector graphics of the electronic file after analysis, but also simultaneously presents the verification results of the electronic signature data, allowing users to intuitively and comprehensively obtain the content information and signature compliance information of the electronic file.

[0025] In an optional embodiment of the present invention, in step 12, parsing the content of the target electronic file to generate a vector graphic includes: Step 121: Generate a canvas to be rendered based on the display parameters of the current screen. Specifically, this may include: Step 1211, obtaining the current screen's physical resolution, dots per inch (DPI), and screen size; Step 1212, according to A=S×D÷L, determine the size of the canvas to be rendered; Where A is the size of the canvas to be rendered (width pixels, height pixels), S is the size of the target electronic file (width, height), D is the DPI of the current screen, and L is the setting parameter; Step 1213, according to A<B, determine the final size of the canvas to be rendered; Where B is the physical resolution of the current screen. If A < B, the size A of the canvas to be rendered is the final size of the canvas to be rendered. If A < B does not hold, the size A of the canvas to be rendered is proportionally reduced to within the range of the physical resolution B of the current screen, and the reduced size of the canvas to be rendered is used as the final size of the canvas to be rendered. Step 1214, generating a vector graphic according to the final size of the canvas to be rendered; Step 1215: Enable the scaling adaptation mechanism for vector graphics. Specifically, when the screen resolution changes (e.g., window resizing or device rotation), the pixel size of the vector graphics is automatically adjusted to maintain content clarity. Vector graphics are stored as mathematical paths, so scaling does not require pixel stretching; only path coordinates need to be recalculated to maintain smooth, non-aliased edges. Step 122: parse the text, image, and layout of the target electronic file to obtain parsing results. Specifically, this may include: Step 1221 , if the target electronic file is in a portable document (PDF) format, call a PDF parsing library to load the target electronic file and obtain location information of text, images, and layout; If the target electronic file is in an open document format (OFD), the OFD parsing library is called to load the target electronic file and obtain location information of text, images, and layout; Step 1222: performing text parsing, image parsing, and version parsing respectively based on the position information of the text, image, and layout; Step 1223 , integrating the text analysis results (content, coordinates, and fonts, etc.), the image analysis results (data, location, and format, etc.), and the version analysis results (page structure and element hierarchy, etc.) to obtain an analysis result; Step 123, using a graphics rendering engine, draws the parsing result on the canvas to generate a vector graphic. Specifically, the process may include: Step 1231, using a graphics rendering engine, performing bottom layer drawing on the canvas to obtain a bottom layer canvas; Step 1232 , the current parsing result, the image parsing result, and the version parsing result are drawn on the bottom canvas in layers to obtain a vector graphic; Step 124: preview and display the vector graphics. Specifically, this may include: Step 1241: pass the vector graphics data to the user interface and render it as a visual preview in the interface window to adapt to the window size.

[0026] In this embodiment, the canvas size is calculated by obtaining parameters such as the screen physical resolution and DPI, and the final size is adjusted according to the screen resolution range to ensure that vector graphics can be presented in an adaptive size on different display devices (such as high-resolution monitors and screens of different sizes), avoiding incomplete content display or disproportionate content due to inappropriate size.

[0027] The vector graphics store content in mathematical paths and, combined with a scaling adaptation mechanism, do not rely on pixel stretching when the screen resolution changes (such as window scaling or device rotation). Instead, they maintain smooth, jagged edges simply by recalculating the path coordinates. This ensures that details such as text, images (such as electronic seal graphics), and layouts remain clearly visible when viewed in zoomed form. This is particularly suitable for scenarios where detailed viewing of contract terms and seal details is required.

[0028] By calling the parsing library of the corresponding format (PDF parsing library or OFD parsing library) to extract the location information of text, images and layout, and then using the graphics rendering engine to draw the parsing results in layers, the content can be restored strictly according to the layout of the original file (such as headers and footers, paragraph spacing and element hierarchy), ensuring the consistency of vector graphics and the original electronic file in layout and content presentation.

[0029] The generated vector graphics can be directly rendered as a visual preview in the user interface, and can accurately locate the position of elements such as electronic signatures, providing an accurate graphic basis for subsequent interactive operations such as marking the signature position on the vector graphics and triggering pop-up windows to display electronic signature data, thereby improving the user's efficiency in understanding the relationship between file content and signature information.

[0030] In an optional embodiment of the present invention, in step 13, extracting the electronic signature data of the electronic signature includes: Step 131 : If the target electronic file is in a portable document (PDF) format, parse the electronic signature dictionary to obtain first electronic seal data and first electronic signature data; Specifically, the first electronic seal data includes electronic seal owner information and graphical content data, which is used to determine the authenticity of the electronic seal itself. The first electronic seal data includes: first seal information, first seal maker certificate, first seal signature algorithm identifier, and first seal signature value. The first seal information includes: first seal header, first seal identifier, first seal attributes, and first seal image data. The first electronic signature data is process data of signing an electronic document using an electronic seal, and is used to determine the authenticity of the document signed with the electronic seal. The first electronic signature data includes: first signature information, first signer certificate, first signature algorithm identifier, first signature value and first signature timestamp. The first signature information includes: first version number, first electronic seal, first signature time, first original hash value and first original attributes.

[0031] In step 14, the electronic signature data is subjected to compliance verification to obtain a verification result, including: Step 1411: Verify the formats of the first electronic seal data and the first electronic signature data to obtain a first format verification result. If the format is incorrect, terminate the verification. Specifically, check whether the first electronic seal data contains the first seal information, the first seal maker certificate, the first seal signature algorithm identifier, and the first seal signature value; check whether the first electronic signature data contains the first signature information, the first signer certificate, the first signature algorithm identifier, the first signature value, and the first signature timestamp; verify whether the format of each field complies with the specification. Step 1412: Verify the first seal maker certificate and the first signer certificate to obtain verification results of the first seal maker certificate and the first signer certificate. Specifically, starting from the trusted root certificate, verify the superior-subordinate relationship of the first seal maker certificate and the first signer certificate step by step to ensure legal issuance and form a complete trust chain. Confirm that the certificate has not been revoked by querying the OCSP (Online Certificate Status Protocol) or CRL (Certificate Revocation List). Step 1413: Verify the first seal signature value based on the first seal maker certificate and the first seal signature algorithm identifier to obtain a first seal signature value verification result. Specifically, verify the first seal signature value using the public key in the first seal maker certificate in combination with the algorithm corresponding to the first seal signature algorithm identifier (checking whether the signature value is the result of the first seal information being digitally signed by the seal maker's private key). Step 1414: Verify the first signature value based on the first signer certificate and the first signature algorithm identifier to obtain a first signature value verification result. Specifically, verify the first signature value using the public key in the first signer certificate combined with the algorithm corresponding to the first signature algorithm identifier. Step 1415: Verify the first seal attribute and the first signature time to obtain a first validity period verification result. Specifically, extract the seal validity period start time and end time from the first seal attribute; compare the first signature time and the seal validity period to obtain the first validity period verification result. Step 1416: Obtain a first content verification result based on the first original text attribute and the first original text hash value. Specifically, extract the signature protection range (e.g., a specific page number, clause paragraph, etc.) from the first original text attribute, and extract the corresponding original text content from the target electronic file based on the range. Perform a hash operation on the extracted original text content to be verified using a hash algorithm corresponding to the first signature algorithm identifier to generate a first original text hash value to be verified. Compare the first original text hash value to be verified with the first original text hash value to obtain the first content verification result. Step 1417, obtain the first timestamp verification result based on the first signature timestamp, the first seal attribute and the first signature time; specifically, compare the first signature time and the first signature timestamp. If the first signature time is later than the first signature timestamp, the first signature timestamp of the instruction manual may be at risk of forgery. Compare the seal validity period and the first signature timestamp. If the first signature timestamp is within the seal validity period, the verification is successful.

[0032] In this embodiment, step 1411 ensures that the data structure complies with the standard definition by verifying the required fields (such as seal information, seal maker certificate and signature value, etc.) and format of the first electronic seal data and the first electronic signature data, thereby avoiding verification loopholes caused by missing data or incorrect format from the source, and laying a compliance foundation for subsequent verification.

[0033] Step 1412 verifies the trust chain and revocation status of the seal maker and signer certificates to ensure that the certificates are issued by a trusted organization and have not been revoked, eliminating the risk of illegal entities impersonating seals from an identity perspective; steps 1413 and 1414 verify the signature value through the public key to further confirm that the electronic seal and signing behavior are performed by a legitimate entity (holding the corresponding private key).

[0034] Step 1415 ensures that the signing operation occurs within the legal usage period of the seal by comparing the signing time with the seal validity period, thereby avoiding the abuse of expired seals; step 1417 verifies the timestamp (the signing time is not later than the timestamp and the timestamp is within the seal validity period), further verifying the authenticity of the signing behavior through the time dimension to prevent the risk of time tampering.

[0035] Step 1416 extracts the original text of the signature protection range and recalculates the hash value, and compares it with the stored original text hash value to ensure that the file has not been tampered with without authorization after signing.

[0036] From data format, subject identity, signature validity, time compliance to content integrity, it not only ensures the rigor of the verification logic, but also can quickly locate problems (such as format errors, signature forgery and content tampering, etc.), providing comprehensive protection for the validity of electronic signatures.

[0037] If the previous step fails (such as a certificate error), the subsequent verification (signature value) will not be forcibly terminated. Some verification results will be retained to facilitate troubleshooting (such as a clear signature error but a valid certificate).

[0038] In an optional embodiment of the present invention, in step 13, extracting the electronic signature data of the electronic signature includes: Step 132: If the target electronic file is in an open document format (OFD), parse the content under the signature path in the electronic signature to obtain the second electronic seal data and the second electronic signature data; Specifically, the second electronic seal data includes electronic seal owner information and graphical content data, which is used to determine the authenticity of the electronic seal itself. The second electronic seal data includes: second seal information, second seal maker certificate, second seal signature algorithm identifier and second seal signature value. The second seal information includes: second seal header, second seal identifier, second seal attributes and second seal image data. The second electronic signature data is process data of signing an electronic document using an electronic seal, and is used to determine the authenticity of the document signed with the electronic seal. The second electronic signature data includes: second signature information, second signer certificate, second signature algorithm identifier, second signature value and second signature timestamp. The second signature information includes: second version number, second electronic seal, second signature time, second original hash value and second original attributes.

[0039] In step 14, the electronic signature data is subjected to compliance verification to obtain a verification result, including: Step 1421: Verify the formats of the second electronic seal data and the second electronic signature data to obtain a second format verification result. If the format is incorrect, terminate the verification. Specifically, check whether the second electronic seal data contains the second seal information, the second seal maker certificate, the second seal signature algorithm identifier, and the second seal signature value; check whether the second electronic signature data contains the second signature information, the second signer certificate, the second signature algorithm identifier, the second signature value, and the second signature timestamp; verify whether the format of each field complies with the specification. Step 1422: Verify the second seal maker certificate and the second signer certificate to obtain verification results of the second seal maker certificate and the second signer certificate. If the certificates are incorrect, terminate the verification. Specifically, starting from the trusted root certificate, verify the superior-subordinate relationship of the second seal maker certificate and the second signer certificate step by step to ensure legal issuance and form a complete chain of trust. Confirm that the certificate has not been revoked by querying the OCSP (Online Certificate Status Protocol) or CRL (Certificate Revocation List). Step 1423: Verify the second seal signature value based on the second seal maker certificate and the second seal signature algorithm identifier to obtain a second seal signature value verification result. If the signature value is incorrect, terminate the verification. Specifically, use the public key in the second seal maker certificate in combination with the algorithm corresponding to the second seal signature algorithm identifier to verify the second seal signature value (check whether the signature value is the result of the seal maker's private key digitally signing the second seal information). Step 1424: Verify the second signature value based on the second signer certificate and the second signature algorithm identifier to obtain a second signature value verification result. If the signature value is incorrect, terminate the verification. Specifically, verify the second signature value using the public key in the second signer certificate combined with the algorithm corresponding to the second signature algorithm identifier. Step 1425: Verify the second seal attribute and the second signature time to obtain a second validity period verification result. If the validity is incorrect, terminate the verification. Specifically, extract the seal validity period start time and end time from the second seal attribute; compare the second signature time and seal validity period to obtain the second validity period verification result. Step 1426: Obtain a second timestamp verification result based on the second signature timestamp, the second seal attributes, and the second signature time. If the timestamp is incorrect, terminate the verification. Specifically, compare the second signature time with the second signature timestamp. If the second signature time is later than the second signature timestamp, the second signature timestamp on the instruction manual may be forged. Compare the seal validity period with the second signature timestamp. If the second signature timestamp is within the seal validity period, the verification is successful. Step 1427: Obtain a second content verification result based on the second original text attribute and the second original text hash value. If the validity is incorrect, terminate the verification. Specifically, extract the signature protection range (such as a specific page number, clause paragraph, etc.) from the second original text attribute, and extract the corresponding original content from the target electronic file based on the range. Use the hash algorithm corresponding to the second signature algorithm identifier to perform a hash operation on the extracted original content to be verified to generate a second original text hash value to be verified. Compare the second original text hash value to be verified with the second original text hash value to obtain the second content verification result.

[0040] In this embodiment, step 132 extracts the second electronic seal data and the second electronic signature data in a targeted manner by parsing the content under the signature path of the OFD format file, in accordance with the OFD format storage specifications for electronic signature data, ensuring that the extracted seal information (such as owner information, graphical content) and signature process data (such as signature value, timestamp) are complete and accurate.

[0041] Step 1421 verifies the data format to ensure that the second electronic seal and signature data contain all required fields (such as seal information, seal maker certificate, and signature algorithm identifier, etc.), and that the format complies with the specifications, thereby eliminating verification deviations caused by incomplete data at the fundamental level.

[0042] Step 1422 verifies the trust chain and revocation status of the seal maker and signer certificates to ensure that the signing entity is legal and has the authority to prevent illegal entities from misusing the seal.

[0043] Step 1423 verifies the seal signature value through the seal maker's certificate public key to confirm that the electronic seal is made by a legitimate seal maker and has not been tampered with, thereby ensuring the authenticity of the seal itself and meeting the core requirement of "unforgeability" of electronic seals.

[0044] Step 1424 verifies the signature value through the signer's certificate public key to confirm that the signing behavior is performed by the legal holder and ensure the "non-repudiation of the signing behavior."

[0045] Step 1425 compares the signing time with the seal validity period to prevent expired seals from being abused and ensure that the signing is performed within the legal period.

[0046] Step 1426 verifies the timestamp (the signature time is not later than the timestamp and the timestamp is within the validity period of the seal), further proving the authenticity of the signature through the time dimension, preventing the risk of time forgery, and enhancing the credibility of the signature.

[0047] Step 1427 extracts the original text of the signature protection range and calculates the hash value, which is then compared with the stored hash value of the original text to ensure that the document has not been tampered with after signing and to protect the integrity of the content. This is particularly suitable for scenarios such as contracts and official documents that have extremely high requirements for content authenticity.

[0048] From data format, subject identity, signature validity, time compliance to content integrity, each step is closely linked. Failure in verification at any stage terminates the process. This allows for quick identification of issues (such as format errors, signature forgery, content tampering, etc.) without the need for subsequent, meaningless verification operations. This allows for quick identification of the problem, reduces unnecessary resource consumption, and makes the verification process more efficient. This prevents erroneous data or invalid information from interfering with subsequent steps, ensuring that each step of verification is based on a correct foundation, thereby improving the reliability of the overall verification results. Terminating the process as soon as a problem is discovered can promptly prevent electronic signatures with security risks from passing verification, effectively preventing risks such as forgery and tampering, and ensuring the security and legitimacy of electronic documents.

[0049] In an optional embodiment of the present invention, step 15, displaying the vector graphics and the verification result, includes: Step 151: Create a dual-area layout user interface, with the left side being a verification result display area and the right side being a vector graphics preview area; Step 152, loading the vector graphics into the vector graphics preview area, and loading the verification result into the verification result display area; specifically, it may include: The top of the verification result display area shows the overall verification conclusion, and the middle part shows the sub-item verification results in list form; This treatment method also includes: Step 16, marking the electronic signature data on a vector graphic for display, includes: Step 161: If the target electronic file is in a portable document format (PDF), a pop-up window is triggered to display the first seal information, the first seal maker certificate, the first seal signature algorithm identifier, the first seal signature value, the first signature information, the first signer certificate, the first signature algorithm identifier, the first signature value, and the first signature timestamp in the vector graphics preview area in the form of a semi-transparent border. Step 162: If the target electronic file is in an open document format (OFD), a pop-up window is triggered to display the second seal information, the second seal maker certificate, the second seal signature algorithm identifier, the second seal signature value, the second signature information, the second signer certificate, the second signature algorithm identifier, the second signature value, and the second signature timestamp in the vector graphics preview area in the form of a semi-transparent border.

[0050] In this embodiment, the dual-area layout (the verification result display area on the left and the vector graphics preview area on the right) intuitively separates the file content and the verification results while making them correspond to each other. Users can not only view the original layout of the electronic file (such as the signature position and text content), but also obtain the verification conclusion synchronously without having to switch between different interfaces, thereby enhancing the efficiency of understanding the association between "file content-verification results".

[0051] The verification result display area uses the structure of "overall conclusion at the top + list of items in the middle" to allow users to quickly understand whether the verification has passed (such as "electronic signature is valid") and to view the results of each link in detail (such as format compliance, signature validity, etc.), which conforms to the user's usage habit of "looking at the conclusion first, then checking the details", reducing the cost of information acquisition.

[0052] Step 16 uses the "semi-transparent border annotation + pop-up display" method to clarify the physical location of the electronic signature in the vector graphics (to facilitate users to locate the specific location of the signature in the file), and to display detailed electronic signature data (such as certificate, signature value and timestamp) on demand through pop-ups, avoiding information overload caused by directly piling sensitive data in the preview area, while ensuring the convenience of data viewing.

[0053] The present invention generates vector graphics by parsing the content of the target electronic file, which can simultaneously adapt to the electronic signature processing requirements of multiple electronic file formats, meet the support for diverse file formats in different scenarios, and enhance the scope of application and practical application value of the method.

[0054] Extracting signature data and performing compliance verification not only enables the viewing of signature content, but also ensures the compliance and reliability of electronic signatures from a technical perspective, providing strong technical support for the security of electronic documents.

[0055] It not only displays the vector graphics after parsing the electronic file, but also presents the verification results of the electronic signature data simultaneously, allowing users to intuitively and comprehensively obtain the content information and signature compliance information of the electronic file, thereby improving the efficiency of information acquisition.

[0056] Generate an adaptive canvas based on screen display parameters to ensure that vector graphics are presented at the appropriate size on different display devices, avoiding incomplete or disproportionate content display.

[0057] Vector graphics, combined with a scaling adaptation mechanism, maintain smooth, aliased edges when screen resolution changes, ensuring that details such as text and images remain clearly visible, making them suitable for detailed viewing scenarios.

[0058] Call the corresponding format parsing library and draw in layers, strictly restore the original file layout, and ensure the consistency of vector graphics and original electronic files in layout and content presentation.

[0059] The generated vector graphics can accurately locate the position of the electronic signature, provide an accurate graphic basis for subsequent interactive operations, and improve the user's efficiency in understanding the relationship between file content and signature information.

[0060] Verify the data format of electronic seals and signatures to ensure compliance of the data structure and lay the foundation for subsequent verification.

[0061] Verify the certificates of the seal maker and signer to eliminate the risk of illegal entities using seals; verify the signature value through the public key to confirm that the electronic seal and signing behavior are operated by legal entities.

[0062] Compare the signature time with the seal validity period to avoid the misuse of expired seals; verify the timestamp to prove the authenticity of the signature and prevent time tampering.

[0063] Verify the original hash value to ensure that the document has not been tampered with without authorization after signing.

[0064] Multi-step verification is carried out step by step, which not only ensures the rigor of the verification logic, but also can quickly locate problems and fully guarantee the validity of the electronic signature. Failure of the previous steps will not force the termination of subsequent verifications, which facilitates problem troubleshooting.

[0065] Targeted extraction of electronic signature data in OFD format, in compliance with its storage specifications, to ensure that the extracted information is complete and accurate.

[0066] Verify the data format to eliminate verification deviations caused by incomplete data; verify the seal signature value to ensure the authenticity of the seal and meet the "unforgeability" requirements.

[0067] Verify the legitimacy of the signing entity and the validity of the signing behavior to prevent illegal impersonation and abuse; ensure the integrity of the document content and strictly block the tampering of the original text.

[0068] Each verification step is closely linked to each other. If any link fails, the process will be terminated immediately, which improves verification efficiency, reduces error interference, and strengthens risk prevention and control capabilities.

[0069] The dual-area layout allows users to view vector graphics and verification results simultaneously, enhancing the efficiency of understanding the "file content-verification results" association without switching interfaces.

[0070] The structure of the verification result display area conforms to user habits, allowing users to quickly grasp the verification conclusions and view details, reducing the cost of information acquisition.

[0071] The "semi-transparent border marking + pop-up display" method clarifies the physical location of the signature and displays detailed signature data on demand to avoid information overload while ensuring convenient data viewing.

[0072] Example 1 The legitimacy of an electronic document A in PDF format needs to be verified. The specific process is as follows: Step 21: Obtain the electronic document containing the electronic signature; The user uploads a file named "First Electronic File A.pdf" through the system interface; The system recognizes the file format as PDF, checks the file integrity (it is not damaged and conforms to the PDF standard structure), and loads it into the processing module after confirming that it can be opened normally; Step 22, parsing the content of electronic file A to generate vector graphics; The system detects that the current screen resolution is 2560×1440 and the DPI is 120. Based on A=S×D÷L, the size A of the canvas to be rendered is determined. If A<2560×1440, the size A of the canvas to be rendered is the final size of the canvas to be rendered. Call the PdfSharp library to parse the PDF object tree, extract the location information of text, images and layout, and integrate them into the parsing results; The Skia graphics engine generates vector graphics by layering the analysis results, which supports automatic scaling when the screen resolution changes to maintain clarity. Vector graphics are rendered in the preview area on the right side of the user interface, supporting zooming and page turning; Step 23, extracting electronic signature data; Parse the PDF signature dictionary ( / AcroForm / SigFields) to obtain the first electronic seal data and the first electronic signature data: First electronic seal data: including first seal information (seal header, identifier, attributes, and GIF format image data), first seal maker certificate, first seal signature algorithm identifier, and first seal signature value; First electronic signature data: including the first signature information (version number, first electronic seal, signature time, original text hash value, original text attributes, first signer certificate, first signature algorithm identifier, first signature value and first signature timestamp); Step 24: Conduct compliance verification; Verify format: Confirm that the first electronic seal data contains four elements such as seal information, and the first electronic signature data contains five elements such as signature information, and that the format of each field meets the definition → Pass; Verify the certificate: Verify the certificate trust chain is complete from the root certificate, and the OCSP query is not revoked → passed; Verify the seal signature value: Use the certificate public key + algorithm to verify that the seal signature value is the signature of the seal maker's private key on the seal information → valid; Verify the signature value: Use the certificate public key + algorithm to verify that the signature value is the signature of the signer's private key on the signature information → valid; Verify the validity period of the seal: extract the validity period and signing time from the seal attributes. If it is within the validity period, → pass; Verify the original text hash: Extract the original text according to the protection range, and use the algorithm to calculate the hash value. If it is consistent with the original text hash value, then pass. Verify timestamp: The signature time is earlier than the timestamp, and the timestamp is within the validity period of the seal → valid.

[0073] Step 25, display the verification result; "Electronic Signature Valid" is displayed at the top of the display area on the left side of the user interface, and the list in the middle displays the sub-item results (format compliance √, etc.). The preview area on the right side is marked with a blue border to indicate the location of the electronic signature; Step 16: Click the blue border to trigger a pop-up window, displaying the first electronic seal data (seal image, seal maker certificate summary) and the first electronic signature data.

[0074] Example 2 The legality of an electronic document B in OFD format needs to be verified. The specific process is as follows: Step 31, obtaining the target electronic file containing the electronic signature; The user uploads the "first electronic file B.ofd". The system detects the format as OFD and loads it after confirming that the file is complete and not damaged. Step 32, parsing the file structure and content to generate vector graphics; The system detects the screen resolution of 1920×1080 and DPI96, calculates the canvas size and generates an adapted canvas; Call the OFD parsing library to extract the Pages directory text, Res directory images and layout location information, and integrate the parsing results; The Skia engine generates vector graphics by layered drawing, supporting scaling and adaptation; Vector graphics are rendered in the preview area on the right, supporting detailed viewing; Step 33, extracting electronic signature data; Parse the Signs directory to obtain the second electronic seal data and the second electronic signature data: Second electronic seal data: including second seal information (seal header, identifier, attributes, and image data), second seal maker certificate, second seal signature algorithm identifier, and second seal signature value; Second electronic signature data: contains the second signature information (version number, second electronic seal, signature time, original text hash value, original text attributes, second signer certificate, second signature algorithm identifier, second signature value, and second signature timestamp); Step 34: perform compliance verification; Verify format: Confirm that the second electronic seal and signature data fields are complete and the format complies with the specifications → Pass; Verify the certificate: Verify that the trust chain of Party A's certificate is complete and the CRL query is not revoked → passed; Verify the seal signature value: Use the public key + algorithm to verify the validity of the seal signature value → valid; Verify the signature value: Use the public key to verify that the signature value is the signature of the private key on the signature information → valid; Verify the validity period of the seal: if the signature time is within the validity period → passed; Verify timestamp: The signature time is earlier than the timestamp, and the timestamp is within the validity period of the seal → valid; Verify the original text hash: extract the original text and calculate the hash value. If it is consistent with the stored value, it passes. Step 35, display the verification result; The top of the left display area shows the overall conclusion, the middle area lists the sub-item results, and the right preview area uses a red border to mark the signature position; Step 36: Click the red border to trigger a pop-up window, displaying the detailed data of the second electronic seal and signature.

[0075] The above-mentioned embodiments of the present invention improve the responsiveness, compatibility, and reliability of electronic signature compliance detection by improving format compatibility, improving preview support compatibility, extractability of seal data and certificates, and algorithm compatibility with national encryption, etc., thereby providing users with a more convenient, faster, more reliable, and more compatible electronic signature compliance detection system and method.

[0076] like Figure 2 As shown, an embodiment of the present invention further provides a target electronic document processing device 20 containing an electronic signature, comprising: An acquisition module 21 is used to acquire a target electronic file containing an electronic signature; The processing module 22 is used to parse the content of the target electronic file to generate a vector graphic; extract the electronic signature data of the electronic signature; perform compliance verification on the electronic signature data to obtain a verification result; and display the vector graphic and the verification result.

[0077] Optionally, parsing the content of the target electronic file to generate a vector graphic includes: Generate the canvas to be rendered according to the display parameters of the current screen; Parsing the text, image, and layout of the target electronic file to obtain parsing results; The analysis result is drawn on the canvas using a graphics rendering engine to generate a vector graphic.

[0078] Optionally, extracting the electronic signature data of the electronic signature includes: If the target electronic file is in a portable document format, parsing the signature dictionary of the electronic signature to obtain first electronic seal data and first electronic signature data; The first electronic seal data includes: first seal information, first seal maker certificate, first seal signature algorithm identifier and first seal signature value; the first seal information includes: first seal header, first seal identifier, first seal attribute and first seal image data; The first electronic signature data includes: first signature information, first signer certificate, first signature algorithm identifier, first signature value and first signature timestamp; the first signature information includes: first version number, first electronic seal, first signature time, first original hash value and first original attribute.

[0079] Optionally, performing compliance verification on the electronic signature data to obtain a verification result includes: Verifying the formats of the first electronic seal data and the first electronic signature data to obtain a first format verification result; Verifying the first seal maker certificate and the first signer certificate to obtain a verification result of the first seal maker certificate and a verification result of the first signer certificate; Verifying the first seal signature value according to the first seal maker certificate and the first seal signature algorithm identifier to obtain a first seal signature value verification result; Verifying the first signature value according to the first signer certificate and the first signature algorithm identifier to obtain a first signature value verification result; Verifying the first seal attribute and the first signing time to obtain a first validity period verification result; Obtaining a first content verification result according to the first original text attribute and the first original text hash value; A first timestamp verification result is obtained according to the first signature timestamp, the first seal attribute and the first signature time.

[0080] Optionally, extracting the electronic signature data of the electronic signature includes: If the target electronic file is in an open file format, parsing the content under the signature path in the electronic signature to obtain the second electronic seal data and the second electronic signature data; The second electronic seal data includes: second seal information, second seal maker certificate, second seal signature algorithm identifier and second seal signature value; the second seal information includes: second seal header, second seal identifier, second seal attributes and second seal image data; The second electronic signature data includes: second signature information, second signer certificate, second signature algorithm identifier, second signature value and second signature timestamp; the second signature information includes: second version number, second electronic seal, second signature time, second original hash value and second original attributes.

[0081] Optionally, performing compliance verification on the electronic signature data to obtain a verification result includes: Verifying the formats of the second electronic seal data and the second electronic signature data to obtain a second format verification result; Verifying the second seal maker certificate and the second signer certificate to obtain a second seal maker certificate verification result and a second signer certificate verification result; Verifying the second seal signature value according to the second seal maker certificate and the second seal signature algorithm identifier to obtain a second seal signature value verification result; Verifying the second signature value according to the second signer certificate and the second signature algorithm identifier to obtain a second signature value verification result; Verifying the second seal attribute and the second signing time to obtain a second validity period verification result; Obtain a second timestamp verification result according to the second signature timestamp, the second seal attribute, and the second signature time; A second content verification result is obtained according to the second original text attribute and the second original text hash value.

[0082] Optionally, the processing module 22 is further configured to: The electronic signature data is marked on the vector graphics for display.

[0083] It should be noted that this device is a device corresponding to the above method, and all implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0084] An embodiment of the present invention further provides a computing device, comprising: one or more processors; The storage device is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.

[0085] An embodiment of the present invention further provides a computing device readable storage medium storing instructions that, when executed on a computing device, cause the computing device to execute the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.

[0086] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware, or a combination of computing device software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0087] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0088] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0089] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0090] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0091] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a storage medium readable by a computing device. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computing device software product is stored in a storage medium and includes a number of instructions for enabling a computing device (which can be a personal computing device, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, ROM, RAM, a magnetic disk, or an optical disk.

[0092] In addition, it should be pointed out that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of the present invention. Moreover, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but they do not necessarily need to be performed in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it can be understood that all or any steps or components of the method and apparatus of the present invention can be implemented in hardware, firmware, software or a combination thereof in any computing device (including a processor, storage medium, etc.) or a network of computing devices. This can be achieved by those of ordinary skill in the art using basic programming skills after reading the description of the present invention.

[0093] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general-purpose device. Therefore, the purpose of the present invention can also be achieved simply by providing a program product containing program code that implements the method or device. That is to say, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but do not necessarily need to be performed in chronological order. Certain steps can be performed in parallel or independently of each other.

[0094] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A method for processing a target electronic file containing an electronic signature, characterized in that: include: Obtain the target electronic file containing the electronic signature; Parsing the content of the target electronic file to generate vector graphics; Extracting electronic signature data of the electronic signature; Performing compliance verification on the electronic signature data to obtain a verification result; The vector graphics and verification results are displayed.

2. The method for processing target electronic files containing electronic signatures according to claim 1, characterized in that: Parsing the content of the target electronic file to generate vector graphics includes: Generate the canvas to be rendered according to the display parameters of the current screen; Parsing the text, image, and layout of the target electronic file to obtain parsing results; The analysis result is drawn on the canvas using a graphics rendering engine to generate a vector graphic.

3. The method for processing target electronic files containing electronic signatures according to claim 2, characterized in that: Extracting the electronic signature data of the electronic seal includes: If the target electronic file is in a portable document format, parsing the signature dictionary of the electronic signature to obtain first electronic seal data and first electronic signature data; The first electronic seal data includes: first seal information, first seal maker certificate, first seal signature algorithm identifier and first seal signature value; the first seal information includes: first seal header, first seal identifier, first seal attribute and first seal image data; The first electronic signature data includes: first signature information, first signer certificate, first signature algorithm identifier, first signature value and first signature timestamp; the first signature information includes: first version number, first electronic seal, first signature time, first original hash value and first original attribute.

4. The method for processing target electronic files containing electronic signatures according to claim 3, characterized in that: Perform compliance verification on the electronic signature data to obtain verification results, including: Verifying the formats of the first electronic seal data and the first electronic signature data to obtain a first format verification result; Verifying the first seal maker certificate and the first signer certificate to obtain a verification result of the first seal maker certificate and a verification result of the first signer certificate; Verifying the first seal signature value according to the first seal maker certificate and the first seal signature algorithm identifier to obtain a first seal signature value verification result; Verifying the first signature value according to the first signer certificate and the first signature algorithm identifier to obtain a first signature value verification result; Verifying the first seal attribute and the first signing time to obtain a first validity period verification result; Obtaining a first content verification result according to the first original text attribute and the first original text hash value; A first timestamp verification result is obtained according to the first signature timestamp, the first seal attribute and the first signature time.

5. The method for processing target electronic files containing electronic signatures according to claim 2, characterized in that: Extracting the electronic signature data of the electronic seal includes: If the target electronic file is in an open file format, parsing the content under the signature path in the electronic signature to obtain the second electronic seal data and the second electronic signature data; The second electronic seal data includes: second seal information, second seal maker certificate, second seal signature algorithm identifier and second seal signature value; the second seal information includes: second seal header, second seal identifier, second seal attributes and second seal image data; The second electronic signature data includes: second signature information, second signer certificate, second signature algorithm identifier, second signature value and second signature timestamp; the second signature information includes: second version number, second electronic seal, second signature time, second original hash value and second original attributes.

6. The method for processing target electronic files containing electronic signatures according to claim 5, characterized in that: Perform compliance verification on the electronic signature data to obtain verification results, including: Verifying the formats of the second electronic seal data and the second electronic signature data to obtain a second format verification result; Verifying the second seal maker certificate and the second signer certificate to obtain a second seal maker certificate verification result and a second signer certificate verification result; Verifying the second seal signature value according to the second seal maker certificate and the second seal signature algorithm identifier to obtain a second seal signature value verification result; Verifying the second signature value according to the second signer certificate and the second signature algorithm identifier to obtain a second signature value verification result; Verifying the second seal attribute and the second signing time to obtain a second validity period verification result; Obtain a second timestamp verification result according to the second signature timestamp, the second seal attribute, and the second signature time; A second content verification result is obtained according to the second original text attribute and the second original text hash value.

7. The method for processing target electronic files containing electronic signatures according to claim 1, characterized in that: Also includes: The electronic signature data is marked on the vector graphics for display.

8. A target electronic document processing device containing an electronic signature, characterized in that: include: An acquisition module is used to acquire a target electronic file containing an electronic signature; A processing module, configured to parse the content of the target electronic file and generate a vector graphic; Extracting electronic signature data of the electronic signature; Performing compliance verification on the electronic signature data to obtain a verification result; The vector graphics and verification results are displayed.

9. A computing device, characterized in that include: one or more processors; A storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computing device readable storage medium, characterized in that: The computing device readable storage medium stores a program, which implements the method according to any one of claims 1 to 7 when executed by a processor.

Citation Information

Patent Citations

  • Electronic signature method, device and system for PDF (Portable Document Format) file and storage medium

    CN113221190A

  • OFD file signature verification method, system and equipment based on cloud service

    CN113254210A

  • Method and system for extracting electronic seal based on electronic invoice OFD file

    CN113849470A

  • Electronic signature method and device, electronic equipment and storage medium

    CN117034363A

  • Electronic signature implementation method and device, signing terminal, and signing server

    WO2019154235A1