A tree-like hierarchical cluster user management method based on semi-structured storage

By adopting the tree-level user management method of semi-structured storage and the double-copy cache strategy in the cluster management system, the problems of poor user management performance and poor flexibility in the cluster management system are solved, and high concurrent reading and writing and group management are achieved. Improvement of capabilities.

CN117828127BActive Publication Date: 2024-08-30PEKING UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311745296.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-18
Publication Date
2024-08-30
Estimated Expiration
2043-12-18

AI Technical Summary

Technical Problem

The existing user management module of the cluster management system has problems of poor performance and poor flexibility. In particular, the user system of the SLURM system uses structured storage, which limits its flexibility and readability, and lacks clear module division and permission constraints. Group management is not possible.

Method used

Adopt a tree-level cluster user management method based on semi-structured storage, use a non-relational database to create a tree-level account tree logical structure, combine it with a double-copy caching strategy to optimize read and write performance, and establish affiliations through the tree structure to provide The system provides group management capabilities.

Benefits of technology

It improves the flexibility and performance of user management, supports high concurrent reading and writing and data security, implements group management and permission control, and simplifies code maintenance and development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117828127B_ABST
    Figure CN117828127B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of resource management technology, and discloses a tree-like hierarchical cluster user management method based on semi-structured storage. The method provided by the present invention includes: using semi-structured data to create a tree-like hierarchical account tree logical structure in a non-relational database according to the functional requirements and non-functional requirements of the user; using a double-copy cache strategy to optimize the read and write performance of user requests in the tree-like hierarchical account tree logical structure, and completing the tree-like hierarchical cluster user management. The method provided by the present invention adopts semi-structured database storage in the physical storage structure, and adopts a tree-like hierarchical structure in the logical structure to maintain the relationship between the account tree and the user, which provides higher flexibility while ensuring low data redundancy, and at the same time uses the tree structure to establish affiliations to provide group management capabilities for the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of resource management, and in particular to a tree-like hierarchical cluster user management method based on semi-structured storage. Background Art

[0002] With the popularity of ChatGPT, the research enthusiasm of the scientific research community and the industry for large model technology has reached a new peak. The training of large models depends on extremely high computing power, which often needs to be solved through clusters and high-performance computing technologies. As an important part of the cluster management system, the user account management module affects the performance and security of the entire system and determines the interactive management between the system and the user end.

[0003] At present, there are some shortcomings in the user management modules of many cluster management systems. Taking the widely used SLURM system as an example, its user system adopts MySQL structured storage, which limits its flexibility. The data table definition needs to strictly abide by the fixed structure, which is not convenient for accommodating heterogeneous data and adding new fields, and the data is not self-descriptive. Secondly, when expressing the account association relationship, the SLURM system uses an association table, which leads to poor readability and difficulty in establishing a hierarchical relationship. In addition, the user management code logic of the SLURM system is complex, highly coupled, difficult to maintain and participate in development, and there is no clear module division. Finally, there is no permission constraint between the parent and child accounts of the SLURM system, and there is no actual ownership relationship, which makes it impossible to perform group management. Based on the above description, there is an urgent need for a tree-like hierarchical cluster user management method based on semi-structured storage to solve the problems of poor user management performance and poor flexibility. Summary of the invention

[0004] In view of this, the present invention provides a tree-like hierarchical cluster user management method based on semi-structured storage to solve the problems of poor user management performance and poor flexibility.

[0005] In a first aspect, the present invention provides a tree-like hierarchical cluster user management method based on semi-structured storage, the method comprising:

[0006] Based on the functional and non-functional requirements of users, a tree-level account tree logical structure is created using semi-structured data in a non-relational database;

[0007] The double-copy cache strategy is used to optimize the read and write performance of user requests in the tree-level account tree logical structure to complete the tree-level cluster user management.

[0008] The method provided in the embodiment of the present invention adopts semi-structured database storage in the physical storage structure and adopts a tree-like hierarchical structure in the logical structure to maintain the account tree and the user association relationship, which provides higher flexibility while ensuring low data redundancy. At the same time, the tree structure is used to establish a subordinate relationship to provide group management capabilities for the system.

[0009] In an optional implementation, the functional requirements include: requirements for adding, deleting, checking and modifying users of multiple clusters, requirements for adding, deleting, checking and modifying accounts of multiple clusters, group management requirements, user role management requirements, permission control requirements and job metering requirements.

