Method, device, equipment and medium for constructing blockchain file system

Building a decentralized file system through blockchain technology solves the problem that data access requires central node control in the existing technology, and realizes complete private and information security of file storage.

CN114327276BActive Publication Date: 2025-04-01SHANGHAI JIANSU NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111642498.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2025-04-01
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

The existing network file system requires downloading clients for login and data access, and cannot achieve complete privacy and information security of data.

Method used

Blockchain technology is used to build a decentralized file system, and through blockchain file system drivers and callback registration functions collections, the virtual diskization of the file system and the processing of file processing messages is realized, avoiding central node control.

Benefits of technology

It realizes complete private and information security of file storage. Users can perform graphical or command-line operations through virtual drive letters and folders to realize decentralized file system management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114327276B_ABST
    Figure CN114327276B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, equipment and medium for constructing a blockchain file system, wherein the method includes: obtaining a source drive letter and a source path and a target drive letter and a target path, wherein the source drive letter and the source path are used to connect to a blockchain, and the target drive letter is presented as a local virtual disk; creating the blockchain file system driver; setting the blockchain file system startup option parameters and the blockchain callback registration function set; setting a startup message according to the blockchain file system startup option parameters; sending the startup message to the blockchain file system driver, starting the blockchain file system with the target drive letter or the target path as the entry, and processing the file processing message of the source drive letter or the source path according to the blockchain callback registration function set. The present application implements a decentralized file system based on network mounting.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] A file system is a mechanism for organizing data and metadata on a storage device. Existing local storage technologies mainly include fast storage and object storage. In order to achieve storage expansion and storage flexibility, network file systems came into being.

[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0004] In view of the problems in the prior art, the purpose of the present invention is to provide a method, device, equipment and medium for constructing a blockchain file system, which overcomes the difficulties of the prior art and realizes a decentralized file system based on network mounting.

[0005] An embodiment of the present invention provides a method for constructing a blockchain file system, comprising:

[0006] Obtain a source drive letter and a source path as well as a target drive letter and a target path, wherein the source drive letter and the source path are used to connect to the blockchain, and the target drive letter is presented as a local virtual disk;

[0007] Create the blockchain file system driver;

[0008] Set the blockchain file system startup option parameters and the blockchain callback registration function set;

[0009] Setting a startup message according to the blockchain file system startup option parameters;

[0010] The startup message is sent to the blockchain file system driver, the blockchain file system is started with the target drive letter or target path as the entry, and the file processing message of the source drive letter or source path is processed according to the blockchain callback registration function set.

[0011] In some embodiments of the present application, it also includes: setting the number of threads of the blockchain file system to form a thread pool, and the blockchain file system processes the file processing message of the source drive letter or source path through the thread pool.

[0012] In some embodiments of the present application, the on-chain information, user information, transactor, and retriever of the blockchain are abstracted into a folder with the target drive letter or target path as the entry.

[0013] In some embodiments of the present application, the file processing message includes one or more of the blockchain file system operation message, block operation message, account operation message and contract operation message.

[0014] In some embodiments of the present application, the blockchain file system operation message is used to perform one or more of the blockchain file system operations of virtual disk size management, obtaining available space, and virtual disk encryption of the blockchain file system.

[0015] In some embodiments of the present application, the block operation message is used to perform one or more block operations including block query, transaction query, and submission and storage of transactions.

[0016] In some embodiments of the present application, the account operation is used to perform one or more account operations of user query and user transaction history query.

[0017] In some embodiments of the present application, the contract operation is used to perform one or more contract operations including contract query, contract creation, contract call, contract deletion, and contract update.

[0018] In some embodiments of the present application, sending the startup message to the blockchain file system driver, starting the blockchain file system with the target drive letter / target path as the entry, and processing the file read message of the source drive letter / source path according to the blockchain callback registration function set includes:

