Data processing method and related device
By introducing read and write permission state machine and metadata management in distributed storage systems, the problem that existing systems cannot effectively manage user read and write permissions is solved, and the reliability of the system is improved.
Patent Information
- Application Number
- CN202311519080.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-14
- Publication Date
- 2025-05-16
Smart Images

Figure CN120010746A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data storage, and in particular to a data processing method and related devices. Background Art
[0002] With the increasing electronicization of production and life, more and more production data and life data are generated, but the storage capacity of each user's electronic products or each enterprise's computing devices is limited, so distributed storage systems come into being.
[0003] Distributed storage systems provide users with distributed object, file, and block storage services, and store users' data in data centers located in various places. Among these data, a considerable portion of the data is data that needs to be saved, but once generated, it is rarely modified, such as archived data, compliance storage data, legal evidence, etc. Once these data are written, they are often not allowed to be modified, and can only be read, until many years later, a user with deletion permission can clean up and delete these data. However, current distributed storage systems can often only provide read and write permission control for a single client, and cannot control the reading and writing of other clients to the data. For example, client A sets read and write permissions for data A, but client B is not restricted by the read and write permissions set by client A when reading and writing data A. How to further restrict the reading and writing of data by all users has become a key step in improving the reliability of distributed storage systems. Summary of the invention
[0004] An embodiment of the present application provides a method for data processing, by adding a state machine for processing data read and write permissions to a distributed storage system, and adding a character string for describing data read and write permissions to the metadata of the data. The state machine can process read and write requests related to the data according to the metadata. Since all users' reading and writing of data need to be processed by the state machine, unified management of data read and write permissions of all users is achieved, thereby improving the reliability of the distributed storage system.
[0005] The first aspect of the present application provides a data processing method, comprising:
[0006] Acquire first metadata sent by a first client, where the first metadata carries a first identifier, the first identifier is used to describe read and write permissions of the first data, and the first metadata is metadata of the first data;
[0007] Processing the read and write permissions of the first data according to the first identifier to obtain state information of the first data, where the state information is used to describe an execution state of the read and write permissions of the first data;
[0008] adding the state information to the first metadata to obtain updated first metadata;
[0009] Sending the updated first metadata to a second client, where the second client is associated with the first metadata;
[0010] Obtaining a first read / write request sent by the second client, where the first read / write request is used to read and write the first data;
[0011] The first read / write request is processed according to the status information.
[0012] A second aspect of the present application provides a data processing method, comprising:
[0013] Displaying a first data read-write interface through an interactive interface, wherein the first data read-write interface includes read-write options for first data, and the first data is data written by the first client;
[0014] Acquire updated first metadata, where the updated first metadata includes a first identifier and status information of the first data, where the first identifier is used to describe the read and write permissions of the first data, and the status information is used to describe the execution status of the read and write permissions of the first data, and the updated first metadata is metadata of the first data;
[0015] In response to an operation based on the first data read / write interface, obtaining a first read / write request, where the first read / write request is used to read and write the first data;
[0016] The first read / write request is processed according to the updated first metadata.
[0017] A third aspect of the present application provides a data processing method, comprising:
[0018] Displaying a first metadata setting interface through an interactive interface, wherein the first metadata setting interface includes setting options for a first identifier, the first identifier is used to describe the read and write permissions of the first data, and the first metadata is metadata of the first data;
[0019] In response to an operation on the first metadata setting interface, obtaining and uploading the first metadata, where the first metadata carries the first identifier;
[0020] Obtain updated first metadata sent by the distributed storage system, wherein the updated first metadata is metadata obtained by the distributed storage system by adding status information of the first data to the first metadata according to the first identifier, and the status information is used to describe the execution status of the read and write permissions of the first data.
[0021] A fourth aspect of the present application provides a data processing device, including:
[0022] An acquiring unit, configured to acquire first metadata sent by a first client, wherein the first metadata carries a first identifier, the first identifier is used to describe the read and write permissions of the first data, and the first metadata is metadata of the first data;
[0023] a processing unit, configured to process the read and write permission of the first data according to the first identifier, and obtain state information of the first data, wherein the state information is used to describe an execution state of the read and write permission of the first data;
[0024] The processing unit is further configured to add the state information to the first metadata to obtain updated first metadata;
[0025] a sending unit, configured to send the updated first metadata to a second client, where the second client is associated with the first metadata;
[0026] The acquiring unit is further used to acquire a first read / write request sent by the second client, where the first read / write request is used to read and write the first data;
[0027] The processing unit is further configured to process the first read / write request according to the status information.
[0028] In a possible implementation of the fourth aspect, the first identifier includes a read-write permission management field, a read-write permission enable wait field, and a read-write permission duration field, the read-write permission management field is used to describe whether the read-write permission of the first data is enabled, the read-write permission start wait field is used to describe the duration from the first data creation moment to the read-write permission start moment of the first data, and the read-write permission duration is used to describe the duration from the read-write permission start moment of the first data to the read-write permission shutdown moment of the first data.
[0029] In a possible implementation of the fourth aspect, the read / write permission management field indicates that the read / write permission of the first data is enabled, the read / write permission start wait field indicates a first duration, and the read / write permission duration field indicates a second duration;
[0030] The processing unit is specifically used for:
[0031] From the first moment to the second moment, the state information of the first data is set to the read-write permission startup stage according to the first identifier, the first moment is the moment of writing the first data, and the interval between the second moment and the first moment is the first duration;
[0032] From the second moment to the third moment, the state information of the first data is set to the read-write permission execution stage according to the first identifier, and the interval between the third moment and the second moment is the second duration;
[0033] After the third moment, the state information of the first data is set to the read and write permission expiration stage according to the first identifier.
[0034] In a possible implementation of the fourth aspect, the read / write permission management field indicates that the read / write permission of the first data is enabled, the read / write permission start wait field indicates a first duration, and the read / write permission duration field indicates indefinite;
[0035] The processing unit is specifically used for:
[0036] From the first moment to the second moment, the state information of the first data is set to the read-write permission startup stage according to the first identifier, the first moment is the moment of writing the first data, and the interval between the second moment and the first moment is the first duration;
[0037] After the second moment, the state information of the first data is set to the indefinite execution stage of the read and write permissions according to the first identifier.
[0038] In a possible implementation manner of the fourth aspect, the processing unit is specifically configured to:
[0039] When the state information is the read-write permission startup stage, the read-write permission expiration stage, or the read-write permission execution stage, and the first read-write request indicates reading the first data, sending the first data to the second client;
[0040] When the state information is the read / write permission startup stage or the read / write permission expiration stage, and the first read / write request indicates deletion or modification of the first data, deleting or modifying the first data according to the first read / write request;
[0041] When the status information is the read / write permission execution stage, and the first read / write request indicates deletion or modification of the first data, a first signal is sent to the second client, where the first signal is used to describe that the first data cannot be deleted or modified.
[0042] In a possible implementation manner of the fourth aspect, the acquisition unit is further configured to, when the state information is the read-write permission execution stage, acquire a read-write permission deactivation request sent by the first client;
[0043] The processing unit is further used to update the status information to the read and write permission expiration stage.
[0044] In a possible implementation manner of the fourth aspect, the processing unit is specifically configured to:
[0045] When the state information is the read-write permission startup stage / read-write permission indefinite execution stage, and the first read-write request indicates reading the first data, sending the first data to the second client;
[0046] When the state information is the read / write permission startup stage, and the first read / write request indicates to delete or modify the first data, deleting or modifying the first data according to the first read / write request;
[0047] When the status information is that the read / write permission is indefinitely executed, and the first read / write request indicates deletion or modification of the first data, a first signal is sent to the second client, where the first signal is used to describe that the first data cannot be deleted or modified.
[0048] In a possible implementation manner of the fourth aspect, the acquisition unit is further configured to, when the state information is the indefinite execution stage of the read / write permission, acquire a read / write permission deactivation request sent by the first client;
[0049] The processing unit is further used to update the status information to the read and write permission expiration stage.
[0050] A fifth aspect of the present application provides a data processing device, including:
[0051] An interactive unit, configured to display a first data read-write interface through an interactive interface, wherein the first data read-write interface includes read-write options for first data, and the first data is data written by a first client;
[0052] an acquiring unit, configured to acquire updated first metadata, wherein the updated first metadata includes a first identifier and status information of the first data, wherein the first identifier is used to describe the read and write permissions of the first data, and the status information is used to describe the execution status of the read and write permissions of the first data, and the updated first metadata is metadata of the first data;
[0053] The interaction unit is further configured to obtain a first read / write request in response to an operation based on the first data read / write interface, wherein the first read / write request is used to read and write the first data;
[0054] A processing unit is used to process the first read and write request according to the updated first metadata.
[0055] A sixth aspect of the embodiments of the present application provides a data processing device, including:
[0056] An interactive unit, configured to display a first metadata setting interface through an interactive interface, wherein the first metadata setting interface includes setting options for a first identifier, wherein the first identifier is used to describe the read and write permissions of the first data, and the first metadata is metadata of the first data;
[0057] an acquisition unit, configured to obtain and upload the first metadata in response to an operation on the first metadata setting interface, wherein the first metadata carries the first identifier;
[0058] The acquisition unit is also used to acquire the updated first metadata sent by the distributed storage system, where the updated first metadata is metadata obtained by the distributed storage system by adding status information of the first data to the first metadata according to the first identifier, and the status information is used to describe the execution status of the read and write permissions of the first data.
[0059] A seventh aspect of the present application provides a computer device, including:
[0060] memories, transceivers, processors, and bus systems;
[0061] Wherein, the memory is used to store programs;
[0062] The processor is used to execute the program in the memory, including executing the above-mentioned methods;
[0063] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
[0064] Another aspect of the present application provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer is enabled to execute the above-mentioned methods.
[0065] In an eighth aspect, the present application provides a computer program product or a computer program, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above aspects.
[0066] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0067] The present application provides a method and related device for data processing. After obtaining the first metadata sent by the first client, the read and write permissions of the first data are processed according to the first identifier carried by the first metadata, and the status information of the first data used to describe the execution status of the read and write permissions of the first data is obtained. The status information of the first data is sent to the client that has an associated relationship with the first data, so that when the client that has an associated relationship with the first data needs to read and write the first data, it can use the status information of the first data to process the read and write requirements related to the first data. At the same time, the distributed storage system can also process the read and write requests related to the first data according to the status information of the first data. The unified management of the permissions of all clients to read and write the first data is realized, and the reliability of the distributed storage system is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 A schematic diagram of an architecture of a data processing system provided in an embodiment of the present application;
[0069] Figure 2 A flowchart of a data processing method provided in an embodiment of the present application;
[0070] Figure 3a A schematic diagram of data processing of a distributed storage system provided in an embodiment of the present application;
[0071] Figure 3b Another schematic diagram of data processing of a distributed storage system provided in an embodiment of the present application;
[0072] Figure 3c Another schematic diagram of data processing of a distributed storage system provided in an embodiment of the present application;
[0073] Figure 4 A schematic diagram of the correspondence between the attribute names and meanings of each field of the first identifier provided in an embodiment of the present application;
[0074] Figure 5 A schematic diagram of state information of first data that changes over time provided by an embodiment of the present application;
[0075] Figure 6 Another schematic diagram of state information of first data that changes over time provided by an embodiment of the present application;
[0076] Figure 7 A schematic diagram of the corresponding relationship between the state of the read and write permission of the first data and its meaning provided in an embodiment of the present application;
[0077] Figure 8 A schematic diagram of a change in state information of first data provided in an embodiment of the present application;
[0078] Fig. 9 Another schematic diagram of data processing of a distributed storage system provided in an embodiment of the present application;
[0079] Fig.10 Another schematic diagram of data processing of a distributed storage system provided in an embodiment of the present application;
[0080] Fig.11 Another flowchart of the data processing method provided in the embodiment of the present application;
[0081] Fig.12 Another schematic diagram of data processing of a distributed storage system provided in an embodiment of the present application;
[0082] Fig.13 A schematic diagram of the processing granularity of archived data provided in an embodiment of the present application;
[0083] Fig.14a A schematic diagram of a process flow of archiving settings provided in an embodiment of the present application;
[0084] Fig.14b A schematic diagram of a process for switching the archiving status of files and directories provided in an embodiment of the present application;
[0085] Fig.15 A schematic diagram of a structure of a data processing device provided in an embodiment of the present application;
[0086] Fig.16 Another structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0087] Fig.17 Another structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0088] Fig.18 A schematic diagram of a server structure provided for a certain embodiment of the present application. DETAILED DESCRIPTION
[0089] An embodiment of the present application provides a method for data processing, by adding a state machine for processing data read and write permissions to a distributed storage system, and adding a character string for describing data read and write permissions to the metadata of the data. The state machine can process read and write requests related to the data according to the metadata. Since all users' reading and writing of data need to be processed by the state machine, unified management of data read and write permissions of all users is achieved, thereby improving the reliability of the distributed storage system.
[0090] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0091] To facilitate understanding of the technical solutions provided in the embodiments of the present application, some key terms used in the embodiments of the present application are explained here:
[0092] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.
[0093] In short, a database can be seen as an electronic filing cabinet - a place where electronic files are stored, and users can add, query, update, delete, and other operations on the data in the files. The so-called "database" is a collection of data that is stored together in a certain way, can be shared with multiple users, has as little redundancy as possible, and is independent of the application.
[0094] A database management system (DBMS) is a computer software system designed to manage databases, generally with basic functions such as storage, retrieval, security, and backup. Database management systems can be classified according to the database model they support, such as relational, extensible markup language (XML); or according to the type of computer they support, such as server clusters, mobile phones; or according to the query language used, such as structured query language (SQL), XQuery; or according to the performance focus, such as maximum scale, maximum operating speed; or other classification methods. Regardless of the classification method used, some DBMS can cross categories, for example, supporting multiple query languages at the same time.
[0095] Ceph, a distributed storage system, can provide object, file, and block storage at the same time.
[0096] Cephfs: Provides upper-layer applications for distributed file systems in Ceph.
[0097] MDS: Cephfs service used to manage file system metadata.
[0098] OSD: Ceph storage node service, used to manage a disk space to store user data.
[0099] Monitor: Ceph distributed cluster management service, used to store cluster topology, such as OSDMAP, and perceive the distribution of storage service nodes.
[0100] Rados: It is the storage cornerstone of Ceph. Ceph data is stored in the Rados cluster composed of OSDs. Data in Rados is stored in objects of 4M by default.
[0101] With the increasing electronicization of production and life, a large amount of production data and life data are generated every day. However, the storage capacity of each user's electronic products or each enterprise's computing equipment is limited, so distributed storage systems come into being.
[0102] Distributed storage systems provide users with distributed object, file, and block storage services. They are applied in the fields of big data and cloud computing to provide storage services for massive data. Distributed storage systems can provide hardware storage resources in data centers distributed around the world to multiple users for common use. Among these data stored in data centers, a considerable portion of data needs to be saved but is rarely modified once generated, such as archived data, compliance storage data, legal evidence, etc. Once these data are written, they are often not allowed to be modified and can only be read. Until many years later, a user with deletion permission can clean up and delete these data.
[0103] However, the cephfs file system currently used in data centers can only provide single-user read-write capability control, that is, when client A writes data A to the cephfs file system, client A can set data A as read-only data, and the read-write permission of data A is changed to read-only. Since this change in data read-write permission is stored on client A, client B can still modify data A through the cephfs file system. In this way, the read-only permission for data A in the cephfs file system is only valid for client A. Such data read-write permissions cannot meet current data management needs. How to further improve the read-write management of data in distributed storage systems has become a key step in improving the reliability of distributed storage systems.
[0104] In response to the above problems, the present application proposes to add a state machine for processing data read and write permissions to the distributed storage system, and to add a string for describing data read and write permissions to the data metadata. The state machine can process read and write requests related to the data based on the metadata. Since all users' reading and writing of data must be processed by the state machine, unified management of all users' data read and write permissions is achieved, thereby improving the reliability of the distributed storage system.
[0105] For easier understanding, see Figure 1 , Figure 1 FIG. 1 is an application environment diagram of the data processing method in the embodiment of the present application, such as Figure 1 As shown, the method for data processing in the embodiment of the present application is applied to a data processing system. The data processing system includes: a server and a terminal device; wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and the embodiments of the present application are not limited here.
[0106] The server first obtains first metadata input by the first client, where the first metadata carries a first identifier, and the first identifier is used to describe the read and write permissions of the first data. The first metadata is metadata of the first data;
[0107] Processing the read and write permissions of the first data according to the first identifier to obtain state information of the first data, where the state information is used to describe an execution state of the read and write permissions of the first data;
[0108] adding the state information to the first metadata to obtain updated first metadata;
[0109] Sending the updated first metadata to a second client, where the second client is associated with the first metadata;
[0110] Obtaining a first read / write request sent by the second client, where the first read / write request is used to read and write the first data;
[0111] The first read / write request is processed according to the status information.
[0112] The following uses the distributed storage system cephfs as an example to introduce the data processing method in this application. Figure 2 The data processing method provided in the embodiment of the present application includes: step S101 to step S108. Specifically:
[0113] S101: A first client obtains first metadata in response to an input on a first metadata setting interface;
[0114] The first client displays a first metadata setting interface through an interactive interface. The first metadata setting interface includes a first identification setting option. The first identification is used to describe the read and write permissions of the first data, and the first metadata is the metadata of the first data. The user operates the first metadata setting interface so that the first client obtains the first metadata. Among them, the first identification includes a read and write permission management field, a read and write permission enable wait field, and a read and write permission duration field. The read and write permission management field is used to describe whether the read and write permissions of the first data are enabled. The read and write permission enable wait field is used to describe the duration from the first data creation time to the first data read and write permission enable time. The read and write permission duration field is used to describe the duration from the first data read and write permission enable time to the first data read and write permission disable time.
[0115] Specifically, Figure 3a As shown, the user first adds a first identifier to the first metadata through the first client (setfattr-n ceph.worm command), the first identifier is an extended attribute of the first data, and the client sends a message to set the extended attribute to the MDS service in cephfs, and the message carries the first metadata. The MDS modifies the extended attribute information of the first metadata corresponding to the first data to obtain the updated first metadata. The MDS service also sends the updated first metadata to the first client and the second client related to the first data, and saves it in the cache of the first client and the cache of the second client.
[0116] The implementation of the data processing method provided by this application in the cephfs file system is as follows Figure 3bAs shown, the first user writes a test file to the cephfs distributed storage system through the first client, and the archiving capability module analyzes the metadata corresponding to the test file and writes the test file to the cephfs distributed storage system. When the first user writes the test file, the setfattr command is used to add an identifier (extended attribute of the test file) for managing the read and write permissions of the first data to the metadata of the test file. When the identifier indicates that the read and write permissions of the test file are not deletable (write once, readmany), when the second user requests cephfs to delete or modify the test file through the second client, the archiving capability module in cephfs determines that the test file can only be read based on the identifier of the test file. When the second client initiates a request to delete or modify the test file, a read-only error is returned to the second client; when the second client initiates a request to read the test file, the test file is sent to the second client.
[0117] like Figure 3c As shown, there may be multiple clients in cephfs accessing a file or directory at the same time. Therefore, after setting the extended attribute (worm) of the first data, it is necessary to synchronize the cinode metadata to other clients so that users using other clients know the setting of the archiving function. When the first user writes the worm of the first data to the MDS through the first client, the worm information is synchronized to the client that has a corresponding relationship with the first data.
[0118] In a specific implementation, the first identifier may be named a worm_info attribute structure, which includes a plurality of fields for describing different attributes. These attributes and their corresponding meanings are as follows: Figure 4 shown.
[0119] The attribute name of the read-write permission management field is ceph.worm.enable, and its corresponding value is 0 or 1, which is used to identify whether the read-write permission of the first data is enabled.
[0120] The attribute name of the read-write permission start waiting field is ceph.worm.auto_commit_period, which is used to describe how long after the first data creation time the read-write permission is started.
[0121] The attribute name of the read / write permission duration field is Ceph.worm.retention_period, which is used to describe the duration from the time when the read / write permission of the first data is enabled to the time when the read / write permission of the first data is disabled, that is, the duration during which the read / write permission of the first data is enabled.
[0122] It is understandable that the description of the process of configuring the metadata of the first data by the user through the first client is only an example. In actual application, it should be configured in combination with specific application scenarios, and no limitation is made here.
[0123] It can be understood that the name of the first identifier and the description of the content corresponding to the first identifier here are only examples. In actual applications, they should be set in combination with specific application scenarios and are not limited here.
[0124] In the embodiment of the present application, the specific form of the first identification is introduced. By utilizing the read-write permission management field to determine whether the read-write permission is used, utilizing the read-write permission enabling wait field to determine the duration from the first data creation moment to the first data read-write permission start moment, utilizing the read-write permission duration management to the first data read-write permission shutdown moment, closed-loop management of the first data's read-write permission from startup to shutdown is achieved, thereby improving the integrity of the solution.
[0125] S102: The first client sends first metadata to the distributed storage system;
[0126] After acquiring the first metadata, the first client sends the first metadata to the distributed storage system, wherein the first metadata includes a first character string.
[0127] Optionally, the first metadata also includes the creation time of the first data, the modification time of the first data, and the owner of the first data.
[0128] It is understandable that the description of the content that may be included in the first metadata here is only an example. In actual application, it should be set in combination with specific application scenarios and is not limited here.
[0129] S103: The distributed storage system processes the read and write permissions of the first data according to the first identifier carried in the first metadata, and obtains status information of the first data;
[0130] After the distributed storage system obtains the first metadata, the read / write permission state machine in the distributed storage system processes the read / write permission of the first data according to the first identifier carried in the first metadata, and obtains the state information of the first data, which is also referred to as the state information in this application. The state information of the first data is used to describe the execution state of the read / write permission of the first data.
[0131] Exemplarily, according to different contents of the first identifier of the first metadata, the state information of the first data has four different situations.
[0132] When, in the first identifier, the read / write permission management field indicates that the read / write permission of the first data is enabled, the read / write permission start waiting field indicates the first duration, and the read / write permission duration field indicates the second duration, there are three possible situations in which the state information of the first data changes over time:
[0133] From the first moment to the second moment, the status information of the first data is the read-write permission startup stage. In this stage, the first data can be deleted and modified, and the read-write permission of the first data is not yet effective. The first moment is the moment when the first metadata is obtained, and the interval between the second moment and the first moment is the first duration.
[0134] From the second moment to the third moment, the status information of the first data is the read-write permission execution stage, during which the first data cannot be deleted or modified, and the read-write permission of the first data has taken effect. The interval between the third moment and the second moment is the second duration.
[0135] After the third moment, the state information of the first data is in the read-write permission expired stage, in which the first data can be deleted or modified, and the read-write permission of the first data has expired.
[0136] For easier understanding, see Figure 5 ,Depend on Figure 5 It can be seen that the state information of the first data changes with time. When the first identifier is the worm_info attribute structure:
[0137] The read-write permission enabling phase can be represented as worm_enable, the read-write permission execution phase can be represented as worm_retain, and the read-write permission expiration phase can be represented as worm_expire.
[0138] The starting time of worm_enable, that is, the first time, is the time for setting the worm information, and the duration of the read-write startup phase is the first duration, which can also be expressed as auto_commit_period (the default is 5 minutes).
[0139] The moment when the read-write startup phase switches to the read-write permission execution phase is the second moment, and the duration of the read-write permission execution phase is the second duration, which can also be expressed as retention_period (the default is one year).
[0140] The moment when the read-write permission execution phase switches to the read-write permission expiration phase is the third moment. After the third moment, the state information of the first data is all in the read-write permission expiration phase.
[0141] In the embodiment of the present application, by introducing the changes in the status information of the first data in different time periods when the read and write permissions of the first data work within a limited time, and setting a startup duration before the read and write permissions of the first data are enabled, time is provided for each client to synchronize information with the distributed storage system, thereby avoiding a series of problems caused by information asynchrony and improving the reliability of the solution.
[0142] When, in the first identifier, the read / write permission management field indicates that the read / write permission of the first data is enabled, the read / write permission start waiting field indicates the first duration, and the read / write permission duration field indicates indefinite, there are two possible situations in which the state information of the first data changes over time:
[0143] From the first moment to the second moment, the status information of the first data is the read-write permission startup stage. In this stage, the first data can be deleted and modified, and the read-write permission of the first data is not yet effective. The first moment is the moment when the first metadata is obtained, and the interval between the second moment and the first moment is the first duration.
[0144] After the second moment, the state information of the first data is the indefinite execution stage of the read and write permissions.
[0145] For easier understanding, see Figure 6 ,Depend on Figure 6 It can be seen that the state information of the first data changes with time. When the first identifier is the worm_info attribute structure:
[0146] The read-write permission enabling phase can be represented as worm_enable, and the read-write permission indefinite execution phase can be represented as worm_retain_period_unlimit.
[0147] The starting time of worm_enable, that is, the first time is the time of setting the worm information, and the duration of the read-write startup phase is the first duration, which can also be expressed as auto_commit_period.
[0148] The moment when the read-write startup phase switches to the read-write permission execution phase is the second moment. After the second moment, the state information of the first data is the read-write permission execution phase indefinitely.
[0149] In the embodiment of the present application, by introducing the changes in the status information of the first data at different time periods when the read and write permissions of the first data work for an unlimited period of time, and utilizing the unlimited working time of the read and write permissions, the first data is set to be unchangeable data in one step, which reduces the operation process while providing users with more options and improving the diversity of solutions.
[0150] It is understandable that the description of the status information of the first data in a specific application scenario here is only an example. In actual applications, the status information of the first data should be set in combination with the specific application scenario, and no limitation is made here.
[0151] Based on the above description, when the first identifier is a worm_info attribute structure, the state information of the first data may be as follows: Figure 7 As shown, the status information of the first data can be worm_enable, which is used to describe the read-write permission startup stage, and the first data can be deleted or modified at this time; the status information of the first data can also be worm_retain, which is used to describe the read-write permission execution stage, and the first data cannot be deleted or modified at this time; the status information of the first data can also be worm_expire, which is used to describe the read-write permission expiration stage, and the first data can be deleted or modified at this time; the status information of the first data can also be worm_retain_period_unlimit, which is used to describe the read-write permission expiration stage, and the first data cannot be deleted or modified at this time.
[0152] To help better understand the transformations between the four states of the first data, see Figure 8 ,Depend on Figure 8 It can be seen that when the first identifier is the worm_info attribute structure, after the user sets the worm_info attribute structure through the first client, the status information of the first data is first switched to worm_enable, and then can be switched to worm_retain, or worm_retain_period_unlimit. When the status information of the first data is worm_retain, the status of the first data can also be switched to worm_expire.
[0153] It is understandable that the description and examples of the status information of the first data here are all examples. In specific application scenarios, they should be set in combination with specific needs and are not limited here.
[0154] S104: The distributed storage system adds state information to the first metadata to obtain updated first metadata;
[0155] After obtaining the state information of the first data, the distributed storage system adds the state information of the first data to the first metadata to obtain updated first metadata.
[0156] S105. The distributed storage system sends the updated first metadata to the first client and the second client;
[0157] After the distributed storage system adds the state information of the first data to the first metadata and obtains the updated first metadata, it is also necessary to synchronize the updated first metadata to the client related to the first data.
[0158] For example, see Fig. 9 Whenever the state information of the first data changes, the MDS service sends the updated first metadata to the first client and the second client, wherein the first client and the second client are both associated with the first data. The first client is the owner of the first data, and the second client is the client that has read or modified the first data. At the same time, the MDS also stores the state information of the first data in Rados to avoid the loss of the state information of the first data after the device is powered off.
[0159] It is understandable that the description here of the distributed storage system sending the updated first metadata to the associated client of the first data is only an example. In actual application, it should be set in combination with specific application scenarios and usage requirements, and is not limited here.
[0160] It is understandable that the description of step S105 and step S106 here is only an example. In actual application, there is no clear order between step S105 and step S106, and no limitation is made here.
[0161] S106: The second client obtains a first read / write request in response to an operation on the first data read / write interface;
[0162] The second client obtains a first read / write request in response to an operation on the first data read / write interface, wherein the first read / write request is used to read / write the first data.
[0163] Exemplarily, the first read / write request may be to read the first data, or the first read / write request may be a modification operation, such as setattr, unlink, rename, or setxattr.
[0164] It is understandable that the description of the first read / write request here is only an example. In actual application, it should be set in combination with specific application scenarios and requirements, and is not limited here.
[0165] S107. The second client sends a first read / write request to the distributed storage system;
[0166] After the second client obtains the first read / write request, it sends the first read / write request to the distributed storage space.
[0167] Exemplarily, when the second client obtains the first read / write request, the state information of the first data obtained by the second client is lost due to the restart of the second client:
[0168] The second client cannot process the first read / write request according to the status information of the first data, so the second client sends the first read / write request to the distributed storage system.
[0169] Optionally, when the second client stores the state information of the first data, refer to Fig.10 The worm inspection module of the second client can process the first read / write request according to the status information of the first data.
[0170] Specifically, when the status information of the first data is stored in the second client, and the status information of the first data is in the read-write permission startup stage, or the read-write permission expiration stage, or the read-write permission execution stage, when the first read-write request indicates reading the first data, the second client sends the first read-write request to the distributed storage space.
[0171] When the second client stores status information of the first data, and the status information of the first data is in the read / write permission startup stage, or the read / write permission expiration stage, and the first read / write request indicates deletion or modification of the first data, the second client sends the first read / write request to the distributed storage space.
[0172] When status information of the first data is stored in the second client, and the status information is in the read-write permission execution stage, or the read-write permission execution stage indefinitely, when the first read-write request indicates deletion or modification of the first data, a first signal is displayed through the second client, and the first signal is used to describe that the first data cannot be deleted or modified.
[0173] Exemplarily, the first signal may be a read-only reminder.
[0174] Depend on Fig.10 It can be seen that the worm check module of the MDS service can not only process user requests that are not processed by the client, but also limit cluster internal requests between MDS services. For example, when the first data is a directory, the directory of the first data is split, or the files in the directory fragment of the first data are migrated from one MDS service to another MDS, etc. There is no restriction here.
[0175] It is understandable that the description of the second client sending the first read / write request to the distributed storage system is only an example. In actual application, it should be set in combination with the specific application scenario and is not limited here.
[0176] S108: The distributed storage system processes the first read / write request according to the status information of the first data.
[0177] After obtaining the first read / write request, the distributed storage system processes the first read / write request according to the state information of the first data.
[0178] Exemplarily, when the status information of the first data is the read / write permission startup stage, or the read / write permission expiration stage, or the read / write permission execution stage, and the first read / write request indicates reading the first data, the distributed storage system sends the first data to the second client.
[0179] When the status information of the first data is in the read / write permission startup stage, or the read / write permission expiration stage, and the first read / write request indicates deletion or modification of the first data, the distributed storage system deletes or modifies the first data according to the first read / write request.
[0180] When the status information of the first data is the read / write permission execution stage, or the read / write permission indefinite execution stage, and the first read / write request indicates deletion or modification of the first data, a first signal is sent to the second client, and the first signal is used to describe that the first data cannot be deleted or modified.
[0181] In an embodiment of the present application, unified management of read and write requests for first data initiated by any client in a distributed storage system is achieved through status information of different first data, thereby avoiding inconsistent processing standards for read and write requests for first data by different clients and improving the reliability of the solution.
[0182] In an embodiment of the present application, after obtaining the first metadata sent by the first client, the read and write permissions of the first data are processed according to the first identifier carried by the first metadata, and the status information of the first data used to describe the execution status of the read and write permissions of the first data is obtained. The status information of the first data is sent to the client that has an associated relationship with the first data, so that when the client that has an associated relationship with the first data needs to read and write the first data, it can use the status information of the first data to process the read and write requirements related to the first data. At the same time, the distributed storage system can also process the read and write requests related to the first data according to the status information of the first data. Unified management of the permissions of all clients to read and write the first data is achieved, thereby improving the reliability of the distributed storage system.
[0183] It can be understood that the description of read and write permissions in this application is introduced from the perspective of setting the first data as read-only access (archiving). In actual applications, other restrictions can be made on read and write permissions. For example, the first data can only be modified in the form of new additions, etc., which are not restricted here.
[0184] In this application Figure 2 In an optional embodiment of the data processing method provided by the corresponding embodiment, when the state information of the first data is in the read-write permission execution stage, or the read-write permission indefinite execution stage, some emergency situations may occur and the first data needs to be deleted or modified. At this time, the read-write permission deactivation request can be sent to the distributed storage system to end the read-write permission execution state of the first data. Please refer to Fig.11, the data processing method provided by the embodiments of this application includes: steps S201 to S202. Specifically:
[0185] S201. When the status information of the first data is in the read-write permission execution stage or the read-write permission indefinite execution stage, obtain the read-write permission deactivation request sent by the third client;
[0186] When the status information of the first data is in the read-write permission execution stage or the read-write permission indefinite execution stage, the first data is in a read-only state. However, due to storage space issues, some of the first data and other data stored in the distributed storage system need to be cleared immediately. Since the first data is read-only data, the third client sends a read-write permission deactivation request to the distributed storage system to deactivate the read-write permission execution stage of the first data or the read-write permission indefinite execution stage of the first data.
[0187] Among them, obtaining the read-write permission deactivation request sent by the third client can specifically be that the distributed system administrator types in the read-write permission deactivation request through the third client. The read-write permission deactivation request carries the identity identifier (identify document, ID) of the first data. Before the distributed system administrator types in the read-write permission deactivation request through the third client, the administrator also logs in to the distributed management system through the third client to verify their administrator identity.
[0188] Exemplarily, please refer to Fig.12 , when the status information of the first data is in the read-write permission execution stage or the read-write permission indefinite execution stage, that is, when the worm is in the worm_retain and worm_retain_period_unlimit states, the first client sends ceph daemon commands to the MDS service through the unix socket.
[0189] Among them, the format of the daemon command is as Fig.12 shown. The daemon command format can be "ceph daemon <MDS socket path> <archive path name> worm set expire true".
[0190] It can be understood that here, taking the third client sending a permission deactivation request to the distributed storage system as an example, the update method of the status information of the first data is introduced. In actual applications, it can also be sent by other users with read-write permission deactivation permissions through other clients. The specific implementation should be set according to the specific application scenario and is not limited here.
[0191] S202. Update the status information of the first data to the read-write permission expiration stage.
[0192] After the distributed storage system obtains the read-write permission deactivation request sent by the first client, the state information of the first data stored in the state machine is updated to the read-write permission expiration stage.
[0193] For example, Fig.12 As shown in the figure, after receiving the command, the MDS service switches the state of worm_info to worm_expire.
[0194] Furthermore, the MDS service may also update the worm_info of the first data to the client related to the first data, for example, sending the updated first metadata to the first client and the second client.
[0195] It can be understood that the description here that after the distributed storage system updates the status information of the first data, the updated status information of the first data is sent to the client related to the first data is only an example. In actual application, it should be set in combination with specific application scenarios and is not limited here.
[0196] In an embodiment of the present application, state information switching is performed for first data that is in the read / write permission execution stage, or the read / write permission execution stage indefinitely, providing a solution for the user's temporary need to delete or modify the first data, further improving the flexibility of the solution.
[0197] Furthermore, Figure 2 and Fig.11 In the data processing method introduced in , the first data can be a single file, or can be the corresponding files and subdirectories in the entire directory, which is not limited here.
[0198] For detailed implementation principles, please refer to Fig.13 . Specifically:
[0199] When the first data is a directory, the setfattr-n ceph.worm command used by the user to add the first identifier to the first metadata through the first client may be setfattr-n file.ceph.worm, so as to set read and write permissions for the directory and the files and subdirectories under the directory at the same time, that is, to implement the solution provided in this application with the directory as the granularity.
[0200] When the first data is a file, the setfattr-n ceph.worm command used by the user to add the first identifier to the first metadata through the first client may be setfattr-n dir.ceph.worm, so as to set the read and write permissions for the file, that is, to implement the solution provided in this application at the file granularity.
[0201] It is understandable that the description of the granularity of the first data here is only an example. In actual applications, the granularity of the first data includes but is not limited to directories and files. The specific usage scenario should be set in combination with specific usage requirements and is not limited here.
[0202] For ease of understanding, the following will combine Fig.14a and Fig.14b This paper introduces a data processing method applied to the cephfs distributed storage system, which needs to set permissions for archiving data.
[0203] First, combine Fig.14a This section introduces the archiving setting process, specifically:
[0204] When it is determined that files and directories need to be archived, users add extended attributes to files and directories through the client, and the client sends the extended attributes of files and directories to the MDS service. The MDS service updates the worm information of the cinode according to the extended attributes of the files and directories. The MDS service returns the cinode information to the client, and the client uses the cinode with worm to control the read and write requests of the file and directory. Among them, the extended attributes carry ceph.worm.enable, ceph.worm.auto_commit_period, and Ceph.worm.retention_period; the cinode information carries worm_enable, or worm_retain, or worm_expire, or worm_retain_period_unlimit.
[0205] Secondly, combined Fig.14b The following describes the process of switching the archiving status of files and directories.
[0206] When the user needs to switch the status of files and directories in the archive state to make them jump out of the archive state, the user first sends a daemon command through the unix socket. The MDS service receives the daemon command through the unix socket. According to the daemon command, the MDS switches the worm_info in the cinode to worm_expire. The switched cinode information is sent to the client associated with the file and the directory.
[0207] The following is a detailed description of the data processing device in this application. Fig.15 . Fig.15 This is a schematic diagram of an embodiment of a data processing device 10 in an embodiment of the present application. The data processing device 10 includes:
[0208] An acquiring unit 110 is configured to acquire first metadata sent by a first client, where the first metadata carries a first identifier, where the first identifier is used to describe read and write permissions for the first data, and the first metadata is metadata of the first data;
[0209] A processing unit 120 is used to process the read and write permission of the first data according to the first identifier, and obtain state information of the first data, where the state information is used to describe an execution state of the read and write permission of the first data;
[0210] The processing unit 120 is further configured to add the state information to the first metadata to obtain updated first metadata;
[0211] A sending unit 130 is configured to send the updated first metadata to a second client, where the second client is associated with the first metadata;
[0212] The acquiring unit 110 is further configured to acquire a first read / write request sent by the second client, where the first read / write request is used to read / write the first data;
[0213] The processing unit 120 is further configured to process the first read / write request according to the status information.
[0214] Optionally, the first identifier includes a read-write permission management field, a read-write permission enable wait field, and a read-write permission duration field, the read-write permission management field is used to describe whether the read-write permission of the first data is enabled, the read-write permission start wait field is used to describe the duration from the moment the first data is created to the moment the read-write permission of the first data is started, and the read-write permission duration is used to describe the duration from the moment the read-write permission of the first data is started to the moment the read-write permission of the first data is closed.
[0215] Optionally, the read / write permission management field indicates that the read / write permission of the first data is enabled, the read / write permission start waiting field indicates a first duration, and the read / write permission duration field indicates a second duration;
[0216] The processing unit 120 is specifically configured to:
[0217] From the first moment to the second moment, the state information of the first data is set to the read-write permission startup stage according to the first identifier, the first moment is the moment of writing the first data, and the interval between the second moment and the first moment is the first duration;
[0218] From the second moment to the third moment, the state information of the first data is set to the read-write permission execution stage according to the first identifier, and the interval between the third moment and the second moment is the second duration;
[0219] After the third moment, the state information of the first data is set to the read and write permission expiration stage according to the first identifier.
[0220] Optionally, the read / write permission management field indicates that the read / write permission of the first data is enabled, the read / write permission start waiting field indicates a first duration, and the read / write permission duration field indicates indefinite;
[0221] The processing unit 120 is specifically configured to:
[0222] From the first moment to the second moment, the state information of the first data is set to the read-write permission startup stage according to the first identifier, the first moment is the moment of writing the first data, and the interval between the second moment and the first moment is the first duration;
[0223] After the second moment, the state information of the first data is set to the indefinite execution stage of the read and write permissions according to the first identifier.
[0224] Optionally, the processing unit 120 is specifically configured to:
[0225] When the state information is the read-write permission startup stage, the read-write permission expiration stage, or the read-write permission execution stage, and the first read-write request indicates reading the first data, sending the first data to the second client;
[0226] When the state information is the read / write permission startup stage or the read / write permission expiration stage, and the first read / write request indicates deletion or modification of the first data, deleting or modifying the first data according to the first read / write request;
[0227] When the status information is the read / write permission execution stage, and the first read / write request indicates deletion or modification of the first data, a first signal is sent to the second client, where the first signal is used to describe that the first data cannot be deleted or modified.
[0228] Optionally, the acquisition unit 110 is further configured to, when the state information is the read / write permission execution stage, acquire a read / write permission deactivation request sent by the first client;
[0229] The processing unit 120 is further configured to update the status information to the read / write permission expiration stage.
[0230] Optionally, the processing unit 120 is specifically configured to:
[0231] When the state information is the read-write permission startup stage / read-write permission indefinite execution stage, and the first read-write request indicates reading the first data, sending the first data to the second client;
[0232] When the state information is the read / write permission startup stage, and the first read / write request indicates to delete or modify the first data, deleting or modifying the first data according to the first read / write request;
[0233] When the status information is that the read / write permission is indefinitely executed, and the first read / write request indicates deletion or modification of the first data, a first signal is sent to the second client, where the first signal is used to describe that the first data cannot be deleted or modified.
[0234] Optionally, the acquisition unit 110 is further used to acquire a read / write permission deactivation request sent by the first client when the state information is the read / write permission indefinite execution stage;
[0235] The processing unit 120 is further configured to update the status information to the read / write permission expiration stage.
[0236] Fig.16 This is a schematic diagram of an embodiment of a data processing device 20 in an embodiment of the present application. The data processing device 20 includes:
[0237] An interactive unit 210 is configured to display a first data read / write interface through an interactive interface, wherein the first data read / write interface includes read / write options for first data, and the first data is data written by a first client;
[0238] an acquiring unit 220, configured to acquire updated first metadata, wherein the updated first metadata includes a first identifier and status information of the first data, wherein the first identifier is used to describe the read and write permissions of the first data, and the status information is used to describe the execution status of the read and write permissions of the first data, and the updated first metadata is metadata of the first data;
[0239] The interaction unit 210 is further configured to obtain a first read / write request in response to an operation based on the first data read / write interface, wherein the first read / write request is used to read and write the first data;
[0240] The processing unit 230 is configured to process the first read / write request according to the updated first metadata.
[0241] Fig.17 This is a schematic diagram of an embodiment of a data processing device 30 in an embodiment of the present application. The data processing device 30 includes:
[0242] An interactive unit 310 is configured to display a first metadata setting interface through an interactive interface, wherein the first metadata setting interface includes setting options for a first identifier, wherein the first identifier is used to describe the read and write permissions of the first data, and the first metadata is metadata of the first data;
[0243] An acquiring unit 320 is configured to acquire and upload the first metadata in response to an operation on the first metadata setting interface, where the first metadata carries the first identifier;
[0244] The acquisition unit 320 is also used to acquire the updated first metadata sent by the distributed storage system, and the updated first metadata is metadata obtained by the distributed storage system by adding the status information of the first data to the first metadata according to the first identifier, and the status information is used to describe the execution status of the read and write permissions of the first data.
[0245] Fig.18 4 is a schematic diagram of a server structure provided in an embodiment of the present application. The server 400 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 422 (for example, one or more processors) and a memory 432, and one or more storage media 430 (for example, one or more mass storage devices) storing application programs 442 or data 444. Among them, the memory 432 and the storage medium 430 may be short-term storage or permanent storage. The program stored in the storage medium 430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 422 may be configured to communicate with the storage medium 430 to execute a series of instruction operations in the storage medium 430 on the server 400.
[0246] The server 400 may also include one or more power supplies 426, one or more wired or wireless network interfaces 450, one or more input and output interfaces 458, and / or one or more operating systems 441, such as Windows Server 2000. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.
[0247] The steps performed by the server in the above embodiment can be based on the Fig.18 The server structure shown.
[0248] The client mentioned in this application includes but is not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, aircraft, etc. The embodiments of the present invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc.
[0249] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0250] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0251] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0252] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0253] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., and other media that can store program codes.
[0254] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application 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 replace some of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for data processing, characterized in that: include: Acquire first metadata sent by a first client, where the first metadata carries a first identifier, the first identifier is used to describe read and write permissions of the first data, and the first metadata is metadata of the first data; Processing the read and write permissions of the first data according to the first identifier to obtain state information of the first data, where the state information is used to describe an execution state of the read and write permissions of the first data; adding the state information to the first metadata to obtain updated first metadata; Sending the updated first metadata to a second client, where the second client is associated with the first metadata; Obtaining a first read / write request sent by the second client, where the first read / write request is used to read and write the first data; The first read / write request is processed according to the status information.
2. The method according to claim 1, characterized in that The first identifier includes a read-write permission management field, a read-write permission enable wait field, and a read-write permission duration field. The read-write permission management field is used to describe whether the read-write permission of the first data is enabled, the read-write permission start wait field is used to describe the duration from the first data creation moment to the read-write permission start moment of the first data, and the read-write permission duration is used to describe the duration from the read-write permission start moment of the first data to the read-write permission shutdown moment of the first data.
3. The method according to claim 2, characterized in that The read / write permission management field indicates that the read / write permission of the first data is enabled, the read / write permission start waiting field indicates a first duration, and the read / write permission duration field indicates a second duration; Processing the read and write permissions of the first data according to the first identifier to obtain the status information of the first data includes: From the first moment to the second moment, the state information of the first data is set to the read-write permission startup stage according to the first identifier, the first moment is the moment of writing the first data, and the interval between the second moment and the first moment is the first duration; From the second moment to the third moment, the state information of the first data is set to the read-write permission execution stage according to the first identifier, and the interval between the third moment and the second moment is the second duration; After the third moment, the state information of the first data is set to the read and write permission expiration stage according to the first identifier.
4. The method according to claim 2, characterized in that: The read / write permission management field indicates that the read / write permission of the first data is enabled, the read / write permission start waiting field indicates a first duration, and the read / write permission duration field indicates an unlimited duration; Processing the read and write permissions of the first data according to the first identifier to obtain the status information of the first data includes: From the first moment to the second moment, the state information of the first data is set to the read-write permission startup stage according to the first identifier, the first moment is the moment of writing the first data, and the interval between the second moment and the first moment is the first duration; After the second moment, the state information of the first data is set to the indefinite execution stage of the read and write permissions according to the first identifier.
5. The method according to claim 3, characterized in that: The processing of the first read / write request according to the state information includes: When the state information is the read-write permission startup stage, the read-write permission expiration stage, or the read-write permission execution stage, and the first read-write request indicates reading the first data, sending the first data to the second client; When the state information is the read / write permission startup stage or the read / write permission expiration stage, and the first read / write request indicates deletion or modification of the first data, deleting or modifying the first data according to the first read / write request; When the status information is the read / write permission execution stage, and the first read / write request indicates deletion or modification of the first data, a first signal is sent to the second client, where the first signal is used to describe that the first data cannot be deleted or modified.
6. The method according to claim 3, characterized in that The method further comprises: When the state information is the read-write permission execution stage, obtaining a read-write permission deactivation request sent by the first client; The status information is updated to the read and write permission expiration stage.
7. The method according to claim 4, characterized in that The processing of the first read / write request according to the state information includes: When the state information is the read-write permission startup stage / read-write permission indefinite execution stage, and the first read-write request indicates reading the first data, sending the first data to the second client; When the state information is the read / write permission startup stage, and the first read / write request indicates to delete or modify the first data, deleting or modifying the first data according to the first read / write request; When the status information is that the read / write permission is indefinitely executed, and the first read / write request indicates deletion or modification of the first data, a first signal is sent to the second client, where the first signal is used to describe that the first data cannot be deleted or modified.
8. The method according to claim 4, characterized in that The method further comprises: When the state information indicates that the read / write permission is indefinitely executed, obtaining a read / write permission deactivation request sent by the first client; The status information is updated to the read and write permission expiration stage.
9. A method of data processing, characterized in that: include: Displaying a first data read-write interface through an interactive interface, wherein the first data read-write interface includes read-write options for first data, and the first data is data written by the first client; Acquire updated first metadata, where the updated first metadata includes a first identifier and status information of the first data, where the first identifier is used to describe the read and write permissions of the first data, and the status information is used to describe the execution status of the read and write permissions of the first data, and the updated first metadata is metadata of the first data; In response to an operation based on the first data read / write interface, obtaining a first read / write request, where the first read / write request is used to read and write the first data; The first read / write request is processed according to the updated first metadata.
10. A method of data processing, characterized in that: include: Displaying a first metadata setting interface through an interactive interface, wherein the first metadata setting interface includes setting options for a first identifier, the first identifier is used to describe the read and write permissions of the first data, and the first metadata is metadata of the first data; In response to an operation on the first metadata setting interface, obtaining and uploading the first metadata, where the first metadata carries the first identifier; Obtain updated first metadata sent by the distributed storage system, wherein the updated first metadata is metadata obtained by the distributed storage system by adding status information of the first data to the first metadata according to the first identifier, and the status information is used to describe the execution status of the read and write permissions of the first data.
11. A data processing device, characterized in that: include: An acquiring unit, configured to acquire first metadata sent by a first client, wherein the first metadata carries a first identifier, the first identifier is used to describe the read and write permissions of the first data, and the first metadata is metadata of the first data; a processing unit, configured to process the read and write permission of the first data according to the first identifier, and obtain state information of the first data, wherein the state information is used to describe an execution state of the read and write permission of the first data; The processing unit is further configured to add the state information to the first metadata to obtain updated first metadata; a sending unit, configured to send the updated first metadata to a second client, where the second client is associated with the first metadata; The acquiring unit is further used to acquire a first read / write request sent by the second client, where the first read / write request is used to read and write the first data; The processing unit is further configured to process the first read / write request according to the status information.
12. A data processing device, characterized in that: include: An interactive unit, configured to display a first data read-write interface through an interactive interface, wherein the first data read-write interface includes read-write options for first data, and the first data is data written by a first client; an acquiring unit, configured to acquire updated first metadata, wherein the updated first metadata includes a first identifier and status information of the first data, wherein the first identifier is used to describe the read and write permissions of the first data, and the status information is used to describe the execution status of the read and write permissions of the first data, and the updated first metadata is metadata of the first data; The interaction unit is further configured to obtain a first read / write request in response to an operation based on the first data read / write interface, wherein the first read / write request is used to read and write the first data; A processing unit is used to process the first read and write request according to the updated first metadata.
13. A data processing device, characterized in that: include: An interactive unit, configured to display a first metadata setting interface through an interactive interface, wherein the first metadata setting interface includes a first identifier setting option, wherein the first identifier is used to describe the read and write permissions of the first data, and the first metadata is metadata of the first data; an acquisition unit, configured to obtain and upload the first metadata in response to an operation on the first metadata setting interface, wherein the first metadata carries the first identifier; The acquisition unit is further used to acquire updated first metadata, where the updated first metadata includes the first identifier and status information of the first data, where the status information is used to describe an execution status of the read and write permissions of the first data.
14. A computer device, characterized in that: include: memories, transceivers, processors, and bus systems; Wherein, the memory is used to store programs; The processor is used to execute the program in the memory, including executing the data processing method according to any one of claims 1 to 10; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
15. A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to execute the data processing method according to any one of claims 1 to 10.