[0010] The method provided in the embodiment of the present invention supports group management and multiple accounts through the setting of functional requirements. Users can independently inherit the attributes of accounts under different accounts and can select different accounts in different scenarios. The user's usage behavior is constrained through attribute information such as service quality and allowed use of partitions, and the user's usage is recorded, which can be connected to the corresponding billing system.

[0011] In an optional implementation, the non-functional requirements include: high concurrent reading and writing requirements, referential integrity requirements, and data security requirements.

[0012] The method provided by the embodiment of the present invention supports high concurrent reading and writing, ensures reference integrity and ensures data security through the setting of non-functional requirements.

[0013] In an optional implementation, the account tree logical structure of each tree level includes: a parent account, multiple sub-accounts and multiple sub-users, wherein:

[0014] The parent account is the first-level node. In the tree hierarchy, the second-level nodes are sub-accounts or sub-users. When the second-level nodes are sub-accounts, the third-level nodes are sub-accounts or sub-users, and so on, until the last-level nodes are all sub-users.

[0015] The method provided by the present invention can provide group control for the system through the permission constraints of the parent account and the sub-account.

[0016] In an optional implementation, each tree level has one and only one parent account pointer, and when the parent account pointer is empty, the parent account is the root node account.

[0017] In an optional implementation, in the tree-level account tree logical structure, corresponding list information is set for each account and user, wherein:

[0018] The account list information includes: account name, parent account, sub-account list, user list, administrator, default QOS, available partition list and available QOS list;

[0019] The user list information includes: user name, UID, default QOS, available partition list and available QOS list, user role, default account, account list and manageable account list.

[0020] In an optional implementation, the dual-copy cache strategy includes: a first cache and a second cache, wherein:

[0021] When only read threads are detected, each read thread reads the first cache through the current pointer. When a write thread is detected at the same time, the current pointer is converted to point to the second cache, and the new read thread reads the second cache. The write thread waits for all read threads in the first cache to end and starts the write operation. When the write thread ends, the current pointer is converted to point to the first cache, and the data in the first cache is updated to the second cache to complete the synchronization of the double cache information.

[0022] The method provided by the present invention uses a double-copy cache strategy to prevent a write thread from blocking other threads for a long time.

[0023] In a second aspect, the present invention provides a tree-like hierarchical cluster user management device based on semi-structured storage, the device comprising:

[0024] The tree-like hierarchical creation module is used to create a tree-like hierarchical account tree logical structure using semi-structured data in a non-relational database according to the user's functional and non-functional requirements;

[0025] The cluster management module is used to optimize the read and write performance of user requests in the tree-level account tree logical structure by using a double-copy cache strategy, and complete the tree-level cluster user management.

[0026] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the tree-like hierarchical cluster user management method based on semi-structured storage of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0027] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the tree-like hierarchical cluster user management method based on semi-structured storage of the above-mentioned first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0029] Figure 1 is a schematic diagram of database performance comparison according to an embodiment of the present invention;

[0030] Figure 2 is a flow chart of a tree-like hierarchical cluster user management method based on semi-structured storage according to an embodiment of the present invention;

[0031] Figure 3 is an account user logical structure diagram according to an embodiment of the present invention;

[0032] Figure 4 is a double copy cache read and write performance optimization diagram according to an embodiment of the present invention;

[0033] Figure 5 is a graph showing the performance test results of an account management module according to an embodiment of the present invention;

[0034] Figure 6 is a structural block diagram of a tree-like hierarchical cluster user management device based on semi-structured storage according to an embodiment of the present invention;

[0035] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0037] The embodiment of the present invention proposes a design scheme for a tree-like hierarchical user account management method using semi-structured storage. The non-relational (NoSQL) database MongoDB is used for storage in the physical storage structure. The advantages of MongoDB over MySQL in high concurrent read and write performance and its full support for non-structured data and semi-structured data can be used to improve the performance and flexibility of the user management module while ensuring basic functions. In terms of logical structure, a tree-like hierarchical structure is used to maintain the relationship between the account tree and the user, and ownership relationships are assigned to users and accounts. Sub-users and sub-accounts will be subject to the authority constraints of the parent account, providing group management capabilities. It provides higher flexibility while ensuring low data redundancy, and uses a tree structure to establish affiliations to provide group management capabilities for the system. In addition, by setting a database cache in memory, it is ensured that the overall performance is not limited by IO, and transactions are used to ensure data consistency.