[0019] According to the startup message, a mount mode of the blockchain file system is determined, where the mount mode is one or more mount modes selected from network mount or local mount, support for unmounting, no support for unmounting, mount visible only to the user, and mount visible globally.

[0020] In some embodiments of the present application, it also includes:

[0021] Get the updated source drive letter or source path;

[0022] The blockchain file system uses the target drive letter or target path as an entry, and processes the updated file processing message of the source drive letter / source path according to the blockchain callback registration function set.

[0023] According to another aspect of the present application, a device for constructing a blockchain file system is also provided, including:

[0024] An acquisition module, configured to acquire a source drive letter and a source path and a target drive letter and a target path, wherein the source drive letter and the source path are used to connect to the blockchain, and the target drive letter is presented as a local virtual disk;

[0025] A creation module configured to create the blockchain file system driver;

[0026] A first setting module is configured to set the blockchain file system startup option parameters and the blockchain callback registration function set;

[0027] A second setting module is configured to set a startup message according to the blockchain file system startup option parameters;

[0028] The startup module is configured to send the startup message to the blockchain file system driver to start the blockchain file system with the target drive letter or target path as the entry, and process the file processing message of the source drive letter or source path according to the blockchain callback registration function set.

[0029] An embodiment of the present invention further provides a device for constructing a blockchain file system, including:

[0030] processor;

[0031] a memory in which executable instructions for the processor are stored;

[0032] Among them, the processor is configured to perform the steps of the above-mentioned blockchain file system construction method by executing executable instructions.

[0033] An embodiment of the present invention also provides a computer-readable storage medium for storing a program, which, when executed, implements the steps of the method for constructing the above-mentioned blockchain file system.

[0034] The purpose of the present invention is to provide a method, device, equipment and medium for constructing a blockchain file system, which can start the file system with a virtual disk as the entrance, process the file processing message of the blockchain according to the blockchain callback registration function set, so as not to be controlled by the central node, complete the storage of files through the blockchain, and realize complete data privacy and information security. The blockchain file system in which virtual drive letters and folders can be presented to users in a graphical manner can also be presented in a command line manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Other features, objectives and advantages of the present invention will become more apparent from a reading of the detailed description of non-limiting embodiments made with reference to the following accompanying drawings.

[0036] Figure 1 It is a flowchart of one embodiment of the method for constructing a blockchain file system provided by the present invention;

[0037] Figure 2 It is a flowchart of setting file system startup option parameters and blockchain callback registration function set provided by the present invention;

[0038] Figure 3 It is a flowchart of the second embodiment of the method for constructing a blockchain file system provided by the present invention;

[0039] Figure 4This is a flowchart of mounting the blockchain file system provided by the present invention;

[0040] Figure 5 It is a file architecture diagram of the method for constructing a blockchain file system provided by the present invention;

[0041] Figure 6 It is a schematic diagram of the architecture of the blockchain file system provided by the present invention;

[0042] Figure 7 It is a module schematic diagram of one embodiment of a device for constructing a blockchain file system provided by the present invention;

[0043] Figure 8 It is a schematic diagram of the operation of the construction device of the blockchain file system of the present invention. DETAILED DESCRIPTION

[0044] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to make the present invention comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art.

[0045] The accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware forwarding modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0046] In addition, the processes shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps can be decomposed, some steps can be combined or partially combined, and the actual execution order may change according to the actual situation. The words "first", "second" and similar words used in the specific description do not indicate any order, quantity or importance, but are only used to distinguish different components. It should be noted that the embodiments of the present invention and the features in different embodiments can be combined with each other without conflict.

[0047] The inventors have found in practice that, however, some existing network file systems, such as various network disks, require downloading clients and performing authentication and login. At the same time, data access needs to go through an intermediate server, which makes it impossible to achieve complete data privacy. It can be seen that how to realize a decentralized network-mounted file system is a technical problem that needs to be solved urgently by those skilled in the art.

