OFD electronic signature generation method and system, storage medium and equipment
Patent Information
- Application Number
- CN202411376977.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-14
AI Technical Summary
The existing OFD electronic signature generation process involves a large number of disk read and write operations, resulting in inefficient signatures and affecting office efficiency.
By pre-calculating resource file summary, establish a file summary association table, directly apply the summary without changes, avoiding the transfer of layout and improving the efficiency of signatures.
It significantly improves the efficiency of generating OFD electronic signatures, reduces disk read and write operations, and improves office efficiency.
Smart Images

Figure CN119312412A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic signatures, and in particular to a method, system, storage medium and device for generating an OFD electronic signature. Background Art
[0002] In the electronic age, more and more documents need to be communicated and signed electronically. Electronic signature is a digital signature method that complies with legal regulations and requires technical support such as public key infrastructure and digital certificates.
[0003] OFD (OpenFixed-layout) is a layout document standard that features autonomous controllability, security, technological advancement, and a presentation effect that does not change with changes in the software and hardware environment. It also has many features of the international standard PDF (Portable Document Format), including electronic signatures and electronic seals, making it a layout document that can replace PDF.
[0004] Currently, the signing of OFD format documents is completed by adopting a process of streaming format conversion, overall file transmission, and decompression of OFD files during the signing process to complete the signature processing and then compression. This involves a large number of disk read and write operations, which will seriously reduce the signing efficiency of OFD documents, thereby affecting office efficiency. Summary of the invention
[0005] The purpose of this application is to provide a method, system, storage medium and device for generating an OFD electronic signature, which improves the efficiency of OFD signature by pre-calculating the summary of the resource file.
[0006] In order to solve the above technical problems, this application provides a method for generating an OFD electronic signature, and the specific technical solution is as follows:
[0007] Parse the content of the document to be added and obtain the OFD template identifier;
[0008] Selecting a corresponding OFD template document according to the OFD template identifier, and adding the document content to be added to the OFD template document;
[0009] Calculate the change content summary for the XML document with changed content, obtain the resource file summary corresponding to the XML document without changed content from the file summary association table, and calculate the signature data according to the change content summary and the resource file summary; the file summary association table contains all resource summaries in the OFD template document;
[0010] The OFD template document and the signature data are combined and compressed to generate the OFD electronic signature.
[0011] Optionally, before parsing the content of the document to be added and obtaining the OFD template identifier, the following steps are also included:
[0012] Obtain and parse the OFD template to obtain the resource file contained in the OFD template;
[0013] Calculating the summary of each resource file, and establishing a file summary association table according to the summary;
[0014] Mark the elements to be signed in the OFD template and create a signature element index table.
[0015] Optionally, the calculating the summary of each resource file and establishing a file summary association table according to the summary includes:
[0016] Determine the original text node and original text type of the resource file;
[0017] Applying a digest algorithm to perform digest calculation on the original text node to obtain a digest value;
[0018] A file summary association table is generated according to the original text node, the original text type, the summary value, the summary algorithm and the template identifier.
[0019] Optionally, marking the elements to be signed in the OFD template and establishing a signature element index table includes:
[0020] According to the business type of the OFD template, a corresponding signature mark is added to the element to be signed in the OFD template, and a signature mark index table is established.
[0021] Optionally, the step of establishing the signature mark index table includes:
[0022] A signature mark index table is constructed according to the mark code of the signature mark, the mark name, the element ID of the element to be signed, the element type of the element to be signed, the original text node and the target identifier.
[0023] Optionally, when parsing the content of the document to be added and obtaining the OFD template identifier, the process further includes:
[0024] Obtain seal information and signature information; the signature information includes the signer, signature time, and signature location.
[0025] Optionally, selecting a corresponding OFD template document according to the OFD template identifier, and adding the document content to be added to the OFD template document includes:
[0026] Selecting a corresponding OFD template document according to the OFD template identifier;
[0027] Acquire the corresponding resource file according to the signature element index table, and add the information to be signed to the resource file in the PFD template document;
[0028] Add the document content to be added to the OFD template.
[0029] The present application also provides a system for generating an OFD electronic signature, including:
[0030] The document parsing module is used to parse the content of the document to be added and obtain the OFD template identifier;
[0031] A content adding module, used for selecting a corresponding OFD template document according to the OFD template identifier, and adding the document content to be added to the OFD template document;
[0032] A summary calculation module is used to calculate the change content summary for the XML document with changed content, obtain the resource file summary corresponding to the XML document without changed content from the file summary association table, and calculate the signature data according to the change content summary and the resource file summary; the file summary association table contains all resource summaries in the OFD template document;
[0033] The signature generation module is used to merge and compress the OFD template document and the signature data to generate the OFD electronic signature.
[0034] The present application also provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the steps of the above-mentioned method when executed by a processor.
[0035] The present application also provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above-mentioned method when calling the computer program in the memory.
[0036] The present application provides a method for generating an OFD electronic signature, comprising: parsing the content of a document to be added and obtaining an OFD template identifier; selecting a corresponding OFD template document according to the OFD template identifier, and adding the content of the document to be added to the OFD template document; calculating a change content summary for an XML document with changed content, obtaining a resource file summary corresponding to an XML document without changed content from a file summary association table, and calculating signature data according to the change content summary and the resource file summary; the file summary association table contains all resource summaries in the OFD template document; merging and compressing the OFD template document and the signature data to generate the OFD electronic signature.
[0037] When generating an OFD electronic signature, this application can directly select the corresponding OFD template document after parsing the document to be added, and obtain the resource file summary of the corresponding OFD template document from the file summary association table. By pre-calculating the summary of each resource file in the OFD template document, the document content can be directly added when generating the OFD electronic signature and synthesized into the template without the need for version transfer, and a large number of summaries with no content changes can be directly applied, thereby improving the generation efficiency of the OFD electronic signature.
[0038] The present application also provides a method, system, storage medium and electronic device for generating an OFD electronic signature, which have the above-mentioned beneficial effects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0040] Figure 1 A schematic diagram of the OFD template file directory structure provided in an embodiment of the present application;
[0041] Figure 2 A flowchart of a method for generating an OFD electronic signature provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of the temporary directory structure of the signature resource provided in the embodiment of the present application;
[0043] Figure 4 A schematic diagram of the directory structure of the signed OFD document provided in the embodiment of the present application;
[0044] Figure 5 A flowchart of another method for generating an OFD electronic signature provided in an embodiment of the present application;
[0045] Figure 6 A schematic diagram of the structure of a system for generating an OFD electronic signature provided in an embodiment of the present application;
[0046] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0048] The following is a description of the preparation process of this application before executing the OFD electronic signature generation process:
[0049] Before generating an OFD electronic signature, you can first obtain and parse the OFD template, obtain the resource files contained in the OFD template, calculate the summary of each resource file, and establish a file summary association table based on the summary. In addition, you can also mark the elements to be signed in the OFD template and establish a signature element index table.
[0050] Since OFD is a relatively new file format, its file structure and specifications are relatively complex compared to PDF, and the OFD template needs to be parsed into XML files and other types of resource files. To this end, it is necessary to extract the elements in the OFD template for placing signature information in specific locations in advance. These elements can be text, dates, pictures, etc. In the process of generating OFD electronic signatures, OFD template filling can be performed, that is, the information to be synthesized in the business data, such as the name of the signing agency, the signing date, etc., is synthesized into the corresponding XML document placeholder or specified location.
[0051] The electronic signature service parses the OFD template content into XML files and other resource files according to the standard OFD file organization structure of GB / T 33190-2016 Electronic Document Storage and Exchange Format Layout Document, which includes fonts, color spaces, vector images, multimedia, etc. Then, the file summary of the resource file is calculated and the file summary association table is established.
[0052] See also Figure 1 , Figure 1 Schematic diagram of the OFD template file directory structure provided in the embodiment of the present application. When parsing the OFD file, the OFD is parsed as follows: Figure 1 The file hierarchy shown includes:
[0053] 1. OFD.xml is the main entry file. There is only one OFD.xml file in a package. This file name is usually not allowed to be modified.
[0054] 2. Doc_N is the folder of the Nth document, and Document.xml is the root node of the document;
[0055] 3. Pages is the page folder, Page_N is the Nth page folder;
[0056] 4. Content.xml is the content description of page N;
[0057] 5. PageRes.xml is the resource description of page N;
[0058] 6. PublicRes.xml is the document public resource index;
[0059] 7. DocumentRes.xml is the resource index of the document itself;
[0060] 8. Res is the resource folder, Image_M.png / Font_M.ttf is the resource file;
[0061] Establish a file summary association table to directly obtain summary values for unchanged resource files to speed up the generation of signed OFD documents. The file summary association table is shown in Table 1: It consists of five columns, the first column is the original text node, the second column is the original text type, the third column is the summary value, the fourth column is the summary algorithm, and the fifth column is the template identifier. The data in each row corresponds one to one. See Table 1, which is an exemplary file summary association table provided by this application.
[0062] Table 1 Document summary association table
[0063] Original Node Original text type Summary Value Digest Algorithm Template Logo OFD.xml XML MpzAX+9…YJhns= 1.2.156.10197.1.401 1 DOC_0 / Document.xml XML Mpzfgtf…YJfds= 1.2.156.10197.1.401 1 DOC_0 / PublicRes.xml XML Mpzhfry…Yjkns= 1.2.156.10197.1.401 1 …
[0064] After that, you can further create a signature element index table. Identify and mark the elements to be signed, and create a signature information index table
[0065] According to the business type of the OFD template, add corresponding signature marks to the information to be signed in the template, and establish a signature mark index table so that the position of the signature information can be located according to the mark later. For example, when the signature content corresponds to the electronic certificate business, select marks such as the organization name, certificate holder, issuance time and personal photo.
[0066] An exemplary structure of the signature mark index table can be shown in Table 2: It consists of six columns, the first column is the mark code, the second column is the mark name, the third column is the element ID (of the OFD resource file), the fourth column is the mark type (OFD resource element type), the fifth column is the original text node, and the sixth column is the target identifier. The data in each row corresponds to each other.
[0067] Table 2 Signature and Seal Index
[0068] Tag Encoding Tag Name Element ID Marker Type Original Node Template Logo organ Institution Name ID=”5” Word DOC_0 / Pages / Page_0 / Content.xml 1 photo Personal photos ID=”1” image DOC_0 / Pages / Page_0 / Res / Image0.png 1 …
[0069] The above is the preparation process that needs to be performed before executing the OFD electronic signature. It does not need to be performed before each OPD electronic signature is generated. It only needs to be performed once to meet the generation of all OFD electronic signatures corresponding to the OFD template.
[0070] Please refer to Figure 2 , Figure 2 A flowchart of a method for generating an OFD electronic signature provided in an embodiment of the present application, the method comprising:
[0071] S201: Parse the content of the document to be added and obtain the OFD template identifier;
[0072] S202: selecting a corresponding OFD template document according to the OFD template identifier, and adding the document content to be added to the OFD template document;
[0073] S203: Calculate the change content summary for the XML document with changed content, obtain the resource file summary corresponding to the XML document without changed content from the file summary association table, and calculate the signature data according to the change content summary and the resource file summary; the file summary association table contains all resource summaries in the OFD template document;
[0074] S204: Combining and compressing the OFD template document and the signature data to generate the OFD electronic signature.
[0075] First, obtain and parse the content of the document to be added to obtain the OFD template identifier. In actual application, the electronic signature service can be used to parse the content of the document to be added and obtain the OFD template identifier. It should be noted that the OFD template identifier is necessary information to determine the OFD template used when executing the OFD electronic signature for the document content to be added. In addition, when obtaining the OFD template identifier, you can further obtain the seal information and signature information, and the signature information includes the signing agency, signing time, signature location, etc.
[0076] After determining the OPD template identifier in S201, a corresponding OFD template document may be selected, and the document content to be added may be added to the OFD template document.
[0077] The electronic signature service selects the corresponding template according to the template identifier in the parameter, and obtains the decompression directory of the template file generated by decompression in step S11; obtains the corresponding resource file in the element index table according to the signature tag, and adds the information to be signed according to the resource file type, such as XML file resource type, then copy the XML file to the temporary directory of the signature resource; through the template engine technology (FreeMarker), add the document content to be added to the corresponding contents in the XML file, such as the institution name, signing time, amount, payment content, etc. in the electronic invoice template.
[0078] like Figure 3 As shown, Figure 3 This is a schematic diagram of the temporary directory structure of signature resources provided in an embodiment of the present application, wherein Doc_N, Pages, Page_N, Res, Image_M.png are page-level images, and Doc_N, Res, Image_M.png are file-level images, such as the QR code image in the electronic receipt template.
[0079] The process of generating signature resources by the electronic signature server includes:
[0080] Step 1: Create a signature description resource directory Signs and an entry file Signatures.xml;
[0081] Step 2, create a signature directory Sign_N, create a signature file Signature.xml, query the seal ID to obtain the specific electronic seal data and write it into the seal file Seal.esl;
[0082] Step 3: Create a signature appearance node StampAnnot list StampAnnots in the signature file Signature.xml;
[0083] Step 4: Perform file hash digests on all signature-protected files in the OFD compressed package, including recalculating the digests of XML files with added content and querying pre-calculated digests of unchanged XML files and other resource files, and generating a summary node list References. References consists of a series of Reference elements including the relative path of the resource file and its digest. At the same time, the security algorithm provider, signature algorithm identifier, signature time, etc. are written into the file.
[0084] Step 5: Summarize the signature file Signature.xml, generate the data to be signed, use the corresponding digital certificate to digitally sign, assemble the signature data, and generate the signature data file SignedValue.dat;
[0085] Step 6. Write the location of Signature.xml and other attribute information including signature type, signature ID, etc. into the Signatures.xml file;
[0086] Step 7. Copy the OFD.xml file in the template resource to the temporary directory of the signature resource, and add the Signatures element in the OFD.xml file. The element content is the relative path of Signatures.xml.
[0087] Step 8: If you sign multiple chapters at the same time, follow steps 2 to 6 in sequence.
[0088] Finally, merge the template resource directory and the signature resource directory, and filter the changed resource files in the template, including OFD.xml, Content.xml in Pages, etc. The signature OFD document structure is as follows: Figure 4 As shown, Figure 4 A schematic diagram of the signed OFD document directory structure provided in an embodiment of the present application.
[0089] The following is an explanation of the method for generating the OFD electronic signature provided by this application using the business end and the service end:
[0090] In this embodiment, the business end refers to the business application system, and the service end refers to the electronic signature service. Figure 5 As shown, Figure 5 A flowchart of another method for generating an OFD electronic signature provided in an embodiment of the present application.
[0091] During the entire process of generating an OFD electronic signature, the electronic signature service first parses and preprocesses the OFD template document.
[0092] After that, the business application system initiates a seal application, including the seal business data, that is, sends the document to be added including the OFD template identifier to the electronic signature service;
[0093] After that, the electronic signature service receives the business data of the business application system, and synthesizes the document to be signed according to the business data and the template and generates a signed OFD document.
[0094] The electronic signature service parses the OFD template document into XML files and other format resource files, and records the template decompression path; calculates the summary of each resource file after decompression, and establishes a file summary association table; identifies and marks the elements to be signed, and establishes a signature mark index table.
[0095] The external business system initiates an application for the use of a seal, and the seal parameters include the template identifier and the document content to be added.
[0096] The electronic signature service parses the document content to be added, selects the corresponding OFD template document according to the template identifier, selects XML according to the content to be added, copies the XML file to a temporary directory and adds the content to be added to the file.
[0097] The electronic signature service combines the newly generated XML file and other unchanged resources, calculates the summary of the newly generated XML file, queries the summary of the unchanged XML file and other resource files, and synthesizes the OFD signature document with the electronic seal and signature data after signing.
[0098] The following is an introduction to the OFD electronic signature generation system provided in an embodiment of the present application. The OFD electronic signature generation system described below and the OFD electronic signature generation method described above can refer to each other.
[0099] See also Figure 6 , Figure 6 A schematic diagram of the structure of a system for generating an OFD electronic signature provided in an embodiment of the present application, the system comprising:
[0100] The document parsing module is used to parse the content of the document to be added and obtain the OFD template identifier;
[0101] A content adding module, used for selecting a corresponding OFD template document according to the OFD template identifier, and adding the document content to be added to the OFD template document;
[0102] A summary calculation module is used to calculate the change content summary for the XML document with changed content, obtain the resource file summary corresponding to the XML document without changed content from the file summary association table, and calculate the signature data according to the change content summary and the resource file summary; the file summary association table contains all resource summaries in the OFD template document;
[0103] The signature generation module is used to merge and compress the OFD template document and the signature data to generate the OFD electronic signature.
[0104] Based on the above embodiments, as a preferred embodiment, it also includes:
[0105] The template parsing module should obtain and parse the OFD template to obtain the resource file contained in the OFD template;
[0106] A summary calculation module, used to calculate the summary of each resource file, and establish a file summary association table according to the summary;
[0107] The element index module is used to mark the elements to be signed in the OFD template and establish a signature element index table.
[0108] Based on the above embodiment, as a preferred embodiment, the summary calculation module includes:
[0109] An original text locating unit, used to determine the original text node and original text type of the resource file;
[0110] A digest calculation unit, used to apply a digest algorithm to perform digest calculation on the original text node to obtain a digest value;
[0111] The association table generating unit is used to generate a file summary association table according to the original text node, the original text type, the summary value, the summary algorithm and the template identifier.
[0112] Based on the above embodiments, as a preferred embodiment, the element index module is a module for adding corresponding signature marks to the elements to be signed in the OFD template according to the business type of the OFD template, and establishing a signature mark index table.
[0113] Based on the above embodiment, as a preferred embodiment, the element index module includes:
[0114] The table building unit is used to build a signature mark index table according to the mark code, mark name, element ID of the element to be signed, element type of the element to be signed, original text node and target identifier of the signature mark.
[0115] Based on the above embodiment, as a preferred embodiment, the document parsing module is also used to obtain seal information and signature information; the signature information includes the signer, signature time, and signature location.
[0116] Based on the above embodiment, as a preferred embodiment, the content adding module includes:
[0117] A template determining unit, configured to select a corresponding OFD template document according to the OFD template identifier;
[0118] A signature information adding unit, used for acquiring a corresponding resource file according to the signature element index table, and adding the information to be signed to the resource file in the PFD template document;
[0119] The content adding unit is used to add the document content to be added into the OFD template.
[0120] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0121] The present application also provides an electronic device, which may include a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps provided in the above embodiment may be implemented. Of course, the electronic device may also include various network interfaces, power supplies and other components.
[0122] The present application also provides an electronic device, see Figure 7 , a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 7As shown, a processor 1410 and a memory 1420 may be included.
[0123] Among them, the processor 1410 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1410 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1410 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1410 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1410 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0124] The memory 1420 may include one or more computer-readable storage media, which may be non-transitory. The memory 1420 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 1420 is at least used to store the following computer program 1421, wherein, after the computer program is loaded and executed by the processor 1410, it can implement the relevant steps in the method performed by the electronic device side disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 1420 may also include an operating system 1422 and data 1423, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 1422 may include Windows, Linux, Android, etc.
[0125] In some embodiments, the electronic device may further include a display screen 1430 , an input / output interface 1440 , a communication interface 1450 , a sensor 1460 , a power source 1470 , and a communication bus 1480 .
[0126] certainly, Figure 7 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of the present application. In actual applications, the electronic device may include Figure 7 More or fewer components than shown, or combinations of certain components.
[0127] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the system provided in the embodiment, since it corresponds to the method provided in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0128] Specific examples are used herein to illustrate the principles and implementation methods of the present application, and the description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
[0129] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A method for generating an OFD electronic signature, characterized in that: include: Parse the content of the document to be added and obtain the OFD template identifier; Selecting a corresponding OFD template document according to the OFD template identifier, and adding the document content to be added to the OFD template document; Calculate the change content summary for the XML document with changed content, obtain the resource file summary corresponding to the XML document without changed content from the file summary association table, and calculate the signature data according to the change content summary and the resource file summary; the file summary association table contains all resource summaries in the OFD template document; The OFD template document and the signature data are combined and compressed to generate the OFD electronic signature.
2. The generation method according to claim 1, characterized in that: Before parsing the content of the document to be added and obtaining the OFD template identifier, the following steps are also included: Obtain and parse the OFD template to obtain the resource file contained in the OFD template; Calculating the summary of each resource file, and establishing a file summary association table according to the summary; Mark the elements to be signed in the OFD template and create a signature element index table.
3. The generation method according to claim 2, characterized in that: The calculating the summary of each resource file and establishing a file summary association table according to the summary comprises: Determine the original text node and original text type of the resource file; Applying a digest algorithm to perform digest calculation on the original text node to obtain a digest value; A file summary association table is generated according to the original text node, the original text type, the summary value, the summary algorithm and the template identifier.
4. The generation method according to claim 2, characterized in that: The marking of the elements to be signed in the OFD template and establishing the signature element index table comprises: According to the business type of the OFD template, a corresponding signature mark is added to the element to be signed in the OFD template, and a signature mark index table is established.
5. The generation method according to claim 4, characterized in that: The establishment of the signature mark index table includes: A signature mark index table is constructed according to the mark code of the signature mark, the mark name, the element ID of the element to be signed, the element type of the element to be signed, the original text node and the target identifier.
6. The generation method according to claim 1, characterized in that: When parsing the content of the document to be added and obtaining the OFD template identifier, the following steps are also included: Obtain seal information and signature information; the signature information includes the signer, signature time, and signature location.
7. The generation method according to claim 2, characterized in that: Selecting a corresponding OFD template document according to the OFD template identifier, and adding the document content to be added to the OFD template document includes: Selecting a corresponding OFD template document according to the OFD template identifier; Acquire the corresponding resource file according to the signature element index table, and add the information to be signed to the resource file in the PFD template document; Add the document content to be added to the OFD template.
8. A system for generating an OFD electronic signature, characterized in that: include: The document parsing module is used to parse the content of the document to be added and obtain the OFD template identifier; A content adding module, used for selecting a corresponding OFD template document according to the OFD template identifier, and adding the document content to be added to the OFD template document; A summary calculation module is used to calculate the change content summary for the XML document with changed content, obtain the resource file summary corresponding to the XML document without changed content from the file summary association table, and calculate the signature data according to the change content summary and the resource file summary; the file summary association table contains all resource summaries in the OFD template document; The signature generation module is used to merge and compress the OFD template document and the signature data to generate the OFD electronic signature.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for generating an OFD electronic signature as described in any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps of the method for generating an OFD electronic signature as claimed in any one of claims 1 to 7 are implemented.