Cluster login method and device based on server

By receiving and parsing the client's login request, generating target file tags and determining the target file path, and calling the login authentication file to implement cluster login, it solves the problem that the server cannot selectively authenticate all clusters, and improves the processing efficiency of creating or initializing tenants.

CN118740398APending Publication Date: 2024-10-01BEIJING GRIDSUM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310318504.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In the existing technology, the server cannot implement selective authentication login for all clusters based on login requests, resulting in limited operations for creating new tenants or initializing tenants, affecting processing efficiency.

Method used

By receiving and parsing the target cluster login request sent by the client, the target file label is generated according to the deployment environment parameters and data center parameters, the target file path is determined using the cluster file information set in the label mapping path format, and the login authentication file is called to perform the login operation. Create or initialize tenants based on tenant configuration requirement parameters.

Benefits of technology

The server realizes selective authentication login for all clusters, avoids restrictions on new or initialized tenant operations, and improves processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740398A_ABST
    Figure CN118740398A_ABST
Patent Text Reader

Abstract

The invention discloses a cluster login method and device based on a server, relates to the technical field of cluster login, and mainly aims to realize selective authentication login of all clusters and avoid operation limitation of new tenants or initialized tenants so as to improve the processing efficiency of the new tenants or the initialized tenants. According to the main technical scheme, the method comprises the following steps: receiving and analyzing a login request corresponding to a target cluster sent by a client to obtain corresponding request content; generating a target file tag corresponding to the target cluster according to deployment environment parameters and data center parameters in the request content; determining a target file path corresponding to the target cluster in the cluster file information set by using the target file label; and calling a login authentication file corresponding to the target file path to execute a login operation on the target cluster, and executing a new or initialized operation based on the tenant configuration demand parameter in the request content. The method is used for cluster login based on the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cluster login, and in particular to a cluster login method and device based on a server. Background Art

[0002] During the Hadoop cluster construction process, multiple environments such as development, testing, and production will be deployed, and each deployment environment corresponds to multiple data centers. Since the Hadoop cluster is a multi-tenant mode, it can isolate resources such as CPU, memory, and storage according to tenants. Therefore, there is often a need to create new tenants or initialize tenants in a cluster during use.

[0003] At present, in the prior art, creating a new tenant or initializing a tenant in a cluster generally involves directly authenticating and logging into the cluster corresponding to the specific deployment environment and data center in the form of a default interface, thereby realizing the operation of creating a new tenant or initializing a tenant. However, the above method is not applicable to all clusters corresponding to the server, that is, the server cannot realize selective authentication and login to all clusters according to the login request, resulting in restrictions on the operation of creating a new tenant or initializing a tenant, which in turn affects the processing efficiency of creating a new tenant or initializing a tenant. Summary of the invention

[0004] In view of the above problems, the present invention provides a server-based cluster login method and device, the main purpose of which is to achieve selective authentication login for all clusters, avoid restrictions on the operations of new tenants or initialized tenants, and thus improve the processing efficiency of new tenants or initialized tenants.

[0005] In order to solve the above technical problems, the present invention proposes the following solutions:

[0006] In a first aspect, the present invention provides a server-based cluster login method, which is applied to the server, and the method includes:

[0007] Receive and parse the login request corresponding to the target cluster sent by the client to obtain the corresponding request content;

[0008] Generate a target file tag corresponding to the target cluster according to the deployment environment parameters and data center parameters in the request content;

[0009] Determine the target file path corresponding to the target cluster in the cluster file information set by using the target file tag, wherein the cluster file information set is used to represent a set consisting of cluster file information corresponding to each existing cluster stored in a tag mapping path format;

[0010] The login authentication file corresponding to the target file path is called to perform a login operation on the target cluster, and a new creation or initialization operation is performed based on the tenant configuration requirement parameters in the request content.

[0011] In a second aspect, the present invention provides a server-based cluster login device, which is applied to the server, and the device includes:

[0012] A receiving unit, configured to receive and parse a login request corresponding to a target cluster sent by a client to obtain corresponding request content;

[0013] A first generating unit, configured to generate a target file tag corresponding to the target cluster according to the deployment environment parameters and the data center parameters in the request content obtained by the receiving unit;

[0014] a determination unit, configured to determine a target file path corresponding to the target cluster in a cluster file information set using the target file label obtained by the first generation unit, wherein the cluster file information set is used to represent a set consisting of cluster file information corresponding to each existing cluster stored in a label mapping path format;