[0048] The inventors consider applying blockchain technology to the file system to solve the above technical problems.

[0049] Blockchain technology is a decentralized distributed data management framework and has been applied to many distributed system scenarios. Blockchain can realize distributed trusted computing and transactions efficiently and at low cost through a decentralized and unforgeable computing model. It is currently widely used in finance, logistics, industrial manufacturing, medical care, the Internet of Things and other fields.

[0050] Blockchain is decentralized, and each blockchain node is independent of each other. At the same time, smart contracts define the contractual rights of access and depend on the consent of both parties. Entities such as rail transit nodes can participate in blockchain transactions in a limited way or in a more proactive way. Smart contracts mainly provide verification and execution of the conditions set in the contract, allowing trusted transactions without a third party. These transactions are traceable and irreversible.

[0051] The embodiment of the present invention provides a method, device, equipment and medium for constructing a blockchain file system. The inventive concept is to start the file system with a virtual disk as the entry point and process the file processing message of the blockchain according to the blockchain callback registration function set. As a result, the user's reading of files in the file system is not controlled by the central node, and the file storage is completed through the blockchain, achieving complete data privacy and information security.

[0052] Reference Figure 1 , which shows a flowchart of one embodiment of the method for constructing a blockchain file system provided by the present invention. Figure 1 The following steps are shown:

[0053] Step S110: Obtain a source drive letter and a source path as well as a target drive letter and a target path, wherein the source drive letter and the source path are used to connect to the blockchain, and the target drive letter is presented as a local virtual disk.

[0054] Specifically, the source drive letter and the source path are used to connect to the blockchain. For example, the source path may be / opt / block_data. The target drive letter and the target path are local virtual disks. For example, the target drive letter may be G:\\. The source drive letter and the source path and the target drive letter and the target path may be set as required, and the present application is not limited thereto. The switching and updating of the source drive letter and the source path and the target drive letter and the target path may realize the updating of the association relationship between the blockchain and the local virtual disk.

[0055] Step S120: Create a blockchain file system driver.

[0056] Specifically, step S120 can create a globally unique file system driver. In addition, step S120 can perform anti-concurrency settings on the blockchain file system driver.

[0057] Step S130: Setting blockchain file system startup option parameters and blockchain callback registration function set.

[0058] Specifically, before executing step S130, it can be determined whether the blockchain file system driver has been created, and if it is determined to be not, step S130 is executed. If it is determined to be yes, the blockchain file system startup process can be terminated.

[0059] Specifically, the parameter content set in step S130 and the blockchain callback registration function set will be combined with Figure 2 The flowchart shown is described in detail.

[0060] Step S140: Setting a startup message according to the blockchain file system startup option parameters.

[0061] Step S150: Send the startup message to the blockchain file system driver to start the blockchain file system with the target drive letter or target path as the entry, and process the file processing message of the source drive letter or source path according to the blockchain callback registration function set.

[0062] In the construction method of the blockchain file system provided by the present application, the file system can be started with a virtual disk as the entry point, and the file processing message of the blockchain can be processed according to the blockchain callback registration function set, so that it is not controlled by the central node, and the file storage is completed through the blockchain, achieving complete data privacy and information security. The blockchain file system, in which virtual drive letters and folders can be presented to the user in a graphical manner, can also be presented in a command line manner.

[0063] See below Figure 2 , Figure 2 It is a flowchart of setting blockchain file system startup option parameters and blockchain callback registration function set provided by the present invention. Figure 2 The following steps are shown:

[0064] Step S131: Setting the blockchain file system external startup option parameters.

[0065] The blockchain file system external startup option parameters can set true or false for whether network mounting is supported (if not, local disk mapping); whether pluggable mounting is supported; whether the mount is only visible to the current user; whether network unmounting is supported; whether debugging information is supported; whether kernel information printing to user mode is supported. The blockchain file system external startup option parameters can also configure the timeout mechanism (such as timeout period, whether to automatically unmount after operation timeout, etc.); local mount point; network blockchain file system address; number of blockchain file system service threads, etc.

