CN112732649A - OFD document signing method, electronic device and medium - Google Patents

OFD document signing method, electronic device and medium Download PDF

Info

Publication number
CN112732649A
CN112732649A CN202011522051.2A CN202011522051A CN112732649A CN 112732649 A CN112732649 A CN 112732649A CN 202011522051 A CN202011522051 A CN 202011522051A CN 112732649 A CN112732649 A CN 112732649A
Authority
CN
China
Prior art keywords
file
signature
ofd
files
updating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011522051.2A
Other languages
Chinese (zh)
Other versions
CN112732649B (en
Inventor
刘培
李孝猛
钟源
张玮
耿方
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aisino Corp
Original Assignee
Aisino Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aisino Corp filed Critical Aisino Corp
Priority to CN202011522051.2A priority Critical patent/CN112732649B/en
Publication of CN112732649A publication Critical patent/CN112732649A/en
Application granted granted Critical
Publication of CN112732649B publication Critical patent/CN112732649B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

The application discloses an OFD document signing method, electronic equipment and a medium. The method can comprise the following steps: step 1: reading a file list in the OFD file, and acquiring each file path; step 2: determining a file to be protected according to the file path; and step 3: establishing a signature file stream, performing data summarization on all files to be protected according to the reading length of the files to be protected, and inserting the summaries into the signature files; and 4, step 4: after updating the signature list file, the main entry file and the signature file, compressing and storing the signature list file, the main entry file and the signature file into an OFD file; and 5: and (4) performing summary and signature on the signature file, compressing and storing the signature data stream into the OFD file, and finishing one-time signature. The invention realizes the signature operation with high speed and high efficiency by directly abstracting and setting the thread according to the reading length.

Description

OFD document signing method, electronic device and medium
Technical Field
The present invention relates to the field of data processing, and more particularly, to an OFD document signing method, an electronic device, and a medium.
Background
The current OFD signature method mostly decompresses the OFD file into a folder and then processes the OFD file, and the read-write time influences the overall OFD signature time; the conventional OFD signature method mostly performs sequential summarization on files needing summarization, when large internal documents exist, summarization time is long, and even if summarization is performed in parallel, the size of the internal documents is not distinguished, parallel operation is performed uniformly, and computer resources are occupied.
Therefore, it is necessary to develop an OFD document signing method, an electronic apparatus, and a medium that improve the OFD signing speed.
The information disclosed in this background section is only for enhancement of understanding of the general background of the invention and should not be taken as an acknowledgement or any form of suggestion that this information forms the prior art already known to a person skilled in the art.
Disclosure of Invention
The invention provides an OFD document signing method, electronic equipment and a medium, which can realize fast and efficient signing operation by directly abstracting and setting threads according to reading length.
In a first aspect, an embodiment of the present disclosure provides an OFD document signing method, including:
step 1: reading a file list in the OFD file, and acquiring each file path;
step 2: determining a file to be protected according to the file path;
and step 3: establishing a signature file stream, performing data summarization on all files to be protected according to the reading length of the files to be protected, and inserting the summaries into the signature files;
and 4, step 4: after updating the signature list file, the main entry file and the signature file, compressing and storing the signature list file, the main entry file and the signature file into the OFD file;
and 5: and performing abstract and signature on the signature file, compressing and storing a signature data stream into the OFD file, and finishing one-time signature.
Preferably, determining the file to be protected comprises:
and reading the files in the OFD file to an internal memory in sequence, reading the file name according to the file path, judging whether an abstract is needed, if so, classifying the files into the files to be protected, and if not, reading the next file.
Preferably, the step 3 comprises:
and judging whether the reading length is larger than a set threshold value, if so, creating a thread to perform data summarization on the file to be protected and insert the summary into the signature file, and if not, directly summarizing the file to be protected and inserting the summary into the signature file.
Preferably, the step 4 further comprises:
before updating the signature list file, judging whether the signature list file exists or not, if so, directly updating, and if not, updating after newly establishing the signature list file.
Preferably, updating the master entry file comprises:
and updating the main entry file and the abstract, and inserting the abstract into the signature file.
Preferably, updating the signature file comprises:
and updating the signature information of the signature file.
Preferably, the signature information includes a signature method and a signature time.
Preferably, steps 1-5 are repeated multiple times to complete multiple signatures.
As a specific implementation of the embodiments of the present disclosure,
in a second aspect, an embodiment of the present disclosure further provides an electronic device, including:
a memory storing executable instructions;
a processor executing the executable instructions in the memory to implement the OFD document signing method.
In a third aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the OFD document signing method.
The beneficial effects are that:
1. for the files needing the abstract, reading file data into an internal memory from the OFD file, directly abstracting, and saving the reading and writing time of the files without decompressing the OFD file into the files and reading the files;
2. and for the file data with the size smaller than the set value, directly abstracting the file data and inserting the abstract value into the signature file.
The method and apparatus of the present invention have other features and advantages which will be apparent from or are set forth in detail in the accompanying drawings and the following detailed description, which are incorporated herein, and which together serve to explain certain principles of the invention.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent by describing in more detail exemplary embodiments thereof with reference to the attached drawings, in which like reference numerals generally represent like parts.
FIG. 1 shows a flow diagram of the steps of an OFD document signing method according to one embodiment of the present invention.
Detailed Description
Preferred embodiments of the present invention will be described in more detail below. While the following describes preferred embodiments of the present invention, it should be understood that the present invention may be embodied in various forms and should not be limited by the embodiments set forth herein.
FIG. 1 shows a flow diagram of the steps of an OFD document signing method according to one embodiment of the present invention.
The invention provides an OFD document signing method, which comprises the following steps:
step 1: reading a file list in the OFD file, and acquiring each file path;
step 2: determining a file to be protected according to the file path;
and step 3: establishing a signature file stream, performing data summarization on all files to be protected according to the reading length of the files to be protected, and inserting the summaries into the signature files;
and 4, step 4: after updating the signature list file, the main entry file and the signature file, compressing and storing the signature list file, the main entry file and the signature file into an OFD file;
and 5: and (4) performing summary and signature on the signature file, compressing and storing the signature data stream into the OFD file, and finishing one-time signature.
In one example, determining the file to be protected includes:
reading files in the OFD file to an internal memory in sequence, reading file names according to file paths, judging whether an abstract is needed, if so, classifying the files into the files needing to be protected, and if not, reading the next file.
In one example, step 3 comprises:
and judging whether the reading length is greater than a set threshold value, if so, creating a thread to perform data summarization on the file to be protected and insert the summary into the signature file, and if not, directly summarizing the file to be protected and inserting the summary into the signature file.
In one example, step 4 further comprises:
before updating the signature list file, judging whether the signature list file exists, if so, directly updating, and if not, updating after newly establishing the signature list file.
In one example, updating the master portal file includes:
and updating the main entry file and the abstract, and inserting the abstract into the signature file.
In one example, updating the signature file includes:
and updating the signature information of the signature file.
In one example, the signature information includes a signature method, a signature time.
In one example, steps 1-5 are repeated multiple times, completing multiple signatures.
Specifically, the OFD document signing method according to the present invention includes:
step 1: reading a file list in the OFD file, determining the number of compressed files, and acquiring each file path;
step 2: determining a file to be protected according to the file path: reading files in the OFD file to an internal memory in sequence, reading file names according to file paths, judging whether an abstract is needed, if so, classifying the files into the files needing to be protected, and if not, reading the next file;
and step 3: establishing a signature file stream, judging whether the reading length is larger than a set threshold value or not according to the reading length (namely the size of the file) of the file to be protected, if so, establishing a thread to perform data summarization on the file to be protected and insert the summary into the signature file (signature.xml), and if not, directly summarizing the file to be protected and inserting the summary into the signature file; during summarization, files needing to be protected do not need to be decompressed into files and read, but are directly summarized, so that the reading and writing time of the files is saved;
and 4, step 4: updating a signature list file (signatures. xml), before updating, judging whether the signature list file exists, if so, directly updating, and if not, updating after newly creating the signature list file; xml, updating the main entry file (ofd) and the digest, and inserting the digest into the signature file; after updating the information of signature method, signature time and the like of the signature file, compressing and storing the updated signature file, signature list file and main entry file into an OFD file;
and 5: and (4) performing summary and signature on the signature file, compressing and storing the signature data stream into the OFD file, and finishing one-time signature.
Repeating the steps 1-5 for multiple times to finish multiple signatures.
The present invention also provides an electronic device, comprising: a memory storing executable instructions; and the processor runs the executable instructions in the memory to realize the OFD document signing method.
The present invention also provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the OFD document signing method described above.
To facilitate understanding of the solution of the embodiments of the present invention and the effects thereof, three specific application examples are given below. It will be understood by those skilled in the art that this example is merely for the purpose of facilitating an understanding of the present invention and that any specific details thereof are not intended to limit the invention in any way.
Example 1
Step 1: reading a file list in the OFD file, determining the number of compressed files, and acquiring each file path;
step 2: determining a file to be protected according to the file path: reading files in the OFD file to an internal memory in sequence, reading file names according to file paths, judging whether an abstract is needed, if so, classifying the files into the files needing to be protected, and if not, reading the next file;
and step 3: establishing a signature file stream, judging whether the reading length is larger than a set threshold value or not according to the reading length (namely the size of the file) of the file to be protected, if so, creating a thread to perform data summarization on the file to be protected and insert the summary into signature. During summarization, files needing to be protected do not need to be decompressed into files and read, but are directly summarized, so that the reading and writing time of the files is saved;
and 4, step 4: updating signatures.xml, before updating, judging whether the signatures.xml exists, if so, directly updating, and if not, updating after newly building the signatures.xml; updating OFD.xml and abstracting, and inserting the abstract into signature.xml; after information such as signature method and signature time of signature is updated, compressing and storing the updated signature, signature and xml and OFD.xml into an OFD file;
and 5: and (4) abstracting and signing the signature, compressing and storing the signed data stream into an OFD (office file) file, and finishing one-time signing.
Repeating the steps 1-5 for multiple times to finish multiple signatures.
Example 2
The present disclosure provides an electronic device including: a memory storing executable instructions; and the processor runs the executable instructions in the memory to realize the OFD document signing method.
An electronic device according to an embodiment of the present disclosure includes a memory and a processor.
The memory is to store non-transitory computer readable instructions. In particular, the memory may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc.
The processor may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device to perform desired functions. In one embodiment of the disclosure, the processor is configured to execute the computer readable instructions stored in the memory.
Those skilled in the art should understand that, in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus, an interface, and the like, and these well-known structures should also be included in the protection scope of the present disclosure.
For the detailed description of the present embodiment, reference may be made to the corresponding descriptions in the foregoing embodiments, which are not repeated herein.
Example 3
The disclosed embodiments provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the OFD document signing method.
A computer-readable storage medium according to an embodiment of the present disclosure has non-transitory computer-readable instructions stored thereon. The non-transitory computer readable instructions, when executed by a processor, perform all or a portion of the steps of the methods of the embodiments of the disclosure previously described.
The computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROMs and DVDs), magneto-optical storage media (e.g., MOs), magnetic storage media (e.g., magnetic tapes or removable disks), media with built-in rewritable non-volatile memory (e.g., memory cards), and media with built-in ROMs (e.g., ROM cartridges).
It will be appreciated by persons skilled in the art that the above description of embodiments of the invention is intended only to illustrate the benefits of embodiments of the invention and is not intended to limit embodiments of the invention to any examples given.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments.

