File extended attribute management method, file storage client, and apparatus

By implementing the file extension attribute management method between the file storage client and the object storage service node, the problem that the object storage system cannot manage the file extension attributes is solved, and more complete file services and better file application compatibility is achieved.

WO2025112466A1PCT designated stage expired Publication Date: 2025-06-05HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/099953
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-12
Filing Date
2024-06-18
Publication Date
2025-06-05

AI Technical Summary

Technical Problem

Existing object storage systems cannot effectively manage file extension properties, resulting in the inability to implement complete management of file extension properties.

Method used

Provides a file extension attribute management method, which receives attribute setting instructions through the file storage client, determines attribute setting requests, and sends a request to the object storage service node to manage file extension attributes. The method includes receiving attribute setting instructions, determining attribute setting requests, and sending a request to the object storage service node to request setting or obtaining file extension attributes.

Benefits of technology

It realizes file extension attribute management for file services provided by object storage system, enhances semantic compatibility of object storage system, and provides more complete file extension attribute management services on the basis of providing file services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024099953_05062025_PF_FP_ABST
    Figure CN2024099953_05062025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed are a file extended attribute management method, a file storage client and an apparatus, which relate to the technical field of storage. The method is used for a file storage client, and when the file storage client receives an instruction for instructing to manage a file extended attribute, for example: receiving an attribute setting instruction which instructs to set a target file extended attribute of a target file / target directory as a configured state or a configuring state; and on the basis of the attribute setting instruction and a target interface provided by an object storage service node of an object storage system, determining an attribute setting request, so as to achieve the purpose of converting the attribute setting instruction using file extended attribute semantics into the attribute setting request using object storage semantics. In this way, after the file storage client sends the attribute setting request to the object storage service node, the object storage service node can accurately identify content requested by the attribute setting request, so as to manage the file extended attribute on the basis of the content requested by the attribute setting request.
Need to check novelty before this filing date? Find Prior Art

Description

File extension attribute management method, file storage client and device

[0001] 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 into this application. Technical Field

[0002] 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. Background Art

[0003] File storage stores data as files on file storage service nodes, while object storage stores data as objects on object storage service nodes. Because object storage lacks directories and file hierarchies, object storage service nodes can store large amounts of data, making object storage increasingly widely used.

[0004] 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, 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.

[0005] 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.

[0006] Summary of the Invention

[0007] The present application provides a file extension attribute management method, a file storage client, and a device, which can manage file extension attributes of file services provided by an object storage system, helping the object storage system to provide more complete file services.

[0008] In order to achieve the above objectives, this application adopts the following technical solutions:

[0009] In a first aspect, a method for managing file extension attributes is provided, which is applied to a file storage client, the file storage client running on a Windows operating system, the Windows operating system also providing a local file system, the directory tree of the local file system including a target node, the target node being a file or a directory, and the file or directory being stored in an object storage service node; the method including: receiving an attribute setting instruction, the attribute setting instruction indicating that the target file extension attribute of the target node is set to a target state, the target state including 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; the interface provided by the object storage service node is used to indicate the format of the attribute setting request, the attribute setting request being used to request that the target file extension attribute of the target node be set to a target state; and sending 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.

[0010] In this solution, a file storage client runs on a 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 directory. The file or directory is stored on an object storage service node. Based on this, after receiving 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, requesting that the target file extended attributes of the target node be set to the target state. The file storage client then sends the attribute setting request to the object storage service node, requesting that the object storage service node set the target file extended attributes of the target node to the target state.

[0011] When it is necessary to manage file extended 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, thereby converting the semantics of the file extended 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. In this way, the object storage service node can accurately identify the content requested by the attribute setting request, and thus manage the file extended 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 solution of the present application, so that the semantics of object storage can be compatible with file extended attributes, thereby providing file extended attribute management services on the basis of providing file services, thereby achieving the provision of more complete file services, and making object storage more compatible with file applications.

[0012] 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 attributes of the target file, and the operation command is used to indicate the target status. This helps to comply with the request representation of the target interface.

[0013] In another possible implementation, the attribute setting request includes message content, and the message content is used to indicate the target file extended attributes and the target state. In this way, it helps to increase the diversity of the methods for indicating the target file extended attributes and the target state.

[0014] In another possible implementation, the message content includes the value of the target file's extended attribute, which is the same as its value in the Windows operating system. This helps improve the accuracy of the conversion process between object storage semantics and file extended attribute semantics.

[0015] In another possible implementation, the method further includes: receiving a target instruction, the target instruction being used to instruct execution of a target operation on a target node; the target operation being related to a target file extended attribute; determining a permission verification result for the target operation based on a status of the target file extended attribute; the permission verification result including a pass or fail; if the permission verification result is a fail, returning a response message based on the target instruction; the response message being used to indicate a refusal to execute the target operation on the target node. The file storage client of the object storage system provides a function for implementing file extended attributes, such as implementing a read-only attribute, thereby helping the object storage system provide more comprehensive file extended attribute management services.

[0016] 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.

[0017] 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 including the second file.

[0018] In this approach, 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 implementing the target file extended attributes for the first file, such as implementing encryption attributes and compression attributes for the first file. In addition, by sending a first storage request to the object storage service node, the object storage service node is provided with to-be-stored data (i.e., the second file) that is not semantically related to Windows file extended attributes, thereby eliminating the need for the object storage service node to perform operations related to the semantics of Windows file extended attributes, such as encryption operations and compression operations.

[0019] In another possible implementation, when the target node is a third file, the method further includes: receiving a storage instruction, the storage instruction being used to instruct storage of the third file; the target file extended attribute of the third file being in a configured state; performing an operation indicated by the target file extended attribute on the third file to obtain a fourth file; and sending a second storage request to the object storage service node, the second storage request being used to request the object storage service node to store the fourth file; the storage request including the fourth file. In this method, the file storage client provides functionality for implementing file extended attributes, such as encryption attributes and compression attributes, thereby helping the object storage system provide more comprehensive file extended attribute management services.

[0020] In another possible implementation, the method further includes: receiving an attribute acquisition instruction, the attribute acquisition instruction being used to instruct acquisition of file extended attributes of a target node; and acquiring and returning the file extended attributes of the target node based on the attribute acquisition instruction. The file storage client of the object storage system provides a file extended attribute query function, thereby helping the object storage system provide more comprehensive file extended attribute management services.

[0021] In another possible implementation, a file storage client runs on an electronic device; obtaining the file extended attributes of a target node based on an attribute acquisition instruction includes obtaining the file extended attributes of the target node from a storage medium of the electronic device based on the attribute acquisition instruction. This helps improve the efficiency of obtaining file extended attributes.

[0022] In another possible implementation, obtaining the file extended attributes of the target node based on the attribute acquisition instruction includes: obtaining the file extended attributes of the target node from the object storage service node based on the attribute acquisition instruction. This helps improve the accuracy of the obtained file extended attributes.

[0023] In another possible implementation, the method further includes writing the file extended attributes of the target node obtained from the object storage service node to a storage medium of the electronic device. This allows subsequent retrieval of the file extended attributes from the local storage medium, thereby improving the efficiency of subsequent retrieval of the file extended attributes.

[0024] In another possible implementation, the method further includes: receiving a metadata acquisition instruction, the metadata acquisition instruction being used to instruct acquisition of metadata for a target node; and acquiring and returning target metadata for the target node based on the metadata acquisition instruction; wherein the target metadata for the target node includes file extension attributes for the target node. When acquiring the metadata for the target node, the file extension attributes for the target node are also provided, thereby helping to improve the integrity of the metadata for the target node.

[0025] In another possible implementation, the file storage client runs on an electronic device; obtaining target metadata of a target node based on a metadata acquisition instruction includes obtaining the target metadata of the target node from a storage medium of the electronic device based on the metadata acquisition instruction. This helps improve the efficiency of obtaining target metadata.

[0026] 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 improve the accuracy of the target metadata.

[0027] 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 being used to instruct listing of the target directory; and obtaining and returning target metadata for the target directory based on the directory listing instruction; the target metadata for the target directory including file extended attributes of at least one file / subdirectory within the target directory. In this method, when listing a directory, the file extended attributes of at least one file / subdirectory within the directory are also provided, thereby helping to improve the comprehensiveness of the directory listing.

[0028] In another possible implementation, the file storage client runs on an electronic device; obtaining target metadata for a target directory based on a directory listing instruction includes obtaining the target metadata for the target directory from a storage medium of the electronic device based on the directory listing instruction. This helps improve the efficiency of obtaining the target metadata.

[0029] In another possible implementation, obtaining target metadata of a target directory based on a directory enumeration instruction includes obtaining the target metadata of the target directory from an object storage service node based on the directory enumeration instruction. This helps improve the accuracy of the target metadata.

[0030] 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 based on a target interface provided by the object storage service node, where the attribute setting request is used to request that the 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.

[0031] 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.

[0032] Because the attribute setting request is determined based on the interface provided by the object storage service node, the attribute setting request indicates the requested content through the semantics of the object storage. In this way, the object storage service node can accurately identify the requested content of the attribute setting request, thereby ensuring the management of file extended attributes. Therefore, the object storage system can improve the semantics of object storage through the solution of this application, making the semantics of object storage compatible with file extended attributes, thereby providing file extended attribute management services on the basis of providing file services, and further providing more complete file services, making object storage more compatible with file applications.

[0033] In one possible implementation, when the target state is configured, the target file extended attribute of the target node is set to the target state based on the content of the attribute setting request, including: generating a target field for the target node based on the content of the attribute setting request; the target field of the target node is used to indicate that the target file extended attribute has been configured; and storing the target field of the target node based on an identifier of the target node. In this implementation, the object storage service node indicates that the target file extended attribute has been configured on the target node by storing the target field, i.e., the state of the target file extended attribute is configured. This helps improve the accuracy of the indication of the state of the target file extended attribute.

[0034] 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.

[0035] In this implementation, the object storage service node indicates that the target node is not configured with the target file extended 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 extended attribute.

[0036] In another possible implementation, an object storage service node stores a target string that indicates the state of a file extension attribute of the target node; based on the content of an attribute setting request, the target file extension attribute of the target node is set to a target state, including: if the target state is configured, based on the content of the attribute setting request, setting a 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; if the target state is unconfigured, setting the target bit of the target string to a second value based on the content of the attribute setting request; 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. This helps reduce the storage space occupied by related fields of file extension attributes.

[0037] In another possible implementation, the attribute setting request includes a message content and an operation command, wherein the message content is used to indicate the target file extended attributes, and the operation command is used to indicate the target status. Alternatively, the attribute setting request includes a message content, wherein the message content is used to indicate the target file extended attributes and the target status.

[0038] In another possible implementation, the property setting request includes the value of the target file's extended attribute; the object storage service node sets the target file's extended attribute of the target node to the target state based on the content of the property setting request, including: determining the value of the target file's extended attribute based on the property setting request; if the value of the target file's extended attribute is the same as the target value, setting the target file's extended attribute of the target node to the target state based on the content of the property setting request; the target value is the value of the target file's extended attribute in the Windows operating system. In this implementation, verifying the value of the target file's extended attribute helps improve the accuracy of subsequent file extended attribute management.

[0039] In another possible implementation, the method further includes returning a prompt to the file storage client if the value of the target file's extended attribute differs from the target value, the prompt indicating that the value of the target file's extended attribute is incorrect. This helps the file storage client promptly adjust its logic for generating attribute setting requests, thereby avoiding subsequent erroneous requests.

[0040] In another possible implementation, the method further includes: receiving an attribute retrieval request from a file storage client, the attribute retrieval request being used to request the extended attributes of a file on a target node; and returning the extended attributes of the file on the target node to the file storage client based on the attribute retrieval request. In this embodiment, the object storage service node provides a query service for the extended attributes of files.