[0015] The first execution unit is used to call the login authentication file corresponding to the target file path obtained by the determination unit to perform a login operation on the target cluster, and perform a new creation or initialization operation based on the tenant configuration requirement parameters in the request content.

[0016] In order to achieve the above-mentioned purpose, according to the third aspect of the present invention, a storage medium is provided, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the server-based cluster login method of the first aspect.

[0017] In order to achieve the above-mentioned purpose, according to the fourth aspect of the present invention, an electronic device is provided, which includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call the program instructions in the memory to execute the server-based cluster login method of the first aspect above.

[0018] By means of the above technical scheme, a server-based cluster login method and device provided by the present invention is that when it is necessary to authenticate and log in to any cluster based on the server, firstly, a login request corresponding to the target cluster sent by the client is received and parsed to obtain the corresponding request content, and then a target file tag corresponding to the target cluster is generated according to the deployment environment parameters and data center parameters in the request content, and then the target file tag is used to determine the target file path corresponding to the target cluster in the cluster file information set, wherein the cluster file information set is used to represent a set composed of cluster file information corresponding to each existing cluster stored in a label mapping path format, and finally the login authentication file corresponding to the target file path is called to perform the login operation on the target cluster, and a new creation or initialization operation is performed based on the tenant configuration requirement parameters in the request content. Through the technical solution provided by the present invention, it is possible to generate a target file label corresponding to the target cluster according to the deployment environment parameters and data center parameters recorded in the login request, and determine the target file path in a set consisting of cluster file information corresponding to each existing cluster stored in a label mapping path format, and then call the login authentication file corresponding to the target file path to achieve login to the target cluster, thereby creating a new tenant or initializing a tenant based on the tenant configuration requirement parameters, that is, the server can achieve selective authentication login for all clusters according to the login request, thereby avoiding restrictions on the operation of creating a new tenant or initializing a tenant, and further improving the processing efficiency of creating a new tenant or initializing a tenant.

[0019] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0021] Figure 1 A flow chart of a cluster login method based on a server provided in an embodiment of the present invention is shown;

[0022] Figure 2 Another flow chart of a cluster login method based on a server provided in an embodiment of the present invention is shown;

[0023] Figure 3 A block diagram showing a composition of a cluster login device based on a server provided by an embodiment of the present invention;

[0024] Figure 4 A block diagram showing another server-based cluster login device provided by an embodiment of the present invention is shown;

[0025] Figure 5 A schematic diagram of an electronic device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0026] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0027] At present, in the prior art, for creating a new tenant or initializing a tenant in a certain cluster, the default interface is generally used to directly authenticate and log in to the cluster corresponding to the specific deployment environment and data center, so as to realize the operation of creating a new tenant or initializing a tenant. However, the above method is not applicable to all clusters corresponding to the server, that is, the server cannot realize selective authentication and login to all clusters according to the login request, resulting in the operation of creating a new tenant or initializing a tenant being limited, thereby affecting the processing efficiency of creating a new tenant or initializing a tenant. The present invention generates a target file label corresponding to the target cluster through the deployment environment parameters and data center parameters recorded in the login request, and determines the target file path in the set composed of cluster file information corresponding to each existing cluster stored in the label mapping path format, and then calls the login authentication file corresponding to the target file path to realize the login to the target cluster, thereby creating a new tenant or initializing a tenant based on the tenant configuration requirement parameters, that is, the server can realize selective authentication and login to all clusters according to the login request, thereby avoiding the operation of creating a new tenant or initializing a tenant being limited, thereby improving the processing efficiency of creating a new tenant or initializing a tenant.

[0028] To this end, the embodiment of the present invention provides a cluster login method based on the server, through which selective authentication login of all clusters can be realized, avoiding restrictions on the operation of creating new tenants or initializing tenants, thereby improving the processing efficiency of creating new tenants or initializing tenants. The specific execution steps are as follows: Figure 1 As shown, it is applied to the server, including:

[0029] 101. Receive and parse a login request corresponding to a target cluster sent by a client to obtain corresponding request content.

