Blockchain-based Electronic File Management Method, Device and System
By performing legality verification and confirmation message delivery between blockchain nodes, the problems of data security and reliability in electronic archive management are solved, and the secure storage and tamper-proof of electronic archives are realized.
Patent Information
- Application Number
- CN202111020747.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-01
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2041-09-01
AI Technical Summary
The reception and long-term preservation of electronic files and security management work face huge challenges, including fleetingness, variability, dependence on metadata, separability of information and carriers.
The blockchain-based electronic archive management method is adopted, and electronic archive storage requests are received from the user side, prepared messages are generated, and legality verification and confirmation messages are transmitted between multiple blockchain nodes, and electronic archives are finally stored on the blockchain node.
It realizes the secure storage of electronic files to prevent data tampering, and ensures the immutability and traceability of data through the use of blockchain technology.
Smart Images

Figure CN113722272B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology and the financial field, and particularly relates to a method, device, and system for electronic file management based on blockchain. Background Art
[0002] File management is an important basic and systematic work in banks, playing an irreplaceable supporting and guaranteeing role in recording history, safeguarding rights and interests, ensuring asset security, and preventing financial risks. With the significant acceleration of the global informatization process, especially in the context of the global digital transformation era, the object of file work is migrating from traditional paper-based files to electronic files, and the file management work has entered a new stage of electronic and networked development. File hybridization, data massification, and demand personalization have become the new normal of file management in the new era. For electronic files, they have characteristics such as perishability, mutability, dependence on metadata, and the separability of information and carrier. With the large-scale generation of electronic files, the work of file reception and long-term preservation, as well as security management, faces huge challenges. Summary of the Invention
[0003] This application provides a method for electronic file management based on blockchain, which relates to the field of blockchain technology and the financial field. The method for electronic file management based on blockchain includes:
[0004] Receiving an electronic file storage request from a user terminal, and generating a corresponding pre-preparation message according to the electronic file storage request; wherein, the electronic file storage request includes the electronic file to be stored;
[0005] Sending the pre-preparation message to other blockchain nodes except the current blockchain node, so that the other blockchain nodes except the current blockchain node generate corresponding preparation messages according to the pre-preparation message;
[0006] Performing a legality verification on the preparation messages of the other blockchain nodes except the current blockchain node;
[0007] When the legality verification passes, storing the electronic file to be stored according to the confirmation messages sent by the other blockchain nodes except the current blockchain node.
[0008] In another embodiment, this application also provides another method for electronic file management based on blockchain, including:
[0009] Performing a legality verification on the pre-preparation message sent by the blockchain node corresponding to the received official document subsystem; wherein, the pre-preparation message is generated by the blockchain node corresponding to the official document subsystem according to the electronic file storage request received from the user terminal; wherein, the electronic file storage request includes the electronic file to be stored;
[0010] When the legitimacy verification of the pre-prepared message passes, generate a corresponding prepared message according to the pre-prepared message, and send the prepared message to other blockchain nodes except the current blockchain node;
[0011] Verify the legitimacy of the prepared messages of other blockchain nodes except the current blockchain node;
[0012] When the legitimacy verification passes, store the electronic file to be stored according to the confirmation messages sent by other blockchain nodes except the current blockchain node.
[0013] In another embodiment, the present application also provides another blockchain-based electronic file management method, including:
[0014] The first blockchain node receives an electronic file storage request from the client, and generates a corresponding pre-prepared message according to the electronic file storage request; wherein, the electronic file storage request includes the electronic file to be stored;
[0015] The first blockchain node sends the pre-prepared message to multiple second blockchain nodes;
[0016] The multiple second blockchain nodes respectively verify the legitimacy of the pre-prepared message;
[0017] When the legitimacy verification of the pre-prepared message passes, the multiple second blockchain nodes respectively generate corresponding prepared messages according to the pre-prepared message, and send the prepared messages to the first blockchain node and other second blockchain nodes except the current second blockchain node;
[0018] The first blockchain node and the multiple second blockchain nodes verify the legitimacy of the received prepared messages;
[0019] When the legitimacy verification of the received prepared message passes, store the electronic file to be stored according to the confirmation messages sent by the first blockchain node and other second blockchain nodes except the current second blockchain node.
[0020] In another embodiment, the present application also provides a blockchain-based electronic file management device, including:
[0021] An electronic file storage request receiving module, configured to receive an electronic file storage request from the client; wherein, the electronic file storage request includes the electronic file to be stored;
[0022] A pre - preparation message generation module, configured to generate a corresponding pre - preparation message according to the electronic file storage request; and send the pre - preparation message to other blockchain nodes except the current blockchain node, so that the other blockchain nodes except the current blockchain node generate corresponding preparation messages according to the pre - preparation message;
[0023] A legality verification module, configured to verify the legality of the preparation messages of other blockchain nodes except the current blockchain node;
[0024] An electronic file storage module, configured to store the electronic file to be stored according to the confirmation messages sent by other blockchain nodes except the current blockchain node when the legality verification is passed.
[0025] In another embodiment, the present application further provides another blockchain - based electronic file management device, including:
[0026] A pre - preparation message verification module, configured to verify the legality of the pre - preparation message sent by the blockchain node corresponding to the official document subsystem received; wherein, the pre - preparation message is generated by the blockchain node corresponding to the official document subsystem according to the electronic file storage request received from the user terminal; wherein, the electronic file storage request includes the electronic file to be stored;
[0027] A preparation message generation module, configured to generate a corresponding preparation message according to the pre - preparation message and send the preparation message to other blockchain nodes except the current blockchain node when the legality verification of the pre - preparation message is passed;
[0028] A preparation message verification module, configured to verify the legality of the preparation messages of other blockchain nodes except the current blockchain node;
[0029] An electronic file storage module, configured to store the electronic file to be stored according to the confirmation messages sent by other blockchain nodes except the current blockchain node when the legality verification is passed.
[0030] In another embodiment, the present application further provides a blockchain - based electronic file management system, including a first device and multiple second devices;
[0031] The first device includes:
[0032] An electronic file storage request receiving module, configured to receive the electronic file storage request from the user terminal; wherein, the electronic file storage request includes the electronic file to be stored;
[0033] A pre-preparation message generation module, configured to generate a corresponding pre-preparation message according to the electronic file storage request; and send the pre-preparation message to the plurality of second devices, so that the plurality of second devices generate corresponding preparation messages according to the pre-preparation message;
[0034] A legality verification module, configured to verify the legality of the preparation messages sent by the plurality of second devices;
[0035] A first electronic file storage module, configured to store the electronic file to be stored according to the confirmation messages sent by the plurality of second devices when the legality verification is passed;
[0036] Each of the plurality of second devices includes:
[0037] A pre-preparation message verification module, configured to verify the legality of the pre-preparation message sent by the first device;
[0038] A preparation message generation module, configured to generate a corresponding preparation message according to the pre-preparation message and send the preparation message to the first device and other second devices except the current second device when the legality verification of the pre-preparation message is passed;
[0039] A preparation message verification module, configured to verify the legality of the received preparation message;
[0040] A second electronic file storage module, configured to store the electronic file to be stored according to the confirmation messages sent by the first device and other second devices except the current second device when the legality verification of the received preparation message is passed.
[0041] The blockchain-based electronic file management method, device and system of the present application utilize blockchain for file storage, comprehensively apply blockchain technologies such as electronic signature and smart contract, and jointly verify through multiple business subsystems, realizing the secure storage of files and effectively preventing file data from being tampered with. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.
[0043] Figure 1A It is a schematic diagram of a banking business system.
[0044] Figure 1BSchematic diagram of the blockchain structure of electronic files corresponding to the banking business system.
[0045] Figure 1C Another schematic diagram of the blockchain structure of electronic files corresponding to the banking business system.
[0046] Figure 2 Schematic diagram of the blockchain-based electronic file management method of this application.
[0047] Figure 3 Another schematic diagram of the blockchain-based electronic file management method.
[0048] Figure 4 Another schematic diagram of the blockchain-based electronic file management method.
[0049] Figure 5 Another schematic diagram of the blockchain-based electronic file management method.
[0050] Figure 6 Another schematic diagram of the blockchain-based electronic file management method.
[0051] Figure 7 Another schematic diagram of the blockchain-based electronic file management method.
[0052] Figure 8 Another schematic diagram of the blockchain-based electronic file management method.
[0053] Figure 9 Another schematic diagram of the blockchain-based electronic file management method.
[0054] Figure 10 Another schematic diagram of the blockchain-based electronic file management method.
[0055] Figure 11 Schematic diagram of the blockchain-based electronic file management device of this application.
[0056] Figure 12 Another schematic diagram of the blockchain-based electronic file management device.
[0057] Figure 13 Another schematic diagram of the blockchain-based electronic file management device.
[0058] Figure 14 Schematic diagram of the blockchain-based electronic file management system of this application. Detailed implementation manner
[0059] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0060] To more clearly illustrate the blockchain-based electronic file management method of the present application, the application scenarios of the blockchain-based electronic file management method are first described in the present application to facilitate public understanding.
[0061] The blockchain-based electronic file management method of the present application can be applied to various business systems, and is particularly suitable for banking business systems. As Figure 1A and Figure 1B shown, the banking business system includes business subsystems such as a document subsystem, a financial management subsystem, a personal loan subsystem, and a corporate loan subsystem. Each business subsystem corresponds to a blockchain node, and the data stored in each business subsystem realizes consensus through the blockchain. For each blockchain node, it can receive an electronic file operation request from the corresponding business subsystem and complete management operations such as transfer, utilization, and destruction of the electronic file according to the operation request.
[0062] In the banking business system, only the document subsystem has the permission to send an electronic file storage request. Therefore, the storage operation of the electronic file can only be realized through the blockchain node 1 corresponding to the document subsystem. In other words, the electronic file storage request can only be sent by the document subsystem to its corresponding blockchain node 1. Other operations such as utilization and destruction of the electronic file can also be realized through the blockchain node 2 corresponding to the financial management subsystem, the blockchain node 3 corresponding to the personal loan subsystem, and the blockchain node 4 corresponding to the corporate loan subsystem.
[0063] The electronic file storage request sent by the document subsystem contains the electronic file to be stored, and the electronic file to be stored is a document generated by integrating files of other business subsystems. The document subsystem is only used to store the document.
[0064] The present application first provides a blockchain-based electronic file management method, which can be jointly implemented by each blockchain node in the electronic file blockchain of the present application. Please also refer to Figure 1A 、 Figure 1B and Figure 2 , and the method specifically includes the following steps S201 to step S206:
[0065] Step S201: The first blockchain node receives an electronic file storage request from the client and generates a corresponding pre-preparation message according to the electronic file storage request.
[0066] Specifically, in this embodiment, the first blockchain node is the blockchain node 1 corresponding to the official document subsystem. The electronic file storage request is sent by the client to the first blockchain node. The electronic file storage request includes the electronic file to be stored, and the electronic file contains files of at least one business subsystem.
[0067] The first blockchain node generates a corresponding pre-preparation message according to the electronic file storage request. The format of the pre-preparation message is preset, and its specific format is <<PRE-PREPARE,v,n,d>,m>, where "PRE-PREPARE" indicates that this message is a pre-preparation message; "v" is the image batch number of the electronic file to be stored obtained by the first blockchain node, and this image batch number is the number corresponding to the electronic file to be stored; "n" is the serial number assigned by the first blockchain node to the electronic file storage request. This serial number n is generated by the first blockchain node according to the file serial number generation rule of the National Archives Administration and assigned to this electronic file storage request; "d" is the digest of the electronic file storage request generated by the first blockchain node, and this digest includes the source identifier of the electronic file to be stored in the electronic file storage request; "m" is the electronic file storage request sent by the client.
[0068] After generating the pre-preparation message, the first blockchain node also stores this pre-preparation message in this node.
[0069] Step S202: The first blockchain node sends the pre-preparation message to multiple second blockchain nodes.
[0070] In this embodiment, the multiple second blockchain nodes at least include the blockchain node 2 corresponding to the financial management subsystem, the blockchain node 3 corresponding to the personal loan subsystem, and the blockchain node 4 corresponding to the corporate loan subsystem. In practical applications, the number of second blockchain nodes can also be determined according to the number of business subsystems actually included in the business system. Here, only three second blockchain nodes are taken as an example for illustration, which is not a limitation to this application.
[0071] After the first blockchain node generates the pre-preparation message, it sends this pre-preparation message to multiple second blockchain nodes.
[0072] It should be noted that the first blockchain node and the second blockchain node in all embodiments of the present application do not specifically refer to a certain blockchain node, but are distinguished according to whether the blockchain node has the function of receiving an electronic file storage request. The blockchain node that can receive the electronic file storage request is the first blockchain node, and the blockchain node that cannot receive the electronic file storage request is the second blockchain node. This depends on the characteristics of the business subsystem corresponding to the blockchain node, and the blockchain nodes 1 to 4 in this embodiment are equal to each other without a hierarchical relationship.
[0073] Step S203, the multiple second blockchain nodes respectively verify the legality of the pre-prepared message.
[0074] Specifically, after receiving the pre-prepared message, the multiple second blockchain nodes will respectively verify the legality of the pre-prepared message sent by the first blockchain node. The legality verification of the pre-prepared message at least includes:
[0075] Verify whether the signature of the pre-prepared message is correct;
[0076] Verify whether the digest in the pre-prepared message is consistent with the digest of the electronic file to be stored;
[0077] Verify whether the image batch number in the pre-prepared message is consistent with the image batch number of the electronic file to be stored;
[0078] Verify whether the sequence number in the pre-prepared message is between the upper limit H (high watermark) and the lower limit h (low watermark) of a preset watermark; wherein, the significance of the watermark is to prevent a failed blockchain node from consuming the sequence number space with a very large sequence number. By setting the low watermark h and the high watermark H, the random allocation of sequence numbers is avoided.
[0079] When the legality verification of the pre-prepared message passes, the multiple second blockchain nodes store the pre-prepared message in the message log of the local node and execute step S204; otherwise, the multiple second blockchain nodes return that the legality verification fails to the first blockchain node.
[0080] Step S204, when the legality verification of the pre-prepared message passes, the multiple second blockchain nodes respectively generate corresponding prepared messages according to the pre-prepared message and send the prepared messages to the first blockchain node and other second blockchain nodes except the current second blockchain node.
[0081] Specifically, the prepare message is generated by each second blockchain node according to the preset format of the prepare message <PREPARE, v, n, d, i>. Herein, "PREPARE" represents that this message is a prepare message; "v" is the image batch number of the electronic file to be stored obtained by the second blockchain node; "n" is the serial number assigned by the first blockchain node for the electronic file storage request; "d" is the digest of the electronic file storage request generated by the second blockchain node; "i" is the node number of the second blockchain node. For example, the node number of blockchain node 2 corresponding to the financial management subsystem is 2, and the node number of blockchain node 3 corresponding to the personal loan subsystem is 3.
[0082] After each second blockchain node generates a prepare message, it will send the prepare message to the first blockchain node and other second blockchain nodes except the current second blockchain node. For example, after blockchain node 2 (the second blockchain node) corresponding to the financial management subsystem generates a prepare message, it sends the prepare message to blockchain node 1 (the first blockchain node) corresponding to the official document subsystem, blockchain node 3 (the second blockchain node) corresponding to the personal loan subsystem, and blockchain node 4 (the second blockchain node) corresponding to the corporate loan subsystem. The same applies to other second blockchain nodes and will not be elaborated here.
[0083] It should be noted that the prepare message is only generated by the second blockchain node. The first blockchain node (i.e., blockchain node 1 corresponding to the official document subsystem) does not generate a prepare message and only receives the prepare messages sent by each second blockchain node.
[0084] Step S205, the first blockchain node and the multiple second blockchain nodes perform a legality verification on the received prepare messages.
[0085] Specifically, still taking an example of including one first blockchain node and three second blockchain nodes, for the first blockchain node, it receives the prepare messages sent by the three second blockchain nodes; for each second blockchain node, it receives the prepare messages of the other two second blockchain nodes except its own node.
[0086] The first blockchain node and each second blockchain node perform a legality verification on all the received prepare messages. Among them, the legality verification of the prepare message at least includes:
[0087] Verify whether the signature of the prepare message is correct;
[0088] Verify whether the image batch number in the prepare message is consistent with the image batch number of the electronic file to be stored;
[0089] Verify whether the serial number in the preparation message is between the upper limit H and the lower limit h of a preset watermark; and
[0090] Verify whether the digest, image batch number, and serial number in the preparation message are consistent with those in the received pre-preparation message.
[0091] For each blockchain node (including the first blockchain node and each second blockchain node), when the legitimacy verification of all the received preparation messages passes, the legitimacy verification of the preparation message passes; otherwise, if the legitimacy verification of the preparation message fails, return a message indicating that the preparation message verification fails to other blockchain nodes except this node.
[0092] Step S206, when the legitimacy verification of the received preparation message passes, store the electronic file to be stored according to the confirmation messages sent by the first blockchain node and other second blockchain nodes except the current second blockchain node.
[0093] Specifically, for each blockchain node (including the first blockchain node and each second blockchain node), when the legitimacy verification of all the received preparation messages passes, this blockchain node generates a confirmation message and sends the confirmation message to the first blockchain node and other second blockchain nodes except the current second blockchain node.
[0094] Still taking an example of including one first blockchain node and three second blockchain nodes, after the first blockchain node generates a confirmation message, it sends the confirmation message to the three second blockchain nodes; after the second blockchain node generates a confirmation message, it sends the confirmation message to the first blockchain node and the other two second blockchain nodes.
[0095] For each blockchain node (including the first blockchain node and each second blockchain node), when it receives the confirmation messages from all other blockchain nodes except this node, store the electronic file to be stored. Thus, the blockchain node completes the storage operation of the electronic file.
[0096] It should be noted that for each blockchain node (including the first blockchain node and each second blockchain node), when the legitimacy verification of the preparation message fails, no confirmation message will be generated. Taking the first blockchain node as an example, assume that it does not generate a confirmation message, then it cannot send a confirmation message to the second blockchain node. At this time, the confirmation message received by the second blockchain node does not contain the confirmation message of the first blockchain node, so the storage of the electronic file cannot be executed; at the same time, the first blockchain node will not execute the storage of the electronic file either. That is to say, for each blockchain node (including the first blockchain node and each second blockchain node), the prerequisite for it to execute the storage operation of the electronic file is that the verification of the preparation message by this node passes (or this node generates a confirmation message), and at the same time, it has received the confirmation messages of all other blockchain nodes except this node (or all other blockchain nodes except this node have also generated confirmation messages and sent them successfully). In other words, as long as the verification of the preparation message by one blockchain node fails (or no confirmation message is generated or the confirmation message is not sent successfully), all blockchain nodes (including the first blockchain node and each second blockchain node) will not execute the storage of the electronic file.
[0097] In this embodiment, after steps S201 to S206 are executed, the electronic files to be stored are stored on the blockchain nodes corresponding to each business subsystem. At this time, the electronic file management system can be connected to any business subsystem in the business system, obtain the corresponding electronic files from the blockchain nodes corresponding to the business subsystem, and store them to complete the archiving of the electronic files.
[0098] In another embodiment, the electronic file management system does not need to obtain electronic files from the blockchain nodes corresponding to other business subsystems. As Figure 1C shown, the electronic file management system corresponds to a blockchain node 5, and this blockchain node 5 is connected to the blockchain nodes 1-4 corresponding to each business subsystem. When executing steps S201 to S206 in the above embodiment, the blockchain node 5, as one of the second blockchain nodes, completes the corresponding operations of the second blockchain node. After execution, the electronic files to be stored are also stored in the blockchain node 5.
[0099] Since the blockchain node 5 is the blockchain node corresponding to the electronic file management system, the electronic file management system does not need to obtain electronic files from the blockchain nodes of other business subsystems anymore, and can directly obtain the electronic files from the blockchain node corresponding to itself to complete the archiving.
[0100] It should also be noted that the first blockchain node and the second blockchain node in this embodiment do not specifically refer to a certain blockchain node, but are distinguished based on whether the blockchain node has the function of receiving electronic archive storage requests. The blockchain node that can receive electronic archive storage requests is the first blockchain node, and the blockchain node that cannot receive electronic archive storage requests is the second blockchain node, which depends on the characteristics of the business subsystem corresponding to the blockchain node. The blockchain nodes 1 to 5 in this embodiment are also equal and have no hierarchy.
[0101] The above embodiment, combined with the structural diagram of the blockchain node, illustrates a blockchain-based electronic archive management method provided by the present application. The blockchain-based electronic archive management method uses blockchain to store electronic archives, comprehensively uses blockchain technologies such as electronic signatures and smart contracts, and links the blockchain nodes corresponding to multiple business subsystems for joint verification, thereby realizing the secure storage of archives and effectively preventing the archive data from being tampered with.
[0102] In another embodiment, the present application describes the blockchain-based electronic archive management method of the present application from the perspective of the first blockchain node. Please also refer to Figure 1A , Figure 1B and Figure 3 The method includes steps S301 to S304:
[0103] Step S301, receiving an electronic archive storage request from a user terminal, and generating a corresponding pre-prepared message according to the electronic archive storage request; wherein the electronic archive storage request includes an electronic archive to be stored.
[0104] The executor of this embodiment may be the first blockchain node, that is, blockchain node 1 corresponding to the official document subsystem of this application.
[0105] The first blockchain node receives the electronic archive storage request from the user terminal, and generates a corresponding pre-prepared message according to the electronic archive storage request, wherein the format of the pre-prepared message and the information contained in the pre-prepared message can be found in the relevant description of step S201 in the aforementioned embodiment, which will not be repeated here.
[0106] Step S302: Send the pre-prepared message to other blockchain nodes except the current blockchain node, so that the other blockchain nodes except the current blockchain node generate corresponding preparation messages according to the pre-prepared message.
[0107] Specifically, the other blockchain nodes except the current blockchain node in step S302 refer to the second blockchain nodes, that is, blockchain node 2 corresponding to the financial management subsystem of the present application, blockchain node 3 corresponding to the personal loan subsystem, and blockchain node 4 corresponding to the corporate loan subsystem. Therefore, in step S302, the first blockchain node sends the generated pre-preparation message to each second blockchain node.
[0108] It should be noted that only an example including one first blockchain node and three second blockchain nodes is used for illustration here, which is not a limitation to the present application.
[0109] Step S303, perform a legality verification on the preparation messages of the other blockchain nodes except the current blockchain node.
[0110] Specifically, the first blockchain node receives the preparation messages of the other blockchain nodes except the current blockchain node (i.e., the second blockchain nodes in the present application), and sequentially performs a legality verification on each received preparation message. When the legality verifications of all the preparation messages pass, the legality verification of the preparation messages passes; when the legality verification of at least one preparation message fails, the legality verification of the preparation messages fails. At this time, the first blockchain node returns a verification failure to each second blockchain node.
[0111] For the specific verification steps, reference can be made to the relevant description of step S205 in the foregoing embodiment, which will not be elaborated here.
[0112] Step S304, when the legality verification of the preparation messages passes, store the electronic file to be stored according to the confirmation messages sent by the other blockchain nodes except the current blockchain node.
[0113] Specifically, when the first blockchain passes the legality verification of the preparation messages and the first blockchain node receives the confirmation messages sent by the other blockchain nodes except the current blockchain node (i.e., the second blockchain nodes in the present application), perform the storage operation of the electronic file to be stored.
[0114] When the first blockchain fails to pass the legality verification of the preparation messages, or at least one confirmation message from the second blockchain nodes is not received, the first blockchain node does not perform the storage operation of the electronic file to be stored, and returns an error message to each second blockchain node.
[0115] This embodiment describes the blockchain-based electronic file management method from the perspective of the first blockchain node, mainly sorting out the steps executed at the first blockchain node side. For the steps that need to be executed by the second blockchain nodes, there is not much description in this embodiment. For details, reference can be made to the records in the subsequent embodiments.
[0116] In one embodiment, as Figure 4 shown, the pre-preparation message includes: the electronic file storage request, the serial number corresponding to the electronic file storage request, the first digest corresponding to the electronic file storage request, and the first image batch number of the electronic file to be stored;
[0117] Step S301, receive the electronic file storage request from the client, and generate a corresponding pre-preparation message according to the electronic file storage request, specifically including steps S3011 to S3015:
[0118] Step S3011, receive the electronic file storage request from the client.
[0119] Step S3012, assign a serial number to the electronic file storage request.
[0120] Specifically, the first blockchain node is generated according to the file serial number generation rule of the National Archives Administration and assigned to the electronic file storage request.
[0121] Step S3013, generate the first digest corresponding to the electronic file storage request.
[0122] Among them, the first digest includes the source identifier of the electronic file to be stored in the electronic file storage request.
[0123] Step S3014, obtain the first image batch number of the electronic file to be stored.
[0124] Among them, the first image batch number is the image batch number of the electronic file to be stored.
[0125] Step S3015, integrate the electronic file storage request, the serial number, the first digest, and the first image batch number according to a preset first message format to obtain a pre-preparation message.
[0126] Among them, the format of the pre-preparation message is <<PRE-PREPARE,v,n,d>,m>, where "PRE-PREPARE" represents that the message is a pre-preparation message, "v" is the first image batch number, "n" is the serial number, "d" is the first digest, and "m" is the electronic file storage request sent by the client.
[0127] In this embodiment, the execution order of steps S3012, S3013, and S3014 is not necessarily limited to the above order. In fact, steps S3012, S3013, and S3014 are three parallel steps, and their execution order can be any order.
[0128] In another embodiment, as Figure 5As shown, the preparation message includes: the node number of the blockchain node that generates the preparation message, the serial number corresponding to the electronic file storage request, the second digest corresponding to the electronic file storage request, and the second image batch number of the electronic file to be stored;
[0129] Step S303, perform a legality verification on the preparation messages of other blockchain nodes except the current blockchain node, including:
[0130] Step S3031, verify whether the signature of the preparation message is correct;
[0131] Step S3032, verify whether the second image batch number is consistent with the image batch number of the electronic file to be stored;
[0132] Step S3033, verify whether the serial number is between the preset upper and lower limits; and
[0133] Step S3034, verify whether the digest, image batch number, and serial number in the preparation message are consistent with the digest, image batch number, and serial number in the received pre - preparation message.
[0134] Among them, in step S3031, step S3032, and step S3033, the first blockchain node performs a legality verification on the information in the received preparation message, and in step S3034, the first blockchain node verifies whether the preparation message and the pre - preparation message are consistent, that is, whether the preparation message and the pre - preparation message correspond to the same electronic file storage request.
[0135] In this embodiment, the execution order of step S3031, step S3032, and step S3033 is not necessarily limited to the above order. In fact, step S3031, step S3032, and step S3033 are three parallel steps, and their execution order can be any order.
[0136] In one embodiment, as Figure 6 shown, after the legality verification of the preparation message passes, before step S304, it further includes:
[0137] Step S305, send a confirmation message to other blockchain nodes except the current blockchain node; and receive the confirmation messages of other blockchain nodes except the current blockchain node.
[0138] Specifically, after the legality verification of the preparation message passes, the first blockchain node generates a confirmation message and sends the confirmation message to all second blockchain nodes; at the same time, the first blockchain node receives the confirmation messages sent by the second blockchain nodes.
[0139] In another embodiment, the blockchain-based electronic file management method of the present application is described from the perspective of the second blockchain node. Please also refer to Figure 1A , Figure 1B and Figure 7 . This method includes steps S701 to S704:
[0140] Step S701: Verify the legality of the pre-preparation message sent by the blockchain node corresponding to the official document subsystem received.
[0141] The execution subject of this embodiment may be the second blockchain node, that is, the blockchain node 2 corresponding to the financial management subsystem of the present application, the blockchain node 3 corresponding to the personal loan subsystem, and the blockchain node 4 corresponding to the corporate loan subsystem; the blockchain node 1 corresponding to the official document subsystem is the first blockchain node.
[0142] The second blockchain node receives the pre-preparation message from the first blockchain node and verifies the legality of the pre-preparation message.
[0143] Among them, the pre-preparation message is generated by the blockchain node corresponding to the official document subsystem according to the received electronic file storage request from the client, and the electronic file storage request includes the electronic file to be stored. For the format of the pre-preparation message and the information included in the pre-preparation message, please refer to the relevant description of step S201 in the foregoing embodiment. For the process of verifying the legality of the pre-preparation message, please refer to the relevant description of step S203 in the foregoing embodiment, which will not be elaborated here.
[0144] Step S702: When the legality verification of the pre-preparation message passes, generate a corresponding preparation message according to the pre-preparation message and send the preparation message to other blockchain nodes except the current blockchain node.
[0145] Specifically, for each second blockchain node, after generating the preparation message, it sends the preparation message to the first blockchain node and other second blockchain nodes except its own node.
[0146] When the legality verification of the pre-preparation message fails, return an error message to other blockchain nodes except the current blockchain node.
[0147] Step S703: Verify the legality of the preparation messages of other blockchain nodes except the current blockchain node.
[0148] Specifically, for each second blockchain node, it receives the preparation messages generated by other second blockchain nodes except itself, and sequentially performs legality verification on each received preparation message. When the legality verification of all preparation messages passes, the legality verification of the preparation messages passes; when the legality verification of at least one preparation message fails, the legality verification of the preparation messages fails. At this time, the second blockchain node returns a verification failure to the first blockchain node and other second blockchain nodes except itself.
[0149] For the specific steps of the legality verification of the preparation message, reference can be made to the relevant description of step S205 in the foregoing embodiment, which will not be elaborated here.
[0150] Step S704, when the legality verification passes, store the electronic file to be stored according to the confirmation messages sent by other blockchain nodes except the current blockchain node.
[0151] Specifically, for each second blockchain, when the legality verification of the preparation message passes and the second blockchain node receives the confirmation messages sent by other blockchain nodes except the current blockchain node (i.e., the first blockchain node in this application and other second blockchain nodes except itself), perform the storage operation of the electronic file to be stored.
[0152] When the legality verification of the preparation message by the second blockchain fails, or at least one confirmation message from other blockchain nodes except the current blockchain node is not received, the second blockchain node does not perform the storage operation of the electronic file to be stored, and returns an error message to other blockchain nodes except the current blockchain node.
[0153] This embodiment describes the blockchain-based electronic file management method from the perspective of any second blockchain node, mainly sorting out the steps executed at the second blockchain node side. For the steps that need to be executed by the first blockchain node, there is not much description in this embodiment. For specific details, reference can be made to the records in the foregoing embodiment.
[0154] In one embodiment, as Figure 8 shown, the pre-preparation message includes: the electronic file storage request, the serial number corresponding to the electronic file storage request, the first digest corresponding to the electronic file storage request, and the first image batch number of the electronic file to be stored;
[0155] Step S701, perform legality verification on the pre-preparation message sent by the blockchain node corresponding to the received official document subsystem, specifically including:
[0156] Step S7011, verify whether the signature of the pre-preparation message is correct;
[0157] Step S7012, verify whether the first digest is consistent with the digest of the electronic file to be stored;
[0158] Step S7013, verify whether the first image batch number is consistent with the image batch number of the electronic file to be stored;
[0159] Step S7014, verify whether the serial number is between a preset upper limit and a lower limit.
[0160] Among them, the format of the pre-preparation message is <<PRE-PREPARE, v, n, d>, m>, where "PRE-PREPARE" indicates that this message is a pre-preparation message, "v" is the first image batch number, "n" is the serial number, "d" is the first digest, and "m" is the electronic file storage request sent by the client.
[0161] In this embodiment, the execution order of step S7011, step S7012, step 7013, and step S7014 is not necessarily limited to the above order. In fact, step S7011, step S7012, step 7013, and step S7014 are four parallel steps, and their execution order can be any order.
[0162] In one embodiment, as Figure 9 shown, the preparation message includes: the node number of the blockchain node that generates the preparation message, the serial number corresponding to the electronic file storage request, the second digest corresponding to the electronic file storage request, and the second image batch number of the electronic file to be stored;
[0163] Step S703, perform a legality verification on the preparation messages of other blockchain nodes except the current blockchain node, specifically including:
[0164] Step S7031, verify whether the signature of the preparation message is correct;
[0165] Step S7032, verify whether the second image batch number is consistent with the image batch number of the electronic file to be stored;
[0166] Step S7033, verify whether the serial number is between a preset upper limit and a lower limit; and
[0167] Step S7034, verify whether the digest, image batch number, and serial number in the preparation message are consistent with the digest, image batch number, and serial number in the received pre-preparation message.
[0168] Among them, steps S7031, S7032, and S7033 are for the second blockchain node to verify the legality of the information in the received preparation message, and step S7034 is for the second blockchain node to check whether the preparation message and the pre - preparation message are consistent, that is, whether the preparation message and the pre - preparation message correspond to the same electronic file storage request.
[0169] In this embodiment, the execution order of steps S7031, S7032, and S7033 is not necessarily limited to the above order. In fact, steps S7031, S7032, and S7033 are three parallel steps, and their execution order can be any order.
[0170] In one embodiment, as Figure 10 shown, after the legality verification of the preparation message of other blockchain nodes except the current blockchain node passes, before step S704, it further includes:
[0171] Step S705, sending a confirmation message to other blockchain nodes except the current blockchain node; and receiving the confirmation messages of other blockchain nodes except the current blockchain node.
[0172] Specifically, after the legality verification of the preparation message passes, the second blockchain node generates a confirmation message and sends the confirmation message to the first blockchain node and other second blockchain nodes except this node; at the same time, the second blockchain node receives the confirmation messages sent by other second blockchain nodes except this node.
[0173] This application describes the blockchain - based electronic file management method from the perspectives of the first blockchain and the second blockchain, the first blockchain, and the second blockchain respectively. Based on the same inventive concept, the embodiments of this application also provide a blockchain - based electronic file management device, which can be used to implement the blockchain - based electronic file management method described in the above embodiments, as described in the following embodiments. Since the principle of the blockchain - based electronic file management device for solving problems is similar to that of the blockchain - based electronic file management method, the implementation of the blockchain - based electronic file management device can refer to the implementation of the blockchain - based electronic file management method, and the repeated parts will not be elaborated. Hereinafter, the term "unit" or "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0174] In one embodiment, this application provides a blockchain - based electronic file management device, corresponding to the blockchain - based electronic file management method described from the perspective of the first blockchain, as Figure 11As shown, the device includes:
[0175] An electronic file storage request receiving module 111, configured to receive an electronic file storage request from a user terminal; wherein, the electronic file storage request includes the electronic file to be stored;
[0176] A pre-preparation message generation module 112, configured to generate a corresponding pre-preparation message according to the electronic file storage request; and send the pre-preparation message to other blockchain nodes except the current blockchain node, so that the other blockchain nodes except the current blockchain node generate corresponding preparation messages according to the pre-preparation message;
[0177] A legality verification module 113, configured to perform legality verification on the preparation messages of other blockchain nodes except the current blockchain node;
[0178] An electronic file storage module 114, configured to store the electronic file to be stored according to the confirmation message sent by other blockchain nodes except the current blockchain node when the legality verification is passed.
[0179] In one embodiment, as Figure 12 shown, the pre-preparation message includes: the electronic file storage request, the serial number corresponding to the electronic file storage request, the first digest corresponding to the electronic file storage request, and the first image batch number of the electronic file to be stored;
[0180] The pre-preparation message generation module 112 includes:
[0181] A serial number generation unit 1121, configured to assign a serial number to the electronic file storage request;
[0182] A digest generation unit 1122, configured to generate the first digest corresponding to the electronic file storage request;
[0183] An image batch number generation unit 1123, configured to obtain the first image batch number of the electronic file to be stored;
[0184] A pre-preparation message generation unit 1124, configured to integrate the electronic file storage request, the serial number, the first digest, and the first image batch number according to a preset first message format to obtain a pre-preparation message.
[0185] In one embodiment, the preparation message includes: the node number of the blockchain node that generates the preparation message, the serial number corresponding to the electronic file storage request, the second digest corresponding to the electronic file storage request, and the second image batch number of the electronic file to be stored;
[0186] The legality verification module 113 is specifically configured to:
[0187] Verify whether the signature of the preparation message is correct;
[0188] Verify whether the second image batch number is consistent with the image batch number of the electronic file to be stored;
[0189] Verify whether the serial number is between a preset upper limit and a lower limit; and
[0190] Verify whether the digest, image batch number, and serial number in the preparation message are consistent with the digest, image batch number, and serial number in the received pre - preparation message.
[0191] In one embodiment, the present application further provides another blockchain - based electronic file management device, corresponding to the blockchain - based electronic file management method described from the perspective of the second blockchain, as Figure 13 shown, the device includes:
[0192] A pre - preparation message verification module 131, configured to perform a legality verification on the pre - preparation message sent by the blockchain node corresponding to the official document subsystem received; wherein, the pre - preparation message is generated by the blockchain node corresponding to the official document subsystem according to the received electronic file storage request of the user terminal; wherein, the electronic file storage request includes the electronic file to be stored;
[0193] A preparation message generation module 132, configured to generate a corresponding preparation message according to the pre - preparation message and send the preparation message to other blockchain nodes except the current blockchain node when the legality verification of the pre - preparation message passes;
[0194] A preparation message verification module 133, configured to perform a legality verification on the preparation message of other blockchain nodes except the current blockchain node;
[0195] An electronic file storage module 134, configured to store the electronic file to be stored according to the confirmation message sent by other blockchain nodes except the current blockchain node when the legality verification passes.
[0196] In one embodiment, the pre - preparation message includes: the electronic file storage request, the serial number corresponding to the electronic file storage request, the first digest corresponding to the electronic file storage request, and the first image batch number of the electronic file to be stored;
[0197] The pre - preparation message verification module 131 is specifically configured to:
[0198] Verify whether the signature of the pre - preparation message is correct;
[0199] Verify whether the first digest is consistent with the digest of the electronic file to be stored;
[0200] Verify whether the first image batch number is consistent with the image batch number of the electronic file to be stored;
[0201] Verify whether the serial number is between a preset upper limit and a lower limit.
[0202] In one embodiment, the preparation message includes: the node number of the blockchain node that generates the preparation message, the serial number corresponding to the electronic file storage request, the second digest corresponding to the electronic file storage request, and the second image batch number of the electronic file to be stored
[0203] The preparation message verification module 133 is specifically configured to:
[0204] Verify whether the signature of the preparation message is correct;
[0205] Verify whether the second image batch number is consistent with the image batch number of the electronic file to be stored;
[0206] Verify whether the serial number is between a preset upper limit and a lower limit; and
[0207] Verify whether the digest, image batch number, and serial number in the preparation message are consistent with the digest, image batch number, and serial number in the received pre-preparation message.
[0208] In one embodiment, the present application further provides a blockchain-based electronic file management system, corresponding to the blockchain-based electronic file management method described from the perspectives of the first blockchain and the second blockchain, as Figure 14 shown, the system includes a first device 141 and a plurality of second devices 142;
[0209] The first device 141 includes:
[0210] An electronic file storage request receiving module 1411, configured to receive an electronic file storage request from a user terminal; wherein, the electronic file storage request includes an electronic file to be stored;
[0211] A pre-preparation message generation module 1412, configured to generate a corresponding pre-preparation message according to the electronic file storage request; and send the pre-preparation message to the plurality of second devices, so that the plurality of second devices generate corresponding preparation messages according to the pre-preparation message;
[0212] A legality verification module 1413, configured to perform legality verification on the preparation messages sent by the plurality of second devices;
[0213] The first electronic file storage module 1414 is configured to store the electronic file to be stored according to the confirmation messages sent by the multiple second devices when the legitimacy verification is passed;
[0214] Each of the multiple second devices 142 includes:
[0215] A pre-preparation message verification module 1421, configured to perform a legitimacy verification on the pre-preparation message sent by the first device;
[0216] A preparation message generation module 1422, configured to generate a corresponding preparation message according to the pre-preparation message and send the preparation message to the first device and other second devices except the current second device when the legitimacy verification of the pre-preparation message is passed;
[0217] A preparation message verification module 1423, configured to perform a legitimacy verification on the received preparation message;
[0218] A second electronic file storage module 1424, configured to store the electronic file to be stored according to the confirmation messages sent by the first device and other second devices except the current second device when the legitimacy verification of the received preparation message is passed.
[0219] In summary, the blockchain-based electronic file management method, device and system of the present application use the blockchain for file storage, comprehensively apply blockchain technologies such as electronic signatures and smart contracts, and jointly verify through multiple business subsystems, realizing the secure storage of files and effectively preventing file data from being tampered with.
[0220] Those skilled in the art should understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification can take the form of completely hardware embodiments, completely software embodiments, or embodiments combining software and hardware aspects. Moreover, the embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. The key point of each embodiment is to illustrate the differences from other embodiments. In particular, for the hardware + program type embodiments and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, reference can be made to the partial description of the method embodiments. Although the embodiments of this specification provide method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative means. The order of the steps listed in the embodiments is only one way among the execution orders of numerous steps and does not represent the only execution order.
[0221] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the embodiments of this specification. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples. The above is only the embodiments of the embodiments of this specification and is not used to limit the embodiments of this specification. For those skilled in the art, various changes and modifications can be made to the embodiments of this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the embodiments of this specification should be included within the scope of the claims of the embodiments of this specification.
Claims
1. A blockchain-based electronic file management method, characterized in that, it includes: Receiving an electronic file storage request from a client, and generating a corresponding pre-preparation message according to the electronic file storage request. The pre-preparation message includes: the electronic file storage request, the serial number corresponding to the electronic file storage request, the first digest corresponding to the electronic file storage request, and the first image batch number of the electronic file to be stored; The generating of the corresponding pre-preparation message according to the electronic file storage request includes: Allocating a serial number to the electronic file storage request; Generating the first digest corresponding to the electronic file storage request; Obtaining the first image batch number of the electronic file to be stored; Integrating the electronic file storage request, the serial number, the first digest, and the first image batch number according to a preset first message format to obtain a pre-preparation message; wherein, the electronic file storage request includes the electronic file to be stored; Sending the pre-preparation message to other blockchain nodes except the current blockchain node, so that the other blockchain nodes except the current blockchain node generate corresponding preparation messages according to the pre-preparation message; Performing a legality verification on the preparation messages of the other blockchain nodes except the current blockchain node; When the legality verification passes, storing the electronic file to be stored according to the confirmation message sent by the other blockchain nodes except the current blockchain node.
2. The blockchain-based electronic file management method according to claim 1, characterized in that, The preparation message includes: the node number of the blockchain node that generates the preparation message, the serial number corresponding to the electronic file storage request, the second digest corresponding to the electronic file storage request, and the second image batch number of the electronic file to be stored; The performing of the legality verification on the preparation messages of the other blockchain nodes except the current blockchain node includes: Verifying whether the signature of the preparation message is correct; Verifying whether the second image batch number is consistent with the image batch number of the electronic file to be stored; Verifying whether the serial number is between a preset upper limit and a lower limit; and Verifying whether the digest, image batch number, and serial number in the preparation message are consistent with the digest, image batch number, and serial number in the received pre-preparation message.
3. The blockchain-based electronic file management method according to claim 2, characterized in that, After the legality verification passes, it further includes: Sending a confirmation message to the other blockchain nodes except the current blockchain node; and Receiving the confirmation message from the other blockchain nodes except the current blockchain node.
4. A blockchain-based electronic file management method, characterized in that, it includes: Verify the legality of the pre-prepared message sent by the blockchain node corresponding to the received official document subsystem; wherein, the pre-prepared message is generated by the blockchain node corresponding to the official document subsystem according to the received electronic file storage request from the client, and the pre-prepared message includes: the electronic file storage request, the serial number corresponding to the electronic file storage request, the first digest corresponding to the electronic file storage request, and the first image batch number of the electronic file to be stored; The verification of the legality of the pre-prepared message includes: Verify whether the signature of the pre-prepared message is correct; Verify whether the first digest is consistent with the digest of the electronic file to be stored; Verify whether the first image batch number is consistent with the image batch number of the electronic file to be stored; Verify whether the serial number is between the preset upper and lower limits; Wherein, the electronic file storage request includes the electronic file to be stored; When the verification of the legality of the pre-prepared message passes, generate a corresponding prepared message according to the pre-prepared message, and send the prepared message to other blockchain nodes except the current blockchain node; Verify the legality of the prepared message of other blockchain nodes except the current blockchain node; When the legality verification passes, store the electronic file to be stored according to the confirmation message sent by other blockchain nodes except the current blockchain node.
5. The blockchain-based electronic file management method according to claim 4, wherein, The prepared message includes: the node number of the blockchain node that generates the prepared message, the serial number corresponding to the electronic file storage request, the second digest corresponding to the electronic file storage request, and the second image batch number of the electronic file to be stored The verification of the legality of the prepared message of other blockchain nodes except the current blockchain node includes: Verify whether the signature of the prepared message is correct; Verify whether the second image batch number is consistent with the image batch number of the electronic file to be stored; Verify whether the serial number is between the preset upper and lower limits; and Verify whether the digest, image batch number, and serial number in the prepared message are consistent with the digest, image batch number, and serial number in the received pre-prepared message.
6. The blockchain-based electronic file management method according to claim 5, wherein, After the verification of the legality of the prepared message of other blockchain nodes except the current blockchain node passes, it further includes: Send a confirmation message to other blockchain nodes except the current blockchain node; and Receive the confirmation message from other blockchain nodes except the current blockchain node.
7. A blockchain-based electronic file management method, wherein, Includes: The first blockchain node receives an electronic file storage request from a client and generates a corresponding pre-preparation message according to the electronic file storage request. The pre-preparation message includes: the electronic file storage request, the sequence number corresponding to the electronic file storage request, the first digest corresponding to the electronic file storage request, and the first image batch number of the electronic file to be stored; Wherein, the electronic file storage request includes the electronic file to be stored; The first blockchain node sends the pre-preparation message to a plurality of second blockchain nodes; The plurality of second blockchain nodes respectively perform a legality verification on the pre-preparation message; The legality verification of the pre-preparation message includes: Verifying whether the signature of the pre-preparation message is correct; Verifying whether the first digest is consistent with the digest of the electronic file to be stored; Verifying whether the first image batch number is consistent with the image batch number of the electronic file to be stored; Verifying whether the sequence number is between a preset upper limit and a preset lower limit; When the legality verification of the pre-preparation message passes, the plurality of second blockchain nodes respectively generate corresponding preparation messages according to the pre-preparation message and send the preparation messages to the first blockchain node and other second blockchain nodes except the current second blockchain node; The first blockchain node and the plurality of second blockchain nodes perform a legality verification on the received preparation messages; When the legality verification of the received preparation message passes, store the electronic file to be stored according to the confirmation messages sent by the first blockchain node and other second blockchain nodes except the current second blockchain node.
8. An electronic file management device based on a blockchain, characterized in that, it includes: An electronic file storage request receiving module, configured to receive an electronic file storage request from a client; wherein, the electronic file storage request includes the electronic file to be stored; A pre-preparation message generating module, configured to generate a corresponding pre-preparation message according to the electronic file storage request; and send the pre-preparation message to other blockchain nodes except the current blockchain node, so that the other blockchain nodes except the current blockchain node generate corresponding preparation messages according to the pre-preparation message. The pre-preparation message includes: the electronic file storage request, the sequence number corresponding to the electronic file storage request, the first digest corresponding to the electronic file storage request, and the first image batch number of the electronic file to be stored; The pre-preparation message generating module includes: A sequence number generating unit, configured to allocate a sequence number to the electronic file storage request; A digest generating unit, configured to generate the first digest corresponding to the electronic file storage request; An image batch number generating unit, configured to obtain the first image batch number of the electronic file to be stored; A pre-preparation message generating unit, configured to integrate the electronic file storage request, the sequence number, the first digest, and the first image batch number according to a preset first message format to obtain a pre-preparation message; A legitimacy verification module, configured to verify the legitimacy of the preparation messages of other blockchain nodes except the current blockchain node; An electronic file storage module, configured to store the electronic file to be stored according to the confirmation messages sent by other blockchain nodes except the current blockchain node when the legitimacy verification is passed.
9. The blockchain-based electronic file management device according to claim 8, characterized in that the preparation message includes: the node number of the blockchain node that generates the preparation message, the serial number corresponding to the electronic file storage request, the second digest corresponding to the electronic file storage request, and the second image batch number of the electronic file to be stored; The legitimacy verification module is specifically configured to: verify whether the signature of the preparation message is correct; verify whether the second image batch number is consistent with the image batch number of the electronic file to be stored; verify whether the serial number is between the preset upper limit and lower limit; and verify whether the digest, image batch number, and serial number in the preparation message are consistent with the digest, image batch number, and serial number in the received pre-preparation message.
10. A blockchain-based electronic file management device, characterized in that it includes: A pre-preparation message verification module, configured to verify the legitimacy of the pre-preparation message sent by the blockchain node corresponding to the official document subsystem received; wherein, the pre-preparation message is generated by the blockchain node corresponding to the official document subsystem according to the received electronic file storage request of the user terminal, and the pre-preparation message includes: the electronic file storage request, the serial number corresponding to the electronic file storage request, the first digest corresponding to the electronic file storage request, and the first image batch number of the electronic file to be stored; The pre-preparation message verification module is specifically configured to: verify whether the signature of the pre-preparation message is correct; verify whether the first digest is consistent with the digest of the electronic file to be stored; verify whether the first image batch number is consistent with the image batch number of the electronic file to be stored; wherein, the electronic file storage request includes the electronic file to be stored; A preparation message generation module, configured to generate a corresponding preparation message according to the pre-preparation message and send the preparation message to other blockchain nodes except the current blockchain node when the legitimacy verification of the pre-preparation message is passed; A preparation message verification module, configured to verify the legitimacy of the preparation messages of other blockchain nodes except the current blockchain node; An electronic file storage module, configured to store the electronic file to be stored according to the confirmation messages sent by other blockchain nodes except the current blockchain node when the legitimacy verification is passed.
11. The blockchain-based electronic file management device according to claim 10, characterized in that the preparation message includes: the node number of the blockchain node that generates the preparation message, the serial number corresponding to the electronic file storage request, the second digest corresponding to the electronic file storage request, and the second image batch number of the electronic file to be stored The preparation message verification module is specifically configured to: Verify whether the signature of the preparation message is correct; Verify whether the second image batch number is consistent with the image batch number of the electronic file to be stored; Verify whether the serial number is between the preset upper and lower limits; and Verify whether the digest, image batch number, and serial number in the preparation message are consistent with the digest, image batch number, and serial number in the received pre-preparation message.
12. An electronic file management system based on blockchain, characterized in that, it includes a first device and a plurality of second devices; The first device includes: An electronic file storage request receiving module, configured to receive an electronic file storage request from a user terminal; wherein, the electronic file storage request includes the electronic file to be stored; A pre-preparation message generation module, configured to generate a corresponding pre-preparation message according to the electronic file storage request, and the pre-preparation message includes: the electronic file storage request, the serial number corresponding to the electronic file storage request, the first digest corresponding to the electronic file storage request, and the first image batch number of the electronic file to be stored; The pre-preparation message generation module includes: A serial number generation unit, configured to assign a serial number to the electronic file storage request; A digest generation unit, configured to generate the first digest corresponding to the electronic file storage request; An image batch number generation unit, configured to obtain the first image batch number of the electronic file to be stored; A pre-preparation message generation unit, configured to integrate the electronic file storage request, the serial number, the first digest, and the first image batch number according to a preset first message format to obtain a pre-preparation message; and send the pre-preparation message to the plurality of second devices, so that the plurality of second devices generate corresponding preparation messages according to the pre-preparation message; A legality verification module, configured to perform legality verification on the preparation messages sent by the plurality of second devices; A first electronic file storage module, configured to store the electronic file to be stored according to the confirmation messages sent by the plurality of second devices when the legality verification is passed; Each of the plurality of second devices includes: A pre-preparation message verification module, configured to perform legality verification on the pre-preparation message sent by the first device; A preparation message generation module, configured to generate a corresponding preparation message according to the pre-preparation message and send the preparation message to the first device and other second devices except the current second device when the legality verification of the pre-preparation message is passed; A preparation message verification module, configured to perform legality verification on the received preparation message; A second electronic file storage module, configured to store the electronic file to be stored according to the confirmation messages sent by the first device and other second devices except the current second device when the legality verification of the received preparation message is passed.
Citation Information
Patent Citations
Public security system archive management method based on blockchain
CN108491291A
Block chain-based information transmission method and device, electronic equipment and storage medium
CN112966305A