[0066] Step S132: Setting the internal startup option parameters of the blockchain file system.

[0067] The internal startup option parameters of the blockchain file system may include general parameters, mount type parameters, number of threads, timeout, blockchain file system context processing callback function, debugging parameters, and user management permissions for configuration. General parameters may include the current software system version number, whether to support multi-channel streaming access to the same file, and whether to mount to a new local drive letter / path (a drive letter / path that does not currently exist). Specifically, the internal startup option parameters of the blockchain file system may be set according to the settings of the external startup option parameters of the blockchain file system. For example, according to the set external startup option parameters of the blockchain file system, when performing network mounting, the mount type parameter may be set to support network mounting options, support network unmounting options, and set the source mount address at the same time. When performing local mounting, the mount type parameter may be set to support local disk mounting, and the local disk mounting is pluggable mounting. User permission management may be set according to the plug-in method and whether the mount is visible only to the current user.

[0068] Step S133: Set the blockchain callback registration function set.

[0069] Specifically, the file processing message can be analyzed into specific operation messages through the blockchain callback registration function set, such as one or more of the blockchain file system operation message, block operation message, account operation message and contract operation message. The blockchain file system operation message is used to perform one or more blockchain file system operations in the virtual disk size management, obtaining available space, and virtual disk encryption of the blockchain file system. The block operation message is used to perform one or more block operations in block query, transaction query, submission and storage of transactions. The account operation is used to perform one or more account operations in user query and user transaction history query. The contract operation is used to perform one or more contract operations in contract query, contract creation, contract call, contract deletion, and contract update.

[0070] See below Figure 3 , Figure 3This is a flowchart of the second embodiment of the method for constructing a blockchain file system provided by the present invention.

[0071] Figure 3 The parameters required for steps S1401 to S1412 shown in FIG. Figure 2 Configure according to the steps shown.

[0072] Step S1401: Construct a blockchain file system description dictionary.

[0073] The blockchain file system description dictionary is used to maintain a dictionary tree of all file information. Its data format is, for example: [file path name, file description information].

[0074] Step S1402: Construct a blockchain file system description.

[0075] Specifically, the blockchain file system description may include, for example, the software version number, whether it supports multiple streams reading the same file, whether the file name is case sensitive, etc.

[0076] Step S1403: Whether debugging information printing is supported.

[0077] If yes, the information about debugging information printing in the blockchain file system description is set to support debugging printing, and step S1404 is continued. If no, step S1405 is continued.

[0078] Step S1404: Whether debugging driver log information printing is supported.

[0079] If yes, then the information about the debugging driver log information printing in the blockchain file system description is set to support the debugging driver log information printing, and continue to execute step S1405. If no, continue to execute step S1405.

[0080] Step S1405: Whether network mounting is supported.

[0081] Network mounting is used to realize network sharing of blockchain. If yes, the network mounting information in the blockchain file system description is set to support network mounting, and continue to step S1406. If no, continue to step S1407.

[0082] Step S1406: Whether network unmounting is supported.

[0083] Wherein, network unmounting is the unmounting of the corresponding network mount. If step S1406 is judged as yes, the network unmounting information in the blockchain file system description is set to support network unmounting, and step S1408 is continued. If step S1406 is judged as no, step S1407 is continued.

[0084] Step S1407: Whether blockchain file system unmounting is supported.

[0085] If network mounting is not supported, it can be understood that only local mounting is supported. Local mounting only implements local mounting of the blockchain, but does not implement network sharing of the blockchain. Blockchain file system unmounting is the unmounting of the corresponding local mounting.

[0086] If step S1407 is judged as yes, the blockchain file system unmounting information in the blockchain file system description is set to support blockchain file system unmounting, and step S1408 is continued. If step S1407 is judged as no, the blockchain file system description is set to a normal local mount mode, and step S1408 is continued.