[0030] It should be noted that, in the present embodiment, the client includes but is not limited to computers, mobile phones and other intelligent electronic devices, and the target cluster is an existing cluster in the server. Specifically, a corresponding login page can be generated in advance based on the cluster configuration information corresponding to each existing cluster in the server. Since the clusters are divided based on the deployment environment and the data center, and the purpose of the user logging into the target cluster is also to create a new tenant or initialize a tenant, the login page includes but is not limited to deployment environment parameter items, data center parameter items, and tenant configuration requirement parameter items corresponding to the new tenant or the initialized tenant. This embodiment does not limit this. It is only necessary to ensure that the user inputs parameters based on the above-mentioned configuration items on the client to generate a login request for the target cluster. After receiving the login request corresponding to the target cluster sent by the client, it can be directly parsed to obtain the corresponding request content, so as to execute the subsequent step 102.

[0031] 102. Generate a target file label corresponding to the target cluster according to the deployment environment parameters and data center parameters in the request content.

[0032] It should be noted that, in this embodiment, since the login request is for the target cluster, the request content obtained after parsing will include deployment environment parameters, data center parameters, tenant configuration requirement parameters, etc. At this time, the deployment environment parameters and data center parameters can be used to generate a file tag, that is, a target file tag corresponding to the target cluster. Specifically, the deployment environment parameters and data center parameters are extracted and spliced ​​together, and the spliced ​​parameters are used as the target file tag to execute the subsequent step 103.

[0033] 103. Determine a target file path corresponding to the target cluster in the cluster file information set using the target file tag.

[0034] Among them, the cluster file information set is used to represent the set of cluster file information corresponding to each existing cluster stored in the format of label mapping path. It should be noted that in this embodiment, the label mapping path format is that one label corresponds to one path, wherein the label refers to the file label, and the path refers to the file path. Since on the server side, each existing cluster corresponds to various cluster configuration information, the cluster configuration information includes the deployment environment, data center, and login authentication files (principal, krb5.conf file, principal.keytab file, and jaas.conf file), etc., and the cluster configuration information will be stored in the local server when each existing cluster is initially logged in, therefore, when each existing cluster is initially logged in, the deployment environment and data center in the cluster configuration information can be used as file labels, and the storage location where the login authentication file is located can be used as the file path, and the cluster configuration information corresponding to each existing cluster can be stored in the format of label mapping path, that is, cluster file information, and form a cluster file information set, so as to facilitate the subsequent determination of the target file path corresponding to the target cluster in the cluster file information set based on the target file label. Specifically, the target file label can be matched with the key-value pair corresponding to each cluster file information, and the target file path corresponding to the target cluster can be determined according to the matching result.

[0035] Furthermore, since each existing cluster will be initially logged in once when it is built, in order to ensure the accuracy of determining the target file path based on the target file tag during subsequent logins, specifically, before step 101, when each existing cluster performs the initial login operation, the cluster file information corresponding to each existing cluster is stored in a key-value pair format, and a cluster file information set is generated based on each cluster file information, wherein in the key-value pair format, the key is a file tag generated based on the deployment environment parameters and data center parameters corresponding to each existing cluster, and the value is a file path generated based on the storage location of the login authentication file corresponding to each existing cluster; a cluster login page is generated based on the deployment environment and data center corresponding to each existing cluster and the tenant configuration requirements as parameter items, wherein the tenant configuration requirements are used to characterize the attribute information items that need to be configured when performing new creation or initialization operations on the tenant; receiving and parsing the login request corresponding to the target cluster sent by the client to obtain the corresponding request content, including: receiving and parsing the login request corresponding to the target cluster generated by the operation event of the cluster login page sent by the client to obtain the corresponding request content.

[0036] It should be noted that in this step, the key-value pair format is a storage format that can satisfy the label mapping path, wherein the key is a file label generated based on the deployment environment parameters and data center parameters corresponding to each existing cluster, and the value is a file path generated based on the storage location of the login authentication file corresponding to each existing cluster. It should be emphasized that the rule for generating the target file label in step 102 is the same as the rule for storing the file label generated by the cluster file information corresponding to each existing cluster in the key-value pair format when the existing cluster performs the initial login operation, thereby ensuring that the key-value pair corresponding to the cluster file information submitted exists in the key-value pair corresponding to the target file label, and the cluster login page is a login page for the deployment environment and data center of each existing cluster in the integrated server, as well as the parameter items of the tenant configuration requirements corresponding to the newly created tenant or the initialized tenant. The user can determine the target cluster to be logged in this time by entering the deployment environment parameters and data center parameters on the cluster login page, and determine the specific operation purpose of logging in to the target cluster by entering the parameter items of the tenant configuration requirements corresponding to the newly created tenant or the initialized tenant, thereby further improving the efficiency and convenience of logging in to any cluster and creating or initializing tenants in any cluster.