Claims (10)

1. An OFD document signing method is characterized by comprising the following steps:
step 1: reading a file list in the OFD file, and acquiring each file path;
step 2: determining a file to be protected according to the file path;
and step 3: establishing a signature file stream, performing data summarization on all files to be protected according to the reading length of the files to be protected, and inserting the summaries into the signature files;
and 4, step 4: after updating the signature list file, the main entry file and the signature file, compressing and storing the signature list file, the main entry file and the signature file into the OFD file;
and 5: and performing abstract and signature on the signature file, compressing and storing a signature data stream into the OFD file, and finishing one-time signature.
2. The OFD document signing method of claim 1, wherein determining the file to be protected comprises:
and reading the files in the OFD file to an internal memory in sequence, reading the file name according to the file path, judging whether an abstract is needed, if so, classifying the files into the files to be protected, and if not, reading the next file.
3. The OFD document signing method of claim 1, wherein said step 3 comprises:
and judging whether the reading length is larger than a set threshold value, if so, creating a thread to perform data summarization on the file to be protected and insert the summary into the signature file, and if not, directly summarizing the file to be protected and inserting the summary into the signature file.
4. The OFD document signing method of claim 1, wherein said step 4 further comprises:
before updating the signature list file, judging whether the signature list file exists or not, if so, directly updating, and if not, updating after newly establishing the signature list file.
5. The OFD document signing method of claim 1, wherein updating said master entry file comprises:
and updating the main entry file and the abstract, and inserting the abstract into the signature file.
6. The OFD document signing method of claim 1, wherein updating said signature file comprises:
and updating the signature information of the signature file.
7. The OFD document signing method of claim 6, wherein said signing information comprises signing method, signing time.
8. The OFD document signing method of claim 1, wherein steps 1-5 are repeated a plurality of times to complete a plurality of signatures.
9. An electronic device, characterized in that the electronic device comprises:
a memory storing executable instructions;
a processor executing the executable instructions in the memory to implement the OFD document signing method of any one of claims 1-8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the OFD document signing method of any one of claims 1 to 8.
CN202011522051.2A 2020-12-21 2020-12-21 OFD document signing method, electronic equipment and medium Active CN112732649B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011522051.2A CN112732649B (en) 2020-12-21 2020-12-21 OFD document signing method, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011522051.2A CN112732649B (en) 2020-12-21 2020-12-21 OFD document signing method, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN112732649A true CN112732649A (en) 2021-04-30
CN112732649B CN112732649B (en) 2024-03-12

