CN112732649B - OFD document signing method, electronic equipment and medium - Google Patents

OFD document signing method, electronic equipment and medium Download PDF

Info

Publication number
CN112732649B
CN112732649B CN202011522051.2A CN202011522051A CN112732649B CN 112732649 B CN112732649 B CN 112732649B CN 202011522051 A CN202011522051 A CN 202011522051A CN 112732649 B CN112732649 B CN 112732649B
Authority
CN
China
Prior art keywords
file
signature
ofd
updating
protected
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.)
Active
Application number
CN202011522051.2A
Other languages
Chinese (zh)
Other versions
CN112732649A (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

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)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses an OFD document signing method, electronic equipment and a medium. The method may include: step 1: reading a file list in an OFD file to acquire each file path; step 2: determining a file to be protected according to the file path; step 3: establishing a signature file stream, carrying out data abstracts on all files to be protected according to the reading length of the files to be protected, and inserting the abstracts into the signature files; 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; step 5: and abstracting and signing the signature file, compressing and storing the signature data stream into the OFD file, and completing one-time signature. The invention realizes fast and efficient signature operation by directly abstracting and setting threads according to the read length.

Description

OFD document signing method, electronic equipment and medium
Technical Field
The present invention relates to the field of data processing, and in particular, to an OFD document signing method, electronic device, and medium.
Background
In the current OFD signature method, an OFD file is decompressed into a folder for processing, and the reading and writing time influences the integral signature time of the OFD; the current OFD signature method generally carries out sequential abstracts on files needing abstracts, encounters larger internal documents, has longer abstracting time, does not carry out size distinction on the internal documents even if the abstracts are operated in parallel, carries out parallel operation uniformly, and occupies computer resources.
Therefore, there is a need to develop an OFD document signing method, an electronic device and a medium that increase the OFD signing speed.
The information disclosed in the background section of the invention 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 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 an OFD file to acquire each file path;
step 2: determining a file to be protected according to the file path;
step 3: establishing a signature file stream, carrying out data abstracts on all files to be protected according to the reading length of the files to be protected, and inserting the abstracts into the signature files;
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;
step 5: and carrying out abstract and signature on the signature file, compressing and storing the signature data stream into the OFD file, and completing one-time signature.
Preferably, determining the file to be protected includes:
and sequentially reading the files in the OFD file to a memory, reading the file name according to the file path, judging whether the abstract is needed, if so, classifying the file into the file to be protected, and if not, reading the next file.
Preferably, the step 3 includes:
and judging whether the reading length is larger than a set threshold value, if so, creating a thread to perform data digest on the file to be protected and insert the digest into the signature file, and if not, directly digest the file to be protected and insert the digest into the signature file.
Preferably, the step 4 further includes:
before updating the signature list file, judging whether the signature list file exists, if yes, directly updating, and if not, updating after the signature list file is newly built.
Preferably, updating the primary entry file includes:
and updating the main entry file and abstracting, and inserting the abstracting into the signature file.
Preferably, updating the signature file includes:
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, completing multiple signatures.
As a specific implementation of an embodiment of the present disclosure,
in a second aspect, embodiments of the present disclosure further provide 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.
In a third aspect, the disclosed embodiments also provide a computer-readable storage medium storing a computer program which, when executed by a processor, implements the OFD document signing method.
The beneficial effects are that:
1. for the file to be abstracted, the file data is read into the memory from the OFD file, and the abstract is directly carried out, so that the OFD file does not need to be decompressed to the file and the file is read, and the reading and writing time of the file is saved;
2. creating a thread for file data with a size larger than a set value, abstracting the file data in a new thread and inserting the abstract value into a signature file, and directly abstracting the file data and inserting the abstract value into the signature file for file data with a size smaller than the set value.
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 present invention.
Drawings
The foregoing and other objects, features and advantages of the invention will be apparent from the following more particular descriptions of exemplary embodiments of the invention as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts throughout the exemplary embodiments of the invention.
Fig. 1 shows a flowchart of the steps of an OFD document signing method according to an embodiment of the present invention.
Detailed Description
Preferred embodiments of the present invention will be described in more detail below. While the preferred embodiments of the present invention are described below, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein.
Fig. 1 shows a flowchart of the steps of an OFD document signing method according to an 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 an OFD file to acquire each file path;
step 2: determining a file to be protected according to the file path;
step 3: establishing a signature file stream, carrying out data abstracts on all files to be protected according to the reading length of the files to be protected, and inserting the abstracts into the signature files;
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;
step 5: and abstracting and signing the signature file, compressing and storing the signature data stream into the OFD file, and completing one-time signature.
In one example, determining a file to be protected includes:
and sequentially reading the files in the OFD file to the memory, reading the file name according to the file path, judging whether the abstract is needed, if so, classifying the file into the file to be protected, and if not, reading the next file.
In one example, step 3 includes:
and judging whether the reading length is larger than a set threshold value, if so, creating a thread to perform data abstraction on the file to be protected and insert the abstract into the signature file, and if not, directly abstracting the file to be protected and insert the abstract 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 yes, directly updating, and if not, newly building the signature list file and updating.
In one example, updating the primary portal file includes:
updating the main entry file and abstracting, and inserting the abstracting into the signature file.
In one example, updating the signature file includes:
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: sequentially reading files in the OFD file to a memory, reading file names according to file paths, judging whether the file names are needed to be abstracted, if so, classifying the files into the files to be protected, and if not, reading the next file;
step 3: establishing a signature file stream, judging whether the read length is larger than a set threshold value according to the read length (namely the file size) of the file to be protected, if so, creating a thread to perform data summarization on the file to be protected and insert the summarization into a signature file (signature. Xml), and if not, directly abstracting the file to be protected and inserting the summarization into the signature file; during abstracting, the files to be protected are not needed to be decompressed to the files and read, but the files are directly abstracted, so that the reading and writing time of the files is saved;
step 4: updating a signature list file (xml), judging whether the signature list file exists before updating, if so, directly updating, otherwise, newly building the signature list file and updating; updating a main entry file (OFD.xml) and abstracting, and inserting the abstracts into the signature files; after updating the signature method, signature time and other information of the signature file, compressing and storing the updated signature file, signature list file and main entry file into an OFD file;
step 5: and abstracting and signing the signature file, compressing and storing the signature data stream into the OFD file, and completing one-time signature.
Repeating the steps 1-5 for a plurality of times to finish the signature for a plurality of times.
The present invention also provides an electronic device including: a memory storing executable instructions; and the processor runs 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.
In order to facilitate understanding of the solution and the effects of the embodiments of the present invention, three specific application examples are given below. It will be understood by those of ordinary skill in the art that the examples are for ease of understanding only and that any particular details thereof are not intended to limit the present 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: sequentially reading files in the OFD file to a memory, reading file names according to file paths, judging whether the file names are needed to be abstracted, if so, classifying the files into the files to be protected, and if not, reading the next file;
step 3: establishing a signature file stream, judging whether the read length is larger than a set threshold value according to the read length (namely the file size) of the file to be protected, if so, creating a thread to perform data summarization on the file to be protected and insert the summarization into Signature.xml, and if not, directly abstracting the file to be protected and inserting the summarization into Signature.xml; during abstracting, the files to be protected are not needed to be decompressed to the files and read, but the files are directly abstracted, so that the reading and writing time of the files is saved;
step 4: updating the Signature. Xml, judging whether the Signature. Xml exists before updating, if so, directly updating, otherwise, newly building the Signature. Xml, and then updating; updating OFD.xml and abstracting, and inserting the abstracts into the Signature.xml; after updating the signature method, signature time and other information of the signature.xml, compressing and storing the updated signature.xml, signature.xml and OFD.xml into an OFD file;
step 5: and abstracting and signing the signature.xml, compressing and storing the signature data stream into an OFD file, and completing one-time signature.
Repeating the steps 1-5 for a plurality of times to finish the signature for a plurality of times.
Example 2
The present disclosure provides an electronic device including: a memory storing executable instructions; and the processor runs 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 for storing non-transitory computer readable instructions. In particular, the memory may include one or more computer program products, which 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) and/or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like.
The processor may be a Central Processing Unit (CPU) or other form of processing unit having data processing and/or instruction execution capabilities, and may control other components in the electronic device to perform the desired functions. In one embodiment of the present disclosure, the processor is configured to execute the computer readable instructions stored in the memory.
It should be understood by those skilled in the art that, in order to solve the technical problem of how to obtain a good user experience effect, the present embodiment may also include well-known structures such as a communication bus, an interface, and the like, and these well-known structures are also included in the protection scope of the present disclosure.
The detailed description of the present embodiment may refer to the corresponding description in the foregoing embodiments, and will not be repeated herein.
Example 3
Embodiments of the present disclosure provide a computer-readable storage medium storing a computer program which, 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 stored thereon non-transitory computer-readable instructions. When executed by a processor, perform all or part of the steps of the methods of embodiments of the present disclosure described above.
The computer-readable storage medium described above includes, but is not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or removable hard disk), media with built-in rewritable non-volatile memory (e.g., memory card), and media with built-in ROM (e.g., ROM cartridge).
It will be appreciated by persons skilled in the art that the above description of embodiments of the invention has been given for the purpose of illustrating the benefits of embodiments of the invention only and is not intended to limit embodiments of the invention to any examples given.
The foregoing description of embodiments of the invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or 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 various embodiments described.