[0037] Furthermore, since each existing cluster may be deleted, in order to ensure the accuracy of the user's login request based on the cluster login page configuration and the efficiency of the target file path determined in the cluster file information set based on the target file tag, specifically, when each existing cluster is deleted, the cluster file set and the cluster login page are updated. By updating the cluster file set and the cluster login page when deleting an existing cluster, the cluster file corresponding to the deleted existing cluster is deleted in the cluster file set, and the deployment environment parameter items and data center parameter items corresponding to the deleted existing cluster are deleted in the cluster login page, so that the cluster file set and the cluster login page correspond to each existing cluster currently in the server.

[0038] 104. Call the login authentication file corresponding to the target file path to perform a login operation on the target cluster, and perform a new creation or initialization operation based on the tenant configuration requirement parameters in the request content.

[0039] It should be noted that, in this embodiment, it can be seen from the above steps that the target file path is generated based on the storage location where the login authentication file is located. Therefore, the login authentication file corresponding to the target file path can be called to perform the login operation on the target cluster, thereby realizing the login to the target cluster. Since the purpose of logging into the target cluster is to create a new tenant or initialize a tenant, and the request content includes tenant configuration requirement parameters, the operation of creating a new tenant or initializing a tenant can be automatically performed after logging into the target cluster. Among them, creating a new tenant includes creating a new tenant in the cluster and allocating CPU, memory and storage resources to the tenant, and initializing the tenant includes creating a new hive database, creating a role, creating a new user and binding the role, and opening spark and hbase services.

[0040] Based on the above Figure 1 It can be seen from the implementation method that a server-based cluster login method provided by the present invention is that when it is necessary to authenticate and log in to any cluster based on the server, first receive and parse the login request corresponding to the target cluster sent by the client to obtain the corresponding request content, and then generate the target file tag corresponding to the target cluster according to the deployment environment parameters and data center parameters in the request content, and then use the target file tag to determine the target file path corresponding to the target cluster in the cluster file information set, wherein the cluster file information set is used to represent a set composed of cluster file information corresponding to each existing cluster stored in a label mapping path format, and finally call the login authentication file corresponding to the target file path to perform the login operation on the target cluster, and perform a new creation or initialization operation based on the tenant configuration requirement parameters in the request content. Through the technical solution provided by the present invention, it is possible to generate a target file label corresponding to the target cluster according to the deployment environment parameters and data center parameters recorded in the login request, and determine the target file path in a set consisting of cluster file information corresponding to each existing cluster stored in a label mapping path format, and then call the login authentication file corresponding to the target file path to achieve login to the target cluster, thereby creating a new tenant or initializing a tenant based on the tenant configuration requirement parameters, that is, the server can achieve selective authentication login for all clusters according to the login request, thereby avoiding restrictions on the operation of creating a new tenant or initializing a tenant, and further improving the processing efficiency of creating a new tenant or initializing a tenant.

[0041] Further, the preferred embodiment of the present invention is in the above Figure 1 Based on this, a detailed description of the server-based cluster login process is given. The specific steps are as follows Figure 2 As shown, it is applied to the server, including:

[0042] 201. Receive and parse a login request corresponding to a target cluster sent by a client to obtain corresponding request content.

[0043] This step is combined with the description of step 101 in the above method, and the same contents are not repeated here.

[0044] 202. Generate a target file label corresponding to the target cluster according to the deployment environment parameters and data center parameters in the request content.

[0045] This step is combined with the description of step 102 in the above method, and the same contents are not repeated here.

[0046] 203. Use the target file tag as the current target file tag, and determine whether the current target file tag is the same as the previous target file tag based on the cluster login record.

[0047] It should be noted that, in the present embodiment, the cluster login record specifically refers to the session record generated during the cluster login process. Since the user may generate multiple login requests for the same target cluster on the client, and if the server generates a target file tag based on the deployment environment parameters and data center parameters in the request content each time it receives and parses a login request, and determines the target file path in the cluster file, and then calls the login authentication file corresponding to the target file path to perform the login operation on the target cluster, its processing efficiency is relatively slow. Therefore, the target file tag can be used as the current target file tag, and based on the cluster login record, it is determined whether the current target file tag is the same as the previous target file tag, that is, whether the last session of logging into the target cluster has not ended. If so, execute the subsequent step 204, if not, execute the subsequent step 205.

