WO2025112466A1 - File extended attribute management method, file storage client, and apparatus - Google Patents
File extended attribute management method, file storage client, and apparatus Download PDFInfo
- Publication number
- WO2025112466A1 WO2025112466A1 PCT/CN2024/099953 CN2024099953W WO2025112466A1 WO 2025112466 A1 WO2025112466 A1 WO 2025112466A1 CN 2024099953 W CN2024099953 W CN 2024099953W WO 2025112466 A1 WO2025112466 A1 WO 2025112466A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- target
- file
- attribute
- node
- request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/172—Caching, prefetching or hoarding of files
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
Definitions
- the present application relates to the field of storage technology, and in particular to a file extension attribute management method, a file storage client, and a device.
- File storage is to store data in the form of files on file storage service nodes
- object storage is to store data in the form of objects on object storage service nodes. Since object storage has no directory and file hierarchy, object storage service nodes using object storage can store a large amount of data, which makes object storage more and more widely used.
- file ecosystem applications also called file applications
- file applications such as desktop cloud applications, media video editing applications, etc.
- the object storage system provides object storage-based file services. That is to say, file applications can access data stored in the form of objects on object storage service nodes through the file storage client of the object storage system.
- the present application provides a file extension attribute management method, a file storage client and a device, which can manage the file extension attributes of the file service provided by the object storage system, and help the object storage system provide more complete file services.
- a method for managing file extension attributes is provided, which is applied to a file storage client, wherein the file storage client runs on a Windows operating system, and the Windows operating system also provides a local file system, wherein a directory tree of the local file system includes a target node, wherein the target node is a file or a directory, and the file or the directory is stored in an object storage service node; the method includes: receiving an attribute setting instruction, wherein the attribute setting instruction indicates setting a target file extension attribute of the target node to a target state, wherein the target state includes a configured state or an unconfigured state; determining an attribute setting request based on the attribute setting instruction and a target interface provided by the object storage service node; wherein the interface provided by the object storage service node is used to indicate a format of the attribute setting request, and the attribute setting request is used to request setting a target file extension attribute of the target node to a target state; and sending an attribute setting request to the object storage service node to request the object storage service node
- the file storage client runs on the Windows operating system.
- the directory tree of the local file system provided by the Windows operating system includes a target node, which can be a file or a directory.
- the file or directory is stored on the object storage service node.
- the file storage client can determine the attribute setting request based on the content indicated by the attribute setting instruction and the target interface provided by the object storage service node, so as to request to set the target file extension attribute of the target node to the target state.
- the file storage client sends the attribute setting request to the object storage service node to request the object storage service node to set the target file extension attribute of the target node to the target state.
- the file storage client determines the attribute setting request through the attribute setting instruction and the format indicated by the target interface provided by the object storage service node, so as to convert the semantics of the file extension attributes (i.e., the attribute setting instruction) into the semantics of the object storage (i.e., the attribute setting request), so that the attribute setting request can use the semantics of the object storage to indicate the content indicated by the attribute setting instruction, so that the object storage service node can accurately identify the content requested by the attribute setting request, and thus manage the file extension attributes based on the content requested by the attribute setting request.
- the attribute setting request i.e., the attribute setting instruction
- the attribute setting request can use the semantics of the object storage to indicate the content indicated by the attribute setting instruction
- the object storage system can improve the semantics of object storage through the scheme of the present application, so that the semantics of object storage can be compatible with file extension attributes, thereby providing file extension attribute management services on the basis of providing file services, thereby realizing the provision of more complete file services, so that object storage can be better compatible with file applications.
- the attribute setting request includes a message content and an operation command, wherein the message content is used to indicate the extended attribute of the target file, and the operation command is used to indicate the target state. This helps to comply with the request representation of the target interface.
- the attribute setting request includes message content, and the message content is used to indicate the target file extended attribute and the target state. In this way, it is helpful to increase the diversity of the methods of indicating the target file extended attribute and the target state.
- the message content includes the value of the target file's extended attribute, and the value of the target file's extended attribute is the same as the value of the target file's extended attribute in the Windows operating system. This helps improve the semantic conversion between object storage semantics and file extended attribute semantics. Accuracy of the process.
- the method further includes: receiving a target instruction, the target instruction is used to instruct to perform a target operation on a target node; the target operation is related to a target file extension attribute; based on the state of the target file extension attribute, determining a permission check result of the target operation; the permission check result includes passing the check or failing the check; in the case where the permission check result is failing the check, returning response information based on the target instruction; the response information is used to indicate that the target operation is refused to be performed on the target node.
- the file storage client of the object storage system provides a function for implementing file extension attributes, such as implementing a read-only attribute, thereby helping the object storage system to provide a more complete file extension attribute management service.
- the method further includes: when the permission check result is passed, returning first response information based on the target instruction; the first response information is used to indicate that the target operation is allowed to be performed on the target node.
- the method when the target node is the first file, the method also includes: obtaining the first file based on the attribute setting instruction; performing the operation indicated by the attribute setting instruction on the first file to obtain the second file; sending a first storage request to the object storage service node, the first storage request being used to request storage of the second file; the first storage request includes the second file.
- the file storage client obtains the first file indicated by the attribute setting instruction and performs the operation indicated by the attribute setting instruction on the first file, thereby realizing the target file extension attribute for the first file, such as: realizing the encryption attribute, compression attribute, etc. for the first file.
- the object storage service node is provided with the data to be stored (i.e., the second file) that has no semantics related to the windows file extension attribute, thereby realizing that the object storage service node does not need to perform operations related to the semantics of the windows file extension attribute, such as: encryption operation, compression operation, etc.
- the method when the target node is the third file, the method further includes: receiving a storage instruction, the storage instruction is used to instruct to store the third file; the target file extension attribute of the third file is in a configured state; performing the operation indicated by the target file extension attribute on the third file to obtain a fourth file; sending a second storage request to the object storage service node, the second storage request is used to request the object storage service node to store the fourth file; the storage request includes the fourth file.
- the file storage client provides a function for implementing file extension attributes, such as: implementing encryption attributes, compression attributes, etc., thereby helping the object storage system to provide a more complete file extension attribute management service.
- the method further includes: receiving an attribute acquisition instruction, the attribute acquisition instruction being used to instruct to acquire the file extension attribute of the target node; and acquiring and returning the file extension attribute of the target node based on the attribute acquisition instruction.
- the file storage client of the object storage system provides a query function for the file extension attribute, thereby helping the object storage system to provide a more complete file extension attribute management service.
- the file storage client runs on the electronic device; based on the attribute acquisition instruction, the file extended attribute of the target node is acquired, including: based on the attribute acquisition instruction, acquiring the file extended attribute of the target node from the storage medium of the electronic device. In this way, the efficiency of acquiring the file extended attribute is improved.
- obtaining the file extension attribute of the target node based on the attribute obtaining instruction includes: obtaining the file extension attribute of the target node from the object storage service node based on the attribute obtaining instruction. This helps to improve the accuracy of the obtained file extension attribute.
- the method further includes: writing the file extension attributes of the target node obtained from the object storage service node into the storage medium of the electronic device. In this way, when the file extension attributes need to be obtained later, they can be obtained from the local storage medium, which helps to improve the efficiency of obtaining the file extension attributes later.
- the method further includes: receiving a metadata acquisition instruction, the metadata acquisition instruction is used to instruct to acquire metadata of the target node; based on the metadata acquisition instruction, acquiring and returning target metadata of the target node; the target metadata of the target node includes file extension attributes of the target node.
- the file extension attributes of the target node are provided at the same time, which helps to improve the integrity of the metadata of the target node.
- the file storage client runs on the electronic device; based on the metadata acquisition instruction, the target metadata of the target node is acquired, including: based on the metadata acquisition instruction, the target metadata of the target node is acquired from the storage medium of the electronic device. This helps to improve the efficiency of acquiring the target metadata.
- obtaining target metadata of the target node based on the metadata obtaining instruction includes: obtaining the target metadata of the target node from the object storage service node based on the metadata obtaining instruction. This helps to improve the accuracy of the target metadata.
- the method further includes: receiving a directory listing instruction, the directory listing instruction is used to instruct to list the target directory; based on the directory listing instruction, obtaining and returning target metadata of the target directory; the target metadata of the target directory includes file extension attributes of at least one file/subdirectory under the target directory.
- the file extension attributes of at least one file/subdirectory under the directory are also provided, which helps to improve the comprehensiveness of the listed directory.
- the file storage client runs on the electronic device; based on the directory listing instruction, the target metadata of the target directory is obtained, including: based on the directory listing instruction, the target metadata of the target directory is obtained from the storage medium of the electronic device. This helps to improve the efficiency of obtaining the target metadata.
- obtaining the target metadata of the target directory includes: based on the directory listing instruction command to obtain the target metadata of the target directory from the object storage service node. This helps to improve the accuracy of the target metadata.
- a file extension attribute management method is provided, which is applied to an object storage service node, where a target object is stored on the object storage service node, and the object storage service node is used to map the target object to a target node on a directory tree, where the target node is a file or a directory; the method includes: receiving an attribute setting request sent by a file storage client, where the format of the attribute setting request is determined according to a target interface provided by the object storage service node, where the attribute setting request is used to request that a target file extension attribute of the target node be set to a target state, where the target state includes a configured state or an unconfigured state; parsing the attribute setting request through the target interface to obtain the content requested by the attribute setting request; and the object storage service node sets the target file extension attribute of the target node to the target state based on the content requested by the attribute setting request.
- the object storage service node After the object storage service node receives the attribute setting request sent by the file storage client, it determines the content requested by the attribute setting request by parsing the attribute setting request, that is, sets the target file extension attribute of the target node to the target state, and thus sets the target file extension attribute of the target node to the target state based on the content requested by the attribute setting request, thereby completing the management of file extension attributes.
- the property setting request is determined according to the interface provided by the object storage service node, the property setting request indicates the requested content through the semantics of the object storage, so that the object storage service node can accurately identify the requested content of the property setting request, thereby ensuring the management of file extension attributes. Therefore, the object storage system can improve the semantics of object storage through the solution of the present application, so that the semantics of object storage can be compatible with file extension attributes, thereby providing file extension attribute management services on the basis of providing file services, and further providing more complete file services, so that object storage can be better compatible with file applications.
- the target file extension attribute of the target node is set to the target state based on the content requested by the attribute setting request, including: generating a target field of the target node based on the content requested by the attribute setting request; the target field of the target node is used to indicate that the target file extension attribute has been configured; based on the identifier of the target node, storing the target field of the target node.
- the object storage service node indicates that the target file extension attribute has been configured on the target node by storing the target field, that is, the state of the target file extension attribute is in the configured state, which helps to improve the accuracy of the state indication of the target file extension attribute.
- the target file extended attributes of the target node are set to the target state based on the content requested by the attribute setting request, including: deleting the target field of the target node based on the content requested by the attribute setting request; the target field of the target node is used to indicate that the target file extended attributes have been configured.
- the object storage service node indicates that the target node is not configured with the target file extension attribute by deleting the target field, that is, by not storing the target field. This helps to improve the accuracy of the status indication of the target file extension attribute.
- the object storage service node stores a target string, and the target string is used to indicate the state of the file extension attribute of the target node; based on the content requested by the attribute setting request, the target file extension attribute of the target node is set to the target state, including: when the target state is the configured state, based on the content requested by the attribute setting request, the target bit of the target string is set to a first value; the target bit is used to indicate the target file extension attribute, and the first value is used to indicate the configured state; when the target state is the unconfigured state, based on the content requested by the attribute setting request, the target bit of the target string is set to a second value; the second value is used to indicate the unconfigured state.
- different file extension attributes are indicated by different bits of a string, and different states are indicated by values, which helps to reduce the storage space occupied by the file extension attributes for related fields.
- the property setting request includes a message content and an operation command
- the message content is used to indicate the target file extended attribute
- the operation command is used to indicate the target state.
- the property setting request includes a message content
- the message content is used to indicate the target file extended attribute and the target state.
- the property setting request includes the value of the target file extension attribute; the object storage service node sets the target file extension attribute of the target node to the target state based on the content requested by the property setting request, including: determining the value of the target file extension attribute based on the property setting request; when the value of the target file extension attribute is the same as the target value, setting the target file extension attribute of the target node to the target state based on the content requested by the property setting request; the target value is the value of the target file extension attribute in the Windows operating system.
- verifying the value of the target file extension attribute it helps to improve the accuracy of subsequent file extension attribute management.
- the method further includes: when the value of the target file extension attribute is different from the target value, returning a prompt message to the file storage client, the prompt message is used to indicate that the value of the target file extension attribute is wrong. In this way, it is helpful for the file storage client to adjust the generation logic of the attribute setting request in time to avoid subsequent wrong requests.
- the method further includes: receiving an attribute acquisition request sent by a file storage client, the attribute acquisition request being used to request to acquire file extended attributes of a target node; and returning the file extended attributes of the target node to the file storage client based on the attribute acquisition request.
- the object storage service node provides a query service for file extended attributes.
- the method further includes: receiving a metadata acquisition request sent by the file storage client, the metadata acquisition request being used to request the acquisition of metadata of the target node; and returning the target metadata of the target node to the file storage client based on the metadata acquisition request.
- the target metadata of the target node includes the file extension attributes of the target node. In this way, when requesting to obtain the metadata of the target node, the file extension attributes of the target node are provided at the same time, which helps to improve the integrity of the metadata of the target node.
- the method when the target node is a target directory, the method further includes: receiving a directory listing request sent by a file storage client, the directory listing request being used to request metadata of the target directory; returning target metadata of the target directory to the file storage client based on the directory listing request; the target metadata of the target directory including file extension attributes of at least one file/subdirectory under the target directory.
- the file extension attributes of at least one file/subdirectory under the target directory are provided at the same time, which helps to improve the comprehensiveness of the listed directory.
- the method further includes: receiving a deletion request sent by the file storage client, the deletion request being used to request deletion of metadata of the target node; and deleting the file extension attribute of the target node based on the deletion request.
- the file extension attribute of the target node is also deleted, which helps to completely clear the relevant data of the target node, thereby helping to avoid useless data occupying storage space.
- a file extension attribute management method is provided, which is used in an object storage system.
- the object storage system includes an object storage service node and a file storage client.
- the object storage service node stores a target object, and the object storage service node is used to map the target object to a target node on a directory tree.
- the file storage client runs on a Windows operating system, and the Windows operating system provides a local file system.
- the directory tree of the local file system includes a target node, and the target node is a file or a directory.
- the method comprises: a file storage client receives an attribute setting instruction, the attribute setting instruction indicates setting a target file extension attribute of a target node to a target state; the target state comprises a configured state or an unconfigured state; the file storage client determines an attribute setting request based on the attribute setting instruction and a target interface provided by an object storage service node; the target interface is used to indicate a format of the attribute setting request, and the attribute setting request is used to request setting a target file extension attribute of a target node to a target state; the file storage client sends an attribute setting request to the object storage service node to request the object storage service node to set the target file extension attribute of the target node to a target state; the object storage service node receives the attribute setting request sent by the file storage client; the object storage service node parses the attribute setting request through the target interface to obtain the content requested by the attribute setting request; the object storage service node sets the target file extension attribute of the target node to a target state based on the content requested by the attribute setting request.
- the file storage client can also be used to execute any possible implementation method provided in the first aspect above
- the object storage service node can also be used to execute any possible implementation method provided in the second aspect above.
- a file storage client comprising: a functional module for executing any one of the methods provided in the first aspect, the actions executed by each functional module are implemented by hardware execution or by hardware execution of corresponding software.
- the file storage client may include a receiving module, an attribute management module and a sending module; the receiving module is used to receive an attribute setting instruction, the attribute setting instruction indicates that the target file extension attribute of the target node is set to a target state, the target state includes a configured state or an unconfigured state; the attribute management module is used to determine an attribute setting request based on the attribute setting instruction and a target interface provided by the object storage service node; the target interface provided by the object storage service node is used to indicate the format of the attribute setting request, the attribute setting request is used to request that the target file extension attribute of the target node be set to a target state; the sending module is used to send an attribute setting request to the object storage service node to request the object storage service node to set the target file extension attribute of the target no
- a file extension attribute management device comprising: a functional module for executing any one of the methods provided in the second aspect, the actions performed by each functional module are executed by hardware or by hardware executing corresponding software.
- the file extension attribute management device may include a receiving module, a parsing module and a storage module; the receiving module is used to receive an attribute setting request sent by a file storage client, the format of the attribute setting request is determined according to a target interface provided by an object storage service node, the attribute setting request is used to request that the target file extension attribute of the target node be set to a target state, the target state including a configured state or an unconfigured state; the parsing module is used to parse the attribute setting request through the target interface to obtain the content requested by the attribute setting request; the management module is used to set the target file extension attribute of the target node to a target state based on the content requested by the attribute setting request.
- an object storage system which includes a file storage client and an object storage service node.
- a target object is stored on the object storage service node, and the object storage service node is used to map the target object to a target node on a directory tree;
- the file storage client runs on a Windows operating system, and the Windows operating system provides a local file system, and the directory tree of the local file system includes a target node, and the target node is a file or a directory.
- the file storage client is used to receive an attribute setting instruction, and the attribute setting instruction indicates that the target file extension attribute of the target node is set to a target state; the target state includes a configured state or an unconfigured state; the file storage client is also used to determine an attribute setting request based on the attribute setting instruction and a target interface provided by the object storage service node; the target interface of the object storage service node is used to indicate the format of the attribute setting request, and the attribute setting request is used to request that the target file extension attribute of the target node be set to a target state; the file storage client is also used to send an attribute setting request to the object storage service node to request the object storage service node to set the target file extension attribute of the target node to a target state; the object storage service node is used to receive an attribute setting request sent by the file storage client of the object storage system; the object storage service node parses the attribute setting request through the target interface to obtain the content requested by the attribute setting request; The object storage service node is used to set the target file extended attribute of the target
- the file storage client can also be used to execute any possible implementation method provided in the first aspect above
- the object storage service node can also be used to execute any possible implementation method provided in the second aspect above.
- a processor is provided, which is used to execute the steps of any one of the methods provided in the first aspect.
- a processor is provided, which is used to execute the steps of any one of the methods provided in the second aspect.
- a chip comprising: a processor and a power supply circuit; the power supply circuit is used to supply power to the chip, and the processor is used to execute the steps of any one of the methods provided in the first aspect above.
- a chip comprising: a processor and a power supply circuit; the power supply circuit is used to supply power to the chip, and the processor is used to execute the steps of any one of the methods provided in the second aspect above.
- an electronic device comprising: a processor, a memory, and a computer program/instructions stored in the memory; the processor executes the computer program/instructions to enable the electronic device to implement the steps of any one of the methods provided in the first aspect above.
- a computing device comprising a processor, a memory, and a computer program/instructions stored in the memory; the processor executes the computer program/instructions so that the computing device implements the steps of any one of the methods provided in the second aspect above.
- a computing device cluster comprising: at least one computing device, each computing device in the at least one computing device comprises a processor and a memory; each computing device comprises a processor, a memory and a computer program/instructions stored on the memory; the processor executes the computer program/instructions so that the computing device cluster implements the steps of any one of the methods provided in the second aspect above.
- a computer program product comprising: a computer program/instructions; when the computer program/instructions are executed by a processor of an electronic device, the steps of any one of the methods provided in the first aspect are implemented.
- a computer program product comprising: a computer program/instructions; when the computer program/instructions are executed by a processor of a computing device, the steps of any one of the methods provided in the second aspect are implemented.
- a computer-readable storage medium on which a computer program/instruction is stored.
- the computer program/instruction is executed by a processor of an electronic device, the steps of any one of the methods provided in the first aspect are implemented.
- a computer-readable storage medium on which a computer program/instruction is stored.
- the computer program/instruction is executed by a processor of a computing device, the steps of any one of the methods provided in the second aspect are implemented.
- the technical effects brought about by any design method in the second aspect to the seventeenth aspect can refer to the technical effects brought about by the different design methods in the above-mentioned first aspect, and will not be repeated here.
- FIG1 is a schematic diagram of a system architecture provided in an embodiment of the present application.
- FIG2 is a schematic diagram of another system architecture provided in an embodiment of the present application.
- FIG3 is a flow chart of a method for managing file extension attributes provided by an embodiment of the present application.
- FIG4 is a schematic diagram of a property interface provided in an embodiment of the present application.
- FIG5 is a framework diagram of setting file extension attributes provided by an embodiment of the present application.
- FIG6 is a schematic diagram of setting file extension attributes provided by an embodiment of the present application.
- FIG7 is a flowchart of another file extension attribute management method provided in an embodiment of the present application.
- FIG8 is a flowchart of another file extension attribute management method provided in an embodiment of the present application.
- FIG9 is a framework diagram of obtaining file extension attributes provided by an embodiment of the present application.
- FIG10 is a schematic diagram of obtaining file extension attributes provided by an embodiment of the present application.
- FIG11 is a schematic diagram of obtaining metadata of a file provided in an embodiment of the present application.
- FIG12 is a schematic diagram of obtaining metadata of a directory provided in an embodiment of the present application.
- FIG13 is a framework diagram of a directory listing provided in an embodiment of the present application.
- FIG14 is a flowchart of another file extension attribute management method provided in an embodiment of the present application.
- FIG15 is a schematic diagram of implementing file extension attributes provided by an embodiment of the present application.
- FIG16 is a flowchart of another file extension attribute management method provided in an embodiment of the present application.
- FIG17 is a flowchart of another file extension attribute management method provided in an embodiment of the present application.
- FIG18 is a schematic diagram of another method for implementing file extension attributes provided in an embodiment of the present application.
- FIG19 is a schematic diagram of a file storage client provided in an embodiment of the present application.
- FIG20 is a schematic diagram of a file extension attribute management device provided in an embodiment of the present application.
- FIG21 is a schematic diagram of a computing device provided in an embodiment of the present application.
- FIG22 is a schematic diagram of a computing device cluster provided in an embodiment of the present application.
- FIG23 is a schematic diagram of a connection of a computing device cluster provided in an embodiment of the present application.
- FIG. 24 is a schematic diagram of an electronic device provided in an embodiment of the present application.
- At least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple.
- the words “first”, “second”, etc. are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that the words “first”, “second”, etc. do not limit the quantity and execution order, and the words “first”, “second”, etc. do not necessarily limit the difference.
- words such as “exemplary” or “for example” are used to indicate examples, illustrations or descriptions. Any embodiment or design described as “exemplary” or “for example” in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as “exemplary” or “for example” is intended to present related concepts in a concrete manner for ease of understanding.
- File storage service It stores data in the form of files on file storage service nodes.
- File storage service nodes provide a multi-level tree directory storage method based on the file system.
- File storage service nodes are used to provide operations that conform to file semantics (i.e., file services), such as: reading files, writing files, creating files, deleting files, opening files, closing files, renaming files, etc.
- Object storage service stores data in the form of objects in object storage nodes.
- Object storage nodes provide a flat storage method based on buckets and objects. All objects in a bucket are at the same logical level, removing the multi-level tree directory structure in the file storage service node.
- Object storage nodes are used to provide operations that conform to object semantics (i.e. object services), such as uploading objects, downloading objects, listing each object in a bucket, copying objects, moving objects, deleting objects, deleting each object in a bucket, etc.
- Bucket Also referred to as a bucket, it is a container for storing objects on an object storage node. Each bucket has its own storage category, access rights, region, and other attributes.
- Object It is the basic unit of data storage on an object storage node.
- An object is a collection of file data and its related attribute information (also called metadata).
- An object can include key value, metadata and data.
- Metadata is the description information of the object. Metadata includes user metadata and system metadata. User metadata is specified when the user uploads the object, and is the user-defined object description information. System metadata is automatically generated by the object storage service node. Data is the data content of the object, that is, the data of the file, which can also be called user data.
- File system It is the software in the operating system responsible for managing and storing file information.
- the file system includes the basic file system and several file subsystems. Users can remove and install file subsystems as needed.
- the target tree provided by the file system may include the root directory, subdirectories, and files under the subdirectories.
- the root directory or subdirectory may include files and the next-level subdirectories.
- User space and kernel space The virtual memory of electronic devices can be divided into user space and kernel space.
- User space is used to run user applications, and kernel space is used to run the kernel of the operating system. Among them, user space and kernel space are isolated from each other. Kernel space can execute any command and call all resources of the operating system. User space can only perform simple operations and cannot directly call the resources of the operating system. It needs to go through kernel space to call the resources of the operating system.
- File system in user space is a component of the operating system and runs in the user space. It should be noted that in the embodiment of the present application, FUSE can be a component of the Windows operating system.
- File extended attributes are file constants provided by the file system and are used to indicate certain properties of files or directories in the file system.
- the file extension attribute may refer to the file constant provided by the local file system in the Windows operating system, which will not be described in detail later.
- File storage client used to interact with the object storage service node, such as sending requests to the object storage service node and receiving response information returned by the object storage service node.
- the file storage client of the object storage system can provide an interface for the Windows operating system, and the Windows operating system can interact with the file storage client through the interface provided by the file storage client.
- Transparent transmission refers to the transmission of data packets from the source address to the destination address without any processing of the data content during the data transmission process. In other words, the business content in the data packet will not be changed, and its original format and instructions will be maintained, ensuring the integrity and accuracy of data transmission.
- transparent transmission may refer to the file storage client of the object storage system transmitting the file extension attributes to the operating system without performing related operations to implement the file extension attributes.
- object storage has been proposed in related technologies to facilitate the storage of unstructured data such as movies, office documents, and images.
- Object storage uses a flat address space to store data. This address space does not have a hierarchy of directories and files. Therefore, an object storage service node can store a large amount of data.
- object storage systems including object storage service nodes and file storage clients
- file services are built on the basis of object storage.
- object storage systems due to the significant difference between the file semantics used by file extension attributes and the semantics of object storage, the file services provided by object storage systems cannot manage file extension attributes.
- an embodiment of the present application provides a file extension attribute management method, which is applied to a file storage client.
- the file storage client After receiving a management instruction for a file extension attribute (such as an attribute setting instruction), the file storage client can determine an attribute setting request based on the content indicated by the attribute setting instruction and the target interface provided by the object storage service node, for requesting the management content indicated by the attribute setting instruction, such as requesting to set the target file extension attribute of the target node to a target state.
- the file storage client sends an attribute setting request to the object storage service node to request the object storage service node to set the target file extension attribute of the target node to a target state.
- the file storage client determines the attribute setting request through the attribute setting instruction and the format indicated by the target interface provided by the object storage service node
- the semantics of the file extension attribute i.e., the attribute setting instruction
- the object storage i.e., the attribute setting request
- the attribute setting request can use the semantics of the object storage to indicate the content indicated by the attribute setting instruction, so that the object storage service node can accurately identify the content requested by the attribute setting request, and thus manage the file extension attribute based on the content requested by the attribute setting request.
- the object storage system can improve the semantics of object storage through the scheme of the present application, so that the semantics of object storage can be compatible with the semantics of file extension attributes, thereby providing file extension attribute management services on the basis of providing file services, and then providing more complete file services, so that object storage can be better compatible with file applications.
- the file extension attribute management method provided in the embodiment of the present application is applicable to an object storage system.
- the object storage system includes an object storage service node (Server) and a file storage client (Client), and the file storage client and the object storage service node can communicate.
- the object storage system can provide file services and object services.
- the object storage service node may include at least one computing device.
- At least one may be one, or may be multiple, where multiple refers to two or more, which will not be repeated later.
- the computing device may be a network device or a terminal device.
- the network device may include a server, etc.
- the server may be a physical server, or two or more physical servers with different responsibilities, and the various functions of the server are realized by mutual cooperation.
- the server may be a blade server, a high-density server, a rack server or a tower server, etc.
- the terminal device may include an ultra-mobile personal computer (UMPC), a laptop, a netbook, a desktop computer, an all-in-one computer, etc.
- UMPC ultra-mobile personal computer
- the object storage service node may also include a storage device, which may include one or more storage buckets, and the one or more storage buckets are used to store objects.
- the storage device may include a hard disk drive (HDD), a solid state disk/drive (SSD), etc. It should be noted that the form of the storage device in the embodiment of the present application is not limited, and the above is only an exemplary description. In addition, the number of storage devices in the embodiment of the present application is not limited.
- HDD hard disk drive
- SSD solid state disk/drive
- the storage device may be arranged on the computing device, or may be arranged independently of the computing device.
- the storage device and the computing device may communicate.
- the object storage service node stores data through storage buckets, that is, the object storage service node stores data in the form of objects in the storage bucket.
- the object storage service node In order to make it easier for users to manage data in buckets, the object storage service node also provides a way to simulate folders. By adding "/" to the name of the object, the object is simulated as a folder on the OBS management console. The object name is abc.jpg. If you need to simulate object 0 as a file in a folder, you can modify the object identifier of object 0 to test/abc.jpg. At this time, "test” is the simulated folder.
- the object identifiers obtained are separated by "/”. If there is content after the last "/”, it represents a file, that is, the object to which the object identifier belongs indicates a file. If there is no content after the last "/”, it represents a folder path, that is, the object to which the object identifier belongs indicates a simulated folder. For example, the object identifier of object 1 is test/, so object 1 represents a folder path.
- the object identifier when an object is simulated as a folder, the object identifier includes the folder path and the object name. In addition, when an object is not simulated as a folder, the object identifier can be the object name.
- the object storage service node can map objects in the storage bucket to nodes on the directory tree through a hierarchical namespace.
- a node can be a file or a directory
- an object including user data can be mapped to a file
- a simulated folder i.e., an object that does not include user data
- the object storage service node can provide file services.
- the file storage client can be installed on the user's electronic device, and the electronic device can communicate with the object storage service node through the file storage client.
- the user can rent a cloud storage service from a cloud service provider through the file storage client, such as renting a storage bucket, and then the user can store data in the storage bucket through the file storage client.
- electronic devices can communicate with object storage service nodes through file storage clients, thereby using the object storage system to provide file services, such as accessing files, managing file extension attributes, etc.
- the file storage client can also be called a file system client (SFC).
- SFC file system client
- the electronic device may be a terminal device or a network device.
- the terminal device may include a mobile phone, a tablet computer, a handheld computer, a PC, a cellular phone, a personal digital assistant (PDA), a wearable device (such as a smart watch, a smart bracelet, etc.), a smart home device (such as a TV, etc.), a car machine (such as a car computer, etc.), a smart screen, a game console, a headset, an AI speaker, an augmented reality (AR)/virtual reality (VR) device, an ultra-mobile personal computer (UMPC), a laptop, a netbook, a desktop computer or an all-in-one computer, etc.
- the network device may include a server, etc.
- the server may be a physical server, or it may be two or more physical servers that share different responsibilities and cooperate with each other to realize the various functions of the server.
- the server may be a blade server, a high-density server, a rack server or a tower server, etc.
- FIG1 it is a schematic diagram of a system architecture provided in an embodiment of the present application.
- the system architecture may include an object storage service node, a file storage client, and an electronic device, wherein the file storage client may be installed on the electronic device.
- Cloud service providers provide cloud services (such as object services, file services, file extension attribute management services, etc.) to users through object storage service nodes.
- Cloud service tenants i.e. users
- the storage device of the object storage service node may include storage bucket 1, ..., storage bucket N, where N is a positive integer greater than 1.
- the user may rent a storage bucket (e.g., rent storage bucket 1) from the cloud service provider.
- the data to be stored e.g., data 0-data 4
- the object storage service node After receiving data 0-data 4, the object storage service node stores data 0-data 4 in the form of an object (i.e., object 0-object 4) in storage bucket 1.
- FIG2 it is a schematic diagram of another system architecture provided in an embodiment of the present application.
- the electronic device is installed with a Windows operating system and a file storage client, and the file storage client runs on the Windows operating system.
- the Windows operating system can call an interface provided by the file storage client to interact with the file storage client.
- window in the embodiment of the present application.
- “window” can also be represented by “Window”, which will not be repeated later.
- the file storage client Since the file storage client is installed on an electronic device running the Windows operating system, the file storage client may also be referred to as a Windows file storage client (client).
- client Windows file storage client
- the Windows operating system also provides a local file system.
- the local file system is used to provide a data storage mechanism based on files and directories.
- the target tree provided by the local file system may include a root directory, a subdirectory, and files under the subdirectory, and the root directory or subdirectory may include files and next-level subdirectories.
- the directory tree of the local file system may include multiple nodes, each of which may be a file or a directory. Files or directories are stored in buckets on Object Storage service nodes.
- the file storage client can interact with the object storage service node through the interface provided by the object storage service node. On this basis, the file storage client can transmit storage data unrelated to Windows semantics to the object storage service node.
- the file storage client performs a certain operation, which can be considered as the electronic device performing a certain operation during the process of running the file storage client, or the electronic device performing a certain operation through the file storage client, which will not be repeated later.
- the interface provided by the object storage service node can be a representational state transfer (REST) application programming interface (API).
- REST representational state transfer
- API application programming interface
- the Windows operating system includes a FUSE module, and the FUSE module can be used to interact with the file storage client.
- the Windows operating system can interact with the file storage client through the FUSE module.
- the file storage client can provide the Windows operating system with data that conforms to Windows semantics.
- the FUSE module performs a certain operation, which can be considered as the electronic device performing a certain operation during the process of running the FUSE module, or the electronic device performing a certain operation through the FUSE module, which will not be repeated later.
- the file storage client can interact with Windows through the FUSE module, the file storage client can be considered to be a FUSE-based file storage client.
- the file storage client can also be used to manage file extension attributes, such as: configuring file extension attributes for nodes on the directory tree, canceling file extension attributes that have been configured for nodes on the directory, etc.
- the file storage client can also be used to implement file extension attributes, such as intercepting write operations performed on a node when a node is configured with a read-only attribute.
- the file storage client can perform encryption operations, compression operations and other operations related to Windows semantics on the file, and obtain encrypted files and compressed files, thereby providing storage data unrelated to Windows semantics for the object storage service node. Afterwards, the file storage client transmits the encrypted files and compressed files to the object storage service node. After receiving the encrypted files and compressed files, the object storage service node can directly store the encrypted files and compressed files without having to care about the Windows semantics of the storage data.
- the file storage client can decrypt the encrypted file or decompress the compressed file to obtain the decrypted file or decompressed file. Afterwards, the file storage client can transfer the decrypted file or decompressed file to the operating system, which will display it to the user or transfer it to the application for use.
- the file storage client can manage and logically implement the specific meanings represented by the file extension attributes.
- the file storage client may include an attribute management module, and the attribute management module may be used to manage file extension attributes.
- the file storage client may map the management instruction of the file extension attribute (eg, attribute setting instruction) into an attribute setting request through the attribute management module, and send the attribute setting request to the object storage service node to request to manage the file extension attribute.
- the management instruction of the file extension attribute eg, attribute setting instruction
- the file storage client may include an attribute implementation module, which may be used to implement file extension attributes.
- the file storage client may implement the read-only attribute, encryption attribute, compression attribute, etc. of the file through the attribute implementation module.
- the functions implemented by the attribute management module and the functions implemented by the attribute implementation module can also be implemented by one module, and this is not limited in the embodiments of the present application.
- the object storage service node is configured with a parsing module, which can be used to implement the parsing of attribute setting requests to determine the management method of file extension attributes based on the content requested by the attribute setting request, such as: setting the target file extension attribute of the target node to the target state, etc.
- an operation performed by the parsing module can be considered as an operation performed in the process of the object storage service node running the parsing module, or the object storage service node performs a certain operation through the parsing module, which will not be repeated later.
- the file extended attributes managed by the file storage client may include: read-only attribute, hidden attribute, system attribute, directory attribute, archive attribute, device driver installation attribute, normal attribute, temporary attribute, sparse file attribute, reanalysis point attribute, compression attribute, offline attribute, no content index attribute, encryption attribute, integrity stream attribute, virtual reality attribute, no erase data attribute, custom extended attribute, fixed attribute, unfixed attribute, recall open attribute, call data access attribute, etc.
- the object storage service node provides a business interface and a management interface.
- the business interface is used to access objects stored on the object storage service node
- the management interface is used to manage file extension attributes of objects stored on the object storage service node.
- the file storage client can perform read and write operations on objects stored on the object storage service node through the business interface.
- the file extension attributes of objects stored on the object storage service node can also be managed through the management interface.
- the object storage service node also stores metadata of the object.
- the object storage service node can parse the attribute setting request through the parsing module to determine the management method of the file extension attribute, such as generating a target field, modifying the value of the target string, etc. Used to indicate the status of file extension attributes, etc., wherein the target field and target string can be stored in the metadata of the object to facilitate the permanent storage of file extension attributes.
- the embodiment of the present application will be divided into three parts to exemplarily introduce the scheme of the file extension attribute management method.
- the first part in conjunction with Figures 3 to 7, introduces a solution for setting file extension attributes of a file or directory, such as: configuring at least one file extension attribute for a target node, canceling at least one file extension attribute that has been configured for a target node, etc.
- the second part in conjunction with FIG. 8 to FIG. 13 , introduces a solution for querying file extension attributes of a file or directory, such as querying at least one file extension attribute of a target node.
- the third part in conjunction with FIG. 14 to FIG. 18 , introduces a solution for implementing file extension attributes of a file or directory, such as: implementing at least one file extension attribute of a target node.
- Fig. 3 is a flow chart of a method for managing file extension attributes according to an exemplary embodiment.
- the method for managing file extension attributes may include the following steps 301-303.
- step in the embodiments of the present application can be abbreviated as "S” and will not be repeated later.
- an object storage service node stores multiple objects.
- the multiple objects may include a target object, and the target object may be any one of the multiple objects.
- an object may be used to indicate a file or a folder.
- the object may include user data, metadata, and an object identifier (ID).
- ID object identifier
- the object may include metadata and an object identifier.
- the object storage service node maps multiple objects stored in the bucket to multiple nodes on the directory tree.
- the multiple nodes include a target node, which is a node mapped based on the target object.
- node when a node is a file, the node may also be called a file node.
- a node when a node is a directory, the node may also be called a directory node.
- an object used to indicate a file will be mapped to a file node on the directory tree
- an object used to indicate a folder will be mapped to a directory node on the directory tree
- an object storage service node stores a mapping relationship between multiple objects and multiple nodes.
- There is a one-to-one correspondence between multiple objects and multiple nodes that is, there is a mapping relationship between an object and the node to which the object is mapped.
- the following describes the relationship between nodes and objects by taking the target element stored on the object storage service node as an example.
- the object storage service node stores the target element in the form of an object in a storage bucket, and the target element can be user data or a simulated folder.
- the target data can be called a target object.
- the target data is called a target node.
- the target node and the target object with a mapping relationship point to the same element (i.e., the target element).
- the following uses a target object and a target node mapped to the target object as an example to exemplify the file extension attribute management method provided by the embodiment of the present application, wherein the identifier of the target object and the identifier of the target node are both target identifiers.
- the representation of the target identifier can be a Uniform Resource Identifier (URI), a string, etc., which is not limited in the embodiments of the present application.
- URI Uniform Resource Identifier
- a Window operating system and a file storage client are installed on the electronic device.
- the Window operating system can interact with the file storage client through a FUSE module, and the file storage client can interact with the object storage service node through an interface provided by the object storage service node.
- Step 301 The file storage client receives an attribute setting instruction, which indicates setting the target file extension attribute of the target node to a target state, wherein the target state includes a configured state or an unconfigured state.
- setting the target file extended attribute to the configured state can be considered as configuring the target file extended attribute for the target node
- setting the target file extended attribute to the unconfigured state can be considered as canceling the target file extended attribute configured for the target node.
- the attribute setting instruction indicates the target node.
- the attribute setting instruction may include the identifier of the target node, the path of the target node, etc., so as to indicate the target node. This helps to avoid the file storage client setting the file expansion of the non-target node.
- the extended attributes help ensure the accuracy of subsequent operations performed by the file storage client.
- the attribute setting instruction indicates the target file extended attribute.
- the attribute setting instruction may include the identifier of the target file extended attribute, the name of the target file extended attribute, etc., so as to indicate the target file extended attribute. In this way, it is helpful to avoid the file storage client from managing non-target file extended attributes, thereby helping to ensure the accuracy of subsequent operations performed by the file storage client.
- the target file extended attributes may include: at least one of: read-only attribute, hidden attribute, system attribute, directory attribute, archive attribute, device driver installation attribute, normal attribute, temporary attribute, sparse file extension attribute, reanalysis point attribute, compression attribute, offline attribute, no content index attribute, encryption attribute, integrity stream attribute, virtual reality attribute, no erase data attribute, custom extended attribute, fixed attribute, unfixed attribute, recall open attribute, and call data access attribute.
- the target file extended attribute refers to a type of attribute, i.e., each file extended attribute indicated by the attribute setting instruction. Since the attribute setting instruction can indicate setting one or more file extended attributes at the same time, the target file extended attribute can also refer to one or more file extended attributes, that is, one or more file extended attributes can be called the target file extended attribute.
- the attribute setting instruction may indicate setting file extended attributes such as read-only attribute, hidden attribute, encrypted attribute, compressed attribute, etc.
- the target file extended attributes may include read-only attribute, hidden attribute, encrypted attribute, compressed attribute, etc.
- the read-only attribute, hidden attribute, encrypted attribute, compressed attribute, etc. may all be referred to as target file extended attributes.
- multiple file extension attributes can be indicated by setting the attribute setting instruction, that is, multiple file extension attributes are used as target file extension attributes. In this way, it is possible to set multiple file extension attributes at the same time, which helps to improve the setting efficiency of file extension attributes and further helps to improve the user experience.
- the attribute setting instruction indicates the target state, which helps to avoid the file storage client from setting a non-target state, thereby helping to ensure the accuracy of subsequent operations performed by the file storage client.
- the target state of each file extension attribute in the multiple file extension attributes can be different, or can also be the same.
- the target states of different target file extension attributes can be the same, or can also be different. In this way, even file extension attributes with different target states can be set through the same instruction, thereby helping to improve the setting efficiency of file extension attributes.
- the attribute setting instruction indicates the target file extended attributes such as read-only attribute, hidden attribute, encryption attribute, and compression attribute.
- the attribute setting instruction also indicates setting the read-only attribute to a configured state, the hidden attribute to an unconfigured state, the encryption attribute to a configured state, and the compression attribute to a configured state.
- the target state of the read-only attribute is a configured state
- the target state of the hidden attribute is an unconfigured state
- the target state of the encryption attribute is a configured state
- the target state of the compression attribute is a configured state.
- the attribute setting instruction includes multiple situations, and the following is an exemplary introduction through situation 1 to situation 2.
- Case 1 The property setting instruction is a user-triggered instruction.
- the user may directly instruct to set the target file extended attribute of the target node to the target state.
- the electronic device displays the property interface of the target node, and the property interface indicates a read-only property and a hidden property.
- the box on the left side of the read-only property is not selected, so the current state of the read-only property is an unconfigured state, and the box on the left side of the hidden property is selected, so the current state of the hidden property is a configured state.
- Example 1 when the user selects the box on the left side of the read-only attribute through the electronic device, the electronic device responds to the user's trigger operation (i.e., selecting the box) and sends a property setting instruction to the file storage client, where the property setting instruction instructs the read-only attribute (i.e., the target file extended attribute) to be set to a configured state (i.e., the target state).
- the user's trigger operation i.e., selecting the box
- a property setting instruction instructs the read-only attribute (i.e., the target file extended attribute) to be set to a configured state (i.e., the target state).
- Example 2 when the user unchecks the box on the left side of the hidden attribute through the electronic device, the electronic device responds to the user's trigger operation (i.e., unchecking the box) and sends a property setting instruction to the file storage client, where the property setting instruction instructs to set the hidden attribute (i.e., the target file extended attribute) to an unconfigured state (i.e., the target state).
- the electronic device responds to the user's trigger operation (i.e., unchecking the box) and sends a property setting instruction to the file storage client, where the property setting instruction instructs to set the hidden attribute (i.e., the target file extended attribute) to an unconfigured state (i.e., the target state).
- the electronic device when a user selects the solution on the left side of the read-only attribute and unselects the solution on the left side of the hidden attribute through an electronic device, the electronic device responds to the user's trigger operation and sends an attribute setting instruction to the file storage client, wherein the attribute setting instruction indicates that the read-only attribute is set to a configured state and the hidden attribute is set to an unconfigured state.
- the user instructs to perform a first operation on the target node, thereby instructing to set the target file extension attribute of the target node to a target state, wherein the first operation is related to the target file extension attribute.
- Example 3 The user instructs the encryption of the target node through the electronic device.
- the electronic device responds to the user's trigger operation and sends an encryption instruction (i.e., an attribute setting instruction) to the file storage client.
- the file storage client After receiving the encryption instruction, the file storage client performs an encryption operation on the target node and sets the encryption attribute of the target node (i.e., the target file extended attribute) to the configured state (i.e., the target state).
- the encryption instruction not only instructs the encryption of the target node, but also instructs the encryption attribute of the target node to be set to the configured state.
- Example 4 The user instructs the electronic device to compress the target node.
- the electronic device responds to the user's trigger operation and sends a compression instruction (i.e., an attribute setting instruction) to the file storage client.
- a compression instruction i.e., an attribute setting instruction
- the file storage client After receiving the compression instruction, the file storage client performs a compression operation on the target node and sets the compression attribute of the target node (i.e., the target file extension attribute) to the configured state (i.e., the target state).
- the compression instruction not only instructs the target node to be compressed, but also instructs the target node to be set to the configured state.
- the Windows operating system running on the electronic device sends an attribute setting instruction to a file storage client to instruct the file storage client to set the target file extended attribute of the target node to a target state.
- the operating system performs a certain operation, which can be considered as the electronic device performing a certain operation during the process of running the operating system, or the electronic device performing a certain operation through the operating system, which will not be further described later.
- the attribute setting instruction can be a user-triggered instruction, so that the user can set file extension attributes for different nodes, thereby helping to improve the user experience.
- Case 2 The property setting instruction is a command triggered by the target application.
- the target application can send a setting instruction to the operating system to instruct the target file extension attribute of the target node to be set to a target state.
- the operating system sends an attribute setting instruction to the file storage client to instruct the file storage client to set the target file extension attribute of the target node to a target state.
- the target application performs a certain operation, which can be considered as the electronic device performing a certain operation during the process of running the target application, or the electronic device performing a certain operation through the target application, which will not be further described later.
- the target application may be a file application such as a desktop cloud application, a media asset video application, etc. It should be noted that the embodiment of the present application does not limit the type of the target application, and the above is only an exemplary description.
- the attribute setting instruction can be set as an instruction triggered by the target application, thereby providing the target application with permission to set file extended attributes, thereby making the object storage more compatible with file applications and providing more comprehensive file services for file applications.
- the following is an exemplary introduction to the manner in which the Windows operating system sends a property setting instruction to a file storage client.
- the Windows operating system can send attribute setting instructions to the file storage client through the FUSE module.
- the Windows operating system sends the property setting instruction to the FUSE module, so that the FUSE module sends the property setting instruction to the file storage client.
- the file storage client is configured with a first interface, and the first interface is used to instruct to set the file extension attribute.
- the Windows operating system can send the attribute setting instruction to the file storage client through the first interface.
- the FUSE module after receiving the attribute setting instruction sent by the operating system, the FUSE module sends the attribute setting instruction to the file storage client by calling the first interface.
- the first interface may be win_set_file_attr, where “win” is used to represent the Windows operating system, “set” is used to represent setting, and “file_attr” is used to represent file extended attributes.
- the first interface can be considered as an interface provided by the file storage client to the operating system, so that the operating system can interact with the file storage client through the first interface.
- the FUSE module can be considered as an interface provided by the Windows operating system to the file storage client, so that the file storage client can interact with the Windows operating system through the FUSE module.
- the first interface for the file storage client as an interface for setting file extension attributes, this helps to improve the accuracy of setting file extension attributes, thereby helping to better provide file extension attribute management services.
- Step 302 The file storage client determines a property setting request based on the property setting instruction and the target interface provided by the object storage service node.
- the target interface provided by the object storage service node is used to indicate the format of the property setting request, and the property setting request is used to request to set the target file extended attribute of the target node to the target state.
- the file storage client may receive the property setting instruction through the property management module, and determine the property setting request through the property management module.
- the target interface provided by the object storage service node may be a REST API interface.
- a property setting request indicating the semantics of file extension attributes i.e., target node, target file extension attributes, target status, etc.
- file extension attributes i.e., target node, target file extension attributes, target status, etc.
- the property setting request may include message content, request address, operation command, etc.
- the format of the message content, request address and operation command adopts the format that can be defined by the REST API interface.
- the message content defined based on the REST API interface can be recorded in the XML Body.
- the message content can be recorded in the Xml Body.
- the format of the message content of the property setting request adopts the format of Xml Body.
- the request address defined based on the REST API interface can be implemented through a uniform resource locator (URL). Based on this, the format of the request address adopts the format of the URL.
- URL uniform resource locator
- the operation commands defined based on the REST API interface may include GET, PUT, HEAD, DELETE, POST, etc.
- the format of Xml Body and the format of URL can be referred to the description in the relevant technology, which will not be repeated here.
- the target interface provided by the object storage service node is a REST API interface
- the message content of the property setting request adopts the format of Xml Body
- the request address adopts the format of URL
- the operation command can be GET, PUT, HEAD, DELETE, POST, etc., so that the property setting request adopts the format of the REST API interface, which helps the object storage service node to accurately identify the content requested by the property setting request, thereby facilitating the accuracy of the file extension attribute management operations performed by the object storage service node.
- the attribute setting request may include a first field, wherein the first field is used to indicate a file extension attribute.
- the first field may be “winmode.” “win” in “winmode” is used to indicate a Windows operating system, and “mode” is used to indicate a file extension attribute.
- the request address may include a first field, and the format of the first field in the request address may be "?winmode".
- the first field indicating the file extension attribute in the request address it is possible to indicate that the attribute setting request is a request related to the file extension attribute, which helps to improve the accuracy of file extension attribute management.
- the message content may include a first field, and the format of the first field in the message content may be " ⁇ winmode> ⁇ /winmode>".
- the object storage node By adding a field indicating the file extension attribute to the message content, it is helpful for the object storage node to accurately locate the content requested by the attribute setting request, thereby helping to improve the accuracy and efficiency of file extension attribute management.
- the attribute setting request realizes the request to set the target file extended attribute of the target node to the target state by indicating the target node, the target file extended attribute and the target state.
- the attribute setting request indicates the target node, the target file extended attribute and the target state, including multiple implementation methods, and the following is exemplified by method 1 and method 2.
- the attribute setting request indicates the extended attributes of the target file through the message content and indicates the target status through the operation command.
- the message content of the attribute setting request may include a second field, and the second field is used to indicate an extended attribute of the target file.
- the second field may include a name of the target file extension attribute and a value of the target file extension attribute, wherein the value of the target file extension attribute is a value of the target file extension attribute in the Windows operating system.
- the value of the target file extension attribute in the semantics of the object storage is the same as the value in the Windows operating system, thereby helping to improve the convenience and accuracy of the file storage client when performing semantic conversion, and further helping to improve the convenience and accuracy of file extension attribute management.
- the second field may include “ ⁇ FileAttributeReadonly>0x00000001 ⁇ /FileAttributeReadonly>”.
- the “FileAttribute” in “FileAttributeReadonly” is a prefix used to indicate the file extended attribute
- “Readonly” is used to indicate the name of the file extended attribute, that is, the “read-only attribute”.
- “0x00000001” is used to indicate the value of the file extended attribute, that is, the value of the target file extended attribute
- “0x” is used to indicate hexadecimal, that is, the hexadecimal value of the read-only attribute is “00000001”.
- the attribute setting request when the attribute setting instruction indicates 22 file extension attributes, the attribute setting request also indicates 22 file extension attributes. Based on this, the message content of the attribute setting request may be as follows:
- the message content can also indicate the above 22 file extension attributes through a 23-bit binary string, wherein the first bit of the 23-bit string indicates the read-only attribute, the second bit indicates the attribute, the third bit indicates the system attribute, the fifth bit indicates the directory attribute, ..., and the 23rd bit indicates the call data access attribute.
- the number of bits of the file extension attribute in the string is the same as the number of bits of the binary value of the file extension attribute.
- the number of bits of the binary value of the read-only attribute is 1, so the first bit of the string indicates the read-only attribute.
- the property setting request can indicate different target states through different operation commands.
- the property setting request may indicate a configured state through PUT, and indicate an unconfigured state through DELETE.
- the operation command included in the property setting request is PUT
- the property setting request may include "PUT/filesystem/dir/file?winmode”.
- the operation command included in the property setting request is DELETE
- the property setting request may include "DELETE/filesystem/dir/file?winmode”.
- the embodiment of the present application does not limit how the attribute setting request indicates the target state through the operation command, and the above is only an exemplary description.
- the property setting request may indicate the target node through the request address.
- the request address may be filesystem/dir/file?winmode, where "filesystem/dir/file” is used to indicate a target node.
- the target file extended attributes are indicated by the message content
- the target status is indicated by the operation command
- the target node is indicated by the request address.
- the attribute setting request indicates the target file extended attributes and the target status through the message content.
- the message content includes a second field and a third field.
- the second field is used to indicate the target file extension attribute
- the third field is used to indicate the target status.
- the third field can be "put"
- the format of the third field in the message content can be ⁇ Type>put ⁇ /Type>, where "Type” is used for the setting type of the file extension attribute, and "put” is used to indicate the configuration of the target file extension attribute, that is, setting the target file extension attribute to the configured state.
- the second field when the target state is an unconfigured state, the second field may be "delete", and the format of the third field in the message content may be ⁇ Type>delete ⁇ /Type>, where "delete” is used to indicate cancellation/deletion of the target file extended attributes, that is, setting the target file extended attributes to an unconfigured state.
- the third field can be stored between " ⁇ winmode>” and " ⁇ /winmode>", so that the third field can be used to indicate the setting type of the file extension attribute, thereby helping to improve the accuracy of the object storage service node in identifying content.
- the request address of the attribute setting request is used to indicate the target node.
- the attribute setting request may include "PUT/filesystem/dir/file?winmode”. Among them, "filesystem/dir/file” is used to indicate the target node.
- the object storage service node can determine the content requested by the attribute setting request by reading the message content, thereby helping to improve the efficiency of processing the attribute setting request.
- the diversity of the ways in which the attribute setting request indicates the target file extended attributes and the target status is improved.
- the attribute setting request can indicate the target state in mode 1, that is, indicate the target states of the multiple file extension attributes through different operation commands.
- the attribute setting request can also indicate the target state in mode 2, that is, indicate the target states of the multiple file extension attributes through the third field in the message content.
- the attribute setting instruction indicates that the target states of multiple file extension attributes are different, that is, the target state of some file extension attributes among the multiple file extension attributes is a configured state, and the target state of another part of the file extension attributes is an unconfigured state, then the attribute setting request can indicate the target state through method 2, so that the attribute setting request can indicate two different types of target states at the same time.
- Step 303 The file storage client sends an attribute setting request to the object storage service node to request that the target file extended attribute of the target node be set to a target state.
- the file storage client determines the attribute setting request, it sends the attribute setting request to the object storage service node, such as: the attribute setting request can be sent to the object storage service node through the attribute management module.
- the file storage client may send a property setting request to the object storage service node through a target interface provided by the object storage service node.
- the file storage client after receiving the attribute setting instruction, can determine the attribute setting request based on the content indicated by the attribute setting instruction and the target interface provided by the object storage service node, so as to request that the target file extension attribute of the target node be set to the target state. After that, the file storage client sends the attribute setting request to the object storage service node to request the object storage service node to set the target file extension attribute of the target node to the target state.
- the file storage client determines the attribute setting request through the attribute setting instruction and the format indicated by the target interface provided by the object storage service node, so as to convert the semantics of the file extension attributes (i.e., the attribute setting instruction) into the semantics of the object storage (i.e., the attribute setting request), so that the attribute setting request can use the semantics of the object storage to indicate the content indicated by the attribute setting instruction, so that the object storage service node can accurately identify the content requested by the attribute setting request, and thus manage the file extension attributes based on the content requested by the attribute setting request.
- the attribute setting request i.e., the attribute setting instruction
- the attribute setting request can use the semantics of the object storage to indicate the content indicated by the attribute setting instruction
- the object storage system can improve the semantics of object storage through the scheme of the present application, so that the semantics of object storage can be compatible with file extension attributes, thereby providing file extension attribute management services on the basis of providing file services, thereby realizing the provision of more complete file services, so that object storage can be better compatible with file applications.
- Fig. 6 is a schematic diagram of setting file extension attributes provided by an embodiment of the present application. In the following, the process of setting file extension attributes is exemplarily introduced in conjunction with Fig. 6.
- the Windows operating system calls the first interface of the file storage client through the FUSE module and sends an attribute setting instruction to the file storage client to instruct the file storage client to manage the file extension attributes of the target node, such as setting the target file extension attributes of the target node to the target state.
- the first interface may be "sfc_win_set_attributes” and the attribute setting instruction may be "fuse_operations::win_set_attributes”.
- the file storage client After receiving the attribute setting instruction through the first interface, the file storage client can generate an attribute setting request based on the attribute setting instruction and the target interface provided by the object storage service node. After that, the file storage client sends the attribute setting request to the object storage file storage client (OSC) of the object storage service node to request to manage the file extension attributes of the target node, such as setting the target file extension attributes of the target node to the target state.
- OSC object storage file storage client
- OSC performs a certain operation, which can be considered as the object storage service node performing a certain operation in the process of running OCS, or the object storage service node performing a certain operation through OSC, which will not be repeated later.
- the file storage client can map the semantics of file extension attributes to the semantics of object storage, thereby generating requests that can be recognized by the object storage service node (such as: attribute setting requests, etc.), and then isolating the semantics of file extension attributes on the file storage client side, so that the semantics of file extension attributes are independent of the object storage service node, that is, the object storage service node does not need to recognize the semantics of file extension attributes.
- the object storage service node such as: attribute setting requests, etc.
- the file storage client when the file storage client generates a request that can be recognized by the object storage service node, it makes full use of the scalability of the target interface provided by the object storage service node, such as: indicating the extended attributes of the target file to be managed through the message content, indicating the management method of the file extended attributes through the operation command, etc., thereby improving the accuracy and reliability of the requests that can be recognized by the object storage service node.
- Fig. 7 is a flow chart of a method for managing file extension attributes according to an exemplary embodiment.
- the method for managing file extension attributes may include the following steps 701-703.
- Step 701 The object storage service node receives a property setting request sent by a file storage client.
- Step 702 The object storage service node parses the property setting request through the target interface to obtain the content requested by the property setting request.
- the object storage service node may determine the content requested by the attribute setting request by parsing the attribute setting request.
- file extended attributes are managed based on the content requested by the attribute setting request.
- the object storage service node may parse the property setting request through a parsing module.
- the object storage service node can determine, through the first field (eg, winmode) in the request address, that the property setting request is a request related to file extension attributes.
- the first field eg, winmode
- Example 1 in combination with method 1 in step 302, an exemplary introduction to the implementation process of step 702 is given.
- the object storage service node can determine the extended attributes of the target file to be managed by parsing the message content of the attribute setting request.
- the object storage service node can determine the field indicating the extended attributes of the target file in the message content through the first field in the message content, such as “ ⁇ FileAttributeReadonly>0x00000001 ⁇ /FileAttributeReadonly>” between “ ⁇ winmode>” and “ ⁇ /winmode>”, thereby determining the extended attributes of the target file to be managed.
- the object storage service node can determine the management method of the file extension attribute by parsing the operation command of the attribute setting request, such as: setting to a configured state or setting to an unconfigured state.
- the management mode is set to the configured state. If the operation command in the property setting request is "DELETE”, the management mode is set to the unconfigured state.
- Example 2 in combination with method 2 in step 302, an exemplary introduction to the implementation process of step 702 is given.
- the object storage service node can determine the management method of the file extension attributes by parsing the message content of the attribute setting request.
- the object storage service node can determine the management mode of the file extension attribute through the third field in the message content, such as the third field between " ⁇ winmode>” and " ⁇ /winmode>", thereby determining the state to be set (i.e., the target state) of the target file extension attribute. If the message content includes " ⁇ Type>put ⁇ /Type>", that is, the third field is "put”, the management mode is set to the configured state, that is, the state to be set of the target file extension attribute is the configured state; if the message content includes " ⁇ Type>delete ⁇ /Type>", that is, the third field is "delete”, the management mode is set to the unconfigured state, that is, the state to be set of the target file extension attribute is the unconfigured state.
- the file extension attribute management method may further include the following S1-S4.
- the object storage service node determines the value of the target file's extended attribute by parsing the attribute setting request.
- the object storage service node determines whether the value of the target file extension attribute is the same as the target value.
- the target value is the value of the extended attribute of the target file in the Windows operating system.
- the object storage service node stores a target value of the target file extension attribute, and the target value is the value of the target file extension attribute in the Windows operating system.
- the object storage service node parses the value of the target file extension attribute from the message content, it compares the value of the target file extension attribute with the target value. If they are the same, it is considered that the value of the target file extension attribute has passed the verification. Otherwise, if they are different, it is considered that the value of the target file extension attribute has not passed the verification.
- the value of the read-only attribute in the Windows operating system is 0x00000001, that is, the target value is 0x00000001. Therefore, if the value of the read-only attribute is ⁇ FileAttributeReadonly>0x00000001 ⁇ /FileAttributeReadonly>, it means that the value of the target file extended attribute is the same as the target value of the target file extended attribute. If the value of the read-only attribute is a non-target value, such as: " ⁇ FileAttributeReadonly>0x00000002 ⁇ /FileAttributeReadonly>", it means that the value of the target file extended attribute is different from the target value of the target file extended attribute.
- the target file extended attribute is set to the target state only when the value of the target file extended attribute is the same as the target value of the target file extended attribute, which helps to ensure the accuracy of the managed target file extended attribute.
- the object storage service node If the value of the target file's extended attribute is different from the target value, the object storage service node returns a prompt message to the file storage client, where the prompt message is used to indicate that there is an error in the value of the target file's extended attribute.
- a prompt message is returned to the file storage client to prompt that there is an error in the value of the target file extension attribute, which helps to correct the error of the file storage client in time.
- Step 703 The object storage service node sets the target file extended attribute of the target node to the target state based on the content requested by the attribute setting request.
- the object storage service node after the object storage service node obtains the content requested by the attribute setting request, it executes the content requested by the attribute setting request, that is, sets the target file extended attribute of the target node to the target state.
- Method A When the object storage service node indicates the state of each file extension attribute of the target node through a string (such as a target string), different bits of the target string are used to indicate different file extension attributes. Based on this, the object storage service node can set the target file extension attribute of the target node to the target state by modifying the value of the target bit of the target string.
- a string such as a target string
- the object storage service node may set the target bit of the target string to a first value; the target bit is used to indicate an extended attribute of the target file, and the first value is used to indicate a configured state.
- the target string is a 23-bit binary string, wherein the first bit indicates the state of the read-only attribute. If the content of the attribute setting request is to set the read-only attribute to the configured state, the object storage service node may set the value of the first bit to 1 (i.e., the first value), thereby indicating that the read-only attribute is in the configured state.
- the object storage service node may set the target bit of the target string to a second value; the second value is used to indicate an unconfigured state.
- the target string is a 23-bit binary string, wherein the second bit indicates the state of the hidden attribute. If the content of the attribute setting request is to set the hidden attribute to an unconfigured state, the object storage service node may set the value of the second bit to 0 (i.e., the second value), thereby indicating that the hidden attribute is in an unconfigured state.
- multiple file extension attributes of the target node are indicated by a character string, which not only helps improve the efficiency of subsequent updating, searching, and deleting file extension attributes, but also helps reduce the storage space occupied by the fields indicating file extension attributes.
- the target string can be stored in association with the identifier of the target node.
- the target string can be stored in the metadata of the target object. In this way, when updating the file extension attribute of the target node, it helps to improve the convenience and accuracy of determining the target string.
- Method B The object storage service node indicates multiple file extension attributes of the target node through multiple fields, where one field is used to indicate one file extension attribute, such as the target field is used to indicate the target file extension attribute. Based on this, the object storage service node can set the target file extension attribute of the target node to the target state by generating a target field or deleting a target field.
- the object storage service node when the target state is in the configured state, can generate a target field and store the target field.
- the target field is used to indicate that the target file extension attribute has been configured. That is, when the object storage service node stores the target field, it indicates that the target node has configured the target file extension attribute, that is, the target file extension attribute of the target node is in the configured state.
- the target file extended attribute is a read-only attribute, that is, the message content of the attribute setting request includes ⁇ FileAttributeReadonly>0x00000001 ⁇ /FileAttributeReadonly>, based on which, the target field generated by the object storage service node may be x-obs-meta-winmode:0x0000001.
- the state of the target file extended attribute is set to the configured state, if the target file extended attribute is set for the first time, it can be considered that the target file extended attribute is added to the target node. If it is not the first time to set the target file extended attribute, it can be considered that the state of the target file extended attribute of the target node is updated.
- the target field may be stored in a non-volatile storage medium of the object storage service node, thereby achieving persistent storage of the target field.
- the object storage service node may store the target field based on the identifier of the target node, that is, store the identifier of the target node in association with the target field, so that when the file storage client subsequently queries the file extension attributes of the node, it can indicate the node to be queried through the node identifier.
- the object storage service node can store the target field in the metadata of the target object based on the identifier of the target node, thereby realizing the associated storage of the target field and the identifier of the target node.
- the object storage service node when the target state is in the unconfigured state, the object storage service node can delete the target field of the target node. That is, when the object storage service node does not store the target field, it means that the target node is not configured with the target file extension attribute, that is, the target file extension attribute of the target node is in the unconfigured state.
- the target file extended attribute is a hidden attribute
- the target field may be x-obs-meta-winmode:0x00000002.
- the object storage service node may delete x-obs-meta-winmode:0x00000002 to set the target file extended attribute to an unconfigured state.
- multiple fields are used to indicate multiple file extension attributes of the target node, which helps to improve the independence, thereby helping to improve the accuracy of the indicated file extension attributes.
- the object storage service node After the object storage service node receives the attribute setting request sent by the file storage client, it determines the content requested by the attribute setting request by parsing the attribute setting request, and then sets the target file extension attribute of the target node to the target state based on the content requested by the attribute setting request, thereby completing the management of the file extension attributes.
- the property setting request is determined according to the interface provided by the object storage service node, the property setting request indicates the requested content through the semantics of the object storage, so that the object storage service node can accurately identify the requested content of the property setting request, thereby ensuring the management of file extension attributes. Therefore, the object storage system can improve the semantics of object storage through the solution of the present application, so that the semantics of object storage can be compatible with file extension attributes, thereby providing file extension attribute management services on the basis of providing file services, and further providing more complete file services, so that object storage can be better compatible with file applications.
- the object storage service node of the object storage system can determine the management method of file extension attributes by parsing the attribute setting request using object storage semantics, and manage the file extension attributes based on the management method of file extension attributes indicated by the attribute setting request, thereby realizing the intercommunication between file extension attribute semantics and object storage semantics.
- the object storage service node supports the parsing, management, storage, and query of file extension attribute related content, thereby realizing the functional implementation of the interface that supports the management of file extension attributes (i.e., the target interface), thereby enabling the object storage system to provide more complete file extension attribute management functions.
- Fig. 8 is a flow chart of a method for managing file extension attributes according to an exemplary embodiment.
- the method for managing file extension attributes may include the following steps 801-803.
- Step 801 The file storage client receives an attribute acquisition instruction, where the attribute acquisition instruction is used to instruct to acquire file extended attributes of a target node.
- the attribute acquisition instruction indicates the target node, which helps to prevent the file storage client from acquiring file extension attributes of non-target nodes, thereby helping to ensure the accuracy of subsequent operations performed by the file storage client.
- the attribute acquisition instruction may be an instruction triggered by a user, such as when a user views the file extension attributes of a target node through an electronic device, the operating system responds to the user's triggering operation and sends an attribute acquisition instruction to the file storage client to instruct the file storage client to obtain the file extension attributes of the target node.
- the attribute acquisition instruction can be an instruction triggered by the target application.
- the target application can send a first query instruction to the operating system to instruct the query of the file extension attributes of the target node.
- the operating system After receiving the first query instruction, the operating system sends an attribute acquisition instruction to the file storage client to instruct the file storage client to obtain the file extension attributes of the target node.
- the Windows operating system can send a property acquisition instruction to the file storage client through the FUSE module.
- the Windows operating system sends a property setting instruction to the FUSE module, so that the FUSE module sends the property setting instruction to the file storage client.
- the file storage client is configured with a second interface, and the second interface is used to instruct to obtain the file extension attribute.
- the Windows operating system can send the attribute acquisition instruction to the file storage client by calling the second interface.
- the FUSE module after receiving the attribute acquisition instruction sent by the operating system, the FUSE module sends the attribute acquisition instruction to the file storage client by calling the second interface.
- the second interface may be win_get_file_attribute, wherein "set” is used to represent acquisition.
- the second interface can be considered as an interface provided by the file storage client to the operating system, so that the operating system can interact with the file storage client through the second interface to query the file extension attributes of the node.
- the second interface for the file storage client as an interface for querying file extension attributes, this helps to improve the query accuracy of file extension attributes, thereby helping to better provide file extension attribute management services.
- step 801 please refer to the instructions of step 301, which will not be repeated here.
- Step 802 The file storage client obtains the file extended attributes of the target node based on the attribute acquisition instruction.
- the file storage client after receiving the attribute acquisition instruction, obtains the file extended attribute of the target node according to the node identifier indicated by the attribute acquisition instruction, that is, the identifier of the target node.
- the file storage client may obtain the file extension attributes of the target node through the attribute management module.
- the file storage client may obtain the file extension attribute of the target node from the storage medium of the electronic device.
- the electronic device includes a first storage medium (i.e., a local storage medium of the electronic device), and the first storage medium can store file extension attributes of at least one node on the directory tree.
- the file storage client can obtain the file extension attributes of the target node from the first storage medium, such as: obtaining the file extension attributes corresponding to the identifier of the target node.
- the first storage medium may be a cache, a memory, etc. It should be noted that the embodiment of the present application does not limit the type of storage medium, and the above is only an exemplary description.
- Method b The file storage client can obtain the file extended attributes of the target node from the object storage service node.
- Example 1 After receiving the attribute acquisition instruction, the file storage client can first acquire the file extended attributes of the target node from the local storage medium of the electronic device. If the acquisition fails, the file extended attributes of the target node are acquired from the object storage service node. This helps to improve the efficiency of acquiring file extended attributes.
- Example 2 After the file storage client receives the attribute acquisition instruction, if the file extension attribute of the target node is stored in the local storage medium of the electronic device, the file storage client determines whether the file extension attribute of the target node in the local storage medium meets the target condition. If so, the file extension attribute of the target node is acquired from the local storage medium; if not, the file extension attribute of the target node is acquired from the object storage service node. This helps to ensure the accuracy of the acquired file extension attribute.
- satisfying the target condition means that the value of the file extension attribute in the local storage medium is the same as the value of the file extension attribute in the Windows operating system.
- Not satisfying the target condition means that the value of the file extension attribute in the local storage medium is different from the value of the file extension attribute in the Windows operating system.
- Example 3 After receiving the attribute acquisition instruction, the file storage client can directly acquire the file extension attributes of the target node from the object storage service node, that is, regardless of whether the target condition is met, the file storage client acquires the file extension attributes of the target node from the object storage service node. This helps to ensure the accuracy of the acquired file extension attributes.
- the file storage client sends an attribute acquisition request to the object storage service node based on the attribute acquisition instruction.
- the attribute acquisition request is used to request to acquire the file extended attributes of the target node.
- the attribute acquisition request indicates the target node.
- the attribute acquisition request may include the identifier of the target node, which helps to ensure the accuracy of the acquired file extension attributes.
- the attribute acquisition request also indicates the file extension attributes. This helps to ensure the accuracy of the acquired information.
- the file storage client can determine the attribute acquisition request through the target interface provided by the object storage service node.
- the attribute acquisition request may include an operation command and a request address.
- the operation command can be used to obtain file extended attributes, and the request address can be used to indicate the target node.
- the attribute acquisition request may be “HEAD/filesystem/dir/file?winmode.” “?winmode” is used to indicate that the attribute acquisition request is a request related to file extended attributes, “HEAD” is an operation command for indicating acquisition of file extended attributes, and “filesystem/dir/file” is used to indicate a target node.
- the file storage client may send a property acquisition request to the object storage service node through a target interface provided by the object storage service node.
- the object storage service node returns the file extended attributes of the target node to the file storage client based on the received attribute acquisition request.
- the object storage service node after receiving the attribute acquisition request, obtains the file extension attributes of the target node based on the content requested by the attribute acquisition request, and returns the file extension attributes of the target node to the file storage client.
- Example 1 In combination with the method A in step 703 above, the object storage service node can return the target string of the target node to the file storage client, which helps to improve the data transmission efficiency.
- Example 2 In combination with the method B in step 703, the object storage service node can return multiple fields of the target node to the file storage client, which helps improve the processing efficiency of the file storage client after receiving the file extension attributes of the target node.
- Example 3 In combination with method B in step 703 above, the object storage service node may merge multiple fields into one field and return the merged field to the file storage client.
- the target node is configured with only a read-only attribute and a hidden attribute, wherein the field corresponding to the read-only attribute is x-obs-meta-winmode:0x00000001, and the field corresponding to the hidden attribute is x-obs-meta-winmode:0x00000002.
- the object storage service node can merge the field corresponding to the read-only attribute and the field corresponding to the hidden attribute into winmode: 0x00000003, and return winmode: 0x00000003 to the file storage client.
- the file storage client receives the file extension attributes of the target node sent by the object storage service node.
- the file storage client after the file storage client receives the content returned by the object storage service node, it can parse the content returned by the object storage service node, such as: by parsing winmode: 0x00000003, winmode: 0x00000001, winmode: 0x00000002, etc. are obtained, and the parsed fields are returned to the operating system, that is, winmode: 0x00000001 and winmode: 0x00000002 are returned to the operating system.
- Example 2 in S2 above after the file storage client receives the fields returned by the object storage service node, it can transmit the fields returned by the object storage service node to the operating system.
- the file storage client determines the attribute acquisition request by extending the target interface provided by the object storage service node, thereby realizing the acquisition of the file extension attributes of the target node separately through the attribute acquisition request, so that the object storage system can provide more complete file extension attribute management services.
- the file extension attribute management method may further include: the file storage client writes the file extension attribute of the target node obtained from the object storage service node into the storage medium of the electronic device.
- the file extension attributes of the target node obtained from the object storage service node are stored in the local storage medium of the electronic device. In this way, when the file extension attributes of the target node need to be obtained later, they can be directly obtained from this storage medium, which helps to improve the efficiency of data acquisition.
- Step 803 The file storage client returns the file extended attributes of the target node based on the attribute acquisition instruction.
- the file storage client after the file storage client obtains the file extension attributes of the target node, it returns the file extension attributes of the target node to the sender of the attribute acquisition instruction, such as returning it to the operating system.
- the file storage client can obtain the file extension attributes of the target node based on the attribute acquisition instruction, and return the file extension attributes of the target node, thereby providing a query service for the file extension attributes, which in turn helps the object storage system provide a more complete file extension attribute management service.
- Fig. 10 is a schematic diagram of obtaining file extension attributes provided by an embodiment of the present application. In the following, the process of obtaining file extension attributes is exemplarily introduced in conjunction with Fig. 10 .
- the Windows operating system calls the second interface of the file storage client through the FUSE module and sends the attribute acquisition instruction to the file storage client to instruct the file storage client to query the file extended attributes of the target node.
- the second interface may be "sfc_win_get_attributes" and the attribute acquisition instruction may be "fuse_operations::win_get_attributes”.
- the file storage client can obtain the file extension attributes of the target node from the local storage medium of the electronic device. If the acquisition is successful, the file extension attributes of the target node are returned to the Windows operating system. If the acquisition fails, an attribute acquisition request is generated and sent to the object storage service node to obtain the file extension attributes of the target node from the object storage service node. On this basis, the file storage client can write the file extension attributes of the target node obtained from the object storage node into the local storage medium of the electronic device, and return the file extension attributes of the target node obtained from the object storage node to the Windows operating system.
- the file extension attribute management method may also include the following S8-S10.
- the file storage client receives a metadata acquisition instruction, where the metadata acquisition instruction is used to instruct the acquisition of metadata of a target node.
- the file storage client obtains target metadata of the target node based on the metadata acquisition instruction, wherein the target metadata of the target node includes file extension attributes of the target node.
- the following is an exemplary introduction to obtaining target metadata of a target node through two implementation methods.
- the file storage client may obtain the target metadata of the target node from the storage medium of the electronic device, which helps to improve the efficiency of obtaining the target metadata.
- the electronic device includes a second storage medium (i.e., a local storage medium of the electronic device), and the second storage medium stores target metadata of at least one node on the directory tree.
- the file storage client can acquire the target metadata of the target node from the second storage medium.
- the second storage medium and the first storage medium may be different storage media on the electronic device, so that the file extension attributes or target metadata of the node can be stored separately through different storage media, thereby facilitating the convenience of data search.
- the second storage medium and the first storage medium may be the same storage medium on the electronic device, thus helping to avoid occupying too much storage medium.
- the file storage client may obtain the target metadata of the target node from the object storage service node, which helps to improve the accuracy of the obtained target metadata.
- the file storage client may send a metadata acquisition request to the object storage service node, and the metadata acquisition request is used to request the metadata of the target node.
- the metadata acquisition request may be "HEAD/filesystem/dir/file”.
- the object storage service node acquires the target metadata of the target node based on the content requested by the metadata acquisition request, and returns the target metadata of the target node to the file storage client.
- the target metadata of the target node may also include inode data and Dtree data, etc.
- the file storage client returns target metadata of the target node based on the metadata acquisition instruction.
- the file storage client after receiving the metadata acquisition instruction, obtains and returns the target metadata of the target node, which includes the file extension attributes of the target node, thereby providing more comprehensive metadata, which in turn helps the object storage system to provide more complete file extension attribute management services.
- Fig. 11 is a schematic diagram of a method for obtaining metadata provided by an embodiment of the present application. The following is an exemplary introduction to the process of obtaining metadata in conjunction with Fig. 11.
- the Windows operating system calls the third interface of the file storage client through the FUSE module and sends the metadata acquisition instruction to the file storage client to instruct the file storage client to query the metadata of the target node.
- the third interface may be "sfc_get_attributes”/"sfc_getattr_obs”
- the metadata acquisition instruction may be "fuse_operations::getattributes”.
- the file storage client can obtain the target metadata of the target node from the local storage medium of the electronic device. If the acquisition is successful, the target metadata of the target node is returned to the Windows operating system. If the acquisition fails, a metadata acquisition request is generated and sent to the object storage service node to obtain the target metadata of the target node from the object storage service node. After receiving the metadata acquisition request, the object storage service node returns the target metadata of the target node to the file storage client based on the metadata acquisition request.
- the file storage client can write the target metadata of the target node obtained from the object storage node into the storage medium of the electronic device, and return the target metadata of the target node obtained from the object storage node to the Windows operating system.
- the file extension attribute management method may also include the following S11-S13.
- the file storage client receives a directory listing instruction, where the directory listing instruction is used to indicate the listing of a target directory.
- listing a directory is to list at least one file/subdirectory under the directory when opening the directory, that is, for example, to display at least one file/subdirectory under the directory to the user.
- the operating system triggers a readdir operation and sends a directory listing instruction to the file storage client to instruct the file storage client to list the target directory.
- the file storage client obtains target metadata of the target directory based on the directory listing instruction; the target metadata of the target directory includes file extension attributes of at least one file/subdirectory under the target directory.
- the at least one file under the target directory includes a file under a first-level directory of the target directory.
- the following is an exemplary introduction to obtaining target metadata of a target directory through two implementation methods.
- the file storage client may obtain the target metadata of the target directory from the storage medium of the electronic device, which helps to improve the efficiency of obtaining the target metadata.
- the electronic device includes a third storage medium (i.e., a local storage medium of the electronic device), and the third storage medium stores target metadata of at least one directory on the directory tree, such as file extension attributes of files/subdirectories under at least one directory. Based on this, after receiving the directory listing instruction, the file storage client can obtain the target metadata of the target directory from the third storage medium.
- a third storage medium i.e., a local storage medium of the electronic device
- the third storage medium stores target metadata of at least one directory on the directory tree, such as file extension attributes of files/subdirectories under at least one directory.
- the third storage medium and the first storage medium/second storage medium may be different storage media on the electronic device.
- the file extension attributes/target metadata of the node and the target metadata of the enumerated directory may be stored separately through different storage media, thereby facilitating data search.
- the file storage client can obtain the target metadata of the target directory from the object storage service node. Helps improve the accuracy of the acquired target metadata.
- the file storage client may send a directory listing request to the object storage service node, where the directory listing request is used to request metadata of the listed target directory.
- the directory listing request may be "GET/filesystem/dir/file”.
- the object storage service node obtains the target metadata of the target directory based on the content requested by the directory listing request, thereby obtaining target metadata of at least one file/subdirectory under the target directory, wherein the target metadata of at least one file/subdirectory under the target directory includes file extension attributes of at least one file/subdirectory under the target directory.
- the object storage service node may return the target metadata of at least one file/subdirectory under the target directory to the file storage client.
- the file storage client returns target metadata of the target directory based on the directory listing instruction.
- the file storage client after receiving the directory listing instruction, obtains and returns the target metadata of the target directory, and the target metadata includes the file extension attributes of at least one file/subdirectory under the target directory, thereby providing more comprehensive metadata when listing directories, which in turn helps the object storage system provide more complete file extension attribute management services.
- Fig. 12 is a schematic diagram of a directory listing provided in an embodiment of the present application. In the following, in conjunction with Fig. 12, the process of listing targets is exemplarily introduced.
- the Windows operating system calls the fourth interface of the file storage client through the FUSE module and sends the directory listing instruction to the file storage client to instruct the file storage client to list the target directory.
- the fourth interface can be "sfc_readdir_attributes”/"sfc_readdir_obs”
- the directory listing instruction can be "fuse_operations::readdir”.
- the file storage client can obtain the target metadata of the target directory from the local storage medium of the electronic device. If the acquisition is successful, the target metadata of the target directory is returned to the Windows operating system. If the acquisition fails, a directory enumeration request is generated and sent to the object storage service node to obtain the target metadata of the target directory from the object storage service node. After receiving the directory enumeration request, the object storage service node returns the target metadata of the target directory to the file storage client.
- the file storage client can write the target metadata of the target directory obtained from the object storage node into the storage medium of the electronic device, and return the target metadata of the target directory obtained from the object storage node to the Windows operating system.
- the file extension attribute management method may further include the following S14-S16.
- S14 The file storage client receives a deletion instruction, where the deletion instruction is used to instruct to delete a target node.
- the file storage client sends a deletion request to the object storage service node based on the deletion instruction, wherein the deletion request is used to request deletion of target metadata of the target node.
- the file storage client after receiving the deletion instruction, the file storage client will send a deletion request to the object storage service node on the basis of sending a request to delete the target node, so as to request to delete the target metadata of the target node, thereby deleting the information related to the target node on the object storage service node and avoiding useless data occupying the storage space of the object storage service node.
- the object storage service node deletes the file extension attribute of the target node based on the received deletion request.
- the object storage service node after receiving a deletion request, the object storage service node will delete the file extension attributes of the target node on the basis of deleting the metadata such as the inode data and Dtree data of the target node, thereby completely clearing the information related to the target node.
- the file storage client after the file storage client receives the deletion instruction requesting to delete the target node, it sends a deletion request to the object storage service node to request to delete the metadata of the target node. After receiving the deletion request, the object storage service deletes the target node file extension attributes. In this way, after deleting the target node, it helps to completely clear the data related to the target node, thereby helping to avoid useless data occupying the storage space of the object storage service node.
- file extension attributes can be divided into first type file extension attributes and second type file extension attributes.
- the first type file extension attributes can be implemented by the file storage client, and the second type file extension attributes can be implemented by the operating system.
- the first type of file extension attributes may include read-only attributes, encryption attributes, compression attributes, etc.
- the second type of file extension attributes may include hidden attributes, system attributes, etc.
- the first type of attributes can also be called function implementation type attributes.
- the file storage client performs the operation of obtaining the file extension attributes and The extended attributes are transmitted to the operating system so that the operating system can implement the file extended attributes. Therefore, for the file storage client, the second type of attributes can also be called transparent attributes.
- the first implementation scheme is exemplarily introduced by taking the target file extension attribute of the target node as an example.
- Fig. 14 is a flow chart of a method for managing file extension attributes according to an exemplary embodiment.
- the method for managing file extension attributes may include the following steps 1401-1403.
- Step 1401 The file storage client receives a target instruction, where the target instruction is used to instruct to perform a target operation on a target node.
- the target operation is related to the extended attributes of the target file.
- the operating system may send a target instruction to the file storage client to indicate the operation requested by the user or the target application, namely, to perform the target operation on the target node.
- the target operation may be a write operation, based on which the target file extended attribute is a read-only attribute, that is, the write operation is related to the read-only attribute.
- Step 1402 The file storage client determines a permission verification result of a target operation based on the state of the target file extended attribute.
- the permission verification result includes passed verification or failed verification.
- the file storage client can obtain the file extension attributes of the target node based on the target instruction to determine the status of the target file extension attributes, and thus determine the permission verification result based on the status of the target file extension attributes.
- the target operation is a write operation
- the target file extended attribute is a read-only attribute. If the read-only attribute is in a configured state, that is, the target node has been configured with the read-only attribute, the permission check result is a failed check, that is, the user or the target application does not have the permission to perform a write operation on the target node. If the read-only attribute is in an unconfigured state, that is, the target node is not configured with the read-only attribute, the permission check result is a passed check, that is, the user or the file application has the permission to perform a write operation on the target node.
- the attribute management module can obtain the file extension attribute of the target node. Afterwards, the attribute management module can send the file extension attribute of the target node and the type of the target operation to the attribute implementation module, and the attribute implementation module determines the permission verification result of the target operation. After the attribute implementation module determines the permission verification result, it transmits the permission verification result to the attribute management module.
- the method for obtaining the file extension attribute of the target node can refer to the description of the embodiment shown in FIG. 8 , which will not be described in detail here.
- the operating system may send the target instruction to the attribute implementation module, and the attribute implementation module instructs the attribute management to obtain the state of the target file extended attribute, and then the attribute implementation module determines the permission verification result of the target operation.
- Step 1403 If the permission check result is failure to pass the check, the file storage client returns a response message based on the target instruction.
- the response information is used to indicate a refusal to execute the target operation on the target node.
- the file storage client when the file storage client determines that the permission check result of the target operation is that it fails the check, the file storage client returns a response message to the sender of the target instruction (such as: operating system) to indicate that the target operation is refused to be performed on the target node, thereby instructing the operating system to intercept the user or target application from performing the target operation on the target node.
- the sender of the target instruction such as: operating system
- the file storage client after receiving the target instruction, the file storage client automatically obtains the file extension attribute of the target node according to the target instruction indicating the execution of the target operation on the target node, so as to determine the state of the target file extension attribute related to the target operation, thereby determining the permission verification result of the target operation.
- the file storage client returns a response message for indicating the refusal to execute the target operation on the target node, thereby realizing the instruction to intercept the execution of the target operation on the target node, and then realizing the target file extension attribute of the target node, such as: when the target node is configured with a read-only attribute, the user, target application, etc. are denied to execute a write operation on the target node, that is, only a read operation can be executed.
- the file extended attribute management method may further include: when the permission check result is passed, the file storage client returns first response information based on the target instruction; the first response information is used to indicate that the target operation is allowed to be performed on the target node.
- the file storage client can return the first response information to the sender of the target instruction, such as returning the first response information to the operating system to indicate that the target operation is allowed to be performed on the target node. In this way, it helps the operating system to quickly respond to the operation request of the user or the target application.
- the second implementation scheme is exemplarily introduced by taking the target file extension attribute of the target node as an example.
- Fig. 16 is a flow chart of another method for managing file extension attributes according to an exemplary embodiment.
- the method for managing file extension attributes may include the following steps 1601-1603.
- the target file extension attributes are some attributes of the first category of file extension attributes, such as encryption attributes, compression attributes, etc.
- the file storage client After the file storage client receives the attribute setting instruction, it can implement the target file extension attributes of the target node through the following steps 1601-1603.
- the following uses the example that the target node includes the first file to exemplarily illustrate steps 1601 to 1603.
- Step 1601 The file storage client obtains the first file based on the attribute setting instruction.
- the file storage client after the file storage client receives the attribute setting instruction, if the target file extension attribute indicated by the attribute setting instruction is a partial attribute of the first category of file extension attributes, such as encryption attribute, compression attribute, etc., the file storage client obtains the first file indicated by the attribute setting instruction.
- the target file extension attribute indicated by the attribute setting instruction is a partial attribute of the first category of file extension attributes, such as encryption attribute, compression attribute, etc.
- the file storage client may obtain the first file from a local storage medium of the electronic device.
- the file storage client may send an acquisition request to the object storage service node to request to obtain the first file indicated by the attribute setting instruction.
- Step 1602 The file storage client performs the operation indicated by the attribute setting instruction on the first file to obtain a second file.
- the file storage client after the file storage client obtains the first file, it performs the operation indicated by the attribute setting instruction on the first file to obtain the second file.
- Example 1 the attribute setting instruction indicates that the encryption attribute of the first file is set to a configured state, and the operation indicated by the attribute setting instruction is to perform an encryption operation. Based on this, the file storage client performs an encryption operation on the first file to obtain an encrypted file (ie, the second file).
- the attribute setting instruction indicates that the encryption attribute of the first file is set to an unconfigured state, and the operation indicated by the attribute setting instruction is to perform a decryption operation. Based on this, the file storage client performs a decryption operation on the first file to obtain a decrypted file (ie, the second file).
- the attribute setting instruction indicates that the compression attribute of the first file is set to a configured state, and the operation indicated by the attribute setting instruction is to perform a compression operation. Based on this, the file storage client performs a compression operation on the first file to obtain a compressed file (ie, the second file).
- Example 4 The attribute setting instruction indicates that the compression attribute of the first file is set to an unconfigured state, and the operation indicated by the attribute setting instruction is to perform a decompression operation. Based on this, the file storage client performs a decompression operation on the first file to obtain a decompressed file (ie, the second file).
- Step 1603 The file storage client sends a first storage request to the object storage service node, where the first storage request is used to request storage of the second file, wherein the first storage request includes the second file.
- the file storage client after the file storage client obtains the second file, it can send a first storage request to the object storage service node to request the object storage service node to store the second file. After receiving the first storage request, the object storage service node stores the second file in response to the first storage request. For example, the second file can overwrite the first file.
- steps 1601 to 1603 are illustrative examples of the first file included in the target node.
- the process of the file storage client implementing the target file extended attributes of the first directory/first subdirectory can refer to steps 1601 to 1603 and will not be repeated here.
- the file storage client after the file storage client receives the attribute setting instruction, if the target file extended attribute is part of the attributes of the first type of file extended attributes, such as encryption attribute, compression attribute, etc., the file storage client can obtain the first file indicated by the attribute setting instruction, and perform the operation indicated by the attribute setting instruction on the first file, such as encryption operation, decryption operation, compression operation, decompression operation, etc., so as to realize the target file extended attribute for the first file or cancel the target file extended attribute for the first file, that is, realize/cancel the attribute of the windows file extended attribute, such as: realize/cancel the encryption attribute, compression attribute, etc.
- the file storage client sends a first storage request to the object storage service node, and when requesting the object storage service node to store the first file, the file storage client can provide the object storage service node with data to be stored (i.e., the second file) that is not related to the semantics of the windows file extended attribute, so that the object storage service node does not need to care about the semantics of the windows file extended attribute of the data to be stored, that is, the object storage service node does not need to realize/cancel the file extended attribute of the data to be stored, which helps to simplify the software logic of the object storage service node on the basis of providing file extended attribute management services.
- data to be stored i.e., the second file
- Fig. 17 is a flow chart of another method for managing file extension attributes according to an exemplary embodiment.
- the method for managing file extension attributes may include the following steps 1701-1703.
- the file storage client may further implement the target file extended attributes of the target node through the following steps 1701 to 1703 .
- the target node includes the third file to exemplarily illustrate steps 1701 to 1703.
- Step 1701 the file storage client receives a storage instruction, where the storage instruction is used to instruct to store a third file; the target file extension attribute of the third file is in a configured state.
- the Windows operating system sends a storage instruction to the file storage client, and the storage instruction is used to instruct to store the third file.
- the file storage client can obtain the file extension attribute of the third file to determine whether the target file extension attribute of the third file is in a configured state. If the target file extension attribute of the third file is in a configured state, step 1702 is executed. Otherwise, a storage request is directly sent to the object storage service node to request the object storage service node to store the third file.
- the target file extended attributes may include encryption attributes, compression attributes, etc., and the encryption attributes, compression attributes, etc. of the third file are Configured state.
- third file and the second file may be the same file, or may be different files, and this embodiment of the present application does not limit this.
- Step 1702 The file storage client performs the operation indicated by the target file extension attribute on the third file to obtain a fourth file.
- the file storage client when it is determined that the target file extension attribute of the third file is in a configured state, the file storage client performs the operation indicated by the target file extension attribute on the third file to obtain a fourth file.
- the target file extended attributes of the third file include encryption attributes, the encryption attributes of the third file are in a configured state, and the operation indicated by the encryption attributes in the configured state is an encryption operation.
- the file storage client performs an encryption operation on the second file to obtain an encrypted file (i.e., the fourth file).
- the target file extension attribute of the third file includes a compression attribute
- the compression attribute of the third file is in a configured state
- the operation indicated by the compression attribute in the configured state is a compression operation.
- the file storage client performs a compression operation on the second file to obtain a compressed file (i.e., the fourth file).
- Step 1703 The file storage client sends a second storage request to the object storage service node, where the second storage request is used to request the object storage service node to store a fourth file; the second storage request includes the fourth file.
- the file storage client after obtaining the fourth file, sends a second storage request to the object storage service node to request the object storage service node to store the fourth file.
- the object storage service node After receiving the second storage request, stores the fourth file in response to the second storage request, such as: the fourth file can overwrite the third file.
- steps 1701 to 1703 are illustratively described using the first file included in the target node as an example.
- the process of the file storage client implementing the target file extended attributes of the first directory/first subdirectory can refer to steps 1701 to 1703 and will not be repeated here.
- the file storage client after the file storage client receives the storage instruction, if the target file extension attribute of the file indicated by the storage instruction is in a configured state, the file storage client first performs the operation indicated by the target file extension attribute on the third file indicated by the storage instruction to obtain the fourth file, thereby realizing the target file extension attribute for the updated third file, thereby helping to ensure the accuracy of the provided file extension attribute.
- the file storage client obtains the file extension attributes (including hidden attributes) of the target node, it can directly transmit the file extension attributes of the target node to the operating system, that is, transparently transmit to the operating system.
- the operating system receives the file extension attributes of the target node, if the target node has been configured with hidden attributes, the operating system displays the target node according to the current display rule.
- the operating system displays the target node according to a preset rule, such as grayscale display of the target node. If the display rule is "do not show hidden items", the operating system does not display the target node.
- file extension attributes are implemented by the operating system, which helps to fully utilize the functions of the operating system and simplify the complexity of the file storage client.
- the file storage client/file extension attribute management device includes a hardware structure and/or software module corresponding to the execution of each function.
- the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
- the embodiment of the present application can divide the file storage client/file extension attribute management device into functional modules according to the above method.
- the file storage client/file extension attribute management device can include various functional modules corresponding to the various functional divisions, or two or more functions can be integrated into one processing module.
- the above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
- FIG19 shows a possible schematic diagram of the file storage client (referred to as file storage client 1900) involved in the above-mentioned embodiment.
- file storage client 1900 includes: a receiving module 1901, an attribute management module 1902 and a sending module 1903.
- Receiving module 1901 is used to receive an attribute setting instruction, and the attribute setting instruction indicates that the target file extension attribute of the target node is set to a target state, and the target state includes a configured state or an unconfigured state. For example, step 301 shown in FIG3.
- Attribute management module 1902 is used to determine an attribute setting request based on the attribute setting instruction and the target interface provided by the object storage service node; the interface provided by the object storage service node is used to indicate the attribute setting request.
- the format of the attribute setting request is used to request to set the target file extension attribute of the target node to the target state.
- the sending module 1903 is used to send the attribute setting request to the object storage service node to request the object storage service node to set the target file extension attribute of the target node to the target state.
- the attribute setting request includes message content and an operation command
- the message content is used to indicate the extended attribute of the target file
- the operation command is used to indicate the target status
- the attribute setting request includes message content, and the message content is used to indicate the target file extended attributes and the target status.
- the message content includes a value of an extended attribute of the target file, and the value of the extended attribute of the target file is the same as a value of the extended attribute of the target file in the Windows operating system.
- the file storage client further includes an attribute implementation module 1904.
- the attribute implementation module 1904 is used to: receive a target instruction, the target instruction is used to instruct to perform a target operation on a target node; the target operation is related to the target file extension attribute; based on the state of the target file extension attribute, determine the permission verification result of the target operation; the permission verification result includes passing the verification or failing the verification; if the permission verification result is failing the verification, return response information based on the target instruction; the response information is used to indicate that the target operation is refused to be performed on the target node.
- the attribute implementation module 1904 is further used to: when the permission check result is passed, based on the target instruction, return first response information; the first response information is used to indicate that the target operation is allowed to be performed on the target node.
- the attribute implementation module 1904 is also used to: obtain the first file based on the attribute setting instruction; perform the operation indicated by the attribute setting instruction on the first file to obtain the second file; send a first storage request to the object storage service node, the first storage request is used to request storage of the second file; the first storage request includes the second file.
- the attribute implementation module 1904 is also used to: receive a storage instruction, the storage instruction is used to indicate the storage of the third file; the target file extension attribute of the third file is in a configured state; perform the operation indicated by the target file extension attribute on the third file to obtain a fourth file; send a storage request to the object storage service node to request the object storage service node to store the fourth file; the storage request includes the fourth file.
- the attribute management module 1902 is further used to: receive an attribute acquisition instruction, the attribute acquisition instruction is used to instruct to acquire the file extension attribute of the target node; based on the attribute acquisition instruction, acquire and return the file extension attribute of the target node.
- the attribute management module 1902 is specifically configured to: obtain the file extension attribute of the target node from the storage medium of the electronic device based on the attribute acquisition instruction.
- the attribute management module 1902 is specifically used to: obtain the file extension attribute of the target node from the object storage service node based on the attribute acquisition instruction.
- the attribute management module 1902 is further used to write the file extension attributes of the target node obtained from the object storage service node into the storage medium of the electronic device.
- the attribute management module 1902 is further used to: receive a metadata acquisition instruction, the metadata acquisition instruction is used to instruct to obtain metadata of the target node; based on the metadata acquisition instruction, obtain and return target metadata of the target node; the target metadata of the target node includes file extension attributes of the target node.
- the attribute management module 1902 is specifically configured to: obtain target metadata of the target node from a storage medium of the electronic device based on a metadata acquisition instruction.
- the attribute management module 1902 is specifically used to: obtain target metadata of the target node from the object storage service node based on the metadata acquisition instruction.
- the attribute management module 1902 is also used to: receive a directory listing instruction, the directory listing instruction is used to instruct the listing of a target directory; based on the directory listing instruction, obtain and return target metadata of the target directory; the target metadata of the target directory includes file extension attributes of at least one file/subdirectory under the target directory.
- the attribute management module 1902 is specifically configured to: obtain target metadata of the target directory from a storage medium of the electronic device based on a metadata acquisition instruction.
- the attribute management module 1902 is specifically used to: obtain target metadata of the target directory from the object storage service node based on the metadata acquisition instruction.
- FIG20 shows a possible structural diagram of the file extension attribute management device (referred to as file extension attribute management device 2000) involved in the above embodiment.
- the actions performed by the file extension attribute management device 2000 are implemented by an object storage service node (such as a computing device) or by executing corresponding software by a computing device.
- the file extension attribute management device 2000 includes a receiving module 2001, a parsing module 2002 and a management module 2003.
- the receiving module 2001 is used to receive the attribute setting information sent by the file storage client of the object storage system.
- a property setting request is configured to request that a target file extension attribute of a target node be set to a target state, wherein the target state includes a configured state or an unconfigured state. For example, step 701 shown in FIG. 7 .
- a parsing module 2002 is configured to parse the property setting request through the target interface to obtain the content requested by the property setting request. For example, step 702 shown in FIG. 7 .
- a management module 2003 is configured to set the target file extension attribute of the target node to the target state based on the content requested by the property setting request. For example, step 703 shown in FIG. 7 .
- the management module 2003 is specifically used to: generate a target field of the target node based on the content requested by the attribute setting request; the target field of the target node is used to indicate the configured target file extended attributes; based on the identifier of the target node, store the target field of the target node.
- the management module 2003 is specifically used to: delete the target field of the target node based on the content requested by the attribute setting request; the target field of the target node is used to indicate that the target file extended attribute has been configured.
- the object storage service node stores a target string, which is used to indicate the state of the file extension attribute of the target node;
- the management module 2003 is specifically used to: when the target state is a configured state, based on the content requested by the attribute setting request, set the target bit of the target string to a first value; the target bit is used to indicate the target file extension attribute, and the first value is used to indicate the configured state; when the target state is an unconfigured state, based on the content requested by the attribute setting request, set the target bit of the target string to a second value; the second value is used to indicate the unconfigured state.
- the attribute setting request includes message content and an operation command
- the message content is used to indicate the extended attribute of the target file
- the operation command is used to indicate the target status
- the attribute setting request includes message content, and the message content is used to indicate the target file extended attributes and the target status.
- the attribute setting request includes the value of the target file extended attribute
- the management module 2003 is also used to: determine the value of the target file extended attribute based on the attribute setting request; when the value of the target file extended attribute is the same as the target value, set the target file extended attribute of the target node to the target state based on the content requested by the attribute setting request; the target value is the value of the target file extended attribute in the Windows operating system.
- the management module 2003 is further used to: when the value of the target file extended attribute is different from the target value, return a prompt message to the file storage client, where the prompt message is used to indicate that there is an error in the value of the target file extended attribute.
- the receiving module 2001 is further used to: receive an attribute acquisition request sent by the file storage client, the attribute acquisition request is used to request to obtain the file extension attributes of the target node; the management module 2003 is used to: return the file extension attributes of the target node to the file storage client based on the attribute acquisition request.
- the receiving module 2001 is also used for: the object storage service node receives a metadata acquisition request sent by the file storage client, and the metadata acquisition request is used to request to obtain the metadata of the target node; the management module 200 is also used for: based on the metadata acquisition request, returning the target metadata of the target node to the file storage client; the target metadata of the target node includes the file extension attributes of the target node.
- the receiving module 2001 is also used to: receive a directory listing request sent by the file storage client, the directory listing request is used to request to obtain the metadata of the target directory; the management module 200 is also used to: return the target metadata of the target directory to the file storage client based on the directory listing request; the target metadata of the target directory includes the file extension attributes of at least one file/subdirectory under the target directory.
- the receiving module 2001 is further used to: receive a deletion request sent by the file storage client, the deletion request is used to request deletion of metadata of the target node; the management module 2003 is further used to: delete the file extension attribute of the target node based on the deletion request.
- the receiving module 2001, the parsing module 2002 and the management module 2003 can be implemented by software or by hardware.
- the implementation of the parsing module 2002 is described below by taking the parsing module 2002 as an example.
- the implementation of the receiving module 2001 and the management module 2003 can refer to the implementation of the attribute parsing module 2002.
- the parsing module 2002 may include code running on a computing instance.
- 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.
- the parsing module 2002 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 may be distributed in the same region (region) or in different regions.
- the multiple hosts/virtual machines/containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple data centers with close geographical locations. Among them, usually a region may include multiple AZs.
- VPC virtual private cloud
- a VPC is set in one region.
- a communication gateway needs to be set in each VPC to realize the interconnection between VPCs through the communication gateway.
- the parsing module 2002 may include at least one computing device, such as a server, etc.
- the parsing module 2002 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD).
- ASIC application-specific integrated circuit
- PLD programmable logic device
- 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.
- CPLD complex programmable logical device
- FPGA field-programmable gate array
- GAL generic array logic
- the multiple computing devices included in the analysis module 2002 can be distributed in the same region or in different regions.
- the multiple computing devices included in the analysis module 2002 can be distributed in the same AZ or in different AZs.
- the multiple computing devices included in the analysis module 2002 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.
- the parsing module 2002 can be used to execute any step in the file extension attribute management method
- the receiving module 2001 can be used to execute any step in the file extension attribute management method
- the management module 2003 can be used to execute any step in the file extension attribute management method, or the steps that the receiving module 2001, the parsing module 2002 and the management module 2003 are responsible for implementing can be specified as needed, and the receiving module 2001, the parsing module 2002 and the management module 2003 respectively implement different steps in the file extension attribute management method to realize all the functions of the file extension attribute management device.
- the embodiment of the present application also provides a computing device.
- the computing device 210 includes: a bus 212, a processor 214, a memory 216, and a communication interface 218.
- the processor 214, the memory 216, and the communication interface 218 communicate with each other via the bus 212.
- the computing device 210 can 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 210.
- the bus 212 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
- the bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one line is used in FIG. 21, but it does not mean that there is only one bus or one type of bus.
- the bus 212 may include a path for transmitting information between various components of the computing device 210 (e.g., the memory 216, the processor 214, and the communication interface 218).
- the processor 214 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).
- CPU central processing unit
- GPU graphics processing unit
- MP microprocessor
- DSP digital signal processor
- the memory 216 may include a volatile memory (volatile memory), such as a random access memory (RAM).
- volatile memory such as a random access memory (RAM).
- RAM random access memory
- non-volatile memory non-volatile memory
- ROM read-only memory
- flash memory flash memory
- HDD hard disk drive
- SSD solid state drive
- the memory 216 stores executable program codes, and the processor 214 executes the executable program codes to respectively implement the functions of the aforementioned receiving module 2001, parsing module 2002, and management module 2003, thereby implementing the file extension attribute management method. That is, the memory 216 stores instructions for executing the file extension attribute management method.
- the memory 216 stores executable program codes
- the processor 214 executes the executable program codes to respectively implement the functions of the aforementioned receiving module 2001, parsing module 2002, and management module 2003, thereby implementing a file extension attribute management method. That is, the memory 216 stores instructions for executing a file extension attribute management method.
- the communication interface 218 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 210 and other devices or communication networks.
- a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 210 and other devices or communication networks.
- the computing device 210 may be a computing device in an object storage service node (as shown in FIG. 1 and FIG. 2 ).
- the embodiment of the present application also provides a computing device cluster.
- the computing device cluster includes at least one computing device.
- the computing device can be a server, for example, a cloud server, a central server, an edge server, or a local server in a local data center.
- the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.
- the computing device cluster 220 includes at least one computing device 210.
- the memory 216 in one or more computing devices 210 in the computing device cluster 220 may store the same instructions for executing the file extension attribute management method.
- the memory 216 of one or more computing devices 210 in the computing device cluster 220 may also respectively store some instructions for executing the file extension attribute management method.
- the combination of one or more computing devices 210 may jointly execute the instructions for executing the file extension attribute management method.
- the memory 216 in different computing devices 210 in the computing device cluster 220 may store different instructions, which are respectively used to execute part of the functions of the file extension attribute management apparatus 2000. That is, the memory 216 in different computing devices 210 may store different instructions.
- the instruction may implement the functions of one or more modules among the receiving module 2001 , the parsing module 2002 and the management module 2003 .
- the computing device cluster 220 can be used as an object storage service node (as shown in Figures 1 and 2) to provide cloud services for cloud service tenants.
- the relevant description of at least one computing device 210 in the computing device cluster shown in Figure 22 can refer to the relevant description of the computing device shown in Figure 21, which will not be repeated here.
- the following is an exemplary introduction to the connection method of the computing device cluster.
- one or more computing devices in a computing device cluster may be connected via a network.
- the network may be a wide area network or a local area network, etc.
- FIG. 23 shows a possible implementation. As shown in FIG. 23 , two computing devices (such as computing device 210A and computing device 210B) are connected via a network. Specifically, the network is connected via the communication interface of each computing device.
- the memory 216 in the computing device 210A stores instructions for executing the functions of the receiving module 2001 and the management module 2003.
- the memory 216 in the computing device 210B stores instructions for executing the functions of the parsing module 2002.
- connection method between the computing device clusters shown in Figure 23 can be considered to be that the file extension attribute management method provided in this application requires higher computing resources, so it is considered to hand over the functions implemented by the receiving module 2001 and the management module 2003 to the computing device 210A for execution, and the functions implemented by the parsing module 2002 to the computing device 210B for execution.
- computing device 210A shown in FIG23 may also be accomplished by multiple computing devices 210.
- functionality of the computing device 210B may also be accomplished by multiple computing devices 210.
- the embodiment of the present application also provides another computing device cluster.
- the connection relationship between the computing devices in the computing device cluster can be similar to the connection mode of the computing device cluster shown in Figure 21.
- the difference is that the memory 216 in one or more computing devices 210 in the computing device cluster can store the same instructions for executing the file extension attribute management method.
- the memory 216 of one or more computing devices 210 in the computing device cluster may also store partial instructions for executing the file extension attribute management method.
- the combination of one or more computing devices 210 may jointly execute the instructions for executing the file extension attribute management method.
- the embodiment of the present application also provides an electronic device.
- the electronic device 240 includes: a bus 242, a processor 244, a memory 246, and a communication interface 248.
- the processor 244, the memory 246, and the communication interface 248 communicate with each other via the bus 242.
- the electronic device 240 can 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 electronic device 240.
- the memory 246 stores executable program codes, and the processor 244 executes the executable program codes to respectively implement the functions of the aforementioned receiving module 1901, the attribute management module 1902, the sending module 1903, and the attribute implementation module 1904, thereby implementing the file extended attribute management method. That is, the memory 246 stores instructions for executing the file extended attribute management method.
- the electronic device 240 may be an electronic device used by the cloud service tenant shown in Figures 1 and 2.
- the bus 242, processor 244, memory 246, and communication interface 248 of the electronic device 240 reference may be made to the related descriptions of the computing device shown in Figure 21 above, which will not be repeated here.
- the embodiment of the present application also provides a computer program product.
- the computer program product may be a software or program product that includes a computer program/instruction and can be run on an electronic device or stored in any available medium.
- the computer program product executes the file extension attribute management method.
- the embodiment of the present application also provides a computer program product.
- the computer program product may be a software or program product that includes a computer program/instruction and can be run on a computing device or stored in any available medium.
- the computer program product executes the file extension attribute management method.
- 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 electronic device or a data storage device such as a data center containing one or more available media.
- the computer-readable storage medium includes a computer program/instruction that instructs the electronic device to execute the file extension attribute management method.
- 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 a computing device or a data storage device such as a data center that includes one or more available media.
- the computer-readable storage medium includes a computer program/instruction that instructs the computing device to execute the file extension attribute management method.
- the available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state drive), etc.
- a magnetic medium eg, a floppy disk, a hard disk, a magnetic tape
- an optical medium eg, a DVD
- a semiconductor medium eg, a solid state drive
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本申请要求于2023年11月27日提交国家知识产权局、申请号为202311607099.7、申请名称为“一种数据处理的方法、装置及其他设备”,以及于2024年03月12日提交国家知识产权局、申请号为202410284846.6、申请名称为“文件扩展属性管理方法、文件存储客户端及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on November 27, 2023, with application number 202311607099.7 and application name “A method, device and other equipment for data processing”, and the Chinese patent application filed with the State Intellectual Property Office on March 12, 2024, with application number 202410284846.6 and application name “File extension attribute management method, file storage client and device”, all contents of which are incorporated by reference in this application.
本申请涉及存储技术领域,具体涉及一种文件扩展属性管理方法、文件存储客户端及装置。The present application relates to the field of storage technology, and in particular to a file extension attribute management method, a file storage client, and a device.
文件存储是将数据以文件的形式存储在文件存储服务节点上,对象存储是将数据以对象的形式存储在对象存储服务节点上。由于对象存储没有目录和文件分层,因此,采用对象存储的对象存储服务节点可以存储大量的数据,这使得对象存储的应用越来越广泛。File storage is to store data in the form of files on file storage service nodes, and object storage is to store data in the form of objects on object storage service nodes. Since object storage has no directory and file hierarchy, object storage service nodes using object storage can store a large amount of data, which makes object storage more and more widely used.
当前,为了兼容部分只能通过文件接口访问数据的应用程序(即文件生态的应用程序,也可以称为文件应用),如:桌面云应用程序、媒资视频编辑应用程序等,对象存储系统(包括对象储存服务节点和文件存储客户端)提供了基于对象存储的文件服务,也就是说,文件应用可以通过对象存储系统的文件存储客户端访问对象存储服务节点上以对象的形式存储的数据。Currently, in order to be compatible with some applications that can only access data through file interfaces (i.e., file ecosystem applications, also called file applications), such as desktop cloud applications, media video editing applications, etc., the object storage system (including object storage service nodes and file storage clients) provides object storage-based file services. That is to say, file applications can access data stored in the form of objects on object storage service nodes through the file storage client of the object storage system.
然而,由于文件扩展属性使用的文件语义和对象存储的语义与存在较大区别,导致对象存储系统提供的文件服务无法实现文件扩展属性的管理。However, since the file semantics used by file extension attributes and the semantics of object storage are quite different, the file service provided by the object storage system cannot manage file extension attributes.
发明内容Summary of the invention
本申请提供了一种文件扩展属性管理方法、文件存储客户端及装置,能够对对象存储系统提供的文件服务进行文件扩展属性的管理,有助于对象存储系统提供更完善的文件服务。The present application provides a file extension attribute management method, a file storage client and a device, which can manage the file extension attributes of the file service provided by the object storage system, and help the object storage system provide more complete file services.
为了达到上述目的,本申请采用了如下技术方案:In order to achieve the above objectives, this application adopts the following technical solutions:
第一方面,提供了一种文件扩展属性管理方法,应用于文件存储客户端,文件存储客户端运行在windows操作系统上,windows操作系统还提供本地文件系统,本地文件系统的目录树包括目标节点,目标节点为文件或目录,文件或目录存储在对象存储服务节点;该方法包括:接收属性设置指令,属性设置指令指示了将目标节点的目标文件扩展属性设置为目标状态,目标状态包括已配置状态或未配置状态;基于属性设置指令以及对象存储服务节点提供的目标接口,确定属性设置请求;对象存储服务节点提供的接口用于指示属性设置请求的格式,属性设置请求用于请求将目标节点的目标文件扩展属性设置为目标状态;向对象存储服务节点发送属性设置请求,以请求对象存储服务节点将目标节点的目标文件扩展属性设置为目标状态。In a first aspect, a method for managing file extension attributes is provided, which is applied to a file storage client, wherein the file storage client runs on a Windows operating system, and the Windows operating system also provides a local file system, wherein a directory tree of the local file system includes a target node, wherein the target node is a file or a directory, and the file or the directory is stored in an object storage service node; the method includes: receiving an attribute setting instruction, wherein the attribute setting instruction indicates setting a target file extension attribute of the target node to a target state, wherein the target state includes a configured state or an unconfigured state; determining an attribute setting request based on the attribute setting instruction and a target interface provided by the object storage service node; wherein the interface provided by the object storage service node is used to indicate a format of the attribute setting request, and the attribute setting request is used to request setting a target file extension attribute of the target node to a target state; and sending an attribute setting request to the object storage service node to request the object storage service node to set the target file extension attribute of the target node to a target state.
该方案中,文件存储客户端运行在windows操作系统上,windows操作系统提供的本地文件系统的目录树包括目标节点,目标节点可以为文件或目录,文件或目录存储在对象存储服务节点上。在此基础上,文件存储客户端接收到属性设置指令后,可以基于属性设置指令指示的内容以及对象存储服务节点提供的目标接口,确定属性设置请求,用于请求将目标节点的目标文件扩展属性设置为目标状态,之后,文件存储客户端向对象存储服务节点发送属性设置请求,以请求对象存储服务节点将目标节点的目标文件扩展属性设置为目标状态。In this solution, the file storage client runs on the Windows operating system. The directory tree of the local file system provided by the Windows operating system includes a target node, which can be a file or a directory. The file or directory is stored on the object storage service node. On this basis, after receiving the attribute setting instruction, the file storage client can determine the attribute setting request based on the content indicated by the attribute setting instruction and the target interface provided by the object storage service node, so as to request to set the target file extension attribute of the target node to the target state. After that, the file storage client sends the attribute setting request to the object storage service node to request the object storage service node to set the target file extension attribute of the target node to the target state.
在需要管理文件扩展属性时,文件存储客户端通过属性设置指令以及对象存储服务节点提供的目标接口指示的格式确定属性设置请求,实现将文件扩展属性的语义(即属性设置指令)转换成对象存储的语义(即属性设置请求),进而使得属性设置请求可以使用对象存储的语义指示属性设置指令所指示的内容,这样,对象存储服务节点便可以准确识别属性设置请求所请求的内容,从而基于属性设置请求所请求的内容管理文件扩展属性。由此,对象存储系统通过本申请的方案可以完善对象存储的语义,使得对象存储的语义可以兼容文件扩展属性,从而在提供文件服务的基础上提供文件扩展属性的管理服务,进而实现提供更完善的文件服务,使得对象存储可以更好的兼容文件应用。When it is necessary to manage file extension attributes, the file storage client determines the attribute setting request through the attribute setting instruction and the format indicated by the target interface provided by the object storage service node, so as to convert the semantics of the file extension attributes (i.e., the attribute setting instruction) into the semantics of the object storage (i.e., the attribute setting request), so that the attribute setting request can use the semantics of the object storage to indicate the content indicated by the attribute setting instruction, so that the object storage service node can accurately identify the content requested by the attribute setting request, and thus manage the file extension attributes based on the content requested by the attribute setting request. Therefore, the object storage system can improve the semantics of object storage through the scheme of the present application, so that the semantics of object storage can be compatible with file extension attributes, thereby providing file extension attribute management services on the basis of providing file services, thereby realizing the provision of more complete file services, so that object storage can be better compatible with file applications.
在一种可能的实现方式中,属性设置请求包括消息内容和操作命令,消息内容用于指示目标文件扩展属性,操作命令用于指示目标状态。这样,有助于遵循目标接口的请求表现形式。In a possible implementation, the attribute setting request includes a message content and an operation command, wherein the message content is used to indicate the extended attribute of the target file, and the operation command is used to indicate the target state. This helps to comply with the request representation of the target interface.
另一种可能的实现方式中,属性设置请求包括消息内容,消息内容用于指示目标文件扩展属性以及目标状态。这样,有助于提高指示目标文件扩展属性以及目标状态的方式多样性。In another possible implementation, the attribute setting request includes message content, and the message content is used to indicate the target file extended attribute and the target state. In this way, it is helpful to increase the diversity of the methods of indicating the target file extended attribute and the target state.
另一种可能的实现方式中,消息内容包括目标文件扩展属性的取值,目标文件扩展属性的取值与目标文件扩展属性在Windows操作系统中的值相同。这样,有助于提高对象存储语义与文件扩展属性语义转换 过程的准确性。In another possible implementation, the message content includes the value of the target file's extended attribute, and the value of the target file's extended attribute is the same as the value of the target file's extended attribute in the Windows operating system. This helps improve the semantic conversion between object storage semantics and file extended attribute semantics. Accuracy of the process.
另一种可能的实现方式中,该方法还包括:接收目标指令,目标指令用于指示对目标节点执行目标操作;目标操作与目标文件扩展属性相关;基于目标文件扩展属性的状态,确定目标操作的权限校验结果;权限校验结果包括通过校验或未通过校验;在权限校验结果为未通过校验的情况下,基于目标指令,返回响应信息;响应信息用于指示拒绝对目标节点执行目标操作。对象存储系统的文件存储客户端提供了文件扩展属性的实现功能,如:实现只读属性,从而有助于对象存储系统提供更完善的文件扩展属性管理服务。In another possible implementation, the method further includes: receiving a target instruction, the target instruction is used to instruct to perform a target operation on a target node; the target operation is related to a target file extension attribute; based on the state of the target file extension attribute, determining a permission check result of the target operation; the permission check result includes passing the check or failing the check; in the case where the permission check result is failing the check, returning response information based on the target instruction; the response information is used to indicate that the target operation is refused to be performed on the target node. The file storage client of the object storage system provides a function for implementing file extension attributes, such as implementing a read-only attribute, thereby helping the object storage system to provide a more complete file extension attribute management service.
另一种可能的实现方式中,该方法还包括:在权限校验结果为通过校验的情况下,基于目标指令,返回第一响应信息;第一响应信息用于指示允许对目标节点执行目标操作。In another possible implementation, the method further includes: when the permission check result is passed, returning first response information based on the target instruction; the first response information is used to indicate that the target operation is allowed to be performed on the target node.
另一种可能的实现方式中,在目标节点为第一文件的情况下,该方法还包括:基于属性设置指令,获取第一文件;对第一文件执行属性设置指令指示的操作,以得到第二文件;向对象存储服务节点发送第一存储请求,第一存储请求用于请求存储第二文件;第一存储请求包括第二文件。In another possible implementation, when the target node is the first file, the method also includes: obtaining the first file based on the attribute setting instruction; performing the operation indicated by the attribute setting instruction on the first file to obtain the second file; sending a first storage request to the object storage service node, the first storage request being used to request storage of the second file; the first storage request includes the second file.
该方式中,文件存储客户端通过获取属性设置指令指示的第一文件,并对第一文件执行属性设置指令指示的操作,从而为第一文件实现目标文件扩展属性,如:为第一文件实现加密属性、压缩属性等。此外,通过向对象存储服务节点发送第一存储请求,实现为对象存储服务节点提供无关windows文件扩展属性的语义的待存储数据(即第二文件),从而实现无需对象存储服务节点执行与windows文件扩展属性的语义相关的操作,如:加密操作、压缩操作等。In this manner, the file storage client obtains the first file indicated by the attribute setting instruction and performs the operation indicated by the attribute setting instruction on the first file, thereby realizing the target file extension attribute for the first file, such as: realizing the encryption attribute, compression attribute, etc. for the first file. In addition, by sending the first storage request to the object storage service node, the object storage service node is provided with the data to be stored (i.e., the second file) that has no semantics related to the windows file extension attribute, thereby realizing that the object storage service node does not need to perform operations related to the semantics of the windows file extension attribute, such as: encryption operation, compression operation, etc.
另一种可能的实现方式中,在目标节点为第三文件的情况下,该方法还包括:接收存储指令,存储指令用于指示存储第三文件;第三文件的目标文件扩展属性为已配置状态;对第三文件执行目标文件扩展属性指示的操作,以得到第四文件;向对象存储服务节点发送第二存储请求,第二存储请求用于请求对象存储服务节点存储第四文件;存储请求包括第四文件。该方式中,文件存储客户端提供了文件扩展属性的实现功能,如:实现加密属性、压缩属性等,从而有助于对象存储系统提供更完善的文件扩展属性管理服务。In another possible implementation, when the target node is the third file, the method further includes: receiving a storage instruction, the storage instruction is used to instruct to store the third file; the target file extension attribute of the third file is in a configured state; performing the operation indicated by the target file extension attribute on the third file to obtain a fourth file; sending a second storage request to the object storage service node, the second storage request is used to request the object storage service node to store the fourth file; the storage request includes the fourth file. In this method, the file storage client provides a function for implementing file extension attributes, such as: implementing encryption attributes, compression attributes, etc., thereby helping the object storage system to provide a more complete file extension attribute management service.
另一种可能的实现方式中,该方法还包括:接收属性获取指令,属性获取指令用于指示获取目标节点的文件扩展属性;基于属性获取指令,获取并返回目标节点的文件扩展属性。对象存储系统的文件存储客户端提供了文件扩展属性的查询功能,从而有助于对象存储系统提供更完善的文件扩展属性管理服务。In another possible implementation, the method further includes: receiving an attribute acquisition instruction, the attribute acquisition instruction being used to instruct to acquire the file extension attribute of the target node; and acquiring and returning the file extension attribute of the target node based on the attribute acquisition instruction. The file storage client of the object storage system provides a query function for the file extension attribute, thereby helping the object storage system to provide a more complete file extension attribute management service.
另一种可能的实现方式中,文件存储客户端运行在电子设备上;基于属性获取指令,获取目标节点的文件扩展属性,包括:基于属性获取指令,从电子设备的存储介质获取目标节点的文件扩展属性。这样,有助于提高文件扩展属性的获取效率。In another possible implementation, the file storage client runs on the electronic device; based on the attribute acquisition instruction, the file extended attribute of the target node is acquired, including: based on the attribute acquisition instruction, acquiring the file extended attribute of the target node from the storage medium of the electronic device. In this way, the efficiency of acquiring the file extended attribute is improved.
另一种可能的实现方式中,基于属性获取指令,获取目标节点的文件扩展属性包括:基于属性获取指令,从对象存储服务节点获取目标节点的文件扩展属性。这样,有助于提高获取的文件扩展属性的准确性。In another possible implementation, obtaining the file extension attribute of the target node based on the attribute obtaining instruction includes: obtaining the file extension attribute of the target node from the object storage service node based on the attribute obtaining instruction. This helps to improve the accuracy of the obtained file extension attribute.
另一种可能的实现方式中,该方法还包括:将从对象存储服务节点获取的目标节点的文件扩展属性,写入电子设备的存储介质中。这样,后续需要获取文件扩展属性时,便可以从本地存储介质中获取,从而有助于提高后续获取文件扩展属性的效率。In another possible implementation, the method further includes: writing the file extension attributes of the target node obtained from the object storage service node into the storage medium of the electronic device. In this way, when the file extension attributes need to be obtained later, they can be obtained from the local storage medium, which helps to improve the efficiency of obtaining the file extension attributes later.
另一种可能的实现方式中,该方法还包括:接收元数据获取指令,元数据获取指令用于指示获取目标节点的元数据;基于元数据获取指令,获取并返回目标节点的目标元数据;目标节点的目标元数据包括目标节点的文件扩展属性。在获取目标节点的元数据时,同时提供目标节点的文件扩展属性,这样,有助于提高目标节点的元数据的完整性。In another possible implementation, the method further includes: receiving a metadata acquisition instruction, the metadata acquisition instruction is used to instruct to acquire metadata of the target node; based on the metadata acquisition instruction, acquiring and returning target metadata of the target node; the target metadata of the target node includes file extension attributes of the target node. When acquiring the metadata of the target node, the file extension attributes of the target node are provided at the same time, which helps to improve the integrity of the metadata of the target node.
另一种可能的实现方式中,文件存储客户端运行在电子设备上;基于元数据获取指令,获取目标节点的目标元数据,包括:基于元数据获取指令,从电子设备的存储介质获取目标节点的目标元数据。这样,有助于提高目标元数据的获取效率。In another possible implementation, the file storage client runs on the electronic device; based on the metadata acquisition instruction, the target metadata of the target node is acquired, including: based on the metadata acquisition instruction, the target metadata of the target node is acquired from the storage medium of the electronic device. This helps to improve the efficiency of acquiring the target metadata.
另一种可能的实现方式中,基于元数据获取指令,获取目标节点的目标元数据,包括:基于元数据获取指令,从对象存储服务节点获取目标节点的目标元数据。这样,有助于提高目标元数据的准确性。In another possible implementation, obtaining target metadata of the target node based on the metadata obtaining instruction includes: obtaining the target metadata of the target node from the object storage service node based on the metadata obtaining instruction. This helps to improve the accuracy of the target metadata.
另一种可能的实现方式中,在目标节点为目标目录的情况下,该方法还包括:接收目录列举指令,目录列举指令用于指示列举目标目录;基于目录列举指令,获取并返回目标目录的目标元数据;目标目录的目标元数据包括目标目录下的至少一个文件/子目录的文件扩展属性。该方式中,在列举目录时,同时提供目录下至少一个文件/子目录的文件扩展属性,这样,有助于提高列举目录的全面性。In another possible implementation, when the target node is a target directory, the method further includes: receiving a directory listing instruction, the directory listing instruction is used to instruct to list the target directory; based on the directory listing instruction, obtaining and returning target metadata of the target directory; the target metadata of the target directory includes file extension attributes of at least one file/subdirectory under the target directory. In this method, when listing the directory, the file extension attributes of at least one file/subdirectory under the directory are also provided, which helps to improve the comprehensiveness of the listed directory.
另一种可能的实现方式中,文件存储客户端运行在电子设备上;基于目录列举指令,获取目标目录的目标元数据,包括:基于目录列举指令,从电子设备的存储介质获取目标目录的目标元数据。这样,有助于提高目标元数据的获取效率。In another possible implementation, the file storage client runs on the electronic device; based on the directory listing instruction, the target metadata of the target directory is obtained, including: based on the directory listing instruction, the target metadata of the target directory is obtained from the storage medium of the electronic device. This helps to improve the efficiency of obtaining the target metadata.
另一种可能的实现方式中,基于目录列举指令,获取目标目录的目标元数据,包括:基于目录列举指 令,从对象存储服务节点获取目标目录的目标元数据。这样,有助于提高目标元数据的准确性。In another possible implementation, based on the directory listing instruction, obtaining the target metadata of the target directory includes: based on the directory listing instruction command to obtain the target metadata of the target directory from the object storage service node. This helps to improve the accuracy of the target metadata.
第二方面,提供了一种文件扩展属性管理方法,应用于对象存储服务节点,对象存储服务节点上存储有目标对象,对象存储服务节点用于将目标对象映射为目录树上的目标节点,目标节点为文件或目录;该方法包括:接收文件存储客户端发送的属性设置请求,属性设置请求的格式是根据对象存储服务节点提供的目标接口确定的,属性设置请求用于请求将目标节点的目标文件扩展属性设置为目标状态,目标状态包括已配置状态或未配置状态;通过目标接口解析属性设置请求,以得到属性设置请求所请求的内容;对象存储服务节点基于属性设置请求所请求的内容,将目标节点的目标文件扩展属性设置为目标状态。In a second aspect, a file extension attribute management method is provided, which is applied to an object storage service node, where a target object is stored on the object storage service node, and the object storage service node is used to map the target object to a target node on a directory tree, where the target node is a file or a directory; the method includes: receiving an attribute setting request sent by a file storage client, where the format of the attribute setting request is determined according to a target interface provided by the object storage service node, where the attribute setting request is used to request that a target file extension attribute of the target node be set to a target state, where the target state includes a configured state or an unconfigured state; parsing the attribute setting request through the target interface to obtain the content requested by the attribute setting request; and the object storage service node sets the target file extension attribute of the target node to the target state based on the content requested by the attribute setting request.
该方案中,对象存储服务节点接收到文件存储客户端发送的属性设置请求后,通过解析属性设置请求确定属性设置请求所请求的内容,即将目标节点的目标文件扩展属性设置为目标状态,从而基于属性设置请求所请求的内容,将目标节点的目标文件扩展属性设置为目标状态,进而实现完成文件扩展属性的管理。In this scheme, after the object storage service node receives the attribute setting request sent by the file storage client, it determines the content requested by the attribute setting request by parsing the attribute setting request, that is, sets the target file extension attribute of the target node to the target state, and thus sets the target file extension attribute of the target node to the target state based on the content requested by the attribute setting request, thereby completing the management of file extension attributes.
由于属性设置请求是根据对象存储服务节点提供的接口确定的,因此,属性设置请求是通过对象存储的语义指示所请求内容,这样,对象存储服务节点可以准确识别出属性设置请求所请求内容,从而能够保证实现管理文件扩展属性。由此,对象存储系统通过本申请的方案可以完善对象存储的语义,使得对象存储的语义可以兼容文件扩展属性,从而在提供文件服务的基础上提供文件扩展属性的管理服务,进而提供更高完善的文件服务,使得对象存储可以更好的兼容文件应用。Since the property setting request is determined according to the interface provided by the object storage service node, the property setting request indicates the requested content through the semantics of the object storage, so that the object storage service node can accurately identify the requested content of the property setting request, thereby ensuring the management of file extension attributes. Therefore, the object storage system can improve the semantics of object storage through the solution of the present application, so that the semantics of object storage can be compatible with file extension attributes, thereby providing file extension attribute management services on the basis of providing file services, and further providing more complete file services, so that object storage can be better compatible with file applications.
在一种可能的实现方式中,在目标状态为已配置状态的情况下,基于属性设置请求所请求的内容,将目标节点的目标文件扩展属性设置为目标状态,包括:基于属性设置请求所请求的内容,生成目标节点的目标字段;目标节点的目标字段用于指示已配置目标文件扩展属性;基于目标节点的标识,存储目标节点的目标字段。该实现方式中,对象存储服务节点通过存储目标字段,指示目标节点已配置目标文件扩展属性,即目标文件扩展属性的状态为已配置状态,这样,有助于提高目标文件扩展属性的状态指示的准确性。In a possible implementation, when the target state is in the configured state, the target file extension attribute of the target node is set to the target state based on the content requested by the attribute setting request, including: generating a target field of the target node based on the content requested by the attribute setting request; the target field of the target node is used to indicate that the target file extension attribute has been configured; based on the identifier of the target node, storing the target field of the target node. In this implementation, the object storage service node indicates that the target file extension attribute has been configured on the target node by storing the target field, that is, the state of the target file extension attribute is in the configured state, which helps to improve the accuracy of the state indication of the target file extension attribute.
另一种可能的实现方式中,在目标状态为未配置状态的情况下,基于属性设置请求所请求的内容,将目标节点的目标文件扩展属性设置为目标状态,包括:基于属性设置请求所请求的内容,删除目标节点的目标字段;目标节点的目标字段用于指示已配置目标文件扩展属性。In another possible implementation, when the target state is an unconfigured state, the target file extended attributes of the target node are set to the target state based on the content requested by the attribute setting request, including: deleting the target field of the target node based on the content requested by the attribute setting request; the target field of the target node is used to indicate that the target file extended attributes have been configured.
该实现方式中,对象存储服务节点通过删除目标字段,也即,通过未存储有目标字段实现指示目标节点未配置目标文件扩展属性,这样,有助于提高目标文件扩展属性的状态指示的准确性。In this implementation, the object storage service node indicates that the target node is not configured with the target file extension attribute by deleting the target field, that is, by not storing the target field. This helps to improve the accuracy of the status indication of the target file extension attribute.
另一种可能的实现方式中,对象存储服务节点存储有目标字符串,目标字符串用于指示目标节点的文件扩展属性的状态;基于属性设置请求所请求的内容,将目标节点的目标文件扩展属性设置为目标状态,包括:在目标状态为已配置状态的情况下,基于属性设置请求所请求的内容,将目标字符串的目标位设置为第一值;目标位用于指示目标文件扩展属性,第一值用于指示已配置状态;在目标状态为未配置状态的情况下,基于属性设置请求所请求的内容,将目标字符串的目标位设置为第二值;第二值用于指示未配置状态。该实现方式中,通过一个字符串的不同位指示不同的文件扩展属性,并通过取值指示不同的状态,这样,有助于减少文件扩展属性占相关字段用的存储空间。In another possible implementation, the object storage service node stores a target string, and the target string is used to indicate the state of the file extension attribute of the target node; based on the content requested by the attribute setting request, the target file extension attribute of the target node is set to the target state, including: when the target state is the configured state, based on the content requested by the attribute setting request, the target bit of the target string is set to a first value; the target bit is used to indicate the target file extension attribute, and the first value is used to indicate the configured state; when the target state is the unconfigured state, based on the content requested by the attribute setting request, the target bit of the target string is set to a second value; the second value is used to indicate the unconfigured state. In this implementation, different file extension attributes are indicated by different bits of a string, and different states are indicated by values, which helps to reduce the storage space occupied by the file extension attributes for related fields.
另一种可能的实现方式中,属性设置请求包括消息内容和操作命令,消息内容用于指示目标文件扩展属性,操作命令用于指示目标状态。或者,属性设置请求包括消息内容,消息内容用于指示目标文件扩展属性以及目标状态。In another possible implementation, the property setting request includes a message content and an operation command, the message content is used to indicate the target file extended attribute, and the operation command is used to indicate the target state. Alternatively, the property setting request includes a message content, and the message content is used to indicate the target file extended attribute and the target state.
另一种可能的实现方式中,属性设置请求包括目标文件扩展属性的取值;对象存储服务节点基于属性设置请求所请求的内容,将目标节点的目标文件扩展属性设置为目标状态,包括:基于属性设置请求,确定目标文件扩展属性的取值;在目标文件扩展属性的取值与目标值相同的情况下,基于属性设置请求所请求的内容,将目标节点的目标文件扩展属性设置为目标状态;目标值为目标文件扩展属性在windows操作系统中的值。该实现方式中,通过对目标文件扩展属性的取值进行校验,有助于提高后续文件扩展属性管理的准确性In another possible implementation, the property setting request includes the value of the target file extension attribute; the object storage service node sets the target file extension attribute of the target node to the target state based on the content requested by the property setting request, including: determining the value of the target file extension attribute based on the property setting request; when the value of the target file extension attribute is the same as the target value, setting the target file extension attribute of the target node to the target state based on the content requested by the property setting request; the target value is the value of the target file extension attribute in the Windows operating system. In this implementation, by verifying the value of the target file extension attribute, it helps to improve the accuracy of subsequent file extension attribute management.
另一种可能的实现方式中,该方法还包括:在目标文件扩展属性的取值与目标值不相同的情况下,向文件存储客户端返回提示信息,提示信息用于指示目标文件扩展属性的取值存在错误。这样,有助于文件存储客户端及时调整属性设置请求的生成逻辑,避免后续产生错误的请求。In another possible implementation, the method further includes: when the value of the target file extension attribute is different from the target value, returning a prompt message to the file storage client, the prompt message is used to indicate that the value of the target file extension attribute is wrong. In this way, it is helpful for the file storage client to adjust the generation logic of the attribute setting request in time to avoid subsequent wrong requests.
另一种可能的实现方式中,该法还包括:接收文件存储客户端发送的属性获取请求,属性获取请求用于请求获取目标节点的文件扩展属性;基于属性获取请求,向文件存储客户端返回目标节点的文件扩展属性。该方式中,对象存储服务节点提供了文件扩展属性的查询服务。In another possible implementation, the method further includes: receiving an attribute acquisition request sent by a file storage client, the attribute acquisition request being used to request to acquire file extended attributes of a target node; and returning the file extended attributes of the target node to the file storage client based on the attribute acquisition request. In this method, the object storage service node provides a query service for file extended attributes.
另一种可能的实现方式中,该方法还包括:接收文件存储客户端发送的元数据获取请求,元数据获取请求用于请求获取目标节点的元数据;基于元数据获取请求,向文件存储客户端返回目标节点的目标元数 据;目标节点的目标元数据包括目标节点的文件扩展属性。该方式中,在请求获取目标节点的元数据时,同时提供目标节点的文件扩展属性,有助于提高目标节点的元数据的完整性。In another possible implementation, the method further includes: receiving a metadata acquisition request sent by the file storage client, the metadata acquisition request being used to request the acquisition of metadata of the target node; and returning the target metadata of the target node to the file storage client based on the metadata acquisition request. The target metadata of the target node includes the file extension attributes of the target node. In this way, when requesting to obtain the metadata of the target node, the file extension attributes of the target node are provided at the same time, which helps to improve the integrity of the metadata of the target node.
另一种可能的实现方式中,在目标节点为目标目录的情况下,该方法还包括:接收文件存储客户端发送的目录列举请求,目录列举请求用于请求获取目标目录的元数据;基于目录列举请求,向文件存储客户端返回目标目录的目标元数据;目标目录的目标元数据包括目标目录下的至少一个文件/子目录的文件扩展属性。该方式中,在请求列举目录时,同时提供目标目录下的至少一个文件/子目录的文件扩展属性,这样,有助于提高列举目录的全面性。In another possible implementation, when the target node is a target directory, the method further includes: receiving a directory listing request sent by a file storage client, the directory listing request being used to request metadata of the target directory; returning target metadata of the target directory to the file storage client based on the directory listing request; the target metadata of the target directory including file extension attributes of at least one file/subdirectory under the target directory. In this method, when requesting to list a directory, the file extension attributes of at least one file/subdirectory under the target directory are provided at the same time, which helps to improve the comprehensiveness of the listed directory.
另一种可能的实现方式中,该方法还包括:接收文件存储客户端发送的删除请求,删除请求用于请求删除目标节点的元数据;基于删除请求,删除目标节点的文件扩展属性。该方式中,在请求删除目标节点的元数据时,同时删除目标节点的文件扩展属性,这样,有助于全面清除目标节点的相关数据,从而有助于避免无用数据占用存储空间。In another possible implementation, the method further includes: receiving a deletion request sent by the file storage client, the deletion request being used to request deletion of metadata of the target node; and deleting the file extension attribute of the target node based on the deletion request. In this method, when requesting to delete the metadata of the target node, the file extension attribute of the target node is also deleted, which helps to completely clear the relevant data of the target node, thereby helping to avoid useless data occupying storage space.
第三方面,提供了一种文件扩展属性管理方法,用于对象存储系统,对象存储系统包括对象存储服务节点和文件存储客户端;对象存储服务节点上存储有目标对象,对象存储服务节点用于将目标对象映射为目录树上的目标节点;文件存储客户端运行在windows操作系统上,windows操作系统提供了本地文件系统,本地文件系统的目录树包括目标节点,目标节点为文件或目录。该方法包括:文件存储客户端接收属性设置指令,属性设置指令指示了将目标节点的目标文件扩展属性设置为目标状态;目标状态包括已配置状态或未配置状态;文件存储客户端基于属性设置指令和对象存储服务节点提供的目标接口,确定属性设置请求;目标接口用于指示属性设置请求的格式,属性设置请求用于请求将目标节点的目标文件扩展属性设置为目标状态;文件存储客户端向对象存储服务节点发送属性设置请求,以请求对象存储服务节点将目标节点的目标文件扩展属性设置为目标状态;对象存储服务节点接收文件存储客户端发送的属性设置请求;对象存储服务节点通过目标接口解析属性设置请求,以得到属性设置请求所请求的内容;对象存储服务节点基于属性设置请求所请求的内容,将目标节点的目标文件扩展属性设置为目标状态。In a third aspect, a file extension attribute management method is provided, which is used in an object storage system. The object storage system includes an object storage service node and a file storage client. The object storage service node stores a target object, and the object storage service node is used to map the target object to a target node on a directory tree. The file storage client runs on a Windows operating system, and the Windows operating system provides a local file system. The directory tree of the local file system includes a target node, and the target node is a file or a directory. The method comprises: a file storage client receives an attribute setting instruction, the attribute setting instruction indicates setting a target file extension attribute of a target node to a target state; the target state comprises a configured state or an unconfigured state; the file storage client determines an attribute setting request based on the attribute setting instruction and a target interface provided by an object storage service node; the target interface is used to indicate a format of the attribute setting request, and the attribute setting request is used to request setting a target file extension attribute of a target node to a target state; the file storage client sends an attribute setting request to the object storage service node to request the object storage service node to set the target file extension attribute of the target node to a target state; the object storage service node receives the attribute setting request sent by the file storage client; the object storage service node parses the attribute setting request through the target interface to obtain the content requested by the attribute setting request; the object storage service node sets the target file extension attribute of the target node to a target state based on the content requested by the attribute setting request.
需要说明的,在第三方面,文件存储客户端还可以用于执行上述第一方面提供的任意一种可能的实现方式,对象存储服务节点还可以用于执行上述第二方面提供的任意一种可能的实现方式。It should be noted that, in the third aspect, the file storage client can also be used to execute any possible implementation method provided in the first aspect above, and the object storage service node can also be used to execute any possible implementation method provided in the second aspect above.
第四方面,提供了一种文件存储客户端,该文件存储客户端包括:用于执行第一方面提供的任意一种方法的功能模块,各个功能模块所执行的动作通过硬件执行或通过硬件执行相应的软件实现。例如,文件存储客户端可以包括接收模块、属性管理模块和发送模块;接收模块,用于接收属性设置指令,属性设置指令指示了将目标节点的目标文件扩展属性设置为目标状态,目标状态包括已配置状态或未配置状态;属性管理模块,用于基于属性设置指令和对象存储服务节点提供的目标接口,确定属性设置请求;对象存储服务节点提供的目标接口用于指示属性设置请求的格式,属性设置请求用于请求将目标节点的目标文件扩展属性设置为目标状态;发送模块,用于向对象存储服务节点发送属性设置请求,以请求对象存储服务节点将目标节点的目标文件扩展属性设置为目标状态。In a fourth aspect, a file storage client is provided, the file storage client comprising: a functional module for executing any one of the methods provided in the first aspect, the actions executed by each functional module are implemented by hardware execution or by hardware execution of corresponding software. For example, the file storage client may include a receiving module, an attribute management module and a sending module; the receiving module is used to receive an attribute setting instruction, the attribute setting instruction indicates that the target file extension attribute of the target node is set to a target state, the target state includes a configured state or an unconfigured state; the attribute management module is used to determine an attribute setting request based on the attribute setting instruction and a target interface provided by the object storage service node; the target interface provided by the object storage service node is used to indicate the format of the attribute setting request, the attribute setting request is used to request that the target file extension attribute of the target node be set to a target state; the sending module is used to send an attribute setting request to the object storage service node to request the object storage service node to set the target file extension attribute of the target node to a target state.
第五方面,提供了一种文件扩展属性管理装置,该装置包括:用于执行第二方面提供的任意一种方法的功能模块,各个功能模块所执行的动作通过硬件执行或通过硬件执行相应的软件实现。例如,文件扩展属性管理装置可以接收模块、解析模块和存储模块;接收模块,用于接收文件存储客户端发送的属性设置请求,属性设置请求的格式是根据对象存储服务节点提供的目标接口确定的,属性设置请求用于请求将目标节点的目标文件扩展属性设置为目标状态,目标状态包括已配置状态或未配置状态;解析模块,用于通过目标接口解析属性设置请求,以得到属性设置请求所请求的内容;管理模块,用于基于属性设置请求所请求的内容,将目标节点的目标文件扩展属性设置为目标状态。In a fifth aspect, a file extension attribute management device is provided, the device comprising: a functional module for executing any one of the methods provided in the second aspect, the actions performed by each functional module are executed by hardware or by hardware executing corresponding software. For example, the file extension attribute management device may include a receiving module, a parsing module and a storage module; the receiving module is used to receive an attribute setting request sent by a file storage client, the format of the attribute setting request is determined according to a target interface provided by an object storage service node, the attribute setting request is used to request that the target file extension attribute of the target node be set to a target state, the target state including a configured state or an unconfigured state; the parsing module is used to parse the attribute setting request through the target interface to obtain the content requested by the attribute setting request; the management module is used to set the target file extension attribute of the target node to a target state based on the content requested by the attribute setting request.
第六方面,提供了一种对象存储系统,对象存储系统包括文件存储客户端和对象存储服务节点。对象存储服务节点上存储有目标对象,对象存储服务节点用于将目标对象映射为目录树上的目标节点;文件存储客户端运行在windows操作系统上,windows操作系统提供了本地文件系统,本地文件系统的目录树包括目标节点,目标节点为文件或目录。文件存储客户端用于接收属性设置指令,属性设置指令指示了将目标节点的目标文件扩展属性设置为目标状态;目标状态包括已配置状态或未配置状态;文件存储客户端还用于基于属性设置指令和对象存储服务节点提供的目标接口,确定属性设置请求;对象存储服务节点的目标接口用于指示属性设置请求的格式,属性设置请求用于请求将目标节点的目标文件扩展属性设置为目标状态;文件存储客户端还用于向对象存储服务节点发送属性设置请求,以请求对象存储服务节点将目标节点的目标文件扩展属性设置为目标状态;对象存储服务节点用于接收对象存储系统的文件存储客户端发送的属性设置请求;对象存储服务节点通过目标接口解析属性设置请求,以得到属性设置请求所请求的内容; 对象存储服务节点用于基于属性设置请求所请求的内容,将目标节点的目标文件扩展属性设置为目标状态。In a sixth aspect, an object storage system is provided, which includes a file storage client and an object storage service node. A target object is stored on the object storage service node, and the object storage service node is used to map the target object to a target node on a directory tree; the file storage client runs on a Windows operating system, and the Windows operating system provides a local file system, and the directory tree of the local file system includes a target node, and the target node is a file or a directory. The file storage client is used to receive an attribute setting instruction, and the attribute setting instruction indicates that the target file extension attribute of the target node is set to a target state; the target state includes a configured state or an unconfigured state; the file storage client is also used to determine an attribute setting request based on the attribute setting instruction and a target interface provided by the object storage service node; the target interface of the object storage service node is used to indicate the format of the attribute setting request, and the attribute setting request is used to request that the target file extension attribute of the target node be set to a target state; the file storage client is also used to send an attribute setting request to the object storage service node to request the object storage service node to set the target file extension attribute of the target node to a target state; the object storage service node is used to receive an attribute setting request sent by the file storage client of the object storage system; the object storage service node parses the attribute setting request through the target interface to obtain the content requested by the attribute setting request; The object storage service node is used to set the target file extended attribute of the target node to the target state based on the content requested by the attribute setting request.
需要说明的,在第六方面,文件存储客户端还可以用于执行上述第一方面提供的任意一种可能的实现方式,对象存储服务节点还可以用于执行上述第二方面提供的任意一种可能的实现方式。It should be noted that in the sixth aspect, the file storage client can also be used to execute any possible implementation method provided in the first aspect above, and the object storage service node can also be used to execute any possible implementation method provided in the second aspect above.
第七方面,提供了一种处理器,处理器用于执行上述第一方面提供的任意一种方法的步骤。In a seventh aspect, a processor is provided, which is used to execute the steps of any one of the methods provided in the first aspect.
第八方面,提供了一种处理器,处理器用于执行上述第二方面提供的任意一种方法的步骤。In an eighth aspect, a processor is provided, which is used to execute the steps of any one of the methods provided in the second aspect.
第九方面,提供了一种芯片,包括:处理器和供电电路;供电电路用于为芯片供电,处理器用于执行上述第一方面提供的任意一种方法的步骤。In a ninth aspect, a chip is provided, comprising: a processor and a power supply circuit; the power supply circuit is used to supply power to the chip, and the processor is used to execute the steps of any one of the methods provided in the first aspect above.
第十方面,提供了一种芯片,包括:处理器和供电电路;供电电路用于为芯片供电,处理器用于执行上述第二方面提供的任意一种方法的步骤。In the tenth aspect, a chip is provided, comprising: a processor and a power supply circuit; the power supply circuit is used to supply power to the chip, and the processor is used to execute the steps of any one of the methods provided in the second aspect above.
第十一方面,提供了一种电子设备,包括:处理器、存储器及存储在存储器上的计算机程序/指令;处理器执行计算机程序/指令,以使电子设备实现上述第一方面提供的任意一种方法的步骤。In the eleventh aspect, an electronic device is provided, comprising: a processor, a memory, and a computer program/instructions stored in the memory; the processor executes the computer program/instructions to enable the electronic device to implement the steps of any one of the methods provided in the first aspect above.
第十二方面,提供了一种计算设备,包括处理器、存储器及存储在存储器上的计算机程序/指令;处理器执行计算机程序/指令,以使计算设备实现上述第二方面提供的任意一种方法的步骤。In the twelfth aspect, a computing device is provided, comprising a processor, a memory, and a computer program/instructions stored in the memory; the processor executes the computer program/instructions so that the computing device implements the steps of any one of the methods provided in the second aspect above.
第十三方面,提供了一种计算设备集群,包括:至少一个计算设备,至少一个计算设备中的每个计算设备包括处理器和存储器;每个计算设备包括处理器、存储器及存储在存储器上的计算机程序/指令;处理器执行计算机程序/指令,以使计算设备集群实现上述第二方面提供的任意一种方法的步骤。In the thirteenth aspect, a computing device cluster is provided, comprising: at least one computing device, each computing device in the at least one computing device comprises a processor and a memory; each computing device comprises a processor, a memory and a computer program/instructions stored on the memory; the processor executes the computer program/instructions so that the computing device cluster implements the steps of any one of the methods provided in the second aspect above.
第十四方面,提供了一种计算机程序产品,包括:计算机程序/指令;计算机程序/指令被电子设备的处理器执行时,能够实现上述第一方面提供的任意一种方法的步骤。In a fourteenth aspect, a computer program product is provided, comprising: a computer program/instructions; when the computer program/instructions are executed by a processor of an electronic device, the steps of any one of the methods provided in the first aspect are implemented.
第十五方面,提供了一种计算机程序产品,包括:计算机程序/指令;计算机程序/指令被计算设备的处理器执行时,能够实现上述第二方面提供的任意一种方法的步骤。In a fifteenth aspect, a computer program product is provided, comprising: a computer program/instructions; when the computer program/instructions are executed by a processor of a computing device, the steps of any one of the methods provided in the second aspect are implemented.
第十六方面,提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序/指令,计算机程序/指令被电子设备的处理器执行时,能够实现上述第一方面提供的任意一种方法的步骤。In the sixteenth aspect, a computer-readable storage medium is provided, on which a computer program/instruction is stored. When the computer program/instruction is executed by a processor of an electronic device, the steps of any one of the methods provided in the first aspect are implemented.
第十七方面,提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序/指令,计算机程序/指令被计算设备的处理器执行时,能够实现上述第二方面提供的任意一种方法的步骤。In the seventeenth aspect, a computer-readable storage medium is provided, on which a computer program/instruction is stored. When the computer program/instruction is executed by a processor of a computing device, the steps of any one of the methods provided in the second aspect are implemented.
其中,第二方面至第十七方面中任一种设计方式所带来的技术效果可参见上述第一方面中不同设计方式所带来的技术效果,此处不再赘述。Among them, the technical effects brought about by any design method in the second aspect to the seventeenth aspect can refer to the technical effects brought about by the different design methods in the above-mentioned first aspect, and will not be repeated here.
图1为本申请实施例提供的一种系统架构的示意图;FIG1 is a schematic diagram of a system architecture provided in an embodiment of the present application;
图2为本申请实施例提供的另一种系统架构的示意图;FIG2 is a schematic diagram of another system architecture provided in an embodiment of the present application;
图3为本申请实施例提供的一种文件扩展属性管理方法的流程图;FIG3 is a flow chart of a method for managing file extension attributes provided by an embodiment of the present application;
图4为本申请实施例提供的一种属性界面的示意图;FIG4 is a schematic diagram of a property interface provided in an embodiment of the present application;
图5为本申请实施例提供的一种设置文件扩展属性的框架图;FIG5 is a framework diagram of setting file extension attributes provided by an embodiment of the present application;
图6为本申请实施例提供的一种设置文件扩展属性的示意图;FIG6 is a schematic diagram of setting file extension attributes provided by an embodiment of the present application;
图7为本申请实施例提供的另一种文件扩展属性管理方法的流程图;FIG7 is a flowchart of another file extension attribute management method provided in an embodiment of the present application;
图8为本申请实施例提供的另一种文件扩展属性管理方法的流程图;FIG8 is a flowchart of another file extension attribute management method provided in an embodiment of the present application;
图9为本申请实施例提供的一种获取文件扩展属性的框架图;FIG9 is a framework diagram of obtaining file extension attributes provided by an embodiment of the present application;
图10为本申请实施例提供的一种获取文件扩展属性的示意图;FIG10 is a schematic diagram of obtaining file extension attributes provided by an embodiment of the present application;
图11为本申请实施例提供的一种获取文件的元数据的示意图;FIG11 is a schematic diagram of obtaining metadata of a file provided in an embodiment of the present application;
图12为本申请实施例提供的一种获取目录的元数据的示意图;FIG12 is a schematic diagram of obtaining metadata of a directory provided in an embodiment of the present application;
图13为本申请实施例提供的一种列举目录的框架图;FIG13 is a framework diagram of a directory listing provided in an embodiment of the present application;
图14为本申请实施例提供的又一种文件扩展属性管理方法的流程图;FIG14 is a flowchart of another file extension attribute management method provided in an embodiment of the present application;
图15为本申请实施例提供的一种实现文件扩展属性的示意图;FIG15 is a schematic diagram of implementing file extension attributes provided by an embodiment of the present application;
图16为本申请实施例提供的又一种文件扩展属性管理方法的流程图;FIG16 is a flowchart of another file extension attribute management method provided in an embodiment of the present application;
图17为本申请实施例提供的又一种文件扩展属性管理方法的流程图;FIG17 is a flowchart of another file extension attribute management method provided in an embodiment of the present application;
图18为本申请实施例提供的另一种实现文件扩展属性的示意图;FIG18 is a schematic diagram of another method for implementing file extension attributes provided in an embodiment of the present application;
图19为本申请实施例提供的一种文件存储客户端的示意图;FIG19 is a schematic diagram of a file storage client provided in an embodiment of the present application;
图20为本申请实施例提供的一种文件扩展属性管理装置的示意图;FIG20 is a schematic diagram of a file extension attribute management device provided in an embodiment of the present application;
图21为本申请实施例提供的一种计算设备的示意图;FIG21 is a schematic diagram of a computing device provided in an embodiment of the present application;
图22为本申请实施例提供的一种计算设备集群的示意图; FIG22 is a schematic diagram of a computing device cluster provided in an embodiment of the present application;
图23为本申请实施例提供的一种计算设备集群的连接的示意图;FIG23 is a schematic diagram of a connection of a computing device cluster provided in an embodiment of the present application;
图24为本申请实施例提供的一种电子设备的示意图。FIG. 24 is a schematic diagram of an electronic device provided in an embodiment of the present application.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
其中,在本申请实施例的描述中,除非另有说明,“/”表示前后关联的对象是一种“或”的关系,例如,A/B可以表示A或B;本申请中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,其中A,B可以是单数或者复数。并且,在本申请实施例的描述中,除非另有说明,“多个”是指两个或多于两个。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。Among them, in the description of the embodiments of the present application, unless otherwise specified, "/" indicates that the objects associated before and after are in an "or" relationship, for example, A/B can represent A or B; "and/or" in the present application is only a kind of association relationship describing the associated objects, indicating that there can be three relationships, for example, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. And, in the description of the embodiments of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or its similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple.
另外,为了便于清楚描述本申请实施例的技术方案,在本申请实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not necessarily limit the difference.
同时,在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念,便于理解。Meanwhile, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.
以下,对本申请实施例涉及的相关术语进行简要介绍。The following is a brief introduction to the relevant terms involved in the embodiments of the present application.
文件存储服务(file storage service,FSS):是将数据以文件的形式存储在文件存储服务节点上。文件存储服务节点基于文件系统提供多层级的树形目录存储方法。文件存储服务节点用于提供符合文件语义的操作(即文件服务),如:读文件、写文件、创建文件、删除文件、打开文件、关闭文件、重命名(rename)文件等操作。File storage service (FSS): It stores data in the form of files on file storage service nodes. File storage service nodes provide a multi-level tree directory storage method based on the file system. File storage service nodes are used to provide operations that conform to file semantics (i.e., file services), such as: reading files, writing files, creating files, deleting files, opening files, closing files, renaming files, etc.
对象存储服务(object storage service,OBS):是将数据以对象的形式存储在对象存储节点中。对象存储节点提供了基于存储桶和对象的扁平化存储方式,存储桶中的所有对象都处于同一个逻辑层级,去除了文件存储服务节点中的多层级树形目录结构。对象存储节点用于提供符合对象语义的操作(即对象服务),如:上传对象、下载对象、列出存储桶中的每个对象、复制对象、移动对象、删除对象、删除存储桶的每个对象等。Object storage service (OBS): stores data in the form of objects in object storage nodes. Object storage nodes provide a flat storage method based on buckets and objects. All objects in a bucket are at the same logical level, removing the multi-level tree directory structure in the file storage service node. Object storage nodes are used to provide operations that conform to object semantics (i.e. object services), such as uploading objects, downloading objects, listing each object in a bucket, copying objects, moving objects, deleting objects, deleting each object in a bucket, etc.
存储桶(Bucket):也可以简称为桶,是对象存储节点上用于存储对象的容器。每个存储桶中都有自己的存储类别、访问权限、所属区域等属性。Bucket: Also referred to as a bucket, it is a container for storing objects on an object storage node. Each bucket has its own storage category, access rights, region, and other attributes.
对象(Object):是对象存储节点上数据存储的基本单位,一个对象是一个文件的数据及其相关属性信息(也可以称为元数据)的集合。一个对象可以包括键值(Key)、元数据(Metadata)和数据(data)。Object: It is the basic unit of data storage on an object storage node. An object is a collection of file data and its related attribute information (also called metadata). An object can include key value, metadata and data.
其中,键值是对象的名称,也可以称为对象名称或对象名,一个存储桶中的每个对象具有唯一的键值。元数据是对象的描述信息,元数据包括用户元数据和系统元数据。用户元数据是用户上传对象时指定的,是用户自定义的对象描述信息。系统元数据是对象存储服务节点自动生成的。数据是对象的数据内容,即文件的数据,也可以称为用户数据。The key value is the name of the object, which can also be called the object name or object name. Each object in a bucket has a unique key value. Metadata is the description information of the object. Metadata includes user metadata and system metadata. User metadata is specified when the user uploads the object, and is the user-defined object description information. System metadata is automatically generated by the object storage service node. Data is the data content of the object, that is, the data of the file, which can also be called user data.
文件系统(file system):是操作系统中负责管理和存储文件信息的软件,文件系统包括基本文件系统和若干文件子系统,用户可以根据需要拆卸与安装文件子系统。其中,文件系统提供的目标树可以包括根目录、子目录以及子目录下的文件,其中,根目录或者子目录可以包括文件和下一级子目录。File system: It is the software in the operating system responsible for managing and storing file information. The file system includes the basic file system and several file subsystems. Users can remove and install file subsystems as needed. The target tree provided by the file system may include the root directory, subdirectories, and files under the subdirectories. The root directory or subdirectory may include files and the next-level subdirectories.
用户空间(User space)和内核空间(Kernel space):电子设备的虚拟内存可以划分为用户空间和内核空间,用户空间用于运行用户应用程序,内核空间用于运行操作系统的内核。其中,用户空间和内核空间是相互隔离的,内核空间可以执行任意命令,调用操作系统的一切资源,用户空间只能执行简单的运算,不能直接调用操作系统的资源,需要通过内核空间才可以调用操作系统的资源。User space and kernel space: The virtual memory of electronic devices can be divided into user space and kernel space. User space is used to run user applications, and kernel space is used to run the kernel of the operating system. Among them, user space and kernel space are isolated from each other. Kernel space can execute any command and call all resources of the operating system. User space can only perform simple operations and cannot directly call the resources of the operating system. It needs to go through kernel space to call the resources of the operating system.
用户空间文件系统(filesystemin user space,FUSE):是操作系统的组成部分,运行在用户空间中。需要说明的,在本申请实施例中,FUSE可以是Windows操作系统的组成部分。File system in user space (FUSE): is a component of the operating system and runs in the user space. It should be noted that in the embodiment of the present application, FUSE can be a component of the Windows operating system.
文件扩展属性:是文件系统提供的文件常量,用于指示文件系统中的文件或目录的某种性质。File extended attributes: are file constants provided by the file system and are used to indicate certain properties of files or directories in the file system.
需要说明的,在本申请实施例中,文件扩展属性可以是指Windows操作系统中的本地文件系统提供的文件常量,后续不再赘述。It should be noted that in the embodiment of the present application, the file extension attribute may refer to the file constant provided by the local file system in the Windows operating system, which will not be described in detail later.
文件存储客户端(Client):用于和对象存储服务节点进行交互,如:向对象存储服务节点发送请求、接收对象存储服务节点返回的响应信息等。 File storage client (Client): used to interact with the object storage service node, such as sending requests to the object storage service node and receiving response information returned by the object storage service node.
需要说明的,在本申请实施例中,对象存储系统的文件存储客户端可以为Windows操作系统提供接口,Windows操作系统可以通过文件存储客户端提供的接口与文件存储客户端进行交互。It should be noted that in the embodiment of the present application, the file storage client of the object storage system can provide an interface for the Windows operating system, and the Windows operating system can interact with the file storage client through the interface provided by the file storage client.
透传:是指数据传输过程中,不对数据内容进行任何处理的情况下,将数据包从源地址传输到目的地址。也就是说,不会改变数据包中的业务内容,保持其原有格式和指令,确保数据传输的完整性和准确性。Transparent transmission: refers to the transmission of data packets from the source address to the destination address without any processing of the data content during the data transmission process. In other words, the business content in the data packet will not be changed, and its original format and instructions will be maintained, ensuring the integrity and accuracy of data transmission.
需要说明的,在本申请实施例中,透传可以是指对象存储系统的文件存储客户端将文件扩展属性传输给操作系统,且不执行实现文件扩展属性的相关操作。It should be noted that in the embodiment of the present application, transparent transmission may refer to the file storage client of the object storage system transmitting the file extension attributes to the operating system without performing related operations to implement the file extension attributes.
以下,对本申请实施例的应用场景进行示例性介绍。The following is an exemplary introduction to the application scenarios of the embodiments of the present application.
随着存储技术的发展,为了能够更加方便的存储电影、办公文档、图像等类似的非结构化数据,相关技术中提出了对象存储。对象存储使用扁平地址空间来存储数据,这种地址空间中没有目录和文件的分层,因此,一个对象存储服务节点可以存储大量的数据。With the development of storage technology, object storage has been proposed in related technologies to facilitate the storage of unstructured data such as movies, office documents, and images. Object storage uses a flat address space to store data. This address space does not have a hierarchy of directories and files. Therefore, an object storage service node can store a large amount of data.
为了兼容文件应用,对象存储系统(包括对象存储服务节点和文件存储客户端)提供了基于对象存储的文件服务,即在对象存储的基础上构建文件服务。然而,由于文件扩展属性使用的文件语义与对象存储的语义存在较大区别,导致对象存储系统提供的文件服务无法实现文件扩展属性的管理。In order to be compatible with file applications, object storage systems (including object storage service nodes and file storage clients) provide file services based on object storage, that is, file services are built on the basis of object storage. However, due to the significant difference between the file semantics used by file extension attributes and the semantics of object storage, the file services provided by object storage systems cannot manage file extension attributes.
有鉴于此,本申请实施例提供了一种文件扩展属性管理方法,应用于文件存储客户端,文件存储客户端接收到文件扩展属性的管理指令(如:属性设置指令)后,可以基于属性设置指令指示的内容以及对象存储服务节点提供的目标接口,确定属性设置请求,用于请求属性设置指令指示的管理内容,如:请求将目标节点的目标文件扩展属性设置为目标状态。之后,文件存储客户端向对象存储服务节点发送属性设置请求,以请求对象存储服务节点将目标节点的目标文件扩展属性设置为目标状态。In view of this, an embodiment of the present application provides a file extension attribute management method, which is applied to a file storage client. After receiving a management instruction for a file extension attribute (such as an attribute setting instruction), the file storage client can determine an attribute setting request based on the content indicated by the attribute setting instruction and the target interface provided by the object storage service node, for requesting the management content indicated by the attribute setting instruction, such as requesting to set the target file extension attribute of the target node to a target state. Afterwards, the file storage client sends an attribute setting request to the object storage service node to request the object storage service node to set the target file extension attribute of the target node to a target state.
由于文件存储客户端通过属性设置指令以及对象存储服务节点提供的目标接口指示的格式确定属性设置请求,实现将文件扩展属性的语义(即属性设置指令)转换成对象存储的语义(即属性设置请求),进而使得属性设置请求可以使用对象存储的语义指示属性设置指令所指示的内容,这样,对象存储服务节点便可以准确识别属性设置请求所请求的内容,从而基于属性设置请求所请求的内容管理文件扩展属性。由此,对象存储系统通过本申请的方案可以完善对象存储的语义,使得对象存储的语义可以兼容文件扩展属性的语义,从而在提供文件服务的基础上提供文件扩展属性的管理服务,进而实现提供更完善的文件服务,使得对象存储可以更好的兼容文件应用。Since the file storage client determines the attribute setting request through the attribute setting instruction and the format indicated by the target interface provided by the object storage service node, the semantics of the file extension attribute (i.e., the attribute setting instruction) is converted into the semantics of the object storage (i.e., the attribute setting request), and the attribute setting request can use the semantics of the object storage to indicate the content indicated by the attribute setting instruction, so that the object storage service node can accurately identify the content requested by the attribute setting request, and thus manage the file extension attribute based on the content requested by the attribute setting request. Therefore, the object storage system can improve the semantics of object storage through the scheme of the present application, so that the semantics of object storage can be compatible with the semantics of file extension attributes, thereby providing file extension attribute management services on the basis of providing file services, and then providing more complete file services, so that object storage can be better compatible with file applications.
以下,对本申请实施例的系统架构进行示例性介绍。The following is an exemplary introduction to the system architecture of the embodiments of the present application.
本申请实施例提供的文件扩展属性管理方法,适用于对象存储系统。对象存储系统包括对象存储服务节点(Server)和文件存储客户端(Client),文件存储客户端与对象存储服务节点可以通信。其中,对象存储系统可以提供文件服务和对象服务。The file extension attribute management method provided in the embodiment of the present application is applicable to an object storage system. The object storage system includes an object storage service node (Server) and a file storage client (Client), and the file storage client and the object storage service node can communicate. Among them, the object storage system can provide file services and object services.
本申请实施例中,对象存储服务节点可以包括至少一个计算设备。In an embodiment of the present application, the object storage service node may include at least one computing device.
需要说明的,在本申请实施例中,至少一个可以是一个,或者,也可以是多个,其中,多个是指两个或两个以上,后续不再赘述。It should be noted that in the embodiments of the present application, at least one may be one, or may be multiple, where multiple refers to two or more, which will not be repeated later.
可选地,计算设备可以是网络设备或终端设备。网络设备可以包括服务器等。其中,服务器可以是一个物理服务器,也可以是有两个或两个以上分担不同职责的物理服务器,通过相互协同来实现服务器的各项功能。示例性的,服务器可以是刀片服务器、高密服务器、机架服务器或塔式服务器等。终端设备可以包括超级移动个人计算机(ultra-mobile personal computer,UMPC)、笔记本电脑、上网本、台式计算机、一体机等。Optionally, the computing device may be a network device or a terminal device. The network device may include a server, etc. Among them, the server may be a physical server, or two or more physical servers with different responsibilities, and the various functions of the server are realized by mutual cooperation. Exemplarily, the server may be a blade server, a high-density server, a rack server or a tower server, etc. The terminal device may include an ultra-mobile personal computer (UMPC), a laptop, a netbook, a desktop computer, an all-in-one computer, etc.
需要说明的,以上仅为示例性说明,本申请实施例对计算设备的具体设备形态不做限制。It should be noted that the above is only an exemplary description, and the embodiments of the present application do not limit the specific device form of the computing device.
本申请实施例中,对象存储服务节点还可以包括存储设备,存储设备可以包括一个或多个存储桶,一个或多个存储桶用于存储对象。In an embodiment of the present application, the object storage service node may also include a storage device, which may include one or more storage buckets, and the one or more storage buckets are used to store objects.
示例性的,存储设备可以包括机械硬盘(hard disk drive,HDD)、固态硬盘(solid state disk/drive,SSD)等。需要说明的,本申请实施例存储设备的形态不做限制,以上仅为示例性说明。此外,本申请实施例中对存储设备的数量也不做限制。Exemplarily, the storage device may include a hard disk drive (HDD), a solid state disk/drive (SSD), etc. It should be noted that the form of the storage device in the embodiment of the present application is not limited, and the above is only an exemplary description. In addition, the number of storage devices in the embodiment of the present application is not limited.
本申请实施例中,存储设备可以设置于计算设备上,或者,也可以与计算设备相互独立设置。在存储设备与计算设备相互独立设置时,存储设备与计算设备可以通信。In the embodiment of the present application, the storage device may be arranged on the computing device, or may be arranged independently of the computing device. When the storage device and the computing device are arranged independently of each other, the storage device and the computing device may communicate.
本申请实施例中,对象存储服务节点通过存储桶存储数据,也就是说,对象存储服务节点将数据以对象的形式存储在存储桶中。In the embodiment of the present application, the object storage service node stores data through storage buckets, that is, the object storage service node stores data in the form of objects in the storage bucket.
为了用户更加方便的管理存储桶中的数据,对象存储服务节点还提供了一种模拟文件夹的方式,通过在对象的名称中增加“/”,将对象在OBS管理控制台上模拟成一个文件夹的形式展现。示例性的,对象0的 对象名为abc.jpg,若需要将对象0模拟成文件夹下的文件,则可以将对象0的对象标识修改为test/abc.jpg。此时,“test”就是模拟文件夹。用户通过对象接口列举存储桶中对象时,获取到的对象标识以“/”分隔的,最后一个“/”后的有内容,则表示一个文件,也就是说,该对象标识所属对象指示一个文件。如果最后一个“/”后没有内容,则表示一个文件夹路径,也就是说,该对象标识所属对象指示了一个模拟文件夹。示例性的,对象1的对象标识为test/,因此,对象1表示一个文件夹路径。In order to make it easier for users to manage data in buckets, the object storage service node also provides a way to simulate folders. By adding "/" to the name of the object, the object is simulated as a folder on the OBS management console. The object name is abc.jpg. If you need to simulate object 0 as a file in a folder, you can modify the object identifier of object 0 to test/abc.jpg. At this time, "test" is the simulated folder. When the user lists the objects in the bucket through the object interface, the object identifiers obtained are separated by "/". If there is content after the last "/", it represents a file, that is, the object to which the object identifier belongs indicates a file. If there is no content after the last "/", it represents a folder path, that is, the object to which the object identifier belongs indicates a simulated folder. For example, the object identifier of object 1 is test/, so object 1 represents a folder path.
需要说明的,在一个对象被模拟成一个文件夹的情况下,对象标识包括文件夹路径和对象名。此外,在一个对象未被模拟成一个文件夹的情况下,对象标识可以为对象名。It should be noted that, when an object is simulated as a folder, the object identifier includes the folder path and the object name. In addition, when an object is not simulated as a folder, the object identifier can be the object name.
本申请实施例中,对象存储服务节点可以通过分层命名空间将存储桶中的对象映射为目录树上的节点。其中,节点可以为文件或目录,一个包括用户数据的对象可以映射为一个文件,一个模拟文件夹(即不包括用户数据的对象)可以映射为一个目录。在此基础上,用户为对象存储服务节点设置开启文件服务特性之后,对象存储服务节点便可以提供文件服务。In the embodiment of the present application, the object storage service node can map objects in the storage bucket to nodes on the directory tree through a hierarchical namespace. Among them, a node can be a file or a directory, an object including user data can be mapped to a file, and a simulated folder (i.e., an object that does not include user data) can be mapped to a directory. On this basis, after the user sets the file service feature to be enabled for the object storage service node, the object storage service node can provide file services.
本申请实施例中,文件存储客户端可以安装在用户的电子设备上,电子设备可以通过文件存储客户端与对象存储服务节点通信。用户可以通过文件存储客户端向云服务供应商租用云存储服务,如:租用存储桶,之后,用户可以通过文件存储客户端向存储桶中存储数据。In the embodiment of the present application, the file storage client can be installed on the user's electronic device, and the electronic device can communicate with the object storage service node through the file storage client. The user can rent a cloud storage service from a cloud service provider through the file storage client, such as renting a storage bucket, and then the user can store data in the storage bucket through the file storage client.
在此基础上,电子设备可以通过文件存储客户端与对象存储服务节点通信,从而实现使用对象存储系统提供文件服务,如:访问文件、管理文件扩展属性等。On this basis, electronic devices can communicate with object storage service nodes through file storage clients, thereby using the object storage system to provide file services, such as accessing files, managing file extension attributes, etc.
需要说明的,由于对象存储系统可以通过文件存储客户端实现提供文件服务,因此,该文件存储客户端也可以称为文件系统客户端(file system client,SFC)。It should be noted that, since the object storage system can provide file services through a file storage client, the file storage client can also be called a file system client (SFC).
可选地,电子设备可以是终端设备或网络设备。终端设备可以包括手机、平板电脑、手持计算机、PC、蜂窝电话、个人数字助理(personal digital assistant,PDA)、可穿戴式设备(如智能手表、智能手环等)、智能家居设备(如电视机等)、车机(如车载电脑等)、智慧屏、游戏机、耳机、AI音响、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、笔记本电脑、上网本、台式计算机或一体机等。网络设备可以包括服务器等。其中,服务器可以是一个物理服务器,也可以是有两个或两个以上分担不同职责的物理服务器、相互协同来实现服务器的各项功能。示例性的,服务器可以是刀片服务器、高密服务器、机架服务器或塔式服务器等。Optionally, the electronic device may be a terminal device or a network device. The terminal device may include a mobile phone, a tablet computer, a handheld computer, a PC, a cellular phone, a personal digital assistant (PDA), a wearable device (such as a smart watch, a smart bracelet, etc.), a smart home device (such as a TV, etc.), a car machine (such as a car computer, etc.), a smart screen, a game console, a headset, an AI speaker, an augmented reality (AR)/virtual reality (VR) device, an ultra-mobile personal computer (UMPC), a laptop, a netbook, a desktop computer or an all-in-one computer, etc. The network device may include a server, etc. Among them, the server may be a physical server, or it may be two or more physical servers that share different responsibilities and cooperate with each other to realize the various functions of the server. Exemplarily, the server may be a blade server, a high-density server, a rack server or a tower server, etc.
需要说明的,以上仅为示例性说明,本申请实施例对电子设备的具体设备形态不做限制。It should be noted that the above is only an exemplary description, and the embodiments of the present application do not limit the specific device form of the electronic device.
如图1所示,为本申请实施例提供的一种系统架构的示意图。As shown in FIG1 , it is a schematic diagram of a system architecture provided in an embodiment of the present application.
参见图1,该系统架构可以包括对象存储服务节点、文件存储客户端和电子设备。其中,文件存储客户端可以安装在电子设备上。1 , the system architecture may include an object storage service node, a file storage client, and an electronic device, wherein the file storage client may be installed on the electronic device.
云服务供应商通过对象存储服务节点为用户提供云服务(如:对象服务、文件服务、文件扩展属性管理服务等)。云服务租户(即用户)通过电子设备上的文件存储客户端租用云服务供应商提供的云服务。Cloud service providers provide cloud services (such as object services, file services, file extension attribute management services, etc.) to users through object storage service nodes. Cloud service tenants (i.e. users) rent cloud services provided by cloud service providers through file storage clients on electronic devices.
示例性的,对象存储服务节点的存储设备可以包括存储桶1、......、存储桶N,N为大于1的正整数。用户通过电子设备登录文件存储客户端后,可以向云服务供应商租用存储桶(如:租用存储桶1)。在租用存储桶1后,可以通过文件存储客户端将需要存储的数据(如:数据0-数据4)发送给对象存储服务节点,对象存储服务节点接收到数据0-数据4之后,将数据0-数据4以对象的形似(即对象0-对象4)存储在存储桶1中。Exemplarily, the storage device of the object storage service node may include storage bucket 1, ..., storage bucket N, where N is a positive integer greater than 1. After the user logs in to the file storage client through the electronic device, the user may rent a storage bucket (e.g., rent storage bucket 1) from the cloud service provider. After renting storage bucket 1, the data to be stored (e.g., data 0-data 4) may be sent to the object storage service node through the file storage client. After receiving data 0-data 4, the object storage service node stores data 0-data 4 in the form of an object (i.e., object 0-object 4) in storage bucket 1.
需要说明的,本申请实施例对于对象存储服务节点包括的计算设备的数量、存储设备的数量,以及存储设备包括的存储桶的数量均不做限制,图1仅为示例性说明。It should be noted that the embodiments of the present application do not limit the number of computing devices, the number of storage devices, and the number of storage buckets included in the object storage service node. Figure 1 is only for illustrative purposes.
如图2所示,为本申请实施例提供的另一种系统架构的示意图。As shown in FIG2 , it is a schematic diagram of another system architecture provided in an embodiment of the present application.
参见图2,电子设备上安装有window操作系统和文件存储客户端,文件存储客户端运行在windows操作系统上。window操作系统可以调用文件存储客户端提供的接口,以与文件存储客户端进行交互。2 , the electronic device is installed with a Windows operating system and a file storage client, and the file storage client runs on the Windows operating system. The Windows operating system can call an interface provided by the file storage client to interact with the file storage client.
需要说明的,本申请实施例“window”的大小写不做限制,例如,“window”也可以用“Window”表示,后续不再赘述。It should be noted that there is no limitation on the case of “window” in the embodiment of the present application. For example, “window” can also be represented by “Window”, which will not be repeated later.
由于文件存储客户端是安装在运行Windows操作系统的电子设备上,因此,文件存储客户端也可以称为Windows文件存储客户端(client)。Since the file storage client is installed on an electronic device running the Windows operating system, the file storage client may also be referred to as a Windows file storage client (client).
本申请实施例中,windows操作系统还提供了本地文件系统。本地文件系统用于提供基于文件和目录的数据存储机制。其中,本地文件系统提供的目标树可以包括根目录、子目录以及子目录下的文件,根目录或者子目录可以包括文件和下一级子目录。In the embodiment of the present application, the Windows operating system also provides a local file system. The local file system is used to provide a data storage mechanism based on files and directories. Among them, the target tree provided by the local file system may include a root directory, a subdirectory, and files under the subdirectory, and the root directory or subdirectory may include files and next-level subdirectories.
示例性的,本地文件系统的目录树可以包括多个节点,多个节点中的每个节点可以为文件或目录,文 件或目录存储在对象存储服务节点的存储桶中。Exemplarily, the directory tree of the local file system may include multiple nodes, each of which may be a file or a directory. Files or directories are stored in buckets on Object Storage service nodes.
本申请实施例中,文件存储客户端可以通过对象存储服务节点提供的接口与对象存储服务节点进行交互。在此基础上,文件存储客户端可以向对象存储服务节点传输与Windows语义无关的存储数据。In the embodiment of the present application, the file storage client can interact with the object storage service node through the interface provided by the object storage service node. On this basis, the file storage client can transmit storage data unrelated to Windows semantics to the object storage service node.
需要说明的,在本申请实施例中,文件存储客户端执行某个操作,可以认为是电子设备运行文件存储客户端的过程中执行某个操作,或者,电子设备通过文件存储客户端执行某个操作,后续不再赘述。It should be noted that in the embodiment of the present application, the file storage client performs a certain operation, which can be considered as the electronic device performing a certain operation during the process of running the file storage client, or the electronic device performing a certain operation through the file storage client, which will not be repeated later.
示例性的,对象存储服务节点提供的接口可以是表性状态传输(representational state transfer,REST)应用程序编程接口(application programming interface,API)。Exemplarily, the interface provided by the object storage service node can be a representational state transfer (REST) application programming interface (API).
本申请实施例中,Windows操作系统包括FUSE模块,FUSE模块可以用于与文件存储客户端进行交互。也就是说,Windows操作系统可以通过FUSE模块与文件存储客户端进行交互。在此基础上,文件存储客户端可以为Windows操作系统提供符合Windows语义的数据。In the embodiment of the present application, the Windows operating system includes a FUSE module, and the FUSE module can be used to interact with the file storage client. In other words, the Windows operating system can interact with the file storage client through the FUSE module. On this basis, the file storage client can provide the Windows operating system with data that conforms to Windows semantics.
需要说明的,本申请实施例中,FUSE模块执行某个操作,可以认为是电子设备运行FUSE模块的过程中执行某个操作,或者,电子设备通过FUSE模块执行某个操作,后续不再赘述。It should be noted that in the embodiment of the present application, the FUSE module performs a certain operation, which can be considered as the electronic device performing a certain operation during the process of running the FUSE module, or the electronic device performing a certain operation through the FUSE module, which will not be repeated later.
此外,由于文件存储客户端可以通过FUSE模块与Windows进行交互,可以认为文件存储客户端是基于FUSE的文件存储客户端。Furthermore, since the file storage client can interact with Windows through the FUSE module, the file storage client can be considered to be a FUSE-based file storage client.
本申请实施例中,文件存储客户端还可以用于管理文件扩展属性,如:为目录树上的节点配置文件扩展属性、取消目录上的节点已配置的文件扩展属性等。In the embodiment of the present application, the file storage client can also be used to manage file extension attributes, such as: configuring file extension attributes for nodes on the directory tree, canceling file extension attributes that have been configured for nodes on the directory, etc.
本申请实施例中,文件存储客户端还可以用于实现文件扩展属性,如:一个节点配置了只读属性的情况下,拦截对该一个节点执行的写入操作等。In the embodiment of the present application, the file storage client can also be used to implement file extension attributes, such as intercepting write operations performed on a node when a node is configured with a read-only attribute.
示例性的,在文件的加密属性、压缩属性为已配置状态的情况下,文件存储客户端可以对文件执行加密操作、压缩操作等与Windows语义相关的操作,并得到加密文件、压缩文件,从而实现为对象存储服务节点提供与windows语义无关的存储数据。之后,文件存储客户端将加密文件、压缩文件传输给对象存储服务节点,对象存储服务节点接收到加密文件、压缩文件后,可以直接存储加密文件、压缩文件,无需关系存储数据的windows语义。Exemplarily, when the encryption attribute and compression attribute of a file are configured, the file storage client can perform encryption operations, compression operations and other operations related to Windows semantics on the file, and obtain encrypted files and compressed files, thereby providing storage data unrelated to Windows semantics for the object storage service node. Afterwards, the file storage client transmits the encrypted files and compressed files to the object storage service node. After receiving the encrypted files and compressed files, the object storage service node can directly store the encrypted files and compressed files without having to care about the Windows semantics of the storage data.
示例性的,文件存储客户端从对象存储服务节点获取到加密文件、压缩文件后,可以对加密文件进行解密、对压缩文件进行解压,并得到解密文件、解压缩文件。之后,文件存储客户端可以将解密文件、解压缩文件传输给操作系统,由操作系统显示给用户或传输给应用程序使用。For example, after the file storage client obtains the encrypted file or compressed file from the object storage service node, it can decrypt the encrypted file or decompress the compressed file to obtain the decrypted file or decompressed file. Afterwards, the file storage client can transfer the decrypted file or decompressed file to the operating system, which will display it to the user or transfer it to the application for use.
基于上述,文件存储客户端可以对文件扩展属性所代表的具体含义进行管理和逻辑实现。Based on the above, the file storage client can manage and logically implement the specific meanings represented by the file extension attributes.
本申请实施例中,文件存储客户端可以包括属性管理模块,属性管理模块可以用于管理文件扩展属性。In the embodiment of the present application, the file storage client may include an attribute management module, and the attribute management module may be used to manage file extension attributes.
示例性的,文件存储客户端可以通过属性管理模块将文件扩展属性的管理指令(如:属性设置指令)映射为属性设置请求,并向对象存储服务节点发送属性设置请求,以请求管理文件扩展属性。Exemplarily, the file storage client may map the management instruction of the file extension attribute (eg, attribute setting instruction) into an attribute setting request through the attribute management module, and send the attribute setting request to the object storage service node to request to manage the file extension attribute.
本申请实施例中,文件存储客户端可以包括属性实现模块,属性实现模块可以用于为实现文件扩展属性。示例性的,文件存储客户端可以通过属性实现模块实现文件的只读属性、加密属性、压缩属性等。In the embodiment of the present application, the file storage client may include an attribute implementation module, which may be used to implement file extension attributes. Exemplarily, the file storage client may implement the read-only attribute, encryption attribute, compression attribute, etc. of the file through the attribute implementation module.
需要说明的,属性管理模块所实现的功能和属性实现模块所实现的功能,也可以通过一个模块实现,本申请实施例中对此不做限制。It should be noted that the functions implemented by the attribute management module and the functions implemented by the attribute implementation module can also be implemented by one module, and this is not limited in the embodiments of the present application.
本申请实施例中,对象存储服务节点配置有解析模块,解析模块可以用于实现解析属性设置请求,以基于属性设置请求所请求的内容确定文件扩展属性的管理方式,如:将目标节点的目标文件扩展属性设置为目标状态等。In an embodiment of the present application, the object storage service node is configured with a parsing module, which can be used to implement the parsing of attribute setting requests to determine the management method of file extension attributes based on the content requested by the attribute setting request, such as: setting the target file extension attribute of the target node to the target state, etc.
需要说明的,本申请实施例中,解析模块执行的某个操作,可以认为是对象存储服务节点运行解析模块的过程中执行某个操作,或者,对象存储服务节点通过解析模块执行某个操作,后续不再赘述。It should be noted that in the embodiments of the present application, an operation performed by the parsing module can be considered as an operation performed in the process of the object storage service node running the parsing module, or the object storage service node performs a certain operation through the parsing module, which will not be repeated later.
示例性的,文件存储客户端管理的文件扩展属性可以包括:只读属性、隐藏属性、系统属性、目录属性、归档属性、安装设备驱动程序属性、正常属性、临时属性、稀疏文件属性、重分析点属性、压缩属性、脱机属性、无内容索引属性、加密属性、完整性流属性、虚拟现实属性、无擦除数据属性、自定义扩展属性、固定属性、未固定属性、重新调用打开属性、调用数据访问属性等。Exemplarily, the file extended attributes managed by the file storage client may include: read-only attribute, hidden attribute, system attribute, directory attribute, archive attribute, device driver installation attribute, normal attribute, temporary attribute, sparse file attribute, reanalysis point attribute, compression attribute, offline attribute, no content index attribute, encryption attribute, integrity stream attribute, virtual reality attribute, no erase data attribute, custom extended attribute, fixed attribute, unfixed attribute, recall open attribute, call data access attribute, etc.
参见图2,对象存储服务节点提供了业务接口和管理接口。业务接口用于访问对象存储服务节点上存储的对象,管理接口用于管理对象存储服务节点上存储的对象的文件扩展属性。As shown in Figure 2, the object storage service node provides a business interface and a management interface. The business interface is used to access objects stored on the object storage service node, and the management interface is used to manage file extension attributes of objects stored on the object storage service node.
基于此,文件存储客户端可以通过业务接口,对对象存储服务节点上存储的对象执行读操作、写操作等。此外,还可以通过管理接口,管理对象存储服务节点上存储的对象的文件扩展属性。Based on this, the file storage client can perform read and write operations on objects stored on the object storage service node through the business interface. In addition, the file extension attributes of objects stored on the object storage service node can also be managed through the management interface.
本申请实施例中,对象存储服务节点还存储有对象的元数据。其中,对象存储服务节点可以通过解析模块解析属性设置请求,以确定文件扩展属性的管理方法,如:生成目标字段、修改目标字符串的值等, 用于指示文件扩展属性的状态等,其中,目标字段、目标字符串可以存储在对象的元数据中,以便于实现永久化存储文件扩展属性。In the embodiment of the present application, the object storage service node also stores metadata of the object. The object storage service node can parse the attribute setting request through the parsing module to determine the management method of the file extension attribute, such as generating a target field, modifying the value of the target string, etc. Used to indicate the status of file extension attributes, etc., wherein the target field and target string can be stored in the metadata of the object to facilitate the permanent storage of file extension attributes.
需要说明的,本申请实施例描述的系统架构以及应用场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着系统架构的演变和新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。It should be noted that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
为了便于理解,以下结合上述系统架构以及附图,对本申请实施例提供的文件扩展属性管理方法进行示例性介绍。For ease of understanding, the file extension attribute management method provided in the embodiment of the present application is exemplarily introduced below in combination with the above system architecture and accompanying drawings.
本申请实施例将分成三部分对文件扩展属性管理方法的方案进行示例性介绍。The embodiment of the present application will be divided into three parts to exemplarily introduce the scheme of the file extension attribute management method.
第一部分,结合图3至图7,介绍设置文件或目录的文件扩展属性的方案,如:为目标节点配置至少一个文件扩展属性、取消目标节点已配置的至少一个文件扩展属性等。The first part, in conjunction with Figures 3 to 7, introduces a solution for setting file extension attributes of a file or directory, such as: configuring at least one file extension attribute for a target node, canceling at least one file extension attribute that has been configured for a target node, etc.
第二部分,结合图8至图13,介绍查询文件或目录的文件扩展属性的方案,如:查询目标节点的至少一个文件扩展属性。The second part, in conjunction with FIG. 8 to FIG. 13 , introduces a solution for querying file extension attributes of a file or directory, such as querying at least one file extension attribute of a target node.
第三部分,结合图14至图18,介绍实现文件或目录的文件扩展属性的方案,如:实现目标节点的至少一个文件扩展属性。The third part, in conjunction with FIG. 14 to FIG. 18 , introduces a solution for implementing file extension attributes of a file or directory, such as: implementing at least one file extension attribute of a target node.
以下,结合图3至图7,介绍本申请实施例的第一部分。The following introduces the first part of the embodiment of the present application in conjunction with Figures 3 to 7.
图3是根据一示例性实施例示出的一种文件扩展属性管理方法的流程图。示例性的,该文件扩展属性管理方法可以包括以下步骤301-步骤303。Fig. 3 is a flow chart of a method for managing file extension attributes according to an exemplary embodiment. Exemplarily, the method for managing file extension attributes may include the following steps 301-303.
需要说明的,本申请实施例中的“步骤”可以简写为“S”,后续不再赘述。It should be noted that the "step" in the embodiments of the present application can be abbreviated as "S" and will not be repeated later.
本申请实施例中,对象存储服务节点存储有多个对象。示例性的,多个对象可以包括目标对象,目标对象可以为多个对象中的任意一个对象。其中,一个对象可以用于指示一个文件或者文件夹。在一个对象用于指示文件时,该一个对象可以包括用户数据、元数据以及对象标识(ID)。在一个对象用于指示文件夹时,该一个对象可以包括元数据以及对象标识。In an embodiment of the present application, an object storage service node stores multiple objects. Exemplarily, the multiple objects may include a target object, and the target object may be any one of the multiple objects. Among them, an object may be used to indicate a file or a folder. When an object is used to indicate a file, the object may include user data, metadata, and an object identifier (ID). When an object is used to indicate a folder, the object may include metadata and an object identifier.
对象存储服务节点将存储桶中存储的多个对象映射为目录树上的多个节点,示例性的,多个节点包括目标节点,目标节点是基于目标对象映射的节点。The object storage service node maps multiple objects stored in the bucket to multiple nodes on the directory tree. Exemplarily, the multiple nodes include a target node, which is a node mapped based on the target object.
需要说明的,在一个节点为文件时,该节点也可以称为文件节点。在一个节点为目录时,该节点也可以称为目录节点。It should be noted that when a node is a file, the node may also be called a file node. When a node is a directory, the node may also be called a directory node.
可以理解的,用于指示文件的对象会映射为目录树上的文件节点,用于指示文件夹的对象会映射为目录树上的目录节点。It can be understood that an object used to indicate a file will be mapped to a file node on the directory tree, and an object used to indicate a folder will be mapped to a directory node on the directory tree.
本申请实施例中,对象存储服务节点存储有多个对象与多个节点之间的映射关系。其中,多个对象与多个节点之间一一对应,也就是说,一个对象与该一个对象所映射的节点之间具有映射关系。示例性的,目标节点与目标对象之间具有映射关系。In an embodiment of the present application, an object storage service node stores a mapping relationship between multiple objects and multiple nodes. There is a one-to-one correspondence between multiple objects and multiple nodes, that is, there is a mapping relationship between an object and the node to which the object is mapped. Exemplarily, there is a mapping relationship between a target node and a target object.
以下,以对象存储服务节点上存储的目标元素为例,对节点和对象的关系进行说明。The following describes the relationship between nodes and objects by taking the target element stored on the object storage service node as an example.
示例性的,对象存储服务节点将目标元素以对象的形式存储在存储桶中,目标元素可以为用户数据或模拟文件夹。用户基于对象文件存储客户端访问目标元素时,目标数据可以称为目标对象。用户基于文件系统文件存储客户端访问目标元素时,目标数据称为目标节点。其中,具有映射关系的目标节点和目标对象指向相同的元素(即目标元素)。Exemplarily, the object storage service node stores the target element in the form of an object in a storage bucket, and the target element can be user data or a simulated folder. When a user accesses the target element based on an object file storage client, the target data can be called a target object. When a user accesses the target element based on a file system file storage client, the target data is called a target node. Among them, the target node and the target object with a mapping relationship point to the same element (i.e., the target element).
以下,以目标对象和目标对象映射的目标节点为例,对本申请实施例提供的文件扩展属性管理方法进行示例性说明。其中,目标对象的标识和目标节点的标识均为目标标识符。The following uses a target object and a target node mapped to the target object as an example to exemplify the file extension attribute management method provided by the embodiment of the present application, wherein the identifier of the target object and the identifier of the target node are both target identifiers.
示例性的,目标标识符的表示形式可以是统一资源标识符(Uniform Resource Identifier,URI)、字符串等,本申请实施例对此不做限制。Exemplarily, the representation of the target identifier can be a Uniform Resource Identifier (URI), a string, etc., which is not limited in the embodiments of the present application.
本申请实施例中,电子设备上安装有Window操作系统和文件存储客户端,Window操作系统可以通过FUSE模块与文件存储客户端进行交互,文件存储客户端可以通过对象存储服务节点提供的接口,与对象存储服务节点进行交互。In an embodiment of the present application, a Window operating system and a file storage client are installed on the electronic device. The Window operating system can interact with the file storage client through a FUSE module, and the file storage client can interact with the object storage service node through an interface provided by the object storage service node.
步骤301:文件存储客户端接收属性设置指令,属性设置指令指示了将目标节点的目标文件扩展属性设置为目标状态。其中,目标状态包括已配置状态或未配置状态。Step 301: The file storage client receives an attribute setting instruction, which indicates setting the target file extension attribute of the target node to a target state, wherein the target state includes a configured state or an unconfigured state.
可以理解的,将目标文件扩展属性设置为已配置状态,可以认为是为目标节点配置目标文件扩展属性,将目标文件扩展属性设置为未配置状态,可以认为是取消目标节点配置的目标文件扩展属性。It can be understood that setting the target file extended attribute to the configured state can be considered as configuring the target file extended attribute for the target node, and setting the target file extended attribute to the unconfigured state can be considered as canceling the target file extended attribute configured for the target node.
本申请实施例中,属性设置指令指示了目标节点。示例性的,属性设置指令可以包括目标节点的标识、目标节点的路径等,从而实现指示目标节点。这样,有助于避免文件存储客户端设置非目标节点的文件扩 展属性,从而有助于保证文件存储客户端后续所执行操作的准确性。In the embodiment of the present application, the attribute setting instruction indicates the target node. Exemplarily, the attribute setting instruction may include the identifier of the target node, the path of the target node, etc., so as to indicate the target node. This helps to avoid the file storage client setting the file expansion of the non-target node. The extended attributes help ensure the accuracy of subsequent operations performed by the file storage client.
本申请实施例中,属性设置指令指示了目标文件扩展属性。示例性的,属性设置指令可以包括目标文件扩展属性的标识、目标文件扩展属性的名称等,从而实现指示目标文件扩展属性。这样,有助于避免文件存储客户端管理非目标文件扩展属性,从而有助于保证文件存储客户端后续所执行操作的准确性。In the embodiment of the present application, the attribute setting instruction indicates the target file extended attribute. Exemplarily, the attribute setting instruction may include the identifier of the target file extended attribute, the name of the target file extended attribute, etc., so as to indicate the target file extended attribute. In this way, it is helpful to avoid the file storage client from managing non-target file extended attributes, thereby helping to ensure the accuracy of subsequent operations performed by the file storage client.
可选地,目标文件扩展属性可以包括:只读属性、隐藏属性、系统属性、目录属性、归档属性、安装设备驱动程序属性、正常属性、临时属性、稀疏文件扩展属性、重分析点属性、压缩属性、脱机属性、无内容索引属性、加密属性、完整性流属性、虚拟现实属性、无擦除数据属性、自定义扩展属性、固定属性、未固定属性、重新调用打开属性、调用数据访问属性中的至少一项。Optionally, the target file extended attributes may include: at least one of: read-only attribute, hidden attribute, system attribute, directory attribute, archive attribute, device driver installation attribute, normal attribute, temporary attribute, sparse file extension attribute, reanalysis point attribute, compression attribute, offline attribute, no content index attribute, encryption attribute, integrity stream attribute, virtual reality attribute, no erase data attribute, custom extended attribute, fixed attribute, unfixed attribute, recall open attribute, and call data access attribute.
需要说明的,本申请实施例对目标文件扩展属性的类型不作限制,以上仅为示例性说明。It should be noted that the embodiment of the present application does not limit the type of extended attributes of the target file, and the above is only an exemplary description.
可选地,目标文件扩展属性是指一类属性,即属性设置指令指示的每个文件扩展属性。由于属性设置指令可以同时指示设置一个或多个文件扩展属性,因此,目标文件扩展属性也可以是指一个或多个文件扩展属性,也就是说,一个或多个文件扩展属性均可以称为目标文件扩展属性。Optionally, the target file extended attribute refers to a type of attribute, i.e., each file extended attribute indicated by the attribute setting instruction. Since the attribute setting instruction can indicate setting one or more file extended attributes at the same time, the target file extended attribute can also refer to one or more file extended attributes, that is, one or more file extended attributes can be called the target file extended attribute.
示例性的,属性设置指令可以指示设置只读属性、隐藏属性、加密属性、压缩属性等文件扩展属性。基于此,目标文件扩展属性可以包括只读属性、隐藏属性、加密属性、压缩属性等。也就是说,只读属性、隐藏属性、加密属性、压缩属性等都可以称为目标文件扩展属性。Exemplarily, the attribute setting instruction may indicate setting file extended attributes such as read-only attribute, hidden attribute, encrypted attribute, compressed attribute, etc. Based on this, the target file extended attributes may include read-only attribute, hidden attribute, encrypted attribute, compressed attribute, etc. In other words, the read-only attribute, hidden attribute, encrypted attribute, compressed attribute, etc. may all be referred to as target file extended attributes.
该实施例中,通过设置属性设置指令可以指示多个文件扩展属性,也即,将多个文件扩展属性作为目标文件扩展属性,这样,能够实现同时设置多个文件扩展属性的状态,从而有助于提高文件扩展属性的设置效率,进而有助于提高用户的使用体验。In this embodiment, multiple file extension attributes can be indicated by setting the attribute setting instruction, that is, multiple file extension attributes are used as target file extension attributes. In this way, it is possible to set multiple file extension attributes at the same time, which helps to improve the setting efficiency of file extension attributes and further helps to improve the user experience.
本申请实施例中,属性设置指令指示了目标状态。这样,有助于避免文件存储客户端设置非目标状态,从而有助于保证文件存储客户端后续所执行操作的准确性。In the embodiment of the present application, the attribute setting instruction indicates the target state, which helps to avoid the file storage client from setting a non-target state, thereby helping to ensure the accuracy of subsequent operations performed by the file storage client.
本申请实施例中,在目标文件扩展属性包括多个文件扩展属性时,多个文件扩展属性中每个文件扩展属性的目标状态可以不同,或者,也可以相同。也就是说,不同目标文件扩展属性的目标状态可以相同,或者,也可以不同。这样,即使是目标状态不同的文件扩展属性也可以通过同一个指令设置,从而有助于提高文件扩展属性的设置效率。In the embodiment of the present application, when the target file extension attribute includes multiple file extension attributes, the target state of each file extension attribute in the multiple file extension attributes can be different, or can also be the same. In other words, the target states of different target file extension attributes can be the same, or can also be different. In this way, even file extension attributes with different target states can be set through the same instruction, thereby helping to improve the setting efficiency of file extension attributes.
示例性的,属性设置指令指示了只读属性、隐藏属性、加密属性、压缩属性等目标文件扩展属性。在此基础上,属性设置指令还指示了将只读属性设置为已配置状态、隐藏属性设置为未配置状态、加密属性设置为已配置状态、压缩属性设置为已配置状态。由此,只读属性的目标状态为已配置状态,隐藏属性的目标状态为未配置状态,加密属性的目标状态为已配置状态,压缩属性的目标状态为已配置状态。Exemplarily, the attribute setting instruction indicates the target file extended attributes such as read-only attribute, hidden attribute, encryption attribute, and compression attribute. On this basis, the attribute setting instruction also indicates setting the read-only attribute to a configured state, the hidden attribute to an unconfigured state, the encryption attribute to a configured state, and the compression attribute to a configured state. Thus, the target state of the read-only attribute is a configured state, the target state of the hidden attribute is an unconfigured state, the target state of the encryption attribute is a configured state, and the target state of the compression attribute is a configured state.
本申请实施例中,属性设置指令包括多种情况,以下,通过情况1至情况2进行示例性介绍。In the embodiment of the present application, the attribute setting instruction includes multiple situations, and the following is an exemplary introduction through situation 1 to situation 2.
情况1:属性设置指令为用户触发的指令。Case 1: The property setting instruction is a user-triggered instruction.
在一个示例中,用户可以直接指示将目标节点的目标文件扩展属性设置为目标状态。In one example, the user may directly instruct to set the target file extended attribute of the target node to the target state.
示例性的,如图4中的(a)所示,电子设备显示目标节点的属性界面,该属性界面指示了只读属性和隐藏属性。只读属性左侧的方框未被选中,因此,只读属性的当前状态为未配置状态,隐藏属性左侧的方框已被选中,因此,隐藏属性的当前状态为已配置状态。Exemplarily, as shown in (a) of FIG4 , the electronic device displays the property interface of the target node, and the property interface indicates a read-only property and a hidden property. The box on the left side of the read-only property is not selected, so the current state of the read-only property is an unconfigured state, and the box on the left side of the hidden property is selected, so the current state of the hidden property is a configured state.
示例1,如图4中的(b)所示,用户通过电子设备选中只读属性左侧的方框时,电子设备响应于用户的触发操作(即选中方框),向文件存储客户端发送属性设置指令,该属性设置指令指示将只读属性(即目标文件扩展属性)设置为已配置状态(即目标状态)。Example 1, as shown in (b) in Figure 4, when the user selects the box on the left side of the read-only attribute through the electronic device, the electronic device responds to the user's trigger operation (i.e., selecting the box) and sends a property setting instruction to the file storage client, where the property setting instruction instructs the read-only attribute (i.e., the target file extended attribute) to be set to a configured state (i.e., the target state).
示例2,如图4中的(c)所示,用户通过电子设备取消选中隐藏属性左侧的方框时,电子设备响应于用户的触发操作(即取消选中方框),向文件存储客户端发送属性设置指令,该属性设置指令指示将隐藏属性(即目标文件扩展属性)设置为未配置状态(即目标状态)。Example 2, as shown in (c) in Figure 4, when the user unchecks the box on the left side of the hidden attribute through the electronic device, the electronic device responds to the user's trigger operation (i.e., unchecking the box) and sends a property setting instruction to the file storage client, where the property setting instruction instructs to set the hidden attribute (i.e., the target file extended attribute) to an unconfigured state (i.e., the target state).
示例性的,如图4中的(d)所示,用户通过电子设备选中只读属性左侧的方案、且取消选中隐藏属性左侧的方案时,电子设备响应于用户的触发操作,向文件存储客户端属性设置指令,该属性设置指令指示将只读属性设置为已配置状态、隐藏属性设置为未配置状态。Exemplarily, as shown in (d) in FIG. 4 , when a user selects the solution on the left side of the read-only attribute and unselects the solution on the left side of the hidden attribute through an electronic device, the electronic device responds to the user's trigger operation and sends an attribute setting instruction to the file storage client, wherein the attribute setting instruction indicates that the read-only attribute is set to a configured state and the hidden attribute is set to an unconfigured state.
在另一个示例中,用户通过指示对目标节点执行第一操作,实现指示将目标节点的目标文件扩展属性设置为目标状态。其中,第一操作与目标文件扩展属性相关。In another example, the user instructs to perform a first operation on the target node, thereby instructing to set the target file extension attribute of the target node to a target state, wherein the first operation is related to the target file extension attribute.
示例3,用户通过电子设备指示加密目标节点,电子设备响应于用户的触发操作,向文件存储客户端发送加密指令(即属性设置指令),文件存储客户端接收到加密指令后,对目标节点执行加密操作,并将目标节点的加密属性(即目标文件扩展属性)设置为已配置状态(即目标状态)。也就是说,加密指令指示对目标节点进行加密的基础上,还指示了将目标节点的加密属性设置为已配置状态。 Example 3: The user instructs the encryption of the target node through the electronic device. The electronic device responds to the user's trigger operation and sends an encryption instruction (i.e., an attribute setting instruction) to the file storage client. After receiving the encryption instruction, the file storage client performs an encryption operation on the target node and sets the encryption attribute of the target node (i.e., the target file extended attribute) to the configured state (i.e., the target state). In other words, the encryption instruction not only instructs the encryption of the target node, but also instructs the encryption attribute of the target node to be set to the configured state.
示例4,用户通过电子设备指示压缩目标节点,电子设备响应于用户的触发操作,向文件存储客户端发送压缩指令(即属性设置指令),文件存储客户端接收到压缩指令后,对目标节点执行压缩操作,并将目标节点的压缩属性(即目标文件扩展属性)设置为已配置状态(即目标状态)。也就是说,压缩指令指示对目标节点进行压缩的基础上,还指示了将目标节点的压缩属性设置为已配置状态。Example 4: The user instructs the electronic device to compress the target node. The electronic device responds to the user's trigger operation and sends a compression instruction (i.e., an attribute setting instruction) to the file storage client. After receiving the compression instruction, the file storage client performs a compression operation on the target node and sets the compression attribute of the target node (i.e., the target file extension attribute) to the configured state (i.e., the target state). In other words, the compression instruction not only instructs the target node to be compressed, but also instructs the target node to be set to the configured state.
本申请实施例中,用户通过电子设备触发属性设置指令后,电子设备上运行的Windows操作系统向文件存储客户端发送属性设置指令,以指示文件存储客户端将目标节点的目标文件扩展属性设置为目标状态。In an embodiment of the present application, after a user triggers an attribute setting instruction through an electronic device, the Windows operating system running on the electronic device sends an attribute setting instruction to a file storage client to instruct the file storage client to set the target file extended attribute of the target node to a target state.
需要说明的,本申请实施例中,操作系统执行某个操作,可以认为是电子设备运行操作系统的过程中执行某个操作,或者,电子设备通过操作系统执行某个操作,后续不再赘述。It should be noted that in the embodiments of the present application, the operating system performs a certain operation, which can be considered as the electronic device performing a certain operation during the process of running the operating system, or the electronic device performing a certain operation through the operating system, which will not be further described later.
该实施例中,通过设置属性设置指令可以为用户触发的指令,这样,用户便可以为不同节点设置文件扩展属性,从而有助于提高用户的使用体验。In this embodiment, the attribute setting instruction can be a user-triggered instruction, so that the user can set file extension attributes for different nodes, thereby helping to improve the user experience.
情况2:属性设置指令为目标应用程序触发的指令。Case 2: The property setting instruction is a command triggered by the target application.
示例性的,电子设备运行目标应用程序(以下简称为目标应用)的过程中,若需要将目标节点的目标文件扩展属性设置为目标状态,目标应用可以向操作系统发送设置指令,用于指示将目标节点的目标文件扩展属性设置为目标状态,操作系统响应于接收到的设置指令,向文件存储客户端发送属性设置指令,以指示文件存储客户端将目标节点的目标文件扩展属性设备为目标状态。Exemplarily, during the process of an electronic device running a target application (hereinafter referred to as the target application), if it is necessary to set the target file extension attribute of the target node to a target state, the target application can send a setting instruction to the operating system to instruct the target file extension attribute of the target node to be set to a target state. In response to the received setting instruction, the operating system sends an attribute setting instruction to the file storage client to instruct the file storage client to set the target file extension attribute of the target node to a target state.
需要说明的,本申请实施例中,目标应用执行某个操作,可以认为是电子设备运行目标应用的过程中执行某个操作,或者,电子设备通过目标应用执行某个操作,后续不再赘述。It should be noted that in the embodiments of the present application, the target application performs a certain operation, which can be considered as the electronic device performing a certain operation during the process of running the target application, or the electronic device performing a certain operation through the target application, which will not be further described later.
示例性的,目标应用可以是桌面云应用、媒资视频应用等文件应用。需要说明的,本申请实施例对目标应用的类型不作限制,以上仅为示例性说明。For example, the target application may be a file application such as a desktop cloud application, a media asset video application, etc. It should be noted that the embodiment of the present application does not limit the type of the target application, and the above is only an exemplary description.
需要说明的,情况2的其他说明,可以参考情况1的说明,此处不再赘述。It should be noted that for other explanations of Case 2, please refer to the explanation of Case 1, which will not be repeated here.
该实施例中,通过设置属性设置指令可以为目标应用触发的指令,从而实现为目标应用提供设置文件扩展属性的权限,进而使得对象存储可以更好的兼容文件应用,为文件应用提供更全面的文件服务。In this embodiment, the attribute setting instruction can be set as an instruction triggered by the target application, thereby providing the target application with permission to set file extended attributes, thereby making the object storage more compatible with file applications and providing more comprehensive file services for file applications.
以下,对Windows操作系统向文件存储客户端发送属性设置指令的方式进行示例性介绍。The following is an exemplary introduction to the manner in which the Windows operating system sends a property setting instruction to a file storage client.
本申请实施例中,Windows操作系统可以通过FUSE模块向文件存储客户端发送属性设置指令。In an embodiment of the present application, the Windows operating system can send attribute setting instructions to the file storage client through the FUSE module.
示例性的,在用户触发属性设置指令,或,目标应用向Windows发送设置指令后,Windows操作系统向FUSE模块发送属性设置指令,以由FUSE模块向文件存储客户端发送属性设置指令。Exemplarily, after a user triggers a property setting instruction, or a target application sends a setting instruction to Windows, the Windows operating system sends the property setting instruction to the FUSE module, so that the FUSE module sends the property setting instruction to the file storage client.
本申请实施例中,文件存储客户端配置有第一接口,第一接口用于指示设置文件扩展属性。在此基础上,Windows操作系统可以通过第一接口向文件存储客户端发送属性设置指令。In the embodiment of the present application, the file storage client is configured with a first interface, and the first interface is used to instruct to set the file extension attribute. On this basis, the Windows operating system can send the attribute setting instruction to the file storage client through the first interface.
示例性的,如图5所示,FUSE模块接收到操作系统发送的属性设置指令后,通过调用第一接口向文件存储客户端发送属性设置指令。Exemplarily, as shown in FIG5 , after receiving the attribute setting instruction sent by the operating system, the FUSE module sends the attribute setting instruction to the file storage client by calling the first interface.
示例性的,第一接口可以为win_set_file_attr。其中,“win”用于表征windows操作系统,“set”用于表征设置,“file_attr”用于表征文件扩展属性。Exemplarily, the first interface may be win_set_file_attr, where "win" is used to represent the Windows operating system, "set" is used to represent setting, and "file_attr" is used to represent file extended attributes.
可以理解的,第一接口可以认为是文件存储客户端向操作系统提供的接口,以使得操作系统可以通过第一接口与文件存储客户端交互。FUSE模块可以认为是Windows操作系统向文件存储客户端提供的接口,以使得文件存储客户端可以通过FUSE模块与Windows操作系统进行交互。It can be understood that the first interface can be considered as an interface provided by the file storage client to the operating system, so that the operating system can interact with the file storage client through the first interface. The FUSE module can be considered as an interface provided by the Windows operating system to the file storage client, so that the file storage client can interact with the Windows operating system through the FUSE module.
需要说明的,本申请实施例对Windows向文件存储客户端发送属性设置指令的方式不做限制,以上仅为示例性说明。It should be noted that the embodiment of the present application does not limit the manner in which Windows sends attribute setting instructions to the file storage client, and the above is merely an exemplary description.
该实施例中,通过为文件存储客户端配置第一接口,作为设置文件扩展属性的接口,这样,有助于提高文件扩展属性的设置准确性,从而有助于更好的提供文件扩展属性管理服务。In this embodiment, by configuring the first interface for the file storage client as an interface for setting file extension attributes, this helps to improve the accuracy of setting file extension attributes, thereby helping to better provide file extension attribute management services.
步骤302:文件存储客户端基于属性设置指令以及对象存储服务节点提供的目标接口,确定属性设置请求。其中,对象存储服务节点提供的目标接口用于指示属性设置请求的格式,属性设置请求用于请求将目标节点的目标文件扩展属性设置为目标状态。Step 302: The file storage client determines a property setting request based on the property setting instruction and the target interface provided by the object storage service node. The target interface provided by the object storage service node is used to indicate the format of the property setting request, and the property setting request is used to request to set the target file extended attribute of the target node to the target state.
示例性的,文件存储客户端可以通过属性管理模块接收属性设置指令,并通过属性管理模块确定属性设置请求。Exemplarily, the file storage client may receive the property setting instruction through the property management module, and determine the property setting request through the property management module.
本申请实施例中,对象存储服务节点提供的目标接口可以为REST API接口。也就是说,可以通过REST API接口承载指示文件扩展属性语义(即目标节点、目标文件扩展属性以及目标状态等)的属性设置请求。In the embodiment of the present application, the target interface provided by the object storage service node may be a REST API interface. In other words, a property setting request indicating the semantics of file extension attributes (i.e., target node, target file extension attributes, target status, etc.) may be carried through the REST API interface.
本申请实施例中,属性设置请求可以包括消息内容、请求地址和操作命令等。其中,消息内容、请求地址和操作命令的格式采用可以REST API接口定义的格式。In the embodiment of the present application, the property setting request may include message content, request address, operation command, etc. Among them, the format of the message content, request address and operation command adopts the format that can be defined by the REST API interface.
示例性的,基于REST API接口定义的消息内容可以通过Xml Body体记载。也即,属性设置请求的消 息内容可以记载在Xml Body体中。基于此,属性设置请求的消息内容的格式采用Xml Body的格式。Exemplarily, the message content defined based on the REST API interface can be recorded in the XML Body. The message content can be recorded in the Xml Body. Based on this, the format of the message content of the property setting request adopts the format of Xml Body.
示例性的,基于REST API接口定义的请求地址可以通过统一资源定位系统(uniform resource locator,URL)实现。基于此,请求地址的格式采用URL的格式。For example, the request address defined based on the REST API interface can be implemented through a uniform resource locator (URL). Based on this, the format of the request address adopts the format of the URL.
示例性的,基于REST API接口定义的操作命令可以包括GET、PUT、HEAD、DELETE、POST等。For example, the operation commands defined based on the REST API interface may include GET, PUT, HEAD, DELETE, POST, etc.
其中,Xml Body的格式、URL的格式可以参考相关技术中的说明,此处不再赘述。Among them, the format of Xml Body and the format of URL can be referred to the description in the relevant technology, which will not be repeated here.
该实施例中,在对象存储服务节点提供的目标接口为REST API接口时,属性设置请求的消息内容采用Xml Body的格式,请求地址采用URL的格式,操作命令可以是GET、PUT、HEAD、DELETE、POST等,从而使得属性设置请求采用REST API接口的格式,进而有助于对象存储服务节点准确识别出属性设置请求所请求的内容,这样,有助于对象存储服务节点执行的文件扩展属性管理操作的准确性。In this embodiment, when the target interface provided by the object storage service node is a REST API interface, the message content of the property setting request adopts the format of Xml Body, the request address adopts the format of URL, and the operation command can be GET, PUT, HEAD, DELETE, POST, etc., so that the property setting request adopts the format of the REST API interface, which helps the object storage service node to accurately identify the content requested by the property setting request, thereby facilitating the accuracy of the file extension attribute management operations performed by the object storage service node.
需要说明的,本申请实施例对对象存储服务节点提供的目标接口的类型不作限制,以上仅为示例性说明。It should be noted that the embodiment of the present application does not limit the type of target interface provided by the object storage service node, and the above is only an exemplary description.
本申请实施例中,属性设置请求可以包括第一字段。其中,第一字段用于指示文件扩展属性。In the embodiment of the present application, the attribute setting request may include a first field, wherein the first field is used to indicate a file extension attribute.
示例性的,第一字段可以为“winmode”。“winmode”中的“win”用于指示Windows操作系统,“mode”用于指示文件扩展属性。Exemplarily, the first field may be “winmode.” “win” in “winmode” is used to indicate a Windows operating system, and “mode” is used to indicate a file extension attribute.
示例性的,请求地址可以是包括第一字段,第一字段在请求地址中的格式可以为“?winmode”。通过在请求地址中增加指示文件扩展属性的第一字段,从而实现指示属性设置请求是与文件扩展属性相关的请求,这样,有助于提高文件扩展属性管理的准确性。Exemplarily, the request address may include a first field, and the format of the first field in the request address may be "?winmode". By adding the first field indicating the file extension attribute in the request address, it is possible to indicate that the attribute setting request is a request related to the file extension attribute, which helps to improve the accuracy of file extension attribute management.
示例性的,消息内容可以包括第一字段,第一字段在消息内容中格式可以为“<winmode></winmode>”。通过在消息内容中增加指示文件扩展属性的字段,这样,有助于对象存储节点准确定位属性设置请求所请求的内容,从而有助于提高文件扩展属性管理的准确性和效率。Exemplarily, the message content may include a first field, and the format of the first field in the message content may be "<winmode></winmode>". By adding a field indicating the file extension attribute to the message content, it is helpful for the object storage node to accurately locate the content requested by the attribute setting request, thereby helping to improve the accuracy and efficiency of file extension attribute management.
本申请实施例中,属性设置请求通过指示目标节点、目标文件扩展属性以及目标状态,实现请求将目标节点的目标文件扩展属性设置为目标状态。其中,属性设置请求指示目标节点、目标文件扩展属性以及目标状态,包括多种实现方式,以下,通过方式1至方式2进行示例性说明。In the embodiment of the present application, the attribute setting request realizes the request to set the target file extended attribute of the target node to the target state by indicating the target node, the target file extended attribute and the target state. Among them, the attribute setting request indicates the target node, the target file extended attribute and the target state, including multiple implementation methods, and the following is exemplified by method 1 and method 2.
方式1:属性设置请求通过消息内容指示目标文件扩展属性,并通过操作命令指示目标状态。Mode 1: The attribute setting request indicates the extended attributes of the target file through the message content and indicates the target status through the operation command.
示例性的,属性设置请求的消息内容可以包括第二字段,第二字段用于指示目标文件扩展属性。Exemplarily, the message content of the attribute setting request may include a second field, and the second field is used to indicate an extended attribute of the target file.
可选地,第二字段可以包括目标文件扩展属性的名称和目标文件扩展属性的取值。其中,目标文件扩展属性的取值为目标文件扩展属性在Windows操作系统中的值。Optionally, the second field may include a name of the target file extension attribute and a value of the target file extension attribute, wherein the value of the target file extension attribute is a value of the target file extension attribute in the Windows operating system.
该实施例中,通过设置目标文件扩展属性的取值为目标文件扩展属性在Windows操作系统中的值,这样,目标文件扩展属性在对象存储的语义中的取值与在Windows操作系统中的值相同,从而有助于提高文件存储客户端进行语义转换时的便利性和准确性,进而有助于提高文件扩展属性管理的便利性和准确性。In this embodiment, by setting the value of the target file extension attribute to the value of the target file extension attribute in the Windows operating system, the value of the target file extension attribute in the semantics of the object storage is the same as the value in the Windows operating system, thereby helping to improve the convenience and accuracy of the file storage client when performing semantic conversion, and further helping to improve the convenience and accuracy of file extension attribute management.
示例性的,目标文件扩展属性包括只读属性时,第二字段可以包括“<FileAttributeReadonly>0x00000001</FileAttributeReadonly>”。“FileAttributeReadonly”中的“FileAttribute”为前缀,用于指示文件扩展属性,“Readonly”用于指示文件扩展属性的名称,即“只读属性”。“0x00000001”用于指示文件扩展属性的取值,即目标文件扩展属性的取值,“0x”用于指示十六进制,即只读属性的十六进制取值为“00000001”。Exemplarily, when the target file extended attribute includes a read-only attribute, the second field may include “<FileAttributeReadonly>0x00000001</FileAttributeReadonly>”. The “FileAttribute” in “FileAttributeReadonly” is a prefix used to indicate the file extended attribute, and “Readonly” is used to indicate the name of the file extended attribute, that is, the “read-only attribute”. “0x00000001” is used to indicate the value of the file extended attribute, that is, the value of the target file extended attribute, and “0x” is used to indicate hexadecimal, that is, the hexadecimal value of the read-only attribute is “00000001”.
示例性的,在属性设置指令指示了22个文件扩展属性的情况下,属性设置请求也指示22个文件扩展属性。基于此,属性设置请求的消息内容可以如下所示:Exemplarily, when the attribute setting instruction indicates 22 file extension attributes, the attribute setting request also indicates 22 file extension attributes. Based on this, the message content of the attribute setting request may be as follows:
<winmode><winmode>
<FileAttributeReadonly>0x00000001</FileAttributeReadonly><FileAttributeReadonly>0x00000001</FileAttributeReadonly>
<FileAttributeHidden>0x00000002</FileAttributeHidden><FileAttributeHidden>0x00000002</FileAttributeHidden>
<FileAttributeSystem>0x00000004</FileAttributeSystem><FileAttributeSystem>0x00000004</FileAttributeSystem>
<FileAttributeDirectory>0x00000010</FileAttributeDirectory><FileAttributeDirectory>0x00000010</FileAttributeDirectory>
<FileAttributeArchive>0x00000020</FileAttributeArchive><FileAttributeArchive>0x00000020</FileAttributeArchive>
<FileAttributeDevice>0x00000040</FileAttributeDevice><FileAttributeDevice>0x00000040</FileAttributeDevice>
<FileAttributeNormal>0x00000080</FileAttributeNormal><FileAttributeNormal>0x00000080</FileAttributeNormal>
<FileAttributeTemporary>0x00000100</FileAttributeTemporary><FileAttributeTemporary>0x00000100</FileAttributeTemporary>
<FileAttributeSparseFile>0x00000200</FileAttributeSparseFile><FileAttributeSparseFile>0x00000200</FileAttributeSparseFile>
<FileAttributeReparsePoint>0x00000400</FileAttributeReparsePoint><FileAttributeReparsePoint>0x00000400</FileAttributeReparsePoint>
<FileAttributeCompressed>0x00000800</FileAttributeCompressed><FileAttributeCompressed>0x00000800</FileAttributeCompressed>
<FileAttributeOffline>0x00001000</FileAttributeOffline> <FileAttributeOffline>0x00001000</FileAttributeOffline>
<FileAttributeNotContentIndexed>0x00002000</FileAttributeNotContentIndexed><FileAttributeNotContentIndexed>0x00002000</FileAttributeNotContentIndexed>
<FileAttributeEncrypted>0x00004000</FileAttributeEncrypted><FileAttributeEncrypted>0x00004000</FileAttributeEncrypted>
<FileAttributeIntegrityStream>0x00008000</FileAttributeIntegrityStream><FileAttributeIntegrityStream>0x00008000</FileAttributeIntegrityStream>
<FileAttributeVirtual>0x00010000</FileAttributeVirtual><FileAttributeVirtual>0x00010000</FileAttributeVirtual>
<FileAttributeNoScrubData>0x00020000</FileAttributeNoScrubData><FileAttributeNoScrubData>0x00020000</FileAttributeNoScrubData>
<FileAttributeEA>0x00040000</FileAttributeEA><FileAttributeEA>0x00040000</FileAttributeEA>
<FileAttributePinned>0x00080000</FileAttributePinned><FileAttributePinned>0x00080000</FileAttributePinned>
<FileAttributeUnpinned>0x00100000</FileAttributeUnpinned><FileAttributeUnpinned>0x00100000</FileAttributeUnpinned>
<FileAttributeRecallOnOpen>0x00200000</FileAttributeRecallOnOpen><FileAttributeRecallOnOpen>0x00200000</FileAttributeRecallOnOpen>
<FileAttributeRecallOnDataAccess>0x00400000</FileAttributeRecallOnDataAccess><FileAttributeRecallOnDataAccess>0x00400000</FileAttributeRecallOnDataAccess>
</winmode></winmode>
由于“0x00000001”对应的二进制值为1、“0x00000002”对应的二进制值为10、“0x00000004”对应的二进制值为100、“0x00000010”对应的二进制值为10000、......、“0x00400000”对应的二进制值为1022。基于此,消息内容还可以通过一个23位的二进制字符串指示上述22个文件扩展属性,其中,23位字符串的第1位指示只读属性,第2位指示因此属性、第3位指示系统属性、第5位指示目录属性、......、第23位指示调用数据访问属性。Since the binary value corresponding to "0x00000001" is 1, the binary value corresponding to "0x00000002" is 10, the binary value corresponding to "0x00000004" is 100, the binary value corresponding to "0x00000010" is 10000, ..., the binary value corresponding to "0x00400000" is 10 22 . Based on this, the message content can also indicate the above 22 file extension attributes through a 23-bit binary string, wherein the first bit of the 23-bit string indicates the read-only attribute, the second bit indicates the attribute, the third bit indicates the system attribute, the fifth bit indicates the directory attribute, ..., and the 23rd bit indicates the call data access attribute.
需要说明的,文件扩展属性在字符串中的位与文件扩展属性的二进制值的位数相同。如:只读属性的二进制值的位数为1,因此,字符串的第1位指示只读属性。It should be noted that the number of bits of the file extension attribute in the string is the same as the number of bits of the binary value of the file extension attribute. For example, the number of bits of the binary value of the read-only attribute is 1, so the first bit of the string indicates the read-only attribute.
本申请实施例中,属性设置请求可以通过不同的操作命令指示不同的目标状态。In the embodiment of the present application, the property setting request can indicate different target states through different operation commands.
示例性的,属性设置请求可以通过PUT指示已配置状态,并通过DELETE指示未配置状态。基于此,在目标状态为已配置状态的情况下,属性设置请求包括的操作命令为PUT,属性设置请求可以包括“PUT/filesystem/dir/file?winmode”。在目标状态为未配置状态的情况下,属性设置请求包括的操作命令为DELETE,属性设置请求可以包括“DELETE/filesystem/dir/file?winmode”。Exemplarily, the property setting request may indicate a configured state through PUT, and indicate an unconfigured state through DELETE. Based on this, when the target state is a configured state, the operation command included in the property setting request is PUT, and the property setting request may include "PUT/filesystem/dir/file?winmode". When the target state is an unconfigured state, the operation command included in the property setting request is DELETE, and the property setting request may include "DELETE/filesystem/dir/file?winmode".
需要说明的,本申请实施例对属性设置请求如何通过操作命令指示目标状态不做限制,以上仅为示例性说明。It should be noted that the embodiment of the present application does not limit how the attribute setting request indicates the target state through the operation command, and the above is only an exemplary description.
本申请实施例中,属性设置请求可以通过请求地址指示目标节点。In the embodiment of the present application, the property setting request may indicate the target node through the request address.
示例性的,请求地址可以为filesystem/dir/file?winmode,其中,“filesystem/dir/file”用于指示目标节点。Exemplarily, the request address may be filesystem/dir/file?winmode, where "filesystem/dir/file" is used to indicate a target node.
该实现方式中,通过消息内容指示目标文件扩展属性、操作命令指示目标状态以及请求地址指示目标节点,这样,有助于充分利用对象存储服务节点提供的目标接口所支持的不同部分的功能,从而简化属性设置请求的内容,进而有助于提高文件扩展属性管理的便利性和准确性。In this implementation, the target file extended attributes are indicated by the message content, the target status is indicated by the operation command, and the target node is indicated by the request address. This helps to make full use of the functions of different parts supported by the target interface provided by the object storage service node, thereby simplifying the content of the attribute setting request, and further helping to improve the convenience and accuracy of file extended attribute management.
方式2:属性设置请求通过消息内容指示目标文件扩展属性以及目标状态。Mode 2: The attribute setting request indicates the target file extended attributes and the target status through the message content.
本申请实施例中,消息内容包括第二字段和第三字段。第二字段用于指示目标文件扩展属性,第三字段用于指示目标状态,In the embodiment of the present application, the message content includes a second field and a third field. The second field is used to indicate the target file extension attribute, and the third field is used to indicate the target status.
需要说明的,关于第二字段的相关说明,可以参考方式1中的说明,此处不再赘述。It should be noted that for the relevant description of the second field, please refer to the description in method 1, which will not be repeated here.
示例性的,在目标状态为已配置状态时,第三字段可以为“put”,第三字段在消息内容中的格式可以为<Type>put</Type>,其中,“Type”用于文件扩展属性的设置类型,“put”用于指示配置目标文件扩展属性,也即,将目标文件扩展属性设置为已配置状态。Exemplarily, when the target state is the configured state, the third field can be "put", and the format of the third field in the message content can be <Type>put</Type>, where "Type" is used for the setting type of the file extension attribute, and "put" is used to indicate the configuration of the target file extension attribute, that is, setting the target file extension attribute to the configured state.
示例性的,在目标状态为未配置状态时,第二字段可以为“delete”,第三字段在消息内容中的格式可以为<Type>delete</Type>,其中,“delete”用于指示取消/删除目标文件扩展属性,也即,将目标文件扩展属性设置为未配置状态。Exemplarily, when the target state is an unconfigured state, the second field may be "delete", and the format of the third field in the message content may be <Type>delete</Type>, where "delete" is used to indicate cancellation/deletion of the target file extended attributes, that is, setting the target file extended attributes to an unconfigured state.
示例性的,第三字段可以存放在“<winmode>”与“</winmode>”之间,这样,第三字段可以用于指示文件扩展属性的设置类型,从而有助于提高对象存储服务节点识别内容的准确性。Exemplarily, the third field can be stored between "<winmode>" and "</winmode>", so that the third field can be used to indicate the setting type of the file extension attribute, thereby helping to improve the accuracy of the object storage service node in identifying content.
需要说明的,本申请实施例对第三字段的具体内容不做限制,以上仅为示例性说明。It should be noted that the embodiment of the present application does not limit the specific content of the third field, and the above is only an exemplary description.
本申请实施例中,通过消息内容的不同字段指示目标文件扩展属性以及目标状态时,属性设置请求的请求地址用于指示目标节点。示例性的,属性设置请求可以包括“PUT/filesystem/dir/file?winmode”。其中,“filesystem/dir/file”用于指示目标节点。In an embodiment of the present application, when the target file extended attributes and the target status are indicated by different fields of the message content, the request address of the attribute setting request is used to indicate the target node. Exemplarily, the attribute setting request may include "PUT/filesystem/dir/file?winmode". Among them, "filesystem/dir/file" is used to indicate the target node.
该实现方式中,通过消息内容的不同字段分别指示目标文件扩展属性和目标状态,一方面,对象存储服务节点可以通过读取消息内容确定属性设置请求所请求的内容,从而有助于提高处理属性设置请求的效率。另一方面,提高了属性设置请求指示目标文件扩展属性以及目标状态的方式多样性。 In this implementation, different fields in the message content are used to indicate the target file extended attributes and the target status. On the one hand, the object storage service node can determine the content requested by the attribute setting request by reading the message content, thereby helping to improve the efficiency of processing the attribute setting request. On the other hand, the diversity of the ways in which the attribute setting request indicates the target file extended attributes and the target status is improved.
基于上述,若属性设置指令指示的多个文件扩展属性的目标状态相同,即多个文件扩展属性的目标状态均为已配置状态或者均为未配置状态,则属性设置请求可以通过方式1指示目标状态,也即,通过不同的操作命令指示多个文件扩展属性的目标状态。或者,属性设置请求也可以通过方式2指示目标状态,也即,通过消息内容中的第三字段指示多个文件扩展属性的目标状态。Based on the above, if the target states of the multiple file extension attributes indicated by the attribute setting instruction are the same, that is, the target states of the multiple file extension attributes are all configured or unconfigured, then the attribute setting request can indicate the target state in mode 1, that is, indicate the target states of the multiple file extension attributes through different operation commands. Alternatively, the attribute setting request can also indicate the target state in mode 2, that is, indicate the target states of the multiple file extension attributes through the third field in the message content.
若属性设置指令指示多个文件扩展属性的目标状态不同,即多个文件扩展属性中一部分文件扩展属性的目标状态为已配置状态,另一部分文件扩展属性的目标状态为未配置状态,则属性设置请求可以通过方式2指示目标状态,从而实现属性设置请求可以同时指示两种不同类型的目标状态。If the attribute setting instruction indicates that the target states of multiple file extension attributes are different, that is, the target state of some file extension attributes among the multiple file extension attributes is a configured state, and the target state of another part of the file extension attributes is an unconfigured state, then the attribute setting request can indicate the target state through method 2, so that the attribute setting request can indicate two different types of target states at the same time.
步骤303:文件存储客户端向对象存储服务节点发送属性设置请求,以请求将目标节点的目标文件扩展属性设置为目标状态。Step 303: The file storage client sends an attribute setting request to the object storage service node to request that the target file extended attribute of the target node be set to a target state.
本申请实施例中,文件存储客户端确定属性设置请求后,向对象存储服务节点发送属性设置请求,如:可以通过属性管理模块向对象存储服务节点发送属性设置请求。In an embodiment of the present application, after the file storage client determines the attribute setting request, it sends the attribute setting request to the object storage service node, such as: the attribute setting request can be sent to the object storage service node through the attribute management module.
示例性的,如图5所示,文件存储客户端可以通过对象存储服务节点提供的目标接口,向对象存储服务节点发送属性设置请求。Exemplarily, as shown in FIG5 , the file storage client may send a property setting request to the object storage service node through a target interface provided by the object storage service node.
上述实施例中,文件存储客户端接收到属性设置指令后,可以基于属性设置指令指示的内容以及对象存储服务节点提供的目标接口,确定属性设置请求,用于请求将目标节点的目标文件扩展属性设置为目标状态,之后,文件存储客户端向对象存储服务节点发送属性设置请求,以请求对象存储服务节点将目标节点的目标文件扩展属性设置为目标状态。In the above embodiment, after receiving the attribute setting instruction, the file storage client can determine the attribute setting request based on the content indicated by the attribute setting instruction and the target interface provided by the object storage service node, so as to request that the target file extension attribute of the target node be set to the target state. After that, the file storage client sends the attribute setting request to the object storage service node to request the object storage service node to set the target file extension attribute of the target node to the target state.
在需要管理文件扩展属性时,文件存储客户端通过属性设置指令以及对象存储服务节点提供的目标接口指示的格式确定属性设置请求,实现将文件扩展属性的语义(即属性设置指令)转换成对象存储的语义(即属性设置请求),进而使得属性设置请求可以使用对象存储的语义指示属性设置指令所指示的内容,这样,对象存储服务节点便可以准确识别属性设置请求所请求的内容,从而基于属性设置请求所请求的内容管理文件扩展属性。由此,对象存储系统通过本申请的方案可以完善对象存储的语义,使得对象存储的语义可以兼容文件扩展属性,从而在提供文件服务的基础上提供文件扩展属性的管理服务,进而实现提供更完善的文件服务,使得对象存储可以更好的兼容文件应用。When it is necessary to manage file extension attributes, the file storage client determines the attribute setting request through the attribute setting instruction and the format indicated by the target interface provided by the object storage service node, so as to convert the semantics of the file extension attributes (i.e., the attribute setting instruction) into the semantics of the object storage (i.e., the attribute setting request), so that the attribute setting request can use the semantics of the object storage to indicate the content indicated by the attribute setting instruction, so that the object storage service node can accurately identify the content requested by the attribute setting request, and thus manage the file extension attributes based on the content requested by the attribute setting request. Therefore, the object storage system can improve the semantics of object storage through the scheme of the present application, so that the semantics of object storage can be compatible with file extension attributes, thereby providing file extension attribute management services on the basis of providing file services, thereby realizing the provision of more complete file services, so that object storage can be better compatible with file applications.
图6为本申请实施例提供的一种设置文件扩展属性的示意图。以下,结合图6对文件扩展属性的设置过程进行示例性介绍。Fig. 6 is a schematic diagram of setting file extension attributes provided by an embodiment of the present application. In the following, the process of setting file extension attributes is exemplarily introduced in conjunction with Fig. 6.
示例性的,用户触发属性设置指令或目标应用向Windows操作系统发送设置指令后,Windows操作系统通过FUSE模块调用文件存储客户端的第一接口,向文件存储客户端发送属性设置指令,以指示文件存储客户端管理目标节点的文件扩展属性,如,将目标节点的目标文件扩展属性设置为目标状态。示例性的,第一接口可以为“sfc_win_set_attributes”,属性设置指令可以为“fuse_operations::win_set_attributes”。Exemplarily, after a user triggers an attribute setting instruction or a target application sends a setting instruction to the Windows operating system, the Windows operating system calls the first interface of the file storage client through the FUSE module and sends an attribute setting instruction to the file storage client to instruct the file storage client to manage the file extension attributes of the target node, such as setting the target file extension attributes of the target node to the target state. Exemplarily, the first interface may be "sfc_win_set_attributes" and the attribute setting instruction may be "fuse_operations::win_set_attributes".
文件存储客户端通过第一接口接收到属性设置指令后,可以基于属性设置指令以及对象存储服务节点提供的目标接口,生成属性设置请求。之后,文件存储客户端向对象存储服务节点的对象存储文件存储客户端(Object Storage client,OSC)发送属性设置请求,以请求管理目标节点的文件扩展属性,如:将目标节点的目标文件扩展属性设置为目标状态。After receiving the attribute setting instruction through the first interface, the file storage client can generate an attribute setting request based on the attribute setting instruction and the target interface provided by the object storage service node. After that, the file storage client sends the attribute setting request to the object storage file storage client (OSC) of the object storage service node to request to manage the file extension attributes of the target node, such as setting the target file extension attributes of the target node to the target state.
需要说明的,本申请实施例中,OSC执行某个操作,可以认为是对象存储服务节点运行OCS的过程中执行某个操作,或,对象存储服务节点通过OSC执行某个操作,后续不再赘述。It should be noted that in the embodiment of the present application, OSC performs a certain operation, which can be considered as the object storage service node performing a certain operation in the process of running OCS, or the object storage service node performing a certain operation through OSC, which will not be repeated later.
基于上述实施例,文件存储客户端能够将文件扩展属性的语义映射为对象存储的语义,从而生成对象存储服务节点可以识别的请求(如:属性设置请求等),进而实现将文件扩展属性的语义隔离在文件存储客户端侧,使得文件扩展属性的语义与对象存储服务节点无关,也即,对象存储服务节点不需要识别文件扩展属性的语义。Based on the above embodiment, the file storage client can map the semantics of file extension attributes to the semantics of object storage, thereby generating requests that can be recognized by the object storage service node (such as: attribute setting requests, etc.), and then isolating the semantics of file extension attributes on the file storage client side, so that the semantics of file extension attributes are independent of the object storage service node, that is, the object storage service node does not need to recognize the semantics of file extension attributes.
此外,文件存储客户端生成对象存储服务节点可以识别的请求时,充分利用了对象存储服务节点提供的目标接口的可扩展性,如:通过消息内容指示待管理的目标文件扩展属性、通过操作命令指示文件扩展属性的管理方式等,提高了对象存储服务节点可识别请求的准确性和可靠性。In addition, when the file storage client generates a request that can be recognized by the object storage service node, it makes full use of the scalability of the target interface provided by the object storage service node, such as: indicating the extended attributes of the target file to be managed through the message content, indicating the management method of the file extended attributes through the operation command, etc., thereby improving the accuracy and reliability of the requests that can be recognized by the object storage service node.
图7是根据一示例性实施例示出的一种文件扩展属性管理方法的流程图。示例性的,该文件扩展属性管理方法可以包括以下步骤701-步骤703。Fig. 7 is a flow chart of a method for managing file extension attributes according to an exemplary embodiment. Exemplarily, the method for managing file extension attributes may include the following steps 701-703.
步骤701:对象存储服务节点接收文件存储客户端发送的属性设置请求。Step 701: The object storage service node receives a property setting request sent by a file storage client.
需要说明的,属性设置请求的相关说明,可以参考步骤302的说明,此处不再赘述。It should be noted that for the description of the attribute setting request, please refer to the description of step 302, which will not be repeated here.
步骤702:对象存储服务节点通过目标接口解析属性设置请求,得到属性设置请求所请求的内容。Step 702: The object storage service node parses the property setting request through the target interface to obtain the content requested by the property setting request.
本申请实施例中,对象存储服务节点可以通过解析属性设置请求,确定属性设置请求所请求的内容, 从而基于属性设置请求所请求的内容,管理文件扩展属性。In the embodiment of the present application, the object storage service node may determine the content requested by the attribute setting request by parsing the attribute setting request. Thus, file extended attributes are managed based on the content requested by the attribute setting request.
示例性的,对象存储服务节点可以通过解析模块解析属性设置请求。Exemplarily, the object storage service node may parse the property setting request through a parsing module.
示例性的,对象存储服务节点接收到属性设置请求后,可以通过请求地址中的第一字段(如:winmode),确定属性设置请求是与文件扩展属性相关的请求。Exemplarily, after receiving the property setting request, the object storage service node can determine, through the first field (eg, winmode) in the request address, that the property setting request is a request related to file extension attributes.
示例1,结合步骤302中的方式1,对步骤702的实现过程进行示例性介绍。Example 1, in combination with method 1 in step 302, an exemplary introduction to the implementation process of step 702 is given.
本申请实施例中,对象存储服务节点可以通过解析属性设置请求的消息内容,确定待管理的目标文件扩展属性。In the embodiment of the present application, the object storage service node can determine the extended attributes of the target file to be managed by parsing the message content of the attribute setting request.
示例性的,对象存储服务节点可以通过消息内容中的第一字段,确定消息内容中指示目标文件扩展属性的字段,如:“<winmode>”与“</winmode>”之间的“<FileAttributeReadonly>0x00000001</FileAttributeReadonly>”等,从而确定待管理的目标文件扩展属性。Exemplarily, the object storage service node can determine the field indicating the extended attributes of the target file in the message content through the first field in the message content, such as “<FileAttributeReadonly>0x00000001</FileAttributeReadonly>” between “<winmode>” and “</winmode>”, thereby determining the extended attributes of the target file to be managed.
本申请实施例中,对象存储服务节点可以通过解析属性设置请求的操作命令,确定文件扩展属性的管理方式,如:设置为已配置状态或设置为未配置状态。In the embodiment of the present application, the object storage service node can determine the management method of the file extension attribute by parsing the operation command of the attribute setting request, such as: setting to a configured state or setting to an unconfigured state.
示例性的,若属性设置请求中的操作命令为“PUT”,则管理方式是设置为已配置状态。若属性设置请求中的操作命令为“DELETE”,则管理方式是设置为未配置状态。Exemplarily, if the operation command in the property setting request is "PUT", the management mode is set to the configured state. If the operation command in the property setting request is "DELETE", the management mode is set to the unconfigured state.
示例2,结合步骤302中的方式2,对步骤702的实现过程进行示例性介绍。Example 2, in combination with method 2 in step 302, an exemplary introduction to the implementation process of step 702 is given.
本申请实施例中,对象存储服务节点可以通过解析属性设置请求的消息内容,确定文件扩展属性的管理方式。In an embodiment of the present application, the object storage service node can determine the management method of the file extension attributes by parsing the message content of the attribute setting request.
示例性的,对象存储服务节点可以通过消息内容中的第三字段确定文件扩展属性的管理方式,如:“<winmode>”与“</winmode>”之间的第三字段,从而确定目标文件扩展属性的待设置状态(即目标状态)。若消息内容包括“<Type>put</Type>”,即第三字段为“put”,则管理方式是设置为已配置状态,也即,目标文件扩展属性的待设置状态为已配置状态,若消息内容包括“<Type>delete</Type>”,即第三字段为“delete”,则管理方式是设置为未配置状态,也即,目标文件扩展属性的待设置状态为未配置状态。Exemplarily, the object storage service node can determine the management mode of the file extension attribute through the third field in the message content, such as the third field between "<winmode>" and "</winmode>", thereby determining the state to be set (i.e., the target state) of the target file extension attribute. If the message content includes "<Type>put</Type>", that is, the third field is "put", the management mode is set to the configured state, that is, the state to be set of the target file extension attribute is the configured state; if the message content includes "<Type>delete</Type>", that is, the third field is "delete", the management mode is set to the unconfigured state, that is, the state to be set of the target file extension attribute is the unconfigured state.
需要说明的,示例2的其他相关说明,可以参考示例1的说明,此处不再赘述。It should be noted that for other related instructions of Example 2, please refer to the instructions of Example 1, which will not be repeated here.
可选地,文件扩展属性管理方法还可以包括以下S1-S4。Optionally, the file extension attribute management method may further include the following S1-S4.
S1:对象存储服务节点通过解析属性设置请求,确定目标文件扩展属性的取值。S1: The object storage service node determines the value of the target file's extended attribute by parsing the attribute setting request.
示例性的,消息内容中的“<FileAttributeReadonly>0x00000001</FileAttributeReadonly>”用于指示只读属性的取值,“Readonly”用于指示只读属性,“0x00000001”用于指示取值。Exemplarily, “<FileAttributeReadonly>0x00000001</FileAttributeReadonly>” in the message content is used to indicate the value of the read-only attribute, “Readonly” is used to indicate the read-only attribute, and “0x00000001” is used to indicate the value.
S2:对象存储服务节点确定目标文件扩展属性的取值与目标值是否相同。S2: The object storage service node determines whether the value of the target file extension attribute is the same as the target value.
其中,目标值为目标文件扩展属性在Windows操作系统中的值。The target value is the value of the extended attribute of the target file in the Windows operating system.
本申请实施例中,对象存储服务节点存储有目标文件扩展属性的目标值,目标值为目标文件扩展属性在Windows操作系统中的值。对象存储服务节点从消息内容中解析出目标文件扩展属性的取值后,将目标文件扩展属性的取值与目标值进行比对,若相同,则认为目标文件扩展属性的取值通过校验,反之,若不同,则认为目标文件扩展属性的取值未通过校验。In the embodiment of the present application, the object storage service node stores a target value of the target file extension attribute, and the target value is the value of the target file extension attribute in the Windows operating system. After the object storage service node parses the value of the target file extension attribute from the message content, it compares the value of the target file extension attribute with the target value. If they are the same, it is considered that the value of the target file extension attribute has passed the verification. Otherwise, if they are different, it is considered that the value of the target file extension attribute has not passed the verification.
示例性的,只读属性在Windows操作系统中的值为0x00000001,即目标值为0x00000001。因此,若只读属性的取值为<FileAttributeReadonly>0x00000001</FileAttributeReadonly>,说明目标文件扩展属性的取值与目标文件扩展属性的目标值相同。若只读属性的取值为非目标值,如:“<FileAttributeReadonly>0x00000002</FileAttributeReadonly>”,说明目标文件扩展属性的取值与目标文件扩展属性的目标值不相同。For example, the value of the read-only attribute in the Windows operating system is 0x00000001, that is, the target value is 0x00000001. Therefore, if the value of the read-only attribute is <FileAttributeReadonly>0x00000001</FileAttributeReadonly>, it means that the value of the target file extended attribute is the same as the target value of the target file extended attribute. If the value of the read-only attribute is a non-target value, such as: "<FileAttributeReadonly>0x00000002</FileAttributeReadonly>", it means that the value of the target file extended attribute is different from the target value of the target file extended attribute.
S3:若目标文件扩展属性的取值与目标值相同,对象存储服务节点执行步骤703。S3: If the value of the target file extension attribute is the same as the target value, the object storage service node executes step 703.
该实施例中,在目标文件扩展属性的取值与目标文件扩展属性的目标值相同的情况下,才将目标文件扩展属性设置为目标状态,这样,有助于保证所管理的目标文件扩展属性的准确性。In this embodiment, the target file extended attribute is set to the target state only when the value of the target file extended attribute is the same as the target value of the target file extended attribute, which helps to ensure the accuracy of the managed target file extended attribute.
S4:若目标文件扩展属性的取值与目标值不相同,对象存储服务节点向文件存储客户端返回提示信息,提示信息用于指示目标文件扩展属性的取值存在错误。S4: If the value of the target file's extended attribute is different from the target value, the object storage service node returns a prompt message to the file storage client, where the prompt message is used to indicate that there is an error in the value of the target file's extended attribute.
该实施例中,在目标文件扩展属性的取值与目标文件扩展属性的目标值不相同时,向文件存储客户端返回提示信息,以提示目标文件扩展属性的取值存在错误,这样,有助于及时修正文件存储客户端的错误。In this embodiment, when the value of the target file extension attribute is different from the target value of the target file extension attribute, a prompt message is returned to the file storage client to prompt that there is an error in the value of the target file extension attribute, which helps to correct the error of the file storage client in time.
步骤703:对象存储服务节点基于属性设置请求所请求的内容,将目标节点的目标文件扩展属性设置为目标状态。Step 703: The object storage service node sets the target file extended attribute of the target node to the target state based on the content requested by the attribute setting request.
本申请实施例中,对象存储服务节点得到属性设置请求所请求的内容后,便执行属性设置请求所请求的内容,也即,将目标节点的目标文件扩展属性设置为目标状态。 In the embodiment of the present application, after the object storage service node obtains the content requested by the attribute setting request, it executes the content requested by the attribute setting request, that is, sets the target file extended attribute of the target node to the target state.
对于将目标节点的目标文件扩展属性设置为目标状态,包括多种实现方式,以下,通过方式A至方式B进行示例性说明。There are multiple implementation methods for setting the target file extension attribute of the target node to the target state. The following is an exemplary description using Method A and Method B.
方式A:对象存储服务节点通过一个字符串(如:目标字符串)指示目标节点的每个文件扩展属性的状态时,其中,目标字符串的不同位用于指示不同的文件扩展属性。基于此,对象存储服务节点可以通过修改目标字符串的目标位的值,实现将目标节点的目标文件扩展属性设置为目标状态。Method A: When the object storage service node indicates the state of each file extension attribute of the target node through a string (such as a target string), different bits of the target string are used to indicate different file extension attributes. Based on this, the object storage service node can set the target file extension attribute of the target node to the target state by modifying the value of the target bit of the target string.
需要说明的,基于方式A的设置方式,在同时修改目标节点的每个文件扩展属性时,相当于对目标字段的每个位的值均进行修改,基于此,可以认为是使用文件扩展属性的新状态,覆盖文件扩展属性的历史状态。It should be noted that based on the setting method of method A, when each file extension attribute of the target node is modified at the same time, it is equivalent to modifying the value of each bit of the target field. Based on this, it can be considered that the new state of the file extension attribute is used to overwrite the historical state of the file extension attribute.
本申请实施例中,在目标状态为已配置状态的情况下,对象存储服务节点可以将目标字符串的目标位设置为第一值;目标位用于指示目标文件扩展属性,第一值用于指示已配置状态。In an embodiment of the present application, when the target state is a configured state, the object storage service node may set the target bit of the target string to a first value; the target bit is used to indicate an extended attribute of the target file, and the first value is used to indicate a configured state.
示例性的,目标字符串为23位的二进制字符串,其中,第1位指示只读属性的状态。若属性设置请求所请求的内容为将只读属性设置为已配置状态,则对象存储服务节点可以将第1位的值设置为1(即第一值),从而实现指示只读属性为已配置状态。Exemplarily, the target string is a 23-bit binary string, wherein the first bit indicates the state of the read-only attribute. If the content of the attribute setting request is to set the read-only attribute to the configured state, the object storage service node may set the value of the first bit to 1 (i.e., the first value), thereby indicating that the read-only attribute is in the configured state.
本申请实施例中,在目标状态为未配置状态的情况下,对象存储服务节点可以将目标字符串的目标位设置为第二值;第二值用于指示未配置状态。In an embodiment of the present application, when the target state is an unconfigured state, the object storage service node may set the target bit of the target string to a second value; the second value is used to indicate an unconfigured state.
示例性的,目标字符串为23位的二进制字符串,其中,第2位指示隐藏属性的状态。若属性设置请求所请求的内容为将隐藏属性设置为未配置状态,则对象存储服务节点可以将第2位的值设置为0(即第二值),从而实现指示隐藏属性为未配置状态。Exemplarily, the target string is a 23-bit binary string, wherein the second bit indicates the state of the hidden attribute. If the content of the attribute setting request is to set the hidden attribute to an unconfigured state, the object storage service node may set the value of the second bit to 0 (i.e., the second value), thereby indicating that the hidden attribute is in an unconfigured state.
该实施例中,通过一个字符串指示目标节点的多个文件扩展属性,这样,不仅有助于后续更新、查找、删除文件扩展属性时的效率,还有助于降低指示文件扩展属性的字段占用的存储空间。In this embodiment, multiple file extension attributes of the target node are indicated by a character string, which not only helps improve the efficiency of subsequent updating, searching, and deleting file extension attributes, but also helps reduce the storage space occupied by the fields indicating file extension attributes.
本申请实施例中,目标字符串可以与目标节点的标识关联存储。如:目标字符串可以存储在目标对象的元数据中。这样,在更新目标节点的文件扩展属性时,有助于提高确定目标字符串的便利性和准确性。In the embodiment of the present application, the target string can be stored in association with the identifier of the target node. For example, the target string can be stored in the metadata of the target object. In this way, when updating the file extension attribute of the target node, it helps to improve the convenience and accuracy of determining the target string.
方式B:对象存储服务节点通过多个字段指示目标节点的多个文件扩展属性,其中,一个字段用于指示一个文件扩展属性,如:目标字段用于指示目标文件扩展属性。基于此,对象存储服务节点可以通过生成目标字段或删除目标字段,实现将目标节点的目标文件扩展属性设置为目标状态。Method B: The object storage service node indicates multiple file extension attributes of the target node through multiple fields, where one field is used to indicate one file extension attribute, such as the target field is used to indicate the target file extension attribute. Based on this, the object storage service node can set the target file extension attribute of the target node to the target state by generating a target field or deleting a target field.
本申请实施例中,在目标状态为已配置状态的情况下,对象存储服务节点可以生成目标字段,并存储目标字段。目标字段用于指示已配置目标文件扩展属性。也就是说,在对象存储服务节点存储有目标字段的情况下,说明目标节点已配置目标文件扩展属性,也即,目标节点的目标文件扩展属性为已配置状态。In the embodiment of the present application, when the target state is in the configured state, the object storage service node can generate a target field and store the target field. The target field is used to indicate that the target file extension attribute has been configured. That is, when the object storage service node stores the target field, it indicates that the target node has configured the target file extension attribute, that is, the target file extension attribute of the target node is in the configured state.
示例性的,目标文件扩展属性为只读属性,也就是说,属性设置请求的消息内容中包括<FileAttributeReadonly>0x00000001</FileAttributeReadonly>,基于此,对象存储服务节点生成的目标字段可以为x-obs-meta-winmode:0x0000001。Exemplarily, the target file extended attribute is a read-only attribute, that is, the message content of the attribute setting request includes <FileAttributeReadonly>0x00000001</FileAttributeReadonly>, based on which, the target field generated by the object storage service node may be x-obs-meta-winmode:0x0000001.
需要说明的,基于方式B的设置方式,在将目标文件扩展属性的状态设置为已配置状态的情况下,若是首次设置目标文件扩展属性,可以认为是为目标节点新增目标文件扩展属性。若是非首次设置目标文件扩展属性,可以认为是更新目标节点的目标文件扩展属性的状态。It should be noted that, based on the setting method of method B, when the state of the target file extended attribute is set to the configured state, if the target file extended attribute is set for the first time, it can be considered that the target file extended attribute is added to the target node. If it is not the first time to set the target file extended attribute, it can be considered that the state of the target file extended attribute of the target node is updated.
示例性的,对象存储服务节点生成目标字段后,可以将目标字段存储在对象存储服务节点的非易失性存储介质中,从而实现目标字段的持久化存储。Exemplarily, after the object storage service node generates the target field, the target field may be stored in a non-volatile storage medium of the object storage service node, thereby achieving persistent storage of the target field.
示例性的,对象存储服务节点可以基于目标节点的标识存储目标字段,也即,将目标节点的标识与目标字段关联存储,这样,文件存储客户端后续查询节点的文件扩展属性时,便可以通过节点标识指示待查询的节点。Exemplarily, the object storage service node may store the target field based on the identifier of the target node, that is, store the identifier of the target node in association with the target field, so that when the file storage client subsequently queries the file extension attributes of the node, it can indicate the node to be queried through the node identifier.
由于目标节点的标识与目标对象的标识相同,基于此,对象存储服务节点可以基于目标节点的标识,将目标字段存储在目标对象的元数据中,从而实现目标字段与目标节点的标识进行关联存储。Since the identifier of the target node is the same as the identifier of the target object, based on this, the object storage service node can store the target field in the metadata of the target object based on the identifier of the target node, thereby realizing the associated storage of the target field and the identifier of the target node.
本申请实施例中,在目标状态为未配置状态的情况下,对象存储服务节点可以删除目标节点的目标字段。也就是说,在对象存储服务节点未存储目标字段的情况下,说明目标节点未配置目标文件扩展属性,也即,目标节点的目标文件扩展属性为未配置状态。In the embodiment of the present application, when the target state is in the unconfigured state, the object storage service node can delete the target field of the target node. That is, when the object storage service node does not store the target field, it means that the target node is not configured with the target file extension attribute, that is, the target file extension attribute of the target node is in the unconfigured state.
需要说明的,基于方式B的设置方式,在将目标文件扩展属性的状态设置为未配置状态的情况下,可以认为是删除目标节点已配置的目标文件扩展属性。It should be noted that, based on the setting method of method B, when the state of the target file extended attribute is set to the unconfigured state, it can be considered that the target file extended attribute that has been configured on the target node is deleted.
示例性的,目标文件扩展属性为隐藏属性,目标字段可以为x-obs-meta-winmode:0x00000002。对象存储服务节点可以删除x-obs-meta-winmode:0x00000002,以将目标文件扩展属性设置为未配置状态。Exemplarily, the target file extended attribute is a hidden attribute, and the target field may be x-obs-meta-winmode:0x00000002. The object storage service node may delete x-obs-meta-winmode:0x00000002 to set the target file extended attribute to an unconfigured state.
该实施例中,通过多个字段指示目标节点的多个文件扩展属性,这样,有助于提高不同文件扩展属性 的独立性,从而有助于提高指示的文件扩展属性的准确性。In this embodiment, multiple fields are used to indicate multiple file extension attributes of the target node, which helps to improve the independence, thereby helping to improve the accuracy of the indicated file extension attributes.
上述实施例中,对象存储服务节点接收到文件存储客户端发送的属性设置请求后,通过解析属性设置请求确定属性设置请求所请求的内容,从而基于属性设置请求所请求的内容,将目标节点的目标文件扩展属性设置为目标状态,进而实现完成文件扩展属性的管理。In the above embodiment, after the object storage service node receives the attribute setting request sent by the file storage client, it determines the content requested by the attribute setting request by parsing the attribute setting request, and then sets the target file extension attribute of the target node to the target state based on the content requested by the attribute setting request, thereby completing the management of the file extension attributes.
由于属性设置请求是根据对象存储服务节点提供的接口确定的,因此,属性设置请求是通过对象存储的语义指示所请求内容,这样,对象存储服务节点可以准确识别出属性设置请求所请求内容,从而能够保证实现管理文件扩展属性。由此,对象存储系统通过本申请的方案可以完善对象存储的语义,使得对象存储的语义可以兼容文件扩展属性,从而在提供文件服务的基础上提供文件扩展属性的管理服务,进而提供更高完善的文件服务,使得对象存储可以更好的兼容文件应用。Since the property setting request is determined according to the interface provided by the object storage service node, the property setting request indicates the requested content through the semantics of the object storage, so that the object storage service node can accurately identify the requested content of the property setting request, thereby ensuring the management of file extension attributes. Therefore, the object storage system can improve the semantics of object storage through the solution of the present application, so that the semantics of object storage can be compatible with file extension attributes, thereby providing file extension attribute management services on the basis of providing file services, and further providing more complete file services, so that object storage can be better compatible with file applications.
基于上述实施例,对象存储系统的对象存储服务节点,可以通过解析使用对象存储语义的属性设置请求确定文件扩展属性的管理方式,并基于属性设置请求指示的文件扩展属性的管理方式,管理文件扩展属性,从而实现了文件扩展属性语义与对象存储语义的互通。Based on the above embodiments, the object storage service node of the object storage system can determine the management method of file extension attributes by parsing the attribute setting request using object storage semantics, and manage the file extension attributes based on the management method of file extension attributes indicated by the attribute setting request, thereby realizing the intercommunication between file extension attribute semantics and object storage semantics.
此外,对象存储服务节点通过支持文件扩展属性相关内容的解析、管理、存储、查询等功能,从而实现了支撑管理文件扩展属性的接口(即目标接口)的功能实现,进而使得对象存储系统能够提供更加完善的文件扩展属性管理功能。In addition, the object storage service node supports the parsing, management, storage, and query of file extension attribute related content, thereby realizing the functional implementation of the interface that supports the management of file extension attributes (i.e., the target interface), thereby enabling the object storage system to provide more complete file extension attribute management functions.
以上为本申请实施例的第一部分,以下结合图8至图13,介绍本申请实施例的第二部分。The above is the first part of the embodiment of the present application. The second part of the embodiment of the present application is introduced below in conjunction with Figures 8 to 13.
图8是根据一示例性实施例示出的一种文件扩展属性管理方法的流程图。示例性的,该文件扩展属性管理方法可以包括以下步骤801-步骤803。Fig. 8 is a flow chart of a method for managing file extension attributes according to an exemplary embodiment. Exemplarily, the method for managing file extension attributes may include the following steps 801-803.
步骤801:文件存储客户端接收属性获取指令,属性获取指令用于指示获取目标节点的文件扩展属性。Step 801: The file storage client receives an attribute acquisition instruction, where the attribute acquisition instruction is used to instruct to acquire file extended attributes of a target node.
本申请实施例中,属性获取指令指示了目标节点。这样,有助于避免文件存储客户端获取非目标节点的文件扩展属性,从而有助于保证文件存储客户端后续所执行操作的准确性。In the embodiment of the present application, the attribute acquisition instruction indicates the target node, which helps to prevent the file storage client from acquiring file extension attributes of non-target nodes, thereby helping to ensure the accuracy of subsequent operations performed by the file storage client.
本申请实施例中,属性获取指令可以是用户触发的指令,如:用户通过电子设备查看目标节点的文件扩展属性时,操作系统响应于用户的触发操作,向文件存储客户端发送属性获取指令,以指示文件存储客户端获取目标节点的文件扩展属性。In an embodiment of the present application, the attribute acquisition instruction may be an instruction triggered by a user, such as when a user views the file extension attributes of a target node through an electronic device, the operating system responds to the user's triggering operation and sends an attribute acquisition instruction to the file storage client to instruct the file storage client to obtain the file extension attributes of the target node.
或者,属性获取指令可以是目标应用触发的指令,如:电子设置运行目标应用的过程中,若需要查询目标节点的文件扩展属性,目标应用可以向操作系统发送第一查询指令,用于指示查询目标节点的文件扩展属性,操作系统接收到第一查询指令后,向文件存储客户端发送属性获取指令,以指示文件存储客户端获取目标节点的文件扩展属性。Alternatively, the attribute acquisition instruction can be an instruction triggered by the target application. For example, during the process of electronically setting up and running the target application, if it is necessary to query the file extension attributes of the target node, the target application can send a first query instruction to the operating system to instruct the query of the file extension attributes of the target node. After receiving the first query instruction, the operating system sends an attribute acquisition instruction to the file storage client to instruct the file storage client to obtain the file extension attributes of the target node.
以下,对操作系统向文件存储客户端发送属性获取指令的方式进行示例性介绍。The following is an exemplary introduction to the manner in which the operating system sends an attribute acquisition instruction to the file storage client.
本申请实施例中,Windows操作系统可以通过FUSE模块向文件存储客户端发送属性获取指令。In the embodiment of the present application, the Windows operating system can send a property acquisition instruction to the file storage client through the FUSE module.
示例性的,在用户触发属性获取指令,或,目标应用向Windows发送第一查询指令后,Windows操作系统向FUSE模块发送属性设置指令,以由FUSE模块向文件存储客户端发送属性设置指令。Exemplarily, after a user triggers a property acquisition instruction, or a target application sends a first query instruction to Windows, the Windows operating system sends a property setting instruction to the FUSE module, so that the FUSE module sends the property setting instruction to the file storage client.
本申请实施例中,文件存储客户端配置有第二接口,第二接口用于指示获取文件扩展属性。在此基础上,Windows操作系统可以通过调用第二接口向文件存储客户端发送属性获取指令。In the embodiment of the present application, the file storage client is configured with a second interface, and the second interface is used to instruct to obtain the file extension attribute. On this basis, the Windows operating system can send the attribute acquisition instruction to the file storage client by calling the second interface.
示例性的,如图9所示,FUSE模块接收到操作系统发送的属性获取指令后,通过调用第二接口向文件存储客户端发送属性获取指令。Exemplarily, as shown in FIG9 , after receiving the attribute acquisition instruction sent by the operating system, the FUSE module sends the attribute acquisition instruction to the file storage client by calling the second interface.
示例性的,第二接口可以为win_get_file_attribute。其中,“set”用于表征获取。Exemplarily, the second interface may be win_get_file_attribute, wherein "set" is used to represent acquisition.
可以理解的,第二接口可以认为是文件存储客户端向操作系统提供的接口,以使得操作系统可以通过第二接口与文件存储客户端交互,从而查询节点的文件扩展属性。It can be understood that the second interface can be considered as an interface provided by the file storage client to the operating system, so that the operating system can interact with the file storage client through the second interface to query the file extension attributes of the node.
需要说明的,本申请实施例对Windows向文件存储客户端发送属性获取指令的方式不做限制,以上仅为示例性说明。It should be noted that the embodiment of the present application does not limit the manner in which Windows sends attribute acquisition instructions to the file storage client, and the above is merely an exemplary description.
该实施例中,通过为文件存储客户端配置第二接口,作为查询文件扩展属性的接口,这样,有助于提高文件扩展属性的查询准确性,从而有助于更好的提供文件扩展属性管理服务。In this embodiment, by configuring the second interface for the file storage client as an interface for querying file extension attributes, this helps to improve the query accuracy of file extension attributes, thereby helping to better provide file extension attribute management services.
需要说明的,关于步骤801的其他相关说明,可以参考步骤301的说明,此处不再赘述。It should be noted that for other related instructions about step 801, please refer to the instructions of step 301, which will not be repeated here.
步骤802:文件存储客户端基于属性获取指令,获取目标节点的文件扩展属性。Step 802: The file storage client obtains the file extended attributes of the target node based on the attribute acquisition instruction.
本申请实施例中,文件存储客户端接收到属性获取指令后,根据属性获取指令指示的节点标识,即目标节点的标识,获取目标节点的文件扩展属性。In the embodiment of the present application, after receiving the attribute acquisition instruction, the file storage client obtains the file extended attribute of the target node according to the node identifier indicated by the attribute acquisition instruction, that is, the identifier of the target node.
示例性的,文件存储客户端可以通过属性管理模块获取目标节点的文件扩展属性。Exemplarily, the file storage client may obtain the file extension attributes of the target node through the attribute management module.
获取目标节点的文件扩展属性包括多种实现方式,以下,通过方式a至方式b进行示例性说明。 There are multiple implementation methods for obtaining the file extension attribute of the target node. The following is an exemplary description using method a to method b.
方式a:文件存储客户端可以从电子设备的存储介质中获取目标节点的文件扩展属性。Mode a: The file storage client may obtain the file extension attribute of the target node from the storage medium of the electronic device.
本申请实施例中,电子设备包括第一存储介质(即电子设备的本地存储介质),第一存储介质中可以存储目录树上的至少一个节点的文件扩展属性。在此基础上,文件存储客户端接收到属性获取指令后,可以从第一存储介质中获取目标节点的文件扩展属性,如:获取目标节点的标识对应的文件扩展属性。In the embodiment of the present application, the electronic device includes a first storage medium (i.e., a local storage medium of the electronic device), and the first storage medium can store file extension attributes of at least one node on the directory tree. On this basis, after receiving the attribute acquisition instruction, the file storage client can obtain the file extension attributes of the target node from the first storage medium, such as: obtaining the file extension attributes corresponding to the identifier of the target node.
示例性的,第一存储介质可以是高速缓冲存储器(cache)、内存等。需要说明的,本申请实施例对存储介质的类型不作限制,以上仅为示例性说明。Exemplarily, the first storage medium may be a cache, a memory, etc. It should be noted that the embodiment of the present application does not limit the type of storage medium, and the above is only an exemplary description.
该方式中,通过从电子设备的本地存储介质中获取目标节点的文件扩展属性,有助于提高获取文件扩展属性的效率。In this manner, by acquiring the file extension attribute of the target node from the local storage medium of the electronic device, it is helpful to improve the efficiency of acquiring the file extension attribute.
方式b:文件存储客户端可以从对象存储服务节点获取目标节点的文件扩展属性。Method b: The file storage client can obtain the file extended attributes of the target node from the object storage service node.
该方式中,通过从对象存储服务节点获取目标节点的文件扩展属性,有助于提高获取的文件扩展属性的准确性。In this way, by obtaining the file extension attributes of the target node from the object storage service node, it helps to improve the accuracy of the obtained file extension attributes.
示例1,文件存储客户端接收到属性获取指令后,可以先从电子设备的本地存储介质中获取目标节点的文件扩展属性,若获取失败,则从对象存储服务节点获取目标节点的文件扩展属性。这样,有助于提高获取文件扩展属性的效率。Example 1: After receiving the attribute acquisition instruction, the file storage client can first acquire the file extended attributes of the target node from the local storage medium of the electronic device. If the acquisition fails, the file extended attributes of the target node are acquired from the object storage service node. This helps to improve the efficiency of acquiring file extended attributes.
示例2,文件存储客户端接收到属性获取指令后,若电子设备的本地存储介质中存储有目标节点的文件扩展属性,文件存储客户端确定本地存储介质中的目标节点的文件扩展属性是否满足目标条件。若满足,从本地存储介质中获取目标节点的文件扩展属性,若不满足,从对象存储服务节点获取目标节点的文件扩展属性。这样,有助于保证所获取的文件扩展属性的准确性。Example 2: After the file storage client receives the attribute acquisition instruction, if the file extension attribute of the target node is stored in the local storage medium of the electronic device, the file storage client determines whether the file extension attribute of the target node in the local storage medium meets the target condition. If so, the file extension attribute of the target node is acquired from the local storage medium; if not, the file extension attribute of the target node is acquired from the object storage service node. This helps to ensure the accuracy of the acquired file extension attribute.
其中,满足目标条件是指本地存储介质中的文件扩展属性的取值与文件扩展属性在windows操作系统中的值相同。不满足目标条件是指本地存储介质中的文件扩展属性的取值与文件扩展属性在windows操作系统中的值不同。Wherein, satisfying the target condition means that the value of the file extension attribute in the local storage medium is the same as the value of the file extension attribute in the Windows operating system. Not satisfying the target condition means that the value of the file extension attribute in the local storage medium is different from the value of the file extension attribute in the Windows operating system.
需要说明的,示例2的其他相关说明,可以参考上述S1-S4的说明,此处不再赘述。It should be noted that for other related instructions of Example 2, please refer to the instructions of S1-S4 above, which will not be repeated here.
示例3,文件存储客户端接收到属性获取指令后,可以直接从对象存储服务节点获取目标节点的文件扩展属性,即,无论是否满足目标条件,文件存储客户端都从对象存储服务节点获取目标节点的文件扩展属性。这样,有助于保证获取的文件扩展属性的准确性。Example 3: After receiving the attribute acquisition instruction, the file storage client can directly acquire the file extension attributes of the target node from the object storage service node, that is, regardless of whether the target condition is met, the file storage client acquires the file extension attributes of the target node from the object storage service node. This helps to ensure the accuracy of the acquired file extension attributes.
以下,通过S5-S7对方式b的实现过程进行示例性说明。The following is an illustrative description of the implementation process of method b through S5-S7.
S5:文件存储客户端基于属性获取指令,向对象存储服务节点发送属性获取请求。S5: The file storage client sends an attribute acquisition request to the object storage service node based on the attribute acquisition instruction.
其中,属性获取请求用于请求获取目标节点的文件扩展属性。The attribute acquisition request is used to request to acquire the file extended attributes of the target node.
本申请实施例中,属性获取请求指示了目标节点。示例性的,属性获取请求可以包括目标节点的标识,这样,有助于保证获取的文件扩展属性的准确性。此外,属性获取请求还指示了的文件扩展属性。这样,有助于保证所获取信息的准确性。In the embodiment of the present application, the attribute acquisition request indicates the target node. Exemplarily, the attribute acquisition request may include the identifier of the target node, which helps to ensure the accuracy of the acquired file extension attributes. In addition, the attribute acquisition request also indicates the file extension attributes. This helps to ensure the accuracy of the acquired information.
本申请实施例中,文件存储客户端可以通过对象存储服务节点提供的目标接口,确定属性获取请求。其中,属性获取请求可以包括操作命令和请求地址。操作命令可以用于获取文件扩展属性,请求地址可以用于指示目标节点。In an embodiment of the present application, the file storage client can determine the attribute acquisition request through the target interface provided by the object storage service node. The attribute acquisition request may include an operation command and a request address. The operation command can be used to obtain file extended attributes, and the request address can be used to indicate the target node.
示例性的,属性获取请求可以为“HEAD/filesystem/dir/file?winmode”。“?winmode”用于指示属性获取请求为与文件扩展属性相关的请求,“HEAD”为操作命令,用于指示获取文件扩展属性,“filesystem/dir/file”用于指示目标节点。Exemplarily, the attribute acquisition request may be “HEAD/filesystem/dir/file?winmode.” “?winmode” is used to indicate that the attribute acquisition request is a request related to file extended attributes, “HEAD” is an operation command for indicating acquisition of file extended attributes, and “filesystem/dir/file” is used to indicate a target node.
示例性的,如图9所示,文件存储客户端可以通过对象存储服务节点提供的目标接口向对象存储服务节点发送属性获取请求。Exemplarily, as shown in FIG. 9 , the file storage client may send a property acquisition request to the object storage service node through a target interface provided by the object storage service node.
需要说明的,属性获取请求的相关说明,可以参考属性设置请求的说明,此处不再赘述。It should be noted that for the description of the attribute acquisition request, please refer to the description of the attribute setting request, which will not be repeated here.
S6:对象存储服务节点基于接收到的属性获取请求,向文件存储客户端返回目标节点的文件扩展属性。S6: The object storage service node returns the file extended attributes of the target node to the file storage client based on the received attribute acquisition request.
本申请实施例中,对象存储服务节点接收到属性获取请求后,基于属性获取请求所请求的内容,获取目标节点的文件扩展属性,并向文件存储客户端返回目标节点的文件扩展属性。In an embodiment of the present application, after receiving the attribute acquisition request, the object storage service node obtains the file extension attributes of the target node based on the content requested by the attribute acquisition request, and returns the file extension attributes of the target node to the file storage client.
示例1,结合上述步骤703中的方式A,对象存储服务节点可以将目标节点的目标字符串返回给文件存储客户端。这样,有助于提高数据传输效率。Example 1: In combination with the method A in step 703 above, the object storage service node can return the target string of the target node to the file storage client, which helps to improve the data transmission efficiency.
示例2,结合上述步骤703中的方式B,对象存储服务节点可以将目标节点的多个字段返回给文件存储客户端。这样,有助于文件存储客户端接收到目标节点的文件扩展属性后的处理效率。Example 2: In combination with the method B in step 703, the object storage service node can return multiple fields of the target node to the file storage client, which helps improve the processing efficiency of the file storage client after receiving the file extension attributes of the target node.
示例3,结合上述步骤703中的方式B,对象存储服务节可以将多个字段合并为一个字段,并将合并后的一个字段返回给文件存储客户端。 Example 3: In combination with method B in step 703 above, the object storage service node may merge multiple fields into one field and return the merged field to the file storage client.
示例性的,目标节点仅配置有只读属性和隐藏属性,其中,只读属性对应的字段x-obs-meta-winmode:0x00000001,隐藏属性对应的字段x-obs-meta-winmode:0x00000002,基于此,对象存储服务节点可以将只读属性对应的字段和隐藏属性对应的字段合并为winmode:0x00000003,并将winmode:0x00000003返回给文件存储客户端。Exemplarily, the target node is configured with only a read-only attribute and a hidden attribute, wherein the field corresponding to the read-only attribute is x-obs-meta-winmode:0x00000001, and the field corresponding to the hidden attribute is x-obs-meta-winmode:0x00000002. Based on this, the object storage service node can merge the field corresponding to the read-only attribute and the field corresponding to the hidden attribute into winmode: 0x00000003, and return winmode: 0x00000003 to the file storage client.
需要说明的,S6的其他相关说明,可以参考步骤702的说明,此处不再赘述。It should be noted that for other related instructions of S6, reference can be made to the instructions of step 702, which will not be repeated here.
S7:文件存储客户端接收对象存储服务节点发送的目标节点的文件扩展属性。S7: The file storage client receives the file extension attributes of the target node sent by the object storage service node.
在一个示例中,结合上述S6中的示例1和示例3,文件存储客户端接收到对象存储服务节点返回的内容后,可以解析对象存储服务节点返回的内容,如:通过解析winmode:0x00000003,得到winmode:0x00000001、winmode:0x00000002等,并将解析出的字段返回给操作系统,也即,将winmode:0x00000001、winmode:0x00000002返回给操作系统。In one example, in combination with Example 1 and Example 3 in S6 above, after the file storage client receives the content returned by the object storage service node, it can parse the content returned by the object storage service node, such as: by parsing winmode: 0x00000003, winmode: 0x00000001, winmode: 0x00000002, etc. are obtained, and the parsed fields are returned to the operating system, that is, winmode: 0x00000001 and winmode: 0x00000002 are returned to the operating system.
在另一个示例中,结合上述S2中的示例2,文件存储客户端接收到对象存储服务节点返回的字段后,可以对象存储服务节点返回的字段传输给操作系统。In another example, combined with Example 2 in S2 above, after the file storage client receives the fields returned by the object storage service node, it can transmit the fields returned by the object storage service node to the operating system.
上述实施例中,文件存储客户端通过对对象存储服务节点提供的目标接口进行扩展,确定属性获取请求,从而实现通过属性获取请求单独获取目标节点的文件扩展属性,从而使得对象存储系统可以提供更完善的文件扩展属性的管理服务。In the above embodiment, the file storage client determines the attribute acquisition request by extending the target interface provided by the object storage service node, thereby realizing the acquisition of the file extension attributes of the target node separately through the attribute acquisition request, so that the object storage system can provide more complete file extension attribute management services.
可选地,文件扩展属性管理方法还可以包括:文件存储客户端将从对象存储服务节点获取的目标节点的文件扩展属性,写入电子设备的存储介质中。Optionally, the file extension attribute management method may further include: the file storage client writes the file extension attribute of the target node obtained from the object storage service node into the storage medium of the electronic device.
该实施例中,通过将从对象存储服务节点获取到的目标节点的文件扩展属性,存储到电子设备的本地存储介质中,这样,后续需要获取目标节点的文件扩展属性时,便可以直接从本存储介质中获取,有助于提高数据获取的效率。In this embodiment, the file extension attributes of the target node obtained from the object storage service node are stored in the local storage medium of the electronic device. In this way, when the file extension attributes of the target node need to be obtained later, they can be directly obtained from this storage medium, which helps to improve the efficiency of data acquisition.
步骤803:文件存储客户端基于属性获取指令,返回目标节点的文件扩展属性。Step 803: The file storage client returns the file extended attributes of the target node based on the attribute acquisition instruction.
本申请实施例中,文件存储客户端获取到目标节点的文件扩展属性后,将目标节点的文件扩展属性返回给属性获取指令的发送端,如:返回给操作系统。In the embodiment of the present application, after the file storage client obtains the file extension attributes of the target node, it returns the file extension attributes of the target node to the sender of the attribute acquisition instruction, such as returning it to the operating system.
上述实施例中,文件存储客户端接收到属性获取指令后,可以基于属性获取指令获取目标节点的文件扩展属性,并返回目标节点的文件扩展属性,从而实现提供文件扩展属性的查询服务,进而有助于对象存储系统提供更完善的文件扩展属性的管理服务。In the above embodiment, after receiving the attribute acquisition instruction, the file storage client can obtain the file extension attributes of the target node based on the attribute acquisition instruction, and return the file extension attributes of the target node, thereby providing a query service for the file extension attributes, which in turn helps the object storage system provide a more complete file extension attribute management service.
图10为本申请实施例提供的一种获取文件扩展属性的示意图。以下,结合图10对文件扩展属性的获取过程进行示例性介绍。Fig. 10 is a schematic diagram of obtaining file extension attributes provided by an embodiment of the present application. In the following, the process of obtaining file extension attributes is exemplarily introduced in conjunction with Fig. 10 .
示例性的,用户触发属性获取指令或目标应用向Windows操作系统发送第一查询指令后,Windows操作系统通过FUSE模块调用文件存储客户端的第二接口,向文件存储客户端发送属性获取指令,以指示文件存储客户端查询目标节点的文件扩展属性。示例性的,第二接口可以为“sfc_win_get_attributes”,属性获取指令可以为“fuse_operations::win_get_attributes”。Exemplarily, after the user triggers the attribute acquisition instruction or the target application sends the first query instruction to the Windows operating system, the Windows operating system calls the second interface of the file storage client through the FUSE module and sends the attribute acquisition instruction to the file storage client to instruct the file storage client to query the file extended attributes of the target node. Exemplarily, the second interface may be "sfc_win_get_attributes" and the attribute acquisition instruction may be "fuse_operations::win_get_attributes".
文件存储客户端接收到属性获取指令后,可以从电子设备的本地存储介质中获取目标节点的文件扩展属性,若获取成功,则将目标节点的文件扩展属性返回给Windows操作系统。若获取失败,则生成属性获取请求,并向对象存储服务节点发送属性获取请求,以从对象存储服务节点获取目标节点的文件扩展属性。在此基础上,文件存储客户端可以将从对象存储节点获取的目标节点的文件扩展属性写入电子设备的本地存储介质中,并将从对象存储节点获取的目标节点的文件扩展属性返回给Windows操作系统。After receiving the attribute acquisition instruction, the file storage client can obtain the file extension attributes of the target node from the local storage medium of the electronic device. If the acquisition is successful, the file extension attributes of the target node are returned to the Windows operating system. If the acquisition fails, an attribute acquisition request is generated and sent to the object storage service node to obtain the file extension attributes of the target node from the object storage service node. On this basis, the file storage client can write the file extension attributes of the target node obtained from the object storage node into the local storage medium of the electronic device, and return the file extension attributes of the target node obtained from the object storage node to the Windows operating system.
需要说明的,图10的其他说明,可以参考图6的说明,此处不再赘述。It should be noted that for other descriptions of FIG. 10 , reference can be made to the description of FIG. 6 , which will not be repeated here.
本申请实施例中,文件扩展属性管理方法还可以包括以下S8-S10。In the embodiment of the present application, the file extension attribute management method may also include the following S8-S10.
S8:文件存储客户端接收元数据获取指令,元数据获取指令用于指示获取目标节点的元数据。S8: The file storage client receives a metadata acquisition instruction, where the metadata acquisition instruction is used to instruct the acquisition of metadata of a target node.
S9:文件存储客户端基于元数据获取指令,获取目标节点的目标元数据。其中,目标节点的目标元数据包括目标节点的文件扩展属性。S9: The file storage client obtains target metadata of the target node based on the metadata acquisition instruction, wherein the target metadata of the target node includes file extension attributes of the target node.
以下,通过两种实现方式,对获取目标节点的目标元数据进行示例性介绍。The following is an exemplary introduction to obtaining target metadata of a target node through two implementation methods.
在一种实现方式中,文件存储客户端可以从电子设备的存储介质中获取目标节点的目标元数据。这样,有助于提高目标元数据的获取效率。In one implementation, the file storage client may obtain the target metadata of the target node from the storage medium of the electronic device, which helps to improve the efficiency of obtaining the target metadata.
示例性的,电子设备包括第二存储介质中(即电子设备的本地存储介质),第二存储介质中存储有目录树上的至少一个节点的目标元数据。在此基础上,文件存储客户端接收到元数据获取指令后,可以从第二存储介质中获取目标节点的目标元数据。Exemplarily, the electronic device includes a second storage medium (i.e., a local storage medium of the electronic device), and the second storage medium stores target metadata of at least one node on the directory tree. On this basis, after receiving the metadata acquisition instruction, the file storage client can acquire the target metadata of the target node from the second storage medium.
需要说明的,关于第二存储介质的相关说明,可以参考第一存储介质的说明,此处不再赘述。 It should be noted that for the relevant description of the second storage medium, reference may be made to the description of the first storage medium, which will not be repeated here.
示例性的,第二存储介质和第一存储介质可以是电子设备上的不同存储介质,这样,便可以通过不同的存储介质分别存储节点的文件扩展属性或目标元数据,从而有助于数据查找的便利性。或者,第二存储介质和第一存储介质页可以是电子设备上的相同存储介质,这样,有助于避免占用过多的存储介质。Exemplarily, the second storage medium and the first storage medium may be different storage media on the electronic device, so that the file extension attributes or target metadata of the node can be stored separately through different storage media, thereby facilitating the convenience of data search. Alternatively, the second storage medium and the first storage medium may be the same storage medium on the electronic device, thus helping to avoid occupying too much storage medium.
在另一种实现方式中,文件存储客户端可以从对象存储服务节点获取目标节点的目标元数据。这样,有助于提高所获取的目标元数据的准确性。In another implementation, the file storage client may obtain the target metadata of the target node from the object storage service node, which helps to improve the accuracy of the obtained target metadata.
本申请实施例中,文件存储客户端接收到元数据获取指令后,可以向对象存储服务节点发送元数据获取请求,元数据获取请求用于请求获取目标节点的元数据。示例性的,元数据获取请求可以为“HEAD/filesystem/dir/file”。对象存储服务节点接收到元数据获取请求后,基于元数据获取请求所请求的内容,获取目标节点的目标元数据,并将目标节点的目标元数据返回给文件存储客户端。In an embodiment of the present application, after receiving the metadata acquisition instruction, the file storage client may send a metadata acquisition request to the object storage service node, and the metadata acquisition request is used to request the metadata of the target node. Exemplarily, the metadata acquisition request may be "HEAD/filesystem/dir/file". After receiving the metadata acquisition request, the object storage service node acquires the target metadata of the target node based on the content requested by the metadata acquisition request, and returns the target metadata of the target node to the file storage client.
示例性的,目标节点的目标元数据还可以包括inode数据和Dtree数据等。Exemplarily, the target metadata of the target node may also include inode data and Dtree data, etc.
S10:文件存储客户端基于元数据获取指令,返回目标节点的目标元数据。S10: The file storage client returns target metadata of the target node based on the metadata acquisition instruction.
需要说明的,S8-S10的其他相关说明,可以参考上述步骤802的说明,此处不再赘述。It should be noted that for other related instructions of S8-S10, reference can be made to the instructions of step 802 above, which will not be repeated here.
上述实施例中,文件存储客户端接收到元数据获取指令后,获取并返回目标节点的目标元数据,该目标元数据包括目标节点的文件扩展属性,从而实现提供更全面的元数据,进而有助于对象存储系统提供更完善的文件扩展属性的管理服务。In the above embodiment, after receiving the metadata acquisition instruction, the file storage client obtains and returns the target metadata of the target node, which includes the file extension attributes of the target node, thereby providing more comprehensive metadata, which in turn helps the object storage system to provide more complete file extension attribute management services.
图11为本申请实施例提供的一种获取元数据的示意图。以下,结合图11对元数据的获取过程进行示例性介绍。Fig. 11 is a schematic diagram of a method for obtaining metadata provided by an embodiment of the present application. The following is an exemplary introduction to the process of obtaining metadata in conjunction with Fig. 11.
示例性的,用户触发元数据获取指令或目标应用向Windows操作系统发送第二查询指令后,Windows操作系统通过FUSE模块调用文件存储客户端的第三接口,向文件存储客户端发送元数据获取指令,以指示文件存储客户端查询目标节点的元数据。示例性的,第三接口可以为“sfc_get_attributes”/“sfc_getattr_obs”,元数据获取指令可以为“fuse_operations::getattributes”。Exemplarily, after the user triggers the metadata acquisition instruction or the target application sends the second query instruction to the Windows operating system, the Windows operating system calls the third interface of the file storage client through the FUSE module and sends the metadata acquisition instruction to the file storage client to instruct the file storage client to query the metadata of the target node. Exemplarily, the third interface may be "sfc_get_attributes"/"sfc_getattr_obs", and the metadata acquisition instruction may be "fuse_operations::getattributes".
文件存储客户端接收到元数据获取指令后,可以从电子设备的本地存储介质中获取目标节点的目标元数据,若获取成功,则将目标节点的目标元数据返回给Windows操作系统。若获取失败,则生成元数据获取请求,并向对象存储服务节点发送元数据获取请求,以从对象存储服务节点获取目标节点的目标元数据,对象存储服务节点接收到元数据获取请求后,基于元数据获取请求,向文件存储客户端返回目标节点的目标元数据。After receiving the metadata acquisition instruction, the file storage client can obtain the target metadata of the target node from the local storage medium of the electronic device. If the acquisition is successful, the target metadata of the target node is returned to the Windows operating system. If the acquisition fails, a metadata acquisition request is generated and sent to the object storage service node to obtain the target metadata of the target node from the object storage service node. After receiving the metadata acquisition request, the object storage service node returns the target metadata of the target node to the file storage client based on the metadata acquisition request.
在此基础上,文件存储客户端可以将从对象存储节点获取的目标节点的目标元数据,写入电子设备的存储介质中,并将从对象存储节点获取的目标节点的目标元数据,返回给Windows操作系统。On this basis, the file storage client can write the target metadata of the target node obtained from the object storage node into the storage medium of the electronic device, and return the target metadata of the target node obtained from the object storage node to the Windows operating system.
需要说明的,图11的其他说明,可以参考图6的说明,此处不再赘述。It should be noted that for other descriptions of FIG. 11 , reference can be made to the description of FIG. 6 , which will not be repeated here.
本申请实施例中,文件扩展属性管理方法还可以包括以下S11-S13。In the embodiment of the present application, the file extension attribute management method may also include the following S11-S13.
S11:文件存储客户端接收目录列举指令,目录列举指令用于指示列举目标目录。S11: The file storage client receives a directory listing instruction, where the directory listing instruction is used to indicate the listing of a target directory.
其中,列举目录(即readdir目录),是打开目录时,列举目录下的至少一个文件/子目录,也即,如:向用户显示目录下的至少一个文件/子目录。Here, listing a directory (ie, readdir directory) is to list at least one file/subdirectory under the directory when opening the directory, that is, for example, to display at least one file/subdirectory under the directory to the user.
示例性的,用户打开目标目录后,操作系统会触发readdir操作,并向文件存储客户端发送目录列举指令,以指示文件存储客户端列举目标目录。Exemplarily, after the user opens the target directory, the operating system triggers a readdir operation and sends a directory listing instruction to the file storage client to instruct the file storage client to list the target directory.
S12:文件存储客户端基于目录列举指令,获取目标目录的目标元数据;目标目录的目标元数据包括目标目录下的至少一个文件/子目录的文件扩展属性。S12: The file storage client obtains target metadata of the target directory based on the directory listing instruction; the target metadata of the target directory includes file extension attributes of at least one file/subdirectory under the target directory.
其中,目标目录下的至少一个文件包括目标目录的一级目录下的文件。The at least one file under the target directory includes a file under a first-level directory of the target directory.
以下,通过两种实现方式,对获取目标目录的目标元数据进行示例性介绍。The following is an exemplary introduction to obtaining target metadata of a target directory through two implementation methods.
在一种实现方式中,文件存储客户端可以从电子设备的存储介质中获取目标目录的目标元数据。这样,有助于提高目标元数据的获取效率。In one implementation, the file storage client may obtain the target metadata of the target directory from the storage medium of the electronic device, which helps to improve the efficiency of obtaining the target metadata.
示例性的,电子设备包括第三存储介质中(即电子设备的本地存储介质),第三存储介质中存储有目录树上的至少一个目录的目标元数据,如:至少一个目录下的文件/子目录的文件扩展属性。在此基础上,文件存储客户端接收到目录列举指令后,可以从第三存储介质中获取目标目录的目标元数据。Exemplarily, the electronic device includes a third storage medium (i.e., a local storage medium of the electronic device), and the third storage medium stores target metadata of at least one directory on the directory tree, such as file extension attributes of files/subdirectories under at least one directory. Based on this, after receiving the directory listing instruction, the file storage client can obtain the target metadata of the target directory from the third storage medium.
需要说明的,关于第三存储介质的相关说明,可以参考第一存储介质的说明,此处不再赘述。It should be noted that for the relevant description of the third storage medium, reference may be made to the description of the first storage medium, which will not be repeated here.
示例性的,第三存储介质和第一存储介质/第二存储介质可以是电子设备上的不同存储介质,这样,便可以通过不同的存储介质分别存储节点的文件扩展属性/目标元数据与列举目录的目标元数据,从而有助于数据查找的便利性。Exemplarily, the third storage medium and the first storage medium/second storage medium may be different storage media on the electronic device. In this way, the file extension attributes/target metadata of the node and the target metadata of the enumerated directory may be stored separately through different storage media, thereby facilitating data search.
在另一种实现方式中,文件存储客户端可以从对象存储服务节点获取目标目录的目标元数据。这样, 有助于提高所获取的目标元数据的准确性。In another implementation, the file storage client can obtain the target metadata of the target directory from the object storage service node. Helps improve the accuracy of the acquired target metadata.
本申请实施例中,文件存储客户端接收到目录列举指令后,可以向对象存储服务节点发送目录列举请求,目录列举请求用于请求获取列举目标目录的元数据。示例性的,目录列举请求可以为“GET/filesystem/dir/file”。对象存储服务节点接收到目录列举请求后,基于目录列举请求所请求的内容,获取目标目录的目标元数据,从而得到目标目录下的至少一个文件/子目录的目标元数据,其中,目标目录下的至少一个文件/子目录的目标元数据包括目标目录下的至少一个文件/子目录的文件扩展属性。之后,对象存储服务节点可以将目标目录下的至少一个文件/子目录的目标元数据,返回给文件存储客户端。In an embodiment of the present application, after receiving a directory listing instruction, the file storage client may send a directory listing request to the object storage service node, where the directory listing request is used to request metadata of the listed target directory. Exemplarily, the directory listing request may be "GET/filesystem/dir/file". After receiving the directory listing request, the object storage service node obtains the target metadata of the target directory based on the content requested by the directory listing request, thereby obtaining target metadata of at least one file/subdirectory under the target directory, wherein the target metadata of at least one file/subdirectory under the target directory includes file extension attributes of at least one file/subdirectory under the target directory. Afterwards, the object storage service node may return the target metadata of at least one file/subdirectory under the target directory to the file storage client.
S13:文件存储客户端基于目录列举指令,返回目标目录的目标元数据。S13: The file storage client returns target metadata of the target directory based on the directory listing instruction.
需要说明的,S11-S13的其他相关说明,可以参考上述的步骤802的说明,此处不再赘述。It should be noted that for other related instructions of S11-S13, reference can be made to the instructions of step 802 above, which will not be repeated here.
上述实施例中,文件存储客户端接收到目录列举指令后,获取并返回目标目录的目标元数据,该目标元数据包括目标目录下的至少一个文件/子目录的文件扩展属性,从而实现在列举目录时,提供更全面的元数据,进而有助于对象存储系统提供更完善的文件扩展属性的管理服务。In the above embodiment, after receiving the directory listing instruction, the file storage client obtains and returns the target metadata of the target directory, and the target metadata includes the file extension attributes of at least one file/subdirectory under the target directory, thereby providing more comprehensive metadata when listing directories, which in turn helps the object storage system provide more complete file extension attribute management services.
图12为本申请实施例提供的一种列举目录的示意图。以下,结合图12,对列举目标的过程进行示例性介绍。Fig. 12 is a schematic diagram of a directory listing provided in an embodiment of the present application. In the following, in conjunction with Fig. 12, the process of listing targets is exemplarily introduced.
示例性的,用户触发目录列举指令或目标应用向Windows操作系统发送第三查询指令后,如图13所示,Windows操作系统通过FUSE模块调用文件存储客户端的第四接口,向文件存储客户端发送目录列举指令,以指示文件存储客户端列举目标目录。示例性的,第四接口可以为“sfc_readdir_attributes”/“sfc_readdir_obs”,目录列举指令可以为“fuse_operations::readdir”。Exemplarily, after the user triggers the directory listing instruction or the target application sends the third query instruction to the Windows operating system, as shown in Figure 13, the Windows operating system calls the fourth interface of the file storage client through the FUSE module and sends the directory listing instruction to the file storage client to instruct the file storage client to list the target directory. Exemplarily, the fourth interface can be "sfc_readdir_attributes"/"sfc_readdir_obs", and the directory listing instruction can be "fuse_operations::readdir".
文件存储客户端接收到目录列举指令后,可以从电子设备的本地存储介质中获取目标目录的目标元数据,若获取成功,则将目标目录的目标元数据返回给Windows操作系统。若获取失败,则生成目录列举请求,并向对象存储服务节点发送目录列举请求,以从对象存储服务节点获取目标目录的目标元数据,对象存储服务节点接收到目录列举请求后,向文件存储客户端返回目标目录的目标元数据。After receiving the directory enumeration instruction, the file storage client can obtain the target metadata of the target directory from the local storage medium of the electronic device. If the acquisition is successful, the target metadata of the target directory is returned to the Windows operating system. If the acquisition fails, a directory enumeration request is generated and sent to the object storage service node to obtain the target metadata of the target directory from the object storage service node. After receiving the directory enumeration request, the object storage service node returns the target metadata of the target directory to the file storage client.
在此基础上,文件存储客户端可以将从对象存储节点获取的目标目录的目标元数据写入电子设备的存储介质中,并将从对象存储节点获取的目标目录的目标元数据返回给Windows操作系统。On this basis, the file storage client can write the target metadata of the target directory obtained from the object storage node into the storage medium of the electronic device, and return the target metadata of the target directory obtained from the object storage node to the Windows operating system.
需要说明的,图12的其他说明,可以参考图6的说明,此处不再赘述。It should be noted that for other descriptions of FIG. 12 , reference can be made to the description of FIG. 6 , which will not be repeated here.
本申请实施例中,文件扩展属性管理方法还可以包括以下S14-S16。In the embodiment of the present application, the file extension attribute management method may further include the following S14-S16.
S14:文件存储客户端接收删除指令,删除指令用于指示删除目标节点。S14: The file storage client receives a deletion instruction, where the deletion instruction is used to instruct to delete a target node.
S15:文件存储客户端基于删除指令,向对象存储服务节点发送删除请求。其中,删除请求用于请求删除目标节点的目标元数据。S15: The file storage client sends a deletion request to the object storage service node based on the deletion instruction, wherein the deletion request is used to request deletion of target metadata of the target node.
本申请实施例中,文件存储客户端接收到删除指令后,在向对象存储服务节点发送删除目标节点的请求的基础上,还会向对象存储服务发送删除请求,以请求删除目标节点的目标元数据,从而实现删除对象存储服务节点上与目标节点相关的信息,避免无用数据占用对象存储服务节点的存储空间。In an embodiment of the present application, after receiving the deletion instruction, the file storage client will send a deletion request to the object storage service node on the basis of sending a request to delete the target node, so as to request to delete the target metadata of the target node, thereby deleting the information related to the target node on the object storage service node and avoiding useless data occupying the storage space of the object storage service node.
S16:对象存储服务节点基于接收到的删除请求,删除目标节点的文件扩展属性。S16: The object storage service node deletes the file extension attribute of the target node based on the received deletion request.
本申请实施例中,对象存储服务节点接收到删除请求后,在删除目标节点的inode数据和Dtree数据等元数据的基础上,还会删除目标节点的文件扩展属性,从而实现全面清除与目标节点相关的信息。In an embodiment of the present application, after receiving a deletion request, the object storage service node will delete the file extension attributes of the target node on the basis of deleting the metadata such as the inode data and Dtree data of the target node, thereby completely clearing the information related to the target node.
需要说明的。S14-S16的相关说明,可以参考上述步骤802的说明,此处不再赘述。For the related description of S14-S16, please refer to the description of the above step 802, which will not be repeated here.
上述实施例中,文件存储客户端接收到请求删除目标节点的删除指令后,向对象存储服务节点发送删除请求,用于请求删除目标节点的元数据,对象存储服务接收到删除请求后,删除目标节点文件扩展属性,这样,在删除目标节点后,有助于全面清除与目标节点相关的数据,从而有助于避免无用数据占用对象存储服务节点的存储空间。In the above embodiment, after the file storage client receives the deletion instruction requesting to delete the target node, it sends a deletion request to the object storage service node to request to delete the metadata of the target node. After receiving the deletion request, the object storage service deletes the target node file extension attributes. In this way, after deleting the target node, it helps to completely clear the data related to the target node, thereby helping to avoid useless data occupying the storage space of the object storage service node.
以上为本申请实施例第二部分,以下结合图14至图16,介绍本申请实施例的第三部分。The above is the second part of the embodiment of the present application. The following is an introduction to the third part of the embodiment of the present application in conjunction with Figures 14 to 16.
本申请实施例中,基于文件扩展属性的实现方式,文件扩展属性可以划分为第一类文件扩展属性和第二类文件扩展属性。第一类文件扩展属性可以由文件存储客户端实现,第二类文件扩展属性可以由操作系统实现。In the embodiment of the present application, based on the implementation mode of file extension attributes, file extension attributes can be divided into first type file extension attributes and second type file extension attributes. The first type file extension attributes can be implemented by the file storage client, and the second type file extension attributes can be implemented by the operating system.
示例性的,第一类文件扩展属性可以包括只读属性、加密属性、压缩属性等。第二类文件扩展属性可以包括隐藏属性、系统属性等。Exemplarily, the first type of file extension attributes may include read-only attributes, encryption attributes, compression attributes, etc. The second type of file extension attributes may include hidden attributes, system attributes, etc.
由于实现第一类文件扩展属性的过程中,文件存储客户端执行的操作为获取文件扩展属性,以及实现文件扩展属性,因此,对于文件存储客户端来说,第一类属性也可以称为功能实现类属性。Since the operations performed by the file storage client in the process of implementing the first type of file extension attributes are obtaining the file extension attributes and implementing the file extension attributes, for the file storage client, the first type of attributes can also be called function implementation type attributes.
由于实现第二类文件扩展属性的过程中,文件存储客户端执行的操作为获取文件扩展属性,并将文件 扩展属性传输给操作系统,以便于操作系统实现文件扩展属性,因此,对于文件存储客户端来说,第二类属性也可以称为透传类属性。In the process of implementing the second type of file extension attributes, the file storage client performs the operation of obtaining the file extension attributes and The extended attributes are transmitted to the operating system so that the operating system can implement the file extended attributes. Therefore, for the file storage client, the second type of attributes can also be called transparent attributes.
以下,结合图14至图17,对第一类文件扩展属性的实现过程进行示例性介绍。In the following, in conjunction with FIG. 14 to FIG. 17 , the implementation process of the first type of file extension attributes is exemplarily introduced.
以下,结合图14和图15,以目标节点的目标文件扩展属性为例,对第一种实现方案进行示例性介绍。In the following, in combination with FIG. 14 and FIG. 15 , the first implementation scheme is exemplarily introduced by taking the target file extension attribute of the target node as an example.
图14是根据一示例性实施例示出的一种文件扩展属性管理方法的流程图。示例性的,该文件扩展属性管理方法可以包括以下步骤1401-步骤1403。Fig. 14 is a flow chart of a method for managing file extension attributes according to an exemplary embodiment. Exemplarily, the method for managing file extension attributes may include the following steps 1401-1403.
步骤1401:文件存储客户端接收目标指令,目标指令用于指示对目标节点执行目标操作。Step 1401: The file storage client receives a target instruction, where the target instruction is used to instruct to perform a target operation on a target node.
其中,目标操作与目标文件扩展属性相关。The target operation is related to the extended attributes of the target file.
本申请实施例中,用户或目标应用请求对目标节点执行目标操作时,操作系统可以向文件存储客户端发送目标指令,用于指示用户或目标应用请求执行的操作,即对目标节点执行目标操作。In an embodiment of the present application, when a user or a target application requests to perform a target operation on a target node, the operating system may send a target instruction to the file storage client to indicate the operation requested by the user or the target application, namely, to perform the target operation on the target node.
示例性的,目标操作可以为写操作,基于此,目标文件扩展属性为只读属性,也就是说,写操作与只读属性相关。Exemplarily, the target operation may be a write operation, based on which the target file extended attribute is a read-only attribute, that is, the write operation is related to the read-only attribute.
步骤1402:文件存储客户端基于目标文件扩展属性的状态,确定目标操作的权限校验结果。Step 1402: The file storage client determines a permission verification result of a target operation based on the state of the target file extended attribute.
其中,权限校验结果包括通过校验或未通过校验。The permission verification result includes passed verification or failed verification.
本申请实施例中,文件存储客户端接收到目标指令后,可以基于目标指令获取目标节点的文件扩展属性,以确定目标文件扩展属性的状态,从而根据目标文件扩展属性的状态,确定权限校验结果。In an embodiment of the present application, after receiving the target instruction, the file storage client can obtain the file extension attributes of the target node based on the target instruction to determine the status of the target file extension attributes, and thus determine the permission verification result based on the status of the target file extension attributes.
示例性的,目标操作为写操作,目标文件扩展属性为只读属性,若只读属性为已配置状态,即目标节点已配置只读属性,权限校验结果为未通过校验,也就是说,用户或目标应用不具有对目标节点执行写操作的权限。若只读属性为未配置状态,即目标节点未配置只读属性,则权限校验结果为通过校验,也就是说,用户或文件应用具有对目标节点执行写操作的权限。For example, the target operation is a write operation, and the target file extended attribute is a read-only attribute. If the read-only attribute is in a configured state, that is, the target node has been configured with the read-only attribute, the permission check result is a failed check, that is, the user or the target application does not have the permission to perform a write operation on the target node. If the read-only attribute is in an unconfigured state, that is, the target node is not configured with the read-only attribute, the permission check result is a passed check, that is, the user or the file application has the permission to perform a write operation on the target node.
示例性的,如图15所示,属性管理模块接收到目标指令后,可以获取目标节点的文件扩展属性。之后,属性管理模块可以将目标节点的文件扩展属性以及目标操作的类型发送给属性实现模块,由属性实现模块确定目标操作的权限校验结果。属性实现模块确定权限校验结果后,将权限校验结果传输给属性管理模块。Exemplarily, as shown in FIG15 , after receiving the target instruction, the attribute management module can obtain the file extension attribute of the target node. Afterwards, the attribute management module can send the file extension attribute of the target node and the type of the target operation to the attribute implementation module, and the attribute implementation module determines the permission verification result of the target operation. After the attribute implementation module determines the permission verification result, it transmits the permission verification result to the attribute management module.
需要说明的,获取目标节点的文件扩展属性的方式,可以参考图8所示实施例的说明,此处不再赘述。It should be noted that the method for obtaining the file extension attribute of the target node can refer to the description of the embodiment shown in FIG. 8 , which will not be described in detail here.
以上,文件存储客户端接收目标指令的方式仅为示例性说明,本申请实施例对此不做限制。例如,也可以是操作系统向属性实现模块发送目标指令,属性实现模块指示属性管理获取目标文件扩展属性的状态后,再由属性实现模块确定目标操作的权限校验结果。The above method for the file storage client to receive the target instruction is only an exemplary description, and the embodiments of the present application do not limit this. For example, the operating system may send the target instruction to the attribute implementation module, and the attribute implementation module instructs the attribute management to obtain the state of the target file extended attribute, and then the attribute implementation module determines the permission verification result of the target operation.
步骤1403:若权限校验结果为未通过校验,文件存储客户端基于目标指令,返回响应信息。Step 1403: If the permission check result is failure to pass the check, the file storage client returns a response message based on the target instruction.
其中,响应信息用于指示拒绝对目标节点执行目标操作。The response information is used to indicate a refusal to execute the target operation on the target node.
本申请实施例中,文件存储客户端确定目标操作的权限校验结果为未通过校验的情况下,文件存储客户端向目标指令的发送端(如:操作系统)返回响应信息,以指示拒绝对目标节点执行目标操作,从而实现指示操作系统拦截用户或目标应用对目标节点执行目标操作。In an embodiment of the present application, when the file storage client determines that the permission check result of the target operation is that it fails the check, the file storage client returns a response message to the sender of the target instruction (such as: operating system) to indicate that the target operation is refused to be performed on the target node, thereby instructing the operating system to intercept the user or target application from performing the target operation on the target node.
上述实施例中,文件存储客户端接收到目标指令后,根据目标指令指示了对目标节点执行目标操作,自动获取目标节点的文件扩展属性,以确定与目标操作相关的目标文件扩展属性的状态,从而确定目标操作的权限校验结果。在目标操作的权限校验结果为未通过校验的情况下,文件存储客户端返回响应信息,用于指示拒绝对目标节点执行目标操作,从而实现指示拦截对目标节点执行目标操作,进而实现目标节点的目标文件扩展属性,如:在目标节点配置只读属性时,拒绝用户、目标应用等对目标节点执行写操作,也即,只能执行读操作。In the above embodiment, after receiving the target instruction, the file storage client automatically obtains the file extension attribute of the target node according to the target instruction indicating the execution of the target operation on the target node, so as to determine the state of the target file extension attribute related to the target operation, thereby determining the permission verification result of the target operation. In the case where the permission verification result of the target operation fails to pass the verification, the file storage client returns a response message for indicating the refusal to execute the target operation on the target node, thereby realizing the instruction to intercept the execution of the target operation on the target node, and then realizing the target file extension attribute of the target node, such as: when the target node is configured with a read-only attribute, the user, target application, etc. are denied to execute a write operation on the target node, that is, only a read operation can be executed.
可选地,文件扩展属性管理方法还可以包括:在权限校验结果为通过校验的情况下,文件存储客户端基于目标指令,返回第一响应信息;第一响应信息用于指示允许对目标节点执行目标操作。Optionally, the file extended attribute management method may further include: when the permission check result is passed, the file storage client returns first response information based on the target instruction; the first response information is used to indicate that the target operation is allowed to be performed on the target node.
本申请实施例中,若目标操作的权限校验结果为通过校验,则文件存储客户端可以向目标指令的发送端返回第一响应信息,如:向操作系统返回第一响应信息,以指示允许对目标节点执行目标操作。这样,有助于操作系统可以快速响应用户或目标应用的操作请求。In the embodiment of the present application, if the permission check result of the target operation is passed, the file storage client can return the first response information to the sender of the target instruction, such as returning the first response information to the operating system to indicate that the target operation is allowed to be performed on the target node. In this way, it helps the operating system to quickly respond to the operation request of the user or the target application.
以下,结合图16和图17,以目标节点的目标文件扩展属性为例,对第二种实现方案进行示例性介绍。In the following, in combination with FIG. 16 and FIG. 17 , the second implementation scheme is exemplarily introduced by taking the target file extension attribute of the target node as an example.
图16是根据一示例性实施例示出的又一种文件扩展属性管理方法的流程图。示例性的,该文件扩展属性管理方法可以包括以下步骤1601-步骤1603。Fig. 16 is a flow chart of another method for managing file extension attributes according to an exemplary embodiment. Exemplarily, the method for managing file extension attributes may include the following steps 1601-1603.
在目标文件扩展属性为第一类文件扩展属性中的部分属性时,如:加密属性、压缩属性等,文件存储客户端接收到属性设置指令之后,可以通过以下步骤1601-步骤1603实现目标节点的目标文件扩展属性。 When the target file extension attributes are some attributes of the first category of file extension attributes, such as encryption attributes, compression attributes, etc., after the file storage client receives the attribute setting instruction, it can implement the target file extension attributes of the target node through the following steps 1601-1603.
以下,以目标节点包括第一文件为例,对步骤1601-步骤1603进行示例性说明。The following uses the example that the target node includes the first file to exemplarily illustrate steps 1601 to 1603.
步骤1601:文件存储客户端基于属性设置指令,获取第一文件。Step 1601: The file storage client obtains the first file based on the attribute setting instruction.
本申请实施例中,文件存储客户端接收到属性设置指令后,若属性设置指令指示的目标文件扩展属性为第一类文件扩展属性中的部分属性时,如:加密属性、压缩属性等,文件存储客户端获取属性设置指令指示的第一文件。In an embodiment of the present application, after the file storage client receives the attribute setting instruction, if the target file extension attribute indicated by the attribute setting instruction is a partial attribute of the first category of file extension attributes, such as encryption attribute, compression attribute, etc., the file storage client obtains the first file indicated by the attribute setting instruction.
在一个示例中,文件存储客户端可以从电子设备的本地存储介质中获取第一文件。在另一个示例中,文件存储客户端可以向对象存储服务节点发送获取请求,以请求获取属性设置指令指示的第一文件。In one example, the file storage client may obtain the first file from a local storage medium of the electronic device. In another example, the file storage client may send an acquisition request to the object storage service node to request to obtain the first file indicated by the attribute setting instruction.
步骤1602:文件存储客户端对第一文件执行属性设置指令指示的操作,以得到第二文件。Step 1602: The file storage client performs the operation indicated by the attribute setting instruction on the first file to obtain a second file.
本申请实施例中,文件存储客户端获取到第一文件后,对第一文件执行属性设置指令指示的操作,以得到第二文件。In the embodiment of the present application, after the file storage client obtains the first file, it performs the operation indicated by the attribute setting instruction on the first file to obtain the second file.
示例1,属性设置指令指示了将第一文件的加密属性设置为已配置状态,则属性设置指令指示的操作为执行加密操作。基于此,文件存储客户端对第一文件执行加密操作,以得到加密文件(即第二文件)。Example 1, the attribute setting instruction indicates that the encryption attribute of the first file is set to a configured state, and the operation indicated by the attribute setting instruction is to perform an encryption operation. Based on this, the file storage client performs an encryption operation on the first file to obtain an encrypted file (ie, the second file).
示例2,属性设置指令指示了将第一文件的加密属性设置为未配置状态,则属性设置指令指示的操作为执行解密操作。基于此,文件存储客户端对端第一文件执行解密操作,以得到解密文件(即第二文件)。Example 2, the attribute setting instruction indicates that the encryption attribute of the first file is set to an unconfigured state, and the operation indicated by the attribute setting instruction is to perform a decryption operation. Based on this, the file storage client performs a decryption operation on the first file to obtain a decrypted file (ie, the second file).
示例3,属性设置指令指示了将第一文件的压缩属性设置为已配置状态,则属性设置指令指示的操作为执行压缩操作。基于此,文件存储客户端对第一文件执行压缩操作,以得到压缩文件(即第二文件)。Example 3, the attribute setting instruction indicates that the compression attribute of the first file is set to a configured state, and the operation indicated by the attribute setting instruction is to perform a compression operation. Based on this, the file storage client performs a compression operation on the first file to obtain a compressed file (ie, the second file).
示例4,属性设置指令指示将第一文件的压缩属性设置为未配置状态,则属性设置指令指示的操作为执行解压缩操作。基于此,文件存储客户端对端第一文件执行解压缩操作,以得到解压缩文件(即第二文件)。Example 4: The attribute setting instruction indicates that the compression attribute of the first file is set to an unconfigured state, and the operation indicated by the attribute setting instruction is to perform a decompression operation. Based on this, the file storage client performs a decompression operation on the first file to obtain a decompressed file (ie, the second file).
步骤1603:文件存储客户端向对象存储服务节点发送第一存储请求,第一存储请求用于请求存储第二文件。其中,第一存储请求包括第二文件。Step 1603: The file storage client sends a first storage request to the object storage service node, where the first storage request is used to request storage of the second file, wherein the first storage request includes the second file.
本申请实施例中,文件存储客户端得到第二文件后,可以向对象存储服务节点发送第一存储请求,以请求对象存储服务节点存储第二文件。对象存储服务节点接收到第一存储请求后,响应于第一存储请求,存储第二文件。如:可以将第二文件覆盖第一文件。In an embodiment of the present application, after the file storage client obtains the second file, it can send a first storage request to the object storage service node to request the object storage service node to store the second file. After receiving the first storage request, the object storage service node stores the second file in response to the first storage request. For example, the second file can overwrite the first file.
需要说明的,步骤1601-步骤1603是以目标节点包括的第一文件为例进行示例性说明,在目标节点包括第一目录/第一子目录的情况下,文件存储客户端实现第一目录/第一子目录的目标文件扩展属性的过程可以参考步骤1601-步骤1603,此处不再赘述。It should be noted that steps 1601 to 1603 are illustrative examples of the first file included in the target node. When the target node includes the first directory/first subdirectory, the process of the file storage client implementing the target file extended attributes of the first directory/first subdirectory can refer to steps 1601 to 1603 and will not be repeated here.
上述实施例中,文件存储客户端接收到属性设置指令后,若目标文件扩展属性为第一类文件扩展属性中的部分属性时,如:加密属性、压缩属性等,文件存储客户端可以获取属性设置指令指示的第一文件,并对第一文件执行属性设置指令指示的操作,如:加密操作、解密操作、压缩操作、解压缩操作等,从而为第一文件实现目标文件扩展属性或为第一文件取消目标文件扩展属性,也即,实现/取消windows文件扩展属性的属性,如:实现/取消加密属性、压缩属性等。之后,文件存储客户端向对象存储服务节点发送第一存储请求,请求对象存储服务节点存储第一文件时,便可以为对象存储服务节点提供与windows文件扩展属性的语义无关的待存储数据(即第二文件),这样,对象存储服务节点便无需关心待存储数据的windows文件扩展属性的语义,也即,无需对象存储服务节点实现/取消待存储数据的文件扩展属性,从而有助于在提供文件扩展属性管理服务基础上,简化对象存储服务节点的软件逻辑。In the above embodiment, after the file storage client receives the attribute setting instruction, if the target file extended attribute is part of the attributes of the first type of file extended attributes, such as encryption attribute, compression attribute, etc., the file storage client can obtain the first file indicated by the attribute setting instruction, and perform the operation indicated by the attribute setting instruction on the first file, such as encryption operation, decryption operation, compression operation, decompression operation, etc., so as to realize the target file extended attribute for the first file or cancel the target file extended attribute for the first file, that is, realize/cancel the attribute of the windows file extended attribute, such as: realize/cancel the encryption attribute, compression attribute, etc. Afterwards, the file storage client sends a first storage request to the object storage service node, and when requesting the object storage service node to store the first file, the file storage client can provide the object storage service node with data to be stored (i.e., the second file) that is not related to the semantics of the windows file extended attribute, so that the object storage service node does not need to care about the semantics of the windows file extended attribute of the data to be stored, that is, the object storage service node does not need to realize/cancel the file extended attribute of the data to be stored, which helps to simplify the software logic of the object storage service node on the basis of providing file extended attribute management services.
图17是根据一示例性实施例示出的又一种文件扩展属性管理方法的流程图。示例性的,该文件扩展属性管理方法可以包括以下步骤1701-步骤1703。Fig. 17 is a flow chart of another method for managing file extension attributes according to an exemplary embodiment. Exemplarily, the method for managing file extension attributes may include the following steps 1701-1703.
示例性的,结合图3和图16所示的实施例,若目标状态为已配置状态,文件存储客户端还可以通过以下步骤1701-步骤1703实现目标节点的目标文件扩展属性。Exemplarily, in combination with the embodiments shown in FIG. 3 and FIG. 16 , if the target state is a configured state, the file storage client may further implement the target file extended attributes of the target node through the following steps 1701 to 1703 .
以下,以目标节点包括第三文件为例,对步骤1701-步骤1703进行示例性说明。The following uses the example that the target node includes the third file to exemplarily illustrate steps 1701 to 1703.
步骤1701:文件存储客户端接收存储指令,存储指令用于指示存储第三文件;第三文件的目标文件扩展属性为已配置状态。Step 1701: the file storage client receives a storage instruction, where the storage instruction is used to instruct to store a third file; the target file extension attribute of the third file is in a configured state.
本申请实施例中,用户通过电子设备更新第三文件后,或,目标应用更新第三文件后,如:在第三文件中增加新内容、删除第三文件中的部分内容等,windows操作系统向文件存储客户端发送存储指令,存储指令用于指示存储第三文件。文件存储客户端接收存储指令后,可以获取第三文件的文件扩展属性,以确定第三文件的目标文件扩展属性是否为已配置状态,若第三文件的目标文件扩展属性为已配置状态则执行步骤1702,反之,则直接向对象存储服务节点发送存储请求,以请求对象存储服务节点存储第三文件。In the embodiment of the present application, after the user updates the third file through the electronic device, or after the target application updates the third file, such as: adding new content to the third file, deleting part of the content in the third file, etc., the Windows operating system sends a storage instruction to the file storage client, and the storage instruction is used to instruct to store the third file. After receiving the storage instruction, the file storage client can obtain the file extension attribute of the third file to determine whether the target file extension attribute of the third file is in a configured state. If the target file extension attribute of the third file is in a configured state, step 1702 is executed. Otherwise, a storage request is directly sent to the object storage service node to request the object storage service node to store the third file.
示例性的,目标文件扩展属性可以包括加密属性、压缩属性等,第三文件的加密属性、压缩属性等为 已配置状态。Exemplarily, the target file extended attributes may include encryption attributes, compression attributes, etc., and the encryption attributes, compression attributes, etc. of the third file are Configured state.
需要说明的,第三文件和第二文件可以为同一个文件,或者,也可以为不同的文件,本申请实施例对此不做限制。It should be noted that the third file and the second file may be the same file, or may be different files, and this embodiment of the present application does not limit this.
步骤1702:文件存储客户端对第三文件执行目标文件扩展属性指示的操作,以得到第四文件。Step 1702: The file storage client performs the operation indicated by the target file extension attribute on the third file to obtain a fourth file.
本申请实施例中,在确定第三文件的目标文件扩展属性为已配置状态的情况下,文件存储客户端对第三文件执行目标文件扩展属性指示的操作,以得到第四文件。In the embodiment of the present application, when it is determined that the target file extension attribute of the third file is in a configured state, the file storage client performs the operation indicated by the target file extension attribute on the third file to obtain a fourth file.
结合步骤1602中的示例1,第三文件的目标文件扩展属性包括加密属性,第三文件的加密属性为已配置状态,已配置状态的加密属性指示的操作为加密操作,基于此,文件存储客户端对第二文件执行加密操作,以得到加密文件(即第四文件)。In combination with Example 1 in step 1602, the target file extended attributes of the third file include encryption attributes, the encryption attributes of the third file are in a configured state, and the operation indicated by the encryption attributes in the configured state is an encryption operation. Based on this, the file storage client performs an encryption operation on the second file to obtain an encrypted file (i.e., the fourth file).
结合步骤1602中的示例3,第三文件的目标文件扩展属性包括压缩属性,第三文件的压缩属性为已配置状态,已配置状态的压缩属性指示的操作为压缩操作,基于此,文件存储客户端对第二你减执行压缩操作,以得到压缩文件(即第四文件)。In combination with Example 3 in step 1602, the target file extension attribute of the third file includes a compression attribute, the compression attribute of the third file is in a configured state, and the operation indicated by the compression attribute in the configured state is a compression operation. Based on this, the file storage client performs a compression operation on the second file to obtain a compressed file (i.e., the fourth file).
步骤1703:文件存储客户端向对象存储服务节点发送第二存储请求,第二存储请求用于请求对象存储服务节点存储第四文件;第二存储请求包括第四文件。Step 1703: The file storage client sends a second storage request to the object storage service node, where the second storage request is used to request the object storage service node to store a fourth file; the second storage request includes the fourth file.
本申请实施例中,文件存储客户端得到第四文件后,向对象存储服务节点发送第二存储请求,以请求对象存储服务节点存储第四文件。对象存储服务节点接收到第二存储请求后,响应于第二存储请求,存储第四文件,如:可以将第四文件覆盖第三文件。In the embodiment of the present application, after obtaining the fourth file, the file storage client sends a second storage request to the object storage service node to request the object storage service node to store the fourth file. After receiving the second storage request, the object storage service node stores the fourth file in response to the second storage request, such as: the fourth file can overwrite the third file.
需要说明的,步骤1701-步骤1703是以目标节点包括的第一文件为例进行示例性说明,在目标节点包括第一目录/第一子目录的情况下,文件存储客户端实现第一目录/第一子目录的目标文件扩展属性的过程可以参考步骤1701-步骤1703,此处不再赘述。It should be noted that steps 1701 to 1703 are illustratively described using the first file included in the target node as an example. When the target node includes the first directory/first subdirectory, the process of the file storage client implementing the target file extended attributes of the first directory/first subdirectory can refer to steps 1701 to 1703 and will not be repeated here.
上述实施例中,文件存储客户端接收到存储指令后,若存储指令指示的文件的目标文件扩展属性为已配置状态,则文件存储客户端先对存储指令指示的第三文件执行目标文件扩展属性指示的操作,以得到第四文件,从而为更新后的第三文件实现目标文件扩展属性,进而有助于保证提供的文件扩展属性的准确性。In the above embodiment, after the file storage client receives the storage instruction, if the target file extension attribute of the file indicated by the storage instruction is in a configured state, the file storage client first performs the operation indicated by the target file extension attribute on the third file indicated by the storage instruction to obtain the fourth file, thereby realizing the target file extension attribute for the updated third file, thereby helping to ensure the accuracy of the provided file extension attribute.
以下,结合图18,对第二类文件扩展属性的实现方式进行示例性介绍。In the following, in conjunction with FIG. 18 , an exemplary introduction is given to the implementation of the second type of file extension attributes.
示例性的,以目标节点的隐藏属性为例,对第二类文件扩展属性的实现过程进行介绍。Exemplarily, taking the hidden attribute of the target node as an example, the implementation process of the second type of file extension attribute is introduced.
如图18所示,文件存储客户端获取到目标节点的文件扩展属性(包括隐藏属性)后,可以直接将目标节点的文件扩展属性传输给操作系统,也即,透传给操作系统。操作系统接收到目标节点的文件扩展属性后,在目标节点已配置隐藏属性的情况下,操作系统根据当前显示规则显示目标节点。As shown in Figure 18, after the file storage client obtains the file extension attributes (including hidden attributes) of the target node, it can directly transmit the file extension attributes of the target node to the operating system, that is, transparently transmit to the operating system. After the operating system receives the file extension attributes of the target node, if the target node has been configured with hidden attributes, the operating system displays the target node according to the current display rule.
示例性的,若当前显示规则为“显示隐藏的项目”,则操作系统以预设规则显示目标节点,如:灰度显示目标节点。若显示规则为“不显示隐藏的项目”,则操作系统不显示目标节点。Exemplarily, if the current display rule is "show hidden items", the operating system displays the target node according to a preset rule, such as grayscale display of the target node. If the display rule is "do not show hidden items", the operating system does not display the target node.
该实施例中,由操作系统实现部分文件扩展属性,有助于充分利用操作系统的功能,简化文件存储客户端的复杂度。In this embodiment, some file extension attributes are implemented by the operating system, which helps to fully utilize the functions of the operating system and simplify the complexity of the file storage client.
上述主要从方法的角度对本申请实施例提供的方案进行了介绍。为了实现上述功能,文件存储客户端/文件扩展属性管理装置包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, the file storage client/file extension attribute management device includes a hardware structure and/or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
本申请实施例可以根据上述方法,示例性的对文件存储客户端/文件扩展属性管理装置进行功能模块的划分,例如,文件存储客户端/文件扩展属性管理装置可以包括对应各个功能划分的各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application can divide the file storage client/file extension attribute management device into functional modules according to the above method. For example, the file storage client/file extension attribute management device can include various functional modules corresponding to the various functional divisions, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
示例性的,图19示出了上述实施例中所涉及的文件存储客户端(记为文件存储客户端1900)的一种可能的示意图。该文件存储客户端1900所执行的动作通过电子设备实现或通过电子设备执行相应的软件实现。文件存储客户端1900包括:接收模块1901、属性管理模块1902和发送模块1903。接收模块1901,用于接收属性设置指令,属性设置指令指示了将目标节点的目标文件扩展属性设置为目标状态,目标状态包括已配置状态或未配置状态。例如,图3所示的步骤301。属性管理模块1902,用于基于属性设置指令和对象存储服务节点提供的目标接口,确定属性设置请求;对象存储服务节点提供的接口用于指示属性设 置请求的格式,属性设置请求用于请求将目标节点的目标文件扩展属性设置为目标状态。例如,图3所示的步骤302。发送模块1903,用于向对象存储服务节点发送属性设置请求,以请求对象存储服务节点将目标节点的目标文件扩展属性设置为目标状态。例如,图3所示的步骤303。Exemplarily, FIG19 shows a possible schematic diagram of the file storage client (referred to as file storage client 1900) involved in the above-mentioned embodiment. The actions performed by the file storage client 1900 are implemented by an electronic device or by executing corresponding software through an electronic device. File storage client 1900 includes: a receiving module 1901, an attribute management module 1902 and a sending module 1903. Receiving module 1901 is used to receive an attribute setting instruction, and the attribute setting instruction indicates that the target file extension attribute of the target node is set to a target state, and the target state includes a configured state or an unconfigured state. For example, step 301 shown in FIG3. Attribute management module 1902 is used to determine an attribute setting request based on the attribute setting instruction and the target interface provided by the object storage service node; the interface provided by the object storage service node is used to indicate the attribute setting request. The format of the attribute setting request is used to request to set the target file extension attribute of the target node to the target state. For example, step 302 shown in Figure 3. The sending module 1903 is used to send the attribute setting request to the object storage service node to request the object storage service node to set the target file extension attribute of the target node to the target state. For example, step 303 shown in Figure 3.
可选地,属性设置请求包括消息内容和操作命令,消息内容用于指示目标文件扩展属性,操作命令用于指示目标状态。Optionally, the attribute setting request includes message content and an operation command, the message content is used to indicate the extended attribute of the target file, and the operation command is used to indicate the target status.
可选地,属性设置请求包括消息内容,消息内容用于指示目标文件扩展属性以及目标状态。Optionally, the attribute setting request includes message content, and the message content is used to indicate the target file extended attributes and the target status.
可选地,消息内容包括目标文件扩展属性的取值,目标文件扩展属性的取值与目标文件扩展属性在Windows操作系统中的值相同。Optionally, the message content includes a value of an extended attribute of the target file, and the value of the extended attribute of the target file is the same as a value of the extended attribute of the target file in the Windows operating system.
可选地,文件存储客户端还包括属性实现模块1904。属性实现模块1904用于:接收目标指令,目标指令用于指示对目标节点执行目标操作;目标操作与目标文件扩展属性相关;基于目标文件扩展属性的状态,确定目标操作的权限校验结果;权限校验结果包括通过校验或未通过校验;在权限校验结果为未通过校验的情况下,基于目标指令,返回响应信息;响应信息用于指示拒绝对目标节点执行目标操作。Optionally, the file storage client further includes an attribute implementation module 1904. The attribute implementation module 1904 is used to: receive a target instruction, the target instruction is used to instruct to perform a target operation on a target node; the target operation is related to the target file extension attribute; based on the state of the target file extension attribute, determine the permission verification result of the target operation; the permission verification result includes passing the verification or failing the verification; if the permission verification result is failing the verification, return response information based on the target instruction; the response information is used to indicate that the target operation is refused to be performed on the target node.
可选地,属性实现模块1904还用于:在权限校验结果为通过校验的情况下,基于目标指令,返回第一响应信息;第一响应信息用于指示允许对目标节点执行目标操作。Optionally, the attribute implementation module 1904 is further used to: when the permission check result is passed, based on the target instruction, return first response information; the first response information is used to indicate that the target operation is allowed to be performed on the target node.
可选地,在目标节点为第一文件的情况下,属性实现模块1904还用于:基于属性设置指令,获取第一文件;对第一文件执行属性设置指令指示的操作,以得到第二文件;向对象存储服务节点发送第一存储请求,第一存储请求用于请求存储第二文件;第一存储请求包括第二文件。Optionally, when the target node is the first file, the attribute implementation module 1904 is also used to: obtain the first file based on the attribute setting instruction; perform the operation indicated by the attribute setting instruction on the first file to obtain the second file; send a first storage request to the object storage service node, the first storage request is used to request storage of the second file; the first storage request includes the second file.
可选地,在目标节点为第三文件的情况下,属性实现模块1904还用于:接收存储指令,存储指令用于指示存储第三文件;第三文件的目标文件扩展属性为已配置状态;对第三文件执行目标文件扩展属性指示的操作,以得到第四文件;向对象存储服务节点发送存储请求,以请求对象存储服务节点存储第四文件;存储请求包括第四文件。Optionally, when the target node is the third file, the attribute implementation module 1904 is also used to: receive a storage instruction, the storage instruction is used to indicate the storage of the third file; the target file extension attribute of the third file is in a configured state; perform the operation indicated by the target file extension attribute on the third file to obtain a fourth file; send a storage request to the object storage service node to request the object storage service node to store the fourth file; the storage request includes the fourth file.
可选地,属性管理模块1902还用于:接收属性获取指令,属性获取指令用于指示获取目标节点的文件扩展属性;基于属性获取指令,获取并返回目标节点的文件扩展属性。Optionally, the attribute management module 1902 is further used to: receive an attribute acquisition instruction, the attribute acquisition instruction is used to instruct to acquire the file extension attribute of the target node; based on the attribute acquisition instruction, acquire and return the file extension attribute of the target node.
可选地,属性管理模块1902具体用于:基于属性获取指令,从电子设备的存储介质中获取目标节点的文件扩展属性。Optionally, the attribute management module 1902 is specifically configured to: obtain the file extension attribute of the target node from the storage medium of the electronic device based on the attribute acquisition instruction.
可选地,属性管理模块1902具体用于:基于属性获取指令,从对象存储服务节点获取目标节点的文件扩展属性。Optionally, the attribute management module 1902 is specifically used to: obtain the file extension attribute of the target node from the object storage service node based on the attribute acquisition instruction.
可选地,属性管理模块1902还用于:将从对象存储服务节点获取的目标节点的文件扩展属性,写入电子设备的存储介质中。Optionally, the attribute management module 1902 is further used to write the file extension attributes of the target node obtained from the object storage service node into the storage medium of the electronic device.
可选地,属性管理模块1902还用于:接收元数据获取指令,元数据获取指令用于指示获取目标节点的元数据;基于元数据获取指令,获取并返回目标节点的目标元数据;目标节点的目标元数据包括目标节点的文件扩展属性。Optionally, the attribute management module 1902 is further used to: receive a metadata acquisition instruction, the metadata acquisition instruction is used to instruct to obtain metadata of the target node; based on the metadata acquisition instruction, obtain and return target metadata of the target node; the target metadata of the target node includes file extension attributes of the target node.
可选地,属性管理模块1902具体用于:基于元数据获取指令,从电子设备的存储介质中获取目标节点的目标元数据。Optionally, the attribute management module 1902 is specifically configured to: obtain target metadata of the target node from a storage medium of the electronic device based on a metadata acquisition instruction.
可选地,属性管理模块1902具体用于:基于元数据获取指令,从对象存储服务节点获取目标节点的目标元数据。Optionally, the attribute management module 1902 is specifically used to: obtain target metadata of the target node from the object storage service node based on the metadata acquisition instruction.
可选地,属性管理模块1902还用于:接收目录列举指令,目录列举指令用于指示列举目标目录;基于目录列举指令,获取并返回目标目录的目标元数据;目标目录的目标元数据包括目标目录下的至少一个文件/子目录的文件扩展属性。Optionally, the attribute management module 1902 is also used to: receive a directory listing instruction, the directory listing instruction is used to instruct the listing of a target directory; based on the directory listing instruction, obtain and return target metadata of the target directory; the target metadata of the target directory includes file extension attributes of at least one file/subdirectory under the target directory.
可选地,属性管理模块1902具体用于:基于元数据获取指令,从电子设备的存储介质中获取目标目录的目标元数据。Optionally, the attribute management module 1902 is specifically configured to: obtain target metadata of the target directory from a storage medium of the electronic device based on a metadata acquisition instruction.
可选地,属性管理模块1902具体用于:基于元数据获取指令,从对象存储服务节点获取目标目录的目标元数据。Optionally, the attribute management module 1902 is specifically used to: obtain target metadata of the target directory from the object storage service node based on the metadata acquisition instruction.
关于上述可选方式的具体描述可以参见前述的方法实施例,此处不再赘述。此外,上述提供的任一种文件存储客户端1900的解释以及有益效果的描述均可参考上述对应的方法实施例,不再赘述。For the specific description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation of any file storage client 1900 provided above and the description of the beneficial effects can refer to the above corresponding method embodiments, which will not be repeated here.
示例性的,图20示出了上述实施例中所涉及的文件扩展属性管理装置(记为文件扩展属性管理装置2000)的一种可能的结构示意图。该文件扩展属性管理装置2000所执行的动作通过对象存储服务节点(如:计算设备)实现或通过计算设备执行相应的软件实现。文件扩展属性管理装置2000包括接收模块2001、解析模块2002和管理模块2003。接收模块2001,用于接收对象存储系统的文件存储客户端发送的属性设 置请求,所述属性设置请求的格式是根据所述对象存储服务节点提供的目标接口确定的,所述属性设置请求用于请求将目标节点的目标文件扩展属性设置为目标状态,所述目标状态包括已配置状态或未配置状态。例如,图7所示的步骤701。解析模块2002,用于通过所述目标接口解析所述属性设置请求,以得到所述属性设置请求所请求的内容。例如,图7所示的步骤702。管理模块2003,用于基于所述属性设置请求所请求的内容,将所述目标节点的所述目标文件扩展属性设置为所述目标状态。例如,图7所示的步骤703。Exemplarily, FIG20 shows a possible structural diagram of the file extension attribute management device (referred to as file extension attribute management device 2000) involved in the above embodiment. The actions performed by the file extension attribute management device 2000 are implemented by an object storage service node (such as a computing device) or by executing corresponding software by a computing device. The file extension attribute management device 2000 includes a receiving module 2001, a parsing module 2002 and a management module 2003. The receiving module 2001 is used to receive the attribute setting information sent by the file storage client of the object storage system. A property setting request is configured to request that a target file extension attribute of a target node be set to a target state, wherein the target state includes a configured state or an unconfigured state. For example, step 701 shown in FIG. 7 . A parsing module 2002 is configured to parse the property setting request through the target interface to obtain the content requested by the property setting request. For example, step 702 shown in FIG. 7 . A management module 2003 is configured to set the target file extension attribute of the target node to the target state based on the content requested by the property setting request. For example, step 703 shown in FIG. 7 .
可选地,在目标状态为已配置状态的情况下,管理模块2003具体用于:基于属性设置请求所请求的内容,生成目标节点的目标字段;目标节点的目标字段用于指示已配置目标文件扩展属性;基于目标节点的标识,存储目标节点的目标字段。Optionally, when the target state is the configured state, the management module 2003 is specifically used to: generate a target field of the target node based on the content requested by the attribute setting request; the target field of the target node is used to indicate the configured target file extended attributes; based on the identifier of the target node, store the target field of the target node.
可选地,在目标状态为未配置状态的情况下,管理模块2003具体用于:基于属性设置请求所请求的内容,删除目标节点的目标字段;目标节点的目标字段用于指示已配置目标文件扩展属性。Optionally, when the target state is an unconfigured state, the management module 2003 is specifically used to: delete the target field of the target node based on the content requested by the attribute setting request; the target field of the target node is used to indicate that the target file extended attribute has been configured.
可选地,对象存储服务节点存储有目标字符串,目标字符串用于指示目标节点的文件扩展属性的状态;管理模块2003具体用于:在目标状态为已配置状态的情况下,基于属性设置请求所请求的内容,将目标字符串的目标位设置为第一值;目标位用于指示目标文件扩展属性,第一值用于指示已配置状态;在目标状态为未配置状态的情况下,基于属性设置请求所请求的内容,将目标字符串的目标位设置为第二值;第二值用于指示未配置状态。Optionally, the object storage service node stores a target string, which is used to indicate the state of the file extension attribute of the target node; the management module 2003 is specifically used to: when the target state is a configured state, based on the content requested by the attribute setting request, set the target bit of the target string to a first value; the target bit is used to indicate the target file extension attribute, and the first value is used to indicate the configured state; when the target state is an unconfigured state, based on the content requested by the attribute setting request, set the target bit of the target string to a second value; the second value is used to indicate the unconfigured state.
可选地,属性设置请求包括消息内容和操作命令,消息内容用于指示目标文件扩展属性,操作命令用于指示目标状态。Optionally, the attribute setting request includes message content and an operation command, the message content is used to indicate the extended attribute of the target file, and the operation command is used to indicate the target status.
可选地,属性设置请求包括消息内容,消息内容用于指示目标文件扩展属性以及目标状态。Optionally, the attribute setting request includes message content, and the message content is used to indicate the target file extended attributes and the target status.
可选地,属性设置请求包括目标文件扩展属性的取值;管理模块2003还用于:基于属性设置请求,确定目标文件扩展属性的取值;在目标文件扩展属性的取值与目标值相同的情况下,基于属性设置请求所请求的内容,将目标节点的目标文件扩展属性设置为目标状态;目标值为目标文件扩展属性在Windows操作系统中的值。Optionally, the attribute setting request includes the value of the target file extended attribute; the management module 2003 is also used to: determine the value of the target file extended attribute based on the attribute setting request; when the value of the target file extended attribute is the same as the target value, set the target file extended attribute of the target node to the target state based on the content requested by the attribute setting request; the target value is the value of the target file extended attribute in the Windows operating system.
可选地,管理模块2003还用于:在目标文件扩展属性的取值与目标值不相同的情况下,向文件存储客户端返回提示信息,提示信息用于指示目标文件扩展属性的取值存在错误。Optionally, the management module 2003 is further used to: when the value of the target file extended attribute is different from the target value, return a prompt message to the file storage client, where the prompt message is used to indicate that there is an error in the value of the target file extended attribute.
可选地,接收模块2001还用于:接收文件存储客户端发送的属性获取请求,属性获取请求用于请求获取目标节点的文件扩展属性;管理模块2003用于:基于属性获取请求,向文件存储客户端返回目标节点的文件扩展属性。Optionally, the receiving module 2001 is further used to: receive an attribute acquisition request sent by the file storage client, the attribute acquisition request is used to request to obtain the file extension attributes of the target node; the management module 2003 is used to: return the file extension attributes of the target node to the file storage client based on the attribute acquisition request.
可选地,接收模块2001还用于:对象存储服务节点接收文件存储客户端发送的元数据获取请求,元数据获取请求用于请求获取目标节点的元数据;管理模块200还用于:基于元数据获取请求,向文件存储客户端返回目标节点的目标元数据;目标节点的目标元数据包括目标节点的文件扩展属性。Optionally, the receiving module 2001 is also used for: the object storage service node receives a metadata acquisition request sent by the file storage client, and the metadata acquisition request is used to request to obtain the metadata of the target node; the management module 200 is also used for: based on the metadata acquisition request, returning the target metadata of the target node to the file storage client; the target metadata of the target node includes the file extension attributes of the target node.
可选地,在目标节点为目标目录的情况下,接收模块2001还用于:接收文件存储客户端发送的目录列举请求,目录列举请求用于请求获取目标目录的元数据;管理模块200还用于:基于目录列举请求,向文件存储客户端返回目标目录的目标元数据;目标目录的目标元数据包括目标目录下的至少一个文件/子目录的文件扩展属性。Optionally, when the target node is a target directory, the receiving module 2001 is also used to: receive a directory listing request sent by the file storage client, the directory listing request is used to request to obtain the metadata of the target directory; the management module 200 is also used to: return the target metadata of the target directory to the file storage client based on the directory listing request; the target metadata of the target directory includes the file extension attributes of at least one file/subdirectory under the target directory.
可选地,接收模块2001还用于:接收文件存储客户端发送的删除请求,删除请求用于请求删除目标节点的元数据;管理模块2003还用于:基于删除请求,删除目标节点的文件扩展属性。Optionally, the receiving module 2001 is further used to: receive a deletion request sent by the file storage client, the deletion request is used to request deletion of metadata of the target node; the management module 2003 is further used to: delete the file extension attribute of the target node based on the deletion request.
关于上述可选方式的具体描述可以参见前述的方法实施例,此处不再赘述。此外,上述提供的任一种文件扩展属性管理装置2000的解释以及有益效果的描述均可参考上述对应的方法实施例,不再赘述。For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation and description of the beneficial effects of any of the above file extension attribute management devices 2000 can refer to the above corresponding method embodiments, which will not be repeated here.
本申请实施例中,接收模块2001、解析模块2002和管理模块2003均可以通过软件实现,或者可以通过硬件实现。示例性的,接下来以解析模块2002为例,介绍解析模块2002的实现方式。类似的,接收模块2001和管理模块2003的实现方式可以参考属性解析模块2002的实现方式。In the embodiment of the present application, the receiving module 2001, the parsing module 2002 and the management module 2003 can be implemented by software or by hardware. Exemplarily, the implementation of the parsing module 2002 is described below by taking the parsing module 2002 as an example. Similarly, the implementation of the receiving module 2001 and the management module 2003 can refer to the implementation of the attribute parsing module 2002.
模块作为软件功能单元的一种举例,解析模块2002可以包括运行在计算实例上的代码。其中,计算实例可以包括物理主机(计算设备)、虚拟机、容器中的至少一种。进一步地,上述计算实例可以是一台或者多台。例如,解析模块2002可以包括运行在多个主机/虚拟机/容器上的代码。需要说明的是,用于运行该代码的多个主机/虚拟机/容器可以分布在相同的区域(region)中,也可以分布在不同的region中。进一步地,用于运行该代码的多个主机/虚拟机/容器可以分布在相同的可用区(availability zone,AZ)中,也可以分布在不同的AZ中,每个AZ包括一个数据中心或多个地理位置相近的数据中心。其中,通常一个region可以包括多个AZ。As an example of a software functional unit, the parsing module 2002 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 parsing module 2002 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 may be distributed in the same region (region) or in different regions. Furthermore, the multiple hosts/virtual machines/containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple data centers with close geographical locations. Among them, usually a region may include multiple AZs.
同样,用于运行该代码的多个主机/虚拟机/容器可以分布在同一个虚拟私有云(virtual private cloud, VPC)中,也可以分布在多个VPC中。其中,通常一个VPC设置在一个region内,同一region内两个VPC之间,以及不同region的VPC之间跨区通信需在每个VPC内设置通信网关,经通信网关实现VPC之间的互连。Similarly, multiple hosts/virtual machines/containers running the code can be distributed in the same virtual private cloud (VPC). VPC) or multiple VPCs. Usually, a VPC is set in one 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 in each VPC to realize the interconnection between VPCs through the communication gateway.
模块作为硬件功能单元的一种举例,解析模块2002可以包括至少一个计算设备,如服务器等。或者,解析模块2002也可以是利用专用集成电路(application-specific integrated circuit,ASIC)实现、或可编程逻辑器件(programmable logic device,PLD)实现的设备等。其中,上述PLD可以是复杂程序逻辑器件(complex programmable logical device,CPLD)、现场可编程门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合实现。As an example of a hardware functional unit, the parsing module 2002 may include at least one computing device, such as a server, etc. Alternatively, the parsing module 2002 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.
解析模块2002包括的多个计算设备可以分布在相同的region中,也可以分布在不同的region中。解析模块2002包括的多个计算设备可以分布在相同的AZ中,也可以分布在不同的AZ中。同样,解析模块2002包括的多个计算设备可以分布在同一个VPC中,也可以分布在多个VPC中。其中,所述多个计算设备可以是服务器、ASIC、PLD、CPLD、FPGA和GAL等计算设备的任意组合。The multiple computing devices included in the analysis module 2002 can be distributed in the same region or in different regions. The multiple computing devices included in the analysis module 2002 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the analysis module 2002 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.
需要说明的是,在其他实施例中,解析模块2002可以用于执行文件扩展属性管理方法中的任意步骤,接收模块2001可以用于执行文件扩展属性管理方法中的任意步骤,管理模块2003可以用于执行文件扩展属性管理方法中的任意步骤,或者,接收模块2001、解析模块2002和管理模块2003负责实现的步骤可根据需要指定,通过接收模块2001、解析模块2002和管理模块2003分别实现文件扩展属性管理方法中不同的步骤来实现文件扩展属性管理装置的全部功能。It should be noted that, in other embodiments, the parsing module 2002 can be used to execute any step in the file extension attribute management method, the receiving module 2001 can be used to execute any step in the file extension attribute management method, and the management module 2003 can be used to execute any step in the file extension attribute management method, or the steps that the receiving module 2001, the parsing module 2002 and the management module 2003 are responsible for implementing can be specified as needed, and the receiving module 2001, the parsing module 2002 and the management module 2003 respectively implement different steps in the file extension attribute management method to realize all the functions of the file extension attribute management device.
本申请实施例还提供了一种计算设备。如图21所示,计算设备210包括:总线212、处理器214、存储器216和通信接口218。处理器214、存储器216和通信接口218之间通过总线212通信。计算设备210可以是服务器或终端设备。应理解,本申请不限定计算设备210中的处理器、存储器的个数。The embodiment of the present application also provides a computing device. As shown in FIG. 21 , the computing device 210 includes: a bus 212, a processor 214, a memory 216, and a communication interface 218. The processor 214, the memory 216, and the communication interface 218 communicate with each other via the bus 212. The computing device 210 can 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 210.
总线212可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图21中仅用一条线表示,但并不表示仅有一根总线或一种类型的总线。总线212可包括在计算设备210各个部件(例如,存储器216、处理器214、通信接口218)之间传送信息的通路。The bus 212 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one line is used in FIG. 21, but it does not mean that there is only one bus or one type of bus. The bus 212 may include a path for transmitting information between various components of the computing device 210 (e.g., the memory 216, the processor 214, and the communication interface 218).
处理器214可以包括中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)、微处理器(micro processor,MP)或者数字信号处理器(digital signal processor,DSP)等处理器中的任意一种或多种。The processor 214 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).
存储器216可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM)。存储器216还可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM),快闪存储器,机械硬盘(hard disk drive,HDD)或固态硬盘(solid state drive,SSD)。The memory 216 may include a volatile memory (volatile memory), such as a random access memory (RAM). The memory 216 may also include a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
存储器216中存储有可执行的程序代码,处理器214执行该可执行的程序代码以分别实现前述接收模块2001、解析模块2002和管理模块2003的功能,从而实现文件扩展属性管理方法。也即,存储器216上存有用于执行文件扩展属性管理方法的指令。The memory 216 stores executable program codes, and the processor 214 executes the executable program codes to respectively implement the functions of the aforementioned receiving module 2001, parsing module 2002, and management module 2003, thereby implementing the file extension attribute management method. That is, the memory 216 stores instructions for executing the file extension attribute management method.
或者,存储器216中存储有可执行的程序代码,处理器214执行该可执行的程序代码以分别实现前述接收模块2001、解析模块2002和管理模块2003的功能,从而实现一种文件扩展属性管理方法。也即,存储器216上存有用于执行一种文件扩展属性管理方法的指令。Alternatively, the memory 216 stores executable program codes, and the processor 214 executes the executable program codes to respectively implement the functions of the aforementioned receiving module 2001, parsing module 2002, and management module 2003, thereby implementing a file extension attribute management method. That is, the memory 216 stores instructions for executing a file extension attribute management method.
通信接口218使用例如但不限于网络接口卡、收发器一类的收发模块,来实现计算设备210与其他设备或通信网络之间的通信。The communication interface 218 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 210 and other devices or communication networks.
需要说明的,计算设备210可以为对象存储服务节点(如图1、图2所示)中的计算设备。It should be noted that the computing device 210 may be a computing device in an object storage service node (as shown in FIG. 1 and FIG. 2 ).
本申请实施例还提供了一种计算设备集群。该计算设备集群包括至少一台计算设备。该计算设备可以是服务器,例如,云服务器、中心服务器、边缘服务器或者本地数据中心中的本地服务器。在一些实施例中,计算设备也可以是台式机、笔记本电脑或者智能手机等终端设备。The embodiment of the present application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, for example, a cloud server, a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.
如图22所示,该计算设备集群220包括至少一个计算设备210。计算设备集群220中的一个或多个计算设备210中的存储器216可以存有相同的用于执行文件扩展属性管理方法的指令。As shown in Fig. 22, the computing device cluster 220 includes at least one computing device 210. The memory 216 in one or more computing devices 210 in the computing device cluster 220 may store the same instructions for executing the file extension attribute management method.
在一些可能的实现方式中,该计算设备集群220中的一个或多个计算设备210的存储器216中也可以分别存有用于执行文件扩展属性管理方法的部分指令。换言之,一个或多个计算设备210的组合可以共同执行用于执行文件扩展属性管理方法的指令。In some possible implementations, the memory 216 of one or more computing devices 210 in the computing device cluster 220 may also respectively store some instructions for executing the file extension attribute management method. In other words, the combination of one or more computing devices 210 may jointly execute the instructions for executing the file extension attribute management method.
需要说明的是,计算设备集群220中的不同的计算设备210中的存储器216可以存储不同的指令,分别用于执行文件扩展属性管理装置2000的部分功能。也即,不同的计算设备210中的存储器216存储的 指令可以实现接收模块2001、解析模块2002和管理模块2003中的一个或多个模块的功能。It should be noted that the memory 216 in different computing devices 210 in the computing device cluster 220 may store different instructions, which are respectively used to execute part of the functions of the file extension attribute management apparatus 2000. That is, the memory 216 in different computing devices 210 may store different instructions. The instruction may implement the functions of one or more modules among the receiving module 2001 , the parsing module 2002 and the management module 2003 .
需要说明的,计算设备集群220可以作为对象存储服务节点(如图1、图2所示),用于为云服务租户提供云服务。图22所示计算设备集群中至少一台计算设备210的相关说明,可以参考图21所示计算设备的相关说明,此处不再赘述。It should be noted that the computing device cluster 220 can be used as an object storage service node (as shown in Figures 1 and 2) to provide cloud services for cloud service tenants. The relevant description of at least one computing device 210 in the computing device cluster shown in Figure 22 can refer to the relevant description of the computing device shown in Figure 21, which will not be repeated here.
以下,对计算设备集群的连接方式进行示例性介绍。The following is an exemplary introduction to the connection method of the computing device cluster.
在一种可能的实现方式中,计算设备集群(如:图22所示的计算设备集群)中的一个或多个计算设备可以通过网络连接。其中,该网络可以是广域网或局域网等。图23示出了一种可能的实现方式。如图23所示,两个计算设备(如:计算设备210A和计算设备210B)之间通过网络进行连接。具体地,通过各个计算设备的通信接口与该网络进行连接。在这一类可能的实现方式中,计算设备210A中的存储器216中存储有执行接收模块2001和管理模块2003的功能的指令。同时,计算设备210B中的存储器216中存储有执行解析模块2002的功能的指令。In a possible implementation, one or more computing devices in a computing device cluster (such as the computing device cluster shown in FIG. 22 ) may be connected via a network. The network may be a wide area network or a local area network, etc. FIG. 23 shows a possible implementation. As shown in FIG. 23 , two computing devices (such as computing device 210A and computing device 210B) are connected via a network. Specifically, the network is connected via the communication interface of each computing device. In this type of possible implementation, the memory 216 in the computing device 210A stores instructions for executing the functions of the receiving module 2001 and the management module 2003. At the same time, the memory 216 in the computing device 210B stores instructions for executing the functions of the parsing module 2002.
图23所示的计算设备集群之间的连接方式可以是考虑到本申请提供的文件扩展属性管理方法需要占用较高的计算资源,因此考虑将接收模块2001和管理模块2003实现的功能交由计算设备210A执行,并将解析模块2002实现的功能交由计算设备210B执行。The connection method between the computing device clusters shown in Figure 23 can be considered to be that the file extension attribute management method provided in this application requires higher computing resources, so it is considered to hand over the functions implemented by the receiving module 2001 and the management module 2003 to the computing device 210A for execution, and the functions implemented by the parsing module 2002 to the computing device 210B for execution.
应理解,图23中示出的计算设备210A的功能也可以由多个计算设备210完成。同样,计算设备210B的功能也可以由多个计算设备210完成。It should be understood that the functionality of the computing device 210A shown in FIG23 may also be accomplished by multiple computing devices 210. Similarly, the functionality of the computing device 210B may also be accomplished by multiple computing devices 210.
本申请实施例还提供了另一种计算设备集群。该计算设备集群中各计算设备之间的连接关系可以类似的参考图21所示计算设备集群的连接方式。不同的是,该计算设备集群中的一个或多个计算设备210中的存储器216中可以存有相同的用于执行文件扩展属性管理方法的指令。The embodiment of the present application also provides another computing device cluster. The connection relationship between the computing devices in the computing device cluster can be similar to the connection mode of the computing device cluster shown in Figure 21. The difference is that the memory 216 in one or more computing devices 210 in the computing device cluster can store the same instructions for executing the file extension attribute management method.
在一些可能的实现方式中,该计算设备集群中的一个或多个计算设备210的存储器216中也可以分别存储有用于执行文件扩展属性管理方法的部分指令。换言之,一个或多个计算设备210的组合可以共同执行用于执行文件扩展属性管理方法的指令。In some possible implementations, the memory 216 of one or more computing devices 210 in the computing device cluster may also store partial instructions for executing the file extension attribute management method. In other words, the combination of one or more computing devices 210 may jointly execute the instructions for executing the file extension attribute management method.
本申请实施例还提供了一种电子设备。如图24所示,电子设备240包括:总线242、处理器244、存储器246和通信接口248。处理器244、存储器246和通信接口248之间通过总线242通信。电子设备240可以是服务器或终端设备。应理解,本申请不限定电子设备240中的处理器、存储器的个数。The embodiment of the present application also provides an electronic device. As shown in FIG. 24 , the electronic device 240 includes: a bus 242, a processor 244, a memory 246, and a communication interface 248. The processor 244, the memory 246, and the communication interface 248 communicate with each other via the bus 242. The electronic device 240 can 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 electronic device 240.
存储器246中存储有可执行的程序代码,处理器244执行该可执行的程序代码以分别实现前述接收模块1901、属性管理模块1902、发送模块1903和属性实现模块1904的功能,从而实现文件扩展属性管理方法。也即,存储器246上存有用于执行文件扩展属性管理方法的指令。The memory 246 stores executable program codes, and the processor 244 executes the executable program codes to respectively implement the functions of the aforementioned receiving module 1901, the attribute management module 1902, the sending module 1903, and the attribute implementation module 1904, thereby implementing the file extended attribute management method. That is, the memory 246 stores instructions for executing the file extended attribute management method.
需要说明的,电子设备240可以为图1、图2所示的云服务租户使用的电子设备。电子设备240的总线242、处理器244、存储器246和通信接口248的其他相关说明,可以参考上述图21所示计算设备的相关说明,此处不再赘述。It should be noted that the electronic device 240 may be an electronic device used by the cloud service tenant shown in Figures 1 and 2. For other related descriptions of the bus 242, processor 244, memory 246, and communication interface 248 of the electronic device 240, reference may be made to the related descriptions of the computing device shown in Figure 21 above, which will not be repeated here.
本申请实施例还提供了一种计算机程序产品。该计算机程序产品可以是包含计算机程序/指令的,能够运行在电子设备上或被储存在任何可用介质中的软件或程序产品。当该计算机程序产品在至少一个电子设备上运行时,使得至少一个电子设备执行文件扩展属性管理方法。The embodiment of the present application also provides a computer program product. The computer program product may be a software or program product that includes a computer program/instruction and can be run on an electronic device or stored in any available medium. When the computer program product is run on at least one electronic device, the at least one electronic device executes the file extension attribute management method.
本申请实施例还提供了一种计算机程序产品。该计算机程序产品可以是包含计算机程序/指令的,能够运行在计算设备上或被储存在任何可用介质中的软件或程序产品。当该计算机程序产品在至少一个计算设备上运行时,使得至少一个计算设备执行文件扩展属性管理方法。The embodiment of the present application also provides a computer program product. The computer program product may be a software or program product that includes a computer program/instruction and 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 file extension attribute management method.
本申请实施例还提供了一种计算机可读存储介质。该计算机可读存储介质可以是电子设备能够存储的任何可用介质或者是包含一个或多个可用介质的数据中心等数据存储设备。该计算机可读存储介质包括计算机程序/指令,该计算机程序/指令指示电子设备执行文件扩展属性管理方法。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 electronic device or a data storage device such as a data center containing one or more available media. The computer-readable storage medium includes a computer program/instruction that instructs the electronic device to execute the file extension attribute management method.
本申请实施例还提供了一种计算机可读存储介质。该计算机可读存储介质可以是计算设备能够存储的任何可用介质或者是包含一个或多个可用介质的数据中心等数据存储设备。该计算机可读存储介质包括计算机程序/指令,该计算机程序/指令指示计算设备执行文件扩展属性管理方法。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 a computing device or a data storage device such as a data center that includes one or more available media. The computer-readable storage medium includes a computer program/instruction that instructs the computing device to execute the file extension attribute management method.
其中,可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘)等。The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state drive), etc.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,然而,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的保护范围。 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 (20)
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311607099 | 2023-11-27 | ||
| CN202311607099.7 | 2023-11-27 | ||
| CN202410284846.6 | 2024-03-12 | ||
| CN202410284846.6A CN120045526A (en) | 2023-11-27 | 2024-03-12 | File extension attribute management method, file storage client and device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025112466A1 true WO2025112466A1 (en) | 2025-06-05 |
Family
ID=95756306
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/099953 Pending WO2025112466A1 (en) | 2023-11-27 | 2024-06-18 | File extended attribute management method, file storage client, and apparatus |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN120045526A (en) |
| WO (1) | WO2025112466A1 (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106202220A (en) * | 2016-06-28 | 2016-12-07 | 北京百迈客云科技有限公司 | The method of data and device in a kind of reading object storage system |
| CN107479991A (en) * | 2017-08-25 | 2017-12-15 | 郑州云海信息技术有限公司 | Object methods of storage operating, apparatus and system based on kernel file system |
| US20190354427A1 (en) * | 2018-05-17 | 2019-11-21 | Microsoft Technology Licensing, Llc | File synchronizing service status monitoring and error handling |
| CN110677441A (en) * | 2018-07-02 | 2020-01-10 | 中国移动通信集团有限公司 | Access method and device of object storage cluster |
| CN116303325A (en) * | 2023-02-24 | 2023-06-23 | 济南浪潮数据技术有限公司 | Method, system, equipment and storage medium for protecting remote copy data |
-
2024
- 2024-03-12 CN CN202410284846.6A patent/CN120045526A/en active Pending
- 2024-06-18 WO PCT/CN2024/099953 patent/WO2025112466A1/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106202220A (en) * | 2016-06-28 | 2016-12-07 | 北京百迈客云科技有限公司 | The method of data and device in a kind of reading object storage system |
| CN107479991A (en) * | 2017-08-25 | 2017-12-15 | 郑州云海信息技术有限公司 | Object methods of storage operating, apparatus and system based on kernel file system |
| US20190354427A1 (en) * | 2018-05-17 | 2019-11-21 | Microsoft Technology Licensing, Llc | File synchronizing service status monitoring and error handling |
| CN110677441A (en) * | 2018-07-02 | 2020-01-10 | 中国移动通信集团有限公司 | Access method and device of object storage cluster |
| CN116303325A (en) * | 2023-02-24 | 2023-06-23 | 济南浪潮数据技术有限公司 | Method, system, equipment and storage medium for protecting remote copy data |
Also Published As
| Publication number | Publication date |
|---|---|
| CN120045526A (en) | 2025-05-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10437787B2 (en) | Comparison of file system snapshots stored in a remote storage system using a network file system command | |
| CN114730269B (en) | User-specific data manipulation system for object storage services based on user submission code | |
| US20230038409A1 (en) | On-demand code obfuscation of data in input path of object storage service | |
| US8572136B2 (en) | Method and system for synchronizing a virtual file system at a computing device with a storage device | |
| US8200788B2 (en) | Slice server method and apparatus of dispersed digital storage vaults | |
| US6968345B1 (en) | Technique to enable support for symbolic link access by windows clients | |
| US20100094847A1 (en) | Method and apparatus for multiple-protocol access to object-based storage | |
| US10996961B2 (en) | On-demand indexing of data in input path of object storage service | |
| US11023311B2 (en) | On-demand code execution in input path of data uploaded to storage service in multiple data portions | |
| WO2021061820A1 (en) | On-demand code obfuscation of data in input path of object storage service | |
| CN114586010A (en) | On-demand execution of object filtering code in the output path of the object storage service | |
| EP3147800A1 (en) | Information and data framework in a content centric network | |
| US9582206B2 (en) | Methods and systems for a copy-offload operation | |
| US20190121899A1 (en) | Apparatus and method for managing integrated storage | |
| US11966370B1 (en) | Pseudo-local multi-service enabled file systems using a locally-addressable secure compute layer | |
| US11656892B1 (en) | Sequential execution of user-submitted code and native functions | |
| WO2025025694A1 (en) | Permission verification method and apparatus, device and cluster | |
| WO2025112466A1 (en) | File extended attribute management method, file storage client, and apparatus | |
| US20240264752A1 (en) | Systems and methods for performing distributed computing | |
| CN117395243A (en) | Method for realizing communication between system and object storage through FTP | |
| US11782885B2 (en) | Accessing S3 objects in a multi-protocol filesystem | |
| US12197397B1 (en) | Offloading of remote service interactions to virtualized service devices | |
| US20250286894A1 (en) | Management of access to object storage services using a directory service | |
| US20240171389A1 (en) | Secure caching of namespace keys | |
| WO2025001213A1 (en) | Data access method, apparatus and system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24895569 Country of ref document: EP Kind code of ref document: A1 |