[0041] In another possible implementation, the method further includes: receiving a metadata retrieval request from a file storage client, the metadata retrieval request being used to request metadata for a target node; and returning target metadata for the target node to the file storage client based on the metadata retrieval request; the target metadata for the target node including file extended attributes for the target node. In this method, providing the target node's file extended attributes simultaneously with the request for metadata for the target node helps improve the integrity of the target node's metadata.

[0042] In another possible implementation, when the target node is a target directory, the method further includes: receiving a directory listing request from a file storage client, the directory listing request being used to request metadata for the target directory; and returning target metadata for the target directory to the file storage client based on the directory listing request; the target metadata for the target directory including file extended attributes for at least one file / subdirectory within the target directory. In this method, when requesting directory listing, the file extended attributes for at least one file / subdirectory within the target directory are also provided, thereby helping to improve the comprehensiveness of the directory listing.

[0043] In another possible implementation, the method further includes: receiving a deletion request from a file storage client, the deletion request being for deleting metadata of a target node; and deleting file extension attributes 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 attributes of the target node are also deleted. This facilitates comprehensive removal of relevant data of the target node, thereby preventing useless data from occupying storage space.

[0044] In a third aspect, a file extension attribute management method is provided for an object storage system, the object storage system including an object storage service node and a file storage client; 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 method includes: a file storage client receives an attribute setting instruction, the attribute setting instruction indicates that the target file extended 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 determines an attribute setting request based on the attribute setting instruction and a target interface provided by the object storage service node; the target interface is used to indicate the format of the attribute setting request, and the attribute setting request is used to request that the target file extended attribute of the target node be set 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 extended attribute of the target node to the 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; and 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.

[0045] 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.

[0046] In a fourth aspect, a file storage client is provided, which includes: a functional module for executing any one of the methods provided in the first aspect, wherein the actions executed by each functional module are executed by hardware or by hardware executing corresponding software implementations. 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, wherein the attribute setting instruction indicates that the target file extension attribute of the target node is set to a target state, wherein 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, wherein the attribute setting request is used to request that the target file extension attribute of the target node be set to a target state; and 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.

[0047] In a fifth aspect, a file extension attribute management device is provided, which includes: a functional module for executing any one of the methods provided in the second aspect, wherein 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 can 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, wherein the format of the attribute setting request is determined according to the target interface provided by the object storage service node, 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, wherein the target state includes 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; and 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.

[0048] In a sixth aspect, an object storage system is provided, comprising a file storage client and an object storage service node. The object storage service node stores a target object and is configured to map the target object to a target node in a directory tree. The file storage client runs on a Windows operating system, which provides a local file system. The directory tree of the local file system includes the target node, which is a file or directory. The file storage client is used to receive a property setting instruction, which 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 a property setting request based on the property setting instruction and the 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 property setting request, and the property 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 a property 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 the property setting request sent by the file storage client of the object storage system; 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 is used to set the target file extension attribute of the target node to a target state based on the content requested by the property setting request.

[0049] 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.

[0050] 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.

[0051] 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.

[0052] 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.

[0053] 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.

[0054] In the eleventh aspect, an electronic device is provided, comprising: a processor, a memory, and a computer program / instruction stored in the memory; the processor executes the computer program / instruction to enable the electronic device to implement the steps of any one of the methods provided in the first aspect above.

[0055] 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 to enable the computing device to implement the steps of any one of the methods provided in the second aspect above.

[0056] 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 / instruction stored on the memory; the processor executes the computer program / instruction so that the computing device cluster implements the steps of any one of the methods provided in the second aspect above.

[0057] In the fourteenth aspect, a computer program product is provided, comprising: a computer program / instruction; when the computer program / instruction is executed by a processor of an electronic device, it can implement the steps of any one of the methods provided in the first aspect above.

[0058] In the fifteenth aspect, a computer program product is provided, comprising: a computer program / instruction; when the computer program / instruction is executed by a processor of a computing device, it can implement the steps of any one of the methods provided in the second aspect above.

[0059] 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.

[0060] 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.

[0061] 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. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] FIG1 is a schematic diagram of a system architecture provided in an embodiment of the present application;

[0063] FIG2 is a schematic diagram of another system architecture provided in an embodiment of the present application;

[0064] FIG3 is a flowchart of a method for managing file extension attributes provided by an embodiment of the present application;

[0065] FIG4 is a schematic diagram of a property interface provided in an embodiment of the present application;

[0066] FIG5 is a framework diagram of setting file extension attributes provided by an embodiment of the present application;

[0067] FIG6 is a schematic diagram of setting file extension attributes according to an embodiment of the present application;

[0068] FIG7 is a flowchart of another file extension attribute management method provided in an embodiment of the present application;

[0069] FIG8 is a flowchart of another file extension attribute management method provided in an embodiment of the present application;

[0070] FIG9 is a framework diagram of obtaining file extension attributes provided by an embodiment of the present application;

[0071] FIG10 is a schematic diagram of obtaining file extension attributes according to an embodiment of the present application;

[0072] FIG11 is a schematic diagram of obtaining metadata of a file provided in an embodiment of the present application;

[0073] FIG12 is a schematic diagram of obtaining metadata of a directory provided in an embodiment of the present application;

[0074] FIG13 is a framework diagram of a directory listing provided in an embodiment of the present application;

[0075] FIG14 is a flowchart of another file extension attribute management method provided in an embodiment of the present application;

[0076] FIG15 is a schematic diagram of implementing file extension attributes according to an embodiment of the present application;

[0077] FIG16 is a flowchart of another file extension attribute management method provided in an embodiment of the present application;

[0078] FIG17 is a flowchart of another file extension attribute management method provided in an embodiment of the present application;

[0079] FIG18 is a schematic diagram of another method for implementing file extension attributes according to an embodiment of the present application;

[0080] FIG19 is a schematic diagram of a file storage client provided in an embodiment of the present application;

[0081] FIG20 is a schematic diagram of a file extension attribute management device provided in an embodiment of the present application;

[0082] FIG21 is a schematic diagram of a computing device provided in an embodiment of the present application;

[0083] FIG22 is a schematic diagram of a computing device cluster provided in an embodiment of the present application;

[0084] FIG23 is a schematic diagram of a connection of a computing device cluster provided in an embodiment of the present application;

[0085] FIG24 is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0086] 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.

[0087] 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 this application is merely a description of the association relationship of 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. Also, 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 similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0088] In addition, to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or execution order, and the words "first" and "second" do not necessarily mean different.

[0089] At the same time, in the embodiments of this 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 this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner to facilitate understanding.

[0090] The following is a brief introduction to the relevant terms involved in the embodiments of this application.

[0091] File storage service (FSS): This service stores data as files on file storage service nodes. FSS nodes provide a multi-level tree-like directory storage method based on the file system. They offer operations that conform to file semantics (i.e., file services), such as reading, writing, creating, deleting, opening, closing, and renaming files.

[0092] Object Storage Service (OBS): Object storage services store data as objects in object storage nodes. Object storage nodes provide a flat storage method based on buckets and objects. All objects in a bucket are placed at the same logical level, eliminating the multi-level tree-like directory structure found in file storage service nodes. Object storage nodes provide operations that conform to object semantics (i.e., object services), such as uploading and downloading objects, listing every object in a bucket, copying objects, moving objects, deleting objects, and deleting every object in a bucket.

[0093] Bucket: Also known as a bucket, it is a container used to store objects on an object storage node. Each bucket has its own attributes, such as storage category, access permissions, and region.

[0094] Object: The basic unit of data storage on an object storage node. An object is a collection of file data and its associated attribute information (also known as metadata). An object can include a key, metadata, and data.

[0095] The key is the name of the object, also known as the object name or object name. Each object in a bucket has a unique key. Metadata is the descriptive information of the object, which includes user metadata and system metadata. User metadata is specified when the user uploads the object and is 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 file data, also known as user data.

[0096] A file system is software within an operating system that manages and stores file information. It includes a basic file system and several file subsystems, which users can remove and install as needed. The file system provides a target tree that includes a root directory, subdirectories, and the files within those subdirectories. A root directory or subdirectory can contain files and subdirectories at the next level.

[0097] User space and kernel space: The virtual memory of an electronic device can be divided into user space and kernel space. User space is used to run user applications, while kernel space is used to run the operating system kernel. User space and kernel space are isolated from each other. Kernel space can execute arbitrary commands and access all operating system resources, while user space can only perform simple calculations and cannot directly access operating system resources. This requires access through kernel space.

[0098] Filesystem 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.

[0099] File extended attributes: are file constants provided by the file system, used to indicate certain properties of files or directories in the file system.

[0100] 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.

[0101] 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.

[0102] 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.

[0103] Transparent transmission refers to the transmission of data packets from the source address to the destination address without any processing of the data content. This means that the service content in the data packet is not changed, and its original format and instructions are maintained, ensuring the integrity and accuracy of the data transmission.

[0104] 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.

[0105] The following is an illustrative introduction to the application scenarios of the embodiments of the present application.

[0106] With the development of storage technology, object storage has been proposed to facilitate the storage of unstructured data such as movies, office documents, and images. Object storage uses a flat address space to store data, without the hierarchical structure of directories and files. Therefore, a single object storage service node can store a large amount of data.

[0107] To ensure compatibility with file applications, object storage systems (including object storage service nodes and file storage clients) provide object-based file services, essentially building file services on top of object storage. However, because the file semantics used by file extended attributes differ significantly from those of object storage, the file services provided by object storage systems cannot manage file extended attributes.

[0108] 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 (e.g., 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 that the target file extension attribute of the target node be set to a target state. The file storage client then sends the attribute setting request to the object storage service node to request that the object storage service node set the target file extension attribute of the target node to the target state.

[0109] Because 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. In this way, 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 solution of this 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, thereby achieving the provision of more complete file services, so that object storage can be better compatible with file applications.

[0110] The following is an exemplary introduction to the system architecture of the embodiment of the present application.

[0111] The file extension attribute management method provided in the embodiments 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), which can communicate with the object storage service node. The object storage system can provide file services and object services.

[0112] In an embodiment of the present application, the object storage service node may include at least one computing device.

[0113] 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.

[0114] Optionally, 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 single physical server, or two or more physical servers sharing different responsibilities, collaborating to implement the various server functions. For example, the server may be a blade server, a high-density server, a rack server, or a tower server. The terminal device may include an ultra-mobile personal computer (UMPC), a laptop, a netbook, a desktop computer, an all-in-one computer, etc.

[0115] 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.

[0116] In an embodiment of the present application, the object storage service node may further include a storage device, which may include one or more storage buckets, and the one or more storage buckets are used to store objects.

[0117] Exemplary storage devices may include hard disk drives (HDDs), solid state disks (SSDs), and the like. It should be noted that the form of the storage devices in the embodiments of the present application is not limited, and the above description is merely exemplary. Furthermore, the number of storage devices in the embodiments of the present application is also not limited.

[0118] In the embodiment of the present application, the storage device can be provided on the computing device, or can be provided independently of the computing device. When the storage device and the computing device are provided independently of each other, the storage device and the computing device can communicate.

[0119] In an 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 buckets.

[0120] 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 can be simulated as a folder on the OBS management console. For example, the object name of object 0 is abc.jpg. If object 0 needs to be simulated as a file in a folder, the object identifier of object 0 can be modified to test / abc.jpg. In this case, "test" is the simulated folder. When users list objects in a bucket through the object interface, the object identifiers obtained are separated by " / ". If there is content after the last " / ", it indicates a file, that is, the object to which the object identifier belongs indicates a file. If there is no content after the last " / ", it indicates 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.

[0121] 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.