[0038] Since structured query language and relational databases such as MySQL appeared earlier, the technology and theory are relatively mature, and cluster scheduling systems such as SLURM of the same period mostly use relational databases for data storage, so this choice has a certain historical inevitability. With the development of the times, some NoSQL databases have begun to emerge, and MongoDB was first open sourced to the outside world in 2009. Due to its high scalability and flexible data model, MongoDB soon gained widespread application in the field of non-relational databases. Now, MongoDB has become the most popular document database, and has shown high performance when processing large-scale unstructured data. After version 4.2, MongoDB also supports multi-document ACID transactions and distributed transactions, which makes MongoDB's transaction processing capabilities closer to traditional relational databases, and provides good technical support for the selection of semi-structured data structures in the embodiments of the present invention.

[0039] Before selecting a database, the present invention conducted a comparative test on the performance of MySQL and MongoDB databases in large-scale data addition, deletion, query and modification operations. The present invention randomly generated 10 million high-performance computing job data in the database, and averaged the results of multiple tests. Figure 1As shown (the smaller the value, the better the performance). The main advantages of MongoDB over MySQL are as follows: Flexible data model: MongoDB is a document-based database that can store and process data with complex nested structures. Horizontal scalability: MongoDB supports sharding and can be easily expanded to multiple servers to handle large-scale data sets. High-performance read and write: MongoDB generally provides higher performance when processing a large number of read and write operations in very large data sets. Convenient JS query language: MongoDB uses JavaScript scripting language as its query language, which is more familiar and easier to use for many developers.

[0040] According to an embodiment of the present invention, an embodiment of a tree-like hierarchical cluster user management method based on semi-structured storage is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0041] In this embodiment, a tree-like hierarchical cluster user management method based on semi-structured storage is provided, which can be used for the above-mentioned mobile terminals, such as mobile phones, tablet computers, etc. Figure 2 is a flowchart of a tree-like hierarchical cluster user management method based on semi-structured storage according to an embodiment of the present invention, such as Figure 2 As shown, the process includes the following steps:

[0042] Step S201, based on the functional requirements and non-functional requirements of the user, a tree-like hierarchical account tree logical structure is created using semi-structured data in a non-relational database.

[0043] In the embodiment of the present invention, as a user management module of a high-performance cluster scheduling system, it needs to meet the functional requirements of users, such as: the requirements of adding, deleting, checking and modifying multiple cluster users, the requirements of adding, deleting, checking and modifying multiple cluster accounts, group management requirements, user role management requirements, authority control requirements and job metering requirements. This is only an example, not limited to this. In actual applications, corresponding functional requirements are set according to actual conditions. The specific contents are as follows: 1. Support the addition, deletion and information modification of multiple cluster users and accounts, and support the establishment and association of QOS tables. 2. Support group management. Accounts can be bound to parent accounts, and the permissions of child account users are constrained by parent accounts to form a hierarchical permission constraint relationship. The control of a parent account can be spread to child accounts and users through constraints to achieve group management. 3. Support multiple accounts. Users can independently inherit the attributes of accounts under different accounts and can choose different accounts in different scenarios. 4. Support user roles. Set different levels of user roles, and grant users different permission levels by assigning different roles to users. The system can determine the user's permission closure and prevent permission overflow. 5. Access control and metering can be performed. By using attribute information such as QOS and allowed usage partitions to constrain user usage behavior and record user usage, the corresponding billing system can be connected.

[0044] In an embodiment of the present invention, non-functional requirements include: high-concurrency read and write requirements, reference integrity requirements, and data security requirements. This is just an example and is not limited to this. In actual applications, corresponding non-functional requirements are set according to actual conditions. The specific contents are as follows: 1. Support high-concurrency read and write. Since each job submission requires authentication and behavior record of the user submitting the job, and submitting a job is a high-concurrency operation, higher read and write performance is required. 2. Ensure reference integrity. There are pointers pointing to each other between users and accounts, and the consistency of relationships such as QOS reference counts needs to be guaranteed not to be destroyed during data operations. 3. Ensure data security. Ensure that data will not be illegally accessed, and when unexpected situations such as hardware failures occur in the system, the data status can be restored through data redundant backup.