[0087] Step S1408: Whether the mount is visible only to the current user.

[0088] If so, the information in the blockchain file system description regarding whether it is visible only to the current user is set to be visible only to the current user, and step S1409 is executed; if not, step S1410 is executed.

[0089] Step S1409: Whether it is a non-ordinary local mount.

[0090] Non-ordinary local mounts are network mounts or do not support removable mount mode.

[0091] If the judgment in step S1409 is yes, the non-ordinary local mount information in the blockchain file system description is set as non-ordinary local mount, and step S1410 is executed. If not, step S1410 is executed.

[0092] Step S1410: Set the number of processing threads and operation timeout duration of the blockchain file system.

[0093] Specifically, the threads of the multiple blockchain file systems are set to form a thread pool, and the blockchain file system processes the file processing message of the source drive letter or source path through the thread pool.

[0094] Step S1411: Set the file node processing context object structure.

[0095] The file node processing context object may include the file node addition function, the file node search function, the file node enumeration function, the file node removal function (remove from the file node information dictionary), the file node move function (move the node from the file node information dictionary to a new location), the file node name acquisition function, the number of file indexes, the file mutex semaphore, the file node description dictionary (a dictionary tree used to maintain all file information: [file path name, file description information]), the definition of the file path description dictionary (a dictionary tree used to maintain all file directory information: [file directory, contained file description information]), and other information definitions.

[0096] Step S1412: Blockchain file system mounting process.

[0097] Specifically, step S1412 can combine the driver parameters set in the above steps S1401 to S1411 with the required blockchain callback registration function set, and realize the mounting of the local virtual blockchain file system through the DokanMain function, thereby realizing the operation and access to the remote blockchain system. Among them, the DokanMain function is a method that can be used to realize file system mounting based on dokany (a user-mode file system driver). The required blockchain callback registration function set can be predefined by the operating system. This application designs and implements these predefined blockchain file system callback functions to realize a set of operation interactions with the remote blockchain system, including: chain information query (block query, transaction query, batch retrieval), chain interaction (deployment of contracts, sending transactions, modification of blockchain storage), on-chain user information access, user history transaction filtering and other functions.

[0098] See below Figure 4 , Figure 4 This is a flowchart of the mounting of the blockchain file system provided by the present invention. Figure 4 The following steps are shown:

[0099] Step S14121: Open the blockchain file system driver.

[0100] Specifically, step S14121 can open the blockchain file system driver created in step S120 by calling an interface function (when applied to a Windows system, the CreateFile interface function can be called). The blockchain file system driver in this application is independent of the upper blockchain file system, and the blockchain file system driver can provide the upper blockchain file system with a system bottom layer interface interaction service.

[0101] Step S14122: Create a blockchain file system instance.

[0102] Specifically, step S14122 can be implemented by the following steps: First, create a blockchain file system instance (for example, create a dokan file system instance instance), and mount the created blockchain file system instance to the global instance queue. Assign the defined attribute information to the created blockchain file system instance. The attribute information may include but is not limited to the number of service threads, blockchain file system global context information, mount point drive name, network mount source information, timeout period, file object expansion unit size, file object reading and writing unit size, etc. Among them, some attribute information can be Figure 3 Steps S1401 to S1411 are defined. Finally, the blockchain file system operation function is assigned to the blockchain file system instance as the blockchain file system basic callback. The blockchain file system operation function may include new file creation, file buffer refresh, file reading and writing, property setting, file list acquisition, etc.

[0103] Step S14123: Start the blockchain file system instance.

[0104] Specifically, step S14123 can notify the blockchain file system driver to mount the target drive letter through the startup time element, and call the system library function to send the startup message to the blockchain file system driver. After receiving the notification message and the startup message, the blockchain file system driver notifies the operating system to allocate the target drive letter as a virtual drive letter and mounts it for the user. The operating system will provide feedback based on the mounting result.