[0048] 204. Directly call the login authentication file corresponding to the previous target file path to perform a login operation on the target cluster, and perform a new creation or initialization operation based on the tenant configuration requirement parameters in the request content corresponding to the current target file tag.

[0049] It should be noted that in this step, the previous target file path is the target file path corresponding to the previous target file tag. Therefore, the login authentication file corresponding to the previous target file path can be directly called to perform the login operation on the target cluster, and then the new creation or initialization operation is performed based on the tenant configuration requirement parameters in the request content corresponding to the current target file tag, thereby greatly saving the intermediate steps and improving the login efficiency of multiple consecutive logins to the same target cluster, thereby improving the processing efficiency of creating new tenants or initializing tenants in the same target cluster.

[0050] Furthermore, since the login authentication of the cluster has an expiration date, that is, after logging into the cluster, the login credential information in the corresponding login authentication file has an expiration date, therefore, in order to further ensure the login success rate of multiple consecutive logins to the same target cluster, specifically, before directly calling the login authentication file corresponding to the last target file path to perform the login operation on the target cluster, and before performing a new creation or initialization operation based on the tenant configuration requirement parameters in the request content corresponding to the current target file tag, the method also includes: detecting whether the login credential in the login authentication file corresponding to the last target file path is within the validity period; if so, directly calling the login authentication file corresponding to the last target file path to perform the login operation on the target cluster, and performing a new creation or initialization operation based on the tenant configuration requirement parameters in the request content corresponding to the current target file tag; if not, using the target file tag to determine the target file path corresponding to the target cluster in the cluster file information set. Among them, the specific process of detecting whether the login credential in the login authentication file corresponding to the last target file path is within the validity period can be determined based on the timestamp and whether it is actively exited.

[0051] 205. Determine a target file path corresponding to the target cluster in the cluster file information set using the target file tag.

[0052] This step is combined with the description of step 103 in the above method, and the same content is not repeated here. It should be noted that in this step, for the key-value pairs in each cluster file information in the cluster file information set, the target file label is matched with each key-value pair in turn to obtain the matching result corresponding to the file label, and the target file path corresponding to the target cluster is determined based on the matching result. Among them, the calculation result is used to characterize whether the key position in each key-value pair matches the target file label. Based on the matching result, the cluster file information stored in the key-value pair format can be determined, and the target file path corresponding to the target cluster is determined.

[0053] 206. Call the login authentication file corresponding to the target file path to perform a login operation on the target cluster, and perform a new creation or initialization operation based on the tenant configuration requirement parameters in the request content.

[0054] This step is combined with the description of step 104 in the above method, and the same contents are not repeated here.

[0055] 207. Obtain the execution result of the creation or initialization operation based on the tenant configuration requirement parameters in the request content, and feed back the execution result to the client.

[0056] It should be noted that in this step, since the corresponding execution result, that is, execution success or execution failure, will be generated according to resource and other restriction conditions when logging into the target cluster and executing the new creation or initialization operation based on the tenant configuration requirement parameters, in order to ensure that the user can promptly know the execution results of logging into the target cluster and executing the new creation or initialization operation based on the tenant configuration requirement parameters, the execution result can be directly fed back to the client, wherein the execution result may include the specific abnormal factors that caused the execution failure, so that the user can reconfigure the login request based on the abnormal factors and perform corresponding operations.

[0057] Furthermore, as a response to the above Figure 1-2 The implementation of the method embodiment shown in the figure, the embodiment of the present invention provides a server-based cluster login device, which is used to implement selective authentication login for all clusters, avoid restrictions on the operation of creating new tenants or initializing tenants, and thus improve the processing efficiency of creating new tenants or initializing tenants. The embodiment of the device corresponds to the aforementioned method embodiment. For ease of reading, this embodiment will no longer repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Specifically, Figure 3 As shown, applied to the server, the device includes:

[0058] The receiving unit 301 is used to receive and parse the login request corresponding to the target cluster sent by the client to obtain the corresponding request content;

[0059] A first generating unit 302 is configured to generate a target file tag corresponding to the target cluster according to the deployment environment parameters and the data center parameters in the request content obtained by the receiving unit 301;

[0060] A determination unit 303 is used to determine a target file path corresponding to the target cluster in a cluster file information set using the target file label obtained by the first generation unit 302, wherein the cluster file information set is used to represent a set of cluster file information corresponding to each existing cluster stored in a label mapping path format;