[0122] In the embodiments of the present application, an object storage service node can map objects in a bucket to nodes in a directory tree using a hierarchical namespace. A node can be a file or a directory. An object that includes 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. Based on this, after the user enables the file service feature for the object storage service node, the object storage service node can provide file services.

[0123] In an embodiment of the present application, a file storage client can be installed on a user's electronic device, which can communicate with an object storage service node via the file storage client. A user can rent a cloud storage service, such as a storage bucket, from a cloud service provider via the file storage client, and then store data in the bucket via the file storage client.

[0124] 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.

[0125] 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).

[0126] 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 computer, 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 work together to realize the various functions of the server. For example, the server may be a blade server, a high-density server, a rack server or a tower server, etc.

[0127] 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.

[0128] As shown in FIG1 , it is a schematic diagram of a system architecture provided in an embodiment of the present application.

[0129] 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.

[0130] Cloud service providers provide cloud services (such as object services, file services, and file extension attribute management services) 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 their electronic devices.

[0131] Exemplarily, the storage device of the object storage service node may include buckets 1, ..., and N, where N is a positive integer greater than 1. After a user logs in to a file storage client via an electronic device, they can rent a storage bucket (e.g., bucket 1) from a cloud service provider. After renting bucket 1, the file storage client can send the data to be stored (e.g., data 0-data 4) to the object storage service node. After receiving data 0-data 4, the object storage service node stores data 0-data 4 in bucket 1 in the form of objects (i.e., objects 0-object 4).

[0132] It should be noted that the embodiment of the present application does 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.

[0133] As shown in FIG2 , it is a schematic diagram of another system architecture provided in an embodiment of the present application.

[0134] 2 , a Windows operating system and a file storage client are installed on the electronic device. 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.

[0135] 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.

[0136] 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).

[0137] In the embodiments 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. The target tree provided by the local file system may include a root directory, subdirectories, and files under the subdirectories. A root directory or subdirectory may include files and subdirectories at the next level.

[0138] Exemplarily, the directory tree of the local file system may include multiple nodes, each of the multiple nodes may be a file or a directory, and the file or directory is stored in a storage bucket of the object storage service node.

[0139] 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.

[0140] 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 in 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 further described later.

[0141] Exemplarily, the interface provided by the object storage service node may be a representational state transfer (REST) ​​application programming interface (API).

[0142] In an embodiment of the present application, the Windows operating system includes a FUSE module, which can be used to interact with a 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.

[0143] 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 in the process of running the FUSE module, or the electronic device performing a certain operation through the FUSE module, which will not be further described later.

[0144] 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.

[0145] In an 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 a directory tree, canceling file extension attributes that have been configured for nodes on a directory, etc.

[0146] In an 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.

[0147] For example, if the encryption and compression attributes of a file are configured, the file storage client can perform encryption and compression operations, such as those related to Windows semantics, on the file and obtain encrypted and compressed files, thereby providing storage data independent of Windows semantics to the object storage service node. The file storage client then transmits the encrypted and compressed files to the object storage service node. Upon receiving the encrypted and compressed files, the object storage service node can directly store them without regard to the Windows semantics of the stored data.

[0148] For example, after a file storage client obtains an encrypted or compressed file from an object storage service node, it can decrypt the encrypted file or decompress the compressed file to obtain the decrypted or decompressed file. The file storage client can then transfer the decrypted or decompressed file to the operating system, which then displays it to the user or transfers it to an application for use.

[0149] Based on the above, the file storage client can manage and logically implement the specific meanings represented by file extension attributes.

[0150] In an 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 extended attributes.

[0151] Exemplarily, the file storage client may map the management instructions of the file extended attributes (eg, attribute setting instructions) into attribute setting requests through the attribute management module, and send the attribute setting requests to the object storage service node to request management of the file extended attributes.

[0152] In an embodiment of the present application, the file storage client may include an attribute implementation module, which may be used to implement file extended attributes. For example, the file storage client may implement a file's read-only attribute, encryption attribute, compression attribute, etc. through the attribute implementation module.

[0153] 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.

[0154] In an embodiment of the present application, the object storage service node is configured with a parsing module, which can be used to parse 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 attributes of the target node to the target state, etc.

[0155] It should be noted that in the embodiment of the present application, an operation performed by the parsing module can be considered as an operation performed by the object storage service node in the process of running the parsing module, or the object storage service node performs a certain operation through the parsing module, which will not be repeated later.

[0156] 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, recall data access attribute, etc.

[0157] 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 the file extension attributes of objects stored on the object storage service node.

[0158] 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 extended attributes of objects stored on the object storage service node can be managed through the management interface.

[0159] In an embodiment of the present application, the object storage service node also stores object metadata. The object storage service node can parse an attribute setting request using a parsing module to determine a method for managing file extended attributes, such as generating a target field or modifying the value of a target string to indicate the status of the file extended attributes. The target field and target string can be stored in the object metadata to facilitate persistent storage of file extended attributes.

[0160] 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.

[0161] For ease of understanding, the following is an exemplary introduction to the file extension attribute management method provided in the embodiment of the present application in combination with the above system architecture and accompanying drawings.

[0162] The embodiment of this application will be divided into three parts to provide an exemplary introduction to the solution of the file extension attribute management method.

[0163] 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 configured for a target node, etc.

[0164] 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.

[0165] 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.

[0166] The following describes the first part of the embodiment of the present application in conjunction with Figures 3 to 7.

[0167] Fig. 3 is a flow chart showing 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 to 303.

[0168] It should be noted that the "step" in the embodiment of the present application can be abbreviated as "S" and will not be repeated later.

[0169] In an embodiment of the present application, an object storage service node stores multiple objects. Exemplarily, the multiple objects may include a target object, which may be any one of the multiple objects. An object may be used to indicate a file or 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.

[0170] 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.

[0171] It should be noted that when a node is a file, the node can also be called a file node. When a node is a directory, the node can also be called a directory node.

[0172] It can be understood that an object indicating a file will be mapped to a file node on the directory tree, and an object indicating a folder will be mapped to a directory node on the directory tree.

[0173] In an embodiment of the present application, an object storage service node stores mappings between multiple objects and multiple nodes. There is a one-to-one correspondence between the multiple objects and the multiple nodes, that is, there is a mapping relationship between an object and the node to which it is mapped. For example, there is a mapping relationship between a target node and a target object.

[0174] The following describes the relationship between nodes and objects, taking the target element stored on an object storage service node as an example.

[0175] Exemplarily, an object storage service node stores a target element in a bucket as an object. The target element can be user data or a simulated folder. When a user accesses a target element using an object file storage client, the target data can be referred to as a target object. When a user accesses a target element using a file system file storage client, the target data is referred to as a target node. A target node and a target object that have a mapping relationship point to the same element (i.e., the target element).

[0176] Hereinafter, the file extended attribute management method provided by the embodiment of the present application is exemplarily described by taking the target object and the target node mapped to the target object as an example, wherein the identifier of the target object and the identifier of the target node are both target identifiers.

[0177] Exemplarily, the target identifier may be represented in the form of a Uniform Resource Identifier (URI), a character string, etc., which is not limited in the embodiments of the present application.

[0178] 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 the FUSE module, and the file storage client can interact with the object storage service node through the interface provided by the object storage service node.

[0179] Step 301: The file storage client receives an attribute setting instruction, which instructs setting the extended attribute of the target file of the target node to a target state, wherein the target state includes a configured state or an unconfigured state.

[0180] 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.

[0181] In the embodiments of the present application, the attribute setting instruction indicates a target node. Exemplarily, the attribute setting instruction may include the identifier of the target node, the path of the target node, and the like, thereby indicating the target node. This helps prevent the file storage client from setting file extended attributes on non-target nodes, thereby helping to ensure the accuracy of subsequent operations performed by the file storage client.

[0182] In an embodiment of the present application, the attribute setting instruction indicates the target file's extended attributes. Exemplarily, the attribute setting instruction may include an identifier of the target file's extended attributes, a name of the target file's extended attributes, and the like, thereby indicating the target file's extended attributes. This helps prevent 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.

[0183] Optionally, the target file extended attributes may include: read-only attribute, hidden attribute, system attribute, directory attribute, archive attribute, device driver installation attribute, normal attribute, temporary attribute, sparse file extended 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.

[0184] 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.

[0185] Optionally, the target file extended attribute refers to a class of attributes, i.e., each file extended attribute indicated by the attribute setting instruction. Since the attribute setting instruction can simultaneously indicate the setting of one or more file extended attributes, the target file extended attribute can also refer to one or more file extended attributes. In other words, one or more file extended attributes can all be referred to as target file extended attributes.

[0186] For example, the attribute setting instruction may instruct to set a file extended attribute such as a read-only attribute, a hidden attribute, an encrypted attribute, or a compressed attribute. Based on this, the target file extended attributes may include the read-only attribute, the hidden attribute, the encrypted attribute, the compressed attribute, etc. In other words, the read-only attribute, the hidden attribute, the encrypted attribute, the compressed attribute, etc. may all be referred to as the target file extended attributes.

[0187] In this embodiment, multiple file extension attributes can be indicated by setting the attribute setting instruction, that is, multiple file extension attributes can be 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.

[0188] In the embodiment of the present application, the attribute setting instruction indicates the target state, which helps to avoid the file storage client setting a non-target state, thereby helping to ensure the accuracy of subsequent operations performed by the file storage client.

[0189] In an embodiment of the present application, when the target file extension attributes include multiple file extension attributes, the target state of each of the multiple file extension attributes can be different, or they can be the same. In other words, the target states of different target file extension attributes can be the same, or they can be different. In this way, even file extension attributes with different target states can be set using the same instruction, thereby helping to improve the efficiency of setting file extension attributes.

[0190] Exemplarily, the attribute setting instruction indicates target file extended attributes such as a read-only attribute, a hidden attribute, an encrypted attribute, and a compressed attribute. Based on this, the attribute setting instruction further instructs setting the read-only attribute to a configured state, the hidden attribute to an unconfigured state, the encrypted attribute to a configured state, and the compressed 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 encrypted attribute is a configured state, and the target state of the compressed attribute is a configured state.

[0191] In the embodiment of the present application, the attribute setting instruction includes multiple situations. The following is an exemplary introduction through situation 1 to situation 2.

[0192] Case 1: The property setting instruction is a user-triggered instruction.

[0193] In one example, the user may directly instruct to set the target file extended attribute of the target node to the target state.

[0194] For example, as shown in (a) of FIG4 , the electronic device displays a property interface of the target node, which indicates a read-only property and a hidden property. The box to the left of the read-only property is not selected, so the current state of the read-only property is an unconfigured state, and the box to the left of the hidden property is selected, so the current state of the hidden property is a configured state.

[0195] Example 1, as shown in (b) in Figure 4, when the user selects the box to the left 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 an attribute setting instruction to the file storage client, which instructs the read-only attribute (i.e., the target file extended attribute) to be set to the configured state (i.e., the target state).

[0196] Example 2, as shown in (c) in Figure 4, when the user unchecks the box to the left 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 an attribute setting instruction to the file storage client, which instructs the hidden attribute (i.e., the target file extended attribute) to be set to an unconfigured state (i.e., the target state).

[0197] Exemplarily, as shown in (d) in FIG4 , when the 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 the electronic device, the electronic device responds to the user's triggering operation and sends an attribute setting instruction to the file storage client, wherein the attribute setting instruction instructs the read-only attribute to be set to a configured state and the hidden attribute to be set to an unconfigured state.

[0198] In another example, the user instructs to perform a first operation on the target node, thereby instructing to set the target file extended attribute of the target node to a target state, wherein the first operation is related to the target file extended attribute.