Family

ID=75605011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011522051.2A Active CN112732649B (en) 2020-12-21 2020-12-21 OFD document signing method, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN112732649B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040254842A1 (en) * 2003-06-13 2004-12-16 Jon Kirkegaard Order commitment method and system
EP1605368A1 (en) * 2004-05-18 2005-12-14 Ubs Ag Generation of electronical signature files
CA2716982A1 (en) * 2010-10-06 2010-12-23 Ibm Canada Limited - Ibm Canada Limitee Digital signatures on composite resource documents
AU2012216241A1 (en) * 1995-10-31 2012-09-06 Frederick S. M. Herz System for Customized Electronic Identification of Desirable Objects
CN104320253A (en) * 2014-09-28 2015-01-28 东北大学 Two-dimension code authentication system and method based on CBS signature mechanism
CN110929194A (en) * 2019-11-21 2020-03-27 山东鲁能软件技术有限公司 Abstract algorithm-based static resource file cache control method and system
CN111177801A (en) * 2019-12-31 2020-05-19 航天信息股份有限公司 Signature method and device of electronic document, storage medium and electronic equipment
CN111611440A (en) * 2020-05-01 2020-09-01 山东同智伟业软件股份有限公司 Method for rapidly improving OFD signature, signature and verification
CN111625787A (en) * 2020-05-21 2020-09-04 杭州尚尚签网络科技有限公司 OFD-based electronic signature multi-version traceable rapid signature checking method
CN111832081A (en) * 2020-07-21 2020-10-27 杭州天谷信息科技有限公司 OFD quick signing method
CN111897776A (en) * 2020-06-22 2020-11-06 百望股份有限公司 OFD document processing method, electronic device and computer-readable storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2012216241A1 (en) * 1995-10-31 2012-09-06 Frederick S. M. Herz System for Customized Electronic Identification of Desirable Objects
US20040254842A1 (en) * 2003-06-13 2004-12-16 Jon Kirkegaard Order commitment method and system
EP1605368A1 (en) * 2004-05-18 2005-12-14 Ubs Ag Generation of electronical signature files
CA2716982A1 (en) * 2010-10-06 2010-12-23 Ibm Canada Limited - Ibm Canada Limitee Digital signatures on composite resource documents
CN104320253A (en) * 2014-09-28 2015-01-28 东北大学 Two-dimension code authentication system and method based on CBS signature mechanism
CN110929194A (en) * 2019-11-21 2020-03-27 山东鲁能软件技术有限公司 Abstract algorithm-based static resource file cache control method and system
CN111177801A (en) * 2019-12-31 2020-05-19 航天信息股份有限公司 Signature method and device of electronic document, storage medium and electronic equipment
CN111611440A (en) * 2020-05-01 2020-09-01 山东同智伟业软件股份有限公司 Method for rapidly improving OFD signature, signature and verification
CN111625787A (en) * 2020-05-21 2020-09-04 杭州尚尚签网络科技有限公司 OFD-based electronic signature multi-version traceable rapid signature checking method
CN111897776A (en) * 2020-06-22 2020-11-06 百望股份有限公司 OFD document processing method, electronic device and computer-readable storage medium
CN111832081A (en) * 2020-07-21 2020-10-27 杭州天谷信息科技有限公司 OFD quick signing method