[0061] The first execution unit 304 is used to call the login authentication file corresponding to the target file path obtained by the determination unit 303 to perform a login operation on the target cluster, and perform a new creation or initialization operation based on the tenant configuration requirement parameters in the request content.

[0062] Further, such as Figure 4 As shown, the device also includes:

[0063] The storage unit 305 is used to store the cluster file information corresponding to each of the existing clusters in a key-value pair format when the initial login operation is performed on each of the existing clusters before the receiving unit 301, and generate a cluster file information set based on each of the cluster file information, wherein in the key-value pair format, the key is a file tag generated based on the deployment environment parameters and data center parameters corresponding to each of the existing clusters, and the value is a file path generated based on the storage location of the login authentication file corresponding to each of the existing clusters;

[0064] The second generating unit 306 is used to generate a cluster login page based on the deployment environment and data center corresponding to each of the existing clusters and the tenant configuration requirements as parameter items, wherein the tenant configuration requirements are used to represent the attribute information items required to be configured when performing a new creation or initialization operation on the tenant;

[0065] The receiving unit 301 is specifically configured to:

[0066] The login request corresponding to the target cluster, which is generated based on the operation event of the cluster login page obtained by the second generating unit 306 and is sent by the client, is received and parsed to obtain the corresponding request content.

[0067] Further, such as Figure 4 As shown, the device also includes:

[0068] The updating unit 307 is used to update the cluster file set obtained by the storage unit 305 and the cluster login page obtained by the second generating unit 306 when a deletion operation is performed on each of the existing clusters.

[0069] Further, such as Figure 4 As shown, the determining unit 303 includes:

[0070] The acquisition module 3031 is used to acquire the key-value pairs in each cluster file information in the cluster file information set;

[0071] A matching module 3032 is used to sequentially match the target file tag with each of the key-value pairs obtained by the obtaining module 3031 to obtain a matching result corresponding to the target file tag;

[0072] The determination module 3033 is used to determine the target file path corresponding to the target cluster based on the matching result obtained by the matching module 3032 .

[0073] Further, such as Figure 4 As shown, the device also includes:

[0074] A judging unit 308 is used to use the target file tag as the current target file tag before the determining unit 303, and judge whether the current target file tag is the same as the previous target file tag based on the cluster login record;

[0075] The second execution unit 309 is used to directly call the login authentication file corresponding to the previous target file path to perform the login operation on the target cluster if the judgment unit 308 judges that the current target file tag is the same as the previous target file tag based on the cluster login record, and perform a new creation or initialization operation based on the tenant configuration requirement parameters in the request content corresponding to the current target file tag;

[0076] The determining unit 303 is specifically configured to:

[0077] If the determination unit 307 determines that the current target file tag is different from the previous target file tag based on the cluster login record, the target file tag is used to determine the target file path corresponding to the target cluster in the cluster file information set.

[0078] Further, such as Figure 4 As shown, the device also includes:

[0079] A detection unit 310, used for detecting whether the login credentials in the login authentication file corresponding to the last target file path are within the validity period before the second execution unit 309;

[0080] The second execution unit 309 is specifically configured to:

[0081] If the detection unit 310 detects that the login credentials in the login authentication file corresponding to the previous target file path are within the validity period, the login authentication file corresponding to the previous target file path is directly called to perform the login operation on the target cluster, and a new creation or initialization operation is performed based on the tenant configuration requirement parameters in the request content corresponding to the current target file tag;

[0082] The determining unit 303 is specifically configured to:

[0083] If the detection unit 310 detects that the login credentials in the login authentication file corresponding to the last target file path are not within the validity period, the target file path corresponding to the target cluster is determined in the cluster file information set using the target file tag.

[0084] Further, such as Figure 4 As shown, the device also includes:

[0085] The sending unit 311 obtains an execution result of executing a new creation or initialization operation based on the tenant configuration requirement parameters in the request content, and feeds back the execution result to the client.

[0086] Furthermore, an embodiment of the present invention also provides an electronic device, the electronic device includes a processor and a memory, the receiving unit 301, the first generating unit 302, the determining unit 303 and the first executing unit 304 are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The processor includes a kernel, and the kernel calls the corresponding program unit from the memory.

[0087] The kernel can be set to one or more, and selective authentication login for all clusters can be achieved by adjusting kernel parameters to avoid restrictions on operations for creating new tenants or initializing tenants, thereby improving the processing efficiency of creating new tenants or initializing tenants.