[0199] In Example 3, a user instructs an electronic device to encrypt a target node. In response to the user's triggering operation, the electronic device sends an encryption instruction (i.e., an attribute setting instruction) to the file storage client. Upon receiving the encryption instruction, the file storage client performs the encryption operation on the target node and sets the encryption attributes of the target node (i.e., the target file extended attributes) to the configured state (i.e., the target state). In other words, the encryption instruction not only instructs the target node to be encrypted, but also instructs the target node to be set to the configured state.

[0200] In Example 4, a user instructs an electronic device to compress a target node. In response to the user's triggering operation, the electronic device sends a compression instruction (i.e., an attribute setting instruction) to the file storage client. Upon 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 extended 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.

[0201] In an embodiment of the present application, after the user triggers the attribute setting instruction through the electronic device, the Windows operating system running on the electronic device sends the attribute setting instruction to the file storage client to instruct the file storage client to set the target file extended attribute of the target node to the target state.

[0202] 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 in 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.

[0203] In this embodiment, the attribute setting instruction may be a user-triggered instruction, so that the user can set file extension attributes for different nodes, thereby helping to improve the user experience.

[0204] Case 2: The property setting instruction is a instruction triggered by the target application.

[0205] 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.

[0206] It should be noted that in the embodiment 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.

[0207] 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 target application, and the above description is only for example.

[0208] It should be noted that for other explanations of Case 2, please refer to the explanation of Case 1 and will not be repeated here.

[0209] In this embodiment, the attribute setting instruction can be set as an instruction triggered for the target application, thereby providing the target application with the 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.

[0210] The following is an exemplary introduction to the manner in which the Windows operating system sends an attribute setting instruction to a file storage client.

[0211] 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.

[0212] 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.

[0213] 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 the setting of file extended attributes. On this basis, the Windows operating system can send an attribute setting instruction to the file storage client through the first interface.

[0214] 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.

[0215] 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.

[0216] It is 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.

[0217] 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.

[0218] In this embodiment, by configuring the first interface for the file storage client as an interface for setting file extended attributes, it helps to improve the accuracy of setting file extended attributes, thereby helping to better provide file extended attribute management services.

[0219] 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 indicates the format of the property setting request, and the property setting request is used to request that the extended attributes of the target file of the target node be set to the target state.

[0220] 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.

[0221] In the embodiment of the present application, the target interface provided by the object storage service node can be a REST API interface. In other words, the REST API interface can carry attribute setting requests indicating file extended attribute semantics (i.e., target node, target file extended attributes, and target status, etc.).

[0222] In the embodiment of the present application, 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 defined by the REST API interface.

[0223] Exemplarily, the message content defined based on the REST API interface can be recorded in an XML Body. That is, the message content of the property setting request 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 the XML Body.

[0224] 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.

[0225] Exemplarily, the operation commands defined based on the REST API interface may include GET, PUT, HEAD, DELETE, POST, etc.

[0226] The format of the Xml Body and the format of the URL can be found in the description of the relevant technologies and will not be repeated here.

[0227] 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 helping the object storage service node to perform file extended attribute management operations accurately.

[0228] 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.

[0229] In the embodiment of the present application, the attribute setting request may include a first field, wherein the first field is used to indicate the file extended attribute.

[0230] For example, 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.

[0231] For example, 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 extended attributes to the request address, it is possible to indicate that the attribute setting request is a request related to the file extended attributes, thereby helping to improve the accuracy of file extended attribute management.

[0232] For example, 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 file extended attributes 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 extended attribute management.

[0233] In an embodiment of the present application, a property setting request is implemented by indicating a target node, a target file extended attribute, and a target state, thereby requesting that the target file extended attribute of the target node be set to a target state. The property setting request indicating the target node, the target file extended attribute, and the target state can be implemented in a variety of ways. Hereinafter, Ways 1 and 2 are used as examples to illustrate.

[0234] Mode 1: The attribute setting request indicates the target file extended attributes through the message content and indicates the target status through the operation command.

[0235] Exemplarily, the message content of the attribute setting request may include a second field, and the second field is used to indicate the extended attribute of the target file.

[0236] Optionally, the second field may include a name of the target file extended attribute and a value of the target file extended attribute, wherein the value of the target file extended attribute is a value of the target file extended attribute in the Windows operating system.

[0237] In this embodiment, by setting the value of the target file extended attribute to the value of the target file extended attribute in the Windows operating system, the value of the target file extended attribute in the semantics of the object storage is the same as the value in the Windows operating system, which helps to improve the convenience and accuracy of the file storage client when performing semantic conversion, and further helps to improve the convenience and accuracy of file extended attribute management.

[0238] For example, when the target file extended attribute includes a read-only attribute, the second field may include " <fileattributereadonly> 0x00000001< / fileattributereadonly>"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".

[0239] For example, 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 can be as follows:

[0240] <winmode>

[0241] <fileattributereadonly> 0x00000001< / fileattributereadonly>

[0242] <fileattributehidden> 0x00000002< / fileattributehidden>

[0243] <fileattributesystem> 0x00000004< / fileattributesystem>

[0244] <fileattributedirectory> 0x00000010< / fileattributedirectory>

[0245] <fileattributearchive> 0x00000020< / fileattributearchive>

[0246] <fileattributedevice> 0x00000040< / fileattributedevice>

[0247] <fileattributenormal> 0x00000080< / fileattributenormal>

[0248] <fileattributetemporary> 0x00000100< / fileattributetemporary>

[0249] <fileattributesparsefile> 0x00000200< / fileattributesparsefile>

[0250] <fileattributereparsepoint> 0x00000400< / fileattributereparsepoint>

[0251] <fileattributecompressed> 0x00000800< / fileattributecompressed>

[0252] <fileattributeoffline> 0x00001000< / fileattributeoffline>

[0253] <fileattributenotcontentindexed> 0x00002000< / fileattributenotcontentindexed>

[0254] <fileattributeencrypted> 0x00004000< / fileattributeencrypted>

[0255] <fileattributeintegritystream> 0x00008000< / fileattributeintegritystream>

[0256] <fileattributevirtual> 0x00010000< / fileattributevirtual>

[0257] <fileattributenoscrubdata> 0x00020000< / fileattributenoscrubdata>

[0258] <fileattributeea> 0x00040000< / fileattributeea>

[0259] <fileattributepinned> 0x00080000< / fileattributepinned>

[0260] <fileattributeunpinned> 0x00100000< / fileattributeunpinned>

[0261] <fileattributerecallonopen> 0x00200000< / fileattributerecallonopen>

[0262] <fileattributerecallondataaccess> 0x00400000< / fileattributerecallondataaccess>

[0263] < / winmode>

[0264] Since the binary value of "0x00000001" is 1, the binary value of "0x00000002" is 10, the binary value of "0x00000004" is 100, the binary value of "0x00000010" is 10000, ..., the binary value of "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 so 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.

[0265] It should be noted that the number of bits in the string representing the file extended attribute is the same as the number of bits in the binary value of the file extended attribute. For example, the number of bits in the binary value of the read-only attribute is 1, so the first bit of the string indicates the read-only attribute.

[0266] In the embodiment of the present application, the property setting request can indicate different target states through different operation commands.

[0267] For example, a property setting request can indicate a configured state via PUT and an unconfigured state via DELETE. Therefore, if the target state is the configured state, the property setting request includes a PUT operation command, and the property setting request may include "PUT / filesystem / dir / file?winmode." If the target state is the unconfigured state, the property setting request includes a DELETE operation command, and the property setting request may include "DELETE / filesystem / dir / file?winmode."

[0268] 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.

[0269] In the embodiment of the present application, the property setting request may indicate the target node through the request address.

[0270] Exemplarily, the request address may be filesystem / dir / file?winmode, where "filesystem / dir / file" is used to indicate the target node.

[0271] 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 fully utilize 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.

[0272] Mode 2: The attribute setting request indicates the target file extended attributes and target status through the message content.

[0273] 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 extended attribute, and the third field is used to indicate the target status.

[0274] It should be noted that for the relevant description of the second field, please refer to the description in method 1 and will not be repeated here.

[0275] For example, 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, to set the target file extension attribute to the configured state.

[0276] For example, when the target state is unconfigured, 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 canceling / deleting the target file extended attributes, that is, setting the target file extended attributes to the unconfigured state.

[0277] For example, the third field can be stored in " <winmode> "and"< / winmode> " In this way, the third field can be used to indicate the setting type of the file extended attribute, thereby helping to improve the accuracy of the object storage service node in identifying content.

[0278] 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.

[0279] In an embodiment of the present application, when different fields in the message content indicate the target file's extended attributes and target status, the request address of the attribute setting request is used to indicate the target node. For example, the attribute setting request may include "PUT / filesystem / dir / file?winmode," where "filesystem / dir / file" indicates the target node.

[0280] In this implementation, different fields in the message content indicate the target file's extended attributes and target status. This allows the object storage service node to determine the requested attribute setting request by reading the message content, thereby improving the efficiency of processing attribute setting requests. Furthermore, this increases the diversity of ways in which attribute setting requests can indicate the target file's extended attributes and target status.

[0281] Based on the above, if the target states of 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 states using method 1, that is, indicating the target states of the multiple file extension attributes through different operation commands. Alternatively, the attribute setting request can also indicate the target states using method 2, that is, indicating the target states of the multiple file extension attributes through the third field in the message content.

[0282] 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 the configured state, and the target state of another part of the file extension attributes is the 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.

[0283] 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.

[0284] 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.

[0285] 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.

[0286] In the above embodiment, after the file storage client receives the attribute setting instruction, it 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.

[0287] When it is necessary to manage file extended 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, thereby converting the semantics of the file extended 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. In this way, the object storage service node can accurately identify the content requested by the attribute setting request, and thus manage the file extended 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 solution of the present application, so that the semantics of object storage can be compatible with file extended attributes, thereby providing file extended attribute management services on the basis of providing file services, thereby achieving the provision of more complete file services, and making object storage more compatible with file applications.

[0288] Figure 6 is a schematic diagram of setting file extension attributes according to an embodiment of the present application. The following describes the process of setting file extension attributes in conjunction with Figure 6.

[0289] 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 invokes a first interface of the file storage client through the FUSE module and sends an attribute setting instruction to the file storage client, instructing the file storage client to manage the extended file attributes of the target node, such as setting the extended attributes of the target file 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."

[0290] 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. The file storage client then sends the attribute setting request to the object storage file storage client (OSC) of the object storage service node to request management of the file extended attributes of the target node, such as setting the target file extended attributes of the target node to the target state.

[0291] 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 further described later.

[0292] 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 isolate 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.

[0293] In addition, when the file storage client generates a request that can be recognized by the object storage service node, it fully utilizes 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., which improves the accuracy and reliability of the object storage service node's recognition of the request.

[0294] Fig. 7 is a flow chart showing 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 to 703.

[0295] Step 701: The object storage service node receives a property setting request sent by the file storage client.

[0296] 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.

[0297] Step 702: The object storage service node parses the property setting request through the target interface and obtains the content requested by the property setting request.

[0298] In an embodiment of the present application, the object storage service node may parse the attribute setting request to determine the content requested by the attribute setting request, thereby managing file extended attributes based on the content requested by the attribute setting request.

[0299] Exemplarily, the object storage service node may parse the property setting request through a parsing module.

[0300] Illustratively, 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 extended attributes.

[0301] Example 1, in combination with method 1 in step 302, provides an exemplary introduction to the implementation process of step 702.

[0302] In an 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.

[0303] Exemplarily, the object storage service node may determine the field in the message content indicating the extended attribute of the target file through the first field in the message content, such as: <winmode> "and"< / winmode> "between" <fileattributereadonly> 0x00000001< / fileattributereadonly> ", etc., thereby determining the extended attributes of the target file to be managed.

[0304] In an 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 it to a configured state or setting it to an unconfigured state.

[0305] For example, 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.

[0306] Example 2, in combination with method 2 in step 302, provides an exemplary introduction to the implementation process of step 702.

