A method and system for implementing electronic signature preprocessing based on OFD file
By using electronic signature preprocessing methods and systems based on OFD files in the electronic signature system, the problem of poor ease of use of existing systems is solved, and the stamping process of OFD files is simplified, the system complexity and management cost are reduced, and it is suitable for small and micro enterprises and individual users.
Patent Information
- Application Number
- CN202410568675.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-05-09
AI Technical Summary
The existing electronic signature system is less easy to use, especially for small and micro enterprises or individual users, the system complexity and management cost are higher.
Through the electronic signature pre-processing method and system based on OFD files, the original OFD file and the impression style template are received, the impression layer is inserted, the impression style data is converted into the OFD format metadata, and the OFD composite object is created to form a pre-stamped file to simplify the use process of electronic signatures.
It has realized the transformation and optimization of the application process of OFD file stamping, simplified the use process of electronic signatures, reduced the system complexity and management costs, and is suitable for small and micro enterprises and individual users.
Smart Images

Figure CN118504538B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and specifically relates to a method and system for implementing electronic signature preprocessing based on OFD files. Background Art
[0002] Electronic signature is a security application technology that uses asymmetric encryption algorithms to stamp electronic documents by simulating the process of using physical seals on paper documents. The general electronic signature system includes functions such as seal production, seal issuance, and seal application. After accepting the seal application, the seal production verifies the user's identity and uses the digital certificate and the impression image to produce the electronic seal according to the relevant national standards. The completed electronic seal is issued and the status is queried through the seal issuance system. The user uses the online or offline function in the seal application module to stamp or verify the electronic document.
[0003] Electronic signatures are usually stamped on layout files. Common layout file formats include PDF and OFD. The PDF format originated from the PostScript language, which was designed by Adobe in the 1990s and absorbed by ISO as an international standard in 2008. Because it can highly restore design styles on different platforms and environments, it has become a popular layout format in the world. The OFD format is a layout format standard independently developed and designed by our country. Its full name is Open Fixed-Layout Document format. It was released by the National Standards Committee on October 13, 2016. Similar to PDF, it has the characteristics of independent format, fixed layout, and solidified presentation. Because it was released later, it adopted many advanced technologies and concepts in its design. It is currently widely used in many fields such as electronic documents, electronic certificates, and electronic archives.
[0004] At present, the electronic signature system is highly professional and is often composed of subsystems such as seal production, seal issuance, and seal application. Different systems belong to different functional departments. According to the relevant regulations on the management and use of physical seals, the system has designed complex approval and usage processes. In the daily office and business processing of governments and enterprises, there are strict requirements for electronic signature management. However, for small and micro enterprises or individual users, such a complex system has poor usability.
[0005] Application Contents
[0006] The purpose of the embodiments of the present application is to provide a method and system for implementing electronic signature preprocessing based on OFD files, so as to solve the defect of poor system usability in the prior art.
[0007] In order to solve the above technical problems, this application is implemented as follows:
[0008] In a first aspect, a method for implementing electronic signature preprocessing based on an OFD file is provided, comprising the following steps:
[0009] Receive the OFD original file and the stamp style template, wherein the stamp style template adopts XML format to define the stamp style data, and is used to carry the stamp style description and design functions in the electronic seal making system, and the functions of the seal pre-sealing display, position positioning and status definition in the seal application system;
[0010] Inserting a stamp layer into the OFD original file, converting the stamp style data into graphic metadata in OFD format, creating an OFD composite object according to the graphic metadata, and inserting the OFD composite object into the stamp layer;
[0011] The OFD original file is packaged to obtain a pre-stamped file.
[0012] In a second aspect, a system for implementing electronic signature preprocessing based on OFD files is provided, comprising:
[0013] A receiving module is used to receive an OFD original file and a stamp style template. The stamp style template uses XML format to define stamp style data, and is used to carry the stamp style description and design functions in the electronic seal making system, as well as the stamp pre-capping display, position positioning and status definition functions in the seal application system;
[0014] An inserting module, used for inserting a stamp layer into the OFD original file, converting the stamp style data into graphic metadata in OFD format, creating an OFD composite object according to the graphic metadata, and inserting the OFD composite object into the stamp layer;
[0015] The packaging module is used to package the OFD original file to obtain a pre-stamped file.
[0016] The embodiment of the present application forms a pre-stamped document by applying an impression style template to the OFD original document, thereby transforming and optimizing the process of stamping the OFD document, simplifying the use process of the electronic signature, and reducing system complexity and management costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a flow chart of a method for implementing electronic signature preprocessing based on OFD files provided in an embodiment of the present application;
[0018] Figure 2 It is a specific implementation diagram of the method for implementing electronic signature preprocessing based on OFD file provided in the embodiment of the present application;
[0019] Figure 3It is a structural diagram of a system for implementing electronic signature preprocessing based on OFD files provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions 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.
[0021] In recent years, electronic signature technology has developed rapidly and is widely used in government, enterprises, financial institutions and other scenarios, making paperless office possible for the entire business process. Electronic stamps use a relatively consistent appearance style with physical stamps, and the production, issuance and use of electronic stamps fully simulate the management and use process of physical stamps, which is more in line with people's daily usage habits. In addition, by using electronic signature technology to protect the original document, effectively verify whether the data has been tampered with and whether the signer's identity is credible, electronic signatures are increasingly recognized by various industries. With the deepening of people's understanding of electronic signatures, especially since the promulgation and implementation of the "Electronic Signature Law", theoretically reliable electronic signatures have the same legal effect as physical stamps. In addition, electronic signatures involve standardization, as well as the complex technology and management costs behind them, which are difficult for small and micro enterprises and even individual users to achieve. From a technical perspective, the seal data is encapsulated by a complex grammatical structure, and the stamps are mostly in raster image format, resulting in a relatively large size of the entire electronic signature data and a large signature file. When the page is enlarged during reading, the stamp display effect will also be distorted and blurred. The general mode of using the seal is to manually select the signature position in the layout file and stamp it, or to automatically stamp it through the system-stored seal position. Obviously, the usage method is not flexible enough.
[0022] In order to solve the problem of using seals for small and micro enterprises and individual users, the embodiment of this application provides a technology for pre-stamping OFD format files, which effectively solves the above problems by using reliable digital certificates combined with vector stamps to transform and optimize the process of stamping format files. By combining electronic signatures with vector stamps, the complex use process of electronic signatures is simplified and the difficulty of developing reading software is reduced.
[0023] The overall idea of the technical solution of the embodiment of the present application is to use digital signature technology to perform substantial encryption protection on the file, and at the same time, draw on the visualization advantage of electronic signatures, use template files to describe the stamp style, and use the pre-processing program to apply the OFD original file (hereinafter referred to as the original) to the stamp style template (hereinafter referred to as the template) to form a document to be signed. The processing process is to first insert the stamp layer into the original, and then convert the stamp style data into OFD format metadata and create stamp graphic objects in four states, including stamp to be signed, unverified, successful verification, and failed verification, among which the available graphic attribute settings include font, color, background color, transparency, etc. In the signing stage, the user uses the OFD reading software (hereinafter referred to as the reading software) to open the document to be signed to complete the formal signing action, including changing the stamp to-be-signed state to an unverified state and performing regular signing actions.
[0024] Among them, the stamp style template carries the stamp style description and design functions in the electronic seal production system, as well as the pre-sealing display, position positioning, and status definition of the seal in the seal application system. The template uses XML format to define style data, so the editor does not need to understand the complex OFD document format standard, and the implementation is easy. The template supports the two most common graphic element types, text and free path, as well as font, font size, color, line width and other attributes. Replacing raster images with vector graphics in the design can effectively reduce the space occupied by stamp data, and at the same time ensure that after conversion to OFD file, the stamp can be enlarged to any scale in the reading software without distortion or jagged effects.
[0025] The pre-processing program to be signed receives the template and the original, and is responsible for translating the stamp information in the template into OFD syntax to assist the reading software in completing the simulated stamping action. A special stamp layer is inserted into the original OFD to help the reading software quickly parse and locate the stamp position, which is convenient for realizing the navigation function of multiple stamp positions. At the same time, it provides graphic objects for stamp display in multiple states, so that the reader can simply and quickly switch the display state according to the signing process. The pre-processing program to be signed completes the conversion of stamp-related data during the parsing and processing of the template, and uses OFD standard syntax to describe the stamp information, helping the reading software to achieve the effect of simulating the use of electronic signatures with minimal changes.
[0026] The reading software extends the standard digital signature function, and can simulate the effect of electronic signature through the pre-imprint recognition and processing process. The process includes opening the original, parsing and identifying the impression layer, providing an impression navigation template to support users to read the original text and navigate to the location to be signed, the user confirms the stamp, executes the impression status switching action, and then continues to execute the standard digital signature process.
[0027] In conjunction with the accompanying drawings, a method for implementing electronic signature preprocessing based on OFD files provided in an embodiment of the present application is described in detail through specific embodiments and application scenarios.
[0028] like Figure 1 FIG. 1 is a flowchart of a method for implementing electronic signature preprocessing based on an OFD file provided in an embodiment of the present application. The method includes the following steps:
[0029] Step 101, receiving an OFD original file and a stamp style template.
[0030] Among them, the stamp style template uses XML format to define the stamp style data, which is used to carry the stamp style description and design functions in the electronic seal production system, as well as the pre-seal display, position positioning and status definition functions of the seal in the seal application system.
[0031] In this embodiment, the graphic primitive types used by the stamp style template include text and free paths, the attributes supported by the stamp style template include font, font size, color, line width and path drawing instructions, and the states supported by the stamp style template include waiting for signature, unverified, verified successfully and verified failed.
[0032] Step 102, inserting a stamp layer into the OFD original file, converting the stamp style data into graphic metadata in OFD format, creating an OFD composite object according to the graphic metadata, and inserting the OFD composite object into the stamp layer.
[0033] Specifically, by parsing the stamp style data, the four state nodes of the stamp style can be located; by parsing the stamp state graphic elements corresponding to the four state nodes one by one, the graphic element type of each stamp state graphic element can be determined, and the graphic element attributes can be parsed respectively to generate a graphic element list; by parsing the stamp position information in the stamp style data, the number of times the seal appears in the OFD original file can be obtained, and a layer position list can be generated.
[0034] Furthermore, the OFD original file can be parsed according to the OFD syntax standard to form an OFD object memory model with a three-level relationship among documents, pages and layers; OFD composite object resources can be created item by item, and the OFD composite object resources are used to display stamp styles in different states in the OFD original file; OFD objects can be created respectively according to the primitive type of each primitive in the primitive list, and OFD composite object resources can be inserted into the OFD object; primitive data and attributes can be converted to the OFD object according to the primitive type of each primitive; signature positions can be enumerated, and an OFD composite object can be created for each signature position.
[0035] Step 103: Pack the OFD original file to obtain a pre-stamped file.
[0036] In this embodiment, when the user opens the pre-stamped file, the stamp layer in the pre-stamped file is parsed and identified by the OFD reading software, and a pre-stamp position guide is generated based on the stamp layer; when the user triggers the signing action, the stamp status switching action and the standard digital signature process are executed by the OFD reading software.
[0037] The embodiment of the present application forms a pre-stamped document by applying an impression style template to the OFD original document, thereby transforming and optimizing the process of stamping the OFD document, simplifying the use process of the electronic signature, and reducing system complexity and management costs.
[0038] In the embodiment of the present application, the main steps of the pre-stamping processing based on the OFD format file include editing the stamp style, stamp effect and stamp position through the template; processing the original to form a file to be signed, parsing the template, processing the pre-stamp layer, and packaging the original; using the reading software to apply the digital signature, generating a pre-stamp guide, the user triggers the stamp action to modify the stamp status, and executes the standard digital signature; using the template to describe the stamp method; using multiple resource objects to describe the display style of the stamp in multiple states; using the top-level layer to express the stamp layer, and marking the extension type as VectorStamp.
[0039] Combine the following Figure 2 , the embodiments of the present application are further described in detail with respect to the specific implementation methods.
[0040] Among them, template editing and stamp style design include the following steps:
[0041] 1. Stamp style editing: The stamp style description uses format-independent graphic definitions. The editable types include text and free paths. It supports fonts, font sizes, colors, line widths, path drawing instructions, etc. It supports four states: unsigned, unverified, normal, and error.
[0042] 2. Stamp effect editing: Set the fusion algorithm of the stamp and page elements to simulate the effect of real ink.
[0043] 3. Stamp position editing: add stamp position, page number where the stamp appears, center point coordinates, size, etc.
[0044] Further, the original document is processed to form a document to be signed, including the following steps:
[0045] 4. Template parsing
[0046] 4.1) Analysis of stamp style data, positioning of four stamp status nodes;
[0047] 4.2) Analyze the stamp state graphics element item by item, determine the graphics element type and analyze the graphics element attributes respectively, and generate the graphics element list LG1;
[0048] 4.3) Analyze the seal position information, obtain the number of times the seal appears in the original text, and generate the layer position list LP1.
[0049] 5. Pre-stamp layer processing
[0050] 5.1) Parse the original text according to the OFD syntax standard to form the OFD object memory model M of the three-level relationship of document, page and layer;
[0051] 5.2) Create OFD composite object resources CompositeGraphUnit item by item, which are used to display the stamp styles in different states in the OFD file, and generate resource objects CGU_Unsigned, CGU_Unverify, CGU_Normal, and CGU_Error of CompositeGraphUnit type;
[0052] 5.2.1) Enumerate LG1 primitives and exit when completed;
[0053] 5.2.2) Create an OFD object based on the LG1 primitive type and insert it into the CompositeGraphUnit;
[0054] 5.2.3) Convert the primitive data and attributes to OFD objects according to the LG1 primitive type;
[0055] 5.3) Enumerate the stamp positions and create an OFD stamp object for each signature position;
[0056] 5.3.1) Enumerate LP1 position P and exit when completed;
[0057] 5.3.2) Search for the page in model M according to the page number of P;
[0058] 5.3.3) Insert a stamp layer at the top of the page and set the layer type to the extended type VectorStamp;
[0059] 5.3.4) Create OFD composite object and insert into stamp layer, ResourceID points to CGU_Unsigned, set center point position and size according to P attribute;
[0060] 6. The original documents are packaged into pre-stamped documents;
[0061] Further, using the reading software to apply the digital signature includes the following steps:
[0062] 7. The user opens the pre-stamped document to review the content of the document;
[0063] 8. The reader generates a pre-stamp location guide based on the VectorStamp layer of the page;
[0064] 9. The user triggers the signing action;
[0065] 10. The reader modifies the composite object ResourceID to point to CGU_Unsigned;
[0066] 11. The reader executes the standard digital signature process.
[0067] The embodiment of the present application provides a method for preprocessing OFD format files for stamping and affixing signatures. Compared with the traditional signature system, both the system complexity and the management cost are low, and it is suitable for small and micro enterprises and even individual users. Moreover, the applied electronic signature has the same legal effect as the physical seal. From a technical perspective, first of all, the use of vector method to describe the stamp style is better than the traditional raster image. After magnification, the display is clear and not distorted. At the same time, the file size is smaller, reducing the file space occupied. Secondly, by using a variety of stamp styles and stamp layer designs, the OFD reading software can more easily realize the navigation of multiple signature positions, switch between different stamp states, and quickly connect with the electronic signature function to realize the stamping effect of the electronic signature preprocessing system.
[0068] like Figure 3 FIG. 1 is a schematic diagram of a system for implementing electronic signature preprocessing based on an OFD file provided in an embodiment of the present application, including:
[0069] The receiving module 310 is used to receive the OFD original file and the stamp style template. The stamp style template uses XML format to define the stamp style data, which is used to carry the stamp style description and design functions in the electronic seal making system, as well as the pre-sealing display, position positioning and status definition functions of the seal in the seal application system.
[0070] Among them, the graphic element types used by the stamp style template include text and free paths, the attributes supported by the stamp style template include font, font size, color, line width and path drawing instructions, and the states supported by the stamp style template include waiting for signature, unverified, verified successfully and verified failed.
[0071] The inserting module 320 is used to insert the stamp layer into the OFD original file, convert the stamp style data into OFD format metadata, create an OFD composite object according to the metadata, and insert the OFD composite object into the stamp layer.
[0072] Specifically, the insertion module 320 is specifically used to locate the four state nodes of the stamp style by parsing the stamp style data; to determine the type of each stamp state graphic element by parsing the stamp state graphic elements corresponding to the four state nodes one by one, and to parse the graphic element attributes respectively to generate a graphic element list; to obtain the number of times the seal appears in the OFD original file by parsing the stamp position information in the stamp style data, and to generate a layer position list.
[0073] Furthermore, the insertion module 320 is specifically used to parse the OFD original file according to the OFD syntax standard to form an OFD object memory model of the three-level relationship between documents, pages and layers; create OFD composite object resources item by item, and the OFD composite object resources are used to display the stamp styles in different states in the OFD original file; create OFD objects respectively according to the primitive type of each primitive in the primitive list, and insert OFD composite object resources into the OFD object; convert primitive data and attributes to the OFD object according to the primitive type of each primitive; enumerate signature positions, and create an OFD composite object for each signature position.
[0074] The packaging module 330 is used to package the OFD original file to obtain a pre-stamped file.
[0075] In this embodiment, the above system further includes:
[0076] The signature module is used to parse and identify the stamp layer in the pre-stamped file through the OFD reading software when the user opens the pre-stamped file, and generate a pre-stamped position guide based on the stamp layer; when the user triggers the signature action, the OFD reading software executes the stamp status switching action and the standard digital signature process.
[0077] The embodiment of the present application forms a pre-stamped document by applying an impression style template to the OFD original document, thereby transforming and optimizing the process of stamping the OFD document, simplifying the use process of the electronic signature, and reducing system complexity and management costs.
[0078] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned method embodiment for implementing electronic signature preprocessing based on OFD file can be implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0079] It should be noted that, in this article, the terms "include", "comprises" or any other variations 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 sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0080] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0081] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for preprocessing electronic signatures based on OFD files, characterized in that: The following steps are involved: Receive the OFD original file and the stamp style template, wherein the stamp style template adopts XML format to define the stamp style data, and is used to carry the stamp style description and design functions in the electronic seal making system, and the functions of the seal pre-sealing display, position positioning and status definition in the seal application system; Inserting a stamp layer into the OFD original file, converting the stamp style data into graphic metadata in OFD format, creating an OFD composite object according to the graphic metadata, and inserting the OFD composite object into the stamp layer; Packaging the OFD original file to obtain a pre-stamped file; The step of converting the stamp style data into graphic element data in OFD format specifically includes: By parsing the stamp pattern data, four state nodes of the stamp pattern are located; By analyzing the stamp state graphics elements corresponding to the four state nodes one by one, determining the graphics element type of each stamp state graphics element, and analyzing the graphics element attributes respectively, a graphics element list is generated; By parsing the seal position information in the stamp style data, the number of times the seal appears in the OFD original file is obtained, and a position list is generated; The creating of the OFD composite object according to the image metadata specifically includes: Parse the OFD original file according to the OFD syntax standard to form an OFD object memory model of the three-level relationship of document, page and layer; Creating OFD composite object resources item by item, wherein the OFD composite object resources are used to display stamp styles in different states in the OFD original file; According to the primitive type of each primitive in the primitive list, OFD objects are created respectively, and OFD composite object resources are inserted into the OFD objects; According to the primitive type of each primitive, convert the primitive data and attributes to the OFD object; Enumerate the signature positions and create an OFD composite object for each signature position.
2. The method according to claim 1, characterized in that: The graphic element types used by the stamp style template include text and free paths, the attributes supported by the stamp style template include font, font size, color, line width and path drawing instructions, and the states supported by the stamp style template include waiting for signature, unverified, verified successfully and verified failed.
3. The method according to claim 1, characterized in that After packaging the OFD original file to obtain the pre-stamped file, the method further includes: When the user opens the pre-stamped file, the stamp layer in the pre-stamped file is parsed and identified by the OFD reading software, and a pre-stamped position guide is generated according to the stamp layer; When the user triggers the signing action, the stamp status switching action and the standard digital signature process are executed through the OFD reading software.
4. A system for implementing electronic signature preprocessing based on OFD files, characterized in that: include: A receiving module is used to receive an OFD original file and a stamp style template. The stamp style template uses XML format to define stamp style data, and is used to carry the stamp style description and design functions in the electronic seal making system, as well as the stamp pre-capping display, position positioning and status definition functions in the seal application system; An inserting module, used for inserting a stamp layer into the OFD original file, converting the stamp style data into graphic metadata in OFD format, creating an OFD composite object according to the graphic metadata, and inserting the OFD composite object into the stamp layer; A packaging module, used for packaging the OFD original file to obtain a pre-stamped file; The inserting module is specifically used to locate the four state nodes of the stamp pattern by parsing the stamp pattern data; By analyzing the stamp state graphics elements corresponding to the four state nodes one by one, determining the graphics element type of each stamp state graphics element, and analyzing the graphics element attributes respectively, a graphics element list is generated; By parsing the seal position information in the stamp style data, the number of times the seal appears in the OFD original file is obtained, and a position list is generated; The insertion module is specifically used to parse the OFD original file according to the OFD syntax standard to form an OFD object memory model with a three-level relationship among documents, pages and layers; create OFD composite object resources item by item, and the OFD composite object resources are used to display the stamp styles in different states in the OFD original file; create OFD objects respectively according to the primitive type of each primitive in the primitive list, and insert OFD composite object resources into the OFD object; convert primitive data and attributes to the OFD object according to the primitive type of each primitive; enumerate signature positions, and create an OFD composite object for each signature position.
5. The system according to claim 4, characterized in that The graphic element types used by the stamp style template include text and free paths, the attributes supported by the stamp style template include font, font size, color, line width and path drawing instructions, and the states supported by the stamp style template include waiting for signature, unverified, verified successfully and verified failed.
6. The system according to claim 4, characterized in that Also includes: The signature module is used to parse and identify the stamp layer in the pre-stamped file through the OFD reading software when the user opens the pre-stamped file, and generate a pre-stamped position guide based on the stamp layer; when the user triggers the signature action, the OFD reading software executes the stamp status switching action and the standard digital signature process.
Citation Information
Patent Citations
Method and device for dynamically adding watermarks
CN116127916A
Seal management method and platform, electronic equipment and storage medium
CN117522094A