File management method and system

By organizing storage node rings and portal node rings in the file management system, users are allowed to select storage nodes based on file attributes, solving the problem of insufficient file privacy and security guarantees in the existing technology, and achieving more efficient file management and security storage.

CN119441137APending Publication Date: 2025-02-14HUAWEI TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310955146.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-28
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

When storing files, existing file management systems cannot effectively protect the privacy and security of files, especially when storing across countries, which may violate relevant laws and regulations.

Method used

By organizing multiple storage node rings in the file management system, selecting portal nodes in each storage node ring, and establishing portal node rings to manage portal nodes of multiple storage node rings, quickly searching and leapfrog searching. Users can select the target storage node by specifying file attributes to ensure that the file is stored on the node that meets the user's needs.

Benefits of technology

It realizes user control over the file storage location, ensures the privacy and security of files, and avoids legal and security risks caused by improper storage node selection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441137A_ABST
    Figure CN119441137A_ABST
Patent Text Reader

Abstract

The invention provides a file management method and system which can be applied to the technical field of computers. The method comprises the steps that a first storage node obtains a first file, a first identification number set and a second identification number, the first storage node is any one storage node in a first storage node ring, the first identification number set comprises identification numbers of any part of attributes of the first file and identification numbers of all attributes, and the second identification number set comprises identification numbers of all attributes of the first file; the second identification number is the identification number of the first attribute, and the first file and the attribute of the first file are carried in a storage request of a user; and under the condition that the first storage node determines that the second identification number exists in the first identification number set, the first storage node stores the first file to a first target storage node in the first storage node ring, and the identification number of the first target storage node is the same as the identification numbers of all attributes of the first file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a file management method and system. Background Art

[0002] The file management system is mainly used to store, manage and process files. Users operate files in the file management system through the interface provided by the file management system, including creating files, deleting files, reading file data, modifying file data, etc.

[0003] Currently, the file management system usually determines the target storage node from the multiple storage nodes included in the file management system based on the hash value of the file data, and then stores the file in the target storage node, which may result in the target storage node not meeting the needs of the user, thereby adversely affecting the privacy and security of the file and damaging the interests of the user. For example, the file management system includes storage nodes located abroad and storage nodes located in China. If the file management system uses storage nodes located abroad to store medical files of domestic hospitals, it will violate the provisions of the "Measures for Data Outbound Security Assessment" that medical data cannot be exported, and will not meet the privacy and security requirements of domestic hospitals for medical files. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides a file management method and system, so that users can select storage nodes corresponding to files according to their own needs, thereby ensuring the privacy and security of files.

[0005] In a first aspect, a file management method is provided, which is applied to a file management system, wherein the file management system includes a first storage node ring, wherein a plurality of storage nodes in the first storage node ring all have a first attribute, and the plurality of storage nodes have different identification numbers, and the file management method includes:

[0006] The first storage node obtains the first file, the first identification number set and the second identification number;

[0007] The first storage node stores the first file in a first target storage node in the first storage node ring when determining that the second identification number exists in the first identification number set;

[0008] Among them, the above-mentioned first storage node is any storage node in the above-mentioned first storage node ring, the above-mentioned first file comes from the user's storage request, and the storage request carries the attributes of the above-mentioned first file. The above-mentioned first identification number set includes the identification numbers of any partial attributes and all attributes of the above-mentioned first file, the above-mentioned second identification number is the identification number of the above-mentioned first attribute, and the identification number of the above-mentioned first target storage node is the same as the identification numbers of all attributes of the above-mentioned first file.

[0009] In the above scheme, when the user uses the file management system to store the first file, the user can express the user's needs by specifying the attributes of the first file, and then use the attributes of the storage node to filter the target storage nodes that meet the user's needs, thereby enabling the user to control the storage location of the first file in the file management system and ensure the privacy and security of the file.

[0010] In some possible implementations, the first portal node is a portal node of the first storage node ring, and the method further includes:

[0011] When the first portal node determines, based on the first identification number set, that there is a first target portal node in the first portal node ring to which the first portal node belongs, the first portal node sends the first identification number set and the first file to the first target portal node;

[0012] The first target portal node stores the first file in a second target storage node in the storage node ring to which the first target portal node belongs;

[0013] Among them, the above-mentioned first portal node ring includes portal nodes of multiple storage node rings including the above-mentioned first storage node ring, the attributes of the above-mentioned multiple storage node rings are different from each other, the above-mentioned first target portal node is the portal node in the above-mentioned first portal node ring that has a mapping relationship with the above-mentioned first identification number set, and the identification number of the above-mentioned second target storage node is the same as the identification number of all attributes of the above-mentioned first file.

[0014] In the above scheme, the storage nodes with the first attribute are organized in the first storage node ring in the file management system, and then the first portal node is selected as the portal node of the first storage node ring. By establishing the first portal node ring to manage the portal nodes of multiple storage node rings, the first target portal node can be quickly found, thereby quickly completing the leap-forward search between multiple storage node rings. Maintaining the routing information between multiple storage node rings in this way can reduce the number of network connections between storage nodes with different node attributes, greatly reduce the storage resources and management resources required to maintain the routing information between different storage nodes, and also make the entire search process more convenient and faster.

[0015] In some possible implementations, the first portal node and the first storage node are the same node, or the first portal node and the first storage node are different nodes.

[0016] In some possible implementations, the second target portal node is a portal node of the first portal node ring, and the method further includes:

[0017] When the second target portal node determines, based on the first identification number set, that there is a third target portal node in the first node set to which the second target portal node belongs, the second target portal node sends the first identification number set and the first file to the third target portal node;

[0018] When the third target portal node determines that there is a fourth target portal node in the second portal node ring according to the first identification number set, the third target portal node sends the first identification number set and the first file to the fourth target portal node;

[0019] The fourth target portal node stores the first file in a third target storage node in the storage node ring to which the fourth target portal node belongs;

[0020] Among them, the above-mentioned first node set includes portal nodes of multiple portal node rings including the above-mentioned first portal node ring, the above-mentioned third target portal node is a portal node in the above-mentioned first node set that has a mapping relationship with the above-mentioned first identification number set, and the above-mentioned third target portal node is a portal node in the second portal node ring that has a mapping relationship with the above-mentioned first identification number set, and the above-mentioned third target portal node is a portal node in the above-mentioned second portal node ring that has a mapping relationship with the above-mentioned first identification number set, and the identification number of the above-mentioned third target storage node is the same as the identification number of all attributes of the above-mentioned first file.

[0021] In the above scheme, the second target portal node can also be selected as the portal node of the first portal node ring in the file management system. By establishing a first node set to manage the portal nodes of multiple portal node rings, the third target portal node can be quickly found, thereby quickly completing the leap-forward search between multiple portal node rings. Maintaining the routing information between multiple portal node rings in this way can reduce the number of network connections between portal nodes, greatly reduce the storage resources and management resources required to maintain the routing information between multiple portal nodes, and make the entire search process more convenient and faster.

[0022] In some possible implementations, the first portal node and the second target portal node are the same node, or the first portal node and the second target portal node are different nodes.

[0023] In a second aspect, a file management method is provided, which is applied to a file management system, wherein the file management system includes a first storage node ring, wherein a plurality of storage nodes in the first storage node ring have different identification numbers, and the file management method includes:

[0024] The first storage node obtains identification numbers of all attributes of the first file and a user's operation request on the first file;

[0025] The first storage node, when determining that there is a first target storage node in the first storage node ring, operates the first file in the first target storage node based on the operation request;

[0026] Among them, the above-mentioned first storage node is any storage node in the above-mentioned first storage node ring, the above-mentioned operation request carries the path of the above-mentioned first file, and the identification number of all attributes of the above-mentioned first file is obtained by querying the first mapping table, and the first mapping table is used to record the correspondence between the paths of multiple files stored in the above-mentioned file management system and the identification numbers of all attributes of multiple files, the above-mentioned multiple files include the above-mentioned first file, and the identification number of the above-mentioned first target storage node is the same as the identification number of all attributes of the above-mentioned first file.

[0027] In some possible implementations, the first portal node is a portal node of the first storage node ring, and the method further includes:

[0028] The first storage node obtains a first identification number set based on identification numbers of all attributes of the first file when determining that the first target storage node does not exist in the first storage node ring;

[0029] The first portal node, when determining, based on the first identification number set, that there is a first target portal node in the first portal node ring to which the first portal node belongs, sends the first identification number set and the operation request to the first target portal node;

[0030] The first target portal node determines a second target storage node in the storage node ring to which the first target portal node belongs based on the first identification number set, and operates the first file in the second target storage node based on the operation request;

[0031] Among them, the above-mentioned first identification number set includes the identification numbers of any partial attributes and all attributes of the above-mentioned first file, the above-mentioned first portal node ring includes the portal nodes of multiple storage node rings including the above-mentioned first storage node ring, the attributes of the above-mentioned multiple storage node rings are different from each other, the above-mentioned first target portal node is the portal node in the above-mentioned first portal node ring that has a mapping relationship with the above-mentioned first identification number set, and the identification number of the above-mentioned second target storage node is the same as the identification number of all attributes of the above-mentioned first file.

[0032] In some possible implementations, the first portal node and the first storage node are the same node, or the first portal node and the first storage node are different nodes.

[0033] In some possible implementations, the second target portal node is a portal node of the first portal node ring, and the method further includes:

[0034] When the second target portal node determines, based on the first identification number set, that there is a third target portal node in the first node set to which the second target portal node belongs, the second target portal node sends the first identification number set and the operation request to the third target portal node;

[0035] When the third target portal node determines that there is a fourth target portal node in the second portal node ring according to the first identification number set, the third target portal node sends the first identification number set and the operation request to the fourth target portal node;

[0036] The fourth target portal node determines a third target storage node in the storage node ring to which the fourth target portal node belongs based on the first identification number set, and operates the first file in the third target storage node based on the operation request;

[0037] Among them, the above-mentioned first node set includes portal nodes of multiple portal node rings including the above-mentioned first portal node ring, the above-mentioned third target portal node is a portal node in the above-mentioned first node set that has a mapping relationship with the above-mentioned first identification number set, and the above-mentioned third target portal node is a portal node in the second portal node ring that has a mapping relationship with the above-mentioned first identification number set, and the above-mentioned third target portal node is a portal node in the above-mentioned second portal node ring that has a mapping relationship with the above-mentioned first identification number set, and the identification number of the above-mentioned third target storage node is the same as the identification number of all attributes of the above-mentioned first file.

[0038] In some possible implementations, the first portal node and the second target portal node are the same node, or the first portal node and the second target portal node are different nodes.

[0039] In some possible implementations, the file management system further includes a first management node, and the first management node is used to manage and store metadata of the first file.

[0040] In the above scheme, the metadata and content of the first file are stored and managed by the first management node and the first storage node respectively, which can give full play to the advantages of the two nodes, thereby greatly improving the performance of the file management system. Specifically, the metadata of the first file managed and stored by the first management node can reduce the storage space occupied by the first management node, and the rich memory resources and processor resources of the first management node can quickly respond to the user's operation request for the first file; and the content of the first file managed and stored by the first storage node can make full use of the rich storage resources of the first storage node.

[0041] In some possible implementations, before the first storage node obtains the identification numbers of all attributes of the first file and the user's operation request for the first file, the method further includes:

[0042] The first management node obtains the operation request;

[0043] The first management node queries the second mapping table according to the path of the first file, and if it is determined that the second mapping table contains an identification number of the second storage node corresponding to the path of the first file, operates the first file in the second storage node based on the operation request;

[0044] The second mapping table includes a correspondence between paths of multiple special files and identification numbers of storage nodes to which the multiple special files belong, the multiple special files being files among the multiple files whose operation time is later than the first historical time, or the multiple special files being files among the multiple files whose operation heat is higher than a heat threshold;

[0045] The first storage node obtains the identification numbers of all attributes of the first file and the user's operation request for the first file, including:

[0046] The first storage node receives the identification number of all attributes of the first file and the operation request sent by the first management node when it is determined that the identification number of the second storage node corresponding to the path of the first file does not exist in the second mapping table.

[0047] In the above scheme, the first management node can directly determine the second storage node by searching the path of the first file using the second mapping table, and query the second storage node within the time complexity of O(1). If the second storage node cannot be found in the second mapping table, the identification number of all the attributes of the first file is used to search for the storage node storing the first file, which can simplify the difficulty of searching for the storage node and reduce the time complexity of searching for the storage node.

[0048] In some possible implementations, the first management node has a trusted execution environment, and the operations performed by the first management node in the method are performed in the trusted execution environment.

[0049] In the above scheme, the operations performed by the first management node in the file management method are run in a trusted execution environment, which can protect the execution flow integrity, data integrity and privacy of the first management node, effectively prevent a third party from maliciously modifying or destroying the programs and data stored in the first management node, and prevent a third party from stealing the metadata stored in the first management node, thereby realizing the secure sharing function of the file system management system.

[0050] In a third aspect, a file management device is provided, which is applied to any one of a plurality of storage nodes included in a first storage node ring, wherein the plurality of storage nodes all have a first attribute and have different identification numbers, and the device comprises: a first acquisition module and a storage module,