[0307] In an embodiment of the present application, the object storage service node can determine the management method of the file extended attributes by parsing the message content of the attribute setting request.

[0308] For example, the object storage service node may determine the management method of the file extension attribute through the third field in the message content, such as: <winmode> "and"< / winmode> "The third field between the target file and the target file is used to determine the state to be set (i.e. the target state) of the extended attribute of the target file. 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 extended attribute is the configured state, if the message content includes " <type> delete< / type>", that is, the third field is "delete", then the management mode is set to the unconfigured state, that is, the state to be set of the extended attribute of the target file is the unconfigured state.

[0309] It should be noted that for other relevant instructions of Example 2, please refer to the instructions of Example 1 and will not be repeated here.

[0310] Optionally, the file extended attribute management method may further include the following S1-S4.

[0311] S1: The object storage service node determines the value of the target file's extended attribute by parsing the attribute setting request.

[0312] For example, the message content " <fileattributereadonly> 0x00000001< / fileattributereadonly> " is used to indicate the value of a read-only attribute, "Readonly" is used to indicate a read-only attribute, and "0x00000001" is used to indicate a value.

[0313] S2: The object storage service node determines whether the value of the target file's extended attribute is the same as the target value.

[0314] The target value is the value of the target file's extended attribute in the Windows operating system.

[0315] In an embodiment of the present application, the object storage service node stores a target value for the target file's extended attribute, where the target value is the value of the target file's extended attribute in the Windows operating system. After parsing the target file's extended attribute value from the message content, the object storage service node compares the target file's extended attribute value with the target value. If they are identical, the target file's extended attribute value is considered to have passed verification. Conversely, if they are different, the target file's extended attribute value is considered to have failed verification.

[0316] 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> , indicating that the value of the target file's extended attribute is the same as the target value of the target file's extended attribute. If the value of the read-only attribute is a non-target value, such as: <fileattributereadonly> 0x00000002< / fileattributereadonly> ", indicating that the value of the target file's extended attribute is different from the target value of the target file's extended attribute.

[0317] S3: If the value of the target file's extended attribute is the same as the target value, the object storage service node executes step 703.

[0318] 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. This helps to ensure the accuracy of the managed target file extended attribute.

[0319] 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.

[0320] In this embodiment, when the value of the target file extended attribute is different from the target value of the target file 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 extended attribute. This helps to correct the error of the file storage client in a timely manner.

[0321] 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 of the attribute setting request.

[0322] In an 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.

[0323] There are multiple implementation methods for setting the target file extended attribute of the target node to the target state. The following is an exemplary description using Method A and Method B.

[0324] Method A: The object storage service node uses a string (e.g., a target string) to indicate the state of each file extension attribute on the target node. Different bits of the target string indicate different file extension attributes. Based on this, the object storage service node can set the target file extension attribute on the target node to the target state by modifying the target bit value of the target string.

[0325] It should be noted that based on the setting method of method A, when modifying each file extension attribute of the target node 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.

[0326] In an embodiment of the present application, when the target state is the configured state, the object storage service node can set the target bit of the target string to the first value; the target bit is used to indicate the target file extended attribute, and the first value is used to indicate the configured state.

[0327] Exemplarily, the target string is a 23-bit binary string, where bit 1 indicates the state of the read-only attribute. If the attribute setting request requests setting the read-only attribute to the configured state, the object storage service node may set the value of bit 1 to 1 (i.e., the first value) to indicate that the read-only attribute is in the configured state.

[0328] 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.

[0329] Exemplarily, the target string is a 23-bit binary string, where bit 2 indicates the state of the hidden attribute. If the attribute setting request requests setting the hidden attribute to an unconfigured state, the object storage service node may set bit 2 to 0 (i.e., the second value) to indicate that the hidden attribute is in an unconfigured state.

[0330] In this embodiment, multiple file extension attributes of the target node are indicated by a character string. This 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.

[0331] In an 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. This helps improve the convenience and accuracy of determining the target string when updating the file extension attributes of the target node.

[0332] Method B: The object storage service node uses multiple fields to indicate multiple file extension attributes of the target node. Each field indicates a single file extension attribute, such as the target field. Based on this, the object storage service node can set the target file extension attributes of the target node to the target state by creating or deleting the target field.

[0333] In an embodiment of the present application, when the target state is in the configured state, the object storage service node may generate and store a target field. The target field is used to indicate that the target file extended attributes have been configured. In other words, when the object storage service node stores the target field, it indicates that the target file extended attributes have been configured on the target node, i.e., the target file extended attributes of the target node are in the configured state.

[0334] 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 this, the target field generated by the object storage service node can be x-obs-meta-winmode:0x0000001.

[0335] It should be noted that, based on the setting method B, when the state of the target file extended attribute is set to configured, if the target file extended attribute is set for the first time, it can be considered as adding the target file extended attribute to the target node. If the target file extended attribute is not set for the first time, it can be considered as updating the state of the target file extended attribute of the target node.

[0336] Illustratively, 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.

[0337] Exemplarily, the object storage service node can 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. In this way, 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.

[0338] Since the identifier of the target node is the same as the identifier of the target object, 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.

[0339] In an embodiment of the present application, if the target state is unconfigured, the object storage service node may delete the target field of the target node. In other words, if the object storage service node does not store the target field, it indicates that the target node is not configured with the target file extended attributes, that is, the target file extended attributes of the target node are in the unconfigured state.

[0340] It should be noted that, based on the setting 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.

[0341] For example, if 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.

[0342] In this embodiment, multiple file extension attributes of the target node are indicated by multiple fields. This helps to improve the independence of different file extension attributes, thereby helping to improve the accuracy of the indicated file extension attributes.

[0343] 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 attribute.

[0344] Because the attribute setting request is determined based on the interface provided by the object storage service node, the attribute setting request indicates the requested content through the semantics of the object storage. In this way, the object storage service node can accurately identify the requested content of the attribute setting request, thereby ensuring the management of file extended attributes. Therefore, the object storage system can improve the semantics of object storage through the solution of this application, making the semantics of object storage compatible with file extended attributes, thereby providing file extended attribute management services on the basis of providing file services, and further providing more complete file services, making object storage more compatible with file applications.

[0345] Based on the above embodiment, 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.

[0346] 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.

[0347] 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.

[0348] Fig. 8 is a flow chart showing 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 to 803.

[0349] Step 801: The file storage client receives an attribute acquisition instruction, where the attribute acquisition instruction is used to instruct the acquisition of file extended attributes of a target node.

[0350] 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 extended attributes of non-target nodes, thereby helping to ensure the accuracy of subsequent operations performed by the file storage client.

[0351] In an embodiment of the present application, the attribute acquisition instruction can be an instruction triggered by the user, such as: when the user views the file extension attributes of the target node through an electronic device, the operating system responds to the user's trigger 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.

[0352] Alternatively, the attribute acquisition instruction can be an instruction triggered by the target application, such as: in 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.

[0353] The following is an exemplary introduction to the manner in which the operating system sends an attribute acquisition instruction to the file storage client.

[0354] In an embodiment of the present application, the Windows operating system can send an attribute acquisition instruction to the file storage client through the FUSE module.

[0355] Exemplarily, after the user triggers the attribute acquisition instruction, or the target application sends a first query instruction to Windows, the Windows operating system sends the attribute setting instruction to the FUSE module, so that the FUSE module sends the attribute setting instruction to the file storage client.

[0356] 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 file extended attributes. On this basis, the Windows operating system can send an attribute acquisition instruction to the file storage client by calling the second interface.

[0357] 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.

[0358] Exemplarily, the second interface may be win_get_file_attribute, where "set" is used to represent acquisition.

[0359] 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 extended attributes of the node.

[0360] It should be noted that the embodiment of the present application does not limit the manner in which Windows sends the attribute acquisition instruction to the file storage client. The above is merely an exemplary description.

[0361] In this embodiment, by configuring the second interface for the file storage client as an interface for querying file extended attributes, it helps to improve the query accuracy of file extended attributes, thereby helping to better provide file extended attribute management services.

[0362] It should be noted that for other relevant descriptions of step 801, please refer to the description of step 301, which will not be repeated here.

[0363] Step 802: The file storage client obtains the file extended attributes of the target node based on the attribute acquisition instruction.

[0364] In an embodiment of the present application, after receiving the attribute acquisition instruction, the file storage client obtains the file extended attributes of the target node according to the node identifier indicated by the attribute acquisition instruction, that is, the identifier of the target node.

[0365] Exemplarily, the file storage client may obtain the file extended attributes of the target node through the attribute management module.

[0366] There are multiple implementation methods for obtaining the file extension attributes of the target node. The following uses methods a and b for exemplary description.

[0367] Method a: The file storage client may obtain the file extended attributes of the target node from the storage medium of the electronic device.

[0368] In an 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 in a directory tree. Based on this, after receiving an 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.

[0369] 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 description is only exemplary.

[0370] In this manner, by acquiring the file extension attributes of the target node from the local storage medium of the electronic device, the efficiency of acquiring the file extension attributes is improved.

[0371] Method b: The file storage client can obtain the file extended attributes of the target node from the object storage service node.

[0372] In this method, 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.

[0373] In Example 1, after receiving an attribute acquisition instruction, the file storage client can first obtain the target node's file extended attributes from the local storage medium of the electronic device. If this acquisition fails, the client then obtains the target node's file extended attributes from the object storage service node. This helps improve the efficiency of obtaining file extended attributes.

[0374] In Example 2, after receiving the attribute acquisition instruction, if the local storage medium of the electronic device stores the target node's file extended attributes, the file storage client determines whether the target node's file extended attributes in the local storage medium meet the target conditions. If so, the file storage client acquires the target node's file extended attributes from the local storage medium. If not, the file storage client acquires the target node's file extended attributes from the object storage service node. This helps ensure the accuracy of the acquired file extended attributes.

[0375] The target condition is satisfied when the value of the file extended attribute in the local storage medium is the same as the value of the file extended attribute in the Windows operating system. The target condition is not satisfied when the value of the file extended attribute in the local storage medium is different from the value of the file extended attribute in the Windows operating system.

[0376] It should be noted that for other relevant instructions of Example 2, please refer to the instructions of S1-S4 above, which will not be repeated here.

[0377] In Example 3, after receiving the attribute acquisition instruction, the file storage client can directly obtain the target node's file extended attributes from the object storage service node. That is, regardless of whether the target conditions are met, the file storage client obtains the target node's file extended attributes from the object storage service node. This helps ensure the accuracy of the acquired file extended attributes.

[0378] The following is an illustrative example of the implementation process of method b through S5-S7.

[0379] S5: The file storage client sends an attribute acquisition request to the object storage service node based on the attribute acquisition instruction.

[0380] The attribute acquisition request is used to request the acquisition of file extended attributes of the target node.

[0381] In an embodiment of the present application, the attribute acquisition request indicates a target node. Exemplarily, the attribute acquisition request may include an identifier of the target node, thereby helping to ensure the accuracy of the acquired file extended attributes. Furthermore, the attribute acquisition request also indicates the file extended attributes, thereby helping to ensure the accuracy of the acquired information.

[0382] In an embodiment of the present application, a file storage client can determine an attribute acquisition request through a target interface provided by an object storage service node. The attribute acquisition request can 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 a target node.

[0383] For example, the attribute acquisition request may be "HEAD / filesystem / dir / file?winmode." "?winmode" indicates that the attribute acquisition request is a request related to file extended attributes, "HEAD" is an operation command for instructing to obtain file extended attributes, and "filesystem / dir / file" indicates the target node.

[0384] Exemplarily, as shown in FIG9 , the file storage client may send a property acquisition request to the object storage service node through the target interface provided by the object storage service node.