[0088] An embodiment of the present invention provides a storage medium on which a program is stored. When the program is executed by a processor, the server-based cluster login method is implemented.

[0089] An embodiment of the present invention provides a processor, which is used to run a program, wherein the server-based cluster login method is executed when the program is running.

[0090] The embodiment of the present invention provides a device 40, such as Figure 5 As shown, the device 40 includes at least one processor 401, at least one memory 402 and a bus 403 connected to the processor 401; the processor 401 and the memory 402 communicate with each other through the bus 403; the processor 401 is used to call the program instructions in the memory 402 to execute the above-mentioned server-based cluster login method. The device in this article can be a server, PC, PAD, mobile phone, etc.

[0091] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing the following method steps:

[0092] Receive and parse the login request corresponding to the target cluster sent by the client to obtain the corresponding request content;

[0093] Generate a target file tag corresponding to the target cluster according to the deployment environment parameters and data center parameters in the request content;

[0094] Determine the target file path corresponding to the target cluster in the cluster file information set by using the target file label, wherein the cluster file information set is used to represent a set of cluster file information corresponding to each existing cluster stored in a label mapping path format;

[0095] The login authentication file corresponding to the target file path is called to perform a login operation on the target cluster, and a new creation or initialization operation is performed based on the tenant configuration requirement parameters in the request content.

[0096] Before receiving and parsing the login request corresponding to the target cluster sent by the client to obtain the corresponding request content, the method further includes:

[0097] When each of the existing clusters performs an initial login operation, cluster file information corresponding to each of the existing clusters is stored in a key-value pair format, and a cluster file information set is generated based on each of the cluster file information, wherein in the key-value pair format, the key is a file label generated based on the deployment environment parameters and data center parameters corresponding to each of the existing clusters, and the value is a file path generated based on the storage location of the login authentication file corresponding to each of the existing clusters;

[0098] Generate a cluster login page based on the deployment environment and data center corresponding to each of the existing clusters and the tenant configuration requirements as parameter items, wherein the tenant configuration requirements are used to represent the attribute information items required to be configured when performing a new creation or initialization operation on the tenant;

[0099] The receiving and parsing the login request corresponding to the target cluster sent by the client to obtain the corresponding request content includes:

[0100] The login request corresponding to the target cluster generated based on the operation event of the cluster login page and sent by the client is received and parsed to obtain the corresponding request content.

[0101] The method further comprises:

[0102] When the deletion operation is performed on each of the existing clusters, the cluster file set and the cluster login page are updated.

[0103] The step of using the target file tag to determine the target file path corresponding to the target cluster in the cluster file information set includes:

[0104] Obtaining a key-value pair in each cluster file information in the cluster file information set;

[0105] Matching the target file tag with each of the key-value pairs in sequence to obtain a matching result corresponding to the target file tag;

[0106] A target file path corresponding to the target cluster is determined based on the matching result.

[0107] Before determining the target file path corresponding to the target cluster in the cluster file information set by using the target file tag, the method further includes:

[0108] Using the target file tag as the current target file tag, and judging whether the current target file tag is the same as the previous target file tag based on the cluster login record;

[0109] If so, directly call the login authentication file corresponding to the previous target file path to perform the login operation on the target cluster, and perform a new creation or initialization operation based on the tenant configuration requirement parameters in the request content corresponding to the current target file tag;

[0110] If not, the target file tag is used to determine the target file path corresponding to the target cluster in the cluster file information set.

[0111] Before directly calling the login authentication file corresponding to the previous target file path to perform a login operation on the target cluster, and performing a new creation or initialization operation based on the tenant configuration requirement parameters in the request content corresponding to the current target file tag, the method further includes:

[0112] Detect whether the login credentials in the login authentication file corresponding to the last target file path are within the validity period;

[0113] If so, directly call the login authentication file corresponding to the previous target file path to perform the login operation on the target cluster, and perform a new creation or initialization operation based on the tenant configuration requirement parameters in the request content corresponding to the current target file tag;

[0114] If not, the target file tag is used to determine the target file path corresponding to the target cluster in the cluster file information set.

[0115] The method further comprises:

[0116] Obtain an execution result of a new creation or initialization operation based on the tenant configuration requirement parameters in the request content, and feed back the execution result to the client.

[0117] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0118] In a typical configuration, the device includes one or more processors (CPU), memory and bus. The device may also include input / output interface, network interface and the like.

[0119] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.