[0051] The first acquisition module is used to acquire the first file, the first identification number set and the second identification number;

[0052] The storage module is configured to store the first file in a first target storage node in the first storage node ring when it is determined that the second identification number exists in the first identification number set;

[0053] Among them, the above-mentioned first identification number set includes the identification numbers of any partial attributes and all attributes of the above-mentioned first file, the above-mentioned second identification number is the identification number of the above-mentioned first attribute, the above-mentioned first file and the attributes of the above-mentioned first file are both carried in the user's storage request, and the identification number of the above-mentioned first target storage node is the same as the identification number of all attributes of the above-mentioned first file.

[0054] In a fourth aspect, a file management device is provided, which is applied to any one of a plurality of storage nodes included in a first storage node ring, wherein the plurality of storage nodes have different identification numbers, and the device comprises: a second acquisition module and a processing module,

[0055] The second acquisition module is used to acquire identification numbers of all attributes of the first file and the user's operation request for the first file;

[0056] The processing module is configured to operate the first file in the first target storage node based on the operation request when it is determined that the first target storage node exists in the first storage node ring;

[0057] Among them, the above-mentioned operation request carries the path of the above-mentioned first file, and the identification number of all attributes of the above-mentioned first file is obtained by querying the first mapping table, and the first mapping table is used to record the correspondence between the paths of multiple files stored in the above-mentioned file management system and the identification numbers of all attributes of the multiple files, the above-mentioned multiple files include the above-mentioned first file, and the identification number of the above-mentioned first target storage node is the same as the identification number of all attributes of the above-mentioned first file.

[0058] In a fifth aspect, a file management system is provided, comprising: a first storage node ring, wherein a plurality of storage nodes in the first storage node ring all have a first attribute, and the plurality of storage nodes have different identification numbers;

[0059] A first storage node is used to obtain a first file, a first identification number set and a second identification number;

[0060] The first storage node is further configured to store the first file in a first target storage node in the first storage node ring when it is determined that the second identification number exists in the first identification number set;

[0061] Among them, the above-mentioned first storage node is any storage node in the above-mentioned first storage node ring, the above-mentioned first file comes from the user's storage request, and the storage request carries the attributes of the above-mentioned first file. The above-mentioned first identification number set includes the identification numbers of any partial attributes and all attributes of the above-mentioned first file, the above-mentioned second identification number is the identification number of the above-mentioned first attribute, and the identification number of the above-mentioned first target storage node is the same as the identification numbers of all attributes of the above-mentioned first file.

[0062] In some possible implementations, the file management system includes a first portal node, which is a portal node of the first storage node ring.

[0063] The first portal node is configured to send the first identification number set and the first file to the first target portal node when it is determined that there is a first target portal node in the first portal node ring to which the first portal node belongs according to the first identification number set;

[0064] The first target portal node is used to store the first file in a second target storage node in the storage node ring to which the first target portal node belongs;

[0065] Among them, the above-mentioned first portal node ring includes portal nodes of multiple storage node rings including the above-mentioned first storage node ring, the attributes of the above-mentioned multiple storage node rings are different from each other, the above-mentioned first target portal node is the portal node in the above-mentioned first portal node ring that has a mapping relationship with the above-mentioned first identification number set, and the identification number of the above-mentioned second target storage node is the same as the identification number of all attributes of the above-mentioned first file.

[0066] In some possible implementations, the first portal node and the first storage node are the same node, or the first portal node and the first storage node are different nodes.

[0067] In some possible implementations, the file management system includes a second target portal node, where the second target portal node is a portal node of the first portal node ring.

[0068] The second target portal node is used to send the first identification number set and the first file to the third target portal node when it is determined that there is a third target portal node in the first node set to which the second target portal node belongs according to the first identification number set;

[0069] The third target portal node is used to send the first identification number set and the first file to the fourth target portal node when it is determined that there is a fourth target portal node in the second portal node ring according to the first identification number set;

[0070] The fourth target portal node is used to store the first file in a third target storage node in the storage node ring to which the fourth target portal node belongs;

[0071] Among them, the above-mentioned first node set includes portal nodes of multiple portal node rings including the above-mentioned first portal node ring, the above-mentioned third target portal node is a portal node in the above-mentioned first node set that has a mapping relationship with the above-mentioned first identification number set, and the above-mentioned third target portal node is a portal node in the second portal node ring that has a mapping relationship with the above-mentioned first identification number set, and the above-mentioned third target portal node is a portal node in the above-mentioned second portal node ring that has a mapping relationship with the above-mentioned first identification number set, and the identification number of the above-mentioned third target storage node is the same as the identification number of all attributes of the above-mentioned first file.

[0072] In some possible implementations, the first portal node and the second target portal node are the same node, or the first portal node and the second target portal node are different nodes.

[0073] In a sixth aspect, a file management system is provided, comprising: a first storage node ring, wherein a plurality of storage nodes in the first storage node ring have different identification numbers;

[0074] A first storage node, used to obtain identification numbers of all attributes of a first file and a user's operation request on the first file;

[0075] The first storage node is further configured to, when it is determined that there is a first target storage node in the first storage node ring, operate the first file in the first target storage node based on the operation request;

[0076] Among them, the above-mentioned first storage node is any storage node in the above-mentioned first storage node ring, the above-mentioned operation request carries the path of the above-mentioned first file, and the identification number of all attributes of the above-mentioned first file is obtained by querying the first mapping table, and the first mapping table is used to record the correspondence between the paths of multiple files stored in the above-mentioned file management system and the identification numbers of all attributes of multiple files, the above-mentioned multiple files include the above-mentioned first file, and the identification number of the above-mentioned first target storage node is the same as the identification number of all attributes of the above-mentioned first file.

[0077] In some possible implementations, the file management system includes a first portal node, which is a portal node of the first storage node ring.

[0078] The first storage node is used to obtain a first identification number set based on identification numbers of all attributes of the first file when it is determined that the first target storage node does not exist in the first storage node ring;

[0079] The first portal node is configured to send the first identification number set and the operation request to the first target portal node when it is determined that there is a first target portal node in the first portal node ring to which the first portal node belongs according to the first identification number set;

[0080] The first target portal node is used to determine a second target storage node in the storage node ring to which the first target portal node belongs based on the first identification number set, and to operate the first file in the second target storage node based on the operation request;

[0081] Among them, the above-mentioned first identification number set includes the identification numbers of any partial attributes and all attributes of the above-mentioned first file, the above-mentioned first portal node ring includes the portal nodes of multiple storage node rings including the above-mentioned first storage node ring, the attributes of the above-mentioned multiple storage node rings are different from each other, the above-mentioned first target portal node is the portal node in the above-mentioned first portal node ring that has a mapping relationship with the above-mentioned first identification number set, and the identification number of the above-mentioned second target storage node is the same as the identification number of all attributes of the above-mentioned first file.

[0082] In some possible implementations, the first portal node and the first storage node are the same node, or the first portal node and the first storage node are different nodes.

[0083] In some possible implementations, the file management system includes a second target portal node, where the second target portal node is a portal node of the first portal node ring.

[0084] The second target portal node is used to send the first identification number set and the operation request to the third target portal node when it is determined that there is a third target portal node in the first node set to which the second target portal node belongs according to the first identification number set;

[0085] The third target portal node is used to send the first identification number set and the operation request to the fourth target portal node when it is determined that there is a fourth target portal node in the second portal node ring according to the first identification number set;

[0086] The fourth target portal node is used to determine a third target storage node in the storage node ring to which the fourth target portal node belongs based on the first identification number set, and to operate the first file in the third target storage node based on the operation request;

[0087] Among them, the above-mentioned first node set includes portal nodes of multiple portal node rings including the above-mentioned first portal node ring, the above-mentioned third target portal node is a portal node in the above-mentioned first node set that has a mapping relationship with the above-mentioned first identification number set, and the above-mentioned third target portal node is a portal node in the second portal node ring that has a mapping relationship with the above-mentioned first identification number set, and the above-mentioned third target portal node is a portal node in the above-mentioned second portal node ring that has a mapping relationship with the above-mentioned first identification number set, and the identification number of the above-mentioned third target storage node is the same as the identification number of all attributes of the above-mentioned first file.

[0088] In some possible implementations, the first portal node and the second target portal node are the same node, or the first portal node and the second target portal node are different nodes.

[0089] In some possible implementations, the file management system further includes a first management node, and the first management node is used to manage and store metadata of the first file.

[0090] In some possible implementations, before the first storage node obtains the identification number of all attributes of the first file and the user's operation request for the first file,

[0091] The first management node is used to obtain the operation request;

[0092] The first management node is further configured to query the second mapping table according to the path of the first file, and if it is determined that the second mapping table contains an identification number of the second storage node corresponding to the path of the first file, operate the first file in the second storage node based on the operation request;

[0093] The second mapping table includes a correspondence between paths of multiple special files and identification numbers of storage nodes to which the multiple special files belong, the multiple special files being files among the multiple files whose operation time is later than the first historical time, or the multiple special files being files among the multiple files whose operation heat is higher than a heat threshold;

[0094] The first storage node is specifically used to receive the identification number of all attributes of the first file and the operation request sent by the first management node when it determines that the identification number of the second storage node corresponding to the path of the first file does not exist in the second mapping table.

[0095] In some possible implementations, the first management node has a trusted execution environment, and the operations performed by the first management node are performed in the trusted execution environment.

[0096] In a seventh aspect, a computing device cluster is provided, comprising at least one computing device, each computing device comprising a processor and a memory;

[0097] The processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method as described in any one of the first aspect or any one of the second aspect.

[0098] In an eighth aspect, a computer program product comprising instructions is provided. When the instructions are executed by a computing device cluster, the computing device cluster executes the method as described in any one of the first aspect or any one of the second aspect.

[0099] In a ninth aspect, a computer-readable storage medium is provided, comprising computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes a method as described in any one of the first aspect or any one of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0100] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.

[0101] Figure 1 It is a structural diagram of a file management system provided by this application;

[0102] Figure 2A It is a schematic diagram of the process of storing files in a file management method provided by the present application;

[0103] Figure 2B It is a flowchart of operating files in a file management method provided by this application;

[0104] Figure 3 It is a structural diagram of another file management system provided by the present application;

[0105] Figure 4A It is a schematic diagram of the process of storing files in another file management method provided by the present application;

[0106] Figure 4B It is a flowchart of operating files in another file management method provided by the present application;

[0107] Figure 5 It is a structural schematic diagram of a file management device provided by the present application;

[0108] Figure 6 It is a structural schematic diagram of another file management device provided by the present application;

[0109] Figure 7 It is a structural diagram of a file management system provided by this application;

[0110] Figure 8 It is a structural diagram of another file management system provided by the present application;

[0111] Fig. 9 It is a structural diagram of a computing device cluster provided by this application;

[0112] Fig.10 It is a structural diagram of another computing device cluster provided by this application. DETAILED DESCRIPTION

[0113] The embodiments of the present invention are described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0114] In order to facilitate understanding of the embodiments of the present application, the application scenarios involved in the present application are first introduced.

[0115] See also Figure 1 , Figure 1 This is a schematic diagram of the structure of a file management system involved in this application. Figure 1 As shown, the file management system 10 provided by the present application includes multiple storage nodes (storage node 111, storage node 112, storage node 113...), which can be used to store multiple files (file 121, file 122, file 123...). The multiple storage nodes are connected through a communication network of any communication mechanism / communication standard. Among them, the communication network can be a wide area network, a local area network, a point-to-point connection, etc., or any combination thereof.

[0116] Any storage node in the file management system 10 can obtain the storage request 141 or operation request 142 of the user 13 for the first file 120, and then determine the target storage node from multiple storage nodes (storage node 111, storage node 112, storage node 113...) based on the storage request 141 or operation request 142, and implement the operation corresponding to the storage request 141 or operation request 142 on the target storage node.

[0117] In some possible implementations, the storage node may be a management node for managing multiple files (file 121, file 122, file 123, ...), for example, managing metadata of multiple files, including information such as type, size, creation time, storage location, etc.

[0118] In some possible implementations, the file management system 10 may also include a client 15, which is deployed on a terminal device of the user 13, and is used to obtain a storage request 141 or an operation request 142 from the user 13 for the first file 120, and forward the storage request 141 or the operation request 142 to any storage node, such as the storage node 111.

[0119] In some possible implementations, the above-mentioned storage nodes can be supercomputers, network computers (such as servers, workstations, hubs, switches, routers), industrial control computers (such as PC bus industrial computers, programmable logic control systems, distributed control systems, field bus systems, numerical control systems), personal computers (such as desktop computers, all-in-one computers, laptops, PDAs, tablet computers), embedded processors (such as embedded microcontrollers, embedded microprocessors, embedded digital signal processors, embedded systems on chip), etc., as well as random access memories, read-only memories, magnetic core memories, flash memories, hard disks, optical disks, magnetic tapes, etc.