[0385] It should be noted that for the description of attribute acquisition request, please refer to the description of attribute setting request, which will not be repeated here.

[0386] S6: Based on the received attribute acquisition request, the object storage service node returns the file extended attributes of the target node to the file storage client.

[0387] 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.

[0388] Example 1: In combination with 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 improve data transmission efficiency.

[0389] Example 2: In combination with method B in step 703 above, the object storage service node can return multiple fields of the target node to the file storage client. This improves the efficiency of the file storage client's processing after receiving the file extended attributes of the target node.

[0390] 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.

[0391] Exemplarily, the target node is configured with only read-only attributes and hidden attributes, where 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.

[0392] It should be noted that for other related descriptions of S6, reference can be made to the description of step 702, which will not be repeated here.

[0393] S7: The file storage client receives the file extended attributes of the target node sent by the object storage service node.

[0394] 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, it can obtain winmode: 0x00000001, winmode: 0x00000002, etc., and return the parsed fields to the operating system, that is, return winmode: 0x00000001 and winmode: 0x00000002 to the operating system.

[0395] 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.

[0396] 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 extended attributes of the target node separately through the attribute acquisition request, so that the object storage system can provide more complete file extended attribute management services.

[0397] Optionally, the file extended attribute management method may further include: the file storage client writing the file extended attributes of the target node obtained from the object storage service node into the storage medium of the electronic device.

[0398] 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 obtained directly from this storage medium, which helps to improve the efficiency of data acquisition.

[0399] Step 803: The file storage client returns the file extended attributes of the target node based on the attribute acquisition instruction.

[0400] In an embodiment of the present application, after the file storage client obtains the file extended attributes of the target node, it returns the file extended attributes of the target node to the sender of the attribute acquisition instruction, such as returning it to the operating system.

[0401] 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.

[0402] FIG10 is a schematic diagram of a method for obtaining file extension attributes according to an embodiment of the present application. The following describes an exemplary process for obtaining file extension attributes in conjunction with FIG10 .

[0403] Exemplarily, after a user triggers an attribute acquisition instruction or a target application sends a first query instruction to the Windows operating system, the Windows operating system invokes the second interface of the file storage client through the FUSE module and sends an attribute acquisition instruction to the file storage client, instructing the file storage client to query the extended attributes of the target node's files. Exemplarily, the second interface may be "sfc_win_get_attributes" and the attribute acquisition instruction may be "fuse_operations::win_get_attributes."

[0404] After receiving the attribute acquisition instruction, the file storage client can obtain the file extended attributes of the target node from the local storage medium of the electronic device. If the acquisition is successful, the file extended 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 extended attributes of the target node from the object storage service node. Based on this, the file storage client can write the file extended attributes of the target node obtained from the object storage node to the local storage medium of the electronic device and return the file extended attributes of the target node obtained from the object storage node to the Windows operating system.

[0405] It should be noted that for other descriptions of FIG10 , reference can be made to the description of FIG6 , which will not be repeated here.

[0406] In the embodiment of the present application, the file extension attribute management method may further include the following S8-S10.

[0407] S8: The file storage client receives a metadata acquisition instruction, where the metadata acquisition instruction is used to instruct the acquisition of metadata of the target node.

[0408] 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 extended attributes of the target node.

[0409] The following is an exemplary introduction to obtaining target metadata of a target node through two implementation methods.

[0410] In one implementation, the file storage client can 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.

[0411] 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 in the directory tree. Based on this, after receiving the metadata acquisition instruction, the file storage client can obtain the target metadata of the target node from the second storage medium.

[0412] It should be noted that for the relevant description of the second storage medium, reference can be made to the description of the first storage medium, which will not be repeated here.

[0413] Exemplarily, the second storage medium and the first storage medium can be different storage media on the electronic device. In this way, the node's file extension attributes or target metadata can be stored separately on different storage media, thereby facilitating data search. Alternatively, the second storage medium and the first storage medium can be the same storage medium on the electronic device, thus helping to avoid excessive storage medium usage.

[0414] In another implementation, the file storage client can 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.

[0415] In an embodiment of the present application, after receiving a metadata acquisition instruction, the file storage client may send a metadata acquisition request to the object storage service node. The metadata acquisition request is used to request metadata for the target node. For example, the metadata acquisition request may be "HEAD / filesystem / dir / file." After receiving the metadata acquisition request, the object storage service node obtains the target metadata of the target node based on the content requested in the metadata acquisition request and returns the target metadata of the target node to the file storage client.

[0416] Exemplarily, the target metadata of the target node may also include inode data and Dtree data, etc.

[0417] S10: The file storage client returns target metadata of the target node based on the metadata acquisition instruction.

[0418] It should be noted that for other related instructions of S8-S10, reference can be made to the instructions of the above step 802, which will not be repeated here.

[0419] 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 provide more complete file extension attribute management services.

[0420] FIG11 is a schematic diagram of a method for obtaining metadata provided in an embodiment of the present application. The following describes an exemplary process for obtaining metadata in conjunction with FIG11.

[0421] Exemplarily, after a user triggers a metadata retrieval instruction or a target application sends a second query instruction to the Windows operating system, the Windows operating system invokes a third interface of the file storage client through the FUSE module and sends a metadata retrieval instruction to the file storage client, instructing 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 retrieval instruction may be "fuse_operations::getattributes."

[0422] 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.

[0423] 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.

[0424] It should be noted that for other descriptions of FIG11 , reference can be made to the description of FIG6 , which will not be repeated here.

[0425] In the embodiment of the present application, the file extension attribute management method may further include the following S11-S13.

[0426] 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.

[0427] Here, listing a directory (ie, readdir directory) is to list at least one file / subdirectory under the directory when opening the directory, that is, to display at least one file / subdirectory under the directory to the user.

[0428] 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.

[0429] 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 extended attributes of at least one file / subdirectory under the target directory.

[0430] The at least one file under the target directory includes a file under a first-level directory of the target directory.

[0431] The following is an exemplary introduction to obtaining target metadata of a target directory through two implementation methods.

[0432] In one implementation, the file storage client can 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.

[0433] 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 in a directory tree, such as file extension attributes of files / subdirectories under the at least one directory. Based on this, upon receiving the directory listing instruction, the file storage client can obtain the target metadata of the target directory from the third storage medium.

[0434] It should be noted that for the relevant description of the third storage medium, reference can be made to the description of the first storage medium, which will not be repeated here.

[0435] Exemplarily, the third storage medium and the first storage medium / second storage medium can 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 can be stored separately through different storage media, thereby facilitating data search.

[0436] In another implementation, the file storage client can obtain the target metadata of the target directory from the object storage service node. This helps improve the accuracy of the obtained target metadata.

[0437] 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 for the target directory to be listed. 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.

[0438] S13: The file storage client returns target metadata of the target directory based on the directory listing instruction.

[0439] It should be noted that for other related descriptions of S11-S13, reference can be made to the description of step 802 above, which will not be repeated here.

[0440] In the above embodiment, after receiving the directory listing instruction, the file storage client obtains and returns the target metadata of the target directory, which includes the file extension attributes of at least one file / subdirectory under the target directory, thereby providing more comprehensive metadata when listing the directory, and further helping the object storage system to provide more complete file extension attribute management services.

[0441] FIG12 is a schematic diagram of a directory listing provided by an embodiment of the present application.

[0442] Exemplarily, after a user triggers a directory enumeration instruction or a target application sends a third query instruction to the Windows operating system, as shown in Figure 13 , the Windows operating system invokes the fourth interface of the file storage client via the FUSE module and sends a directory enumeration instruction to the file storage client, instructing the file storage client to enumerate the target directory. Exemplarily, the fourth interface may be "sfc_readdir_attributes" / "sfc_readdir_obs," and the directory enumeration instruction may be "fuse_operations::readdir."

[0443] 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.

[0444] 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.

[0445] It should be noted that for other descriptions of FIG12 , reference can be made to the description of FIG6 , which will not be repeated here.

[0446] In the embodiment of the present application, the file extension attribute management method may further include the following S14-S16.

[0447] S14: The file storage client receives a deletion instruction, where the deletion instruction is used to instruct the deletion of a target node.

[0448] S15: The file storage client sends a deletion request to the object storage service node based on the deletion instruction. The deletion request is used to request deletion of target metadata of the target node.

[0449] 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, requesting 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.

[0450] S16: The object storage service node deletes the file extension attribute of the target node based on the received deletion request.

[0451] In an embodiment of the present application, after the object storage service node receives a deletion request, it will delete the target node's file extension attributes on the basis of deleting the target node's inode data, Dtree data and other metadata, thereby completely clearing the information related to the target node.

[0452] For the description of S14-S16, please refer to the description of step 802 above, which will not be repeated here.

[0453] 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.

[0454] The above is the second part of the embodiment of the present application. The following introduces the third part of the embodiment of the present application in combination with Figures 14 to 16.

[0455] In the embodiment of the present application, based on the implementation method 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.

[0456] For example, 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.

[0457] Since the operations performed by the file storage client in the process of implementing the first type of file extension attributes are obtaining file extension attributes and implementing file extension attributes, for the file storage client, the first type of attributes can also be called function implementation type attributes.

[0458] Since in the process of implementing the second type of file extension attributes, the operation performed by the file storage client is to obtain the file extension attributes and transmit the file extension attributes to the operating system so that the operating system can implement the file extension attributes, for the file storage client, the second type of attributes can also be called transparent transmission attributes.

[0459] 14 to 17 , the implementation process of the first type of file extension attributes is exemplarily introduced below.

[0460] 14 and 15 , the first implementation scheme is exemplarily introduced by taking the target file extension attribute of the target node as an example.

[0461] Fig. 14 is a flow chart showing 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 to 1403.

[0462] 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.

[0463] The target operation is related to the extended attributes of the target file.

[0464] In an embodiment of the present application, when a user or 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 target application, i.e., to perform the target operation on the target node.

[0465] 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.

[0466] Step 1402: The file storage client determines a permission verification result of a target operation based on the status of the target file's extended attributes.

[0467] The permission verification result includes passed verification or failed verification.

[0468] 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.

[0469] For example, if 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 the configured state, that is, the target node has the read-only attribute configured, the permission check result is a failed check, that is, the user or target application does not have permission to perform the write operation on the target node. If the read-only attribute is in the unconfigured state, that is, the target node has not been configured with the read-only attribute, the permission check result is a passed check, that is, the user or file application has permission to perform the write operation on the target node.

[0470] For example, as shown in Figure 15 , after receiving the target instruction, the attribute management module can obtain the file extension attributes of the target node. Subsequently, the attribute management module can send the file extension attributes of the target node and the type of the target operation to the attribute implementation module, which then determines the permission verification result for the target operation. After determining the permission verification result, the attribute implementation module transmits the permission verification result to the attribute management module.

[0471] 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 FIG8 , which will not be repeated here.

[0472] The above description of how the file storage client receives the target instruction is merely illustrative and is not limited in the present application. For example, the operating system may send the target instruction to the attribute implementation module, which instructs the attribute management to obtain the status of the target file's extended attributes. The attribute implementation module then determines the permission verification result for the target operation.

[0473] Step 1403: If the permission check result is failure, the file storage client returns a response message based on the target instruction.

[0474] The response information is used to indicate a refusal to execute the target operation on the target node.