[0045] In the embodiment of the present invention, in order to meet the above requirements, Figure 3As shown in the figure, a tree-like hierarchical account tree logical structure is designed. Each account has one and only one parent account pointer, a sub-account and a sub-user list. Each account has some basic information, such as description, id, etc., and some permission information, such as AllowedQOS, AllowedPartition, Block, etc., to constrain all its sub-users and sub-accounts, and do not exceed the permission range of the parent account. The tree-like hierarchical account structure can simulate the superior-subordinate relationship in scientific research laboratories and companies, and to a certain extent provides convenience for high-frequency users of high-performance computing. At the same time, this permission constraint of parent-child accounts can provide group control for the system. For example, by binding some accounts to a group account, all accounts will be constrained by this parent account, thereby realizing group control. When the permission information of the parent account is changed, the change will spread to the sub-accounts.

[0046] In an embodiment of the present invention, the logical structure of the account tree at each tree level includes: a parent account, multiple sub-accounts and multiple sub-users, wherein the parent account is a node at the first level, and in the tree level, the node at the second level is a sub-account or a sub-user, when the second-level node is a sub-account, the third-level node is a sub-account or a sub-user, and so on, until the last level nodes are all sub-users. Each tree level has and only has one parent account pointer, and when the parent account pointer is empty, the parent account is the root node account. In the logical structure of the account tree at the tree level, the corresponding list information is set for the account and the user respectively. The list information of the account includes: account name, parent account, sub-account list, user list, administrator, default QOS, available partition list and available QOS list, etc. This is only an example, not limited to this, and the list information of the corresponding account is selected according to the actual situation in actual application. The user list information includes: user name, UID, default QOS, available partition list and available QOS list, user role, default account, account list and manageable account list, etc. This is only an example and is not limited to this. In actual applications, the corresponding user list information is selected according to the actual situation.

[0047] In the embodiment of the present invention, four roles are designed for users, and each role represents a certain level of authority. The four roles are: Super Administrator (Admin): has the same level of authority as the Linux root user, and the database and all system information are completely open. System Administrator (Operator): can perform all legal operations of the system, and is allowed to add, delete, check and modify the entire account user system. Account Administrator (Coordinator): has operational authority over users under the same account as itself and sub-accounts of its own account. Ordinary User (None): has no other authority except query, and can only query users and sub-accounts under the same account as itself.

[0048] In the embodiment of the present invention, in the user access control, in the user data, for each account used by the user, a data structure is included to store the permission information inherited under the account. When the user submits a job, the corresponding allowed service quality QOS is queried through the specified partition, account used, and user name, and the number of cores that can be used, the number of jobs submitted, etc. are controlled by QOS, and the usage is recorded under the corresponding user's account.

[0049] Step S202 , using a double-copy cache strategy to optimize the read and write performance of user requests in the tree-level account tree logical structure, to complete the tree-level cluster user management.

[0050] In the implementation of the present invention, when a user needs to operate the account user system, the system automatically retrieves his role and all accounts, calculates his permission closure, and determines whether the operation object meets the permission constraint based on the permission closure. Although the maintenance operation frequency of user account data is not high, the high-performance cluster determines its high-frequency job submission, which will bring a large number of read and write requests to the user system. In order to improve the read and write performance of the user system, the embodiment of the present invention uses a cache strategy to store all images of accounts and users in the account database in the memory, and uses the Write-Through strategy to ensure the consistency of data in the memory and the database. When reading data, the memory data is directly read, and when modifying data, it is immediately synchronized to the database.

[0051] In the embodiment of the present invention, the performance of reading data will completely depend on the efficiency of searching for data in the memory. In order to improve the speed of reading data, the embodiment of the present invention uses a global hash array to store data structure pointers to improve the efficiency of indexing data.

[0052] In order to avoid data confusion caused by modifying the same memory area under high concurrency operations, read-write locks are used for asynchronous control, and a read-write lock is set for each user set, account set, etc. for protection. In the design of the embodiment of the present invention, the setting of the read-write lock mainly involves two problems. First, the index is established by using the data pointer array. When providing a query interface to the outside, it means that the process from the outside obtaining the data pointer to the release is a critical area, and a read lock needs to be provided to the outside for protection. For this reason, the embodiment of the present invention designs the ScopeExclusivePtr class, which obtains the read lock before the data is returned, and the lock pointer and the data pointer are packaged and returned. When the class object is destroyed, the lock is automatically released, ensuring that the read lock is protected during the process of reading data through the data pointer outside; second, the use of a tree-like hierarchical structure means that the functional logic will contain recursive operations. When the recursive operation and the functions in the module call each other, it is easy to cause the problem of repeated locking and unlocking leading to deadlock. Therefore, in the design of the embodiment of the present invention, the functional functions required in the module are set to non-locked versions, and the interface provided to the outside is locked according to the critical variables involved in the internal interface surveyed. In order to ensure the symmetry of locking and unlocking, the lock_guard encapsulation class is basically used in the module for locking and unlocking.