[0120] exist Figure 1 In the file management system 10 shown, when the storage node 111 receives the storage request 141, the specific process of the storage node 111 storing the first file 120 is as follows: the storage node 111 encodes the data of the first file 120 into a binary character sequence, and then uses a hash algorithm (such as the MD5 algorithm, the SHA-1 algorithm) to convert the binary character sequence into a hash value. Subsequently, the storage node 111 selects the first storage node with a sequence number greater than the hash value as the target storage node according to the sequence numbers of all storage nodes (storage node 111, storage node 112, storage node 113, etc.) in the file management system 10, and then stores the first file 120 in the target storage node.

[0121] After storing the file in the target storage node, the storage node 111 records the correspondence between the file path and the file hash value in the hash table. When the storage node 111 receives the operation request 142, the specific process of the storage node 111 operating the first file 120 is as follows: the storage node 111 queries the above hash table according to the path of the first file 120 carried in the operation request 142, determines the hash value of the first file 120, and thus determines the target storage node storing the first file 120, and implements the operation on the first file 120. The file path recorded in the hash table can be an absolute path or a relative path of the file.

[0122] It should be understood that the storage process of the first file 120 performed by other storage nodes in the file management system 10 upon receiving the storage request 141 is similar to the storage process of the first file 120 performed by the above storage node 111. The operation process of the first file 120 performed by other storage nodes in the file management system 10 upon receiving the operation request 142 is similar to the operation process of the first file 120 performed by the above storage node 111, and for the sake of brevity of the specification, it will not be elaborated here.

[0123] During the storage and operation process of the first file 120 by the storage node 111, the target storage node of the first file 120 in the file management system 10 is determined according to the hash value of the first file 120. In the case where the storage nodes 111 and 112 are located in China, and the storage node 113 is located abroad, if the user 13 needs to store the first file 120 in a domestic storage node, and the target storage node determined according to the hash value of the first file 120 is the storage node 113 located abroad, this will cause the target storage node 113 for storing the first file 120 to fail to meet the needs of the user 13, thereby adversely affecting the privacy and security of the first file 120 and damaging the interests of the user 13.

[0124] In order to solve the above problems, the present application provides a file management method, which can store files in storage nodes that meet user needs, ensure the privacy and security of files, and protect the interests of users.

[0125] The file management method provided by the present application is described in detail below in conjunction with the above-mentioned file management system 10.

[0126] In order to facilitate understanding of the file management method provided by the present application, the concepts of file attributes, file attribute identification numbers, node attributes, node attribute identification numbers, etc. involved in the file management method provided by the present application are first described here.

[0127] (1) File attributes: determined according to user needs, used to indicate the user's description and requirements of the file, etc. Specifically, the file attributes can be domestic storage, foreign storage, private files, public files, system files, library files, source files, executable files, executable-only files, read-only files, read-write files, directory files, temporary files, permanent files, archive files, streaming files, recorded files, sequential files, linked files, direct files, index files, disk files, tape files, CD files, floppy disk files, text files, program files, graphic files, multimedia files, data files, etc. The above-listed file attributes are only examples. In specific implementations, the file attributes can also be other, and this application does not specifically limit this.

[0128] In the present application, a file may have one attribute or multiple attributes. Taking file A as an example, the attribute of file A may be any one of the above file attributes or any multiple of the above file attributes.

[0129] (2) File attribute identity document (FAID): used to identify file attributes so that the file attributes can be recognized by the client or storage node.

[0130] In the present application, FAID can be determined in the following manner: assign a unique FAID to each of the multiple file attributes, and also assign a unique FAID to any combination of multiple attributes in the multiple file attributes. Referring to Table 1 exemplarily shown in the present application, in Table 1, the file attribute "domestic storage" has FAID "0", the file attribute "foreign storage" has FAID "1", the file attribute "privacy file" has FAID "3", the file attribute "public file" has FAID "4", the file attribute combination "domestic storage + privacy file" has FAID "5", the file attribute combination "foreign storage + privacy file" has FAID "6"...

[0131]

[0132] It should be understood that the above Table 1 is only an example. In another specific implementation, the file attribute combination "domestic storage + privacy file" has FAID "03", where "03" is a combination of FAID "0" of the file attribute "domestic storage" and FAID "3" of the file attribute "privacy file", and the file attribute combination "foreign storage + privacy file" has FAID "13", where "13" is a combination of FAID "1" of the file attribute "foreign storage" and FAID "3" of the file attribute "privacy file". This application does not specifically limit the identification number of the file attribute.

[0133] (3) Node attributes: used to indicate the description, requirements, etc. of the storage node. Node attributes match the file attributes in (1) above. Specifically, the node attributes can be located in China, located abroad, storing private files, storing public files, storing system files, storing repository files, storing source files, storing executable files, storing executable-only files, storing read-only files, storing read-write files, storing directory files, storing temporary files, storing permanent files, storing archive files, storing streaming files, storing record files, storing sequential files, storing link files, storing direct files, storing index files, storing disk files, storing tape files, storing CD files, storing floppy disk files, storing text files, storing program files, storing graphic files, storing multimedia files, storing data files, etc. The node attributes listed above are only examples. In specific implementations, the node attributes can also be other, and this application does not specifically limit this.

[0134] In the present application, a node may have one attribute or multiple attributes. Taking node a as an example, the attribute of node a may be any one of the above node attributes or any multiple of the above node attributes.

[0135] (4) Node attribute identity document (NAID): used to identify the node attribute so that the node attribute can be recognized by the storage node. And, since the node attribute in (3) matches the file attribute in (1), there is a one-to-one correspondence between the NAID and the FAID in (2).

[0136] In the present application, NAID can be determined in the following manner: a unique NAID is assigned to each of the multiple node attributes, and a unique NAID is also assigned to any combination of multiple attributes in the multiple node attributes. Referring to Table 2 exemplarily shown in the present application, in Table 2, the node attribute "located in China" has NAID "0", the node attribute "located abroad" has NAID "1", the node attribute "store private files" has NAID "3", the node attribute "store public files" has NAID "4", the node attribute combination "located in China + store private files" has NAID "5", the node attribute combination "located abroad + store private files" has NAID "6"...

[0137] Table 2

[0138] Node properties NAID Located in China 0 Located abroad 1 Storing private files 3 Storing public files 4 Located in China + storing private files 5 Located abroad + storing private files 6 … …

[0139] It should be understood that the above Table 2 is only an example. In another specific implementation, the node attribute combination "located in the country + stores privacy files" has NAID "03", where "03" is a combination of NAID "0" of the node attribute "located in the country" and NAID "3" of the node attribute "stores privacy files". The node attribute combination "located abroad + stores privacy files" has NAID "13", where "13" is a combination of NAID "1" of the node attribute "located abroad" and NAID "3" of the node attribute "stores privacy files". This application does not specifically limit the identification number of the node attribute.

[0140] (5) Storage node ring: A ring formed by multiple storage nodes with the same node attributes arranged from small to large according to the node identification document (NID). Among them, the same node attribute can be one or more. The storage node ring is managed based on a distributed hash protocol such as the Chord protocol and the Kademlia protocol: in the storage node ring, each storage node is assigned a unique NID, and each storage node has a predecessor storage node and a successor storage node, and each storage node only needs to store the NID of the successor storage node. Among them, the NID of the predecessor storage node is the NID-1 of the current storage node, and the NID of the successor storage node is the NID+1 of the current storage node. Therefore, a storage node in the storage node ring can obtain the location of any storage node by continuously asking the successor storage node. In this application, the same node attributes that all storage nodes in the storage node ring have are used as the attributes of the storage node ring. For multiple storage node rings, the attributes of any two storage node rings in the multiple storage node rings are different from each other, or the attributes of at least two storage node rings in the multiple storage node rings are the same.

[0141] (6) Portal node of the storage node ring: There is a portal node in each storage node ring. The portal node of the storage node ring can be understood as the door to enter and exit the storage node ring. In other words, if you want to find the target storage node in the storage node ring, you need to enter the storage node ring through the portal node in the storage node ring. If you want to enter another storage node ring from the storage node ring, you need to exit through the portal node in the storage node ring.

[0142] (7) Gate node identity document (GNID): used to identify the gate node.

[0143] In this application, GNID can be determined as follows:

[0144] In the first method, the NID of the portal node in the storage node ring is concatenated with the NAID of the same node attribute of all storage nodes in the storage node ring to which the portal node belongs, and the concatenated result is used as the GNID. For example, if the NID of the portal node in the storage node ring is "2" and the NAID of the same node attribute "located abroad" in the above Table 2 is "1", the portal node has a GNID of "12".

[0145] In the second method, all combination results formed by any combination of all NIDs and all NAIDs are encoded to obtain a combination identity document (CID) for each combination result. Referring to Table 3 exemplarily shown in the present application, in Table 3, NID-NAID combination "1-1" has CID "1", NID-NAID combination "1-2" has CID "2", NID-NAID combination "1-3" has CID "3", NID-NAID combination "2-1" has CID "4", NID-NAID combination "2-2" has CID "5", NID-NAID combination "3-1" has CID "6"...

[0146] Table 3

[0147] NID NAID CID 1 1 1 1 2 2 1 3 3 2 1 4 2 2 5 3 1 6 … … …

[0148] Next, the CID of the portal node is determined according to the NID of the portal node in the storage node ring and the NAID of the same node attribute possessed by all storage nodes in the storage node ring to which the portal node belongs, and the CID of the portal node is used as the GNID of the portal node. For example, if the NID of the portal node in the storage node ring is "2" and the NAID of the same node attribute "located abroad" in the above Table 2 is "1", the NID-NAID combination corresponding to the portal node is "2-1", and therefore, the portal node has a CID of "4", and the GNID of the portal node is "4".

[0149] (8) Portal node ring: a ring composed of portal nodes of multiple storage node rings. The portal node ring is managed using a distributed hash protocol. The specific management process is similar to the process of managing the storage node ring using a distributed hash protocol in (6) above. Please refer to the relevant description above. For the sake of brevity, it will not be elaborated here.

[0150] In this application, the portal node ring can be determined by:

[0151] In the first method, portal nodes of all storage node rings are grouped into multiple portal node rings according to the node attributes of the portal nodes. For example, portal nodes of multiple storage node rings having the same node attributes are grouped into one portal node ring. In this method, the same node attributes possessed by all portal nodes in the portal node ring are used as the attributes of the portal node ring. For multiple portal node rings, the attributes of any two portal node rings in the multiple portal node rings are different from each other, or the attributes of at least two portal node rings in the multiple portal node rings are the same.

[0152] In the second method, all portal nodes of the storage node ring are grouped into multiple portal node rings according to the GNID of the portal node. 0 -2 99 The portal nodes of the storage node ring within the range form a portal node ring, and the GNID is in 2 100 -2 199 The portal nodes of the storage node ring within the range form another portal node ring, and the GNID is in 2 200 -2 299 The portal nodes of the storage node ring within the range form another portal node ring.

[0153] (9) Portal node of a portal node ring: There is a portal node in each portal node ring. The portal node of a portal node ring can be understood as a door for entering and exiting the portal node ring. In other words, if you want to find a target portal node in the portal node ring, you need to enter the portal node ring through the portal node ring. If you want to enter another portal node ring from the portal node ring, you need to exit through the portal node in the portal node ring.

[0154] (10) First node set: The first node set includes portal nodes of multiple portal node rings. When the portal nodes of multiple portal node rings in the first node set are managed using a distributed hashing protocol, the first node set is presented in the form of a ring, and the specific management process is similar to the process of managing a storage node ring using a distributed hashing protocol in (6) above. Please refer to the relevant description above. For the sake of brevity of the specification, it will not be elaborated here.

[0155] (11) First-order gate node table (FGNT): used to record the GNID of the successor gate node that has a specified distance from the GNID of the current gate node in the gate node ring. The GNID of the current gate node is smaller than the GNID of the successor gate node. For example, the FGNT can record the GNID of the successor gate node that is 2 meters away from the current gate node. 0 , 2 1 , 2 2 , 2 3 ...the GNID of the successor portal node. Alternatively, FGNT can record the GNID1 of the current portal node. 0 , 2 1 , 3 2 , 4 3 ...the GNID of the successor portal node. Compared with the method of searching for portal nodes by continuously asking the successor portal nodes in the portal node ring, using FGNT to search for portal nodes can shorten the search time.

[0156] (12) Second-order gate node table (SGNT): used to record the GNID of the successor gate node in the first node set that is at a specified distance from the GNID of the current gate node. The GNID of the current gate node is smaller than the GNID of the successor gate node. Compared with the method of searching for a gate node by continuously querying the successor gate node in the first node set, using SGNT to search for a gate node can shorten the search time.

[0157] See also Figure 2A and Figure 2B , Figure 2A This is a schematic diagram of the process of storing files in a file management method provided by this application. Figure 2B This is a schematic diagram of the process of operating files in a file management method provided by this application. Figure 2A and Figure 2B As shown, the file management method provided by this application includes:

[0158] S201: The client sends a user's storage request to a first storage node, wherein the storage request includes attributes of a first file and the first file. Accordingly, the first storage node receives the user's storage request sent by the client.

[0159] Among them, users can be Figure 1 In user 13, the client can be Figure 1 In the client 15 of the file management system 10, the storage request can be Figure 1 In the storage request 141 of the file management system 10, the first storage node may be Figure 1 Storage node 111, storage node 112 or storage node 113 in the file management system 10 . . .