[0475] In an embodiment of the present application, when the file storage client determines that the permission check result of the target operation has failed the check, the file storage client returns a response message to the sender of the target instruction (such as the 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.

[0476] In the above embodiment, after receiving the target instruction, the file storage client automatically obtains the file extension attributes of the target node according to the target instruction to perform the target operation on the target node, so as to determine the status of the target file extension attributes related to the target operation, thereby determining the permission verification result of the target operation. If the permission verification result of the target operation fails the verification, the file storage client returns a response message to indicate that the target operation is rejected on the target node, thereby indicating that the target operation is intercepted and the target file extension attributes of the target node are implemented. For example, when the target node is configured with a read-only attribute, users, target applications, etc. are denied write operations on the target node, that is, only read operations can be performed.

[0477] Optionally, the file extended attribute management method may further include: when the permission check result is passed, the file storage client returns a first response message 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.

[0478] In an embodiment of the present application, if the permission check result for the target operation passes, the file storage client can return a first response message to the sender of the target instruction, such as returning a first response message to the operating system, indicating that the target operation is permitted to be performed on the target node. This helps the operating system quickly respond to operation requests from users or target applications.

[0479] 16 and 17 , the second implementation scheme is exemplarily introduced by taking the target file extension attribute of the target node as an example.

[0480] Fig. 16 is a flow chart showing 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 to 1603.

[0481] When the target file extended attributes are some attributes of the first category of file extended attributes, such as encryption attributes, compression attributes, etc., after the file storage client receives the attribute setting instruction, it can implement the target file extended attributes of the target node through the following steps 1601-1603.

[0482] The following describes steps 1601 to 1603 by taking the case where the target node includes the first file as an example.

[0483] Step 1601: The file storage client obtains the first file based on the attribute setting instruction.

[0484] 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 part of the attributes in the first category of file extension attributes, such as encryption attributes, compression attributes, etc., the file storage client obtains the first file indicated by the attribute setting instruction.

[0485] 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 the first file indicated by the attribute setting instruction.

[0486] Step 1602: The file storage client performs the operation indicated by the attribute setting instruction on the first file to obtain a second file.

[0487] In an 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.

[0488] In Example 1, the attribute setting instruction indicates that the encryption attribute of the first file is set to the configured state. The operation indicated by the attribute setting instruction is to perform an encryption operation. Based on this, the file storage client performs the encryption operation on the first file to obtain an encrypted file (i.e., the second file).

[0489] In Example 2, the attribute setting instruction indicates that the encryption attribute of the first file is set to an unconfigured state. The attribute setting instruction indicates that the operation 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 (i.e., the second file).

[0490] In Example 3, the attribute setting instruction indicates that the compression attribute of the first file is set to the 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 (i.e., the second file).

[0491] In 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 (i.e., the second file).

[0492] 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, and the first storage request includes the second file.

[0493] In an embodiment of the present application, after obtaining the second file, the file storage client may send a first storage request to the object storage service node, requesting the object storage service node to store the second file. After receiving the first storage request, the object storage service node responds to the first storage request and stores the second file. For example, the second file may overwrite the first file.

[0494] It should be noted that steps 1601 to 1603 are illustrative examples 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 1601 to 1603 and will not be repeated here.

[0495] In the above embodiment, after the file storage client receives the attribute setting instruction, if the target file extended attribute is a portion of the first type of file extended attributes, such as an encryption attribute or a compression attribute, 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 an encryption operation, a decryption operation, a compression operation, or a decompression operation, thereby implementing the target file extended attribute for the first file or canceling the target file extended attribute for the first file, that is, implementing / cancelling the properties of the Windows file extended attributes, such as the encryption attribute or the compression attribute. Thereafter, the file storage client sends a first storage request to the object storage service node, requesting the object storage service node to store the first file. The file storage client can then provide the object storage service node with data to be stored (i.e., the second file) that is unrelated to the semantics of the Windows file extended attributes. In this way, the object storage service node does not need to be concerned with the semantics of the Windows file extended attributes of the data to be stored. That is, the object storage service node does not need to implement / cancel the file extended attributes of the data to be stored, thereby helping to simplify the software logic of the object storage service node while providing file extended attribute management services.

[0496] Fig. 17 is a flow chart showing 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 to 1703.

[0497] Exemplarily, in combination with the embodiments shown in FIG. 3 and FIG. 16 , if the target state is the 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 .

[0498] The following describes steps 1701 to 1703 by taking the case where the target node includes the third file as an example.

[0499] Step 1701: The file storage client receives a storage instruction, where the storage instruction is used to instruct the storage of a third file; the target file extension attribute of the third file is in a configured state.

[0500] In an embodiment of the present application, after a user updates a third file through an electronic device, or after a target application updates the third file, such as by adding new content to the third file or deleting part of the content in the third file, the Windows operating system sends a storage instruction to the file storage client, where the storage instruction is used to instruct the storage of the third file. After receiving the storage instruction, the file storage client can obtain the file extension attributes of the third file to determine whether the target file extension attributes of the third file are in a configured state. If the target file extension attributes of the third file are 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.

[0501] Exemplarily, the extended attributes of the target file may include encryption attributes, compression attributes, etc., and the encryption attributes, compression attributes, etc. of the third file are in a configured state.

[0502] It should be noted that the third file and the second file can be the same file, or they can be different files, and this embodiment of the present application does not limit this.

[0503] 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.

[0504] In an 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.

[0505] In combination with Example 1 in step 1602, the target file extended attributes of the third file include an encryption attribute, the encryption attribute of the third file is in a configured state, and the operation indicated by the encryption attribute 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).

[0506] 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).

[0507] 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.

[0508] In an 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, requesting the object storage service node to store the fourth file. After receiving the second storage request, the object storage service node responds to the second storage request and stores the fourth file, e.g., the fourth file may overwrite the third file.

[0509] It should be noted that steps 1701 to 1703 are illustrative examples 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.

[0510] 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.

[0511] The following is an exemplary introduction to the implementation of the second type of file extension attributes with reference to FIG18 .

[0512] Exemplarily, taking the hidden attributes of the target node as an example, the implementation process of the second type of file extension attributes is introduced.

[0513] As shown in Figure 18, after the file storage client obtains the target node's file extended attributes (including hidden attributes), it can directly transmit the target node's file extended attributes to the operating system, that is, transparently transmit them to the operating system. After the operating system receives the target node's file extended attributes, if the target node has been configured with hidden attributes, the operating system displays the target node according to the current display rules.

[0514] For example, 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.

[0515] In this embodiment, the operating system implements some file extension attributes, which helps to fully utilize the functions of the operating system and simplify the complexity of the file storage client.

[0516] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, the file storage client / file extension attribute management device includes hardware structures and / or software modules corresponding to the execution of each function. It should be easy for those skilled in the art to 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 this application.

[0517] The embodiment of the present application can, according to the above method, exemplarily divide the file storage client / file extension attribute management device into functional modules. 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-mentioned 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.

[0518] For example, FIG19 shows a possible schematic diagram of a file storage client (denoted as file storage client 1900) involved in the above-described embodiments. The actions performed by file storage client 1900 are implemented by an electronic device or by the electronic device executing corresponding software. File storage client 1900 includes a receiving module 1901, an attribute management module 1902, and a sending module 1903. Receiving module 1901 is configured to receive an attribute setting instruction, which indicates that the target file extended attribute of the target node is set to a target state, where the target state may include a configured state or an unconfigured state. For example, step 301 shown in FIG3 . Attribute management module 1902 is configured to determine an attribute setting request based on the attribute setting instruction and a target interface provided by the object storage service node; the interface provided by 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 extended attribute of the target node be set to the target state. For example, step 302 shown in FIG3 . Sending module 1903 is configured to send an attribute setting request to the object storage service node, requesting that the object storage service node set the target file extended attribute of the target node to the target state. For example, step 303 shown in FIG3 .

[0519] 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.

[0520] 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.

[0521] 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.

[0522] Optionally, the file storage client further includes an attribute implementation module 1904. Attribute implementation module 1904 is configured to: receive a target instruction, the target instruction being used to instruct execution of a target operation on a target node; the target operation being related to an extended attribute of a target file; determine a permission verification result for the target operation based on the status of the extended attribute of the target file; the permission verification result including a pass or fail; and, if the permission verification result is a fail, return response information based on the target instruction; the response information being used to indicate a refusal to execute the target operation on the target node.

[0523] Optionally, the attribute implementation module 1904 is further configured to: when the permission check result is passed, return 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.

[0524] 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.

[0525] 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.

[0526] Optionally, the attribute management module 1902 is further configured to: receive an attribute acquisition instruction, the attribute acquisition instruction being used to instruct acquisition of file extended attributes of a target node; and acquire and return the file extended attributes of the target node based on the attribute acquisition instruction.

[0527] 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.

[0528] Optionally, the attribute management module 1902 is specifically configured to obtain file extended attributes of the target node from the object storage service node based on an attribute acquisition instruction.

[0529] Optionally, the attribute management module 1902 is further configured 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.

[0530] 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.

[0531] 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.

[0532] Optionally, the attribute management module 1902 is specifically configured to: obtain target metadata of the target node from the object storage service node based on the metadata acquisition instruction.

[0533] Optionally, the attribute management module 1902 is also used to: receive a directory listing instruction, which 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 extended attributes of at least one file / subdirectory under the target directory.

[0534] Optionally, the attribute management module 1902 is specifically configured to: obtain target metadata of the target directory from the storage medium of the electronic device based on the metadata acquisition instruction.

[0535] Optionally, the attribute management module 1902 is specifically configured to: obtain target metadata of the target directory from the object storage service node based on the metadata acquisition instruction.

[0536] 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 beneficial effects of any of the above file storage clients 1900 can be referred to the above corresponding method embodiments, which will not be repeated here.

[0537] For example, FIG20 shows a possible structural diagram of the file extension attribute management device (denoted 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 through an object storage service node (such as a computing device) or implemented by executing corresponding software on the 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 an attribute setting request sent by a file storage client of the object storage system. The format of the attribute setting request is determined according to the target interface provided by the 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, and the target state includes a configured state or an unconfigured state. For example, step 701 shown in FIG7. The parsing module 2002 is used to parse the attribute setting request through the target interface to obtain the content requested by the attribute setting request. For example, step 702 shown in FIG7. The management module 2003 is configured to set the target file extended attribute of the target node to the target state based on the content of the attribute setting request, for example, step 703 shown in FIG7 .

[0538] Optionally, when the target state is the configured state, the management module 2003 is specifically used to: generate 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 the configured target file extended attributes; based on the identifier of the target node, store the target field of the target node.

[0539] Optionally, when the target state is unconfigured, the management module 2003 is specifically configured 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.

[0540] Optionally, the object storage service node stores a target string, which is used to indicate the status of the file extension attribute of the target node; the management module 2003 is specifically used to: when the target status is the 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 status is the 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.

[0541] 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.

[0542] 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.

[0543] 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.

[0544] Optionally, the management module 2003 is further configured to return a prompt message to the file storage client when the value of the target file extended attribute is different from the target value, where the prompt message is used to indicate that there is an error in the value of the target file extended attribute.

[0545] 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 extended attributes of the target node; the management module 2003 is used to: return the file extended attributes of the target node to the file storage client based on the attribute acquisition request.

[0546] 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.

[0547] 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, and 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.

[0548] Optionally, the receiving module 2001 is further used to: receive a deletion request sent by the file storage client, where the deletion request is used to request deletion of metadata of a target node; and the management module 2003 is further used to: delete file extension attributes of the target node based on the deletion request.

[0549] 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 beneficial effects of any of the above-mentioned file extension attribute management devices 2000 can be referred to the above corresponding method embodiments, which will not be repeated here.

[0550] In the embodiments of the present application, the receiving module 2001, the parsing module 2002, and the management module 2003 can all be implemented via software or hardware. For example, the implementation of the parsing module 2002 will be described below using 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.

[0551] As an example of a software functional unit, 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. Furthermore, the 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 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 geographically close data centers. Typically, a region may include multiple AZs.

[0552] Similarly, the multiple hosts / virtual machines / containers used to run the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.

[0553] As an example of a hardware functional unit, parsing module 2002 may include at least one computing device, such as a server. Alternatively, parsing module 2002 may be 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.

[0554] The multiple computing devices included in the parsing module 2002 can be distributed in the same region or in different regions. The multiple computing devices included in the parsing module 2002 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the parsing module 2002 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.

[0555] 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. Alternatively, 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 full functions of the file extension attribute management device can be realized by respectively implementing different steps in the file extension attribute management method through the receiving module 2001, the parsing module 2002, and the management module 2003.

[0556] The present application also provides a computing device. As shown in FIG21 , computing device 210 includes a bus 212, a processor 214, a memory 216, and a communication interface 218. Processor 214, memory 216, and communication interface 218 communicate with each other via bus 212. Computing device 210 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in computing device 210.

[0557] Bus 212 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, FIG. 21 shows only one line, but this does not imply a single bus or type of bus. Bus 212 may include a path for transmitting information between various components of computing device 210 (e.g., memory 216, processor 214, and communication interface 218).

[0558] The processor 214 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

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

[0560] The memory 216 stores executable program code, which the processor 214 executes to implement the functions of the aforementioned receiving module 2001, parsing module 2002, and management module 2003, thereby implementing the file extension attribute management method. In other words, the memory 216 stores instructions for executing the file extension attribute management method.

[0561] Alternatively, the memory 216 stores executable program code, and the processor 214 executes the executable program code to implement the functions of the aforementioned receiving module 2001, parsing module 2002, and management module 2003, thereby implementing a file extension attribute management method. In other words, the memory 216 stores instructions for executing a file extension attribute management method.

[0562] 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 a communication network.

[0563] 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 ).