[0053] Since the frequency of reading data is higher than the frequency of writing data, and the immediate write strategy causes the write thread to need a longer IO time, in order to avoid the write thread blocking other threads for a long time, the embodiment of the present invention adopts a double copy cache strategy.

[0054] like Figure 4 As shown, in the memory, the embodiment of the present invention sets two cache areas with consistent data, and a global pointer current point is initialized to randomly point to one of the buffer caches, which is the current display cache front buffer, and the other cache is the hidden cache. If there are only read threads in the system, each read thread will read the data of the display cache through the current point pointer. Once a write thread appears in the system, the write thread will also try to obtain the read lock of the display cache through the current point. At this time, it may be obtained or blocked. At the same time, the system will obtain the read lock of the hidden cache and switch the current point to the hidden cache. At this time, the new read thread will start to read the data of the hidden cache without being blocked. If the write thread is blocked in the original display cache, since the new read thread will no longer enter the original display cache, the write thread can start the write operation after the read thread gradually exits. When multiple write threads appear in the system, all write threads will be queued in the new hidden cache, and all write threads will be executed in FCFS order.

[0055] When all write threads are finished, the current point will point to the display cache before the switch, so that the read thread can read the latest version of the data. At the same time, the system enables a read thread and a write thread to synchronize the data in the two caches. According to the previous algorithm rules, the read thread will automatically read from the latest display cache, and the write thread will automatically write to the hidden cache. However, in order to prevent switching after this synchronous write, resulting in switching oscillation, the embodiment of the present invention will mark this write as a synchronous write and will not switch, thus returning to the initial state of the algorithm. Except for the extremely short time of switching the current point pointer, the embodiment of the present invention will hardly be blocked in the read thread, and the new read thread can read the latest data at the moment the write thread is completed. Therefore, this greatly improves the efficiency of reading and writing, and also ensures that the data will not be confused during operation.

[0056] In a specific embodiment, the account management module performance test is performed. The account system design is verified and tested on the self-developed scheduling system CraneSched. In a 256-node physical cluster, the hardware attributes of a single node are (IntelXeon Gold 6458Q@3.1GHz, 503G memory). Mininet is used to simulate a large-scale cluster of 10,000 nodes. The cacctmgr command is an instruction used by the CraneSched system for user account management. The cacctmgr user management instructions are tested to see how the latency changes with the number of jobs submitted to the system. Figure 5 As shown, it can be seen that under high concurrency conditions, the entire user management module maintains a relatively fast response speed.

[0057] The embodiment of the present invention requires an in-depth understanding of the overall architecture of the supercomputing scheduling system and the functional requirements of the user management module, and can design a user system that meets the requirements of the supercomputing scenario. It is necessary to conduct a detailed source code analysis of the existing Slurm system with more than 500,000 lines of code, analyze the working principle and bottleneck pain points of its user module, and propose targeted solutions to achieve 70% of the functions with only 1 / 10 of the code. It is necessary to skillfully apply computer-related knowledge such as high concurrency technology, database technology, synchronization and asynchronous strategies, and lock mechanisms. It is necessary to complete the overall coding work from the architectural design of the entire user system to the writing of each functional function, while ensuring compatibility with the scheduling system. It is necessary to simulate a large-scale cluster through tools such as mininet to test the effect under a small amount of host resources, and it is necessary to embed the user system into a fully functional scheduling system. It is necessary to ensure that on the basis of functional completeness, the design flexibility is guaranteed, and the overall read and write performance is extremely high, as well as strong compatibility.

[0058] The tree-like hierarchical cluster user management method based on semi-structured storage provided by the embodiment of the present invention adopts semi-structured data storage in the physical storage of data, and uses the more representative emerging NoSQL database MongoDB, which improves flexibility and facilitates development and maintenance while ensuring functionality and reliability; a tree-like hierarchical structure is adopted in the logical structure, which conforms to the user composition of the high-performance cluster, adds a permission inheritance mechanism and a constraint mechanism, so that group management can be realized, and account and user management is more flexible and effective; in terms of access control, user role management is proposed, general permissions are bound to different roles, and special permissions are stored in a single user information; in terms of architecture, a two-layer architecture of the database layer and the application layer is adopted, the functions are modularized, and code reuse is improved; in terms of performance optimization, a cache mechanism is adopted, and a design idea of ​​double-copy cache is proposed, so that the read thread is never blocked, which greatly avoids the read-write lock competition.