[0160] The first file can be Figure 1 The first file 120 in the file management system 10. The attributes of the first file can be determined according to the needs of the user, and are used to represent the user's description and requirements of the first file. For the specific content of the attributes of the first file, please refer to the introduction of the file attributes in (1) above. For the sake of brevity of the specification, it will not be elaborated here.

[0161] The first file includes metadata of the first file and content of the first file, wherein the metadata of the first file includes type, size, creation time, operation time, operation control list, etc. of the first file.

[0162] It can be understood that before the client sends the user's storage request to the first storage node, the client usually establishes a communication channel with the first storage node. After the communication channel is established, the client sends the storage request to the first storage node through the communication channel. In a specific implementation, a communication channel is established between the client and the first storage node based on a three-way handshake of the transmission control protocol (TCP). In another specific implementation, in order to ensure the confidentiality and privacy of the data transmitted between the client and the first storage node, a four-way handshake between the client and the first storage node based on the secure socket layer (SSL) or transport layer security (TLS) determines the communication key, thereby establishing a secure communication channel, so that the data transmitted between the two can be encrypted using the communication key, effectively preventing the data of the communicating parties from being stolen by a third party.

[0163] S202: The first storage node obtains a first identification number set based on the attributes of the first file in the storage request, wherein the first identification number set includes identification numbers of any partial attributes and identification numbers of all attributes of the first file.

[0164] Taking the above Table 1 as an example, in which the attributes of the first file include the two attributes of "domestic storage" and "privacy file", the first identification number set corresponding to the attributes of the first file includes FAID "0" for "domestic storage", FAID "3" for "privacy file" and FAID "5" for "domestic storage + privacy file", that is, the first identification number set is {0,3,5}.

[0165] S203: The first storage node obtains a second identification number based on the first attribute.

[0166] In this application, the storage node ring to which the first storage node belongs is referred to as the first storage node ring, and the same node attribute possessed by all storage nodes in the first storage node ring is referred to as the first attribute. Therefore, the first storage node also has the first attribute. The second identification number is the NAID of the first attribute. Taking the first attribute of "located abroad + storing private files" and the above Table 2 as an example, the second identification number of the first attribute is "6".

[0167] S204: The first storage node determines whether the second identification number belongs to the first identification number set. If the second identification number belongs to the first identification number set, go to S205; if the second identification number does not belong to the first identification number set, go to S206.

[0168] S205: The first storage node stores the first file to a first target storage node in the first storage node ring.

[0169] The first storage node uses the storage node with the identification number of all attributes of the first file in the first storage node ring as the first target storage node. After determining the first target storage node, the first storage node stores the first file to the first target storage node.

[0170] In a specific implementation, when there are multiple storage nodes with identification numbers of all attributes of the first file, the first storage node encodes the first file into a binary character sequence, and then uses a hash algorithm (such as MD5 algorithm, SHA-1 algorithm) to convert the binary character sequence into a hash value, and uses the hash value as the operation identification number. The operation identification number has two cases: absolute value and relative value. When the operation identification number is an absolute value, the operation identification number represents the NID of the storage node in the first storage node ring, then the first storage node will use the storage node with the operation identification number and the identification number of all attributes of the first file as the first target storage node, or, the first storage node with the identification number of all attributes of the first file greater than the operation identification number as the first target storage node. When the operation identification number is a relative value, the operation identification number represents the relative order of multiple storage nodes with identification numbers of all attributes of the first file, and the storage node with the identification number of all attributes of the first file with the smallest NID is used as the storage node with the sequence number 1, then the first storage node will use the storage node with the operation identification number and the identification number of all attributes of the first file as the first target storage node.

[0171] When the first target storage node does not exist in the first storage node ring, the first storage node obtains the information that "the target storage node cannot be found", and then the first storage node feeds back the information to the user, and the user performs the next operation.

[0172] S206: The first portal node determines whether there is a first target portal node in the first portal node ring based on the first identification number set. If there is a first target portal node, go to S207; if not, go to S209.

[0173] In some possible implementations, the portal node of the storage node ring is obtained by specifying a successor storage node of a storage node in the storage node ring, and the first portal node is obtained as the portal node of the first storage node ring by specifying a successor storage node of a storage node in the first storage node ring. For example, the successor storage node of the storage node with NID 0 in each storage node ring can be specified as the portal node of the storage node ring, and the first portal node is the successor storage node of the storage node with NID 0 in the first storage node ring. Alternatively, the successor storage node of the storage node with NID 1 in the first storage node ring can be specified as the first portal node, and the successor storage node of the storage node with NID 2 in another storage node ring can be specified as the portal node of the storage node ring.

[0174] When the first storage node and the first portal node are the same node, the first portal node determines whether the first target portal node exists in the first portal node ring based on the first identification number set, wherein the first portal node ring is the portal node ring to which the first portal node belongs.

[0175] When the first storage node and the first portal node are different nodes, the first storage node can obtain the location of the first portal node by continuously querying the subsequent storage node in the first storage node ring, thereby sending the first identification number set and the first file to the first portal node. Correspondingly, the first portal node receives the first identification number set and the first file sent by the first storage node, and then determines whether the first target portal node exists in the first portal node ring based on the first identification number set.

[0176] The first portal node determines whether the first target portal node exists in the first portal node ring based on the first identification number set, which may include at least the following two implementation methods:

[0177] In the first mode, for each portal node in the first portal node ring, the first portal node compares the NAID of the attribute of the storage node ring to which each portal node belongs with each element in the first identification number set, that is, determines whether the NAID belongs to the first identification number set, thereby determining whether there is a first target portal node. If the NAID belongs to the first identification number set, that is, the NAID is equal to one of the elements in the first identification number set, the portal node with the NAID is used as the first target portal node. Therefore, the first target portal node is a portal node that has a mapping relationship with the first identification number set. If the NAID of each portal node does not belong to the first identification number set, it indicates that the first target portal node does not exist in the first portal node ring.

[0178] In the second method, the first portal node determines whether there is a first target portal node with a target GNID by searching the FGNT for a target GNID that has a corresponding relationship with each element in the first identification number set. Since the target GNID of the first target portal node has a corresponding relationship with one of the elements in the first identification number set, the first target portal node is a portal node that has a mapping relationship with the first identification number set. Since the first identification number set includes the FAID of any partial attribute of the first file and the FAID of all attributes, the first portal node can determine the target GNID corresponding to each element in the first identification number set based on the FAID contained in the first identification number set, the corresponding relationship between the FAID and the NAID, and the corresponding relationship between the NAID and the GNID.

[0179] The following takes an element in the first identification number set as "1" and the above Tables 1, 2, and 3 as an example to specifically introduce the process of determining the target GNID that has a corresponding relationship with an element in the first identification number set.

[0180] The element "1" indicates that the FAID is "1", and the file attribute corresponding to the FAID "1" in the above Table 1 is "stored abroad". Since the file attribute matches the node attribute, the node attribute that matches the file attribute "stored abroad" is "located abroad". It can be seen from the above Table 2 that the node attribute "located abroad" has NAID "1". It can be seen from the above Table 3 that the CIDs corresponding to NAID "1" are "1", "4", and "6", so there are three target GNIDs, "1", "4", and "6".

[0181] Therefore, there are multiple target GNIDs corresponding to one element in the first identification number set.

[0182] After determining the target GNID, the first portal node queries its own FGNT to find the portal node with the target GNID in the FGNT, or finds the portal node closest to the target GNID in the FGNT. When the portal node closest to the target GNID in the FGNT is found, the FGNT of the nearest portal node is recursively queried to find the portal node with the target GNID in the FGNT, or finds the portal node closest to the target GNID in the FGNT. If the portal node with the target GNID is found, indicating that the search is successful, the first portal node uses the portal node with the target GNID as the first target portal node. If the portal node with the target GNID cannot be found, indicating that the search has failed, it also indicates that the first target portal node does not exist in the first portal node ring.

[0183] S207: The first portal node sends the first identification number set and the first file to the first target portal node. Correspondingly, the first target portal node receives the first identification number set and the first file sent by the first portal node.

[0184] S208: The first target portal node stores the first file in a second target storage node in the storage node ring to which the first target portal node belongs, wherein the identification number of the second target storage node is the same as the identification numbers of all attributes of the first file.

[0185] The first target portal node uses the storage node with the identification number of all attributes of the first file in the storage node ring to which the first target portal node belongs as the second target storage node. After determining the second target storage node, the first target portal node stores the first file in the second target storage node.

[0186] When the second target storage node does not exist in the storage node ring to which the first target portal node belongs, the first target portal node obtains the information "cannot find the target storage node", and then the first target portal node feeds back the information to the user, who then performs the next operation.

[0187] S209: The second target portal node determines whether there is a third target portal node in the first node set based on the first identification number set. If there is no third target portal node, go to S210; if there is a third target portal node, go to S211.

[0188] The second target portal node is a portal node of the first portal node ring, and is obtained by specifying a successor portal node of a portal node in the first portal node ring. For example, the successor portal node of the portal node with the smallest GNID in the first portal node ring can be specified as the second target portal node. And, the second target portal node belongs to the first node set.

[0189] When the first portal node and the second target portal node are the same node, the second target portal node determines whether there is a third target portal node in the first node set based on the first identification number set.

[0190] When the first portal node and the second target portal node are different nodes, the first portal node can obtain the location of the second target portal node by continuously querying the successor portal node in the first node set, thereby sending the first identification number set and the first file to the second target portal node. Correspondingly, the second target portal node receives the first identification number set and the first file sent by the first portal node, and then determines whether there is a third target portal node in the first node set based on the first identification number set.

[0191] The second target portal node determines whether there is a third target portal node in the first node set based on the first identification number set, which may include at least the following two implementations:

[0192] In the first method, corresponding to the first method of determining the portal node ring in (8) above, for each portal node in the first node set, the second target portal node compares the NAID of the attribute of the portal node ring to which each portal node belongs with each element in the first identification number set, that is, determines whether the NAID belongs to the first identification number set, thereby determining whether there is a third target portal node. If the NAID belongs to the first identification number set, that is, the NAID is equal to one of the elements in the first identification number set, the portal node with the NAID is used as the third target portal node. Therefore, the third target portal node is a portal node that has a mapping relationship with the first identification number set. If the NAID of each portal node does not belong to the first identification number set, it indicates that there is no third target portal node in the first node set.

[0193] In the second method, corresponding to the second method of determining the portal node ring in (8) above, the second target portal node determines whether there is a third target portal node corresponding to the target GNID by searching the SGNT for the target GNID that corresponds to each element in the first identification number set. Since the first identification number set includes the FAID of any partial attribute and the FAID of all attributes of the first file, the first portal node can determine the target GNID corresponding to each element in the first identification number set based on the FAID contained in the first identification number set, the correspondence between the FAID and the NAID, and the correspondence between the NAID and the GNID.

[0194] After determining the target GNID, the second target portal node queries its own SGNT to find the portal node with the target GNID in the SGNT, or finds the portal node closest to the target GNID in the SGNT. When the portal node closest to the target GNID in the SGNT is found, the SGNT of the closest portal node is recursively queried to find the portal node with the target GNID in the SGNT, or finds the portal node closest to the target GNID in the SGNT. The second target portal node uses the portal node with the target GNID as the third target portal node, or uses the portal node closest to the target GNID in the first node set after the recursive query is completed as the third target portal node. When the third target portal node is a portal node with the target GNID, since the target GNID of the third target portal node corresponds to one of the elements in the first identification number set, the third target portal node is a portal node that has a mapping relationship with the first identification number set.

[0195] S210: The second target portal node obtains the information of "unable to find the target storage node" and feeds the information back to the user, who then performs the next operation.

[0196] S211: The second target portal node sends the first identification number set and the first file to the third target portal node. Correspondingly, the third target portal node receives the first identification number set and the first file sent by the second target portal node.

[0197] S212: The third target portal node determines whether there is a fourth target portal node in the second portal node ring based on the first identification number set. If there is a fourth target portal node, go to S213; if not, go to S214.

[0198] In the present application, the portal node ring to which the third target portal node belongs is referred to as the second portal node ring.

[0199] The process of the third target portal node determining whether there is a fourth target portal node in the second portal node ring based on the first identification number set can refer to the process of the first portal node determining whether there is a first target portal node in the first portal node ring based on the first identification number set in the above step S206, and for the sake of brevity of the specification, it will not be elaborated here. Among them, the fourth target portal node is a portal node that has a mapping relationship with the first identification number set.

[0200] In the case of a fourth target portal node, when the third target portal node and the fourth target portal node are the same node, when the third target portal node receives the first identification number set and the first file sent by the second target portal node, it is equivalent to the fourth target portal node receiving the first identification number set and the first file. When the third target portal node and the fourth target portal node are different nodes, the third target portal node can obtain the location of the fourth target portal node by continuously asking the successor portal node in the second portal node ring, thereby sending the first identification number set and the first file to the fourth target portal node. Correspondingly, the fourth target portal node receives the first identification number set and the first file sent by the third target portal node.

[0201] S213: The fourth target portal node stores the first file in a third target storage node in the storage node ring to which the fourth target portal node belongs, wherein the identification number of the third target storage node is the same as the identification numbers of all attributes of the first file.