[0105] See below Figure 5 , Figure 5It is a file architecture diagram of the construction method of the blockchain file system provided by the present invention. In the present application, the folder of chain A can be connected through the local virtual disk entrance (D:). The on-chain information, user information, trader and retriever of blockchain chain A can be stored in the folder of chain A in the form of a folder. The folder of on-chain information can store a block list and the transaction history on the chain. The folder of user information can store account lists of different categories. For example, the account information of the account name starting with a is stored in the folder of account list a; the account information of the account name starting with b is stored in the folder of account list a. Further, the resource information and transaction history of each account can be stored in the folder of the corresponding account. The folder of the trader can store the folder of online transaction applications and the folder of evidence storage. The folder of the retriever can store the folder of chain information retrieval and the folder of contract information retrieval. Thus, the chain, transaction, contract, and account are abstracted into folders, and the corresponding file storage inclusion relationship through the above method, and further managed through the above blockchain file system, which is more convenient for users to read blockchain information, submit transactions, modify contracts and other related operations.

[0106] See below Figure 6 , Figure 6 2 is a schematic diagram of the architecture of the blockchain file system provided by the present invention. The blockchain file system may include a blockchain file system architecture 200 and a blockchain system architecture 240. The blockchain file system architecture 200 may include a user-state file system layer 210, a blockchain file system management module 220, and a blockchain interface callback layer 230. The user-state file system layer 210 and the blockchain file system management module 220 may interact with the Windows driver layer 240 and the Windows kernel layer 250 to realize the driving and storage of the blockchain file system. The blockchain system architecture 240 includes a blockchain A chain node 241, a heterogeneous blockchain B chain node 242, and a heterogeneous blockchain C chain node 243 (schematically shown, the present application is not limited to this). The blockchain interface callback layer 230 interacts with the blockchain A chain node 241, the heterogeneous blockchain B chain node 242, and the heterogeneous blockchain C chain node 243 in the blockchain system architecture 240 to use the local virtual disk as the entrance to access the blockchain.

[0107] The above is only a schematic description of the specific implementation of the present invention, and the present invention is not limited thereto. The splitting, merging, changing of the execution order of steps, splitting, merging of modules, and changing of information transmission are all within the protection scope of the present invention.

[0108] Figure 7 Schematic diagram of a module of an embodiment of a device for constructing a blockchain file system of the present invention. Figure 7As shown, including but not limited to:

[0109] The acquisition module 310 is configured to acquire a source drive letter and a source path and a target drive letter and a target path, wherein the source drive letter and the source path are used to connect to the blockchain, and the target drive letter is presented as a local virtual disk;

[0110] The creation module 320 is configured to create the blockchain file system driver;

[0111] The first setting module 330 is configured to set the blockchain file system startup option parameters and the blockchain callback registration function set;

[0112] The second setting module 340 is configured to set a startup message according to the blockchain file system startup option parameters;

[0113] The startup module 350 is configured to send the startup message to the blockchain file system driver to start the blockchain file system with the target drive letter or target path as the entry, and process the file processing message of the source drive letter or source path according to the blockchain callback registration function set.

[0114] The implementation principle of the above modules can be found in Figure 1 The relevant introduction in the construction method of the blockchain file system shown will not be repeated here.

[0115] The construction device of the blockchain file system may further include a thread number setting module, which is configured to set the number of threads of the file system to form a thread pool, and the file system processes the file processing message of the source drive letter or source path through the thread pool.

[0116] In the construction device of the blockchain file system, the on-chain information, user information, transaction device and retriever of the blockchain are abstracted into a folder with the target drive letter or target path as the entrance.

