DWF file signature method and device, computer equipment and storage medium
By decompressing, analyzing and updating the DWF file, DWF signature files containing signature information are generated, which solves the completeness of the content of electronic signatures of DWF files, improves the efficiency of picture review and reduces costs.
Patent Information
- Application Number
- CN202510527314.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-08
AI Technical Summary
The lack of effective electronic signature method for DWF file in the prior art leads to easy loss of files and version compatibility issues, and the integrity of file content cannot be ensured.
By decompressing the DWF compressed file, parsing the initial manifest file to obtain file attributes, creating the initial w2d file and writing the signature picture, traversing the description file to obtain the content string, merging the signature string and updating the description file, generating the DWF signature file.
It realizes effective signatures and seals on the basis of ensuring the integrity of the document content, solves the electronic signatures and seals of DWF files, simplifies the drawing processing process, improves the efficiency of drawing review and reduces costs.
Smart Images

Figure CN120449824A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of file signing, and in particular to a DWF file signing method, device, computer equipment and storage medium. Background Art
[0002] Because the DWG (Drawing Format) format can be prone to font incompatibility, information loss, and file modification, many digital drawing reviews require uploading drawings in the Design Web Format (DWF) format. Furthermore, DWF files require signatures for easier management. Therefore, DWF file signature technology is playing an increasingly important role in digital drawing review and management. Currently, there's a lack of a technology for electronically stamping DWF files. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to overcome the deficiencies in the prior art and provide a DWF file signing method, device, computer equipment and storage medium for signing files in DWF format, which can effectively sign on the basis of ensuring the integrity of the file content.
[0004] The present invention provides the following technical solutions:
[0005] In a first aspect, the present invention provides a DWF file signing method, comprising:
[0006] Decompressing the DWF compressed file to obtain an initial list file and an initial description file of the DWF compressed file;
[0007] Parsing the initial manifest file to obtain file attributes;
[0008] Creating an initial w2d file, and writing a preset signature image into the initial w2d file according to the file attributes to obtain a target w2d file;
[0009] Traverse the initial description file according to the initial manifest file to obtain the file content string of the DWF compressed file; obtain the signature string according to the target w2d file;
[0010] The initial description file is updated according to the file content character string and the signature character string to obtain a DWF signature file.
[0011] In one embodiment, the file attributes include conversion attributes, and writing the preset signature image into the initial w2d file according to the file attributes to obtain the target w2d file includes:
[0012] Obtaining the image size parameters and preset position parameters of the preset signature image;
[0013] Convert the image size parameter and the preset position parameter according to the conversion attribute to obtain a target size parameter and a target position parameter;
[0014] The preset signature image is written into the initial w2d file according to the target size parameter and the target position parameter to obtain the target w2d file.
[0015] In one embodiment, the initial manifest file includes a plurality of description file paths, the initial description file includes a first preset character node, and the first preset character node is used to indicate the dynamically transmitted 2D graphics data in the description file;
[0016] The traversing the initial description file according to the initial list file to obtain the file content character string of the DWF compressed file includes:
[0017] Traversing and parsing all first preset role nodes in the initial description file according to the description file paths;
[0018] If the current first preset role node does not include a preset identification attribute, then the character string corresponding to the current first preset role node is read as the file content character string, and the preset identification attribute is used to identify the signature file.
[0019] In one embodiment, the initial description file further includes a second preset character node, and the second preset character node is used to indicate the static 2D vector graphics data in the description file;
[0020] The traversing the initial description file according to the initial list file to obtain the file content character string of the DWF compressed file also includes:
[0021] All second preset character nodes in the initial description file are traversed and parsed according to the description file paths, so as to save the character strings corresponding to the second preset character nodes as the file content character strings.
[0022] In one embodiment, the updating of the initial description file according to the file content string and the signature string to obtain the DWF signature file includes:
[0023] Merge the file content string and the signature string into a target string, and construct a target XML file according to the target string;
[0024] Add a first directory line and a second directory line to the initial description file to obtain a target description file, wherein the first directory line is used to describe the target w2d file, and the second directory line is used to describe the target xml file;
[0025] The target description file is compressed to obtain the DWF signature file.
[0026] In one embodiment, constructing a target XML file according to the target character string includes:
[0027] Calculate the target character string using a hash value to obtain a target hash value, and perform Base64 encoding on the target hash value;
[0028] The Base64-encoded target hash value is signed, and the target XML file is constructed according to the signed target hash value.
[0029] In one embodiment, the method further comprises:
[0030] Reading the original w2d file, the vector mark file and the target w2d file corresponding to the DWF compressed file to obtain a verification string;
[0031] Read the p7 data in the target XML file;
[0032] The DWF signature file is verified according to the verification string and the p7 data.
[0033] In a second aspect, the present invention provides a DWF file signing device, comprising:
[0034] A decompression module, used for decompressing the DWF compressed file to obtain an initial list file and an initial description file of the DWF compressed file;
[0035] A parsing module, configured to parse the initial manifest file to obtain file attributes;
[0036] A creation module is used to create an initial w2d file and write a preset signature image into the initial w2d file according to the file attributes to obtain a target w2d file;
[0037] A traversal module is used to traverse the initial description file according to the initial list file to obtain the file content string of the DWF compressed file; and obtain the signature string according to the target w2d file;
[0038] An updating module is used to update the initial description file according to the file content character string and the signature character string to obtain a DWF signature file.
[0039] In a third aspect, the present invention proposes a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the DWF file signing method as described in the first aspect is implemented.
[0040] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the DWF file signing method as described in the first aspect.
[0041] The DWF file signing method, device, computer equipment and storage medium disclosed in the present invention decompress a DWF compressed file to obtain an initial list file and an initial description file of the DWF compressed file; parse the initial list file to obtain file attributes; establish an initial w2d file, and write a preset signature image into the initial w2d file according to the file attributes to obtain a target w2d file; traverse the initial description file according to the initial list file to obtain a file content string of the DWF compressed file; obtain a signature string according to the target w2d file; and update the initial description file according to the file content string and the signature string to obtain a DWF signature file. In this way, by decompressing the DWF compressed file and traversing the decompressed file, a file content string containing the content of the DWF compressed file is obtained; and a target w2d file containing a preset signature image adapted to the DWF compressed file is read to obtain a signature string; and the initial description file is updated according to the file content string and the signature string to obtain a DWF signature file, thereby achieving effective signing while ensuring the integrity of the DWF file content. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope of protection of the present invention. In each of the drawings, similar components are numbered similarly.
[0043] Figure 1 A schematic diagram of a process of the DWF file signing method proposed in this embodiment is shown;
[0044] Figure 2 Another schematic diagram of the process of signing a DWF file proposed in this embodiment is shown;
[0045] Figure 3 Another schematic diagram of the process of the DWF file signing method proposed in this embodiment is shown;
[0046] Figure 4FIG. 2 shows another flow chart of the DWF file signing method proposed in this embodiment;
[0047] Figure 5 Another flowchart of the DWF file signing method proposed in this embodiment is shown;
[0048] Figure 6 A structural diagram of the DWF file signing device proposed in this embodiment is shown.
[0049] Description of the accompanying drawings:
[0050] 600-DWF file signing device; 601-decompression module; 602-parsing module; 603-creation module; 604-traversal module; 605-update module. DETAILED DESCRIPTION
[0051] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0052] The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the figures is not intended to limit the scope of the claimed invention, but rather merely represents selected embodiments of the present invention. All other embodiments derived by those skilled in the art based on the embodiments of the present invention without inventive effort are intended to be within the scope of protection of the present invention.
[0053] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present invention, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or the possibility of adding one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.
[0054] Furthermore, the terms “first,” “second,” “third,” etc., are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0055] Unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by those skilled in the art to which the various embodiments of the present invention pertain. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meaning as in the context of the relevant technical field and will not be interpreted as having an idealized meaning or an overly formal meaning unless clearly defined in the various embodiments of the present invention.
[0056] Example 1
[0057] Electronic signatures can be used to verify the identity of a document's author or sender. When a DWF file is electronically signed, the recipient can confirm that the document is indeed from the designated author or organization. This is crucial for preventing forgery and impersonation. DWF format signatures mitigate version compatibility issues and address the risk of data element loss and irreusability when converting drawings to PDF / OFD formats.
[0058] The embodiment of the present disclosure provides a DWF file signing method for signing a file in the DWF format, which can ensure the integrity of the file content based on the signing.
[0059] See Figure 1 The DWF file signing method includes steps S101 to S105, and each step is described in detail below.
[0060] Step S101: decompress the DWF compressed file to obtain an initial list file and an initial description file of the DWF compressed file.
[0061] In this embodiment, the DWF compressed file is decompressed to a temporary directory to obtain the initial manifest file (manifest.xml) and initial description file (descriptor.xml) of the DWF compressed file. The manifest.xml file contains the descriptor.xml path of each page description file in the initial description file.
[0062] Step S102: Parse the initial manifest file to obtain file attributes.
[0063] In this embodiment, the descriptor.xml file is parsed to save various file attributes. File attributes include the dimensions (units), coordinates (clip), file path (href), and transform attributes. The units attribute contains the dimensions (mm for millimeters, in for inches); the clip attribute contains the coordinates of the lower left and upper right corners of the drawing; the href attribute contains the file path; and the transform attribute contains the transformation matrix.
[0064] Step S103 , creating an initial w2d file, and writing a preset signature image into the initial w2d file according to the file attributes, to obtain a target w2d file.
[0065] In this embodiment, a blank w2d file is created as an initial w2d file, which can be used to store and share design data in a DWF file.
[0066] The preset signature image is written into the initial w2d file according to the file attributes to obtain the target w2d file. The signature in the target w2d file is adapted to the size, coordinates and format of the DWF compressed file content.
[0067] See Figure 2 In a specific embodiment, step S103 includes steps S1031 to S1033, and each step is described in detail below.
[0068] Step S1031: Acquire the image size parameters and preset position parameters of the preset signature image.
[0069] In this embodiment, the image size parameter and the preset position parameter of the preset signature image are obtained. The image size parameter is used to indicate the actual size of the preset signature image, and the preset position parameter is used to indicate the preset signature position of the preset signature image.
[0070] Step S1032: convert the image size parameter and the preset position parameter according to the conversion attribute to obtain a target size parameter and a target position parameter.
[0071] In this embodiment, the image size parameters and the preset position parameters are converted into target size parameters and target position parameters that are adapted to the size, coordinates, units, etc. of the DWF compressed file according to the conversion attributes.
[0072] Exemplarily, the conversion process involves unit normalization, application of a transformation matrix, and clipping region adaptation.
[0073] For unit standardization, if the units are mm or in, they need to be converted to the base unit of the DWF compressed file (such as pixels px).
[0074] For transformation matrices, adjust the size and position based on the matrix or transformation function in transform. For example, you can use the formula: new size = original size × scale factor to convert the size, and new coordinates = coordinates after matrix transformation to convert the position.
[0075] For clipping area adaptation, if clip exists, ensure that the converted signature position and size are within the range of (x1, y1, x2, y2), and truncate the excess part.
[0076] Step S1033 : Writing the preset signature image into the initial w2d file according to the target size parameter and the target position parameter to obtain the target w2d file.
[0077] In this embodiment, the preset signature image is adjusted to a specified size and a specified format according to the target size parameters, and the adjusted image is written to a specified location of the initial w2d file to obtain a target w2d file.
[0078] Step S104: traverse the initial description file according to the initial manifest file to obtain the file content string of the DWF compressed file; and obtain the signature string according to the target w2d file.
[0079] In this embodiment, the initial description file is parsed according to the paths in the initial manifest file to obtain the file content string of the DWF compressed file; and the signature string is obtained based on the target w2d file. The file content string contains information related to the file content of the DWF compressed file, while the signature string contains information such as the location and size of the preset signature.
[0080] See Figure 3 In a specific embodiment, the initial manifest file includes multiple description file paths, the initial description file includes a first preset character node, and the first preset character node is used to indicate the dynamically transmitted 2D graphic data in the description file; step S104 includes steps S1041 to S1042, and each step is described in detail below.
[0081] Step S1041: traverse and parse all first preset character nodes in the initial description file according to the description file paths.
[0082] In this embodiment, the first preset character node may be a "2D streaming graphics" character node. All "2D streaming graphics" character nodes in the initial description file are traversed and parsed according to the paths of the description files.
[0083] Step S1042: If the current first preset role node does not include a preset identification attribute, then read the character string corresponding to the current first preset role node as the file content character string, and the preset identification attribute is used to identify the signature file.
[0084] In this embodiment, the preset identification attribute may be Property name="AztSigId". If the current "2dstreaming graphics" role node does not contain Property name="AztSigId", then the file corresponding to the current "2dstreaming graphics" role node does not belong to the seal, and the string corresponding to the current "2d streaming graphics" role node may be read as the file content string.
[0085] In a specific embodiment, the initial description file also includes a second preset character node, which is used to indicate static 2D vector graphics data in the description file; step S104 also includes: traversing and parsing all second preset character nodes in the initial description file according to each description file path to save the character string corresponding to each second preset character node as the file content string.
[0086] In this embodiment, the second preset role node may be a "2D vector markup" role node. All "2D vector markup" role nodes in the initial description file are traversed and parsed according to the paths of the description files to save the character strings corresponding to the "2D vector markup" role nodes as the file content character strings. The character strings corresponding to the "2D vector markup" role nodes include the character strings related to annotations and marks in the DWF compressed file.
[0087] Step S105 : updating the initial description file according to the file content character string and the signature character string to obtain a DWF signature file.
[0088] In this embodiment, the initial description file is updated according to the file content string and the signature string to obtain the original file content of the DWF compressed file and the DWF signature file containing the signature information adapted to the content of the DWF compressed file. This achieves adaptive signature while ensuring the integrity of the original DWF file content, simplifies the drawing processing process, reduces the offline paper document printing and stamping steps, improves the drawing review efficiency and reduces costs.
[0089] See Figure 4 In a specific embodiment, step S105 includes steps S1051 to S1053, and each step is described in detail below.
[0090] Step S1051: merge the file content character string and the signature character string into a target character string, and construct a target XML file according to the target character string.
[0091] In this embodiment, the file content character string and the signature character string are combined into a target character string, and a new XML file is created. The XML is updated according to the target character string to obtain a target XML file.
[0092] See Figure 5 In a specific embodiment, step S1051 includes steps S501 to S502, and each step is described in detail below.
[0093] Step S501 , performing hash value calculation on the target character string to obtain a target hash value, and performing Base64 encoding on the target hash value.
[0094] In this embodiment, a target hash value of a target character string is generated using an encrypted hash algorithm, and the binary target hash value is Base64-encoded to be converted into a Base64 character string for easy embedding in an XML file.
[0095] Step S502: Sign the Base64-encoded target hash value, and construct the target XML file according to the signed target hash value.
[0096] In this embodiment, an asymmetric encryption algorithm is used to sign the Base64-encoded target hash value. The signed target hash value is then written to a newly created XML file, resulting in the target XML file. The recipient can verify the signature using the public key and compare the hash value to confirm that the DWF file content has not been tampered with, thereby verifying the file's integrity.
[0097] Step S1052: Add a first directory line and a second directory line to the initial description file to obtain a target description file, wherein the first directory line is used to describe the target w2d file, and the second directory line is used to describe the target xml file.
[0098] In this embodiment, a first directory line for describing the target w2d file and a second directory line for describing the target xml file are added to the initial description file to obtain a target description file.
[0099] Step S1053: compress the target description file to obtain the DWF signature file.
[0100] In this embodiment, the target description file is compressed to obtain a final DWF signature file.
[0101] In a specific embodiment, the method also includes: reading the original w2d file, vector mark file and the target w2d file corresponding to the DWF compressed file to obtain a verification string; reading the p7 data in the target xml file; and verifying the DWF signature file based on the verification string and the p7 data.
[0102] In this embodiment, after obtaining a DWF signature file, the validity of the DWF signature file can be verified. Specifically, the DWF compressed file is decompressed to a temporary directory to read the strings in the original w2d file, the vector markup file, and the target w2d file corresponding to the file. The strings read from the three files are then combined to form the verification string. The original w2d file is the w2d file of the DWF compressed file before it is signed.
[0103] The p7 data in the target XML file is further read, and the target XML file can be found by presetting the object identifier (OID) corresponding to the signature image.
[0104] The verification string is further hashed to obtain a verification hash value, which is then Base64-encoded, thereby verifying the DWF signature file based on the Base64-encoded verification hash value and the p7 data.
[0105] It should be noted that when it is necessary to revoke the signature of a DWF signature file, the DWF signature file can be unzipped to a temporary directory; obtain the OID of the signature to be revoked in the DWF signature file, parse the description file corresponding to the DWF signature file, delete the w2d file and xml file corresponding to the OID of the signature to be revoked, as well as the description information corresponding to the OID of the signature to be revoked in the description file; then, re-compress the temporary directory to generate the DWF file after the signature is revoked.
[0106] The DWF file signing method proposed in this embodiment decompresses a DWF compressed file to obtain an initial manifest file and an initial description file of the DWF compressed file; parses the initial manifest file to obtain file attributes; creates an initial w2d file and writes a preset signature image into the initial w2d file according to the file attributes to obtain a target w2d file; traverses the initial description file according to the initial manifest file to obtain the file content string of the DWF compressed file; obtains a signature string according to the target w2d file; updates the initial description file according to the file content string and the signature string to obtain a DWF signature file. In this way, by decompressing the DWF compressed file and traversing the decompressed file to obtain a file content string containing the content of the DWF compressed file; and reading a target w2d file adapted to the DWF compressed file and containing a preset signature image to obtain a signature string; the initial description file is updated according to the file content string and the signature string to obtain a DWF signature file, thereby achieving effective signing while ensuring the integrity of the DWF file content.
[0107] Example 2
[0108] In addition, the present disclosure provides a DWF file signing device 600, see Figure 6 , the device comprises:
[0109] A decompression module 601 is used to decompress the DWF compressed file to obtain an initial list file and an initial description file of the DWF compressed file;
[0110] Parsing module 602, used to parse the initial manifest file to obtain file attributes;
[0111] The creation module 603 is used to create an initial w2d file and write a preset signature image into the initial w2d file according to the file attributes to obtain a target w2d file;
[0112] The traversal module 604 is configured to traverse the initial description file according to the initial manifest file to obtain the file content string of the DWF compressed file; and obtain the signature string according to the target w2d file;
[0113] The updating module 605 is configured to update the initial description file according to the file content character string and the signature character string to obtain a DWF signature file.
[0114] Optionally, the file attributes include conversion attributes, and the establishment module 603 is also used to obtain the image size parameters and preset position parameters of the preset signature image; convert the image size parameters and the preset position parameters according to the conversion attributes to obtain target size parameters and target position parameters; write the preset signature image into the initial w2d file according to the target size parameters and the target position parameters to obtain the target w2d file.
[0115] Optionally, the initial manifest file includes multiple description file paths, and the initial description file includes a first preset character node, which is used to indicate the dynamically transmitted 2D graphic data in the description file; the traversal module 604 is also used to traverse and parse all first preset character nodes in the initial description file according to each of the description file paths; if the current first preset character node does not contain a preset identification attribute, the string corresponding to the current first preset character node is read as the file content string, and the preset identification attribute is used to identify the signature file.
[0116] Optionally, the initial description file also includes a second preset character node, which is used to indicate the static 2D vector graphics data in the description file; the traversal module 604 is also used to traverse and parse all the second preset character nodes in the initial description file according to each description file path to save the character string corresponding to each second preset character node as the file content string.
[0117] Optionally, the update module 605 is also used to merge the file content string and the signature string into a target string, and construct a target XML file based on the target string; add a first directory line and a second directory line to the initial description file to obtain a target description file, wherein the first directory line is used to describe the target w2d file, and the second directory line is used to describe the target XML file; and compress according to the target description file to obtain the DWF signature file.
[0118] Optionally, the update module 605 is further configured to perform hash value calculation on the target character string to obtain a target hash value, and perform Base64 encoding on the target hash value; sign the Base64-encoded target hash value, and construct the target XML file according to the signed target hash value.
[0119] Optionally, the device also includes a verification module for reading the original w2d file, vector mark file and the target w2d file corresponding to the DWF compressed file to obtain a verification string; reading the p7 data in the target xml file; and verifying the DWF signature file based on the verification string and the p7 data.
[0120] The device provided in the embodiment of the present disclosure can execute the steps of the DWF file signing method provided in Example 1, which will not be described again to avoid repetition.
[0121] The DWF file signing device proposed in this embodiment decompresses a DWF compressed file to obtain an initial manifest file and an initial description file of the DWF compressed file; parses the initial manifest file to obtain file attributes; creates an initial w2d file and writes a preset signature image into the initial w2d file according to the file attributes to obtain a target w2d file; traverses the initial description file according to the initial manifest file to obtain a file content string of the DWF compressed file; obtains a signature string according to the target w2d file; updates the initial description file according to the file content string and the signature string to obtain a DWF signature file. In this way, by decompressing the DWF compressed file and traversing the decompressed file to obtain a file content string containing the DWF compressed file content; and reading a target w2d file adapted to the DWF compressed file and containing a preset signature image to obtain a signature string; the initial description file is updated according to the file content string and the signature string to obtain a DWF signature file, thereby achieving effective signing while ensuring the integrity of the DWF file content.
[0122] Example 3
[0123] In addition, an embodiment of the present disclosure provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the DWF file signing method described in Example 1 is implemented.
[0124] The device provided in the embodiment of the present disclosure can execute the steps of the DWF file signing method provided in Example 1, which will not be described again to avoid repetition.
[0125] Example 4
[0126] The embodiment of the present disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the DWF file signing method described in the first embodiment is implemented.
[0127] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0128] The computer-readable storage medium provided in this embodiment can implement the DWF file signing method provided in Example 1, and will not be described again here to avoid repetition.
[0129] In all examples shown and described herein, any specific values should be interpreted as merely exemplary and not limiting, and thus other examples of the exemplary embodiments may have different values.
[0130] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.
[0131] The above-described embodiments merely illustrate several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that variations and modifications are possible without departing from the scope of the present invention, and such variations and modifications are fully within the scope of protection of the present invention.
Claims
1. A DWF file signing method, characterized in that: include: Decompressing the DWF compressed file to obtain an initial list file and an initial description file of the DWF compressed file; Parsing the initial manifest file to obtain file attributes; Creating an initial w2d file, and writing a preset signature image into the initial w2d file according to the file attributes to obtain a target w2d file; Traversing the initial description file according to the initial list file to obtain a file content character string of the DWF compressed file; Obtain a signature string according to the target w2d file; The initial description file is updated according to the file content character string and the signature character string to obtain a DWF signature file.
2. The DWF file signing method according to claim 1, characterized in that: The file attributes include conversion attributes, and the step of writing the preset signature image into the initial w2d file according to the file attributes to obtain the target w2d file includes: Obtaining the image size parameters and preset position parameters of the preset signature image; Convert the image size parameter and the preset position parameter according to the conversion attribute to obtain a target size parameter and a target position parameter; The preset signature image is written into the initial w2d file according to the target size parameter and the target position parameter to obtain the target w2d file.
3. The DWF file signing method according to claim 1, characterized in that: The initial manifest file includes a plurality of description file paths, the initial description file includes a first preset character node, and the first preset character node is used to indicate the dynamically transmitted 2D graphic data in the description file; The traversing the initial description file according to the initial list file to obtain the file content character string of the DWF compressed file includes: Traversing and parsing all first preset role nodes in the initial description file according to the description file paths; If the current first preset role node does not include a preset identification attribute, then the character string corresponding to the current first preset role node is read as the file content character string, and the preset identification attribute is used to identify the signature file.
4. The DWF file signing method according to claim 3, characterized in that: The initial description file further includes a second preset character node, where the second preset character node is used to indicate the static 2D vector graphics data in the description file; The traversing the initial description file according to the initial list file to obtain the file content character string of the DWF compressed file also includes: All second preset character nodes in the initial description file are traversed and parsed according to the description file paths, so as to save the character strings corresponding to the second preset character nodes as the file content character strings.
5. The DWF file signing method according to claim 1, wherein: The updating of the initial description file according to the file content character string and the signature character string to obtain a DWF signature file includes: Merge the file content string and the signature string into a target string, and construct a target XML file according to the target string; Add a first directory line and a second directory line to the initial description file to obtain a target description file, wherein the first directory line is used to describe the target w2d file, and the second directory line is used to describe the target xml file; The target description file is compressed to obtain the DWF signature file.
6. The DWF file signing method according to claim 5, characterized in that: The step of constructing a target XML file according to the target character string includes: Calculate the target character string using a hash value to obtain a target hash value, and perform Base64 encoding on the target hash value; The Base64-encoded target hash value is signed, and the target XML file is constructed according to the signed target hash value.
7. The DWF file signing method according to claim 5, characterized in that: The method further comprises: Reading the original w2d file, the vector mark file and the target w2d file corresponding to the DWF compressed file to obtain a verification string; Read the p7 data in the target XML file; The DWF signature file is verified according to the verification string and the p7 data.
8. A DWF file signing device, characterized in that: include: A decompression module, used for decompressing the DWF compressed file to obtain an initial list file and an initial description file of the DWF compressed file; A parsing module, configured to parse the initial manifest file to obtain file attributes; A creation module is used to create an initial w2d file and write a preset signature image into the initial w2d file according to the file attributes to obtain a target w2d file; A traversal module, configured to traverse the initial description file according to the initial list file to obtain a file content character string of the DWF compressed file; Obtain a signature string according to the target w2d file; An updating module is used to update the initial description file according to the file content character string and the signature character string to obtain a DWF signature file.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the DWF file signing method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that It stores a computer program, which, when executed by a processor, implements the DWF file signing method according to any one of claims 1 to 7.