[0202] S214: The third target portal node obtains the information of "unable to find the target storage node" and feeds the information back to the user, who then performs the next operation.

[0203] S215: The client sends the user's operation request to the first storage node. Correspondingly, the first storage node receives the user's operation request sent by the client.

[0204] The operation request can be Figure 1 The operation request 142 in the file management system 10 is as follows.

[0205] It can be understood that the operation request is a request for deleting, reading, writing, modifying, querying, storing, copying, transferring, etc. the first file, and the operation request includes the path of the first file. The path of the first file can be an absolute path or a relative path of the first file. For example, if the operation request is a read request, i.e., a read operation is performed on the first file, the operation request includes an offset, specified data, data size, etc. Alternatively, if the operation request is a query request, i.e., a data query operation is performed on the first file, the operation request includes a keyword, a query requirement, a data size, etc.

[0206] In a specific implementation, the operation request may also include a user public key. The user public key is used as a user identity identifier to identify different users. After the first storage node receives the operation request sent by the user through the client, it first obtains the user public key from the operation request. Subsequently, the first storage node performs a first match between the user public key and the first public key set of the first file. If the first match is successful, it indicates that the user has the authority to operate the first file. If the first match fails, it indicates that the user does not have the authority to operate the first file. If the user has the authority to operate the first file, the first storage node uses the user public key to verify the signature of the operation request, that is, to determine whether the signature is legal. If the signature is illegal, it indicates that the user's identity is wrong, and the first storage node rejects the user's operation request. If the signature is legal, it indicates that the user's identity is correct, and the first storage node determines the target storage node. The first public key set of the first file includes one or more first public keys. The first public key is a public key held by a user who has the authority to operate the first file. When the operation request includes the user public key, the user signs the operation request using the user private key, thereby preventing the operation request from being sent by impersonating the identity of other users.

[0207] S216: The first storage node obtains identification numbers of all attributes of the first file based on the path of the first file.

[0208] Typically, after the operation of storing the first file in the storage node is completed, the identification number of the storage node is stored in the first mapping table together with the path of the first file. Therefore, after obtaining the path of the first file, the first storage node can obtain the identification number of the storage node corresponding to the path of the first file by querying the first mapping table. Since the first file is stored in the storage node whose identification number is the same as the identification number of all attributes of the first file during the storage process, the identification number of the storage node obtained here is the identification number of all attributes of the first file.

[0209] S217: The first storage node determines whether there is a first target storage node in the first storage node ring. If there is a first target storage node, go to S218; if not, go to S219.

[0210] In a specific implementation, for each storage node in the first storage node ring, the first storage node compares the NAID of the node attribute of the storage node with the identification number of all the attributes of the first file, thereby determining whether the first target storage node exists. In the case where the NAID of the node attribute of the storage node is equal to the identification number of all the attributes of the first file, it indicates that the first target storage node exists in the first storage node ring. In the case where the NAID of the node attribute of all storage nodes is not equal to the identification number of all the attributes of the first file, it indicates that the first target storage node does not exist in the first storage node ring.

[0211] S218: The first storage node operates the first file in the first target storage node based on the operation request.

[0212] S219: The first storage node obtains a first identification number set based on identification numbers of all attributes of the first file.

[0213] In some possible implementations, the first storage node determines all attributes of the first file through the identification numbers of all attributes of the first file, and then obtains the first identification number set based on all attributes of the first file. The process of the first storage node obtaining the first identification number set based on all attributes of the first file can refer to the process of the first storage node obtaining the first identification number set based on the attributes of the first file in the storage request in step S202, and for the sake of brevity of the specification, it will not be elaborated here.

[0214] S220: The first portal node determines whether there is a first target portal node in the first portal node ring based on the first identification number set. If there is a first target portal node, go to S221; if not, go to S223.

[0215] When the first storage node and the first portal node are the same node, the first portal node determines whether the first target portal node exists in the first portal node ring based on the first identification number set.

[0216] When the first storage node and the first portal node are different nodes, the first storage node can obtain the location of the first portal node by continuously querying the subsequent storage node in the first storage node ring, thereby sending the first identification number set and the first file to the first portal node. Correspondingly, the first portal node receives the first identification number set and the first file sent by the first storage node, and then determines whether the first target portal node exists in the first portal node ring based on the first identification number set.

[0217] Among them, the process of the first portal node determining whether the first target portal node exists in the first portal node ring based on the first identification number set can refer to the process of the first portal node determining whether the first target portal node exists in the first portal node ring based on the first identification number set in the above step S206. For the sake of brevity of the specification, it will not be elaborated here.

[0218] S221: The first portal node sends the first identification number set and the operation request to the first target portal node. Correspondingly, the first target portal node receives the first identification number set and the operation request sent by the first portal node.

[0219] S222: The first target portal node determines a second target storage node in the storage node ring to which the first target portal node belongs based on the first identification number set, and operates the first file in the second target storage node based on the operation request.

[0220] S223: The second target portal node determines a third target portal node in the first node set based on the first identification number set.

[0221] When the first portal node and the second target portal node are the same node, the second target portal node determines the third target portal node in the first node set based on the first identification number set.

[0222] When the first portal node and the second target portal node are different nodes, the first portal node can obtain the location of the second target portal node by continuously querying the successor portal node in the first node set, thereby sending the first identification number set and the operation request to the second target portal node. Correspondingly, the second target portal node receives the first identification number set and the operation request sent by the first portal node, and then determines the third target portal node in the first node set based on the first identification number set.

[0223] Among them, the process of the second target portal node determining the third target portal node in the first node set based on the first identification number set can refer to the process of the second target portal node determining whether there is a third target portal node in the first node set based on the first identification number set in the above step S209. For the sake of brevity of the specification, it will not be elaborated here.

[0224] S224: The second target portal node sends the first identification number set and the operation request to the third target portal node. Correspondingly, the third target portal node receives the first identification number set and the operation request sent by the second target portal node.

[0225] S225: The third target portal node determines a fourth target portal node in the second portal node ring based on the first identification number set.

[0226] Among them, the process of the third target portal node determining the fourth target portal node in the second portal node ring based on the first identification number set can refer to the process of the third target portal node determining whether there is a fourth target portal node in the second portal node ring based on the first identification number set in the above step S212. For the sake of brevity of the specification, it will not be elaborated here.

[0227] When the third target portal node and the fourth target portal node are the same node, the third target portal node receiving the first identification number set and the operation request sent by the second target portal node is equivalent to the fourth target portal node receiving the first identification number set and the operation request.

[0228] When the third target portal node and the fourth target portal node are different nodes, the third target portal node can obtain the location of the fourth target portal node by continuously querying the successor portal node in the second portal node ring, thereby sending the first identification number set and the operation request to the fourth target portal node. Correspondingly, the fourth target portal node receives the first identification number set and the operation request sent by the third target portal node.

[0229] S226: The fourth target portal node determines a third target storage node in the storage node ring to which the fourth target portal node belongs based on the first identification number set, and operates the first file in the third target storage node based on the operation request.

[0230] In summary, the implementation of the embodiments of the present invention has the following advantages:

[0231] First, in a file management system, storage nodes with the same node attributes are organized in the same storage node ring, and then a successor storage node of a storage node is selected in each storage node ring as the portal node of the storage node ring. By establishing a portal node ring to manage the portal nodes of multiple storage node rings, the target portal node can be quickly found, thereby quickly completing the leap-forward search between multiple storage node rings. Maintaining routing information between multiple storage node rings in this way can reduce the number of network connections between storage nodes with different node attributes, greatly reduce the storage resources and management resources required to maintain routing information between different storage nodes, and also make the entire search process more convenient and faster.

[0232] Furthermore, a successor portal node of a portal node can be selected in each portal node ring as the portal node of the portal node ring. By establishing a first node set to manage the portal nodes of multiple portal node rings, the target portal node can be quickly found, thereby quickly completing the leap-forward search between multiple portal node rings. Maintaining the routing information between multiple portal node rings in this way can reduce the number of network connections between portal nodes, greatly reduce the storage resources and management resources required to maintain the routing information between multiple portal nodes, and also make the entire search process more convenient and faster.

[0233] Therefore, by implementing the embodiments of the present invention, a large number of storage nodes can be organized into multiple storage node rings for management according to node attributes, and then the multiple storage node rings can be managed in layers to solve the problems of complex management and difficult search caused by the large scale of storage nodes in the file management system, and it can also effectively deal with the problem of a sudden increase in storage nodes in future file management systems.

[0234] On the second aspect, by implementing the embodiments of the present invention, when a user uses a file management system to store a first file, the user can express the user's needs by specifying the attributes of the first file, and then use the attributes of the storage node to filter the target storage nodes that meet the user's needs, thereby enabling the user to control the storage location of the first file in the file management system and ensure the privacy and security of the file.

[0235] The aforementioned file management method can also be applied to another file management system. Another file management system provided by the present application is introduced in detail below.

[0236] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of another file management system provided by this application. Figure 3As shown, the file management system 30 provided by the present application includes a first management node 31 and multiple storage nodes (storage node 321, storage node 322, storage node 323...). Among them, the first management node 31 is used to process the storage request 351 or operation request 352 for the first file 340 submitted by the user 33, and is also used to manage multiple storage nodes (storage node 321, storage node 322, storage node 323...). Multiple storage nodes (storage node 321, storage node 322, storage node 323...) are used to store and manage multiple files (first file 340, file 341, file 342, file 343...).

[0237] In some possible implementations, the first management node 31 is also used to store and manage metadata of multiple files (metadata of the first file 340, metadata of file 341, metadata of file 342, metadata of file 343, etc.). The metadata includes the owner's public key, type, size, creation time, operation time, operation control list, etc. of the file. Multiple storage nodes (storage node 321, storage node 322, storage node 323, etc.) are used to store and manage multiple files. In this implementation, the metadata of the file is stored and managed by the management node, and the file is stored and managed by the storage node, which can give full play to the advantages of the two nodes, thereby greatly improving the performance of the file management system. Specifically, the management and storage of metadata by the management node can reduce the storage space occupied by the management node, and the rich memory resources and processor resources of the management node can quickly respond to the user's storage request or operation request; while the management and storage of content by the storage node can make full use of the rich storage resources of the storage node.

[0238] In some possible implementations, the file management system 30 may also include a client 36, which may be deployed on a terminal device of a user 33, and is used to obtain a storage request 351 or an operation request 352 from the user 33 for the first file 340, and forward the storage request 351 or the operation request 352 to the first management node 31.

[0239] In some possible implementations, the first management node 31 and the storage node 321 may be the same node. Alternatively, the first management node 31 and the storage node 321 may be different nodes. Specifically, the file management system 30 may be deployed on multiple computing devices. Taking the computing device as a server as an example, the client 36 may be deployed on the terminal device of the user 33, the first management node 31 may be deployed on the server A, the storage node 321 may be deployed on the server B, and the storage node 322 may be deployed on the server C... Alternatively, the client 36 may be deployed on the terminal device of the user 33, the first management node 31 and the storage node 321 may both be deployed on the server A, the storage node 322 may be deployed on the server B, and the storage node 333 may be deployed on the server C..., that is, each computing device may have management functions and storage functions.

[0240] In some possible implementations, the first management node 31 may be a supercomputer, a network computer, an industrial control computer, a personal computer, an embedded processor, and the like.

[0241] In some possible implementations, each of the above-mentioned multiple storage nodes can be the above-mentioned supercomputer, network computer, industrial control computer, personal computer, embedded processor, etc., or it can be a random access memory, read-only memory, magnetic core memory, flash memory, hard disk, optical disk, tape, etc.

[0242] In some possible implementations, the first management node 31 and the storage nodes, as well as the multiple storage nodes, are connected via a communication network of any communication mechanism / communication standard, wherein the communication network may be a wide area network, a local area network, a point-to-point connection, or any combination thereof.

[0243] In some possible implementations, the first management node 31 and the multiple storage nodes (storage node 321, storage node 322, storage node 323, ...) belong to the same local area network. Alternatively, the first management node 31 and the multiple storage nodes (storage node 321, storage node 322, storage node 323, ...) belong to different local area networks. For example, the first management node 31 is in a private network, and the multiple storage nodes (storage node 321, storage node 322, storage node 323, ...) are in a public network.

[0244] In some possible implementations, the file management system 30 includes multiple management nodes, and the first management node 31 belongs to the multiple management nodes. Each of the multiple management nodes has the same authority and management function, and each management node independently manages multiple storage nodes (storage node 321, storage node 322, storage node 323...).

[0245] Based on the above-mentioned file management system, another file management method provided by this application is introduced below.

[0246] See also Figure 4A and Figure 4B , Figure 4A is a schematic diagram of a process for storing files in another file management method provided by the present application. Figure 4B This is a flowchart of operating files in another file management method provided by this application. Figure 4A and Figure 4B As shown, the file management method provided by this application includes:

[0247] S401: The client sends a user's storage request to the first management node. Correspondingly, the first management node receives the user's storage request sent by the client.

[0248] Among them, users can be Figure 3 The client can be user 33 in Figure 3 In the client 36 of the file management system 30, the storage request may be Figure 3 In the storage request 351 of the file management system 30, the first management node may be Figure 1 The first management node 31 in the file management system 30.