Also Published As

Publication number Publication date
CN112732649B (en) 2024-03-12

Similar Documents

Publication Publication Date Title
US8001273B2 (en) Parallel processing of input data to locate landmarks for chunks
US10884744B2 (en) System and method of loop vectorization by compressing indices and data elements from iterations based on a control mask
CN110019478B (en) Data import method, medium, device and apparatus
US20170308546A1 (en) File storage method and electronic device
US20100325083A1 (en) Skip list generation
US7900197B2 (en) Program initiation methods and embedded systems utilizing the same
CN117369731B (en) Data reduction processing method, device, equipment and medium
CN112732649A (en) OFD document signing method, electronic device and medium
CN112970004A (en) Information processing apparatus, information processing method, and information processing program
CN114356386A (en) Block differential upgrading method, terminal equipment and computer readable storage medium
CN112036133B (en) File storage method and device, electronic equipment and storage medium
CN110688223B (en) Data processing method and related product
CN112364580A (en) Method and device for automatically inserting specific code into register transmission level design file
CN111625254A (en) File processing method, device, terminal and storage medium
EP3507689B1 (en) Java card application package used as a library package
CN107436918B (en) Database implementation method, device and equipment
CN117271440B (en) File information storage method, reading method and related equipment based on freeRTOS
US8788483B2 (en) Method and apparatus for searching in a memory-efficient manner for at least one query data element
CN104794167A (en) Method and device for acquiring similar applications
CN112527745B (en) Embedded file system multi-partition analysis method, terminal device and storage medium
CN110858142A (en) Application starting method and device
CN115952172B (en) Data matching method and device based on database temporary table
CN113268145B (en) Physical input device input method, system, electronic device and storage medium
CN111597773B (en) Compression processing method, compression processing device, computer storage medium and terminal
JP2017174041A (en) Information processing apparatus, storage system, storage control method and computer program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant