Electronic file management method, device and equipment and storage medium
By establishing system accounts and archive accounts in the blockchain and using hash values for signing and indexing, the problem of archives not being able to be recorded throughout their entire lifecycle in existing technologies is solved, enabling full lifecycle management and content authenticity verification of electronic archives.
Patent Information
- Application Number
- CN202310133994.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-07
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2043-02-07
AI Technical Summary
Existing methods for tracing and verifying archives rely on simple encryption and verification using a hash algorithm. Once the archives are uploaded to the blockchain, they cannot be altered, and subsequent usage cannot be recorded.
In the blockchain, a system account is established to correspond with the business system, an electronic file is generated and signed, and uploaded to the blockchain through transfer transactions. The hash value is calculated for traceability and verification. The system account's key is used for signing, and the hash value is used as an index field for traceability and verification.
It achieves full lifecycle recording of electronic archives and ensures the authenticity and reliability of their content, solving the problem that archives cannot be recorded throughout their entire lifecycle and ensuring the authenticity and security of the archive content.
Smart Images

Figure CN116128518B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of blockchain, and particularly relates to an electronic archive management method, device, equipment, medium and program product. BACKGROUND
[0002] Blockchain is essentially a decentralized chain storage structure, and a reliable data storage method is realized through mutual trust sharing of multiple blockchain nodes. The blockchain technology does not need to rely on a third party, and through data storage between distributed nodes, each piece of data is verified, and finally synchronized among all nodes to realize reliable storage of data.
[0003] The existing archive traceability verification method is mostly based on HASH algorithm for simple encryption and verification. Once chained, the archive and its HASH value cannot be changed, and the use of subsequent archives cannot be recorded. SUMMARY
[0004] In view of the above problems, the present disclosure provides an electronic archive management method, device, equipment, medium and program product.
[0005] According to a first aspect of the present disclosure, an electronic archive management method is provided, comprising: establishing a system account in a blockchain, the system account corresponding to a business system; generating an electronic archive according to business data of the business system, the electronic archive including an initial archive and a modified archive; establishing an archive account of the electronic archive; signing the electronic archive using a key of the system account to obtain a signed archive, the signed archive including a signed initial archive and a signed modified archive; uploading the signed initial archive and the signed modified archive to the blockchain through a transfer transaction between the system account and the archive account; calculating a hash value of the signed archive; tracing the signed initial archive and the signed modified archive on the blockchain through the hash value of the signed archive; and obtaining an electronic archive of a full life cycle according to the traced signed initial archive and signed modified archive.
[0006] According to an embodiment of the present disclosure, generating an electronic archive according to business data of a business system comprises: obtaining initial business data from the business system; generating an initial archive according to the initial business data; modifying the initial business data and / or recording operations performed on the initial business data to obtain a modification item; and generating a modified archive according to the modification item.
[0007] According to an embodiment of the present disclosure, uploading the signed archive to the blockchain through a transfer transaction between the system account and the archive account comprises: uploading the signed initial archive to the blockchain in a first json format; uploading the signed modified archive to the blockchain in a second json format; wherein the first json format comprises an archive ID, a file, an operation, and an archive attribute, and the second json format comprises an archive ID, an added file, a deleted file, an operation change, and an attribute change.
[0008] According to an embodiment of the present disclosure, tracing the electronic archive on the blockchain through the hash value comprises: determining an initial archive in a first json format and a modified archive in a second json format according to the hash value of the signed archive; merging the initial archive in the first json format and the modified archive in the second json format to obtain a traced electronic archive.
[0009] According to an embodiment of the present disclosure, the electronic archive management method further comprises: verifying the signed archive, comprising: obtaining an archive ID of the electronic archive; determining a hash value of the signed archive before uploading to the blockchain according to the archive ID; and determining a hash value of the signed archive on the blockchain; comparing the hash value of the signed archive before uploading to the blockchain with the hash value of the signed archive on the blockchain; and verifying the signed archive through a key of the system account; in the case that the hash value of the signed archive before uploading to the blockchain is consistent with the hash value of the signed archive on the blockchain, and the signed archive is verified successfully, determining that the electronic archive is verified successfully.
[0010] According to an embodiment of the present disclosure, the electronic archive is verified through deployment of a smart contract.
[0011] According to an embodiment of the present disclosure, calculating the hash value of the signed archive comprises: calculating an initial hash value of the signed archive by using a hash algorithm; selecting at least two characters from the initial hash value, and exchanging positions of the at least two characters to obtain the hash value of the signed archive.
[0012] According to an embodiment of the present disclosure, tracing the electronic archive on the blockchain through the hash value of the signed archive comprises: generating an index ID according to the hash value of the signed archive; uploading the index ID to the blockchain; establishing a mapping relationship between the index ID and blocks of the transfer transaction; and tracing the electronic archive according to the index ID after the mapping relationship is established.
[0013] The second aspect of the present disclosure provides an electronic archive management apparatus, comprising: a first establishing module configured to establish a system account in a blockchain, the system account corresponding to a business system; a generating module configured to generate an electronic archive according to business data of the business system; a second establishing module configured to establish an archive account of the electronic archive; a signing module configured to sign the electronic archive using a key of the system account to obtain a signed archive; a transferring module configured to upload the signed archive to the blockchain through a transfer transaction between the system account and the archive account; a calculating module configured to calculate a hash value of the signed archive; a tracing module configured to trace the electronic archive on the blockchain through the hash value of the signed archive; and an integrating module configured to obtain a full-life-cycle electronic archive according to the traced signed initial archive and signed modified archive.
[0014] The third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory configured to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the above method.
[0015] The fourth aspect of the present disclosure further provides a computer-readable storage medium having stored executable instructions, which, when executed by a processor, cause the processor to perform the above method.
[0016] The fifth aspect of the present disclosure further provides a computer program product comprising a computer program, which, when executed by a processor, implements the above method.
[0017] According to the electronic archive management method, apparatus, device, medium and program product provided by the present disclosure, accounts are respectively established for the business system and the electronic archive, and the signed electronic archive can be flexibly uploaded to the chain in the form of transfer between the accounts. Since the key of the system account is used for signing, and the archive ID of the same electronic archive is unique, the hash value of the signed archive can be used as an on-chain data index field, and all uploaded electronic archives with the hash value can be traced and verified. Therefore, at least part of the technical problem that the electronic archive cannot be recorded throughout the cycle is solved, and the technical effects of complete uploading of the electronic archive and reliable archive content are achieved. BRIEF DESCRIPTION OF DRAWINGS
[0018] The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure, taken in conjunction with the accompanying drawings, in which:
[0019] Figure 1 An application scenario diagram of the electronic archive management method, apparatus, device, medium and program product according to an embodiment of the present disclosure is schematically shown;
[0020] Figure 2A flowchart of an electronic archive management method according to an embodiment of the present disclosure is schematically shown;
[0021] Figure 3 A flowchart of a method of generating an electronic archive according to an embodiment of the present disclosure is schematically shown;
[0022] Figure 4 A flowchart of a method of signing an archive on a chain according to an embodiment of the present disclosure is schematically shown;
[0023] Figure 5 A flowchart of a method of calculating a hash value according to an embodiment of the present disclosure is schematically shown;
[0024] Figure 6 A flowchart of a method of tracing an electronic archive according to an embodiment of the present disclosure is schematically shown;
[0025] Figure 7 A flowchart of a method of tracing an electronic archive according to an embodiment of the present disclosure is schematically shown;
[0026] Figure 8 A flowchart of a method of verifying an electronic archive according to an embodiment of the present disclosure is schematically shown;
[0027] Figure 9 A block diagram of an electronic archive management apparatus according to an embodiment of the present disclosure is schematically shown; and
[0028] Figure 10 A block diagram of an electronic device suitable for implementing an electronic archive management method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0029] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood, however, that the description which follows is merely exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description of embodiments of the present disclosure, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. However, it would be apparent to one skilled in the art that one or more embodiments of the present disclosure can be practiced without these specific details. In other instances, descriptions of well-known structures and techniques have been omitted in order to avoid obscuring the concepts of the present disclosure.
[0030] The terms used herein are merely used to describe specific embodiments and are not intended to limit the present disclosure. The terms "include", "comprise", and the like used herein indicate the presence of the described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0031] All terms used herein, including technical and scientific terms, have the meanings commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of the specification, and should not be interpreted in an idealized or overly formal way.
[0032] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted that the meaning of the expression is consistent with the meaning that a person skilled in the art generally understands the expression (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, a system having B alone, a system having C alone, a system having both A and B, a system having both A and C, a system having both B and C, and / or a system having A, B, and C, etc.).
[0033] In the technical solutions of the present disclosure, the collection, storage, use, processing, transmission, provision, disclosure, and application of data (such as including but not limited to user personal information) are in line with the relevant legal regulations, necessary security measures are taken, and do not violate public order and good customs.
[0034] Embodiments of the present disclosure provide an electronic file management method, comprising: establishing a system account in a blockchain, the system account corresponding to a business system; generating an electronic file according to business data of the business system; establishing a file account of the electronic file; signing the electronic file using a key of the system account to obtain a signed file; uploading the signed file to the blockchain through a transfer transaction between the system account and the file account; calculating a hash value of the signed file; and tracing the electronic file on the blockchain through the hash value of the signed file. By establishing accounts for the business system and the electronic file respectively, and using transfer between the accounts, the signed electronic file can be flexibly uploaded to the chain. Since the key of the system account is used for signing, and the file ID of the same electronic file is unique, the hash value of the signed file can be used as an on-chain data index field to trace and verify all uploaded electronic files with the hash value.
[0035] Figure 1 An application scenario diagram of the electronic file management method, apparatus, device, medium, and program product according to an embodiment of the present disclosure is schematically shown.
[0036] As shown in Figure 1 The application scenario 100 according to this embodiment can include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 can include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0037] A user can use at least one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0038] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smartphones, tablet computers, laptop computers, desktop computers, etc.
[0039] The server 105 can be a server providing various services, such as a background management server providing support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (only as examples). The background management server can analyze and process received user requests, etc., and feed back the processing results (such as web pages, information, or data, etc. obtained or generated according to user requests) to the terminal devices.
[0040] It should be noted that the electronic archive management method provided by the embodiments of the present disclosure can generally be executed by the server 105. Correspondingly, the electronic archive management device provided by the embodiments of the present disclosure can generally be arranged in the server 105. The electronic archive management method provided by the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105. Correspondingly, the electronic archive management device provided by the embodiments of the present disclosure can also be arranged in a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105.
[0041] It should be understood that Figure 1 The number of terminal devices, networks, and servers in the above description is only illustrative. According to the needs of implementation, there can be any number of terminal devices, networks, and servers.
[0042] The electronic archive management method according to the embodiments of the present disclosure will be described in detail below based on the scenarios described above. Figure 1 Figures 2-8 The electronic archive management method according to the embodiments of the present disclosure will be described in detail below based on the scenarios described above.
[0043] Figure 2 A flowchart of an electronic archive management method according to an embodiment of the present disclosure is schematically shown.
[0044] As Figure 2 shown, the electronic archive management method of this embodiment includes operation S210~operation S270.
[0045] In operation S210, a system account is established in the blockchain, and the system account corresponds to a business system.
[0046] According to embodiments of the present disclosure, electronic archive management includes operations such as uploading, modifying, tracing, and verifying electronic archives. A business system will generate business data when handling business. In order to facilitate the organization and summary of business data, the end-of-day business data can be archived to the archive system to form electronic archives.
[0047] It can be understood that the business system can be multiple business systems, and each business system can handle the same business or different business. For each business system, a system account is generated on the blockchain for uploading the business data generated by the business system.
[0048] In operation S220, an electronic archive is generated according to the business data of the business system, and the electronic archive includes an initial archive and a modified archive.
[0049] Figure 3 A method flowchart for generating an electronic archive according to an embodiment of the present disclosure is schematically shown.
[0050] According to embodiments of the present disclosure, as Figure 3 shown, the electronic archive is generated, for example, by steps S321~S324.
[0051] S321, initial business data is obtained from the business system.
[0052] According to embodiments of the present disclosure, the electronic archive includes, for example, an initial archive and a modified archive. The initial business data is, for example, the end-of-day business data archived to the archive system.
[0053] S322, an initial archive is generated according to the initial business data.
[0054] According to embodiments of the present disclosure, the initial archive is assembled in a first json format for uploading.
[0055] For example, the first json format includes an archive ID, a file, an operation, and an archive attribute. The archive ID is the ID of the entire initial archive, which is the unique identification of the archive. The file is a plurality of files contained in the archive, for example, recorded as a plurality of file IDs. The operation is an operation performed by an operator on the archive, for example, recorded as an operator and an operation name, and the operation includes, for example, approval, review, etc. The archive attribute is a feature of the archive itself, for example, an archive name, a creation time, etc.
[0056] S323, modifying the initial business data and / or recording the operation performed on the initial business data to obtain a modification item.
[0057] According to an embodiment of the present disclosure, based on actual needs, the initial business data needs to be modified, such as adding files, deleting files, updating operations, etc. The operation performed on the initial business data includes, for example, approval, etc. The type and content of the modification are recorded to obtain a modification item.
[0058] S324, generating a modification file according to the modification item.
[0059] According to an embodiment of the present disclosure, the modification file is assembled on the chain in a second json format, for example.
[0060] For example, the second json format includes a file ID, an added file, a deleted file, an operation change, and an attribute change. The file ID is the ID of the initial file described above, which is used to ensure the traceability of all operations on the initial file. The added file is the ID of the added file recorded. The deleted file is the ID of the deleted file recorded. The operation change is the operation name and operator of the changed operation recorded. The attribute change is the change of the characteristics of the file itself. By generating the modification file, the modification content can be recorded when the file is modified, and the modification content is independently chained, solving the problem that the chained content cannot be modified. At the same time, since the modification file and the initial file have the same file ID, even if the modification file and the initial file are chained at different times and are chained to different blocks, the complete file can be traced.
[0061] In operation S230, an account of the electronic file is established.
[0062] According to an embodiment of the present disclosure, in order to facilitate the contact between accounts, in addition to establishing a system account for a business system, a file account needs to be established for each file, which is used for transfer transactions with the system account on the blockchain.
[0063] For example, for each file, a hash value is calculated according to the file id and the current timestamp, which is used as the key of the file and as the account password of the file account. From the file level, it is ensured that the file cannot be illegally modified, and the data security is improved.
[0064] In operation S240, the electronic file is signed using the key of the system account to obtain a signed file, and the signed file includes a signed initial file and a signed modification file.
[0065] According to an embodiment of the present disclosure, the key of the system account includes a public key and a private key, for example. The electronic file can be signed by using the private key of the system account, for example. And the signed file is verified by using the public key of the system account after being uploaded to the blockchain.
[0066] In operation S250, the signed initial file and the signed modified file are uploaded to the blockchain respectively through a transfer transaction between the system account and the file account.
[0067] For example, the electronic file is uploaded to the blockchain as the content of the transfer transaction by the system account transferring a certain amount of money to the corresponding file account.
[0068] Figure 4 A method flowchart of uploading the signed file to the blockchain according to an embodiment of the present disclosure is shown schematically.
[0069] According to an embodiment of the present disclosure, as shown in Figure 4 the signed file is uploaded to the blockchain, for example, through steps S451-S452.
[0070] S451, the signed initial file is uploaded to the blockchain in a first json format.
[0071] S452, the signed modified file is uploaded to the blockchain in a second json format.
[0072] For example, the same file with the same ID can contain different contents at different times, that is, the content of the file can change over time, so the same ID file containing different contents needs to be uploaded separately at different times. The file with different contents is uploaded in different data structures, which is flexible and convenient for the whole life cycle management of the electronic file.
[0073] In operation S260, the hash value of the signed file is calculated.
[0074] Figure 5 A method flowchart of calculating the hash value according to an embodiment of the present disclosure is shown schematically.
[0075] According to an embodiment of the present disclosure, as shown in Figure 5 the hash value of the signed file is calculated, for example, through steps S561-S562.
[0076] S561, the initial hash value of the signed file is calculated by using a hash algorithm.
[0077] For example, the hash value of the signed file (signedData) is calculated, denoted as cunHash of the file. The hash algorithm can be SHA256, SHA3, etc.
[0078] S562, selecting at least two characters from the initial hash value, and exchanging the positions of the at least two characters to obtain the hash value of the signature file.
[0079] For example, the calculated initial hash value has 64 characters. It can be agreed that the first character and the last character are transposed, or the second character and the last character are transposed to obtain the twice-encrypted hash value.
[0080] It can be understood that the number of transposed characters is not limited to two, but can be more. The positions of the characters are not limited to the first, second and last characters, but can be characters at any position. By transposing the characters at any number and at any position of the initial hash value, the signature file is twice encrypted, and the probability of key cracking is reduced.
[0081] In operation S270, the signature initial file and the signature modified file are traced on the blockchain through the hash value of the signature file.
[0082] Figure 6 A method flowchart of tracing an electronic file according to an embodiment of the present disclosure is schematically shown.
[0083] According to an embodiment of the present disclosure, as Figure 6 shown, for example, the electronic file is traced through steps S671-S672.
[0084] S671, determining the first json format initial file and the second json format modified file according to the hash value of the signature file.
[0085] S672, merging the first json format initial file and the second json format modified file to obtain the traced electronic file.
[0086] For example, the hash value of the signature file has file ID information, which can be indexed to the respectively chained initial file (file initial record) and modified file (all change records) on the blockchain. The indexed initial file and modified file are assembled according to certain logic, for example, in chronological order, operation type, operator, etc., to obtain a complete electronic file, i.e., the tracing of the electronic file is completed.
[0087] In order to improve the tracing efficiency, an index ID can be established, and the index ID is mapped to the block corresponding to the transfer transaction.
[0088] Figure 7 A method flowchart of tracing an electronic file according to an embodiment of the present disclosure is schematically shown.
[0089] According to an embodiment of the present disclosure, as Figure 7As shown, the electronic file is traced, for example, through steps S771-S774.
[0090] S771, generating an index ID according to the hash value of the signature file.
[0091] For example, the cunHash of the file can be further processed, for example, by adding the file ID, and the extraId (i.e., the index ID) of the transaction object can be obtained, which is used to trace the electronic file on the blockchain.
[0092] S772, uploading the index ID to the blockchain.
[0093] For example, when the system account and the file account establish a transfer transaction, the index ID is also uploaded to the chain. The mapping relationship between the index ID and the block corresponding to the transaction is established on the chain, which can speed up the retrieval speed of the signature file through the index ID.
[0094] S773, establishing a mapping relationship between the index ID and the block of the transfer transaction.
[0095] S774, tracing the electronic file according to the index ID after the mapping relationship is established.
[0096] It can be understood that in addition to establishing the mapping relationship on the blockchain, the file ID, cunHash and signature file can also be saved in the local relational database to form a one-to-one mapping relationship, which is convenient for subsequent tracing.
[0097] In operation S280, the full-life-cycle electronic file is obtained according to the traced signature initial file and the signature modified file.
[0098] According to an embodiment of the present disclosure, the full-life-cycle electronic file is, for example, the latest complete electronic file obtained by arranging all initial files and modified files obtained by the same file ID up to the current time node. It is equivalent to an electronic file that contains all modifications to the initial business data and records all operations performed on the initial business data. By tracing the full-life-cycle electronic file, all data related to the electronic file can be intuitively displayed in one electronic file, which has high application value.
[0099] According to an embodiment of the present disclosure, the electronic file management method further comprises verifying the signature file.
[0100] Figure 8 The method flowchart of verifying the electronic file according to an embodiment of the present disclosure is schematically shown.
[0101] According to an embodiment of the present disclosure, as shown in Figure 8 For example, the signature electronic file is verified, for example, through steps S881-S886.
[0102] S881, obtaining the file ID of the electronic file.
[0103] S882, determining the hash value of the signed file before uploading to the blockchain according to the file ID.
[0104] S883, determining the hash value of the signed file on the blockchain.
[0105] For example, the signed file on the blockchain is a signed file obtained by multiple times of uploading, wherein most of the signed files are modified files obtained by modifying the initial file. Therefore, it is necessary to determine whether the modification of the initial file is a legal modification.
[0106] S884, comparing the hash value of the signed file before uploading to the blockchain with the hash value of the signed file on the blockchain.
[0107] For example, the hash value of the off-chain signed file is determined by the file ID, and is compared with the hash value of the on-chain signed file. If the hash values are consistent, it is a legal modification.
[0108] S885, verifying the signature of the signed file by the key of the system account.
[0109] For example, the signed file on the chain is determined by the file ID, and the signature of the signed file is verified by the public key of the system account. If the verification is successful, the signed file is a legal uploading.
[0110] S886, determining that the electronic file verification is successful when the hash value of the signed file before uploading to the blockchain is consistent with the hash value of the signed file on the blockchain, and the verification of the signed file is successful. By comparing the hash value of the signed file and verifying the signature of the signed file, the authenticity of the source of the signed file is ensured.
[0111] Optionally, in order to improve the efficiency of the verification of the signed file, the electronic file can be verified by deploying a smart contract.
[0112] Based on the above electronic file management method, the present disclosure further provides an electronic file management device. The following will be combined with the Figure 9 The device will be described in detail.
[0113] Figure 9 The structure block diagram of the electronic file management device according to the embodiment of the present disclosure is schematically shown.
[0114] As Figure 9 shown, the electronic file management device 900 of the embodiment includes a first establishing module 910, a generating module 920, a second establishing module 930, a signing module 940, a transfer module 950, a calculating module 960, a tracing module 970 and an integrating module 980.
[0115] The first establishing module 910 is configured to establish a system account in the blockchain, the system account corresponding to the business system. In an embodiment, the first establishing module 910 can be configured to perform the operation S210 described above, and details are not repeated here.
[0116] The generating module 920 is configured to generate the electronic file according to the business data of the business system. In an embodiment, the generating module 920 can be configured to perform the operation S220 described above, and details are not repeated here.
[0117] The second establishing module 930 is configured to establish a file account of the electronic file. In an embodiment, the second establishing module 930 can be configured to perform the operation S230 described above, and details are not repeated here.
[0118] The signing module 940 is configured to sign the electronic file by using a key of the system account to obtain a signed file. In an embodiment, the signing module 940 can be configured to perform the operation S240 described above, and details are not repeated here.
[0119] The transferring module 950 is configured to upload the signed file to the blockchain through a transfer transaction between the system account and the file account. In an embodiment, the transferring module 950 can be configured to perform the operation S250 described above, and details are not repeated here.
[0120] The calculating module 960 is configured to calculate a hash value of the signed file. In an embodiment, the calculating module 960 can be configured to perform the operation S260 described above, and details are not repeated here.
[0121] The tracing module 970 is configured to trace the electronic file on the blockchain through the hash value of the signed file. In an embodiment, the tracing module 970 can be configured to perform the operation S270 described above, and details are not repeated here.
[0122] The integrating module 980 is configured to obtain the electronic file in the whole life cycle according to the traced signed initial file and the signed modified file. In an embodiment, the integrating module 980 can be configured to perform the operation S280 described above, and details are not repeated here.
[0123] According to an embodiment of the present disclosure, any of the first establishing module 910, the generating module 920, the second establishing module 930, the signing module 940, the transferring module 950, the calculating module 960, the tracing module 970 and the integrating module 980 can be combined in one module, or any of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of the modules can be combined with at least part of the functions of the other modules, and implemented in one module. According to an embodiment of the present disclosure, at least one of the first establishing module 910, the generating module 920, the second establishing module 930, the signing module 940, the transferring module 950, the calculating module 960, the tracing module 970 and the integrating module 980 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system on package, an application specific integrated circuit (ASIC), or any other reasonable manner of integrating or packaging a circuit, etc. or implemented by hardware or firmware, or implemented in any one of software, hardware and firmware or in a proper combination of any of them. Alternatively, at least one of the first establishing module 910, the generating module 920, the second establishing module 930, the signing module 940, the transferring module 950, the calculating module 960, the tracing module 970 and the integrating module 980 can be at least partially implemented as a computer program module which can perform the corresponding functions when the computer program module is run.
[0124] Figure 10 A block diagram of an electronic device suitable for implementing the electronic archive management method according to an embodiment of the present disclosure is schematically shown.
[0125] As shown in Figure 10 The electronic device 1000 according to an embodiment of the present disclosure includes a processor 1001 which can perform various appropriate actions and processes according to programs stored in a read only memory (ROM) 1002 or loaded from a storage portion 1008 into a random access memory (RAM) 1003. The processor 1001 can include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special purpose microprocessor (e.g., an application specific integrated circuit (ASIC)), etc. The processor 1001 can also include an on-board memory for cache use. The processor 1001 can include a single processing unit or multiple processing units for performing different actions of the method processes according to embodiments of the present disclosure.
[0126] In the RAM 1003, various programs and data required for the operation of the electronic device 1000 are stored. The processor 1001, the ROM 1002, and the RAM 1003 are connected to each other via the bus 1004. The processor 1001 performs various operations of the method flow according to the embodiments of the present disclosure by executing the programs in the ROM 1002 and / or the RAM 1003. It should be noted that the programs can also be stored in one or more memories other than the ROM 1002 and the RAM 1003. The processor 1001 can also perform various operations of the method flow according to the embodiments of the present disclosure by executing the programs stored in the one or more memories.
[0127] According to an embodiment of the present disclosure, the electronic device 1000 can further include an input / output (I / O) interface 1005, which is also connected to the bus 1004. The electronic device 1000 can further include one or more of the following components connected to the I / O interface 1005: an input part 1006 including a keyboard, a mouse, etc.; an output part 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage part 1008 including a hard disk, etc.; and a communication part 1009 including a network interface card such as a LAN card, a modem, etc. The communication part 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as necessary. A removable medium 1011 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 1010 as necessary, so that a computer program read out therefrom is installed in the storage part 1008 as necessary.
[0128] The present disclosure also provides a computer readable storage medium, which can be included in the device / apparatus / system described in the above embodiments; or can exist separately without being assembled into the device / apparatus / system. The above computer readable storage medium carries one or more programs, when the one or more programs are executed, the method according to the embodiments of the present disclosure is implemented.
[0129] According to an embodiment of the present disclosure, the computer readable storage medium can be a nonvolatile computer readable storage medium, for example, can include, but is not limited to, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination thereof. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, the computer readable storage medium can include one or more memories such as the ROM 1002 and / or the RAM 1003 described above and / or one or more memory chips other than the ROM 1002 and the RAM 1003.
[0130] Embodiments of the present disclosure also include a computer program product including a computer program containing program codes for executing the methods shown in the flowcharts. When the computer program product is run in a computer system, the program codes are used to make the computer system implement the item recommendation method provided by the embodiments of the present disclosure.
[0131] The above-described functions defined in the system / device of the embodiments of the present disclosure are performed when the computer program is executed by the processor 1001. According to an embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by computer program modules.
[0132] In one embodiment, the computer program can rely on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program can also be transmitted, distributed, and downloaded in the form of a signal on a network medium and installed and downloaded through the communication part 1009 and / or installed from the detachable medium 1011. The program codes contained in the computer program can be transmitted by any appropriate network medium, including but not limited to wireless, wired, etc., or any appropriate combination thereof.
[0133] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009 and / or installed from the detachable medium 1011. When the computer program is executed by the processor 1001, the above-described functions defined in the system of the embodiments of the present disclosure are performed. According to an embodiment of the present disclosure, the system, device, apparatus, module, unit, etc. described above can be implemented by computer program modules.
[0134] According to embodiments of the present disclosure, program code of the computer program for performing the methods provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages, and can be implemented in a computer program product. Specifically, the computer program can be implemented in a high-level procedural and / or object-oriented programming language, and / or in assembly / machine language. The programming language includes, but is not limited to, Java, C++, python, “C” language, or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, and partly on a remote computing device, or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider (ISP).
[0135] The computer program product of the present disclosure can be a computer program product, which is a machine-readable medium (or computer readable medium) having stored therein a sequence of instructions executable by a machine such as a personal digital assistant (PDA), a laptop, a desktop computer, or a server. Alternatively, the computer program product can be a propagated signal per se generated by using the program code, and the program code can be stored on a machine-readable medium that can be read by a machine such as a personal digital assistant (PDA), a laptop, a desktop computer, or a server. The machine-readable medium can be a machine-readable storage medium that stores program codes, or a machine-readable transmission medium that carries program codes. For example, the program code can be stored on a removable storage medium, such as a floppy diskette, a hard disk, a CD-ROM, a DVD, a Blu-ray Disc, a memory stick, or a memory card, or a storage medium that is fixedly installed within a machine, such as a hard disk. The program code can also be transmitted by a machine-readable transmission medium, such as a modem, a network cable, a wireless signal, or a combination thereof, or transmitted by a computer network, such as the Internet.
[0136] Those skilled in the art will understand that features of various embodiments and / or claims of the present disclosure can be combined or / and integrated with one another, even though such a combination or integration is not expressly mentioned in the present disclosure. In particular, features of various embodiments and / or claims of the present disclosure can be combined and / or integrated with one another without departing from the spirit and teachings of the present disclosure. All such combinations and / or integrations are within the scope of the present disclosure.
[0137] The above describes embodiments of the present disclosure. However, these embodiments are merely for illustrative purposes, and are not intended to limit the scope of the present disclosure. Although each embodiment is described above separately, this does not mean that the measures in each embodiment cannot be used advantageously in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Those skilled in the art can make various substitutions and modifications without departing from the scope of the present disclosure, and these substitutions and modifications should all fall within the scope of the present disclosure.
Claims
1. An electronic file management method, comprising: establishing a system account in a blockchain, the system account corresponding to a business system; generating an electronic file according to business data of the business system, the electronic file including an initial file and a modified file; establishing a file account of the electronic file; signing the electronic file using a key of the system account to obtain a signed file, the signed file including a signed initial file and a signed modified file; verifying the signed file, including: obtaining a file ID of the electronic file; determining a hash value of the signed file before uploading to the blockchain according to the file ID; determining a hash value of the signed file on the blockchain; comparing the hash value of the signed file before uploading to the blockchain with the hash value of the signed file on the blockchain; verifying the signature of the signed file through the key of the system account; and determining that the verification of the electronic file is successful when the hash value of the signed file before uploading to the blockchain is consistent with the hash value of the signed file on the blockchain and the verification of the signature of the signed file is successful; uploading the signed initial file and the signed modified file to the blockchain through a transfer transaction between the system account and the file account; calculating a hash value of the signed file; generating an index ID according to the hash value of the signed file; uploading the index ID to the blockchain; establishing a mapping relationship between the index ID and blocks of the transfer transaction; and tracing the electronic file according to the index ID after establishing the mapping relationship; obtaining a full-life-cycle electronic file according to the signed initial file and the signed modified file traced.
2. The method of claim 1, wherein the generating an electronic file according to business data of the business system comprises: obtaining initial business data from the business system; generating the initial file according to the initial business data; and modifying the initial business data and / or recording operations performed on the initial business data to obtain a modification item; and generating the modified file according to the modification item.
3. The method of claim 2, wherein the uploading the signed file to the blockchain through a transfer transaction between the system account and the file account comprises: uploading the signed initial file to the blockchain in a first json format; and uploading the signed modified file to the blockchain in a second json format; wherein the first json format includes a file ID, a file, an operation, and a file attribute, and the second json format includes the file ID, an added file, a deleted file, an operation change, and an attribute change.
4. The method of claim 3, wherein the tracing the electronic file on the blockchain through the hash value comprises: determining the initial file in the first json format and the modified file in the second json format according to the hash value of the signed file; and merging the initial file in the first json format and the modified file in the second json format to obtain a traced electronic file. 5.The method of claim 1, wherein the electronic file is verified by deploying a smart contract. 6.The method of claim 1, wherein the calculating the hash value of the signed file comprises: calculating an initial hash value of the signed file by using a hash algorithm; and selecting at least two characters from the initial hash value and exchanging positions of the at least two characters to obtain the hash value of the signed file. 7.An electronic file management apparatus for implementing the method of any one of claims 1-6, the apparatus comprising: a first establishing module configured to establish a system account in a blockchain, the system account corresponding to a business system; a generating module configured to generate an electronic file according to business data of the business system; a second establishing module configured to establish a file account of the electronic file; a signing module configured to sign the electronic file by using a key of the system account to obtain a signed file; a transferring module configured to upload the signed file to the blockchain through a transfer transaction between the system account and the file account; a calculating module configured to calculate a hash value of the signed file; a tracing module configured to trace the electronic file on the blockchain through the hash value of the signed file; and an integrating module configured to obtain a full-life-cycle electronic file according to the signed initial file and the signed modified file traced. 8.An electronic device comprising: one or more processors; and a storage device for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any one of claims 1-6. 9.A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method of any one of claims 1-6. 10.A computer program product comprising a computer program that, when executed by a processor, implements the method of any one of claims 1-6.
Citation Information
Patent Citations
Archive data consistency keeping system and method based on block chain technology
CN113626456A
Electronic archive management method and device based on block chain, and electronic equipment
CN113806816A