[0249] S402: The first management node obtains a first identification number set based on the attribute of the first file in the storage request.

[0250] The process of obtaining the first identification number set based on the attribute of the first file in the storage request in step S402 can refer to the aforementioned Figure 2A The process of obtaining the first identification number set based on the attribute of the first file in the storage request in step S202 will not be described in detail here for the sake of brevity of the specification.

[0251] S403: The first management node sends the first identification number set and the first file to the first storage node. Correspondingly, the first storage node receives the first identification number set and the first file sent by the first management node.

[0252] The first storage node may be Figure 3 Storage nodes 321, 322, 323, etc. in the file management system 30

[0253] S404: The first storage node obtains a second identification number based on the first attribute.

[0254] S405: The first storage node determines whether the second identification number belongs to the first identification number set. If the second identification number belongs to the first identification number set, go to S406; if the second identification number does not belong to the first identification number set, go to S407.

[0255] S406: The first storage node stores the first file to a first target storage node in the first storage node ring.

[0256] S407: The first portal node determines whether there is a first target portal node in the first portal node ring based on the first identification number set. If there is a first target portal node, go to S408; if not, go to S410.

[0257] S408: The first portal node sends the first identification number set and the first file to the first target portal node. Correspondingly, the first target portal node receives the first identification number set and the first file sent by the first portal node.

[0258] S409: The first target portal node stores the first file in a second target storage node in the storage node ring to which the first target portal node belongs, wherein the identification number of the second target storage node is the same as the identification numbers of all attributes of the first file.

[0259] S410: The second target portal node determines whether there is a third target portal node in the first node set based on the first identification number set. If there is no third target portal node, go to S411; if there is a third target portal node, go to S412.

[0260] S411: The second target portal node obtains the information of "unable to find the target storage node" and feeds the information back to the user, who then performs the next operation.

[0261] S412: The second target portal node sends the first identification number set and the first file to the third target portal node. Correspondingly, the third target portal node receives the first identification number set and the first file sent by the second target portal node.

[0262] S413: The third target portal node determines whether there is a fourth target portal node in the second portal node ring based on the first identification number set. If there is a fourth target portal node, go to S414; if not, go to S415.

[0263] S414: The fourth target portal node stores the first file in a third target storage node in the storage node ring to which the fourth target portal node belongs, wherein the identification number of the third target storage node is the same as the identification numbers of all attributes of the first file.

[0264] S415: The third target portal node obtains the information of "unable to find the target storage node" and feeds the information back to the user, who then performs the next operation.

[0265] The execution process of the above steps S404 to S415 can refer to the above Figure 2A The execution process of step S203 to step S214 will not be elaborated here for the sake of brevity of the description.

[0266] S416: The client sends the user's operation request to the first management node. Correspondingly, the first management node receives the user's operation request sent by the client.

[0267] The operation request can be Figure 3 Operation request 352 in the file management system 30.

[0268] In some possible implementations, the first management node verifies whether the operation request is within the user's authority based on the operation control list of the first file. Specifically, each first public key has a corresponding authority, and the corresponding authority is determined by the owner of the first file. The first public key and the authority corresponding to it are stored in the operation control list of the first file. When the operation request includes a user public key, the first management node matches the user public key with the first public key set of the first file for the first time. If the first match fails, it indicates that the user does not have the authority to operate the first file, and the first management node rejects the operation request. If the first match succeeds, it indicates that the user has the authority to operate the first file, and the first management node determines the user's authority according to the first public key that successfully matches, and matches the operation request with the user's authority for the second time. If the second match succeeds, it indicates that the user's operation request is within the user's authority, and the first management node determines the target storage node. If the second match fails, it indicates that the user's operation request is outside the user's authority, and the first management node rejects the operation request. For example, the authority corresponding to the first public key that successfully matches includes reading the first file, modifying the first file, and querying the first file, indicating that the user's authority is to read the first file, modify the first file, or query the first file. If the user's operation request is to modify the first file, the second match will succeed, and the first management node will determine the target storage node. If the user's operation request is to delete the first file, the second match will fail, and the first management node will reject the operation request to delete the first file. In summary, by adding an operation control list to the first file, the owner of the first file can grant corresponding management permissions to different users, and then use the operation control list of the first file to verify whether the user's operation request is within the user's authority. Fine-grained operation control of the first file can be achieved. Among them, the above-mentioned first public key, user public key, and first public key set can refer to the aforementioned Figure 2B The first public key, user public key, and first public key set in step S217.

[0269] S417: The first management node obtains identification numbers of all attributes of the first file based on the path of the first file.

[0270] Usually, after the operation of storing the first file in the storage node is completed, the identification number of the storage node is stored in the first mapping table together with the path of the first file. Therefore, after obtaining the path of the first file, the first management node can obtain the identification number of the storage node corresponding to the path of the first file by querying the first mapping table. Since the first file is stored in the storage node whose identification number is the same as the identification number of all the attributes of the first file during the storage process, the identification number of the storage node obtained here is the identification number of all the attributes of the first file.

[0271] In some possible implementations, before the first management node obtains the identification numbers of all attributes of the first file based on the path of the first file, the first management node determines the second storage node based on the second mapping table. Specifically, the first management node determines whether the path of the first file is in the second mapping table. If the path of the first file is in the second mapping table, the first management node obtains the identification number of the second storage node from the second mapping table, and operates the first file in the second storage node based on the operation request. If the path of the first file is not in the second mapping table, the first management node obtains the identification numbers of all attributes of the first file based on the path of the first file.

[0272] In some possible implementations, the second mapping table is stored in the first management node, and is used to record the corresponding relationship between the paths of multiple special files and the identification numbers of the storage nodes to which the multiple special files belong. Among them, the special files in the second mapping table are updated based on the operation time and the number of operations. Specifically, after the first management node operates the second file, it records the operation time and operation heat (also referred to as the operation frequency) of the second file. Then, the first management node determines whether the path of the second file is in the second mapping table. If the path of the second file is in the second mapping table, the first management node updates the path, operation time, operation heat, and the identification number of the storage node to which the second file belongs, and other related information in the second mapping table. If the path of the second file is not in the second mapping table, the first management node compares the number of multiple special files recorded in the second mapping table with the first threshold. If the number of multiple special files is less than the first threshold, the first management node records the path, operation time, operation heat, and the identification number of the storage node to which the second file belongs, and other related information in the second mapping table. If the number of multiple special files is greater than or equal to the first threshold, the first management node deletes the special files and related information in the second mapping table whose operation time is earlier than the first historical time and whose operation heat is lower than the heat threshold, and then records the path, operation time, operation heat, and identification number of the storage node to which the second file belongs, and other related information in the second mapping table. That is, the second mapping table is used to record the corresponding relationship between the path of the file whose operation time is later than the first historical time and the identification number of the storage node to which the file belongs, or to record the corresponding relationship between the path of the file whose operation heat is higher than the heat threshold and the identification number of the storage node to which the file belongs.

[0273] In summary, the first management node can directly determine the second storage node by searching the path of the first file using the second mapping table, and query the second storage node within the time complexity of O(1). If the second storage node cannot be found in the second mapping table, the identification number of all the attributes of the first file is used to search for the storage node storing the first file, which can simplify the difficulty of searching for the storage node and reduce the time complexity of searching for the storage node.

[0274] S418: The first management node sends the identification numbers of all attributes of the first file and the operation request to the first storage node. Correspondingly, the first storage node receives the identification numbers of all attributes of the first file and the operation request sent by the first management node.

[0275] S419: The first storage node determines whether there is a first target storage node in the first storage node ring. If there is a first target storage node, go to S420; if not, go to S421.

[0276] S420: The first storage node operates the first file in the first target storage node based on the operation request.

[0277] S421: The first storage node obtains a first identification number set based on identification numbers of all attributes of the first file.

[0278] S422: The first portal node determines whether there is a first target portal node in the first portal node ring based on the first identification number set. If there is a first target portal node, go to S423; if not, go to S425.

[0279] S423: The first portal node sends the first identification number set and the operation request to the first target portal node. Correspondingly, the first target portal node receives the first identification number set and the operation request sent by the first portal node.

[0280] S424: The first target portal node determines a second target storage node in the storage node ring to which the first target portal node belongs based on the first identification number set, and operates the first file in the second target storage node based on the operation request.

[0281] S425: The second target portal node determines a third target portal node in the first node set based on the first identification number set.

[0282] S426: The second target portal node sends the first identification number set and the operation request to the third target portal node. Correspondingly, the third target portal node receives the first identification number set and the operation request sent by the second target portal node.

[0283] S427: The third target portal node determines a fourth target portal node in the second portal node ring based on the first identification number set.

[0284] S428: The fourth target portal node determines a third target storage node in the storage node ring to which the fourth target portal node belongs based on the first identification number set, and operates the first file in the third target storage node based on the operation request.

[0285] The execution process of the above steps S419 to S428 can refer to the above Figure 2B The execution process of step S217 to step S226 will not be elaborated here for the sake of brevity of the specification.

[0286] In some possible implementations, the first management node has a trusted execution environment (TEE), such as SGX (software guard extensions), SEV (secure encrypted virtualization), and Trust Zone. In addition, the operations performed by the first management node in the above scheme, including steps S401, S402, S403, S416, S417, and S418, are performed in the trusted execution environment.

[0287] In a specific implementation, when the first management node also has a storage function, the first management node stores the metadata of the first file in the trusted execution environment, and sends the content of the first file to the first storage node. Furthermore, after the process of operating the content of the first file in the target storage node based on the operation request is completed, the first management node operates the metadata of the first file in the first management node based on the content of the completed first file.

[0288] In a specific implementation, when the file system includes multiple management nodes, each management node has a trusted execution environment and implements its own authority and management functions in the trusted execution environment.

[0289] To sum up, running the file management method in a trusted execution environment can protect the execution flow integrity, data integrity and privacy of the first management node, effectively prevent a third party from maliciously modifying or destroying the programs and data stored in the first management node, and prevent a third party from stealing the data stored in the first management node, thereby realizing the secure sharing function of the file system management system.

[0290] See also Figure 5 , Figure 5 is a structural diagram of a file management device provided by the present application. The file management device is applied to any one of the multiple storage nodes included in the first storage node ring, wherein the multiple storage nodes all have the first attribute and the multiple storage nodes have different identification numbers. Figure 5 As shown, the file management device 500 includes: a first acquisition module 501 and a storage module 502,

[0291] A first acquisition module 501 is used to acquire a first file, a first identification number set and a second identification number;

[0292] The storage module 502 is used to store the first file in the first target storage node in the first storage node ring when it is determined that the second identification number exists in the first identification number set;

[0293] Among them, the first identification number set includes the identification numbers of any part of the attributes of the first file and the identification numbers of all the attributes, the second identification number is the identification number of the first attribute, the first file and the attributes of the first file are both carried in the user's storage request, and the identification number of the first target storage node is the same as the identification numbers of all the attributes of the first file.

[0294] The first acquisition module 501 and the storage module 502 can be implemented by software or hardware. For example, the implementation of the first acquisition module 501 is described below by taking the first acquisition module 501 as an example. Similarly, the implementation of the storage module 502 can refer to the implementation of the first acquisition module 501.

[0295] As an example of a software functional unit, the first acquisition module 501 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned computing instance may be one or more. For example, the first acquisition module 501 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code can be distributed in the same region (region) or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code can be distributed in the same availability zone (AZ) or in different AZs, each AZ including a data center or multiple data centers with similar geographical locations. Among them, usually a region can include multiple AZs.

[0296] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0297] As an example of a hardware functional unit, the first acquisition module 501 may include at least one computing device, such as a server, etc. Alternatively, the first acquisition module 501 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0298] The multiple computing devices included in the first acquisition module 501 can be distributed in the same region or in different regions. The multiple computing devices included in the first acquisition module 501 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the first acquisition module 501 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0299] It should be noted that, in other embodiments, the first acquisition module 501 can be used to execute any step in the file management method, and the storage module 502 can be used to execute any step in the file management method. The steps that the first acquisition module 501 and the storage module 502 are responsible for implementing can be specified as needed. The first acquisition module 501 and the storage module 502 respectively implement different steps in the file management method to achieve all the functions of the file management device 500.

[0300] See also Figure 6 , Figure 6 is a schematic diagram of the structure of another file management device provided by the present application. The file management device is applied to any one of the multiple storage nodes included in the first storage node ring, wherein the multiple storage nodes have different identification numbers. Figure 6 As shown, the file management device 600 includes: a second acquisition module 601 and a processing module 602,

[0301] The second acquisition module 601 is used to acquire identification numbers of all attributes of the first file and the user's operation request on the first file;

[0302] The processing module 602 is used to operate the first file in the first target storage node based on the operation request when it is determined that the first target storage node exists in the first storage node ring;

[0303] Among them, the operation request carries the path of the first file, and the identification numbers of all attributes of the first file are obtained by querying the first mapping table. The first mapping table is used to record the correspondence between the paths of multiple files stored in the file management system and the identification numbers of all attributes of the multiple files. The multiple files include the first file, and the identification number of the first target storage node is the same as the identification number of all attributes of the first file.