[0117] In the device for constructing a blockchain file system, the file processing message includes one or more of a file system operation message, a block operation message, an account operation message, and a contract operation message. The file system operation message can be used to perform one or more file system operations of virtual disk size management, obtaining available space, and virtual disk encryption of the file system. The block operation message can be used to perform one or more block operations of block query, transaction query, and submitting and storing transactions. The account operation can be used to perform one or more account operations of user query and user transaction history query. The contract operation can be used to perform one or more contract operations of contract query, contract creation, contract call, contract deletion, and contract update.

[0118] The startup module may include a mount mode determination module, which is configured to determine the mount mode of the file system according to the startup message, and the mount mode is one or more mount modes including network mount or local mount, support for unmounting, no support for unmounting, mount only visible to the user, and mount globally visible.

[0119] The device for constructing a blockchain file system may also include: an update acquisition module configured to acquire an updated source drive letter or source path; an update drive letter module configured to enable the file system to use the target drive letter or target path as an entry, and process the file processing message of the updated source drive letter or source path according to the blockchain callback registration function set. The blockchain file system, which can present virtual drive letters and folders to the user in a graphical manner, can also be presented in a command line manner.

[0120] Figure 7 The device 300 for constructing a blockchain file system provided by the present invention is only schematically shown. Without violating the concept of the present invention, the splitting, merging, and adding of modules are all within the protection scope of the present invention. The device 300 for constructing a blockchain file system provided by the present invention can be implemented by software, hardware, firmware, plug-ins, and any combination thereof, and the present invention is not limited thereto.

[0121] The embodiment of the present invention also provides a device for constructing a blockchain file system, including a processor and a memory, wherein executable instructions of the processor are stored. The processor is configured to execute the steps of the method for constructing a blockchain file system by executing the executable instructions.

[0122] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits", "modules" or "platforms".

[0123] Figure 8 This is a schematic diagram of the structure of the device for building the blockchain file system of the present invention. Figure 8 An electronic device 1300 according to this embodiment of the present invention is described. Figure 8 The electronic device 1300 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0124] like Figure 8As shown, the electronic device 1300 is in the form of a general computing device. The components of the electronic device 1300 may include, but are not limited to: at least one processing unit 1310, at least one storage unit 1320, a bus 1330 connecting different platform components (including the storage unit 1320 and the processing unit 1310), a display unit 1340, etc.

[0125] The storage unit stores program codes, which can be executed by the processing unit 1310, so that the processing unit 1310 executes the steps of various exemplary embodiments of the present invention described in the construction method of the blockchain file system described above in this specification. For example, the processing unit 1310 can execute the following steps: Figure 2 Follow the steps shown in .

[0126] The storage unit 1320 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 120 and / or a cache memory unit 1322 , and may further include a read-only memory unit (ROM) 1323 .

[0127] The storage unit 1320 may also include a program / utility 1324 having a set (at least one) of program modules 1325, such program modules 1325 including but not limited to: a processing system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0128] Bus 1330 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0129] The electronic device 1300 may also communicate with one or more external devices 1370 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 1300, and / or any device that enables the electronic device 1300 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 1350.

[0130] Furthermore, the electronic device 1300 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1360. The network adapter 1360 may communicate with other modules of the electronic device 1300 via the bus 1330. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.

[0131] The embodiment of the present invention also provides a computer-readable storage medium for storing a program, and the steps of the method for constructing a blockchain file system are implemented when the program is executed. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of various exemplary embodiments of the present invention described in the above-mentioned method for constructing a blockchain file system in this specification.

[0132] The program product for implementing the above method according to an embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.

[0133] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0134] Computer readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program codes contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.

[0135] Program code for performing the processes of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, and the like, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0136] In summary, the purpose of the present invention is to provide a method, system and device for constructing a blockchain file system, which can start the file system with a virtual disk as the entrance, process the file processing message of the blockchain according to the blockchain callback registration function set, so as not to be controlled by the central node, complete the storage of files through the blockchain, and achieve complete data privacy and information security. The blockchain file system in which virtual drive letters and folders can be presented to users in a graphical manner can also be presented in a command line manner.