Claims (8)

1. A method for signing an OFD document, comprising:
step 1: reading a file list in an OFD file to acquire each file path;
step 2: determining a file to be protected according to the file path;
step 3: establishing a signature file stream, carrying out data abstracts on all files to be protected according to the reading length of the files to be protected, and inserting the abstracts into the signature files;
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;
step 5: the signature file is subjected to abstract and signature, signature data stream is compressed and stored in the OFD file, and one-time signature is completed;
determining the file to be protected includes:
sequentially reading files in the OFD file to a memory, reading file names according to the file paths, judging whether the file names are required to be abstracted, if so, classifying the file into the file to be protected, and if not, reading the next file;
wherein, the step 3 comprises the following steps:
and judging whether the reading length is larger than a set threshold value, if so, creating a thread to perform data digest on the file to be protected and insert the digest into the signature file, and if not, directly digest the file to be protected and insert the digest into the signature file.
2. 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, if yes, directly updating, and if not, updating after the signature list file is newly built.
3. The OFD document signing method of claim 1, wherein updating the master entry file comprises:
and updating the main entry file and abstracting, and inserting the abstracting into the signature file.
4. The OFD document signing method of claim 1, wherein updating the signature file comprises:
and updating the signature information of the signature file.
5. The OFD document signing method of claim 4, wherein the signing information comprises signing method, signing time.
6. The OFD document signing method of claim 1, wherein steps 1-5 are repeated a plurality of times to complete a plurality of signatures.
7. An electronic device, the electronic device comprising:
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-6.
8. A computer readable storage medium, characterized in that it stores a computer program which, when executed by a processor, implements the OFD document signing method of any one of claims 1 to 6.
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 CN112732649A (en) 2021-04-30
CN112732649B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115422559B (en) * 2022-08-05 2024-07-02 中金金融认证中心有限公司 Signature method for circulation type business, electronic equipment and readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004111902A2 (en) * 2003-06-13 2004-12-23 Jon Kirkegaard Order commitment method and system