[0304] The second acquisition module 601 and the processing module 602 can be implemented by software or hardware. For example, the implementation of the second acquisition module 601 is described below by taking the second acquisition module 601 as an example. Similarly, the implementation of the processing module 602 can refer to the implementation of the second acquisition module 601.

[0305] As an example of a software functional unit, the second acquisition module 601 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned computing instance may be one or more. For example, the second acquisition module 601 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code can be distributed in the same region (region) or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code can be distributed in the same availability zone (AZ) or in different AZs, each AZ including a data center or multiple data centers with similar geographical locations. Among them, usually a region can include multiple AZs.

[0306] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0307] As an example of a hardware functional unit, the second acquisition module 601 may include at least one computing device, such as a server, etc. Alternatively, the second acquisition module 601 may also be a device implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0308] The multiple computing devices included in the second acquisition module 601 can be distributed in the same region or in different regions. The multiple computing devices included in the first acquisition module 501 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the second acquisition module 601 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0309] It should be noted that, in other embodiments, the second acquisition module 601 can be used to execute any step in the file management method, the processing module 602 can be used to execute any step in the file management method, and the steps that the second acquisition module 601 and the processing module 602 are responsible for implementing can be specified as needed. The second acquisition module 601 and the processing module 602 respectively implement different steps in the file management method to achieve all the functions of the file management device 600.

[0310] See also Figure 7 , Figure 7 7 is a schematic diagram of the structure of a file management system provided by the present application. The file management system can be used to implement the aforementioned file management method. The file management system 700 includes a first storage node ring, and multiple storage nodes in the first storage node ring all have a first attribute, and the multiple storage nodes have different identification numbers. Figure 7 As shown, the file management system 700 includes: a first storage node 701,

[0311] The first storage node 701 is used to obtain a first file, a first identification number set and a second identification number;

[0312] The first storage node 701 is further configured to store the first file in a first target storage node in the first storage node ring when it is determined that the second identification number exists in the first identification number set;

[0313] The first storage node is any storage node in the first storage node ring, the first file comes from a storage request of a user, the storage request carries the attributes of the first file, the first identification number set includes identification numbers of any partial attributes of the first file and identification numbers of all attributes, the second identification number is the identification number of the first attribute, and the identification number of the first target storage node is the same as the identification number of all attributes of the first file. In some possible implementations, the file management system 700 includes a first portal node, which is a portal node of the first storage node ring.

[0314] The first portal node is configured to send the first identification number set and the first file to the first target portal node when it is determined, based on the first identification number set, that there is a first target portal node in the first portal node ring to which the first portal node belongs;

[0315] The first target portal node is used to store the first file in a second target storage node in the storage node ring to which the first target portal node belongs;

[0316] Among them, the first portal node ring includes portal nodes of multiple storage node rings including the first storage node ring, the attributes of the multiple storage node rings are different, the first target portal node is the portal node in the first portal node ring that has a mapping relationship with the first identification number set, and the identification number of the second target storage node is the same as the identification number of all attributes of the first file.

[0317] In some possible implementations, the first portal node and the first storage node 701 are the same node, or the first portal node and the first storage node 701 are different nodes.

[0318] In some possible implementations, the file management system 700 includes a second target portal node, where the second target portal node is a portal node of the first portal node ring.

[0319] The second target portal node is used to send the first identification number set and the first file to the third target portal node when it is determined based on the first identification number set that there is a third target portal node in the first node set to which the second target portal node belongs;

[0320] The third target portal node is used to send the first identification number set and the first file to the fourth target portal node when it is determined that there is a fourth target portal node in the second portal node ring according to the first identification number set;

[0321] a fourth target portal node, used for storing the first file in a third target storage node in the storage node ring to which the fourth target portal node belongs;

[0322] Among them, the first node set includes portal nodes of multiple portal node rings including the first portal node ring, the third target portal node is the portal node in the first node set that has a mapping relationship with the first identification number set, and the third target portal node is the portal node of the second portal node ring, the fourth target portal node is the portal node in the second portal node ring that has a mapping relationship with the first identification number set, and the identification number of the third target storage node is the same as the identification numbers of all attributes of the first file.

[0323] In some possible implementations, the first portal node and the second target portal node are the same node, or the first portal node and the second target portal node are different nodes.

[0324] The above-mentioned first storage node 701, second storage node, third storage node, first portal node, first target portal node, second target portal node, third target portal node and fourth target portal node can be implemented by software or by hardware. Exemplarily, the implementation of the first storage node 701 is introduced below. Similarly, the implementation of the second storage node, the third storage node, the first portal node, the first target portal node, the second target portal node, the third target portal node and the fourth target portal node can refer to the implementation of the first storage node 701.

[0325] As an example of a software functional unit, the first storage node 701 may include code running on a computing instance. The computing instance may be at least one of a physical host (computing device), a virtual machine, a container, and other computing devices. Furthermore, the computing device may be one or more. For example, the first storage node 701 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the application may be distributed in the same region or in different regions. The multiple hosts / virtual machines / containers used to run the code may be distributed in the same AZ or in different AZs, each AZ including a data center or multiple data centers with close geographical locations. Typically, a region may include multiple AZs.

[0326] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same VPC or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway must be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0327] As an example of a hardware functional unit, the first storage node 701 may include at least one computing device, such as a server, etc. Alternatively, the first storage node 701 may also be a device implemented using ASIC or PLD, etc. The PLD may be implemented using CPLD, FPGA, GAL or any combination thereof.

[0328] The multiple computing devices included in the first storage node 701 can be distributed in the same region or in different regions. The multiple computing devices included in the first storage node 701 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the first storage node 701 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0329] See also Figure 8 , Figure 8 800 is a schematic diagram of another file management system provided by the present application. The file management system can be used to implement the aforementioned file management method. The file management system 800 includes a first storage node ring, and a plurality of storage nodes in the first storage node ring have different identification numbers. Figure 8 As shown, the file management system 800 includes: a first storage node 801,

[0330] The first storage node 801 is used to obtain identification numbers of all attributes of the first file and the user's operation request on the first file;

[0331] The first storage node 801 is further configured to operate the first file in the first target storage node based on the operation request when it is determined that the first target storage node exists in the first storage node ring;

[0332] Among them, the first storage node is any storage node in the first storage node ring, the operation request carries the path of the first file, and the identification number of all attributes of the first file is obtained by querying the first mapping table. The first mapping table is used to record the correspondence between the paths of multiple files stored in the file management system 800 and the identification numbers of all attributes of the multiple files. The multiple files include the first file, and the identification number of the first target storage node is the same as the identification number of all attributes of the first file.

[0333] In some possible implementations, the file management system 800 includes a first portal node, where the first portal node is a portal node of a first storage node ring.

[0334] The first storage node 801 is used to obtain a first identification number set based on identification numbers of all attributes of the first file when it is determined that the first target storage node does not exist in the first storage node ring;

[0335] The first portal node is configured to send the first identification number set and the operation request to the first target portal node when it is determined, based on the first identification number set, that there is a first target portal node in the first portal node ring to which the first portal node belongs;

[0336] The first target portal node is used to determine the second target storage node in the storage node ring to which the first target portal node belongs based on the first identification number set, and to operate the first file in the second target storage node based on the operation request;

[0337] Among them, the first identification number set includes identification numbers of any partial attributes and identification numbers of all attributes of the first file, the first portal node ring includes portal nodes of multiple storage node rings including the first storage node ring, the attributes of the multiple storage node rings are different from each other, the first target portal node is the portal node in the first portal node ring that has a mapping relationship with the first identification number set, and the identification number of the second target storage node is the same as the identification number of all attributes of the first file.

[0338] In some possible implementations, the first portal node and the first storage node 801 are the same node, or the first portal node and the first storage node 801 are different nodes.

[0339] In some possible implementations, the file management system 800 includes a second target portal node, where the second target portal node is a portal node of the first portal node ring.

[0340] the second target portal node is configured to send the first identification number set and the operation request to the third target portal node when it is determined based on the first identification number set that there is a third target portal node in the first node set to which the second target portal node belongs;

[0341] The third target portal node is used to send the first identification number set and the operation request to the fourth target portal node when it is determined that there is a fourth target portal node in the second portal node ring according to the first identification number set;

[0342] a fourth target portal node, configured to determine a third target storage node in the storage node ring to which the fourth target portal node belongs based on the first identification number set, and to operate the first file in the third target storage node based on the operation request;

[0343] Among them, the first node set includes portal nodes of multiple portal node rings including the first portal node ring, the third target portal node is the portal node in the first node set that has a mapping relationship with the first identification number set, and the third target portal node is the portal node of the second portal node ring, the fourth target portal node is the portal node in the second portal node ring that has a mapping relationship with the first identification number set, and the identification number of the third target storage node is the same as the identification numbers of all attributes of the first file.

[0344] In some possible implementations, the first portal node and the second target portal node are the same node, or the first portal node and the second target portal node are different nodes.

[0345] In some possible implementations, the file management system 800 further includes a first management node, where the first management node is used to manage and store metadata of the first file.

[0346] In some possible implementations, before the first storage node obtains the identification number of all attributes of the first file and the user's operation request on the first file,

[0347] A first management node, used to obtain an operation request;

[0348] The first management node is further configured to query the second mapping table according to the path of the first file, and if it is determined that the second mapping table contains an identification number of the second storage node corresponding to the path of the first file, operate the first file in the second storage node based on the operation request;

[0349] The second mapping table includes a correspondence between paths of multiple special files and identification numbers of storage nodes to which the multiple special files belong, the multiple special files being files among the multiple files whose operation time is later than the first historical time, or the multiple special files being files among the multiple files whose operation heat is higher than a heat threshold;

[0350] The first storage node 801 is specifically configured to receive the identification number of all attributes of the first file and the operation request sent by the first management node when it is determined that the identification number of the second storage node corresponding to the path of the first file does not exist in the second mapping table.

[0351] In some possible implementations, the first management node has a trusted execution environment, and operations performed by the first management node are performed in the trusted execution environment.

[0352] The above-mentioned first storage node 801, second storage node, third storage node, first portal node, first target portal node, second target portal node, third target portal node and fourth target portal node can be implemented by software or by hardware. Exemplarily, the implementation of the first storage node 801 is introduced below. Similarly, the implementation of the second storage node, the third storage node, the first portal node, the first target portal node, the second target portal node, the third target portal node and the fourth target portal node can refer to the implementation of the first storage node 801.

[0353] As an example of a software functional unit, the first storage node 801 may include code running on a computing instance. The computing instance may be at least one of a physical host (computing device), a virtual machine, a container, and other computing devices. Furthermore, the computing device may be one or more. For example, the first storage node 801 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the application may be distributed in the same region or in different regions. The multiple hosts / virtual machines / containers used to run the code may be distributed in the same AZ or in different AZs, each AZ including a data center or multiple data centers with close geographical locations. Typically, a region may include multiple AZs.

[0354] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same VPC or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway must be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0355] As an example of a hardware functional unit, the first storage node 801 may include at least one computing device, such as a server, etc. Alternatively, the first storage node 801 may also be a device implemented using ASIC or PLD, etc. The PLD may be implemented using CPLD, FPGA, GAL or any combination thereof.

[0356] The multiple computing devices included in the first storage node 801 can be distributed in the same region or in different regions. The multiple computing devices included in the first storage node 801 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the first storage node 801 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0357] See also Fig. 9 , Fig. 9 1 is a schematic diagram of the structure of a computing device cluster provided by the present application. The computing device cluster provided by the present application includes at least one computing device. The computing device may be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device may also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.

[0358] like Fig. 9 As shown, the computing device cluster includes at least one computing device 900 .

[0359] The computing device 900 includes: a bus 901, a processor 902, a memory 903, and a communication interface 904. The processor 902, the memory 903, and the communication interface 904 communicate with each other through the bus 901. The computing device 900 may be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 900.

[0360] The bus 901 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 The bus 901 is represented by only one line, but it does not mean that there is only one bus or one type of bus. The bus 901 may include a path for transmitting information between various components of the computing device 900 (for example, the memory 903, the processor 902, and the communication interface 904).

[0361] The processor 902 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0362] The memory 903 may include a volatile memory, such as a random access memory (RAM). The memory 903 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0363] The memory 903 stores executable program codes, and the processor 902 executes the executable program codes to respectively implement the functions of the first acquisition module 501 and the storage module 502, thereby implementing the file management method. That is, the memory 903 stores instructions for executing the file management method.

[0364] Alternatively, the memory 903 stores executable codes, and the processor 902 executes the executable codes to respectively implement the functions of the first storage node 701, the second storage node, the third storage node, the first portal node, the first target portal node, the second target portal node, the third target portal node, and the fourth target portal node, thereby implementing the file management method. That is, the memory 903 stores instructions for executing the file management method.

[0365] Alternatively, the memory 903 stores executable program codes, and the processor 902 executes the executable program codes to respectively implement the functions of the second acquisition module 601 and the processing module 602, thereby implementing the file management method. That is, the memory 903 stores instructions for executing the file management method.