[0137] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A method for constructing a blockchain file system, characterized in that: include: Obtain a source drive letter and a source path as well as a target drive letter and a target path, wherein the source drive letter and the source path are used to connect to the blockchain, and the target drive letter is presented as a local virtual disk; Create the blockchain file system driver; Set the blockchain file system startup option parameters and the blockchain callback registration function set; Setting a startup message according to the blockchain file system startup option parameters; The startup message is sent to the blockchain file system driver, the blockchain file system is started with the target drive letter or target path as the entry, and the file processing message of the source drive letter or source path is processed according to the blockchain callback registration function set.

2. The method for constructing a blockchain file system according to claim 1, characterized in that: Also includes: The number of threads of the blockchain file system is set to form a thread pool, and the blockchain file system processes the file processing message of the source drive letter or source path through the thread pool.

3. The method for constructing a blockchain file system according to claim 1, characterized in that: The on-chain information, user information, trader and retriever of the blockchain are abstracted into a folder with the target drive letter or target path as the entrance.

4. The method for constructing a blockchain file system according to claim 1, characterized in that: The file processing message includes one or more of the blockchain file system operation message, block operation message, account operation message and contract operation message.

5. The method for constructing a blockchain file system according to claim 4, characterized in that: The blockchain file system operation message is used to perform one or more of the blockchain file system operations of virtual disk size management, obtaining available space, and virtual disk encryption of the blockchain file system.

6. The method for constructing a blockchain file system according to claim 4, characterized in that: The block operation message is used to perform one or more block operations in block query, transaction query, submission and storage of transactions.

7. The method for constructing a blockchain file system according to claim 4, characterized in that: The account operation is used to perform one or more account operations of user query and user transaction history query.

8. The method for constructing a blockchain file system according to claim 4, characterized in that: The contract operation is used to perform one or more of the following contract operations: contract query, contract creation, contract call, contract deletion, and contract update.

9. The method for constructing a blockchain file system according to claim 1, characterized in that: The sending of the startup message to the blockchain file system driver, starting the blockchain file system with the target drive letter or target path as the entry, and processing the file reading message of the source drive letter or source path according to the blockchain callback registration function set includes: According to the startup message, a mount mode of the blockchain file system is determined, where the mount mode is one or more mount modes selected from network mount or local mount, support for unmounting, no support for unmounting, mount visible only to the user, and mount visible globally.

10. The method for constructing a blockchain file system according to claim 1, characterized in that: Also includes: Get the updated source drive letter or source path; The blockchain file system uses the target drive letter or target path as an entry, and processes the updated file processing message of the source drive letter or source path according to the blockchain callback registration function set.

11. A device for constructing a blockchain file system, characterized in that: include: An acquisition module is configured to acquire a source drive letter and a source path and a target drive letter and a target path, wherein the source drive letter or the source path is used to connect to the blockchain, and the target drive letter is presented as a local virtual disk; A creation module configured to create the blockchain file system driver; A first setting module is configured to set the blockchain file system startup option parameters and the blockchain callback registration function set; A second setting module is configured to set a startup message according to the blockchain file system startup option parameters; The startup module is configured to send the startup message to the blockchain file system driver, start the blockchain file system with the target drive letter or target path as the entry, and process the file processing message of the source drive letter / source path according to the blockchain callback registration function set.

12. A device for constructing a blockchain file system, characterized in that: include: processor; a memory storing executable instructions of the processor; The processor is configured to execute the steps of the method for constructing a blockchain file system according to any one of claims 1 to 10 by executing the executable instructions.

13. A computer-readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps of the method for constructing a blockchain file system according to any one of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • File system implementation method and device based on block chain, equipment and storage medium

    CN109656889A

  • Secure storage method and system suitable for embedded real-time operating system

    CN110826099A

  • File processing method and device based on blockchain, equipment and storage medium

    CN111177107A