Patent Citations (10)

* 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
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
CN112732649A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
CN112150163A (en) Block chain contract transaction parallel execution method and device
CN106843842B (en) Method and device for updating application program configuration file
US9740493B2 (en) System and method of loop vectorization by compressing indexes and data elements from iterations based on a control mask
US8572054B2 (en) Forward compatibility guaranteed data compression and decompression method and apparatus thereof
CN109800005B (en) Client hot update method and device
CN112732649B (en) OFD document signing method, electronic equipment and medium
CN112732321B (en) Firmware modification method, device, computer readable storage medium and equipment
CN111615688A (en) Assertion verification code binding method and device
US8185885B2 (en) Providing recovery data for program code
US10310871B2 (en) Non-transitory computer-readable recording medium storing control program, control device and control method
US11507367B2 (en) Firmware update method and firmware update system thereof
CN111625254B (en) File processing method, device, terminal and storage medium
CN114356386A (en) Block differential upgrading method, terminal equipment and computer readable storage medium
US7543272B1 (en) Method and apparatus for finding terminal classes in a collection of programming language classes
CN110187897B (en) Firmware upgrading method and device
CN110058876B (en) Method, device, server and storage medium for expanding compatibility of wireshark software
CN112364580A (en) Method and device for automatically inserting specific code into register transmission level design file
CN116700840B (en) File execution method, device, electronic equipment and readable storage medium
EP3842932B1 (en) Firmware update method and firmware update system thereof
US8655929B2 (en) Modification of data within a file
CN115659342B (en) Harmless PE file executing method and device, electronic equipment and storage medium
CN117271440B (en) File information storage method, reading method and related equipment based on freeRTOS
CN115794260B (en) Simple dynamic loading method for DSP software library
CN107102975B (en) Document storage method and system and document analysis method and system
CN116909595A (en) Method for upgrading hidden partition firmware, electronic equipment and storage medium

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