[0366] Alternatively, the memory 903 stores executable codes, and the processor 902 executes the executable codes to respectively implement the functions of the first storage node 801, the second storage node, the third storage node, the first portal node, the first target portal node, the second target portal node, the third target portal node, and the fourth target portal node, thereby implementing the file management method. That is, the memory 903 stores instructions for executing the file management method.

[0367] The communication interface 904 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 900 and other devices or a communication network.

[0368] The memory 903 in one or more computing devices 900 in the computing device cluster may store the same instructions for executing the file management method.

[0369] In some possible implementations, the memory 903 of one or more computing devices 900 in the computing device cluster may also store partial instructions for executing the file management method. In other words, the combination of one or more computing devices 900 may jointly execute instructions for executing the file management method.

[0370] It should be noted that the memory 903 in different computing devices 900 in the computing device cluster can store different instructions, which are respectively used to execute part of the functions of the file management apparatus 500. That is, the instructions stored in the memory 903 in different computing devices 900 can implement the functions of one or more modules in the first acquisition module 501 and the storage module 502.

[0371] Alternatively, the memory 903 in different computing devices 900 in the computing device cluster may store different instructions, which are respectively used to execute part of the functions of the file management apparatus 600. That is, the instructions stored in the memory 903 in different computing devices 900 may implement the functions of one or more modules in the second acquisition module 601 and the processing module 602.

[0372] See also Fig.10 , Fig.10 FIG. 1 is a schematic diagram of another computing device cluster provided by the present application. In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network. The network may be a wide area network or a local area network, etc. Fig.10 As shown, two computing devices 900A and 900B are connected via a network. Specifically, they are connected to the network via a communication interface in each computing device. In this type of possible implementation, the memory 903 in the computing device 900A stores instructions for executing the functions of the first acquisition module 501. At the same time, the memory 903 in the computing device 900B stores instructions for executing the functions of the storage module 502.

[0373] Fig.10 The connection method between the computing device clusters shown may be based on the consideration that the file management method provided in the present application requires the storage of a large number of files, and therefore the functions implemented by the storage module 502 may be handed over to the computing device 900B for execution.

[0374] Alternatively, in one possible implementation, the memory 903 in the computing device 900A stores instructions for executing the functions of the second acquisition module 601. Meanwhile, the memory 903 in the computing device 900B stores instructions for executing the functions of the processing module 602. Fig.10 The connection method between the computing device clusters shown may be based on the consideration that the file management method provided in the present application needs to process a large number of files, and therefore it is considered to hand over the functions implemented by the processing module 602 to the computing device 900B for execution.

[0375] It should be understood that Fig.10 The functions of the computing device 900A shown in FIG. 9A may also be completed by multiple computing devices 900. Similarly, the functions of the computing device 900B may also be completed by multiple computing devices 900.

[0376] The present application embodiment also provides another computing device cluster. The connection relationship between the computing devices in the computing device cluster can be similar to that of Fig. 9 and Fig.10 The connection mode of the computing device cluster is different in that the memory 903 in one or more computing devices 900 in the computing device cluster may store the same instructions for executing the file management method.

[0377] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be a software or program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the aforementioned file management method or another aforementioned file management method.

[0378] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by the computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the aforementioned file management method, or instruct the computing device to execute another aforementioned file management method.

[0379] It should be understood that in the embodiments of the present invention, "when", "when" and "if" all mean that the terminal device or access network device will make corresponding processing under certain objective circumstances, and it is not a limited time, nor does it require the terminal device or access network device to have a judgment action when implementing it, nor does it mean that there are other limitations.

[0380] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A file management method, characterized in that: Applied to a file management system, the file management system includes a first storage node ring, multiple storage nodes in the first storage node ring all have a first attribute, and the multiple storage nodes have different identification numbers, the method includes: The first storage node obtains a first file, a first identification number set, and a second identification number, wherein the first storage node is any storage node in the first storage node ring, the first identification number set includes identification numbers of any partial attributes and identification numbers of all attributes of the first file, the second identification number is the identification number of the first attribute, and the first file and the attribute of the first file are both carried in the user's storage request; When the first storage node determines that the second identification number exists in the first identification number set, the first storage node stores the first file to a first target storage node in the first storage node ring, wherein the identification number of the first target storage node is the same as the identification numbers of all attributes of the first file.

2. The method according to claim 1, characterized in that: The first portal node is a portal node of the first storage node ring, and the method further includes: The first portal node sends the first identification number set and the first file to the first target portal node when determining, based on the first identification number set, that there is a first target portal node in the first portal node ring to which the first portal node belongs, wherein the first portal node ring includes portal nodes of multiple storage node rings including the first storage node ring, the multiple storage node rings have different attributes, and the first target portal node is a portal node in the first portal node ring that has a mapping relationship with the first identification number set; The first target portal node stores the first file in a second target storage node in a storage node ring to which the first target portal node belongs, wherein an identification number of the second target storage node is the same as identification numbers of all attributes of the first file.

3. The method according to claim 2, characterized in that The first portal node and the first storage node are the same node, or the first portal node and the first storage node are different nodes.

4. The method according to claim 2 or 3, characterized in that: The second target portal node is a portal node of the first portal node ring, and the method further includes: When the second target portal node determines, based on the first identification number set, that there is a third target portal node in the first node set to which the second target portal node belongs, the first identification number set and the first file are sent to the third target portal node, wherein the first node set includes portal nodes of multiple portal node rings including the first portal node ring, the third target portal node is a portal node in the first node set that has a mapping relationship with the first identification number set, and the third target portal node is a portal node of the second portal node ring; The third target portal node, when determining, based on the first identification number set, that there is a fourth target portal node in the second portal node ring, sends the first identification number set and the first file to the fourth target portal node, wherein the fourth target portal node is a portal node in the second portal node ring that has a mapping relationship with the first identification number set; The fourth target portal node stores the first file to a third target storage node in the storage node ring to which the fourth target portal node belongs, wherein the identification number of the third target storage node is the same as the identification numbers of all attributes of the first file.

5. The method according to claim 4, characterized in that The first portal node and the second target portal node are the same node, or the first portal node and the second target portal node are different nodes.

6. A file management method, characterized in that: Applied to a file management system, the file management system includes a first storage node ring, a plurality of storage nodes in the first storage node ring have mutually different identification numbers, the method includes: The first storage node obtains the identification number of all attributes of the first file and the operation request of the user on the first file, wherein the first storage node is any storage node in the first storage node ring, the operation request carries the path of the first file, and the identification number of all attributes of the first file is obtained by querying a first mapping table, and the first mapping table is used to record the corresponding relationship between the paths of multiple files stored in the file management system and the identification numbers of all attributes of the multiple files, and the multiple files include the first file; When determining that there is a first target storage node in the first storage node ring, the first storage node operates the first file in the first target storage node based on the operation request, wherein the identification number of the first target storage node is the same as the identification numbers of all attributes of the first file.

7. The method according to claim 6, characterized in that The first portal node is a portal node of the first storage node ring, and the method further includes: When determining that the first target storage node does not exist in the first storage node ring, the first storage node acquires a first identification number set based on identification numbers of all attributes of the first file, wherein the first identification number set includes identification numbers of any partial attributes and identification numbers of all attributes of the first file; The first portal node sends the first identification number set and the operation request to the first target portal node when determining, based on the first identification number set, that there is a first target portal node in the first portal node ring to which the first portal node belongs, wherein the first portal node ring includes portal nodes of multiple storage node rings including the first storage node ring, the multiple storage node rings have different attributes, and the first target portal node is a portal node in the first portal node ring that has a mapping relationship with the first identification number set; The first target portal node determines a second target storage node in the storage node ring to which the first target portal node belongs based on the first identification number set, and operates the first file in the second target storage node based on the operation request, wherein the identification number of the second target storage node is the same as the identification number of all attributes of the first file.

8. The method according to claim 7, characterized in that The first portal node and the first storage node are the same node, or the first portal node and the first storage node are different nodes.

9. The method according to claim 7 or 8, characterized in that: The second target portal node is a portal node of the first portal node ring, and the method further includes: The second target portal node, when determining, based on the first identification number set, that there is a third target portal node in the first node set to which the second target portal node belongs, sends the first identification number set and the operation request to the third target portal node, wherein the first node set includes portal nodes of multiple portal node rings including the first portal node ring, the third target portal node is a portal node in the first node set that has a mapping relationship with the first identification number set, and the third target portal node is a portal node of the second portal node ring; The third target portal node, when determining, based on the first identification number set, that there is a fourth target portal node in the second portal node ring, sends the first identification number set and the operation request to the fourth target portal node, wherein the fourth target portal node is a portal node in the second portal node ring that has a mapping relationship with the first identification number set; The fourth target portal node determines the third target storage node in the storage node ring to which the fourth target portal node belongs based on the first identification number set, and operates the first file in the third target storage node based on the operation request, wherein the identification number of the third target storage node is the same as the identification numbers of all attributes of the first file.

10. The method according to claim 9, characterized in that The first portal node and the second target portal node are the same node, or the first portal node and the second target portal node are different nodes.

11. The method according to any one of claims 6 to 10, characterized in that: The file management system further includes a first management node, and the first management node is used to manage and store metadata of the first file.

12. The method according to claim 11, characterized in that Before the first storage node obtains identification numbers of all attributes of the first file and the user's operation request on the first file, the method further includes: The first management node obtains the operation request; The first management node queries a second mapping table according to the path of the first file, and when it is determined that the second mapping table contains an identification number of a second storage node corresponding to the path of the first file, operates the first file in the second storage node based on the operation request, wherein the second mapping table includes a correspondence between the paths of a plurality of special files and the identification numbers of the storage nodes to which the plurality of special files belong, and the plurality of special files are files among the plurality of files whose operation time is later than the first historical time, or the plurality of special files are files among the plurality of files whose operation heat is higher than a heat threshold; The first storage node obtains identification numbers of all attributes of the first file and a user's operation request on the first file, including: The first storage node receives the identification number of all attributes of the first file and the operation request sent by the first management node when it is determined that the identification number of the second storage node corresponding to the path of the first file does not exist in the second mapping table.

13. The method according to claim 11 or 12, characterized in that: The first management node has a trusted execution environment, and the operations performed by the first management node in the method are performed in the trusted execution environment.

14. A file management device, characterized in that: The device is applied to any one of the plurality of storage nodes included in the first storage node ring, the plurality of storage nodes all have the first attribute, and the plurality of storage nodes have different identification numbers, and comprises: a first acquisition module and a storage module, The first acquisition module is used to acquire a first file, a first identification number set and a second identification number, wherein the first identification number set includes identification numbers of any partial attributes and identification numbers of all attributes of the first file, the second identification number is the identification number of the first attribute, and the first file and the attribute of the first file are both carried in the user's storage request; The storage module is used to store the first file to a first target storage node in the first storage node ring when it is determined that the second identification number exists in the first identification number set, wherein the identification number of the first target storage node is the same as the identification number of all attributes of the first file.

15. A file management device, characterized in that: The device is applied to any one of a plurality of storage nodes included in a first storage node ring, wherein the plurality of storage nodes have different identification numbers, and comprises: a second acquisition module and a processing module, The second acquisition module is used to acquire the identification number of all attributes of the first file and the operation request of the user on the first file, wherein the operation request carries the path of the first file, and the identification number of all attributes of the first file is obtained by querying a first mapping table, and the first mapping table is used to record the corresponding relationship between the paths of multiple files stored in the file management system and the identification numbers of all attributes of the multiple files, and the multiple files include the first file; The processing module is used to operate the first file in the first target storage node based on the operation request when it is determined that there is a first target storage node in the first storage node ring, wherein the identification number of the first target storage node is the same as the identification numbers of all attributes of the first file.

16. A file management system, characterized in that: include: a first storage node ring, wherein a plurality of storage nodes in the first storage node ring all have a first attribute, and the plurality of storage nodes have different identification numbers, A first storage node, used to obtain a first file, a first identification number set, and a second identification number, wherein the first storage node is any storage node in the first storage node ring, the first identification number set includes identification numbers of any partial attributes and identification numbers of all attributes of the first file, the second identification number is the identification number of the first attribute, and the first file and the attribute of the first file are both carried in the user's storage request; The first storage node is also used to store the first file to a first target storage node in the first storage node ring when it is determined that the second identification number exists in the first identification number set, wherein the identification number of the first target storage node is the same as the identification number of all attributes of the first file.

17. A file management system, characterized in that: include: a first storage node ring, wherein a plurality of storage nodes in the first storage node ring have different identification numbers; a first storage node, used to obtain an identification number of all attributes of a first file and an operation request of a user on the first file, wherein the first storage node is any storage node in the first storage node ring, the operation request carries a path of the first file, and the identification number of all attributes of the first file is obtained by querying a first mapping table, the first mapping table is used to record a correspondence between paths of multiple files stored in the file management system and identification numbers of all attributes of the multiple files, the multiple files including the first file; The first storage node is also used to operate the first file in the first target storage node based on the operation request when it is determined that there is a first target storage node in the first storage node ring, wherein the identification number of the first target storage node is the same as the identification numbers of all attributes of the first file.

18. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 13.

19. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 13.

20. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster performs the method according to any one of claims 1 to 13.