[0120] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0121] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0122] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0123] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A cluster login method based on a server, characterized in that: Applied to the server, the method includes: Receive and parse the login request corresponding to the target cluster sent by the client to obtain the corresponding request content; Generate a target file tag corresponding to the target cluster according to the deployment environment parameters and data center parameters in the request content; Determine the target file path corresponding to the target cluster in the cluster file information set by using the target file tag, wherein the cluster file information set is used to represent a set consisting of cluster file information corresponding to each existing cluster stored in a tag mapping path format; The login authentication file corresponding to the target file path is called to perform a login operation on the target cluster, and a new creation or initialization operation is performed based on the tenant configuration requirement parameters in the request content.

2. The method according to claim 1, characterized in that Before receiving and parsing the login request corresponding to the target cluster sent by the client to obtain the corresponding request content, the method further includes: When each of the existing clusters performs an initial login operation, cluster file information corresponding to each of the existing clusters is stored in a key-value pair format, and a cluster file information set is generated based on each of the cluster file information, wherein in the key-value pair format, the key is a file label generated based on the deployment environment parameters and data center parameters corresponding to each of the existing clusters, and the value is a file path generated based on the storage location of the login authentication file corresponding to each of the existing clusters; Generate a cluster login page based on the deployment environment and data center corresponding to each of the existing clusters and the tenant configuration requirements as parameter items, wherein the tenant configuration requirements are used to represent the attribute information items required to be configured when performing a new creation or initialization operation on the tenant; The receiving and parsing the login request corresponding to the target cluster sent by the client to obtain the corresponding request content includes: The login request corresponding to the target cluster generated based on the operation event of the cluster login page and sent by the client is received and parsed to obtain the corresponding request content.

3. The method according to claim 2, characterized in that The method further comprises: When the deletion operation is performed on each of the existing clusters, the cluster file set and the cluster login page are updated.

4. The method according to claim 1, characterized in that: The step of using the target file tag to determine the target file path corresponding to the target cluster in the cluster file information set includes: Obtaining a key-value pair in each cluster file information in the cluster file information set; Matching the target file tag with each of the key-value pairs in sequence to obtain a matching result corresponding to the target file tag; A target file path corresponding to the target cluster is determined based on the matching result.

5. The method according to claim 1, characterized in that Before determining the target file path corresponding to the target cluster in the cluster file information set by using the target file tag, the method further includes: Using the target file tag as the current target file tag, and judging whether the current target file tag is the same as the previous target file tag based on the cluster login record; If so, directly call the login authentication file corresponding to the previous target file path to perform the login operation on the target cluster, and perform a new creation or initialization operation based on the tenant configuration requirement parameters in the request content corresponding to the current target file tag; If not, the target file tag is used to determine the target file path corresponding to the target cluster in the cluster file information set.

6. The method according to claim 5, characterized in that Before directly calling the login authentication file corresponding to the previous target file path to perform a login operation on the target cluster, and performing a new creation or initialization operation based on the tenant configuration requirement parameters in the request content corresponding to the current target file tag, the method further includes: Detect whether the login credentials in the login authentication file corresponding to the last target file path are within the validity period; If so, directly call the login authentication file corresponding to the previous target file path to perform the login operation on the target cluster, and perform a new creation or initialization operation based on the tenant configuration requirement parameters in the request content corresponding to the current target file tag; If not, the target file tag is used to determine the target file path corresponding to the target cluster in the cluster file information set.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Obtain an execution result of a new creation or initialization operation based on the tenant configuration requirement parameters in the request content, and feed back the execution result to the client.

8. A cluster login device based on a server, characterized in that: Applied to the server, the device comprises: A receiving unit, configured to receive and parse a login request corresponding to a target cluster sent by a client to obtain corresponding request content; A first generating unit, configured to generate a target file tag corresponding to the target cluster according to the deployment environment parameters and the data center parameters in the request content obtained by the receiving unit; a determination unit, configured to determine a target file path corresponding to the target cluster in a cluster file information set using the target file label obtained by the first generation unit, wherein the cluster file information set is used to represent a set consisting of cluster file information corresponding to each existing cluster stored in a label mapping path format; The first execution unit is used to call the login authentication file corresponding to the target file path obtained by the determination unit to perform a login operation on the target cluster, and perform a new creation or initialization operation based on the tenant configuration requirement parameters in the request content.

9. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the server-based cluster login method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: The device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the server-based cluster login method as described in any one of claims 1-7.