[0564] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as 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 smartphone.

[0565] As shown in Figure 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 extended attribute management method.

[0566] In some possible implementations, the memory 216 of one or more computing devices 210 in the computing device cluster 220 may also store partial instructions for executing the file extended attribute management method. In other words, the combination of one or more computing devices 210 can jointly execute the instructions for executing the file extended attribute management method.

[0567] It should be noted that the memories 216 in different computing devices 210 in the computing device cluster 220 may store different instructions, each for executing a portion of the functions of the file extension attribute management apparatus 2000. In other words, the instructions stored in the memories 216 in different computing devices 210 may implement the functions of one or more of the receiving module 2001, the parsing module 2002, and the management module 2003.

[0568] It should be noted that computing device cluster 220 can serve as an object storage service node (as shown in Figures 1 and 2) to provide cloud services to cloud service tenants. For the description of at least one computing device 210 in the computing device cluster shown in Figure 22, refer to the description of the computing device shown in Figure 21 and will not be repeated here.

[0569] The following is an exemplary introduction to the connection method of the computing device cluster.

[0570] In one possible implementation, one or more computing devices in a computing device cluster (such as the computing device cluster shown in FIG22 ) can be connected via a network. The network can be a wide area network or a local area network, etc. FIG23 shows a possible implementation. As shown in FIG23 , 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.

[0571] The connection method between the computing device clusters shown in Figure 23 can be that considering that the file extension attribute management method provided in this application requires higher computing resources, 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.

[0572] 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.

[0573] The present application also provides another computing device cluster. The connection relationship between the computing devices in this computing device cluster can be similar to the connection method of the computing device cluster shown in FIG21 . However, the memory 216 of one or more computing devices 210 in this computing device cluster can store the same instructions for executing the file extended attribute management method.

[0574] 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 extended attribute management method. In other words, the combination of one or more computing devices 210 can jointly execute the instructions for executing the file extended attribute management method.

[0575] The present application also provides an electronic device. As shown in Figure 24 , electronic device 240 includes a bus 242, a processor 244, a memory 246, and a communication interface 248. Processor 244, memory 246, and communication interface 248 communicate with each other via bus 242. Electronic device 240 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in electronic device 240.

[0576] Memory 246 stores executable program code. Processor 244 executes this executable program code to implement the functions of the aforementioned receiving module 1901, attribute management module 1902, sending module 1903, and attribute implementation module 1904, thereby implementing the file extended attribute management method. In other words, memory 246 stores instructions for executing the file extended attribute management method.

[0577] It should be noted that electronic device 240 may be the electronic device used by the cloud service tenant shown in Figures 1 and 2. For other related descriptions of bus 242, processor 244, memory 246, and communication interface 248 of electronic device 240, reference can be made to the related descriptions of the computing device shown in Figure 21 above, and will not be repeated here.

[0578] The present application also provides a computer program product. This computer program product may be software or a program product containing a computer program / instructions that can be run on an electronic device or stored on any available medium. When the computer program product is run on at least one electronic device, it causes the at least one electronic device to execute the file extension attribute management method.

[0579] The present application also provides a computer program product. This computer program product may be software or a program product containing computer programs / instructions that can be run on a computing device or stored on any available medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to execute the file extension attribute management method.

[0580] Embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by an electronic device, or a data storage device such as a data center that contains one or more available media. The computer-readable storage medium includes a computer program / instructions that instruct the electronic device to execute a method for managing file extension attributes.

[0581] Embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center that contains one or more available media. The computer-readable storage medium includes a computer program / instructions that instruct the computing device to execute a method for managing file extension attributes.

[0582] The available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid-state drives).

[0583] 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 various embodiments of the present invention.

Claims

1. A method for managing file extension attributes, characterized in that: The method is applied to a file storage client, the file storage client runs on a Windows operating system, the Windows operating system also provides a local file system, the directory tree of the local file system includes a target node, the target node is a file or a directory, and the file or 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; the target state includes a configured state or an unconfigured state; Determine a property setting request based on the property 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 a 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 attribute setting request is sent 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.

2. The method according to claim 1, characterized in that 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; Alternatively, the attribute setting request includes message content, and the message content is used to indicate the target file extended attribute and the target status.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: receiving a target instruction, wherein the target instruction is used to instruct to perform a target operation on a target node; the target operation is related to an extended attribute of the target file; Determining a permission check result of the target operation based on the state of the target file extension attribute; the permission check result includes passing the check or failing the check; In the case where the permission check result is failure to pass the check, response information is returned based on the target instruction; the response information is used to indicate a refusal to execute the target operation on the target node.

4. The method according to any one of claims 1 to 3, characterized in that In the case where the target node is the first file, the method further includes: Based on the attribute setting instruction, obtaining the first file; Performing the operation indicated by the attribute setting instruction on the first file to obtain a second file; A first storage request is sent to the object storage service node, where the first storage request is used to request storage of the second file; and the first storage request includes the second file.

5. The method according to any one of claims 1 to 4, characterized in that In the case where the target node is a third file, the method further includes: receiving a storage instruction, wherein 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; Performing the operation indicated by the target file extension attribute on the third file to obtain a fourth file; A second storage request is sent to the object storage service node, where the second storage request is used to request the object storage service node to store the fourth file; and the storage request includes the fourth file.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Receive an attribute acquisition instruction, where the attribute acquisition instruction is used to instruct to acquire a file extended attribute of the target node; Based on the attribute acquisition instruction, the file extended attribute of the target node is acquired and returned.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Receive a metadata acquisition instruction, where the metadata acquisition instruction is used to instruct to acquire metadata of the target node; Based on the metadata acquisition instruction, the target metadata of the target node is acquired and returned; the target metadata of the target node includes the file extension attribute of the target node.

8. A method for managing file extension attributes, characterized in that: The method is applied to an object storage service node, 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 target node is a file or a directory; the method includes: Receive a property setting request sent by a file storage client, wherein the format of the property setting request is determined according to a target interface provided by the object storage service node, and the property setting request is used to request setting a target file extended attribute of the target node to a target state, wherein the target state includes a configured state or an unconfigured state; Parsing the property setting request through the target interface to obtain the content requested by the property setting request; The target file extended attribute of the target node is set to the target state based on the content requested by the attribute setting request.

9. The method according to claim 8, characterized in that In a case where the target state is a configured state, setting the target file extended attribute of the target node to the target state based on the content requested by the attribute setting request includes: 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 that the target file extended attribute has been configured; Based on the identifier of the target node, a target field of the target node is stored.

10. The method according to claim 8, characterized in that In a case where the target state is an unconfigured state, setting the target file extension attribute of the target node to the target state based on the content requested by the attribute setting request includes: Based on the content requested by the attribute setting request, the target field of the target node is deleted; the target field of the target node is used to indicate that the target file extended attribute has been configured.

11. The method according to claim 8, characterized in that The object storage service node stores a target string, where the target string is used to indicate a state of a file extension attribute of the target node; and setting the target file extension attribute of the target node to the target state based on the content requested by the attribute setting request includes: In the case where the target state is a configured state, based on the content requested by the attribute setting request, the target bit of the target character string is set to a first value; the target bit is used to indicate the target file extended attribute, and the first value is used to indicate the configured state; In the case where the target state is an unconfigured state, the target bit of the target character string is set to a second value based on the content requested by the attribute setting request; the second value is used to indicate an unconfigured state.

12. The method according to any one of claims 8 to 11, characterized in that The method further comprises: Receiving an attribute acquisition request sent by the file storage client, wherein the attribute acquisition request is used to request to acquire a file extended attribute of the target node; Based on the attribute acquisition request, the file extended attributes of the target node are returned to the file storage client.

13. The method according to any one of claims 8 to 12, characterized in that: The method further comprises: Receive a metadata acquisition request sent by the client, where the metadata acquisition request is used to request to acquire metadata of the target node; Based on the metadata acquisition request, target metadata of the target node is returned to the file storage client; the target metadata of the target node includes file extension attributes of the target node.

14. A file storage client, characterized in that: The file storage client comprises: A receiving module, configured to receive an attribute setting instruction, wherein the attribute setting instruction indicates setting a target file extension attribute of a target node to a target state, wherein the target state includes a configured state or an unconfigured state; the target node is a file or a directory, and the file or directory is stored in an object storage service node; an attribute management module, configured to determine an attribute setting request based on the attribute setting instruction and a target interface provided by the object storage service node; 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 an extended attribute of a target file of the target node to a target state; A sending module 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.

15. A file extension attribute management device, characterized in that: The file extension attribute management device is applied to an object storage service node, and the file extension attribute management device includes: A receiving module, configured to receive a property setting request sent by a file storage client, wherein the format of the property setting request is determined according to a target interface provided by the object storage service node, and the property setting request is used to request setting a target file extension attribute of a target node to a target state, wherein the target state includes a configured state or an unconfigured state; A parsing module, used for parsing the property setting request through the target interface to obtain the content requested by the property setting request; A management module is used to set the target file extension attribute of the target node to the target state based on the content requested by the attribute setting request.

16. A computer program product, characterized in that include: A computer program / instruction, which, when executed by a processor of an electronic device, implements the steps of the method according to any one of claims 1 to 7.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program / instruction, and when the computer program / instruction is executed by a processor of an electronic device, the steps of the method according to any one of claims 1 to 7 are implemented.

18. A computing device cluster, characterized in that: include: at least one computing device, each computing device of the at least one computing device comprising a processor and a memory; Each computing device includes a processor, a memory, and a computer program / instruction stored in the memory; the processor executes the computer program / instruction to enable the computing device cluster to implement the steps of the method as described in any one of claims 8-13.

19. A computer program product, characterized in that include: A computer program / instruction which, when executed by a processor of a computing device, implements the steps of the method according to any one of claims 8 to 13.

20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program / instruction, which, when executed by a processor of a computing device, implements the steps of the method according to any one of claims 8 to 13.

Citation Information

Patent Citations

  • Method and device for reading data in object storage system

    CN106202220A

  • Object storage operation method, device and system based on kernel file system

    CN107479991A

  • Access method and device for object storage cluster

    CN110677441A

  • Method, system and device for protecting remote copy data and storage medium

    CN116303325A

  • File synchronizing service status monitoring and error handling

    US20190354427A1