[0059] In this embodiment, a tree-like hierarchical cluster user management device based on semi-structured storage is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0060] This embodiment provides a tree-like hierarchical cluster user management device based on semi-structured storage, such as Figure 6 As shown, including:

[0061] The tree-like hierarchical creation module 601 is used to create a tree-like hierarchical account tree logical structure using semi-structured data in a non-relational database according to the functional requirements and non-functional requirements of the user;

[0062] The cluster management module 602 is used to optimize the read and write performance of user requests in the tree-level account tree logical structure by using a double-copy cache strategy, and complete the tree-level cluster user management.

[0063] The tree-like hierarchical cluster user management device based on semi-structured storage in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0064] The embodiment of the present invention also provides a computer device having the above Figure 6 The tree-like hierarchical cluster user management device based on semi-structured storage is shown.

[0065] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0066] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0067] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0068] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0069] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0070] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0071] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0072] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A tree-like hierarchical cluster user management method based on semi-structured storage, characterized in that: The method comprises: Based on the functional and non-functional requirements of users, a tree-level account tree logical structure is created using semi-structured data in a non-relational database; A double-copy cache strategy is used to optimize the read and write performance of user requests in a tree-level account tree logical structure, and to complete tree-level cluster user management; the double-copy cache strategy includes: a first cache and a second cache, wherein when only a read thread is detected, each read thread reads the first cache through a current pointer, and when a write thread is detected at the same time, the current pointer is converted to point to the second cache, and a new read thread reads the second cache, and the write thread waits for all read threads in the first cache to end and starts a write operation, and when the write thread ends, the current pointer is converted to point to the first cache, and the data in the first cache is updated to the second cache, thereby completing the synchronization of double cache information.

2. The method according to claim 1, characterized in that The functional requirements include: the requirements for adding, deleting, checking and modifying users of multiple clusters, the requirements for adding, deleting, checking and modifying accounts of multiple clusters, group management requirements, user role management requirements, permission control requirements and job measurement requirements.

3. The method according to claim 1, characterized in that The non-functional requirements include: high concurrent reading and writing requirements, referential integrity requirements and data security requirements.

4. The method according to claim 1, characterized in that: The logical structure of each tree-level account tree includes: a parent account, multiple sub-accounts and multiple sub-users, among which: The parent account is the first-level node. In the tree hierarchy, the second-level nodes are sub-accounts or sub-users. When the second-level nodes are sub-accounts, the third-level nodes are sub-accounts or sub-users, and so on, until the last-level nodes are all sub-users.

5. The method according to claim 4, characterized in that Each tree level has only one parent account pointer. When the parent account pointer is empty, the parent account is the root node account.

6. The method according to claim 1, characterized in that In the tree-level account tree logical structure, accounts and users are respectively set with corresponding list information, among which: The account list information includes: account name, parent account, sub-account list, user list, administrator, default QOS, available partition list and available QOS list; The user list information includes: user name, UID, default QOS, available partition list and available QOS list, user role, default account, account list and manageable account list.

7. A tree-like hierarchical cluster user management device based on semi-structured storage, characterized in that: The device comprises: The tree-like hierarchical creation module is used to create a tree-like hierarchical account tree logical structure using semi-structured data in a non-relational database according to the user's functional and non-functional requirements; The cluster management module is used to optimize the read and write performance of user requests in the tree-level account tree logical structure by using a double-copy cache strategy to complete the tree-level cluster user management; the double-copy cache strategy includes: a first cache and a second cache, wherein, when only a read thread is detected, each read thread reads the first cache through a current pointer, and when a write thread is detected at the same time, the current pointer is converted to point to the second cache, and the new read thread reads the second cache. The write thread waits for all read threads in the first cache to end and starts the write operation. When the write thread ends, the current pointer is converted to point to the first cache, and the data of the first cache is updated to the second cache to complete the double cache information synchronization.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the tree-like hierarchical cluster user management method based on semi-structured storage as described in any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the tree-like hierarchical cluster user management method based on semi-structured storage according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Storage method for centralized extensible fusion type multi-dimensional complex structure relational data

    CN106095862A

  • Hierarchical data management method, hierarchical data management system and instant messaging system

    CN107766355A