Object operation method and device, equipment and storage medium
By introducing sub-identifications of management objects and operation objects for operation object identification in a multi-tenant relational database system, the problems of data isolation and forward compatibility are solved, and the global uniqueness of operation object identification and system stability are realized.
Patent Information
- Application Number
- CN202411692282.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-04-25
AI Technical Summary
In a multi-tenant relational database system, data isolation of different tenants is required, while the prior art is difficult to achieve global uniqueness of operation object identification while ensuring forward compatibility and not increasing maintenance overhead.
By introducing a sub-identification for indicating the management object and a sub-identification for indicating the operation object into the identification of the operation object, it is ensured that the identification of the operation object is globally unique in the computing system and the identification length remains unchanged.
Isolation between different management objects is achieved, forward compatibility of the system is maintained, and maintenance overhead is not increased.
Smart Images

Figure CN119884033A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of database technology, and in particular to an object operation method, device, equipment and storage medium. Background Art
[0002] In a relational database system, a tuple is usually used to correspond to a piece of physical data, so that when accessing it within the database, its logical form is used instead of the physical path. For example, a tuple (identity document (ID), table ID) can be used to uniquely identify a piece of table data within a database system. If the table data corresponds to a file, this tuple can be used by the database system to uniquely identify a file.
[0003] After the introduction of the multi-tenant mechanism, the relational database system supports providing storage services for multiple tenants. When the relational database system is deployed on the cloud, multiple tenants need to isolate their data from each other. Since the identifiers of databases and files under different tenants may be repeated, in order to ensure the data storage security of tenants, it is necessary to configure the identifier of the database under a tenant to be globally unique, so as to achieve data isolation between different tenants.
[0004] For databases that have already been put into use, it is necessary to explore an object operation method that ensures forward compatibility without increasing maintenance overhead. Summary of the invention
[0005] The present application provides an object operation method, apparatus, device and storage medium, which realize mutual isolation between management objects while keeping the number of bits of the identification of the operation object unchanged, have good forward compatibility and do not increase maintenance overhead.
[0006] In order to achieve the above purpose, the embodiment of the present application adopts the following technical solution:
[0007] In the first aspect, an embodiment of the present application provides an object operation method, which is applied to a management device of a computing system, wherein the computing system is configured with multiple operation objects associated with a management object, and different management objects are associated with different operation objects. An L-bit globally unique identifier is used in the computing system to indicate the operation object, and L is a positive integer greater than 1. The method includes: receiving a request message sent by a first management object, the request message includes an identifier of a first operation object associated with the first management object, a t-bit first sub-identifier at a first position in the identifier of the first operation object is used to indicate the first management object, and an Lt-bit second sub-identifier at a second position in the identifier of the first operation object is used to indicate the first operation object, t is a positive integer, and L is greater than t; the first position does not overlap with the second position. According to the identifier of the first operation object, the operation indicated by the request message is performed on the operation target of the request message, and the operation target includes at least one of the following: the first operation object, the data stored in the first operation object, or the attribute data of the first operation object.
[0008] Through the scheme provided in the present application, the identification of the operation object includes a sub-identifier for indicating the management object and a sub-identifier for indicating the operation object, which can isolate different management objects. The identification of the first operation object has the function of distinguishing different management objects and different operation objects. At the same time, the identification of the operation object still maintains the L-bit length configured by the system, and the length remains unchanged and is globally unique. In this way, it can be compatible with the scenario where the computing system supports a single management object, and can also support the isolation requirements in the scenario of multiple management objects. Furthermore, since the identification length of the operation object remains unchanged, the maintenance overhead will not be increased.
[0009] Moreover, in the method provided in the present application, the identification length of the operation object is the same as the identification length of the operation object when a single management object is included in the computing system, which is L bits in length. Thus, when multiple management objects are introduced into the computing system, there is no need to adjust the execution logic that requires the use of the identification of the operation object, thus having good forward compatibility.
[0010] Moreover, the solution provided in the present application ensures that the identifier of the operation object is globally unique in the computing system, so that the operation target can be uniquely indicated by the identifier of the operation object in the request message, thereby ensuring that after receiving the request message, the management device can locate the correct operation object in the computing system based on the identifier of the operation object carried in the request message, and then locate the correct operation target and perform operations, thereby improving the reliability of the computing system.
[0011] In a possible implementation, the object operation method provided in this embodiment further includes: upon receiving an instruction for generating a first operation object, obtaining a Z-bit first intermediate identifier; then, obtaining the identifier of the first operation object according to the first intermediate identifier and the second intermediate identifier. The second intermediate identifier includes the t-bit identifier at the third position in the X-bit original identifier of the first management object; the t-bit identifier at the third position in the X-bit original identifier of the first management object is the first sub-identifier. X is greater than t and less than or equal to L. The original identifier of the first management object is generated upon receiving an instruction to generate the first management object. The content of the t-bit identifier at the third position in the original identifier of the first management object is used as the first sub-identifier to distinguish different management objects, and at the same time, combined with the first intermediate identifier of the first operation object, to obtain the identifier of the first operation object, so that the identifier of the first operation object has both the function of distinguishing different management objects and the function of distinguishing different operation objects.
[0012] In a possible implementation, when Z and X are L, the second intermediate identifier is obtained according to the original identifier, the t-bit identifier at the first position of the second intermediate identifier is the t-bit identifier at the third position of the original identifier, and all the identifiers other than the first position of the second intermediate identifier are invalid identifiers. Accordingly, the above-mentioned obtaining the identifier of the first operation object according to the first intermediate identifier and the second intermediate identifier includes: obtaining the third intermediate identifier according to the first intermediate identifier, the Lt-bit identifier at the second position of the third intermediate identifier is the Lt-bit identifier at the fourth position of the first intermediate identifier, and all the identifiers other than the second position of the third intermediate identifier are invalid identifiers, and the Lt-bit identifier at the fourth position of the first intermediate identifier is the second sub-identifier; merging the contents of the same position of the second intermediate identifier and the third intermediate identifier to obtain an L-bit splicing identifier; when the splicing identifier is globally unique in the computing system, the splicing identifier is used as the identifier of the first operation object. The result of merging the content of one position with the invalid identifier is the content itself. The content of the Lt bit identifier at the fourth position in the first intermediate identifier of the first operation object is used as the second sub-identifier to distinguish different operation objects. At the same time, the second intermediate identifier containing the first sub-identifier is combined to obtain the identifier of the first operation object, so that the identifier of the first operation object has both the function of distinguishing different management objects and the function of distinguishing different operation objects.
[0013] In order to achieve isolation between different management objects, it is necessary to ensure that the identification of the operation object is globally unique in the computing system. Since the sub-identifier used to indicate the management object is globally unique, using this sub-identifier to participate in the acquisition of the splicing identification helps to increase the probability that the splicing identification is globally unique in the computing system, thereby reducing the number of times the splicing identification is re-acquired, thereby helping to improve the generation efficiency of the identification of the operation object.
[0014] Furthermore, the length of the splicing identifier is the same as the length of the identifier of the operation object. When the splicing identifier is determined to be globally unique, it is helpful to relatively simply obtain the identifier of the operation object according to the splicing identifier. For example, the splicing identifier is used as the identifier of the operation object. In this way, when the identifier of the operation object is guaranteed to be globally unique, it is helpful to improve the generation efficiency of the identifier of the operation object.
[0015] In a possible implementation, the method provided by the present application may further include: upon receiving an instruction for generating a first management object, generating the above-mentioned original identifier; and generating a second intermediate identifier based on the original identifier, so as to support the use of the second intermediate identifier when generating an identifier of an operation object associated with the first management object.
[0016] In a possible implementation, a third intermediate identifier may be obtained based on the first intermediate identifier by bit operation, that is, the content of the fourth position in the first intermediate identifier is moved to the second position by bit operation, and other positions are configured as invalid to obtain the third intermediate identifier. Alternatively, a second intermediate identifier may be obtained based on the original identifier by bit operation, that is, the content of the third position in the original identifier is moved to the first position by bit operation, and other positions are configured as invalid to obtain the second intermediate identifier.
[0017] Since binary encoding is fast, the shift operation helps to obtain the third intermediate identifier or the second intermediate identifier more quickly, which helps to increase the generation speed of the splicing identifier, thereby improving the generation efficiency of the identifier of the operation object.
[0018] In a possible implementation, the second intermediate identifier is the first sub-identifier, and obtaining the identifier of the first operation object according to the first intermediate identifier and the second intermediate identifier includes: using the Lt-bit identifier at the fourth position in the first intermediate identifier as the second sub-identifier; splicing the first sub-identifier and the second sub-identifier to obtain an L-bit spliced identifier; the first position in the spliced identifier is the first sub-identifier, and the second position in the spliced identifier is the second sub-identifier; when the spliced identifier is globally unique in the computing system, the spliced identifier is used as the identifier of the first operation object. The second sub-identifier and the first sub-identifier are obtained by interception, and the identifier of the first operation object is spliced.
[0019] In a possible implementation, the fourth position is a position in the first intermediate identifier for distinguishing different operation objects, and the fourth position may be a continuous Lt position in the first direction, where the first direction is from high to low, or from low to high. The third position is a position in the above-mentioned original identifier for indicating different management objects, and the third position is a continuous t position in the second direction, where the second direction is from high to low, or from low to high. In a possible implementation, the object operation method provided in the embodiment of the present application also includes: upon receiving an instruction for generating a first management object, generating an X-bit original identifier of the first management object; generating the above-mentioned second intermediate identifier according to the t-bit identifier of the third position in the original identifier.
[0020] In a possible implementation, t is less than Lt. Since a management object in a computing system can be associated with at least one operation object, and an operation object is associated with only one management object, the total number of operation objects in the computing system is greater than the total number of management objects during most of the time when the computing system is running. By setting t less than Lt, 2 L-t As large as possible so that the L-bit operation object identifier can identify as many operation objects as possible.
[0021] In a possible implementation, the first position is the high t position, and the second position is the low Lt position, that is, the first sub-identifier is located at the high position of the identifier of the first operation object, and the second sub-identifier is located at the low position of the identifier of the first operation object.
[0022] In a possible implementation, the first position is the low t position, and the second position is the high Lt position, that is, the first sub-identifier is located at the low position of the identifier of the first operation object, and the second sub-identifier is located at the high position of the identifier of the first operation object.
[0023] In a possible implementation, the computing system is a relational database system, the management object is a tenant, and the operation object is a database, so as to achieve isolation of different tenants without changing the length of the database identifier, so that the distributed file storage system supports multiple tenants.
[0024] In a possible implementation, receiving a request message sent by a first management object includes: receiving a request message sent by a first tenant, the request message also including a third sub-identifier, the third sub-identifier being a unique identifier of a first file in a first database; the operation target is the first file; the request message is used to perform a target operation on the first file, the target operation includes reading, updating, or deleting. Accordingly, according to the identifier of the first operation object, the operation target of the request message is subjected to the operation indicated by the request message, including: according to the identifier of the first database, locating the first database in a relational database system; according to the third sub-identifier, locating the first file in the first database, and performing the target operation on the first file.
[0025] In a possible implementation, the computing system is a distributed file storage system, the management object is the master node (namenode), and the operation object is the child node (datanode) associated with the master node. This is to achieve isolation between child nodes associated with different master nodes without changing the length of the child node identifier, so that the distributed file storage system supports multiple master nodes.
[0026] In one possible implementation, the computing system is a distributed file storage system, the management object is a master node, and the operation object is a sub-node associated with the master node. Receiving a request message sent by a first management object includes: receiving a request message sent by a first master node, the request message also includes a fourth sub-identifier, the fourth sub-identifier is a unique identifier of the first sub-node under the first master node; the operation target is the first sub-node; the request message is used to perform a target operation on the first sub-node, and the target operation includes data migration. According to the identifier of the first operation object, the operation target of the request message is subjected to the operation indicated by the request message, including: according to the identifier of the first sub-node, locating the first master node in the distributed file storage system; according to the fourth sub-identifier, locating the first sub-node in the sub-nodes associated with the first master node, and performing data migration on the first sub-node.
[0027] In a second aspect, an embodiment of the present application provides an object operation device, which is applied to a management device of a computing system. The computing system is configured with multiple operation objects associated with a management object, and different management objects are associated with different operation objects. An L-bit globally unique identifier is used in the computing system to indicate the operation object, where L is a positive integer greater than 1. The object operation device includes: a receiving module and an operation module. Among them:
[0028] A receiving module is used to receive a request message sent by a first management object, where the request message includes an identifier of a first operation object associated with the first management object, a t-bit first sub-identifier at a first position in the identifier of the first operation object is used to indicate the first management object, and an Lt-bit second sub-identifier at a second position in the identifier of the first operation object is used to indicate the first operation object, t is a positive integer, and L is greater than t; the first position and the second position do not overlap.
[0029] The operation module is used to perform the operation indicated by the request message on the operation target of the request message according to the identifier of the first operation object, and the operation target includes at least one of the following: the first operation object, the data stored in the first operation object, or the attribute data of the first operation object.
[0030] In a possible implementation, the object operation device further includes: a first acquisition module and a second acquisition module. The first acquisition module is used to acquire a Z-bit first intermediate identifier when receiving an instruction for generating a first operation object, where Z is less than or equal to L and greater than or equal to Lt. The second acquisition module is used to acquire the identifier of the first operation object based on the first intermediate identifier and the second intermediate identifier, where the second intermediate identifier includes the t-bit identifier at the third position in the X-bit original identifier of the first management object. The t-bit identifier at the third position in the X-bit original identifier of the first management object is the first sub-identifier; X is greater than t and less than or equal to L; the original identifier is generated when receiving an instruction to generate the first management object.
[0031] In a possible implementation, Z and X are L. The t-bit identifier at the first position in the second intermediate identifier is the t-bit identifier at the third position in the original identifier. The above-mentioned second acquisition module is specifically used to: obtain the third intermediate identifier according to the first intermediate identifier, the Lt-bit identifier at the second position in the third intermediate identifier is the Lt-bit identifier at the fourth position in the first intermediate identifier, and all the identifiers other than the second position in the third intermediate identifier are invalid identifiers; merge the contents of the same position of the second intermediate identifier and the third intermediate identifier to obtain an L-bit splicing identifier; when the splicing identifier is globally unique in the computing system, use the splicing identifier as the identifier of the first operation object. The result of merging the content of one position with the invalid identifier is the content itself.
[0032] In a possible implementation, the second intermediate identifier is the first sub-identifier, and the above-mentioned second acquisition module is specifically used to: use the Lt-bit identifier at the fourth position in the first intermediate identifier as the second sub-identifier; splice the first sub-identifier and the second sub-identifier to obtain an L-bit spliced identifier; the first position in the spliced identifier is the first sub-identifier, and the second position in the spliced identifier is the second sub-identifier; when the spliced identifier is globally unique in the computing system, use the spliced identifier as the identifier of the first operation object.
[0033] In a possible implementation manner, the object operation device further includes a generation module, which is used to generate an original identifier when receiving an instruction for generating the first management object; and generate a second intermediate identifier according to the original identifier.
[0034] In a possible implementation, the fourth position is a continuous Lt position in the first direction, the first direction is from high position to low position, or from low position to high position. The third position is a continuous t position in the second direction, the second direction is from high position to low position, or from low position to high position.
[0035] In a possible implementation manner, the first position is the high position t position, and the second position is the low position Lt position; or, the first position is the low position t position, and the second position is the high position Lt position.
[0036] In a possible implementation, the computing system is a relational database system, the management object is a tenant, and the operation object is a database. The receiving module is specifically used to: receive a request message sent by a first tenant, wherein the request message also includes a third sub-identifier. The third sub-identifier is a unique identifier of the first file in the first database. The operation target is the first file. The request message is used to perform a target operation on the first file. The target operation includes reading, updating, or deleting. The operation module is specifically used to: locate the first database in the relational database system according to the identifier of the first database; locate the first file in the first database according to the third sub-identifier, and perform a target operation on the first file.
[0037] In a possible implementation, the computing system is a distributed file storage system, the management object is a master node, and the operation object is a sub-node associated with the master node. The receiving module is specifically used for the request message sent by the first master node, and the request message also includes a fourth sub-identifier, and the fourth sub-identifier is a unique identifier of the first sub-node under the first master node. The operation target is the first sub-node. The request message is used to perform a target operation on the first sub-node, and the target operation includes data migration. The operation module is specifically used to: locate the first master node in the distributed file storage system according to the identifier of the first sub-node; locate the first sub-node in the sub-nodes associated with the first master node according to the fourth sub-identifier, and perform the target operation on the first sub-node.
[0038] In a third aspect, the present application provides a computing device cluster, comprising at least one computing device, each computing device comprising a processor and a memory; the processor of at least one computing device is used to execute instructions stored in the memory of at least one computing device, so that the computing device cluster performs the method described in the first aspect or any possible implementation of the first aspect.
[0039] In a fourth aspect, the present application provides a computer program product comprising instructions, which, when executed by a computing device cluster, causes the computing device cluster to execute the method described in the first aspect or any possible implementation of the first aspect.
[0040] In a fifth aspect, the present application provides a computer-readable storage medium, comprising computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the method described in the first aspect or any possible implementation of the first aspect.
[0041] Among them, the beneficial effects described in the second to fifth aspects of the present application can refer to the analysis of the beneficial effects of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of file indexing for a relational database system that supports a single tenant;
[0043] Figure 2 A schematic diagram of file indexing for a relational database system that supports multi-tenancy;
[0044] Figure 3 A schematic diagram of the system framework provided in the embodiment of the present application;
[0045] Figure 4 A flowchart of an object operation method provided in an embodiment of the present application;
[0046] Figure 5 A schematic diagram of the composition of the identification of the operation object provided in the embodiment of the present application;
[0047] Figure 6 A flowchart of a method for configuring an identification of an operation object provided in an embodiment of the present application;
[0048] Figure 7 A flowchart of a method for identifying a configuration management object provided in an embodiment of the present application;
[0049] Figure 8 A schematic diagram of a process for generating a database identifier provided in an embodiment of the present application;
[0050] Fig. 9 A schematic diagram of an object operating device provided in an embodiment of the present application;
[0051] Fig.10 A schematic diagram of a computing device cluster provided in an embodiment of the present application;
[0052] Fig.11 A schematic diagram of a connection method between computing device clusters provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] The network architecture and business 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. A person of ordinary skill in the art can appreciate that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0054] It should be understood that in the embodiments of the present application, "at least one (item)" refers to one or more, "multiple" refers to two or more, "at least two (items)" refers to two or three and more than three, and "and / or" is used to describe the association relationship of the associated objects, indicating that there can be three relationships. For example, "A and / or B" can represent: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following (items)" or similar expressions refers to any combination of these items, including any combination of single items (items) or plural items (items). For example, at least one of a, b or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple. It should be understood that in the embodiments of the present application, "B corresponding to A" means that B is associated with A. For example, B can be determined based on A. It should also be understood that determining B based on A does not mean determining B based solely on A. B can also be determined based on A and / or other information.
[0055] It should be noted that the terms "first" and "second" in the specification, claims and drawings of the present application are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof 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 limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0056] In order to solve the above technical problems, the terms involved in the embodiments of the present application are first introduced and explained.
[0057] A database is a place where files are stored. The database supports operations such as adding, querying, updating, and deleting files.
[0058] A relational database is a database that manages files in a table format. Optionally, each table corresponds to one file.
[0059] A tuple is a fixed-size set consisting of multiple elements, each of which can be a different type of value, text, etc. For example, a tuple consisting of two elements is a two-tuple. For example, in a relational database system, files are stored in a database, and the file identifier is represented by (library ID, file ID).
[0060] Table refers to the basic element used to form a relational database. A table consists of at least rows and columns, and the rows and columns include data. Optionally, a table can be composed of multiple tuples arranged in order.
[0061] A database management system (DBMS) is a computer software system designed for managing databases. It generally has basic functions such as storage, interception, security, and backup.
[0062] Cloud tenants refer to tenants on the cloud technology platform, referred to as tenants. For example, cloud tenants are enterprises that use cloud storage services. By storing the data required for enterprise operations in the database, the employees and users of the enterprise can obtain and / or use the data from the database.
[0063] The multi-tenancy technology mechanism refers to a mechanism in which multiple cloud tenants share the same system or program components and the data between multiple tenants is isolated (independent of each other).
[0064] Distributed file system (DFS) refers to a storage system in the field of cloud storage (CS) in which a master node (also called a management node) uses application software or application interfaces to bring together a large number of different types of child nodes (associated with the master node) in the network to work together and provide data storage and business access functions to the outside world. The master node stores metadata, which includes the identifiers of the child nodes used to store files or file blocks (part of a file) under the master node.
[0065] In a relational database system, a tuple is usually used to correspond to a piece of physical data. Figure 1 As shown, for example, a tuple (library ID, table ID) can uniquely identify a table data in a database system. If each table data corresponds to a file, then this tuple is used to uniquely identify the file in the database system. The library ID is the identifier of the database storing the file, and the table ID is the identifier of the file inside the database. Exemplarily, a physical file addressing module is provided in the management data, and the physical file addressing module is used to obtain the database associated with the tenant (such as Figure 1Search the corresponding file in the database 1).
[0066] Nowadays, more and more businesses choose to deploy databases on the cloud, which promotes the introduction of multi-tenant mechanisms in relational database systems. Multi-tenant relational database system libraries require the database system to perceive cloud tenants from the inside. This is equivalent to dividing the relational database system that originally provided data management services for a single tenant to multiple tenants for simultaneous use. And data isolation is required between tenants. This also requires that the files stored in the database associated with each cloud tenant be uniquely identified in the relational database system. In other words, it is necessary to ensure that the database identifier and the file identifier are globally unique in the relational database system.
[0067] For each tenant in the relational database system, at least one database is associated to store the data of the tenant, and the identifier of the at least one database is not repeated under the tenant. In other words, the identifier of a database can uniquely indicate the database in at least one database managed by the tenant. For example, the identifiers of multiple databases associated with a tenant are unique under the tenant. For two tenants who are not aware of each other in the relational database system, a tenant does not know whether the identifier of the database associated with it is repeated with the identifier of the database associated with another tenant, nor does it know whether the internal identifier of the file stored in the database is repeated with the internal identifier of the file of other tenants in the database. In this case, the "library ID" and "table ID" in the file identifier (library ID, table ID) may not be globally unique, and the identifiers of files of different tenants may be repeated.
[0068] For example, for tenant 1 and tenant 2 in a relational database system, the identifier of database 1 associated with tenant 1 is a, and the identifier of database 2 associated with tenant 2 is also a, but database 1 and database 2 are different. When a user of tenant 1 needs to access a file with an internal identifier of b in database 1, the relational database system searches based on the tuple (a, b); if there is also a file with an internal identifier of b in database 2, it is possible to find the file with an internal identifier of b in database 2, resulting in an operation error. If there is no file with an internal identifier of b in database 2, no file can be found, resulting in an access error. Regardless of operation errors or access errors, both affect the implementation of the business and the security of the files. In addition, this situation makes the relational database system fail to meet the requirements of data isolation between different tenants under the multi-tenant mechanism.
[0069] In order to solve this problem, it is necessary to ensure that the database identifier is globally unique in the relational database system.
[0070] It is easy to imagine that the relational database system adds a physical dimension to the original tuple used to uniquely identify the file to indicate the tenant ID. Figure 2 As shown, the file identification format changes from Figure 1 The (library ID, table ID) in the table is changed to (tenant ID, library ID, table ID). In a relational database system, when the tenant ID is globally unique, the database identifier and the file identifier both include the tenant ID, which meets the requirement of data isolation between different tenants.
[0071] However, this method increases the tuple dimension and the number of bits used to indicate the file identifier. Since the database identifier and file identifier are frequently used in the database system, the file identifier is used as a key in the memory state to cache frequently used information. This method increases the dimension of the file identifier from a binary tuple to a triple tuple, which increases the access overhead of the cached frequently used information and causes the overall performance of the relational database system to decline.
[0072] Moreover, for relational database systems that have been put into use, there is usually more than one tuple used to uniquely identify data in the implementation of the database, and the database identifier and file identifier are also widely and massively stored as persistent data in non-volatile storage devices such as hard disks. The above method makes the changed database identifier and file identifier incompatible with the historically stored persistent data in the hard disk, which will involve the handling of a large number of forward compatibility issues. This causes the logical implementation of the relational database system to become bloated, and it is also easy to cause errors in the operation of the relational database system, which in turn easily affects the availability of the data stored by the tenants.
[0073] In computing systems that support multiple objects and identify objects through object IDs, it is not limited to relational database systems. Other systems also have requirements for how to ensure forward compatibility of the IDs of newly added objects without increasing overhead.
[0074] For example, in a distributed file storage system, a master node is associated with multiple child nodes. In the case of a distributed file storage system including one master node, it is only necessary to ensure that the identifiers of the multiple child nodes associated with the master node are different from each other, so that the child node can be uniquely identified in the distributed file storage system through the identifier of the child node.
[0075] The master node needs to maintain the metadata of the files stored in the child nodes. The metadata of the file includes the identifier of the child node used to store the file or the file blocks split from the file, the modification record of the file, etc. As the number of stored files increases and the number of times users edit files increases, the amount of metadata continues to increase, and the amount of metadata will gradually approach or even exceed the metadata maintenance capabilities of a single master node. In this case, it is necessary to add a new master node to the distributed file storage system and configure associated child nodes for the new master node. Different child nodes are distinguished by child node identifiers. The existing solution only guarantees that the identifier of a child node is unique under the master node associated with it. In this case, the identifiers of child nodes associated with different master nodes may be repeated, which will result in the inability to uniquely identify the child node from the distributed file storage system through the child node identifier, which is prone to errors.
[0076] In order to solve the above technical problems, it is easy to think of introducing the identifier of the main node directly into the child node, and obtaining an identifier in the form of (main node identifier, child node identifier), through which the child node can be uniquely indicated in the distributed file storage system. This method is relatively simple but there are also problems. For the metadata of each file stored in the distributed file storage system, the metadata is persistently stored and maintained in the main node. Among them, the metadata of the file includes child node information, and the child node information is used to indicate the identifier of the child node that stores multiple file blocks corresponding to the file. Using (main node identifier, child node identifier) as the identifier of the new child node increases the identifier length of the child node, resulting in an increase in the data volume of the metadata, increasing the access overhead of the metadata, and easily causing the performance of the main node to degrade. In addition, the identifier of the child node is widely used in various businesses of the distributed file storage system. Modifying the form of the identifier of the child node will involve a large number of forward compatibility issues.
[0077] In order to solve the above problems, the present application provides an object operation method, in which the identification of the operation object includes a sub-identification for indicating the management object associated with the operation object, and a sub-identification for indicating the operation object, so as to ensure that the identification of the operation object is globally unique in the computing system, and distinguishes different management objects and different operation objects. The management device in the computing system can locate a unique operation target based on the identification of the operation object, so that when the management device receives a request message sent by the management object, it locates the correct operation target from the computing system according to the identification of the operation object, and then performs the operation indicated by the request message on the operation target. The operation target includes at least one of the operation object itself, the data stored in the operation object, or the attribute information of the operation object. Since the identification length of the operation object remains unchanged, when multiple management objects are introduced into the computing system, only partial adjustments need to be made based on the identification of the original operation object, which does not affect the form of the identification of the operation object and has good forward compatibility. At the same time, keeping the identification length of the operation object unchanged will not increase the maintenance overhead of the management device for the identification of the operation object.
[0078] The object operation method provided in this application is applied to a computing system, which includes one or more hardware devices, which may be computer devices, servers, etc. A server is a device or server with computing functions, such as a cloud server or a network server. The above server may be a single server, or a server cluster consisting of multiple servers, or a cloud computing data center. The computing system is used to provide cloud computing, cloud storage and other functional services.
[0079] like Figure 3 As shown, the computing system includes a management device 10. Optionally, a management object and an operation object are set in the member framework of the computing system, and operations and processing related to the management object and the operation object can be performed by the management device 10.
[0080] The management device 10 is responsible for coordinating and managing objects and / or other devices in the computing system.
[0081] A management object refers to an object in a computing system that has the authority to control, manage, and use an operation object. Optionally, the management object is implemented as a computer device in the computing system, an application running in the computer device, or a user identity of the computing system corresponding to the management object. The computing system includes one or more management objects, each of which manages the operation objects associated with it. The management permissions of each management object in the computing system are independent of each other and do not affect each other.
[0082] Operation object refers to the basic unit used to provide functional services in the computing system. Optionally, the operation object is implemented as a computer device in the computing system or an application running in the computer device. The management object determines the implementation method of the functional service of the associated operation object.
[0083] Optionally, in the computing system, the number of management objects is variable, and the number of operation objects associated with the management objects is variable. For example, the management device 10 is supported to add a new management object in the computing system. For another example, when adding a new management object in the computing system Figure 3 After a management object a is shown, the support management device 10 creates an operation object a1 associated with the management object a.
[0084] Optionally, the management device 10 is a medium for the computing system to interact with the outside world, such as Figure 3 As shown, the computing system also includes an electronic device 20. A communication connection is established between the electronic device 20 and the management device 10. In response to the operation of the management object of the computing system, the electronic device 20 sends a request message to the management device 10 to obtain the functional service provided by the operation object associated with the management object in the computing system.
[0085] Optionally, the computing system includes but is not limited to at least one of the following: a relational database system, a distributed file storage system, or a software system (such as a routing system) having management objects and operation objects set therein, and the management object is associated with at least one operation object.
[0086] Exemplarily, the computing system is a relational database system, the management object is the tenant, and the operation object is the database. The relational database system is used to provide file storage and management services. The tenant refers to an enterprise or individual using the relational database system. Optionally, different tenants are associated with different databases, and one tenant cannot access the database associated with other tenants, so as to achieve data isolation between tenants.
[0087] Exemplarily, the computing system is a distributed file storage system, the management object is the master node, and the operation object is the child node. The master node and the child node are usually deployed in different computer devices in the distributed file storage system. The master node is associated with multiple child nodes, and the master node is used to allocate file storage work to the multiple child nodes associated with it. The child nodes associated with different master nodes are different from each other.
[0088] The solution provided by the embodiment of the present application is described below in conjunction with the drawings of the specification.
[0089] The object operation method provided in the embodiment of the present application is executed by a management device in a computing system, and the management device is Figure 3The management device 10 shown in FIG. The computing system is configured with multiple operation objects associated with the management object, and different management objects are associated with different operation objects. The computing system uses an L-bit globally unique identifier to indicate the operation object, where L is a positive integer greater than 1. It should be understood that the computing system uses an L-bit globally unique identifier to indicate the operation object in scenarios supporting a single management object and multiple management objects.
[0090] Exemplarily, the computing system is a relational database, the management object is a tenant, and the operation object is a database.
[0091] Exemplarily, the computing system is a distributed file storage system, the management object is a master node, and the operation object is a child node.
[0092] It should be noted that the operation processes of different management objects on their associated operation objects are the same. The following embodiments only use the process of the first management object operating its associated first operation object as an example description, which does not constitute a specific limitation and will not be repeated one by one.
[0093] Figure 4 FIG. 1 is a flow chart showing the object operation method provided in the embodiment of the present application. Figure 4 As shown, the method comprises the following steps:
[0094] Step 410, the management device receives a request message sent by the first management object, the request message includes the identifier of the first operation object, the t-bit first sub-identifier at the first position in the identifier of the first operation object is used to indicate the first management object, the Lt-bit second sub-identifier at the second position in the identifier of the first operation object is used to indicate the first operation object, t is a positive integer, L is greater than t, and the first position does not overlap with the second position.
[0095] The request message sent by the first management object is used to process or operate the first operation object itself associated with the first management object, or data related to the first operation object. Optionally, the first management object is any management object in the computing system.
[0096] Exemplarily, the first management object initiates an operation request to the operation target in the interactive interface provided by the computing system, so that the management device receives a request message including the identifier of the first operation object. For example, in the case where the computing system is a relational database system, the management object is a tenant, and the tenant uses an electronic device to communicate with the management device in the computing system and initiates the above request message to the management device.
[0097] Exemplarily, the first management object is an application program. Under the trigger condition, the first management object automatically initiates an operation request to the operation target, so that the management device receives a request message including the identifier of the first operation object. For example, in the case where the computing system is a distributed file storage system, the management object is a master node. The master node communicates with the management device when the operation condition is met and initiates the above request message to the management device. The trigger condition includes automatically sending or having a data migration requirement every first time period.
[0098] In a possible implementation manner, the first sub-identifiers of different management objects are different, and the second sub-identifiers of different operation objects are different.
[0099] In a possible implementation, the first sub-identifier is globally unique in the computing system, and the second sub-identifier is unique among multiple operation objects associated with the same management object. Then, for operation objects associated with different management objects, the t-bit first sub-identifiers included in the identification of the operation objects are different; for different operation objects associated with the same management object, the Lt-bit second sub-identifiers included in the identification of the operation objects are different, which ensures that the identification of each operation object is globally unique in the computing system.
[0100] In some embodiments, the identifier of the first operation object is an L-bit identifier. Figure 5 As shown, the length of the identifier 520 of the operation object in the method provided by the present application is the same as the length of the identifier 510 of the operation object when the computing system service only supports a single management object. The L-bit identifier set by the computing system for the operation object includes a first sub-identifier for indicating the management object associated therewith, and a second sub-identifier for indicating the operation object.
[0101] In a possible implementation, the first sub-identifier is the third position t in the original identifier of the first management object. The original identifier of the first management object is an X-bit identifier generated when an instruction to generate the first management object is received, where X is greater than or equal to t and less than or equal to L.
[0102] The third position is the position of the t-bit identifier in the original identifier of the management object, which is used to distinguish different management objects in the identifier of the L-bit operation object. The specific position of the third position can be configured according to actual needs, and the embodiment of the present application is not limited to this. For example, the third position is a continuous t-bit in the second direction, and the second direction is from high to low, or from low to high.
[0103] Exemplarily, t is 4 bits, the original identifier of the management object is 12 bits, and the third position is the first 4 bits from high to low in the original identifier. Here, "first" can be understood as the higher bits in the original identifier.
[0104] In another possible implementation, the second sub-identifier is the fourth position Lt in the initial identifier of the first operation object. The initial identifier of the first operation object is the Z-bit identifier generated when an instruction to generate the first operation object is received, and Z is greater than or equal to Lt and less than or equal to L.
[0105] Among them, the fourth position is the position of the Lt-position mark in the initial mark of the operation object, which is used to distinguish different operation objects in the mark of the L-position operation object. The specific position of the fourth position can be configured according to actual needs, and the embodiment of the present application is not limited to this. For example, the fourth position is a continuous Lt position in the first direction, and the first direction is from high to low, or from low to high. Exemplarily, L is 12, t is 4, Lt is 8, the first direction is from high to low, and the fourth position is the last continuous 8 positions from high to low in the original mark. The "latter" here can be understood to refer to the lower position in the original mark.
[0106] Furthermore, the t-bit first sub-identifier can be used to distinguish 2 t A management object, Lt is the second sub-identifier, which can be used to distinguish the 2 associated with a management object. L-t operation objects. Then, the change of t value will cause the total number of operation objects and management objects supported by the computing system to change. In practical applications, the value of t can be configured according to actual needs.
[0107] Optionally, the value of t is related to the estimated total number T1 of management objects in the computing system and / or the estimated total number T2 of operation objects. The estimated total number T1 of management objects is used to estimate the maximum number of management objects that can be included in the computing system, and the estimated total number T2 of operation objects is used to estimate the maximum number of operation objects that can be included in the computing system.
[0108] For example, the value of t must be 2 t Greater than or equal to the estimated total number of managed objects T1, and / or, 2 L-t Greater than or equal to the estimated total number of operation objects T2. For example, the value of t satisfies at least one of the following: t ≥T1, 2 L-t ≥T2, or 2 t ≥T1 and 2 t-t ≥T2. If t satisfies 2 t ≥T1 and 2 L-t ≥T2, so that the lengths of the first sub-identifier and the second sub-identifier can respectively take into account the maximum number of management objects that can be included in the computing system and the maximum number of operation objects that can be included in the computing system, so as to enhance the ability to expand management objects and / or operation objects during the operation of the computing system.
[0109] In a possible implementation, t=k*L is rounded upward, where k is a positive decimal.
[0110] In a possible implementation manner, the length of the first sub-identifier is less than or equal to the length of the second sub-identifier, and t is less than or equal to Lt. Optionally, t is less than Lt.
[0111] Since a management object is associated with one or more operation objects, the total number of management objects in a computing system is usually less than the total number of operation objects. The number of digits of the first sub-identifier is set to be less than the second sub-identifier, so that the second sub-identifier can indicate more operation objects, so that each management object can be associated with more operation objects. In this way, it is helpful to reduce the impact of the operation object identifier on the total number of operation objects supported at most in the computing system after the first sub-identifier is introduced while keeping the identifier length of the operation object unchanged.
[0112] Optionally, the value of t is specified by a developer or maintenance personnel of the computing system. Exemplarily, before creating the first sub-identity, the electronic device displays an interactive interface provided by the computing system; the electronic device detects a numerical indication operation from the developer and obtains the value of t; the electronic device sends the value of t to the management device. The numerical indication operation includes a click operation, a key operation, a voice operation, etc.
[0113] Furthermore, the first position and the second position can be configured according to actual needs.
[0114] In a possible implementation, the first position is the high position t position, and the second position is the low position Lt position. That is, the first sub-identifier is located at the high position in the identifier of the first operation object, and the second sub-identifier is located at the low position in the identifier of the first operation object. For example, the identifier of the first operation object is expressed as: first sub-identifier-second sub-identifier. For example, the first sub-identifier is 101, the second sub-identifier is 011001, and the identifier of the first database is 101011001.
[0115] In another possible implementation, the first position is the low t position, and the second position is the high Lt position. The first sub-identifier is located at the low position in the identifier of the first operation object, and the second sub-identifier is located at the high position in the identifier of the first operation object. For example, the identifier of the first operation object is represented as: second sub-identifier-first sub-identifier. For example, the first sub-identifier is 101, the second sub-identifier is 011001, and the identifier of the first database is 011001101.
[0116] In some embodiments, the request message is used to operate the operation target indicated by the identifier of the first operation object. The operation target includes at least one of the following: the first operation object, the data stored in the first operation object, and the attribute data of the first operation object. Exemplarily, the data stored in the first operation object and the attribute data of the first operation object are collectively referred to as data related to the first operation object. The data stored in the first operation object includes files or file blocks stored in the first operation object.
[0117] Optionally, the attribute data of the operation object is used to describe the attributes of the operation object, which may include but is not limited to one or more of the following: type, edit log, remaining capacity, device identification of the computer device where it is located, generation time, identification or version information of the associated first management object.
[0118] Exemplarily, the editing log is used to record the historical operations of the management device on the first operation object; the remaining capacity is used to reflect the remaining storage space of the first operation object; the device identification is used to find the computer device where the first operation object is located, and the version information is the application version that implements the function of the first operation object.
[0119] Furthermore, the request message also includes a target indication for indicating an operation target of the request message. The content of the target indication can be configured according to actual needs, and the embodiment of the present application is not limited to this.
[0120] In some embodiments, when the operation target of the request message is the first operation object, the request message does not include a target indication, or the target indication in the request message is an identifier of the first operation object; when the operation target of the request message is data related to the first operation object, the request message may include a target indication.
[0121] Optionally, the computing system is a relational database system, the management object is a tenant, the operation object is a database associated with the tenant, the operation target is a file stored in the database, the request message includes an identifier of the first file, the identifier of the first file includes an identifier of the first database and a third sub-identifier, and the third sub-identifier is used to uniquely indicate the first file in the first database. In this case, the target indication includes the third sub-identifier. For example, the target indication is the identifier of the first file, or, it is the third sub-identifier.
[0122] Exemplarily, the target indication is an identifier of the first file, and the request message includes: an identifier of the first database and an identifier of the first file.
[0123] Exemplarily, the target indication is the third sub-identifier, and the request message includes the identifier of the first database and the third sub-identifier; after receiving the request message, the management device obtains the identifier of the first file based on the identifier of the first database and the target indication (specifically the third sub-identifier) included in the request message. In this way, it helps to avoid repeating the identifier of the first operation object in the request message, reduce the amount of data in the request message, and further reduce the transmission resources consumed by transmitting the request message. In a possible implementation, the identifier of the first file is a tuple consisting of the identifier of the first database and the third sub-identifier. Exemplarily, the identifier of the first file is (identifier of the first database, third sub-identifier) or (third sub-identifier, identifier of the first database).
[0124] In some embodiments, the request message also includes an operation indication, which is used to indicate the type of operation performed on the operation target. That is, the operation indicated by the request message is the operation indicated by the operation indication.
[0125] Optionally, the type of operation includes but is not limited to at least one of the following: a creation operation, an addition operation, a copy operation, a deletion operation, an edit operation, or a search operation. Exemplarily, different types of operations correspond to different operation instructions.
[0126] For example, the operation indication is a sequence number, a statement, etc. used to characterize the type of operation. The form of the operation indication can be set according to the needs of the computing system, and this application does not limit this. For example, if the operation indication used to characterize the search operation is "select", when the operation indication in the request message is "select", it means that the request message is used to request to search for the operation target in the computing system.
[0127] Step 420: The management device performs the operation indicated by the request message on the operation target of the request message according to the identifier of the first operation object.
[0128] Specifically, after receiving the request message, the management device first obtains the operation target according to the content of the request message, then locates the operation target according to the identifier of the first operation object, and then performs the operation indicated by the request message on the operation target. Exemplarily, the operation target is determined according to the identifier or target indication of the first operation object included in the request message, and the operation indicated by the request message is determined according to the operation indication in the request message.
[0129] In some embodiments, the operation target is a first operation object, and the request message is used to request operation or processing on the first operation object. Optionally, the request message includes an operation instruction and an identifier of the first operation object, and the management device locates the first operation object in the computing system according to the identifier of the first operation object.
[0130] Exemplarily, the type of operation includes but is not limited to at least one of the following: deleting the first operation object, restarting / starting the first operation object, accessing the first operation object, updating the configuration parameters of the first operation object, clearing the first operation object, or creating a new file in the first operation object, etc.
[0131] Among them, deleting the first operation object is used to disassociate the first operation object from the first management object; restarting / starting the first operation object is used to start running / re-running the first operation object; updating the configuration parameters of the first operation object is used to adjust the configuration of the first operation object; clearing the first management object is used to clear all files stored in the first management object; and creating a new file in the first operation object is used to create a new blank file in the first operation object.
[0132] In some examples, the computing system is a relational database system, the first management object is a first tenant, the first operation object is a first database, and the type of operation includes at least one of the following: deleting the first database, restarting / starting the first database, updating the configuration parameters of the first database, accessing the first database, creating a new file in the first database, and clearing the first database.
[0133] Exemplarily, the management device performs the operation indicated by the request message on the operation target of the request message according to the identifier of the first operation object, including: the management device locates the first database according to the identifier of the first database; the management device performs the operation indicated by the request message on the first database.
[0134] For example, a request message is used to request to clear files stored in a first database; the request message includes: an operation instruction "delete" and an identifier of the first database; the management device locates the first database in the relational database system according to the identifier of the first database, and then the management device controls the first database to clear the files stored therein according to the operation instruction.
[0135] For another example, a request message creates a new file in a first database; the request message includes an operation instruction "create" and an identifier of the first database, and a first file is created in the first database (such as a table file) through the request message so that the first tenant can add new data to the first file later. In this case, the management device locates the first database according to the identifier of the first database; the management device creates a blank first file in the first database according to the operation instruction. In addition, the process of creating the first file may also include generating an identifier of the first file.
[0136] In some examples, the computing system is a distributed file storage system, the first management object is the first master node, the first operation object is the first child node, and the types of operations include: clearing data stored in the first child node, synchronizing metadata information, updating configuration parameters of the first child node, etc.
[0137] The synchronization metadata information is used to request the first child node to synchronize the storage status in the first time period with the first master node, and the metadata information is used to reflect the newly added file blocks, deleted file blocks, or file blocks that have been edited in the first child node. Exemplarily, the metadata information plays the role of an edit log in the distributed file system.
[0138] Exemplarily, the first time period is pre-set, such as the first time period is the first duration starting from the time when the metadata information was last synchronized. The first duration is set according to actual needs and is not limited in this application.
[0139] For example, the management device locates the first subnode in the distributed file storage system according to the identifier of the first subnode, and then the management device requests the first subnode to synchronize metadata information according to the operation instruction in the request message.
[0140] In some embodiments, the target operation object is data related to the first operation object. Optionally, the request message includes an operation instruction, an identifier of the first operation object, and a target instruction, wherein the target instruction is used to indicate data related to the first operation object. For example, the target instruction is used to indicate attribute data of the first operation object, or data stored in the first operation object. Exemplarily, the management device locates the data related to the first operation object in the computing system according to the target instruction, and performs the operation corresponding to the operation instruction on the data related to the first operation object.
[0141] Optionally, in a case where the data related to the first operation object includes attribute data of the first operation object, the request message is used to request to search for the attribute data of the first operation object, or to configure the attributes of the first operation object.
[0142] The attribute data of the first operation object is stored in the management device, or in the computer device where the first operation object is located. For the above two situations, the implementation methods of step 420 are different.
[0143] In a possible implementation, when the attribute data of the first operation object is stored in the management device, the management device searches for the attribute data of the first operation object according to the identifier of the first operation object and the operation instruction in the request message, or configures the attributes of the first operation object.
[0144] For example, the management device performs the operation indicated by the request message on the operation target of the request message based on the identifier of the first operation object, including: searching for attribute data of the first operation object in the first directory including the identifier of the first operation object in the file system of the management device, or configuring the attributes of the first operation object.
[0145] For another example, the management device performs the operation indicated by the request message on the operation target of the request message based on the identifier of the first operation object, including: the management device searches the object attribute table based on the identifier of the first operation object to obtain the attribute data of the first operation object, or configures the attributes of the first operation object.
[0146] Among them, the object attribute table is used to store the attribute data of each of the multiple operation objects associated with the first management object. For example, the object attribute table records the mapping relationship between the identifier of the operation object and the attribute data of the operation object. The management device uses the identifier of the operation object as an index to search for the attributes of the operation object in the object attribute table.
[0147] In another possible implementation, when the attribute data of the first operation object is not stored in the management device, the management device performs the operation indicated by the request message on the operation target of the request message according to the identifier of the first operation object, including: the management device obtains an indication message according to the request message; the management device sends an indication message to the computer device where the first operation object is located, so that after the computer device receives the indication message, it performs the operation indicated by the request message on the attribute information of the first operation object.
[0148] The computer device where the first operation object is located is a computer device other than the management device in the computing system; an application for implementing the first operation object is running in the computer device, or the computer device can be implemented as the first operation object.
[0149] The instruction message is used to instruct the computer device to search for or configure the attribute data of the first operation object. Exemplarily, the instruction message includes at least one of the following: an operation instruction, an identifier of the first operation object. Exemplarily, the content of the instruction message is similar or identical to that of the request message.
[0150] In some examples, the computing system is a relational database system, the management object is a tenant, the operation object is a database, and the operation target is the attribute data of the first database. Exemplarily, the attribute data of the first database includes at least one of the following: the type of the first database, the edit log of the first database, the remaining capacity of the first database, the device identifier of the computer device where the first database is located, the identifier of the associated first management object, or the version information of the first database.
[0151] Exemplarily, the request message is used to request to obtain the attribute data of the first database, and the management device uses the identifier of the first database in the request message as an index, searches for and feeds back the attribute data of the first database to the first tenant according to the operation instructions in the request message. For example, after receiving the request message, the management device uses the identifier of the first database as an index to search for the configuration information of the first database from the first object attribute table, wherein the first object attribute table is used to record the configuration information of each database in the relational database system.
[0152] In some examples, the computing system is a distributed file storage system, the first management object is a first master node, the first operation object is a first child node, the operation target is attribute data of the first child node, and the attribute data of the first child node includes at least one of the following: the remaining capacity of the first child node, the device identification of the computer device where the first child node is located, and the version information of the application corresponding to the first child node.
[0153] For example, the first main node sends a request message to the management device at a first time interval, and the request message is used to request to query the remaining storage space of the first child node; the request message includes: an operation instruction "xxxxxmin-report" and an identifier of the first child node, and the management device generates an indication message based on the request message, sends the indication message to the first child node, and receives the remaining storage space fed back by the first child node based on the indication message.
[0154] Optionally, when the data related to the first operation object includes data stored in the first operation object, the request message is used to request management of files stored in the first operation object. In this case, the operation indication in the request message is used to indicate at least one of the following: delete, edit, search or data migration.
[0155] Furthermore, the operation target related to the operation object can be identified by the identifier of the operation object. The following embodiment takes the operation target as the first file in the relational database system as an example to illustrate the role played by the identifier of the operation object in indicating the operation target process, and other details are not repeated one by one. Exemplarily, the management device performs the operation indicated by the request message on the operation target of the request message according to the identifier of the first operation object, including: locating the first operation object in the computing system according to the identifier of the first operation object, locating the data stored in the first operation object in the first operation object according to the target indication in the request message, and performing the operation on the data stored in the first operation object according to the operation indication in the request message.
[0156] In some examples, the computing system is a relational database system, the first management object is a first tenant, the first operation object is a first database, and the operation target is a first file stored in the first database. Exemplarily, the request message is used to indicate at least one of the following: delete, edit, and search. Exemplarily, the request message includes an identifier of the first database, a third sub-identifier, and an operation instruction.
[0157] For example, after the management device receives the request message, it obtains the identifier of the first database from the request message; the management device locates the first database in the relational database system according to the identifier of the first database; the management device obtains the third sub-identifier from the request message; the management device locates the first file in the first database according to the third sub-identifier; and then, the management device manages the first file according to the operation instructions in the request message.
[0158] Since the database identifier in the present method includes a first sub-identifier for indicating a tenant, even if the second sub-identifiers of databases associated with different tenants are repeated, these databases can be distinguished by the first sub-identifier, thereby ensuring that the database identifier is globally unique in the computing system and achieving data isolation under different tenants.
[0159] At the same time, the database identification length does not change compared to the case where the relational database system includes a single management object, and the unique identification length of the file in the database does not change compared to the case where the relational database system includes a single management object. Therefore, the file identification length remains unchanged and the maintenance overhead of the management device will not increase.
[0160] Since the database identifier is globally unique in the relational database system, the file identifier includes the first sub-identifier, and a unique database can be found in the computing system. The third identifiers of different files stored in the same database are different. Then, after determining the unique database, the corresponding file can be uniquely determined in the database through the third sub-identifier. The file identifier is globally unique.
[0161] Since the identification of the file includes the identification of the database and the third sub-identifier, the identification of the database uniquely indicates the database in the relational database system, and the third sub-identifiers of different files in the same database are different, and the third sub-identifier uniquely indicates the file in the database. Therefore, the identification of the file is globally unique in the computing system, and there will be no duplication of identifications of files of different tenants, which helps to achieve data isolation between different tenants. In addition, since the identification of the database is globally unique, there is no need to add an additional tenant identification to the identification of the file, which avoids the dimensionality increase of the identification of the file. In this embodiment, the identification of the file is in the same form as the identification of the file in the case where the computing system service includes a single management object, both of which are in the form of a tuple, and the constituent elements of the tuple are the database identification and the third sub-identifier. In this way, the relational database system can be compatible with the scenario of supporting a single tenant, and can also support the isolation requirements in the multi-tenant scenario.
[0162] Thus, after the multi-tenancy mechanism is introduced, the file identifier in the relational database system is kept in the form of a binary tuple, and the file identifier uniquely indicates the file in the relational database without changing the file identifier format, thereby isolating the files stored in the databases associated with different tenants from each other. Moreover, the forward compatibility of the relational database system is guaranteed, and the management device does not incur any additional overhead in maintaining the file identifier in the cache.
[0163] In some examples, the computing system is a distributed file storage system, the first management object is a first master node, the first operation object is a first child node, and the operation target is a first file block of the distributed file storage system.
[0164] Exemplarily, the target indication in the request message is used to indicate the first file block, and the target indication includes an identifier of the first file block, wherein the identifier of the first file block includes an identifier of the second subnode and a fourth subidentifier, the first main node is associated with the second subnode, the first file block is obtained by dividing the second file, the first file block has a second subnode, and the fourth subidentifier is used to identify the first file block obtained by dividing the second file in the second subnode. Exemplarily, the fourth subidentifier includes a unique identifier of the second file in the second subnode and a serial number of the first file block, wherein the serial number of the first file block is used to uniquely identify the first file block among multiple file blocks obtained by dividing the second file.
[0165] For example, after receiving a request message, the management device obtains an indication message based on the request message, where the indication message includes an operation indication and a target indication; the first child node receives the indication message and obtains the first file block from the second child node based on the target indication in the indication message, and the first child node backs up the first file block.
[0166] Since the identification of the subnode includes the sub-identification used to characterize the main node, even if the second sub-identifications of the subnodes associated with different main nodes are the same, the identification of the main node can be guaranteed to be globally unique in the computing system. Therefore, by indicating the subnode and / or the target data related to the subnode through the identification of the subnode, the mutual isolation of different subnodes and the mutual isolation of the target data respectively related to different subnodes can be achieved.
[0167] At the same time, the identifier of the child node still maintains the L-bit length configured by the system, and the length remains unchanged and is globally unique. In this way, it can be compatible with the scenario where the computing system supports a single master node, and can also support the isolation requirements in the multi-master node scenario; furthermore, since the identifier length of the child node remains unchanged, it will not increase the maintenance overhead.
[0168] In summary, since the identifier of the operation object includes a sub-identifier used to characterize the management object, even if the second sub-identifiers of the operation objects associated with different management objects are the same, the identifier of the management object can be guaranteed to be globally unique in the computing system. Therefore, the identifier of the operation object can uniquely indicate the operation object and / or the data related to the operation object. This helps to achieve mutual isolation between different management objects. At the same time, the identifier of the operation object still maintains the L-bit length configured by the system, and the length remains unchanged and is globally unique. In this way, it can be compatible with the scenario where the computing system supports a single management object, and can also support the isolation requirements in the scenario of multiple management objects; furthermore, since the identifier length of the operation object remains unchanged, the maintenance overhead will not be increased.
[0169] Furthermore, when adding an associated operation object to a management object, the management device configures an identifier for the newly added operation object. The present application also provides a method for configuring the identifier of the operation object. The process of configuring the identifier of the newly added associated operation object by the management device for different management objects is the same. The following embodiment takes the process of configuring the identifier of the first operation object in the process of adding a first operation object to the first management object by the management device as an example, and other details are not repeated one by one. The following method for configuring the identifier of the operation object can be used in combination with the aforementioned object operation method or independently, and the embodiments of the present application are not limited to this.
[0170] like Figure 6 As shown, the method for configuring the identifier of the operation object includes the following steps:
[0171] Step 610: When receiving an instruction for generating a first operation object, the management device obtains a Z-bit first intermediate identifier.
[0172] Wherein, Z is less than or equal to L and greater than or equal to Lt.
[0173] Optionally, the first intermediate identifier is obtained randomly, or the first intermediate identifier is obtained according to instruction content in an instruction for generating the first operation object.
[0174] In a possible implementation, when receiving an instruction for generating a first operation object, the management device obtains the first intermediate identifier through an identifier generation function. The identifier generation function is used to randomly generate a string of bit characters, such as the identifier generation function is used to generate a Z-bit character. Exemplarily, the identifier generation function includes an identifier generation function Gen() provided by the computing system.
[0175] In another possible implementation, the instruction content in the instruction of the first operation object includes the name of the first operation object, and the management device obtains the first intermediate identifier according to the name of the first operation object. In the embodiment of the present application, the second sub-identifier used to indicate the first operation object is a string of binary characters, which is used inside the computing system; the name of the first operation object is perceptible to the first management object, such as the name of the first operation object is named by the first management object.
[0176] Exemplarily, the management device compiles the name of the first operation object and obtains the first intermediate identifier of position Z. For example, the management device compiles the name of the first operation object from American Standard Code for Information Interchange (ASCII) into binary code, and obtains position Z from the binary code as the first intermediate identifier.
[0177] In a possible implementation, Z is equal to L. That is, the first intermediate identifier and the identifier of the first operation object have the same number of digits.
[0178] Since, in the embodiment of the present application, the length of the identifier of the operation object is equal to the length of the identifier of the operation object when the computing system only supports a single management object, the length of the identifier of the first intermediate identifier and the identifier of the first operation object are controlled to be equal, so that the logic for obtaining the first intermediate identifier can reuse the logic for obtaining the identifier of the operation object when the computing system only supports a single management object. This helps to simplify the execution logic required to adjust the identifier of the operation object including the first sub-identifier and the second sub-identifier introduced in the computing system.
[0179] In some embodiments, when the first intermediate identifier can be used to successfully generate the identifier of the first operation object, the first intermediate identifier includes a second sub-identifier. Optionally, the second sub-identifier is a continuous Lt-bit identifier in the first intermediate identifier.
[0180] In a possible implementation, the second sub-identifier is the Lt-bit identifier at the fourth position in the first direction of the first intermediate identifier, wherein the first direction is from a high position to a low position, or from a low position to a high position.
[0181] In some embodiments, the second sub-identifier is located in the interval [n, n+Lt-1] in the first direction of the first intermediate identifier, where n is a natural number less than or equal to Z+t+1-L. In other words, the fourth position corresponds to the interval [n, n+Lt-1] in the first direction of the first intermediate identifier.
[0182] In one example, the second sub-identifier is Tt consecutive bits starting from the lowest bit in the Z-bit first intermediate identifier. If the first direction is from the lowest bit to the highest bit, the fourth position corresponds to the interval [0, Lt-1] in the first intermediate identifier. In another example, the second sub-identifier is Lt consecutive bits starting from the highest bit in the first intermediate identifier. If the first direction is from the highest bit to the lowest bit, the fourth position corresponds to the interval [Z-L+t+1, Z] in the first intermediate identifier. In another example, the fourth position corresponds to any intermediate interval of the first intermediate identifier that includes the Lt-bit identifier, and the intermediate interval does not include the highest bit and the lowest bit in the first direction of the first intermediate identifier.
[0183] In one possible implementation, the fourth position is the same as the second position, or the fourth position is different from the second position. For example, the second position is the first Lt positions from high to low in the identifier of the first operation object, and the fourth position is the first Lt positions from high to low in the first intermediate identifier. For another example, the second position is the first Lt positions from high to low in the identifier of the first operation object, and the fourth position is the first Lt positions from low to high in the first intermediate identifier. For another example, the second position is the first Lt positions from low to high in the identifier of the first operation object, and the fourth position is the first Lt positions from high to low in the first intermediate identifier.
[0184] Step 620: The management device obtains the identifier of the first operation object according to the first intermediate identifier and the second intermediate identifier.
[0185] The second intermediate identifier includes the t-bit identifier at the third position in the X-bit original identifier of the first management object; the t-bit identifier at the third position in the X-bit original identifier of the first management object is the first sub-identifier.
[0186] Where X is greater than or equal to t.
[0187] In a possible implementation, X is equal to L. That is, the original identifier of the first management object and the identifier of the first operation object have the same number of digits. This helps to simplify the execution logic required to increase the identifier of the operation object including the first sub-identifier and the second sub-identifier introduced into the computing system.
[0188] In a possible implementation, the third position is a continuous t position in the second direction, and the second direction is from a high position to a t position, or from a low position to a high position.
[0189] In some embodiments, the first sub-identifier is located in the interval [m, m+t-1] in the second direction of the original identifier of the first management object, where m is a natural number less than or equal to Z-t+1. In other words, the third position corresponds to the interval [m, m+t-1] in the second direction of the original identifier of the first management object.
[0190] In one example, the first sub-identifier is the continuous t bits starting from the lowest bit in the X-bit original identifier. If the second direction is from the low bit to the high bit, the third position corresponds to the interval [0, t-1] in the first intermediate identifier. In another example, the first sub-identifier is the continuous t bits starting from the highest bit in the original identifier, if the second direction is from the high bit to the low bit, the third position corresponds to the interval [Z-t+1, Z] in the first intermediate identifier. In another example, the fourth position is any intermediate interval of the first intermediate identifier that includes a t-bit identifier, and the intermediate interval does not include the highest bit and the lowest bit in the second direction of the original identifier.
[0191] In a possible implementation, the third position is the same as the first position, or the third position is different from the first position. For example, the first position is the first t positions from high to low in the identifier of the first operation object, and the third position is the first t positions from high to low in the original identifier. For another example, the first position is the first t positions from high to low in the identifier of the first operation object, and the third position is the first t positions from low to high in the original identifier. For another example, the first position is the first t positions from low to high in the identifier of the first operation object, and the third position is the first t positions from high to low in the original identifier.
[0192] Optionally, the management device moves the t-bit identifier at the third position in the original identifier from the third position to the first position to obtain a second intermediate identifier. For the method for obtaining the second intermediate identifier, please refer to the following embodiment.
[0193] In some embodiments, the management device obtains the identifier of the first operation object according to the first intermediate identifier and the second intermediate identifier, including: the management device obtains the spliced identifier according to the first intermediate identifier and the second intermediate identifier; when the spliced identifier is globally unique in the computing system, the management device obtains the identifier of the first operation object according to the spliced identifier; when the spliced identifier is not globally unique in the computing system, the management device re-executes step 610. Exemplarily, when the spliced identifier is globally unique in the computing system, the management device uses the spliced identifier as the identifier of the first operation object.
[0194] The globally uniqueness of the splicing identifier in the computing system means that the splicing identifier does not overlap with the identifiers of other created operation objects in the computing system, that is, the splicing identifier is different from the identifier of any created operation object.
[0195] Optionally, when the spliced identifier is not globally unique in the computing system, it means that the spliced identifier is repeated with the identifier of the operation object generated in the computing system, and the management device needs to regenerate the first intermediate identifier. Exemplarily, the management device adds 1 to the first intermediate identifier generated last time, and takes the L bits in the first direction to obtain the regenerated first intermediate identifier. Exemplarily, the management device re-randomly obtains the first intermediate identifier.
[0196] In this way, by verifying whether the splicing identifier is globally unique in the computing system, the identifier of the first operation object is guaranteed to be globally unique, which helps to achieve data isolation between different management objects in the computing system.
[0197] Optionally, the management device uses a globally unique function to determine whether the splicing identifier is globally unique in the computing system. For example, the globally unique function includes Unq(ID, Obj), which is used to determine the identifier ID and the type Obj of the object indicated by the identifier. Through Unq(ID, Obj), it can be known whether the ID is globally unique in the type of the object it indicates. For example, the management device uses the splicing identifier as the ID and the type of the operation object as obj, and returns the judgment result through Unq(ID, Obj). If Unq(ID, Obj) returns 1, it means that the splicing identifier is globally unique in the computing system; if Unq(ID, Obj) returns 0, it means that the splicing identifier is not globally unique in the computing system.
[0198] Since the first sub-identifier used to indicate the management object is globally unique in the computing system, the first sub-identifier is used as a part of the identifier of the operation object associated with the management object, so that the identifier of the operation object has the function of identifying different management objects. In addition, the number of bits of the intermediate identifier obtained in the process of obtaining the identifier of the operation object is L, and the intermediate identifier can directly use the computing system including a single management object, and the method and acquisition logic of generating the identifier of the L-bit operation object, which improves compatibility and reduces the workload or computational complexity of developers in the process of introducing the identifier of the operation object of the new structure.
[0199] Specifically, in step 620, the management device obtains the identifier of the first operation object according to the first intermediate identifier and the second intermediate identifier, and supports at least one of the following two implementation methods, which is not limited in this embodiment of the present application.
[0200] Implementation method 1: shift and merge method
[0201] In implementation 1, Z and X are both L, the t-bit identifier in the first position of the second intermediate identifier is the t-bit identifier in the third position of the original identifier, and all identifiers other than the first position of the second intermediate identifier are invalid identifiers. Optionally, the t in the third position of the original identifier is the first sub-identifier.
[0202] Correspondingly, in implementation mode 1, step 620, the management device obtains the identifier of the first operation object according to the first intermediate identifier and the second intermediate identifier, including: the management device obtains the third intermediate identifier according to the first intermediate identifier, the Lt-bit identifier of the second position in the third intermediate identifier is the Lt-bit identifier of the fourth position in the first intermediate identifier, and all identifiers other than the second position in the third intermediate identifier are invalid identifiers, and the Lt-bit identifier of the fourth position in the first intermediate identifier is the second sub-identifier. The management device merges the contents of the same position of the second intermediate identifier and the third intermediate identifier to obtain an L-bit spliced identifier; the result of merging the contents of one position with the invalid identifier is the content itself. In the case where the spliced identifier is globally unique in the computing system, the spliced identifier is used as the identifier of the first operation object.
[0203] Among them, an invalid identifier refers to a string of bit characters that cannot serve as an identifier. Exemplarily, all bits outside the second position in the third intermediate identifier are 0. Since a string of 0s cannot distinguish different operation objects, it cannot serve as an identifier. For example, L is 12, t is 4, Lt is 8, the third intermediate identifier is 000011101011, and the second position is the first 8 bits from the low position to the high position in the third intermediate identifier, specifically 11101011.
[0204] In a possible implementation, when Z is L, the third intermediate identifier includes a t-bit identifier at the first position and an Lt-bit identifier at the second position, wherein the t-bit identifier at the first position in the third intermediate identifier is an invalid identifier outside the second position in the third intermediate identifier.
[0205] Optionally, the management device obtains the third intermediate identifier based on the first intermediate identifier, including: the management device processes the first intermediate identifier through a first bit operation to obtain the third intermediate identifier. The first bit operation is used to move the Lt bit identifier at the fourth position in the first intermediate identifier to the second position. Exemplarily, the first bit operation is also called a first shift operation.
[0206] Optionally, when the second position corresponds to the first Lt bits in the first direction of the first intermediate identifier, the first bit operation is implemented by shifting the first intermediate identifier by t bits in the first direction.
[0207] Exemplarily, when the first direction is from high bit to low bit, the first bit operation is a right shift operation; when the first direction is from low bit to high bit, the first bit operation is a left shift operation.
[0208] The following takes the right shift operation as an example to introduce the process of obtaining the third intermediate identifier. The management device obtains the third intermediate identifier through a_id'=id'》t, where a_id' is the third intermediate identifier, id' is the first intermediate identifier, "》" is the right shift operation, and t represents the number of bits shifted right. Assuming id' is 1001010010, t=4, then a_id' is 0000100101, and the second sub-identifier is 100101.
[0209] Optionally, the management device merges the second intermediate identifier, the third intermediate identifier, and the content at the same position to obtain an L-bit splicing identifier, including: for the first content at each position in the second intermediate identifier, the management device merges the first content with the second content at the same position in the third intermediate identifier to obtain a splicing identifier.
[0210] The first content at each position in the second intermediate identifier is a bit character, and the second content at each position in the third intermediate identifier is a bit character. That is, the position of the first content in the third intermediate identifier is the same as the position of the second content in the second intermediate identifier. During the merging process, the position of the content in the intermediate identifier refers to: the superscript or arrangement order of the bit character in the intermediate identifier.
[0211] Exemplarily, the management device combines the contents of the same position of the first intermediate identifier and the third intermediate identifier according to the second bit operation to obtain a spliced identifier. The second bit operation is an "or" operation. For example, if the third intermediate identifier is 0001001011 and the second intermediate identifier is 1010000000, then the second intermediate identifier and the third intermediate identifier are combined through the second bit operation to be expressed as (0001001011)|(1010000000)=1011001011, and 1011001011 is the spliced identifier, where 101 is the first sub-identifier and 1001011 is the second sub-identifier.
[0212] Optionally, when the acquired splicing identifier is globally unique in the computing system, the management device uses the splicing identifier as the identifier of the first operation object.
[0213] The speed at which the management device performs bit operations is greater than the speed of other forms of operations. Therefore, obtaining the identifier of the operation object through binary coding helps to improve the speed of obtaining the identifier of the operation object.
[0214] Implementation method 2: interception and splicing
[0215] In implementation method 2, the second intermediate identifier is the first sub-identifier. In step 620, the management device obtains the identifier of the first operation object based on the first intermediate identifier and the second intermediate identifier, including: the management device uses the Lt-bit identifier at the fourth position in the first intermediate identifier as the second sub-identifier; the management device splices the first sub-identifier and the second sub-identifier to obtain an L-bit spliced identifier; the first position in the spliced identifier is the first sub-identifier, and the second position in the spliced identifier is the second sub-identifier; when the spliced identifier is globally unique in the computing system, the management device uses the spliced identifier as the identifier of the first operation object.
[0216] Optionally, the management device splices the first sub-identifier and the second sub-identifier to obtain an L-position spliced identifier, including: the management device splices the first sub-identifier and the second sub-identifier according to a splicing rule to obtain the spliced identifier. The splicing rule is used to indicate the first position and the second position.
[0217] Exemplarily, after generating the first management object, or after generating the first operation object associated with the first management object, the management device stores the first sub-identifier of the first management object; in the subsequent process of generating the operation object associated with the first management object, the management device reads the first sub-identifier.
[0218] For example, L is equal to 12, t is equal to 4, Lt is equal to 8, the first intermediate identifier is 101011101001, the fourth position is the first 8 bits from high to low in the first intermediate identifier, the first sub-identifier is 1001, the first position is the high bit in the identifier of the first operation object, and the second position is the low bit in the identifier of the first operation object; the management device intercepts 10101110 from the first intermediate identifier as the second sub-identifier, the management device splices the first sub-identifier and the second sub-identifier to obtain a spliced identifier 100110101110, and when the spliced identifier is globally unique in the computing system, the management device determines that the identifier of the first operation object is 100110101110.
[0219] Since the sub-identifier used to indicate the management object is existing, it can be reused in the process of generating identifiers for different operation objects of the same management object. This allows only the sub-identifier used to indicate the operation object to be obtained in the process of obtaining the identifier of the operation object, which helps reduce the amount of calculation in the process of the management device obtaining the identifier of the operation object.
[0220] In some embodiments, the instruction for generating the first operation object is used to instruct the generation of the first operation object. In the process of generating the first operation object, it is necessary to create an identifier of the first operation object so as to uniquely indicate the first operation object in the computing system through the identifier of the first operation object, as well as data related to the first operation object.
[0221] Optionally, the instruction content in the instruction for generating the first operation object includes at least one of the following: a generation instruction or an identifier of the first management object. The generation instruction is used to instruct the generation of an operation object associated with the first management object, and the name of the first operation object is preset before the first operation object is generated.
[0222] Exemplarily, the identifier of the first operation object is used inside the computing system and is unknown to the user. After generating the identifier of the first operation object, the management device establishes a mapping relationship between the name of the first operation object and the identifier of the first operation object.
[0223] In some embodiments, when the computing system is a relational database system, the user is the first tenant or a user under the first tenant. When the computing system is a distributed file storage system, the user includes a developer.
[0224] In one example, when the computing system is a relational database system, the instruction for generating the first operation object is used to instruct the generation of a first database associated with the first tenant. Exemplarily, when the remaining storage space of the database associated with the first tenant is insufficient, the electronic device of the first tenant (or a user under the first tenant) sends a generation instruction for generating the first database to the management device in response to the operation of the first tenant (or a user under the first tenant) instructing the generation of the database.
[0225] In this way, during the expansion of the distributed file system, a globally unique child node identifier can be generated for the newly added child node, thereby achieving mutual isolation of child nodes associated with different master nodes, which helps the client to successfully access the only child node based on the child node identifier, thereby avoiding the problem of child node access errors.
[0226] In another example, when the computing system is a distributed file storage system, the instruction for generating the first operation object is used to create a first slave node associated with the first master node. Exemplarily, when the distributed file storage system needs to be expanded, the developer's electronic device sends a generation instruction for generating the first child node to the management device in response to the developer's operation of adding a new first child node.
[0227] The generation of the first child node is used to introduce additional storage space in the distributed file storage system. The management device connects the storage device to the distributed file storage system according to the generation instruction and sets the first child node on the storage device; then, the management device generates an identifier of the first child node and sets the first master node to associate with the first child node, so that the first master node assigns storage tasks to the first child node, thereby realizing the expansion of the distributed file storage system.
[0228] In this way, during the expansion of the distributed file system, a globally unique child node identifier can be generated for the newly added child node, thereby achieving mutual isolation of child nodes associated with different master nodes, which helps the client to successfully access the only child node based on the child node identifier, thereby avoiding the problem of child node access errors.
[0229] Furthermore, the second intermediate identifier used in configuring the identifier of the newly added operation object is obtained based on the original identifier of the management object. The present application also provides a method for configuring the identifier of the management object. The process of adding different management objects to the management device is the same. The following embodiment uses the process of configuring the identifier of the first management object in the process of adding the first management object to the management device as an example to illustrate the source of the first sub-identifier, and the others are not repeated one by one. The following method for configuring the identifier of the management object can be used in combination with one or both of the aforementioned object operation method and the method for configuring the identifier of the operation object, or it can be used independently, and the embodiments of the present application are not limited to this.
[0230] The content of the Lt bit identifier at the fourth position in the first intermediate identifier of the first operation object is used as the second sub-identifier to distinguish different operation objects. At the same time, the second intermediate identifier containing the first sub-identifier is combined to obtain the identifier of the first operation object, so that the identifier of the first operation object has both the function of distinguishing different management objects and the function of distinguishing different operation objects.
[0231] In order to achieve isolation between different management objects, it is necessary to ensure that the identification of the operation object is globally unique in the computing system. Since the sub-identifier used to indicate the management object is globally unique, using this sub-identifier to participate in the acquisition of the splicing identification helps to increase the probability that the splicing identification is globally unique in the computing system, thereby reducing the number of times the splicing identification is re-acquired, thereby helping to improve the generation efficiency of the identification of the operation object.
[0232] like Figure 7 As shown, the method for identifying the configuration management object includes the following steps:
[0233] Step 710: upon receiving an instruction for generating a first management object, the management device generates an X-digit original identifier of the first management object.
[0234] Optionally, the original identifier of the first management object is obtained randomly, or the original identifier of the first management object is obtained according to instruction content in an instruction for generating the first management object.
[0235] In a possible implementation, when receiving an instruction for generating a first management object, the management device obtains the original identification of the first management object through an identification generation function. Exemplarily, the management device uses the identification generation function Gen() to obtain the original identification of the first management object.
[0236] In another possible implementation, the instruction content in the instruction for generating the first management object includes the name of the first management object, and the management device obtains the original identifier of the first management object according to the name of the first management object. The name of the first management object is perceptible to the first management object, such as the name of the first management object is named by the first management object.
[0237] Exemplarily, the management device compiles the name of the first management object and obtains X bits of the original identifier of the first management object. For example, the management device compiles the name of the first management object from ASCII code to binary code, and obtains X bits from the binary code as the original identifier of the first management object.
[0238] Wherein, X is greater than t. Optionally, X is less than or equal to L.
[0239] In a possible implementation, X is equal to L. That is, the length of the original identifier of the first management object and the length of the identifier of the first operation object are the same.
[0240] By controlling the original identifier of the first management object and the identifier of the first operation object to be equal in length, the computing system can be directly used in the process of obtaining the identifier of the management object, including the method and acquisition logic of generating the identifier of the operation object in the case of a single management object, thereby improving compatibility and reducing the workload or computational complexity of developers in the process of introducing the identifier of management objects and the identifier of operation objects with new structures.
[0241] In a possible implementation, the first sub-identifier is a t-bit identifier at the third position in the second direction of the original identifier of the first management object, wherein the second direction is from high to low, or from low to high.
[0242] In some embodiments, the first sub-identifier is located in the interval [m, m+t-1] in the second direction of the original identifier of the first management object, where m is a natural number less than or equal to X-t+1. In other words, the third position corresponds to the interval [m, m+t-1] in the second direction of the original identifier of the first management object.
[0243] In one example, the first sub-identifier is the Z-bit original identifier of the first management object, and the consecutive t bits starting from the lowest bit. If the second direction is from low bit to high bit, the third position corresponds to the interval [0, t-1] in the original identifier of the first management object.
[0244] In another example, the first sub-identifier is the continuous t bits starting from the highest bit in the original identifier of the first management object, such as the second direction is from high bit to low bit, and the third position corresponds to the [X-t+1, X] interval in the original identifier of the first management object.
[0245] In another example, the third position corresponds to a middle interval of any one of the original identifiers of the first management object including t bits, and the middle interval does not include the highest bit and the lowest bit in the second direction of the original identifier of the first management object.
[0246] In a possible implementation, the third position is the same as the first position, or the third position is different from the first position. For example, the first position is the first t positions from high to low in the identifier of the first operation object, and the third position is the first t positions from high to low in the original identifier of the first management object. For another example, the first position is the first t positions from high to low in the identifier of the first operation object, and the third position is the first t positions from low to high in the original identifier of the first management object. For another example, the first position is the first t positions from low to high in the identifier of the first operation object, and the third position is the first t positions from high to low in the original identifier of the first management object.
[0247] The instruction to generate the first management object is used to instruct the creation of a new first management object in the computing system. Optionally, when the computing system is a relational database system, when a user uses an electronic device to create a tenant in the computing system, the electronic device sends an instruction to generate the first tenant to the management device in response to the user's instruction to create a tenant.
[0248] Step 720: The management device generates a second intermediate identifier according to the X-digit original identifier.
[0249] Optionally, the first intermediate identifier includes t-bit first sub-identifiers.
[0250] Specifically, in step 720, the management device obtains the first intermediate identifier according to the X-bit original identifier, and at least supports any one of the following two implementation methods, which is not limited in the embodiment of the present application.
[0251] Implementation method a: get the second intermediate identifier by shifting the original identifier
[0252] In implementation a, X is L, the t-bit identifier of the first position in the second intermediate identifier is the t-bit identifier of the third position in the original identifier, all identifiers other than the first position in the second intermediate identifier are invalid identifiers, and the bit identifier of the third position in the original identifier is the first sub-identifier. The first intermediate identifier obtained by implementation a can be used in implementation 1 or implementation 2 in the above embodiment to obtain the identifier of the first operation object.
[0253] Optionally, implementation method a is illustrated by taking the interval including the first t bits in the second direction in the original identification corresponding to the third position as an example. For the case where the third position corresponds to the middle interval of the original identification, the number of shifts during the shifting process will change. The other steps are similar and will not be given examples one by one.
[0254] Correspondingly, in implementation mode a, step 720, the management device obtains the first intermediate identifier according to the X-bit original identifier, including: the management device processes the original identifier through a third-bit operation to obtain the second intermediate identifier.
[0255] Optionally, the second intermediate identifier includes a first position and a second position, the t position of the first position is identified as a first sub-identifier, and the Lt position of the second position is identified as an invalid identifier. Exemplarily, all the bits outside the first position in the second intermediate identifier are 0, and since a string of 0s cannot distinguish different management objects, it cannot serve as an identifier. For example, L is 12, t is 4, Lt is 8, the second intermediate identifier is 100100000000, the t position of the first position is identified as the first 4 bits from high to low in the third intermediate identifier, and the first sub-identifier is 1001.
[0256] Optionally, the third bit operation is used to move the first sub-identifier from the third position to the first position to obtain the second intermediate identifier. The third bit operation is a shift operation. Since the first sub-identifier is located at the first position in the second intermediate identifier, and the second sub-identifier is located at the second position in the third intermediate identifier, the first position and the second position are adjacent and non-overlapping in the identifier with a length of L bits, and the specific shifting method of moving the first sub-identifier from the third position in the original identifier to the first position is related to: the overlapping relationship between the second position and the third position.
[0257] Exemplarily, in the case where the third position and the second position overlap, the third bit operation is a left shift operation on the original identifier, or a right shift operation on the original identifier.
[0258] In one example, Lt is greater than t, the first position is the first t positions from high to low, the second position is the first Lt positions from low to high, and the third position is the first t positions from low to high. Then, there is an overlap between the second position and the third position in the original mark. Specifically, the Lt position mark of the second position in the original mark includes the t position mark of the third position. In this case, the third position operation is to shift the original mark left by Lt positions.
[0259] For example, L is 12, t is 4, the original identifier is 101111100111, and the t-bit identifier of the third position from low to high in the original identifier is 1011. Then, the original identifier is shifted left by 8 bits through the third bit operation to obtain the second intermediate identifier 011100000000.
[0260] Exemplarily, in the case where there is no overlap between the third position and the second position, the third bit operation is a left shift operation and then a right shift operation for the original identifier, or the third bit operation is a right shift operation and then a left shift operation for the original identifier. The third bit operation makes all identifiers outside the first position in the second intermediate vector invalid, so as to avoid affecting the accuracy of the identifier of the first operation object obtained by merging the contents of the same position of the first intermediate vector and the second intermediate vector in the subsequent process of obtaining the identifier of the first operation object.
[0261] In one example, the first position is the first t positions from high to low, the second position is the last Lt positions from high to low, and the third position is the first t positions from high to low, then the third position is the same as the first position, and the third position is adjacent to the second position and does not overlap. In this case, the third position operation is to right shift the original mark by Lt positions and then left shift by Lt positions.
[0262] For example, L is 12, t is 4, Lt is 8, the original identifier is 101111100111, and the third position is the first 4 bits from high to low. The management device shifts the original identifier right by 8 bits to obtain 000000001011; then shifts 000000001011 left by 8 bits to obtain the second intermediate identifier 101100000000.
[0263] Implementation b: extracting the second intermediate identifier from the original identifier.
[0264] In implementation b, X is greater than t, and the second intermediate identifier is the first sub-identifier. The first intermediate identifier obtained by implementation b can be used in implementation 2 in the above embodiment to generate the identifier of the first operation object.
[0265] Exemplarily, the management device intercepts the t-bit sub-identifier at the third position in the original identifier to obtain the first sub-identifier. For example, X is equal to 12, t is equal to 4, the original identifier is 101101001101, and the third position is the first 4 bits from high to low, then the management device intercepts the second intermediate identifier 1011 from the original intermediate identifier.
[0266] Optionally, after generating the second intermediate identifier, if the second intermediate identifier is globally unique in the computing system, the management device completes generating the second intermediate identifier; if the second intermediate identifier is not globally unique in the computing system, the management device re-executes step 720. For an introduction to the global uniqueness verification process, please refer to the above embodiment.
[0267] In the process of creating a management object, a globally unique first intermediate identifier is generated so that different management objects can be distinguished from each other in the computing system through the first sub-identifier, ensuring that the identifier of the operation object containing the first sub-identifier can indicate the management object associated with it.
[0268] Moreover, the global uniqueness of the first intermediate identifier helps to increase the success rate of obtaining the globally unique identifier of the operation object based on the first intermediate identifier. This helps to alleviate the problem that the spliced identifier obtained in the process of obtaining the identifier of the operation object is not globally unique, so that the identification of the operation object needs to be obtained multiple times, and helps to reduce the computing pressure of the management device.
[0269] The following embodiment takes the computing system as a relational database system as an example to introduce that in the process of creating a first database associated with a first tenant, the management device needs to generate an identifier of the first database. The identifier of the first database includes a t-bit first sub-identifier at the first position and a Lt-bit second sub-identifier at the second position, wherein the first sub-identifier is used to indicate the first tenant, and the second sub-identifier is used to indicate the first database.
[0270] In this embodiment, X and Z are L, the first direction is the same as the second direction, both are from low to high, the first position is the first t positions from high to low, and the second position is the last Lt positions from high to low; the following two function functions need to be used, namely: identification generation function Gen() and global unique function Unq(ID, Obj).
[0271] like Figure 8 As shown, the method for obtaining the identifier of the first database comprises the following steps:
[0272] Step 10: The management device obtains the second intermediate identifier t_id according to the original identifier id through Gen().
[0273] Optionally, the management device obtains the original identification id of the first tenant through Gen(). Subsequently, the management device processes the original identification id through a third bit operation to obtain a second intermediate identification t_id. Exemplarily, the second intermediate identification t_id includes L-bit or t-bit characters.
[0274] In one example, the management device retains the first t bits of the original identifier id from high to low through the third bit operation to obtain the second intermediate identifier t_id. Exemplarily, the management device shifts the original identifier id right by Lt bits through t_id=id>Lt, and fills the high Lt bits with 0, such as Figure 8 As shown, at this time, the t-bit first sub-identifier ID is located in the first t bits from the low bit to the high bit in the second intermediate identifier.
[0275] Further, in order to facilitate the subsequent merging step, the management device shifts the second intermediate identifier to the left by Lt positions through t_id < Lt, so that the t-position first sub-identifier ID is located in the first t positions from high to low in the second intermediate identifier. At this time, the first sub-identifier ID is located in the first position in the second intermediate identifier. Optionally, shifting the second intermediate identifier to the left by Lt positions is performed in step 10, or before performing step 40.
[0276] Step 20: The management device verifies whether the second intermediate identifier t_id is globally unique.
[0277] Optionally, the management device uses Unq(ID, Obj) to verify whether the second intermediate identifier of other tenants in the relational database system is the same as the second intermediate identifier t_id generated in step 10. Exemplarily, if the second intermediate identifier t_id is globally unique in the relational database system, the management device executes step 30; if the second intermediate identifier t_id is not globally unique in the relational database system, the management device re-executes step 10.
[0278] Step 30: The management device obtains the third intermediate identifier a_id′ according to the first intermediate identifier id′ through Gen().
[0279] Optionally, the management device obtains the L-bit first intermediate identifier id' through Gen(). Subsequently, the management device processes the first intermediate identifier id' through the first bit operation to obtain the third intermediate identifier a_id'. If the management device retains the first Lt bits of the first intermediate identifier id' from the high bit to the low bit, the third intermediate identifier a_id' is obtained.
[0280] Exemplarily, the management device shifts the first intermediate identifier id' right by t bits through a_id'=id'>t, and fills the high t bits with 0 to obtain the third intermediate identifier a_id'. Figure 8 As shown, the Lt-bit second sub-identifier a_id" is located in the last Lt bits from the high bit to the low bit in the third intermediate identifier a_id'; that is, the second sub-identifier a_id" is located in the second position in the third intermediate identifier a_id'.
[0281] Step 40: The management device combines the second intermediate identifier t_id and the third intermediate identifier a_id′ to obtain a concatenated identifier a_id.
[0282] For example, the management device obtains the concatenated identifier a_id through a_id=t_id|a_id′, where “|” represents an OR operation.
[0283] Subsequently, the management device uses Unq(ID, Obj) to verify whether the splicing identifier a_id is globally unique in the relational database system. If the splicing identifier a_id is globally unique in the computing system, the splicing identifier a_id is used as the identifier of the first database; if the splicing identifier a_id is not globally unique in the computing system, step 30 is re-executed.
[0284] In this way, binary encoding helps to quickly generate the identification of the operation object, thereby improving the generation efficiency of the identification of the operation object.
[0285] The present application also provides an object operation device, such as Fig. 9 As shown, the object operating device 900 includes a receiving module 910 and an operating module 920 .
[0286] Receiving module 910 is used to receive a request message sent by a first management object, where the request message includes an identifier of a first operation object associated with the first management object, a t-bit first sub-identifier at a first position in the identifier of the first operation object is used to indicate the first management object, and an Lt-bit second sub-identifier at a second position in the identifier of the first operation object is used to indicate the first operation object, t is a positive integer, and L is greater than t; the first position and the second position do not overlap.
[0287] The operation module 920 is used to perform the operation indicated by the request message on the operation target of the request message according to the identifier of the first operation object, and the operation target includes at least one of the following: the first operation object, the data stored in the first operation object, or the attribute data of the first operation object.
[0288] In a possible implementation, the object operation device further includes a first acquisition module and a second module. The first acquisition module is used to acquire a Z-bit first intermediate identifier when receiving an instruction for generating a first operation object, where Z is less than or equal to L and greater than or equal to Lt. The second acquisition module is used to acquire the identifier of the first operation object based on the first intermediate identifier and the second intermediate identifier. The second intermediate identifier includes the t-bit identifier at the third position in the X-bit original identifier of the first management object. The t-bit identifier at the third position in the X-bit original identifier of the first management object is the first sub-identifier; X is greater than t and less than or equal to L; the original identifier is generated when receiving an instruction to generate the first management object.
[0289] In a possible implementation, Z and X are L, and the t-bit identifier at the first position in the second intermediate identifier is the t-bit identifier at the third position in the original identifier. The second acquisition module is specifically used to obtain the third intermediate identifier based on the first intermediate identifier, and the Lt-bit identifier at the second position in the third intermediate identifier is the Lt-bit identifier at the fourth position in the first intermediate identifier, and all identifiers other than the second position in the third intermediate identifier are invalid identifiers; merge the contents of the same position of the second intermediate identifier and the third intermediate identifier to obtain an L-bit splicing identifier; the result of merging the content of one position with the invalid identifier is the content itself; when the splicing identifier is globally unique in the computing system, the splicing identifier is used as the identifier of the first operation object.
[0290] In a possible implementation, the second intermediate identifier is the first sub-identifier. The second acquisition module is specifically configured to use the Lt-bit identifier at the fourth position in the first intermediate identifier as the second sub-identifier; concatenate the first sub-identifier and the second sub-identifier to obtain an L-bit concatenated identifier; the first position in the concatenated identifier is the first sub-identifier, and the second position in the concatenated identifier is the second sub-identifier; and when the concatenated identifier is globally unique in the computing system, use the concatenated identifier as the identifier of the first operation object.
[0291] In a possible implementation, the object operation device further includes a generation module. The generation module is configured to generate an original identifier upon receiving an instruction for generating the first management object, and generate a second intermediate identifier according to the original identifier.
[0292] In a possible implementation, the fourth position is a continuous Lt position in the first direction, the first direction is from high position to low position, or from low position to high position. The third position is a continuous t position in the second direction, the second direction is from high position to low position, or from low position to high position.
[0293] In a possible implementation manner, the first position is the high position t position, and the second position is the low position Lt position; or, the first position is the low position t position, and the second position is the high position Lt position.
[0294] In a possible implementation, the computing system is a relational database system, the management object is a tenant, and the operation object is a database; the receiving module 910 is used to receive a request message sent by a first tenant, the request message also includes a third sub-identifier, and the third sub-identifier is a unique identifier of a first file in a first database; the operation target is the first file; the request message is used to perform a target operation on the first file, and the target operation includes reading, updating or deleting. The operation module 920 is used to locate the first database in the relational database system according to the identifier of the first database; locate the first file in the first database according to the third sub-identifier, and perform the target operation on the first file.
[0295] In a possible implementation, the computing system is a distributed file storage system, the management object is a master node, and the operation object is a sub-node associated with the master node; the receiving module 910 is used for the request message sent by the first master node. The request message also includes a fourth sub-identifier, which is a unique identifier of the first sub-node under the first master node. The operation target is the first sub-node; the request message is used to perform a target operation on the first sub-node, and the target operation includes data migration. The operation module 920 is used to locate the first master node in the distributed file storage system according to the identifier of the first sub-node; locate the first sub-node in the sub-nodes associated with the first master node according to the fourth sub-identifier, and perform the target operation on the first sub-node.
[0296] The receiving module 910 and the operating module 920 may be implemented by software or hardware. For example, the implementation of the receiving module 910 is described below by taking the receiving module 910 as an example. Similarly, the implementation of the operating module may refer to the implementation of the receiving module 910.
[0297] As an example of a software functional unit, the receiving module 910 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned computing instance may be one or more. For example, module A 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 data centers with close geographical locations. Among them, usually a region may include multiple AZs.
[0298] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.
[0299] As an example of a hardware functional unit, module A may include at least one computing device, such as a server, etc. Alternatively, module A may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0300] The multiple computing devices included in the receiving module 910 can be distributed in the same region or in different regions. The multiple computing devices included in the A module can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the A module can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0301] It should be noted that, in other embodiments, the receiving module can be used to execute any step in the object operation method, and the operating module can be used to execute any step in the object operation method. The steps that the receiving module and the operating module are responsible for implementing can be specified as needed, and the full functions of the object operation device are realized by implementing different steps in the object operation method by the receiving module and the operating module respectively.
[0302] The present application also provides a computing device 100, which is Figure 3 The management device 10 in FIG. Fig.10 As shown, the computing device 100 includes: a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other through the bus 102. The computing device 100 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 100.
[0303] The bus 102 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 The bus 104 is represented by only one line, but does not mean that there is only one bus or one type of bus. The bus 104 may include a path for transmitting information between various components of the computing device 100 (eg, the memory 106, the processor 104, and the communication interface 108).
[0304] The processor 104 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0305] The memory 106 may include a volatile memory, such as a random access memory (RAM). The processor 104 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0306] The memory 106 stores executable program codes, and the processor 104 executes the executable program codes to respectively implement the functions of the aforementioned modules A, B, and C, thereby implementing the object operation method. That is, the memory 106 stores instructions for executing the object operation method.
[0307] Alternatively, the memory 106 stores executable codes, and the processor 104 executes the executable codes to respectively implement the functions of the aforementioned YY device, AA device, and BB device, thereby implementing the object operation method. That is, the memory 106 stores instructions for executing the object operation method.
[0308] The communication interface 103 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 100 and other devices or a communication network.
[0309] The embodiment of the present application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.
[0310] like Fig.10 As shown, the computing device cluster includes at least one computing device 100. The memory 106 in one or more computing devices 100 in the computing device cluster may store the same instructions for executing the object operation method.
[0311] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the object operation method. In other words, the combination of one or more computing devices 100 may jointly execute instructions for executing the object operation method.
[0312] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster can store different instructions, which are respectively used to execute part of the functions of the object operation device. That is, the instructions stored in the memory 106 in different computing devices 100 can implement the functions of one or more modules in the receiving module and the operating module.
[0313] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig.11 A possible implementation is shown. Fig.11 As shown, two computing devices 100A and 100B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 106 in the computing device 100A stores instructions for executing the functions of the A module. At the same time, the memory 106 in the computing device 100B stores instructions for executing the functions of the receiving module.
[0314] Fig.11 The connection method between the computing device clusters shown may be based on the consideration that the object operation method provided in this application requires that the first operation object may be distributed on different computer devices, so it is considered to hand over the functions implemented by the operation module to the computing device 100B for execution.
[0315] It should be understood that Fig.11 The functions of the computing device 100A shown in FIG. 1 may also be completed by multiple computing devices 100. Similarly, the functions of the computing device 100B may also be completed by multiple computing devices 100.
[0316] The present application embodiment also provides another computing device cluster. The connection relationship between the computing devices in the computing device cluster can be similar to that of Fig.10 and Fig.11 The connection mode of the computing device cluster is different in that the memory 106 in one or more computing devices 100 in the computing device cluster may store the same instructions for executing the object operation method.
[0317] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the object operation method. In other words, the combination of one or more computing devices 100 may jointly execute instructions for executing the object operation method.
[0318] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster may store different instructions for executing partial functions of the computing system. That is, the instructions stored in the memory 106 in different computing devices 100 may implement the functions of the object operation device.
[0319] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the object operation method.
[0320] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute an object operation method.
[0321] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. An object operation method, characterized in that: The method is applied to a management device of a computing system, wherein the computing system is configured with a plurality of operation objects associated with a management object, and different management objects are associated with different operation objects. The computing system uses an L-bit globally unique identifier to indicate the operation object, and L is a positive integer greater than 1. The method comprises: Receive a request message sent by a first management object, the request message including an identifier of a first operation object associated with the first management object, a t-bit first sub-identifier at a first position in the identifier of the first operation object is used to indicate the first management object, and an Lt-bit second sub-identifier at a second position in the identifier of the first operation object is used to indicate the first operation object, t is a positive integer, and L is greater than t; the first position and the second position do not overlap; According to the identifier of the first operation object, the operation indicated by the request message is performed on the operation target of the request message, and the operation target includes at least one of the following: the first operation object, the data stored in the first operation object, or the attribute data of the first operation object.
2. The method according to claim 1, characterized in that: The method further comprises: When receiving an instruction for generating the first operation object, obtaining a Z-bit first intermediate identifier, where Z is less than or equal to L and greater than or equal to Lt; The identifier of the first operation object is obtained according to the first intermediate identifier and the second intermediate identifier, where the second intermediate identifier includes the t-bit identifier at the third position in the X-bit original identifier of the first management object; the t-bit identifier at the third position in the X-bit original identifier of the first management object is the first sub-identifier; X is greater than t and less than or equal to L; and the original identifier is generated when an instruction to generate the first management object is received.
3. The method according to claim 2, characterized in that The Z and X are L, the t-bit identifier of the first position in the second intermediate identifier is the t-bit identifier of the third position in the original identifier, and all identifiers other than the first position in the second intermediate identifier are invalid identifiers; and obtaining the identifier of the first operation object according to the first intermediate identifier and the second intermediate identifier includes: A third intermediate identifier is obtained according to the first intermediate identifier, wherein the Lt-bit identifier at the second position in the third intermediate identifier is the Lt-bit identifier at the fourth position in the first intermediate identifier, and all identifiers other than the second position in the third intermediate identifier are invalid identifiers; The second intermediate identifier and the third intermediate identifier are combined with the content at the same position to obtain an L-bit splicing identifier; the content at one position is combined with the invalid identifier to obtain the content itself; In the case where the splicing identifier is globally unique in the computing system, the splicing identifier is used as the identifier of the first operation object.
4. The method according to claim 2, characterized in that: The second intermediate identifier is the first sub-identifier, and acquiring the identifier of the first operation object according to the first intermediate identifier and the second intermediate identifier includes: The Lt bit identifier at the fourth position in the first intermediate identifier is used as the second sub-identifier; The first sub-identifier and the second sub-identifier are spliced together to obtain an L-position spliced identifier; the first position in the spliced identifier is the first sub-identifier, and the second position in the spliced identifier is the second sub-identifier; In the case where the splicing identifier is globally unique in the computing system, the splicing identifier is used as the identifier of the first operation object.
5. The method according to any one of claims 2 to 4, characterized in that: The method further comprises: In case of receiving an instruction for generating the first management object, generating the original identifier; The second intermediate identifier is generated according to the original identifier.
6. The method according to any one of claims 2 to 5, characterized in that: The fourth position is a continuous Lt position in the first direction, wherein the first direction is from a high position to a low position, or from a low position to a high position; The third position is a continuous t position in the second direction, and the second direction is from a high position to a low position, or from a low position to a high position.
7. The method according to any one of claims 1 to 6, characterized in that: The first position is the high position t, and the second position is the low position Lt; or, the first position is the low position t, and the second position is the high position Lt.
8. The method according to any one of claims 1 to 7, characterized in that: The computing system is a relational database system, the management object is a tenant, and the operation object is a database; The receiving a request message sent by the first management object includes: receiving a request message sent by the first tenant, the request message also including a third sub-identifier, the third sub-identifier being a unique identifier of the first file in the first database; the operation target being the first file; the request message being used to perform a target operation on the first file, the target operation including reading, updating or deleting; The method of performing the operation indicated by the request message on the operation target of the request message according to the identifier of the first operation object includes: locating the first database in the relational database system according to the identifier of the first database; locating the first file in the first database according to the third sub-identifier, and performing the target operation on the first file.
9. The method according to any one of claims 1 to 7, characterized in that: The computing system is a distributed file storage system, the management object is a master node, and the operation object is a sub-node associated with the master node; The receiving a request message sent by the first management object includes: receiving a request message sent by the first master node, the request message also including a fourth sub-identifier, the fourth sub-identifier being a unique identifier of the first sub-node under the first master node; the operation target is the first sub-node; the request message is used to perform a target operation on the first sub-node, the target operation including data migration; The method of performing the operation indicated by the request message on the operation target of the request message according to the identifier of the first operation object includes: locating the first main node in the distributed file storage system according to the identifier of the first child node; locating the first child node in the child nodes associated with the first main node according to the fourth child identifier, and performing the target operation on the first child node.
10. An object operating device, characterized in that: The device is applied to a computing system, wherein the computing system is configured with a plurality of operation objects associated with a management object, wherein different management objects are associated with different operation objects, and wherein an L-bit globally unique identifier is used in the computing system to indicate the operation object, where L is a positive integer greater than 1; the device comprises: a receiving module, configured to receive a request message sent by a first management object, wherein the request message includes an identifier of a first operation object associated with the first management object, a t-bit first sub-identifier at a first position in the identifier of the first operation object is used to indicate the first management object, and an Lt-bit second sub-identifier at a second position in the identifier of the first operation object is used to indicate the first operation object, where t is a positive integer and L is greater than t; and the first position does not overlap with the second position; An operation module is used to perform the operation indicated by the request message on the operation target of the request message according to the identifier of the first operation object, and the operation target includes at least one of the following: the first operation object, the data stored in the first operation object, or the attribute data of the first operation object.
11. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 9.
12. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 9.
13. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster performs the method according to any one of claims 1 to 9.