Multi-storage cluster access authentication method and device, electronic equipment and medium

By backing up the tokens issued by each storage cluster in the authentication center, the client can access unknown storage clusters during task execution, solving the problem of a single cluster being unable to meet storage capacity requirements and improving access flexibility and security.

CN118631481APending Publication Date: 2024-09-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310271590.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-09
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Single-cluster distributed storage systems cannot meet the growing demand for storage capacity. As a result, the storage clusters that may need to be accessed cannot be fully predicted at the beginning of a task, resulting in task failure and low access flexibility.

Method used

By backing up the tokens issued by each storage cluster in the authentication center, the client can use the existing token to initiate an access verification request to the new storage cluster that needs to be accessed during task execution. The authentication center performs verification based on the backup token to ensure security. and flexibility.

Benefits of technology

It improves the flexibility of cluster access, reduces task operation failures caused by unpredictable storage clusters that need to be accessed, enhances dynamic access capabilities to storage clusters, and ensures the security of verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118631481A
    Figure CN118631481A
Patent Text Reader

Abstract

The embodiment of the invention provides a multi-storage cluster access authentication method and device, electronic equipment and a medium. The multi-storage cluster access authentication method comprises the steps of determining a first storage cluster needing to be accessed by a to-be-executed task in response to obtaining the to-be-executed task; a first token issuing request is sent to the first storage cluster, and the first token is backed up to an authentication center after being issued; in the execution process of the to-be-executed task, determining a second storage cluster needing to be accessed by the to-be-executed task; an access verification request is sent to the second storage cluster, and verification succeeds on the basis of the backup first token and the first token contained in the access verification request by the authentication center; and accessing the second storage cluster. According to the embodiment of the invention, the cluster access flexibility can be improved, and the operation failure caused by the fact that the storage cluster possibly needing to be accessed during task execution cannot be completely predicted at the beginning of the task is reduced. The embodiment of the invention can be applied to various scenes such as cloud technology, big data calculation and distributed storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of distributed storage, and in particular to a multi-storage cluster access authentication method, device, electronic device and medium. Background Art

[0002] Since the traditional single-node storage model is not suitable for the needs of large-scale data writing and reading in today's era, cluster distributed storage systems have emerged. In a cluster, a metadata storage node assigns storage tasks to multiple working storage nodes, and each working storage node completes the storage and reading of a part of the large-scale data, thereby completing the reading and writing of large-scale data together. In order to avoid the need to verify the identity every time a read or write is performed to the cluster, the cluster currently issues a token to the client accessing the cluster for a task, and the token can be used to access the cluster's files during the validity period of the token.

[0003] However, as the scale of task data increases, a single-cluster distributed storage system cannot meet the growing demand for storage capacity. A multi-cluster distributed storage system has emerged, that is, data from multiple distributed storage systems may be accessed in one task. The current practice is that each cluster is assigned to the client and sends a token for that cluster. The client needs to request tokens for all clusters that may need to access data in the task at the beginning of the task. If during the execution of the task, the client finds that it needs to access a cluster, but did not request the token of that cluster at the beginning of the task, it will not be able to complete the access, resulting in task execution failure. However, many tasks often cannot fully predict the clusters that may need to be accessed during task execution at the beginning, resulting in frequent task failures and low cluster access flexibility. Summary of the invention

[0004] The embodiments of the present disclosure provide a multi-storage cluster access authentication method, device, electronic device and medium, which can improve cluster access flexibility and reduce operation failures caused by the inability to fully predict the storage clusters that may need to be accessed during task execution at the beginning of the task.

[0005] According to one aspect of an embodiment of the present disclosure, a multi-storage cluster access authentication method is provided, including:

[0006] In response to obtaining the task to be executed, determining a first storage cluster that needs to be accessed by the task to be executed;

[0007] Sending a first token issuance request to the first storage cluster so that the first storage cluster issues a first token, wherein the first token is used to access the first storage cluster and the first token is backed up to an authentication center after issuance;

[0008] During the execution of the task to be executed, determining a second storage cluster that needs to be accessed by the task to be executed;

[0009] Sending an access verification request to the second storage cluster, wherein the access verification request contains the first token, so that after the second storage cluster forwards the access verification request to the authentication center, the authentication center verifies successfully based on the backed-up first token and the first token contained in the access verification request;

[0010] Access the second storage cluster.

[0011] According to one aspect of an embodiment of the present disclosure, a multi-storage cluster access authentication method is provided, including:

[0012] Receiving a first token issued by the first storage cluster for a task to be executed for backup;

[0013] receiving an access verification request forwarded by the second storage cluster, wherein the access verification request includes the first token, which is used by the client to access the second storage cluster with the first token in the task to be executed;

[0014] Performing verification based on the backed-up first token and the first token in the access verification request;

[0015] After successful verification, the client is allowed to access the second storage cluster.

[0016] According to one aspect of an embodiment of the present disclosure, a multi-storage cluster access authentication device is provided, including:

[0017] A first determining unit, configured to determine, in response to obtaining a task to be executed, a first storage cluster that needs to be accessed by the task to be executed;

[0018] A first sending unit, configured to send a first token issuance request to the first storage cluster, so that the first storage cluster issues a first token, wherein the first token is used to access the first storage cluster, and the first token is backed up to an authentication center after issuance;

[0019] A second determining unit, configured to determine, during the execution of the task to be executed, a second storage cluster that needs to be accessed by the task to be executed;

[0020] a second sending unit, configured to send an access verification request to the second storage cluster, wherein the access verification request contains the first token, so that after the second storage cluster forwards the access verification request to the authentication center, the authentication center verifies successfully based on the backed-up first token and the first token contained in the access verification request;

[0021] An access unit, configured to access the second storage cluster.

[0022] Optionally, the first determining unit is specifically configured to:

[0023] In response to obtaining the task to be executed, starting a master node, and determining, by the master node, a first storage cluster that needs to be accessed by the task to be executed;

[0024] The second determining unit is specifically configured to:

[0025] By means of the master node, the task to be executed is divided into a plurality of subtasks, and the subtasks are sent to a plurality of slave nodes corresponding to the plurality of subtasks for execution; and in the process of the slave nodes executing the subtasks corresponding to the slave nodes, the second storage cluster that the subtasks need to access is determined;

[0026] The second sending unit is specifically used for:

[0027] The sending the access verification request to the second storage cluster includes: the slave node sending the access verification request to the second storage cluster.

[0028] Optionally, the first token has a first expiration date;

[0029] The multi-storage cluster access authentication device also includes:

[0030] a third determining unit, configured to determine that the current time exceeds the first time limit;

[0031] A token renewal unit is configured to request the first storage cluster to renew the first token to a second deadline if the task to be executed has not been completed.

[0032] Optionally, the second deadline is determined by:

[0033] Obtaining the task type of the task to be executed;

[0034] Get the average execution time of tasks of the task type;

[0035] The second deadline is determined based on the average execution time and a first coefficient.

[0036] Optionally, the first token is backed up to the authentication center in the following manner:

[0037] storing the first token backup request in a request queue, wherein the first token backup request contains the first token, the request queue contains a plurality of token operation requests, and the plurality of token operation requests contain the first token backup request;

[0038] In response to a predetermined condition, the multiple token operation requests stored in the request queue are packaged and sent to the authentication center, so that the authentication center can take out the first token from the first token backup request and store it in the database of the authentication center.

[0039] Optionally, in response to a predetermined condition, packaging the plurality of token operation requests stored in the request queue and sending them to the authentication center comprises:

[0040] Determining the number of token operation requests stored in the request queue;

[0041] If the number of token operation requests reaches a first threshold, or the number of token operation requests does not reach the first threshold, but the difference between the current time and the time of the last package sending reaches a second threshold, the token operation requests stored in the request queue are packaged and sent to the authentication center.

[0042] Optionally, the first token has a priority tag;

[0043] In response to a predetermined condition, the multiple token operation requests stored in the request queue are packaged and sent to the authentication center, comprising:

[0044] determining that the priority flag is set;

[0045] The multiple token operation requests stored in the request queue are packaged and sent to the authentication center.

[0046] Optionally, the second sending unit is specifically configured to:

[0047] Obtain the maximum value of the time difference between every two adjacent package sendings recorded in the request queue log as the first duration;

[0048] An access verification request is sent to the second storage cluster at predetermined time intervals within the first duration.

[0049] Optionally, the predetermined time interval is determined by:

[0050] Get the variance of the time difference between every two adjacent package sendings recorded in the request queue log;

[0051] Based on the variance, the predetermined time interval is determined.

[0052] Optionally, issuing the first token includes:

[0053] generating a first token identifier, wherein the first token identifiers of different first tokens are different from each other;

[0054] Generate a token body;

[0055] Based on the first token identifier and the token body, generate the first token for issuance;

[0056] The authentication center successfully authenticates based on the backed-up first token and the first token included in the access authentication request, including:

[0057] Obtaining, from the backup first token, a target first token whose first token identifier is the same as an identifier of the first token included in the access verification request;

[0058] If the token body of the target first token matches the token body of the first token contained in the access verification request, it is determined that the verification is successful.

[0059] Optionally, the token body of the first token contained in the access verification request is a token body encrypted using a predetermined encryption algorithm;

[0060] If the token body of the target first token matches the token body of the first token contained in the access verification request, determining that the verification is successful includes:

[0061] Encrypting the token body of the target first token using the predetermined encryption algorithm to obtain an encrypted token body;

[0062] If the encrypted token body is consistent with the token body of the first token contained in the access verification request, it is determined that the verification is successful.

[0063] Optionally, generating a first token identifier includes:

[0064] Obtaining a timestamp when the first token is issued;

[0065] Obtaining an identifier of the first storage cluster;

[0066] Obtaining a serial number of the first token generated at the same timestamp;

[0067] The first token identifier is generated based on the timestamp, the identifier of the first storage cluster, and the sequence number.

[0068] Optionally, the number of digits of the sequence number is preset in the following manner:

[0069] Selecting a sample storage cluster set, where the sample storage cluster set includes a plurality of sample storage clusters;

[0070] Obtaining the number of tokens issued per unit time in each of the sample storage clusters;

[0071] Based on the number of tokens issued per unit time in each of the sample storage clusters, obtaining an average value of the number of tokens issued per unit time;

[0072] Based on the average value and the second coefficient, the number of bits of the serial number is determined.

[0073] Optionally, the second storage cluster has a token cache for caching tokens issued by the second storage cluster and tokens successfully authenticated by the authentication center after forwarding the access verification request to the authentication center;

[0074] The second storage cluster forwards the access verification request to the authentication center, including:

[0075] Comparing the first token contained in the access verification request with the token stored in the token cache, if the token is consistent with one of the stored tokens, verification is successful;

[0076] If it is inconsistent with the token stored in the token cache, the access verification request is forwarded to the authentication center.

[0077] Optionally, the first token issuance request includes a first identifier of a first operation that requires access to the first storage cluster, wherein the first identifier is backed up in the authentication center corresponding to the first token; the access verification request includes a second identifier of a second operation that requires access to the second storage cluster;

[0078] The authentication center successfully verifies based on the backup first token and the first token contained in the access verification request, including: if the backup first token is consistent with the first token contained in the access verification request, and the first identifier is consistent with the second identifier, the verification is successful.

[0079] Optionally, the first token has a hybrid verification deadline;

[0080] The authentication center successfully verifies based on the backup first token and the first token contained in the access verification request, including: if the backup first token is consistent with the first token contained in the access verification request, and the time when the authentication center receives the access verification request is no later than the hybrid verification deadline, the verification is successful.

[0081] Optionally, the first token has a first group identifier to which the first token belongs; the second storage cluster issues a second token, and the second token has a second group identifier to which the second token belongs;

[0082] The authentication center successfully verifies based on the backup first token and the first token contained in the access verification request, including: if the backup first token is consistent with the first token contained in the access verification request, and the first group identifier is consistent with the second group identifier, the verification is successful.

[0083] Optionally, the first token has a cross-cluster access tag;

[0084] The authentication center successfully verifies based on the backup first token and the first token contained in the access verification request, including: if the backup first token is consistent with the first token contained in the access verification request, and the cross-cluster access mark is set, the verification is successful.

[0085] Optionally, the multi-storage cluster access authentication device further includes:

[0086] A fourth determining unit, used for determining that the task to be executed is completed;

[0087] The token cancellation unit sends a first token cancellation request to the first storage cluster so that the first storage cluster cancels the first token and notifies the authentication center to delete the backed-up first token.

[0088] According to one aspect of an embodiment of the present disclosure, a multi-storage cluster access authentication device is provided, including:

[0089] A first receiving unit, configured to receive a first token issued by a first storage cluster for a task to be executed for backup;

[0090] A second receiving unit, configured to receive an access verification request forwarded by a second storage cluster, wherein the access verification request includes the first token, and is used for the client to access the second storage cluster with the first token in the task to be executed;

[0091] a verification unit, configured to perform verification based on the backed-up first token and the first token in the access verification request;

[0092] A verification result output unit is used to allow the client to access the second storage cluster after the verification is successful.

[0093] According to one aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the multi-storage cluster access authentication method as described above when executing the computer program.

[0094] According to one aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the multi-storage cluster access authentication method described above is implemented.

[0095] According to one aspect of an embodiment of the present disclosure, a computer program product is provided. The computer program product includes a computer program. The computer program is read and executed by a processor of a computer device, so that the computer device executes the multi-storage cluster access authentication method as described above.

[0096] In the embodiment of the present disclosure, at the beginning of the task to be executed, it is only determined that the execution of the task to be executed needs to access the first storage cluster, so only the first token of the first storage cluster is requested. However, during the execution of the task to be executed, it is found that the second storage cluster needs to be accessed. At this time, the second storage cluster can still be requested for verification with the first token. This is because when the first storage cluster issues the first token, the first token has been backed up to the authentication center. When the second storage cluster receives the access verification request using the first token, it can forward the access verification request to the authentication center, and the authentication center verifies whether the first token is the token issued in the task. If so, the verification is successful. At the same time, since only the execution unit in the task to be executed can obtain the first token, accessing other storage clusters with the first token does not bring security risks. This solution enables, during the execution of the task to be executed, when it is necessary to access a storage cluster for which a token has not been requested in advance, the storage cluster can also be accessed with the tokens of other storage clusters that have been requested in the task to be executed, thereby improving the flexibility of cluster access and reducing the operation failure caused by the inability to fully predict the storage cluster that may need to be accessed during the task execution at the beginning.

[0097] Other features and advantages of the embodiments of the present disclosure will be described in the subsequent description, and in part will become apparent from the description, or understood by implementing the embodiments of the present disclosure. The purposes and other advantages of the embodiments of the present disclosure can be achieved and obtained through the structures specifically pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0098] The accompanying drawings are used to provide further understanding of the technical solutions of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the embodiments of the present disclosure, they are used to explain the technical solutions of the embodiments of the present disclosure and do not constitute a limitation on the technical solutions of the embodiments of the present disclosure.

[0099] Figure 1A and Figure 1B All are system architecture diagrams of systems to which the multi-storage cluster access authentication method according to the embodiments of the present disclosure is applied;

[0100] Figure 2 is a schematic diagram of a multi-storage cluster access authentication method according to an embodiment of the present disclosure applied to a distributed task cross-cluster authentication scenario;

[0101] Figure 3 It is a schematic diagram of applying a multi-storage cluster access authentication method according to an embodiment of the present disclosure to a big data real-time computing scenario;

[0102] Figure 4 is an overall flow chart of a multi-storage cluster access authentication method at a client side according to an embodiment of the present disclosure;

[0103] FIG. 5A to FIG. 5B Each is a schematic diagram of a frame structure of a first token issuance request according to an embodiment of the present disclosure;

[0104] Figure 6 is a schematic diagram of a process of issuing a first token according to an embodiment of the present disclosure;

[0105] Figure 7 yes Figure 6 A specific flow chart of step S610 in FIG.

[0106] FIG. 8A to FIG. 8G Each is a schematic diagram of the structure of a first token according to an embodiment of the present disclosure;

[0107] Figure 8H yes Fig. 8A -A schematic diagram of a specific structure of the first token identifier in F;

[0108] Fig. 9 is a system architecture diagram of a server according to an embodiment of the present disclosure;

[0109] Fig.10 yes Figure 4 A specific flow chart of step S420 in FIG.

[0110] Fig.11 yes Figure 4 A specific flow chart of step S440;

[0111] Fig.12 is a flow chart of a multi-storage cluster access authentication method according to another embodiment of the present disclosure;

[0112] FIG. 13A to FIG. 13C Each is a schematic diagram of a frame structure of an access verification request according to an embodiment of the present disclosure;

[0113] Fig.14 is a flowchart of a certification center verification process according to an embodiment of the present disclosure;

[0114] Fig.15is a detailed example diagram of a specific application of a multi-storage cluster access authentication method according to an embodiment of the present disclosure;

[0115] Fig.16 An overall flow chart of a multi-storage cluster access authentication method at an authentication center side according to an embodiment of the present disclosure;

[0116] Fig.17A is a block diagram of a multi-storage cluster access authentication device at a client side according to an embodiment of the present disclosure;

[0117] Fig. 17B is a block diagram of a multi-storage cluster access authentication device at an authentication center side according to an embodiment of the present disclosure;

[0118] Fig.18 An embodiment according to the present disclosure is shown. Figure 4 The client structure diagram of the multi-storage cluster access authentication method shown;

[0119] Fig.19 An embodiment according to the present disclosure is shown. Figure 4 The server-side structure diagram of the multi-storage cluster access authentication method shown. DETAILED DESCRIPTION

[0120] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure more clear, the embodiments of the present disclosure are further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the embodiments of the present disclosure and are not used to limit the embodiments of the present disclosure.

[0121] Before further describing the embodiments of the present disclosure in detail, the nouns and terms involved in the embodiments of the present disclosure are described. The nouns and terms involved in the embodiments of the present disclosure are subject to the following interpretations:

[0122] Metadata storage node: responsible for processing metadata information of distributed storage systems. For example, in the HDFS (Hadoop Distributed File System) distributed storage system, the metadata storage node is also called the name node NameNode, which manages the storage system namespace. It maintains the storage system tree and all files and directories in the tree. The metadata storage node is also responsible for maintaining operations such as opening, closing, moving, and renaming all these files or directories. When a client requests data, it only obtains the metadata of the file from the metadata storage node, and the specific data transmission does not need to pass through the metadata storage node. It is the client that directly interacts with the corresponding working storage node. Metadata is stored in the memory of the metadata storage node, and a large number of small files will take up a lot of memory.

[0123] Metadata: Metadata, also known as intermediary data or relay data, is data that describes data. It is mainly information that describes data attributes and is used to support functions such as indicating storage location, historical data, resource search, and file records.

[0124] Worker storage node: also known as data storage node, responsible for storing data blocks of the distributed file system. For example, in the HDFS distributed storage system, the worker storage node is responsible for storing data blocks and providing read and write services for data blocks to the system clients. It also creates, deletes, and copies data blocks according to the instructions of the metadata storage node.

[0125] Token: Mainly used for identity authentication within a period of time. Token is generally an encrypted string generated by the server, which is used as a token for client requests. In some applications, when the object successfully logs in for the first time using the account and password, the server generates a token and the token expiration time, and returns it to the client. If the login is successful, the client only needs to bring this token to request data within the validity period, without having to bring the object name and password again.

[0126] Since the traditional single-node storage model is not suitable for the needs of large-scale data writing and reading in today's era, cluster distributed storage systems have emerged. In a cluster, a metadata storage node assigns storage tasks to multiple working storage nodes, and each working storage node completes the storage and reading of a part of the large-scale data, thereby completing the reading and writing of large-scale data together. In order to avoid the need to verify the identity every time a read or write is performed to the cluster, the cluster currently issues a token to the client accessing the cluster for a task, and the token can be used to access the cluster's files during the validity period of the token.

[0127] However, as the scale of task data increases, a single-cluster distributed storage system cannot meet the growing demand for storage capacity. A multi-cluster distributed storage system has emerged, that is, data from multiple distributed storage systems may be accessed in one task. The current practice is that each cluster is assigned to the client and sends a token for that cluster. The client needs to request tokens for all clusters that may need to access data in the task at the beginning of the task. If during the execution of the task, the client finds that it needs to access a cluster, but did not request the token of that cluster at the beginning of the task, it will not be able to complete the access, resulting in task execution failure. However, many tasks often cannot fully predict the clusters that may need to be accessed during task execution at the beginning, resulting in frequent task failures and low cluster access flexibility.

[0128] The disclosed embodiments can improve cluster access flexibility and reduce operation failures caused by the inability to fully predict at the beginning of a task which storage cluster may need to be accessed during task execution.

[0129] System architecture and scenario description of the application of the embodiments of the present disclosure

[0130] Figure 1A and Figure 1B All of them are system architecture diagrams applied to the multi-storage cluster access authentication method according to the embodiment of the present disclosure. It includes a client 100 and a server 200.

[0131] The client 100 is a terminal that can initiate a request to the server or a program running in the terminal. Terminals include desktop computers, laptops, PDAs (personal digital assistants), mobile phones, car-mounted clients, dedicated clients, and other forms. In addition, it can be a single device or a combination of multiple devices. For example, multiple desktop computers are interconnected through a local area network and share a display to work together, forming a client 100. The client 100 can communicate with the server 200 in a wired or wireless manner to exchange data. The client 100 can be a single-device client for performing ordinary tasks, such as Figure 1A As shown; it can also be a multi-device client for performing distributed tasks, such as Figure 1B shown.

[0132] like Figure 1B As shown, the multi-device client for executing distributed tasks includes a master node and multiple slave nodes, and the master node is respectively connected to the multiple slave nodes for communication. The master node is used to divide the task to be executed into multiple subtasks and send them to multiple slave nodes corresponding to the multiple subtasks for execution.

[0133] The server 200 refers to a computer system that can provide certain services to the client 100. Compared with the common client 100, the server 200 has higher requirements in terms of stability, security, performance, etc. The server 200 can be a high-performance computer in a network platform, a cluster of multiple high-performance computers, a part of a high-performance computer (such as a virtual machine), a combination of parts of multiple high-performance computers (such as virtual machines), etc.

[0134] The server 200 includes an authentication center 210 and a plurality of storage clusters that are communicatively connected to the authentication center.

[0135] The authentication center 210 is mainly used to store and back up tokens from multiple storage clusters and perform joint authentication. Joint authentication means that the authentication center authenticates authentication requests from each storage cluster based on the stored and backed up tokens and returns the authentication results to the corresponding storage cluster.

[0136] The storage cluster may be a storage cluster that adopts a distributed file system architecture. The storage cluster of the distributed file system architecture may be an HDFS storage cluster or a FastDFS storage cluster, etc., which is not limited in the embodiments of the present disclosure. Taking the storage cluster as an HDFS storage cluster as an example, each storage cluster includes 1 metadata storage node and at least 1 working storage node, and the metadata storage node and the working storage node are connected in communication. The metadata storage node is connected in communication with the client and the authentication center respectively. Figure 1A or Figure 1B As shown, the server 200 includes a certification center, a first storage cluster HDFS1, a second storage cluster HDFS2, a third storage cluster HDFS3 and a fourth storage cluster HDFS4. The second storage cluster HDFS2 includes 1 metadata storage node and 3 working storage nodes.

[0137] In some application scenarios, the client 100 can be connected to the server 200 through a gateway (not shown). The gateway is also called an internetwork connector or a protocol converter. The gateway realizes network interconnection at the transport layer and is a computer system or device that acts as a converter. The gateway is a translator between two systems that use different communication protocols, data formats or languages, or even completely different architectures. At the same time, the gateway can also provide filtering and security functions. Messages sent by the client 100 to the server 200 are sent to the corresponding server 200 through the gateway. Messages sent by the server 200 to the client 100 are also sent to the corresponding client 100 through the gateway.

[0138] The embodiments of the present disclosure can be applied in various scenarios, such as Figure 1A The cross-cluster authentication scenario of common tasks shown in the figure, Figure 1B The cross-cluster authentication scenario of distributed tasks shown in the figure, Figure 2 The big data real-time computing scenario shown.

[0139] (I) Cross-cluster authentication scenarios for common tasks

[0140] In the related art, the token authentication process of the storage cluster is: the client first sends the identity authentication information to a specific storage cluster, and after passing the identity authentication of the storage cluster, it applies to the storage cluster for a token for a period of time to access the services of the storage cluster. At this time, the metadata storage node of the storage cluster will cache a copy of the token encryption information in memory for subsequent token comparison of the access verification request initiated by the client. It can be seen that the token in the related art is limited to accessing a single storage cluster and cannot be recognized by other storage clusters.

[0141] After the task is started, the client needs to determine the target storage cluster that needs to be accessed, send a token issuance request to the one or more target storage clusters, and then receive the token returned by the corresponding target storage cluster. The client will then send an access verification request with a specific token to the target storage cluster within the token's validity period to achieve identity authentication and access. If the client needs to access a new storage cluster during the execution of the task, the previously applied token will fail to pass the verification of the new storage cluster, resulting in access failure and task failure. Therefore, there is a need for cross-cluster authentication to achieve more flexible access authentication, thereby reducing the number of task failures caused by the inability to fully predict the storage clusters that may need to be accessed during task execution at the beginning.

[0142] The embodiment of the disclosed embodiment can realize this scenario. It uses the authentication center to store and back up the tokens issued by each target storage cluster. When the client finds a new storage cluster that needs to be accessed and does not request the token of the storage cluster at the beginning of the task, it can carry the tokens issued by the existing target storage clusters to initiate an access verification request to the new storage cluster. After receiving the access verification request, the new storage cluster can forward it to the authentication center. After receiving the verification request, the authentication center can verify the verification request based on the tokens issued by each target storage cluster for storage backup, and return the result of successful verification to the new storage cluster. After receiving the successful verification result, the new storage cluster allows the client to access. In this way, when a new storage cluster that needs to be accessed is discovered during operation, authentication and access can also be achieved, thereby improving the flexibility of cluster access and reducing operation failures caused by the inability to fully predict at the beginning of the task the storage cluster that may need to be accessed during task execution.

[0143] like Figure 1A As shown in the figure, the following takes the storage cluster as an HDFS storage cluster as an example for explanation.

[0144] In the task startup phase, the client determines the target storage cluster to be accessed based on the content of the task to be executed. For example, the content of the task to be executed includes: "XXXXXXX XXXXXXX read A1; XXXXXXX XXXXXXX write B2; XXXXXXX XXXXXXX H=XXXX located in, read H". Through the analysis of the content of the task to be executed, it is determined that the tasks to be executed include reading file A1, writing file B2, and reading file H. File A1 is stored on the first storage cluster HDFS1, and file B2 needs to be written to the second cluster storage HDFS2. The storage location of file H is unknown. Therefore, the client can determine that the target storage clusters to be accessed by the task to be executed include the first storage cluster HDFS1 and the second storage cluster HDFS2. After that, the client sends a token issuance request to the first storage cluster HDFS1 and the second storage cluster HDFS2 respectively to apply for a token issuance. After receiving the client's request, the first storage cluster HDFS1 performs identity authentication, issues a token to the client after the authentication is passed, and sends the token to the authentication center for backup. After receiving the client's request, the second storage cluster HDFS2 performs the same action as the first storage cluster HDFS1.

[0145] During the task running phase, the client sends an access verification request carrying the corresponding token to the target storage cluster that needs to be accessed. For example, an access verification request with a token issued by the first storage cluster HDFS1 is sent to the first storage cluster HDFS1 to execute the task of reading file A1; an access verification request with a token issued by the second storage cluster HDFS2 is sent to the second storage cluster HDFS2 to execute the task of writing file B2. When the task of reading file H is executed, it is found that file H is stored in the fourth storage cluster HDFS4, and the client does not have the token issued by the fourth storage cluster HDFS4 at this time. Then the client can use the token issued by one of the existing storage clusters, such as the token issued by the first storage cluster HDFS1, to send an access verification request carrying the token to the fourth storage cluster HDFS4. After receiving the access verification request, the fourth storage cluster HDFS4 can forward the token to the authentication center for authentication. The authentication center performs authentication based on the token issued by the backed up first storage cluster HDFS1, and sends a verification success notification to the fourth storage cluster HDFS4 after the authentication is passed. After receiving the notification, the fourth storage cluster HDFS4 allows the client to access, so that the task of reading file H is executed smoothly.

[0146] (II) Distributed task cross-cluster authentication scenario

[0147] Distributed application refers to a work method in which tasks are distributed and executed on different slave nodes, and a task is completed together through the network. In actual applications, distributed tasks are usually more complex than ordinary tasks, so they are more likely to require cross-cluster authentication.

[0148] The client for executing distributed tasks includes a master node and multiple slave nodes. In the task startup phase, the master node needs to determine the target storage cluster to be accessed, send a token issuance request to the one or more target storage clusters, and then receive the token returned by the corresponding target storage cluster. The master node then divides the task to be executed into multiple subtasks, sends them to multiple slave nodes corresponding to the multiple subtasks for execution, and distributes the tokens corresponding to each subtask to each subtask. In the task execution phase, the slave node will send an access verification request carrying a specific token to the target storage cluster within the validity period of the token to achieve identity authentication and access. If the slave node needs to access a new storage cluster during the execution of the task, it will fail to pass the verification of the new storage cluster due to the lack of the corresponding token, resulting in access failure, thereby causing the task to fail. Therefore, there is a need for cross-cluster authentication to achieve more flexible access authentication, thereby reducing the operation failure caused by the inability to fully predict the storage clusters that may need to be accessed during the task execution at the beginning.

[0149] The embodiment of the disclosed embodiment can solve this problem. It uses the authentication center to store and back up the tokens issued by each target storage cluster. When the slave node discovers a new storage cluster that needs to be accessed during operation, but does not request the token of the storage cluster itself, it can carry the existing tokens issued by each target storage cluster to initiate an access verification request to the new storage cluster. After receiving the access verification request, the new storage cluster can forward it to the authentication center. After receiving the verification request, the authentication center can verify the verification request based on the tokens issued by each target storage cluster for storage backup, and return the result of successful verification to the new storage cluster. After receiving the successful verification result, the new storage cluster allows the slave node to access. In this way, when the slave node discovers a new storage cluster that needs to be accessed during operation, it can also achieve authentication and access, improve the flexibility of cluster access, and reduce the operation failure caused by the inability to fully predict the storage cluster that may need to be accessed during task execution at the beginning of the task.

[0150] like Figure 1B As shown, the following is an example using the HDFS storage cluster as an example.

[0151] During the task startup phase, the master node determines the target storage cluster to be accessed based on the content of the task to be executed. For example, the content of the task to be executed includes: "XXXXXXX XXXXXXX read A1; XXXXXXX XXXXXXX write B2; XXXXXXX XXXXXXX H=XXXX located in, read H". By parsing the content of the task to be executed, it is determined that the tasks to be executed include reading file A1, writing file B2, and reading file H. File A1 is stored in the first storage cluster HDFS1, and file B2 needs to be written to the second cluster storage HDFS2. The storage location of file H is unknown, such as Figure 2 As shown. Therefore, the master node can determine that the target storage clusters that the task to be executed needs to access include the first storage cluster HDFS1 and the second storage cluster HDFS2. After that, the master node sends a token issuance request to the first storage cluster HDFS1 and the second storage cluster HDFS2 respectively to apply for a token issuance. After receiving the request from the master node, the first storage cluster HDFS1 performs identity authentication, issues a token to the master node after the authentication is passed, and sends the token to the authentication center for backup. After receiving the request from the master node, the second storage cluster HDFS2 performs the same action as the first storage cluster HDFS1. The master node then divides the task to be executed into multiple subtasks and distributes the tokens corresponding to each subtask to each subtask. For example, the subtask "read file A1" and the corresponding token issued by the first storage cluster HDFS1 are sent to the slave node P1 for execution; the subtask "write file B2" and the corresponding token issued by the second storage cluster HDFS2 are sent to the slave node P2 for execution; the subtask "read file H" and any acquired token, such as the token issued by the first storage cluster HDFS1, are sent to the slave node P3 for execution.

[0152] During the task running phase, Figure 2As shown, the slave node sends an access verification request carrying the corresponding token to the target storage cluster that needs to be accessed. For example, the slave node P1 sends an access verification request with the token issued by the first storage cluster HDFS1 to the first storage cluster HDFS1 to perform the task of reading file A1; the slave node P2 sends an access verification request with the token issued by the second storage cluster HDFS2 to the second storage cluster HDFS2 to perform the task of writing file B2. When the slave node P3 performs the task of reading file H, it is found that file H is stored in the fourth storage cluster HDFS4, and at this time the slave node P3 does not have the token issued by the fourth storage cluster HDFS4. Then the slave node P3 can use the existing token issued by the first storage cluster HDFS1 to send an access verification request carrying the token to the fourth storage cluster HDFS4. After receiving the access verification request, the fourth storage cluster HDFS4 can forward the token to the authentication center for authentication. The authentication center performs verification based on the token issued by the backed up first storage cluster HDFS1, and sends a verification success notification to the fourth storage cluster HDFS4 after the verification is passed. After receiving the notification, the fourth storage cluster HDFS4 allows access from the node P3, so that the task of reading the file H is successfully executed.

[0153] 3. Big Data Real-time Computing Scenarios

[0154] Multiple storage clusters often store massive amounts of data. In the big data real-time computing scenario, the data stored in the multiple storage clusters on the server side is constantly increasing or updating over time, and the client needs to perform real-time computing on the massive data in the multiple storage clusters. The big data real-time computing scenario has several characteristics: unlimited data, unbounded data processing, and low latency. Unbounded data refers to a growing, basically unlimited data set. Unbounded data processing means that the client can repeatedly process the above unlimited data through the processing engine. Low latency means that the processing time efficiency is high, generally requiring seconds or even milliseconds. The applications of data real-time computing mainly include generating real-time reports, generating real-time portraits, generating real-time features, and intelligent recommendations. For example, in the intelligent recommendation application scenario, the client will obtain the object's historical event data or browsing event data stored in the multiple storage clusters, and input these data into the pre-trained recommendation algorithm model to predict the events that may occur in the future or the information that the object hopes to be pushed. Note that the acquisition of the object's historical event data or browsing event data stored in the multiple storage clusters mentioned above must be approved by the object in advance. Specifically, when an object event occurs, a query box can be displayed to the object, asking the object whether to agree that the platform obtains the object event data and browsing event data for subsequent platform analysis. If the object does not agree, this implementation method cannot be implemented, or only the object historical event data and browsing event data that the object agrees to obtain are obtained.

[0155] However, in the big data real-time computing scenario, since the data stored in the multiple storage clusters on the server side is constantly increasing or updating over time, the client may not be able to perceive which storage clusters will be accessed during the task startup phase. Therefore, a solution is needed to handle cross-cluster authentication access in this scenario to achieve more flexible access authentication, thereby reducing the failure of big data real-time computing tasks caused by the inability to fully predict the storage clusters that may need to be accessed during task execution at the beginning, thereby effectively improving the real-time and reliability of big data real-time computing.

[0156] The embodiment of the disclosed embodiment can realize this scenario. It uses the authentication center to store and back up the tokens issued by each target storage cluster. When the slave node finds a new storage cluster that needs to be accessed during operation, but does not request the token of the storage cluster itself, it can carry the tokens issued by the existing target storage clusters to initiate an access verification request to the new storage cluster. After receiving the access verification request, the new storage cluster can forward it to the authentication center. After receiving the verification request, the authentication center can verify the verification request based on the tokens issued by each target storage cluster for storage backup, and return the result of successful verification to the new storage cluster. After receiving the successful verification result, the new storage cluster allows the slave node to access. In this way, when the slave node finds that it needs to access a new storage cluster during operation, it can also achieve authentication and access, improve the flexibility of cluster access, and reduce the operation failure caused by the inability to fully predict the storage cluster that may need to be accessed during task execution at the beginning.

[0157] like Figure 3 As shown, the following is an example using the HDFS storage cluster as an example.

[0158] The server 200 includes an authentication center, a first storage cluster HDFS1, a second storage cluster HDFS2, a third storage cluster HDFS3, and a fourth storage cluster HDFS4. The client can use computing engines such as Flink and Spark to perform big data real-time computing tasks. The client can use the above-mentioned distributed task architecture, where the master node connects to multiple slave nodes, and the computing subtasks executed by the multiple slave nodes include generating real-time reports, generating real-time portraits, generating real-time features, intelligent recommendations, etc. In the task startup phase, the master node determines the target storage cluster to be accessed according to the content of the task to be executed. For example, it is determined that the intelligent recommendation subtask needs to read the object historical event data or browse event data. Note that the reading of the object historical event data and reading of the browsing event data described above must be agreed to by the object in advance. Specifically, when an object event occurs, an inquiry box can be displayed to the object to ask whether the object agrees that the platform obtains the object event data and browsing event data for subsequent platform analysis. If the object disagrees, this implementation method cannot be implemented. When the task is started, the object historical event data is stored in the first storage cluster HDFS1, and the browsing event data is stored in the second cluster storage HDFS2. Therefore, the master node can determine that the target storage clusters that need to be accessed for the task to be executed include the first storage cluster HDFS1 and the second storage cluster HDFS2. Afterwards, the master node sends token issuance requests to the first storage cluster HDFS1 and the second storage cluster HDFS2 respectively to apply for token issuance. After receiving the request from the master node, the first storage cluster HDFS1 performs identity authentication, and after the verification is passed, it issues a token to the master node, and sends the token to the authentication center for backup. After receiving the request from the master node, the second storage cluster HDFS2 performs the same action as the first storage cluster HDFS1. The master node then divides the task to be executed into multiple subtasks, and distributes the tokens corresponding to each subtask to each subtask.

[0159] During the task running phase, the slave node that executes the intelligent recommendation subtask sends an access verification request carrying the corresponding token to the target storage cluster that needs to be accessed. For example, the slave node sends an access verification request with a token issued by the first storage cluster HDFS1 to the first storage cluster HDFS1 to execute the task of reading object historical event data; the slave node sends an access verification request with a token issued by the second storage cluster HDFS2 to the second storage cluster HDFS2 to execute the task of reading browsing event data. Still note that the reading of object historical event data and reading of browsing event data described here must be agreed to by the object in advance. If the object does not agree, this implementation method cannot be implemented. When the slave node executes the task of reading object historical event data, it is found that the new object historical event data is stored in the fourth storage cluster HDFS4, and at this time the slave node does not have the token issued by the fourth storage cluster HDFS4. Then the slave node can use the existing token issued by the first storage cluster HDFS1 to send an access verification request carrying the token to the fourth storage cluster HDFS4. After receiving the access verification request, the fourth storage cluster HDFS4 can forward the token to the authentication center for authentication. The authentication center verifies the token issued by the backed-up first storage cluster HDFS1, and sends a verification success notification to the fourth storage cluster HDFS4 after verification. After receiving the notification, the fourth storage cluster HDFS4 allows access from the node, so that the task of reading historical event data is successfully executed.

[0160] General description of the disclosed embodiments

[0161] According to one embodiment of the present disclosure, a multi-storage cluster access authentication method is provided. The multi-storage cluster access authentication method uses an authentication center to store tokens issued by multiple storage clusters, and performs joint authentication based on authentication requests from multiple storage clusters, that is, the authentication request is verified using tokens issued by other storage clusters that have been backed up by the authentication center, thereby achieving greater flexibility.

[0162] The multi-storage cluster access authentication method of the embodiment of the present disclosure may be executed in the client 100 , may be executed in the server 200 , or may be partially executed in the client 100 and the other partially executed in the server 200 .

[0163] like Figure 4 As shown, a multi-storage cluster access authentication method according to one embodiment of the present disclosure includes:

[0164] Step S410, in response to obtaining the task to be executed, determining a first storage cluster that needs to be accessed by the task to be executed;

[0165] Step S420, sending a first token issuance request to the first storage cluster so that the first storage cluster issues a first token, wherein the first token is used to access the first storage cluster, and the first token is backed up to the authentication center after issuance;

[0166] Step S430, during the execution of the task to be executed, determining a second storage cluster that needs to be accessed by the task to be executed;

[0167] Step S440, sending an access verification request to the second storage cluster, wherein the access verification request contains the first token, so that after the second storage cluster forwards the access verification request to the authentication center, the authentication center verifies successfully based on the backed-up first token and the first token contained in the access verification request;

[0168] Step S450: access the second storage cluster.

[0169] First, the above steps S410 to S450 are briefly described.

[0170] Step S410 can be executed by the client during the task startup phase; for the scenario of distributed tasks, it can be executed by the client's master node. Among them, the task to be executed is a task that has a need to access a storage cluster. For example, the task to be executed can be a computing task, a reading task, a writing task, etc. The first storage cluster is the storage cluster that the task to be executed needs to access, which is determined during the task startup phase. There can be multiple first storage clusters. For example, when it is determined during the task startup phase that there are multiple storage clusters that the task to be executed needs to access, the multiple storage clusters are all the aforementioned first storage cluster. The reason why the description method of "first" is used is because the second storage cluster, etc. is involved in the following text, so "first" and "second" are used to distinguish them.

[0171] Step S420 can be executed by the client during the task startup phase; for the scenario of distributed tasks, it can be executed by the client's main node. For the HDFS storage cluster, specifically, a first token issuance request is sent to the metadata storage node in the first storage cluster. The metadata storage node of the first storage cluster issues the first token to the client based on the first token issuance request. On the one hand, the metadata storage node of the first storage cluster locally stores a backup of the first token so that subsequent local verification of the access verification request carrying the first token can be performed; on the other hand, the first token is backed up to the authentication center so that the authentication center can subsequently perform joint verification of the access verification request carrying the first token. This will be described in detail later.

[0172] Step S430 can be executed by the client during the task running phase; for the scenario of distributed tasks, it can be executed by the slave node of the client. The second storage cluster is not determined during the task startup phase, but it is determined to be a storage cluster that needs to be accessed during the task running phase. There can be multiple second storage clusters. For example, when it is determined during the task running phase that there are multiple new storage clusters that need to be accessed, the multiple storage clusters are all the aforementioned second storage clusters. The reason why the description method of "second" is used is because the first storage cluster is involved in the previous text, so "first" and "second" are used to distinguish them.

[0173] Step S440 can be executed by the client during the task running phase; for the scenario of distributed tasks, it can be executed by the slave node of the client. Among them, since the first token is issued by the first storage cluster, the first token is not stored in the second storage cluster. Therefore, the access verification request cannot be directly verified in the second storage cluster. After receiving the access verification request from the client, the second storage cluster forwards the access verification request to the authentication center for joint verification. This will be described in detail later.

[0174] Step S450 may be performed by the client during the task running phase; for a distributed task scenario, it may be performed by a slave node of the client. After the access verification request is successfully verified, the second storage cluster allows access to the access verification request. The client may perform the access task to the second storage cluster.

[0175] The disclosed embodiment proposes a unified, efficient, dynamic and secure multi-storage cluster access authentication method for the cross-cluster authentication requirements of multiple storage clusters. First, since the multi-storage cluster access authentication method of the disclosed embodiment unifies the cross-cluster joint authentication of the token verification request of other clusters by the token backed up by the authentication center, the uniformity of token authentication is achieved; secondly, since the client can also achieve authentication and access if a new storage cluster needs to be accessed during the task running process, the situation of task running failure is reduced, thus achieving the efficiency of token authentication; thirdly, since the multi-storage cluster access authentication method of the disclosed embodiment can achieve access verification for the new storage cluster that needs to be accessed during the task running process, and is not limited to accessing the storage cluster that has applied for the token, dynamic access to the storage cluster is achieved; finally, since the tokens used for verification by the authentication center are all tokens issued by each storage cluster according to the token issuance request of the same task, the security of verification is ensured. The multi-storage cluster access authentication method of the disclosed embodiment has strong horizontal expansion capabilities and backward compatibility, and can effectively support the security access requirements of multi-storage cluster systems under ultra-large-scale deployment. On the one hand, for storage clusters that may need to be accessed during task execution and cannot be fully predicted at the beginning of the task, access can be achieved through verification through the authentication center when the task is running, which has strong horizontal expansion capabilities; on the other hand, for access verification requests from traditional clients, the solution of the embodiment of the present disclosure can also achieve compatible processing, and therefore has backward compatibility.

[0176] Steps S410 to S450 are described in detail below.

[0177] Detailed description of step S410

[0178] In step S410, the task to be executed can be a common task or a distributed task. The client can preliminarily determine the storage cluster to be accessed by parsing the content of the task to be executed. For example, the client can directly parse the code content of the task to be executed to obtain the storage cluster to be accessed; or the client can parse the code content of the task to be executed to obtain the content information to be accessed, and then query the corresponding storage cluster according to the content information to be accessed, thereby determining the storage cluster to be accessed.

[0179] The task to be executed may be a task executed periodically or a task triggered by a triggering event. That is to say, the above steps S410 to S450 may be executed periodically or triggered by a triggering event.

[0180] In one embodiment, the task to be executed is a task to be executed periodically. A time period is set in advance. Then, steps S410 to S450 are executed once every time period. For example, the task to be executed is a task to generate a daily report, and the time period is set to 24 hours. Every 24 hours, steps S410 to S450 are executed once, and the client accesses the storage cluster by executing steps S410 to S450, and obtains data in the storage cluster to generate a daily report. At this time, step S410 may include: periodically obtaining the task to be executed.

[0181] In another embodiment, the execution of steps S410 to S450 may be triggered according to a triggering event. In this case, step S410 may include: in response to the triggering event, obtaining a task to be executed.

[0182] The trigger event is an event used to trigger the execution of the multi-storage cluster access authentication method of the embodiment of the present disclosure. It may include but is not limited to the following events:

[0183] Identifying the object triggers the option of the task to be performed;

[0184] Object-specific operations are identified;

[0185] Identify a specific object;

[0186] Arrive at the scheduled time;

[0187] Identify as being located in a predetermined geographic area.

[0188] In one embodiment, a pending task option control can be displayed in the object interaction interface. When the object selects the corresponding pending task option control, the client is triggered to call the corresponding task code to obtain the corresponding pending task. The object can select the corresponding pending task option control by touch, by cursor click, by voice input, etc., which is not limited in the embodiment of the present disclosure. Exemplarily, the pending task option control can display "view XX data", "generate report", "object portrait analysis", "feature analysis", etc. When the object triggers the pending task option, the possibility of abandoning the pending task midway is very small. Treating the recognition that the object triggers the pending task option as a trigger event is conducive to reducing unnecessary processing overhead.

[0189] In another embodiment, the identification of object-specific operations can be used as a trigger event. For example, when the object is identified to open an application, the "intelligent recommendation" task to be executed is triggered, so that the object event data in each storage cluster is retrieved, analyzed and targeted recommendations are made for the object, so as to improve the object's Internet experience. The identification of object-specific operations as a trigger event can improve operational efficiency and provide an intelligent operating experience for the object. However, it should be noted that the retrieval of object event data in each storage cluster described above must be approved by the object in advance. Specifically, when an object event occurs, a query box can be displayed to the object, asking the object whether it agrees that the platform obtains the object event data for subsequent platform analysis. If the object disagrees, this implementation method cannot be implemented.

[0190] In one embodiment, the arrival of a predetermined time can be used as a trigger event to execute the multi-storage cluster access authentication method of the disclosed embodiment. For example, if the client is a financial application and needs to count the daily cash flow at 24:00 every day, the arrival of 24:00 can be used as a trigger event. As soon as 24:00 is reached, the task to be executed is obtained. This embodiment can improve input efficiency and save object operation time when the same operation is performed at a fixed time every day.

[0191] In addition, in one embodiment, the identification of being located in a predetermined geographical area can also be used as a trigger event to execute the multi-storage cluster access authentication method of the disclosed embodiment. For example, object A needs to carry a laptop to the software development company B where it is located every day to analyze the XX data of the day. Therefore, when the laptop is identified as being located in the area of ​​software development company B, the multi-storage cluster access authentication method of the disclosed embodiment is executed. As a result, it is very likely that the XX data of the day will be read from each storage cluster and displayed. This embodiment can improve operational efficiency in the case where certain geographical areas are generally engaged in the same activities.

[0192] Detailed description of step S420

[0193] In step S420, the client sends a first token issuance request to the first storage cluster so that the first storage cluster issues a first token, wherein the first token is used to access the first storage cluster and is backed up to the authentication center after issuance.

[0194] like Figure 5AAs shown, it is a schematic diagram of the frame structure of the first token issuance request of an embodiment of the present disclosure. Among them, the first token issuance request includes a client identifier, a first storage cluster identifier and a first identifier. The client identifier may include information such as the IP address of the client and the port number of the client. The first storage cluster identifier may include information such as the IP address of the first storage cluster and the port number of the first storage cluster. The first identifier is used to characterize the first operation of accessing the first storage cluster. For example, the first identifier is represented by a 4-bit field, "0001" represents a read operation; "0010" represents a write operation; "0100" represents an update operation; "1000" represents a delete operation, and so on. In some embodiments, as Figure 5B As shown, it is a schematic diagram of the frame structure of the first token issuance request of another embodiment of the embodiment of the present disclosure. The frame structure of the first token issuance request may also include a transport layer protocol. Exemplarily, the frame structure of the first token issuance request includes a transport layer protocol, an IP address of the client, a port number of the client, an IP address of the first storage cluster, a port number of the first storage cluster, and a first identifier. Specifically, the content of a first token issuance request is: "TCP 192.168.1.1 10000 202.17.88.76 80 0001", which means that the client with an IP address of 192.168.1.1 sends a request to the first storage cluster with an IP address of 202.17.88.76 and a port of 80 through port 10000 using the TCP transport layer protocol, and the operation corresponding to the request is 0001, that is, a read operation.

[0195] After receiving the first token issuance request, the first storage cluster can Figure 6 The method shown issues a first token. The process of the first storage cluster issuing the first token includes:

[0196] Step S610, generating a first token identifier, wherein the first token identifiers of different first tokens are different from each other;

[0197] Step S620, generating a token body;

[0198] Step S630: Generate a first token for issuance based on the first token identifier and the token body.

[0199] The steps S610 to S630 are described in detail below.

[0200] It is understandable that since the first token issued by the first storage cluster needs to be sent to the authentication center for backup storage, each first token needs to have a globally (entire server) unique token identifier to distinguish it from other tokens, thereby facilitating the subsequent search and comparison of the first token during the joint verification process by the authentication center.

[0201] One solution to generate a globally unique token identifier for each first token is that after the first storage cluster transmits the first token to the authentication center, the authentication center uniformly configures a token identifier for each first token. However, this solution requires write lock sorting for the first tokens sent to the authentication center, that is, when the authentication center configures a token identifier for the current first token, other first tokens need to wait in line, which is inefficient. To this end, an embodiment of the present disclosure generates a token identifier during the process of issuing the first token in the first storage cluster, and directly sends the first token containing the globally unique token identifier to the authentication center for backup, thereby saving the write lock sorting operation of the authentication center, saving procedures and time, and thereby improving the operating efficiency of the system.

[0202] It should be noted that, during the process of generating the first token by the first storage cluster, there is no specific execution order for step S610 and step S620. Step S610 may be executed first and then step S620, or step S620 may be executed first and then step S610, or they may be executed in parallel.

[0203] (I) Detailed Description of Step S610

[0204] In order to generate a globally unique token identifier in each storage cluster, the adopted solution includes: adding a timestamp used to represent the generation time to the token identifier to distinguish the tokens generated at different times; adding a cluster identifier used to represent the storage cluster to the token identifier to distinguish the tokens generated by each storage cluster; adding a serial number to the token identifier to distinguish different tokens generated by the same timestamp and the same storage cluster. Therefore, in some embodiments, such as Figure 7 As shown, step S610 includes:

[0205] Step S710, obtaining a timestamp when the first token is issued;

[0206] Step S720, obtaining an identifier of the first storage cluster;

[0207] Step S730, obtaining the serial number of the first token generated at the same timestamp;

[0208] Step S740: Generate a first token identifier based on the timestamp, the identifier of the first storage cluster, and the sequence number.

[0209] In step S710, the first storage cluster can obtain the time information of issuing the first token as a timestamp. The accuracy of the timestamp is limited by the clock accuracy of the first storage cluster on the one hand. For example, the clock accuracy of the first storage cluster is at most milliseconds, and the time accuracy of the timestamp does not exceed milliseconds at most. On the other hand, the accuracy of the timestamp is limited by the number of bits (number of bits) allocated to the timestamp in the first token identification structure. For example, the number of bits allocated to the timestamp in the first token identification structure can only accommodate milliseconds time information at most, and the time accuracy of the timestamp does not exceed milliseconds at most. For example, the time accuracy of a timestamp is milliseconds, and the timestamp includes 41 bits, of which 3 bits are used to represent years, 4 bits are used to represent months, 6 bits are used to represent dates, 6 bits are used to represent hours, 6 bits are used to represent minutes, 6 bits are used to represent seconds, and 10 bits are used to represent milliseconds.

[0210] In step S720, the identifier of the first storage cluster is the cluster identifier of the first storage cluster, and different storage clusters have different cluster identifiers. The number of storage clusters that the server can accommodate is limited by the number of bits allocated to the cluster identifier in the first token identifier structure. For example, if the number of bits allocated to the cluster identifier in the first token identifier structure is 8 bits, the corresponding server can accommodate up to 256 storage clusters; for an ultra-large-scale storage cluster system, 12 bits of space can be allocated for the cluster identifier, and the corresponding server can accommodate up to 4096 storage clusters.

[0211] In step S730, if the tokens are issued by the same storage cluster within the same timestamp, they can be distinguished by serial numbers. The first storage cluster can use a self-incrementing sequence to generate serial numbers. For example, if the initial value of the self-incrementing sequence is "0000000000", the serial number of the first token issued by the first storage cluster within a certain timestamp is "0000000000", the serial number of the second token issued within the timestamp is "0000000001", and the serial number of the third token issued within the timestamp is "0000000010"... and so on. At the next timestamp, the self-incrementing sequence of the first storage cluster is reset to the initial value "0000000000", and continues to self-increment the sequence according to the number of tokens issued within the timestamp to assign corresponding serial numbers to the newly issued tokens. In this way, the effect of different serial numbers of tokens generated within the same timestamp in the same storage cluster is achieved.

[0212] It is understandable that the maximum number of tokens issued by the same storage cluster in the same timestamp is limited by the number of bits allocated to the serial number in the first token identification structure. For example, if the number of bits allocated to the serial number in the first token identification structure is 8 bits, then the decimal number corresponding to the maximum value of the serial number is 255, indicating that the maximum number of tokens issued by the same storage cluster in the same timestamp is 256; for another example, if the number of bits allocated to the serial number in the first token identification structure is 12 bits, then the decimal number corresponding to the maximum value of the serial number is 4095, indicating that the maximum number of tokens issued by the same storage cluster in the same timestamp is 4096.

[0213] In some embodiments, the number of digits in the sequence number is preset in the following manner:

[0214] Selecting a sample storage cluster set, where the sample storage cluster set includes multiple sample storage clusters;

[0215] Get the number of tokens issued per unit time in each sample storage cluster;

[0216] Based on the number of tokens issued per unit time in each sample storage cluster, obtain the average number of tokens issued per unit time;

[0217] Based on the average value and the second coefficient, the number of digits of the serial number is determined.

[0218] A sample storage cluster refers to a storage cluster used as a sample for determining the number of digits of a sequence number. Figure 1A , Figure 1B , Figure 2 and Figure 3 Each HDFS in is different. Figure 1A , Figure 1B , Figure 2 and Figure 3 The HDFS in the example is the storage cluster used when the task is actually running, and the sample storage cluster is the storage cluster set before the task starts to determine the number of serial number digits. The sample storage cluster set is a set of multiple sample storage clusters. The more tokens issued per unit time in each sample storage cluster, the more storage clusters are running simultaneously per unit time during the actual execution process, so more serial number digits need to be set to express the increased storage clusters.

[0219] It is understandable that in order to improve the applicability of the number of digits of the serial number, when the number of tokens issued by each storage cluster per unit time is greater, a greater number of sample storage clusters are required in the sample storage cluster set.

[0220] The unit time corresponds to the precision of the aforementioned timestamp. For example, if the precision of the aforementioned timestamp is milliseconds, the unit time is 1 millisecond; if the precision of the aforementioned timestamp is seconds, the unit time is 1 second, and so on. Assuming that the sample storage cluster set contains 10 sample storage clusters, the precision of the timestamp in the first token identifier is milliseconds, and the number of tokens issued by the 10 sample storage clusters within 1 millisecond is obtained, the array is {98, 70, 2000, 66, 54, 121, 32, 42, 123, 78}.

[0221] The number of digits in the sequence number can be determined by multiplying the average value of each sample storage cluster by the second coefficient. Among them, β is the second coefficient, p k is the number of tokens issued by the kth sample storage cluster within 1 millisecond, and n is the number of sample storage clusters in the sample storage cluster set. The number of digits of the serial number can be determined according to the size of the intermediate value M. For example, the process of determining the number of digits of the serial number according to the intermediate value M is as follows: first round the intermediate value M using the rounding function, then convert the rounded intermediate value M into a binary number B using the binary conversion function, and then calculate the number of digits of the binary number B as the number of digits of the serial number. For example, the number of tokens issued by 10 sample storage clusters within 1 millisecond is obtained, and the array is {98, 70, 2000, 66, 54, 121, 32, 42, 123, 78}, the second coefficient β is 1.5, according to the above formula, the intermediate value M = 283.7 can be obtained, and the value obtained after rounding is 283, and then the binary conversion function is used to convert 283 into the binary number 100011011, the number of digits of the binary number B is 9, and the number of digits of the serial number is determined to be 9.

[0222] The second coefficient can be reasonably set as needed. Generally, the value range of the second coefficient is between 1 and 5. For example, the second coefficient can be set to 1.5. The advantage of setting the number of bits of the serial number in this way is that by multiplying the average of each sample storage cluster by a reasonable coefficient, the needs of most storage clusters for issuing tokens are met, and the serial number capacity can be adjusted by adjusting the second coefficient; compared with the scheme of determining the number of bits of the serial number based on the maximum value, using the average to determine the number of bits of the serial number can obtain fewer bits, thereby saving the transmission bandwidth and storage space occupied by the token.

[0223] The advantage of the above-mentioned embodiment of determining the number of serial number digits based on the average value of the number of tokens issued per unit time and the second coefficient is that the required number of serial number digits is estimated based on the number of tokens issued per unit time by the sample storage cluster, so that the determination of the number of serial number digits better reflects objective reality, improves the accuracy of the determination of the number of serial number digits, and improves the authentication efficiency of the embodiment of the present disclosure.

[0224] Obviously, other statistical algorithms can also be used to determine the number of digits in the serial number according to the needs of the specific scenario. For example, the median or maximum number of tokens issued per unit time in each sample storage cluster can be calculated, and the number of digits in the serial number can be determined based on the median or maximum value. The embodiments of the present disclosure are not limited to this.

[0225] In step S740, a first token identifier is generated based on the timestamp, the identifier of the first storage cluster, and the sequence number. Exemplarily, the structure of the first token identifier is as follows: Figure 8H As shown. The first token identifier of this example contains 64 bits. Among them, 1 bit is used as an enable flag. When the enable flag is 1, it indicates that the first token identifier is enabled, and when the enable flag is 0, it indicates that the first token identifier is disabled; 41 bits are used as timestamps, and the accuracy of the timestamp can reach milliseconds; 12 bits are used as the identifier of the first storage cluster. The number of bits of the cluster identifier supports the server to accommodate 4096 storage clusters, which can meet the requirements of ultra-large-scale storage cluster systems; 10 bits are used as the serial number of the first storage cluster. The number of bits of the serial number can meet the peak token generation requirement of the same storage cluster generating 1024 tokens within the same timestamp.

[0226] Figure 8H The advantage of the structure of the first token identifier is that the first tokens generated by different first storage clusters can be distinguished by the first storage cluster identifier, the first tokens generated by the same storage cluster at different times can be distinguished by the timestamp, and the first tokens generated by the same storage cluster at the same time can be distinguished by the serial number. The combination of the timestamp, the identifier of the first storage cluster, and the serial number improves the distinctiveness of the first token identifier, and in the subsequent process of retrieving the token body by means of the first token identifier, the retrieval accuracy and efficiency are improved.

[0227] It should be noted that, in the process of generating the first token identifier by the first storage cluster, step S710, step S720 and step S730 may be executed in any order or in parallel.

[0228] (II) Description of Step S620

[0229] In step S620, the token body is the core component of the token and is used for subsequent verification and comparison. The token body can be a password string generated by the storage cluster. It can also be a string obtained by encrypting the password string using an encryption algorithm. For example, the MD5 encryption algorithm can be used to encrypt the password string and obtain the encrypted string as the token body, which is expressed as MD5 (password), where password is the password string. The MD5 encryption algorithm is an irreversible encryption algorithm that can prevent decryption, thereby improving the security of token transmission and storage.

[0230] (III) Description of Step S630

[0231] In step S630, a first token is generated based on the first token identifier and the token body. Fig. 8A As shown, the structure of the first token includes a first token identifier and a token body, wherein the first token identifier is used to uniquely identify the token, and the token body is used for subsequent verification and comparison. For example, in some embodiments, the structure of the first token is [ID, MD5 (password)], wherein ID is the first token identifier, and MD5 (password) is the token body that encrypts the password string using the MD5 encryption algorithm. As another example, Figure 8B As shown, the structure of the first token may also include a first token identifier, a token body, and a first expiration date, wherein the first expiration date is used to represent the validity period of the first token. Figure 8C As shown, the structure of the first token may also include a first token identifier, a token body and a priority identifier, wherein the priority identifier is used to represent the priority status of the first token written into the database of the authentication center, which will be described later. As another example, Fig.8D As shown, the structure of the first token may also include a first token identifier, a token body, and a hybrid verification deadline, wherein the hybrid verification deadline is used to represent the deadline at which the first token can pass verification at the authentication center, which will be described later. As another example, Fig. 8E As shown, the structure of the first token may also include a first token identifier, a token body, and a first group identifier, wherein the first group identifier is used to represent the group to which the first token belongs, so as to implement cross-cluster verification of the same group in the authentication center, which will be described later. As another example, Fig.8F As shown, the structure of the first token may also include a first token identifier, a token body, and a cross-cluster access tag, wherein the cross-cluster access tag is used to characterize the cross-cluster access permission status of the first token, which will be described later. As another example, Figure 8GAs shown, the structure of the first token may also include a version number and other token structures. The version number is used to identify what token structure the first token belongs to, and the token structures of different version numbers are different. The client or server can learn the structure of the first token through the version number, thereby parsing the first token. For example, the content of the first token is [Version1, ID, MD5 (password)], where Version1 indicates that the version number is 1, and the structure used to characterize the first token includes a first token identifier and a token body. Among them, ID is the first token identifier, and MD5 (password) is a token body that encrypts the password string using the MD5 encryption algorithm. For another example, the content of the first token is [Version6, ID, MD5 (password), M6], where Version1 indicates that the version number is 6, and the structure used to characterize the first token includes a first token identifier, a token body, and a cross-cluster access tag. Among them, ID is the first token identifier, MD5 (password) is a token body that encrypts the password string using the MD5 encryption algorithm, and M6 is a cross-cluster access tag.

[0232] How to back up the token to the authentication center

[0233] In actual applications, when a large number of tokens need to be backed up to the authentication center, the storage backup speed of the authentication center is an issue that needs to be considered. Since the authentication center needs to back up a large number of tokens, it is often necessary to use a database for storage management. However, it takes a long time to back up the token to the authentication center, which will have an adverse effect on the access verification process of the multi-storage cluster system, such as the access verification request cannot be verified in a timely and accurate manner due to the failure to write the token to the authentication center's database in time after the token is issued. For example, in an application scenario of an ultra-large-scale storage cluster system, the storage clusters are distributed in different computer rooms, and the number of tokens issued every day reaches tens of millions. The authentication center needs to use a database to store and manage the tokens, such as using a Redis (Remote Dictionary Server) database. In a cross-computer room scenario, if the first token issued by the first storage cluster is to be written to the Redis database of the authentication center, it takes at least 30ms from establishing a connection to the first token. For scenarios where a large number of tokens need to be written to the authentication center, such time consumption has a greater impact on the access verification process of the multi-storage cluster system. Therefore, the embodiment of the present disclosure adopts an asynchronous and batch processing method for token operations to increase the speed at which tokens are written to the database in the authentication center.

[0234] like Fig. 9As shown, each storage cluster includes a request queue, and the authentication center includes a database. The request queue is used to temporarily store the token operation requests to be sent to the authentication center 210 by the storage clusters (such as the first storage cluster HDFS1, the second storage cluster HDFS2, the third storage cluster HDFS3, and the fourth storage cluster HDFS4), and send the temporarily stored token operation requests in batches to the authentication center after the predetermined conditions are met. The token operation requests include write token operation requests, update token operation requests, delete token operation requests, etc.

[0235] Based on the above architecture, Fig.10 As shown, in step S420, the authentication center may back up the first token to the database of the authentication center in the following manner:

[0236] Step S1010, storing the first token backup request in a request queue;

[0237] Step S1020, in response to a predetermined condition, sending multiple token operation requests stored in the request queue to the authentication center.

[0238] In step S1010, the first storage cluster sends a first token backup request to the request queue. The first token backup request includes a first token. After the request queue receives the first token backup request from the first storage cluster, it is stored in sequence together with other token operation requests received in the request queue. In step S1020, when a predetermined condition is met, the token operation requests stored in the request queue are packaged and sent to the authentication center. The authentication center takes out the first token from the first token backup request and writes it into the database.

[0239] In this way, since the token operation request is processed asynchronously and in batches in the embodiment of the present disclosure, that is, the token operation request is first temporarily stored in the request queue, and then the token operation requests in the request queue are sent to the authentication center in batches according to predetermined conditions, the number of times the storage cluster establishes a connection with the authentication center is reduced, thereby saving the processing load of the storage cluster and the authentication center. For example, there are 10 tokens of a storage cluster that need to be written into the database of the authentication center. The 10 token operation requests corresponding to the 10 tokens originally need to establish a connection with the authentication center separately, and then the tokens are written into the database. Assuming that it takes 20ms to establish a connection and 10ms to write to the database, the processing time for each token write operation request is 30ms, and the processing time for 10 token write operation requests is 300ms. If the asynchronous and batch processing method of the embodiment of the present disclosure is adopted, the token write operation requests of the 10 storage clusters can be temporarily stored in the request queue first, and when the predetermined conditions are met, a connection is established with the authentication center, and the 10 token write operation requests are sent to the authentication center, and the authentication center performs a write database operation on the 10 token write operation requests. Here, only one connection needs to be established, and it is also assumed that one connection takes 20ms; the database executes 10 token write operations, each taking 10ms, and the 10 write operations take a total of 100ms; thus, the processing time for 10 token write operation requests is 120ms. Therefore, the authentication center can save 60% of the token backup operation time by adopting the asynchronous and batch processing method of the disclosed embodiment, effectively improving the efficiency of token backup.

[0240] It is understandable that if the authentication center receives other token operation requests, the authentication center will perform the corresponding operations, but these requests are also queued in the request queue as are the token write operation requests. For example, if the authentication center receives an update token operation request for updating the validity period of a backed-up token, the authentication center will query the corresponding backed-up token and perform an update operation on it, but the token operation request is also queued in the queue; for another example, if the authentication center receives a delete token operation request for a backed-up token, the database will query the corresponding backed-up token and perform a delete operation on it, but the token operation request is also queued in the queue. The authentication center uses asynchronous and batch processing methods for other token operations, which can also save time for corresponding token operations and effectively improve the efficiency of corresponding token operations.

[0241] Setting of reservation conditions

[0242] In step S1020, in response to a predetermined condition, the token operation requests stored in the request queue are packaged and sent to the authentication center. The predetermined condition can be set as needed. For example, the predetermined condition can be that the time interval from the last time the request was sent to the authentication center reaches a preset time length, or the number of token operation requests stored in the request queue reaches a preset number, or a combination of a time trigger condition and a quantity trigger condition. Each of these will be described below.

[0243] As an implementation method, the predetermined condition may be a time trigger condition. The authentication center may periodically package the token operation request and send it to the authentication center. For example, the authentication center may start an independent thread to package the token operation request and send it to the authentication center every first preset time. Then the predetermined condition is that the difference between the current time and the time of the last package transmission reaches the first preset time. The first preset time can be set as needed, for example, set to 20ms.

[0244] As another implementation, the predetermined condition may be a quantity trigger condition. The authentication center may quantitatively package the token operation requests and send them to a database in the authentication center. For example, the authentication center may start an independent thread to count the number of token operation requests stored in the request queue, and whenever the number of token operation requests stored in the request queue reaches a first preset number, the token operation requests are packaged and sent to the database in the authentication center. The predetermined condition is that the current number of token operation requests reaches a first preset number. The first preset number may be set as needed, for example, 100.

[0245] As another implementation, the predetermined condition may be a combination of a time trigger condition and a quantity trigger condition. The authentication center may start an independent thread, check the time and the number of token operation requests stored in the request queue at the same time, and trigger the predetermined condition to flush the token operation requests in the request queue to the database. For example, the predetermined condition may be set as the difference between the current time and the time of the last package transmission reaches a first preset duration, and the number of token operation requests stored in the request queue reaches a first preset number. If either of the two is satisfied, the token operation requests stored in the request queue are packaged and sent to the database in the authentication center.

[0246] In one embodiment, step S1020 includes:

[0247] Determining the number of token operation requests stored in the request queue;

[0248] If the number of token operation requests reaches the first threshold, or the number of token operation requests does not reach the first threshold, but the difference between the current time and the time of the last package sending reaches the second threshold, the token operation requests stored in the request queue are packaged and sent to the authentication center.

[0249] For example, the first threshold is 100 and the second threshold is 20ms. As long as the number of tokens reaches 100 or the packing and sending time interval is 20ms, the authentication center will pack and send the first token stored in the request queue to the database in the authentication center.

[0250] The advantage of this embodiment is that it takes into account both the time trigger condition and the quantity trigger condition. According to the quantity trigger condition, under normal circumstances, the quantity sent in each package will not be too small, thereby wasting network resources. In addition, during certain periods when too few token operation requests are generated, the generated token operation requests are delayed in receiving a response, thereby achieving a balance between resource utilization and efficiency.

[0251] In some application scenarios, some first tokens may need to be backed up to the authentication center more quickly. As an optional implementation of the embodiment of the present disclosure, a priority tag can be set in the token issued by the storage cluster, and the priority tag can be set for token operation requests that need to be quickly backed up to the authentication center. Only when an operation request for a token with a priority tag appears in the request queue, the entire queue will be packaged and sent.

[0252] Exemplarily, the structure of the first token is as follows Figure 8C As shown, step S1020 includes:

[0253] Make sure the priority flag is set;

[0254] Multiple token operation requests stored in the request queue are packaged and sent to the authentication center.

[0255] During the specific operation, an independent thread can be started in the authentication center to read and parse the token in the token write operation request to determine the status of the token's priority tag. When it is determined that the priority tag is set, the predetermined condition is triggered, and the tokens stored in the request queue are packaged and sent to the authentication center.

[0256] The advantage of this embodiment is that for some tokens that need to be quickly backed up to the authentication center, quick backup can be achieved, and for general tokens, they can be processed according to the general process, thus achieving flexibility in token backup.

[0257] It should be noted that the predetermined condition for triggering the priority tag can coexist with the time trigger condition and the quantity trigger condition. For example, the predetermined condition can be set to package the token operation request stored in the request queue and send it to the authentication center as long as any of the following conditions is met:

[0258] The difference between the current time and the last time a package was sent reaches 20ms;

[0259] The current number of token operation requests has reached 100;

[0260] The priority flag of the token included in the current token operation request is set.

[0261] According to the above predetermined conditions, it is assumed that when the request queue receives the first token operation request, the time from the current time to the last package transmission time is less than 20ms; the current number of token operation requests in the request queue is 1, which is less than 100; the priority mark of the token contained in the current token operation request is "0", which is not set; at this time, it is determined that the predetermined conditions are not met, and the request queue continues to receive the next token operation request. When the request queue receives the second token operation request, the time from the current time to the last package transmission time is less than 20ms; the current number of token operation requests in the request queue is 2, which is less than 100; the priority mark of the token contained in the current token operation request is "1", that is, it is set, and the predetermined conditions are met, and the first token operation request and the second token operation request stored in the request queue are sent to the authentication center at the same time. In this way, the token operation request with the priority flag set can be sent to the database as soon as possible, effectively improving the timeliness of token operations in emergency situations.

[0262] The advantage of the above embodiment is that it not only meets the timeliness of token operations in emergency situations, but also maintains low processing overhead and reduces resource consumption in normal situations.

[0263] It is understandable that after the first storage cluster backs up the issued first token to the authentication center, the first storage cluster may store the first token locally or may not store the first token locally.

[0264] As an optional implementation, after the first storage cluster backs up the issued first token to the authentication center, the first storage cluster continues to store the first token locally. In this way, when the first storage cluster subsequently receives an access verification request from the client with the first token, it can directly verify the access verification request based on the locally stored first token, and allow access after the verification is passed, thereby improving the processing efficiency of the access verification request. Exemplarily, the first storage cluster is an HDFS storage cluster, and after issuing the first token, the metadata storage node of the first storage cluster stores the first token in the memory of the metadata storage node at the same time; when the metadata storage node subsequently receives an access verification request from the client with the first token, it can directly verify the access verification request based on the first token stored in the metadata storage node.

[0265] As another optional implementation, after the first storage cluster backs up the issued first token to the authentication center, the first storage cluster does not store the first token locally. In this way, the first storage cluster can save memory, thereby reducing the storage burden of the first storage cluster. When an access verification request with the first token is subsequently received from the client, the access verification request can be forwarded to the authentication center for verification, and access is allowed after the verification passes. Exemplarily, the first storage cluster is an HDFS storage cluster, and after the metadata storage node of the first storage cluster issues the first token, the first token is not stored in the memory of the metadata storage node to avoid the first token occupying the storage space of the metadata. When the metadata storage node subsequently receives an access verification request with the first token from the client, the metadata storage node can forward the access verification request to the authentication center for verification.

[0266] Retest verification plan

[0267] During the cross-cluster access authentication process, there is a time difference between the time when the storage cluster issues the token and the time when the token is backed up to the authentication center. It is possible that the token has not been backed up to the authentication center, resulting in the failure of the access verification request carrying the token. For example, assuming that the authentication center adopts the above-mentioned asynchronous and batch processing method, the first storage cluster generates a token write operation request to the authentication center to back up the first token after issuing the first token. After the token write operation request is stored in the request queue, it may take 20ms to be sent to the authentication center's database. During this 20ms period, the authentication center cannot verify the cross-cluster access verification request based on the first token.

[0268] The disclosed embodiment adopts a retest verification scheme to solve the above problem. There are two implementation methods of the retest verification scheme. The first is that the client repeatedly sends the access verification request; the second is that the authentication center adds a retest verification step during the verification phase. The following will explain them separately.

[0269] As a first implementation of the retry verification scheme, the client can repeatedly send access verification requests to the storage cluster that needs cross-cluster access within the first duration; or the client can send access verification requests to the storage cluster that needs cross-cluster access again after the first duration. In this way, as long as the first duration is ensured to be greater than the processing time of the card write operation request, the verification failure problem caused by backup delay can be avoided.

[0270] For example, Fig.11 As shown, step S440 includes:

[0271] Step S1110, obtaining the maximum value of the time difference between every two adjacent package sendings recorded in the request queue log as the first duration;

[0272] Step S1120: Send an access verification request to the second storage cluster at predetermined time intervals within the first duration.

[0273] In step S1110, the first duration is determined based on the maximum value of the time difference between every two adjacent packaging and sending, ensuring that the first duration is greater than the processing time of the token write operation request, thereby avoiding the verification failure problem caused by the delay in the backup of the token by the authentication center. Among them, the maximum value of the time difference between every two adjacent packaging and sending can be calculated based on the historical record of the request queue packaging and sending time. In particular, when the predetermined condition for the request queue packaging and sending is a time trigger condition, that is, the time for token packaging and sending is performed regularly, the client can directly obtain the period of token packaging and sending as the first duration. When the predetermined condition for the request queue packaging and sending is a quantity trigger condition, the time interval for token packaging and sending is often not fixed. The client can directly obtain the maximum time interval as the first duration to try to ensure that the first duration is greater than the processing time of the token write operation request.

[0274] In step S1120, the predetermined time interval can be set as needed. For example, when the first duration is 20ms and the preset time interval is 5ms, the client repeatedly sends 4 access verification requests to the second storage cluster within the first duration, and the second storage cluster forwards the access verification request to the authentication center for verification. As long as one verification is successful, the second storage cluster can be successfully accessed. For another example, when the first duration is 20ms and the preset time interval is 10ms, the client repeatedly sends 2 access verification requests to the second storage cluster within the first duration, and the second storage cluster forwards the access verification request to the authentication center for verification. Since the time for the second access verification request to arrive at the authentication center exceeds the operation processing time of writing the first token to the authentication center, if there is no other situation, the first token has been backed up in the authentication center, and the authentication center can verify the access verification request based on the backed-up first token, and successfully access the second storage cluster.

[0275] In some other embodiments, the predetermined time interval is determined by:

[0276] Get the variance of the time difference between every two adjacent package sendings recorded in the request queue log;

[0277] Based on the variance, a predetermined time interval is determined.

[0278] It can be understood that the larger the variance of the time difference between every two adjacent package transmissions, the larger the time fluctuation of the package transmission is, that is, the time difference between every two adjacent package transmissions is unstable. At this time, the predetermined time interval can be set to be smaller, and the number of repeated transmissions in the first duration is greater. The more frequent the access verification request is sent, the more conducive it is to improving the timeliness of the access verification. The smaller the variance of the time difference between every two adjacent package transmissions, the smaller the time fluctuation of the package transmission is, that is, the time difference between every two adjacent package transmissions is more stable. At this time, the predetermined time interval can be set to be larger, and the number of repeated transmissions in the first duration is less. The sparser the access verification request is sent, the less bandwidth resources and processing resources the access verification request occupies. In order to better explain the principle relationship between the variance and the preset time interval, take daily phone calls as an example: for example, before making a call, you don’t know when the other party will be able to answer the call conveniently within a period of time (the variance is large, and the time when the other party will answer the call is unstable), then you can make more frequent calls during this period of time to try to ensure that the other party can be connected once it is convenient to do so; if you are relatively sure of when the other party will be able to answer the call conveniently within a period of time before making a call (the variance is small, and the time when the other party will answer the call is relatively stable), then the number of calls during this period of time can be sparser to save bandwidth and processing time occupied by each call.

[0279] The advantage of this embodiment is that the time interval for repeatedly sending verification requests is associated with the severity of the change in the time difference between each two adjacent package sendings, which further improves the rationality of the determined predetermined time interval and increases the probability of verification passing when the corresponding token has indeed been backed up to the database of the authentication center.

[0280] Generally speaking, if the predetermined condition for triggering the token operation requests stored in the request queue to be packaged and sent to the database is a quantity trigger condition, the variance of the time difference between each two adjacent package transmissions recorded in the request queue log is large, and the value of the predetermined time interval is set to be small; if the predetermined condition for triggering the token operation requests stored in the request queue to be packaged and sent to the database is a time trigger condition, the variance of the time difference between each two adjacent package transmissions recorded in the request queue log will be small, and the value of the predetermined time interval is set to be large. It is particularly important to explain that when the authentication center periodically packages the token operation requests and sends them to the database in the authentication center, that is, the predetermined condition is that the difference between the current time and the time of the last package transmission reaches the first preset time length, then the variance of the time difference between each two adjacent package transmissions is 0, the variance reaches the minimum value, and the predetermined time interval can be set to the maximum value, that is, the predetermined time interval is set equal to the first preset time length.

[0281] As a second implementation of the retry verification scheme, a retry verification step can be added to the verification phase of the access verification request of the authentication center, and the duration of the initial verification of the retry verification interval is set to be longer than the duration of the authentication center's processing of the token write operation request. In response to the cross-cluster access verification request forwarded by the second storage cluster, the authentication center verifies the access verification request based on the stored authorization token; if the verification result is failed, the access verification request is verified again based on the stored first authorization token at least after the second preset time; wherein the second preset time is longer than the first duration. As mentioned above, the maximum value of the time difference between each two adjacent package transmissions recorded in the request queue log can be used as the first duration, which will not be elaborated here.

[0282] In some embodiments, a predetermined time interval may be set within the first duration to verify the access verification request based on the stored first authorization token. The predetermined time interval may be determined based on the variance of the time difference between each two adjacent package transmissions recorded in the request queue log, as described above, and will not be described in detail here.

[0283] Token Renewal

[0284] In actual applications, the token issued by the storage cluster has a time limit. The client needs to carry the token to access the corresponding storage cluster within the validity period of the token, otherwise the token verification cannot be passed. For example, the first token issued by the first storage cluster has a first time limit. The first token can be used as follows Figure 8B During the task execution process, if the token expires, the client needs to re-apply for a token from the storage cluster to be accessed in a timely manner to ensure that the task of accessing the storage cluster runs smoothly.

[0285] like Fig.12 After step S420, the multi-storage cluster access authentication method of the embodiment of the present disclosure further includes:

[0286] Step S1210, determining that the current time exceeds the first deadline;

[0287] Step S1220: If the task to be executed has not been completed, request the first storage cluster to renew the first token to a second period.

[0288] Step S1210 and step S1220 can be executed by the client. For a client that executes a distributed task, step S1210 and step S1220 can be executed by the client's master node. When the client finds that the current time exceeds the first deadline and the task to be executed has not been completed, the token renewal action is triggered, and the first storage cluster is requested to renew the first token to the second deadline. After the first storage cluster receives the first token renewal request from the client, it issues the first token with a renewed validity period of the second deadline to the client, and at the same time sends an update token operation request to the authentication center to update the validity period of the first token backed up in the authentication center to the second deadline.

[0289] The second deadline can be determined in the following ways:

[0290] Get the task type of the task to be executed;

[0291] Get the average execution time of tasks of the task type;

[0292] Based on the average execution time and the first coefficient, a second deadline is determined.

[0293] The second deadline can be determined based on the task type of the task to be executed. For example, for a task to be executed with a relatively long execution cycle, if it exceeds the maximum allowable renewal period of the token, the second deadline can be extended as much as possible, such as being set to the maximum allowable renewal period of the token, to reduce the number of renewals. For a task to be executed with a relatively short execution cycle, if the execution cycle of the task to be executed does not exceed the maximum allowable renewal period of the token, the second deadline can be directly set to a deadline that matches the execution time of the task to be executed, so that the token expires as soon as possible after the execution of the task to be executed is completed, thereby improving the security of data access to the storage cluster.

[0294] The second deadline can be determined based on the average execution time of tasks of each task type. Among them, α is the first coefficient, t i is the execution time of the i-th sample task of this task type, m is the number of sample tasks, represents the average execution time of m sample tasks, and t1 is the time the task to be executed has been executed. The second deadline can be determined according to the size of the target time T. The process of determining the second deadline according to the target time T is as follows: if the target time T exceeds the maximum allowable renewal period of the token, the second deadline can be extended as much as possible, such as setting the second deadline to the maximum allowable renewal period of the token; if the target time T does not exceed the maximum allowable renewal period of the token, the second deadline is set to T.

[0295] The first coefficient can be reasonably set as needed. Generally, the value range of the first coefficient is between 1 and 2. For example, the first coefficient can be set to 1.2. The advantage of setting the second deadline in this way is that the execution time requirements of most tasks can be met by multiplying the average task execution time of each sample task by a reasonable coefficient, and the second deadline can be adjusted by adjusting the first coefficient. In this way, the number of renewals can be minimized, and the token can be invalidated as soon as possible after the execution of the task to be executed is completed, thereby improving the security of data access to the storage cluster.

[0296] For example, the task to be executed is a monthly report statistics task, the corresponding task type is a monthly task, the average execution time of the task type is 30 days, the maximum allowable renewal period of the token is 1 day, the execution time of the task to be executed is 2 days, and the first coefficient is set to 1, then the target time days, which is greater than the maximum allowable renewal period of the token. The second period can be set to the maximum allowable renewal period of the token, which is 1 day. The task to be executed is an object profile calculation task, and the corresponding task type is a real-time task. The average execution time of this task type is 180 seconds. The maximum allowable renewal period of the token is 10,000 seconds. The execution time of the task to be executed is 60 seconds. The first coefficient is set to 1.5, so the target time seconds, which is less than the maximum allowed renewal period of the token, the second period can be set as the target time T, that is, 210 seconds.

[0297] In other embodiments, in order to further ensure that the validity period of the token is not interrupted, during the execution of the task to be executed, a token renewal request may be sent to the first storage cluster regularly, or the token renewal request may be sent to the first storage cluster when the validity period is approaching. For example, if the token is valid until 24:00 the next day, the client may send a token renewal request to the first storage cluster regularly at 23:00 every day during the execution of the task to be executed, so as to ensure that the first token is valid during the execution of the task to be executed.

[0298] Detailed description of step S430

[0299] In step S430, during the execution of the task to be executed, a second storage cluster that needs to be accessed by the task to be executed is determined.

[0300] In some embodiments, the second storage cluster that needs to be accessed may be one that the client cannot determine based on the content of the task to be executed during the task startup phase. For example, the content of the task to be executed includes: "XXXXXXX XXXXXXX readA1; XXXXXXX XXXXXXX H=XXXX located in, read H". It is determined that the tasks to be executed include reading file A1 and reading file H. The client determines that file A1 is stored on the first storage cluster by querying the mapping relationship table between locally stored files and storage clusters, and the storage location of file H is unknown and cannot be determined. During the execution of the task to be executed, the client determines that file H is stored in the second storage cluster by parsing more statements in the content of the task to be executed.

[0301] Exemplarily, in a distributed task, during the task startup phase, the client's master node cannot determine the second storage cluster that needs to be accessed based on the content of the task to be executed; during the task running phase, the client's slave node determines the second storage cluster that needs to be accessed based on the content of the task. For example, the content of the task to be executed includes: "XXXXXXX XXXXXXX readA1; XXXXXXX XXXXXXX H=XXXX located in, read H". It is determined that the tasks to be executed include reading file A1 and reading file H. The client's master node determines that file A1 is stored on the first storage cluster by querying the mapping relationship table between locally stored files and storage clusters, and the storage location of file H is unknown and cannot be determined. During the execution of the task to be executed, the client's slave node determines that file H is stored in the second storage cluster by parsing the statement "H=XXXX".

[0302] In other embodiments, the need to access the second storage cluster may be caused by changes in the data in the storage cluster. For example, in an application where the task to be executed is real-time computing of big data, the data in the storage cluster changes in real time, and the task to be executed cannot predict which storage cluster the data to be accessed during the task is located.

[0303] Exemplarily, the task to be executed is "Object portrait analysis in XX area". In this task to be executed, it is necessary to obtain the events of the objects in the area in the past hour. During the task startup phase, the client learns that the event data of the objects in the area is stored in the first storage cluster, so it sends a token issuance request to the first storage cluster to obtain the first token. However, during the running of the task, the amount of event data of the objects in the area in the past hour has been increasing and has begun to be stored in the second storage cluster. At this time, the client determines that it needs to access the second storage cluster. However, it should be noted that the acquisition of events of the objects in the area in the past hour as described above must be approved by the object in advance. Specifically, when an object event occurs, a query box can be displayed to the object, asking the object whether it agrees that the platform obtains the object event data for subsequent platform analysis. If the object disagrees, this implementation method cannot be implemented.

[0304] Detailed description of step S440

[0305] In step S440, the access verification request sent by the client to the second storage cluster contains the first token. Fig.13A As shown, it is a schematic diagram of the frame structure of an access verification request of an embodiment of the present disclosure. In this example, the access verification request includes a client identifier, a second storage cluster identifier and a first token. The client identifier may include information such as the IP address of the client and the port number of the client. The second storage cluster identifier may include information such as the IP address of the second storage cluster and the port number of the second storage cluster. The structure of the first token includes a first token identifier and a token body, etc. For details, please refer to the description of the structure of the first token in the previous text. Fig. 13B As shown, it is a schematic diagram of the frame structure of an access verification request of another embodiment of the present disclosure. In this example, the access verification request includes a client identifier, a second storage cluster identifier, a first token, and a second identifier. Please refer to the previous text for the description of the client identifier, the second storage cluster identifier, and the first token. The second identifier is used to characterize the second operation of accessing the second storage cluster. For example, the second identifier is represented by a 4-bit field, "0001" represents a read operation; "0010" represents a write operation; "0100" represents an update operation; "1000" represents a delete operation, and so on. In some embodiments, Fig. 13CAs shown, it is a schematic diagram of the frame structure of an access verification request of another embodiment of the disclosed embodiment. The frame structure of the access verification request may also include a transport layer protocol. Exemplarily, the frame structure of the access verification request includes a transport layer protocol, an IP address of the client, a port number of the client, an IP address of the second storage cluster, a port number of the second storage cluster, a first token, and a second identifier. Specifically, the content of a certain access verification request is: "TCP 192.168.1.1 10000202.17.89.96 80 0001KKKKKKKKKK" means that the client with an IP address of 192.168.1.1 sends a request to the second storage cluster with an IP address of 202.17.89.96 and a port of 80 through port 10000 using the TCP transport layer protocol. The operation corresponding to the request is 0001, that is, a read operation, and the first token carried is KKKKKKKKKKK.

[0306] After receiving the access verification request, the second storage cluster forwards the access verification request to the authentication center in the following four ways:

[0307] The first forwarding verification method is that after receiving the access verification request, the second storage cluster can directly forward the access verification request to the authentication center for verification. The advantage of this method is that the process is relatively simple, that is, the system defaults to all verification processes being performed in the authentication center; since the storage cluster does not need to perform verification tasks, there is no need to store tokens, that is, there is no need to set up a token cache, saving the memory space of the storage cluster.

[0308] The second forwarding verification method is that after receiving the access verification request, the second storage cluster first verifies the first token carried in the access verification request based on the locally stored token. If the verification fails, the access verification request is forwarded to the authentication center for verification. The advantage of this method is that if there is a matching token in the local storage, the verification can be quickly passed, which improves the processing efficiency of the access verification request.

[0309] The third forwarding verification method is that after receiving the access verification request, the second storage cluster extracts the first token in the access verification request and forwards the first token to the authentication center for verification. This method has the same advantages as the first forwarding verification method.

[0310] The fourth forwarding verification method is that after receiving the access verification request, the second storage cluster extracts the first token in the access verification request and verifies the first token based on the locally stored token. If the verification fails, the first token is forwarded to the authentication center for verification. This method has the same advantages as the second forwarding verification method.

[0311] If the second storage cluster adopts the second forwarding verification method or the fourth forwarding verification method, the first token can be stored in the memory of the second storage cluster after receiving the message of successful verification from the authentication center. In this way, when the second storage cluster receives an access verification request carrying the first token next time, the first token can be directly verified based on the locally stored token. After successful verification, there is no need to forward the access verification request to the authentication center, thereby improving the processing efficiency of the access verification request.

[0312] Therefore, in some embodiments, the second storage cluster has a token cache for caching tokens issued by the second storage cluster and tokens successfully authenticated by the authentication center after forwarding the access verification request to the authentication center. Correspondingly, the second storage cluster forwards the access verification request to the authentication center, including: comparing the first token contained in the access verification request with the token stored in the token cache, if it is consistent with a stored token, the verification is successful; if it is inconsistent with any token stored in the token cache, forwarding the access verification request to the authentication center.

[0313] Certification Center Verification Process

[0314] After receiving the access verification request from the second storage cluster, the authentication center verifies the first token contained in the access verification request based on the first token backed up by the authentication center, and notifies the second storage cluster of the verification success result after the verification succeeds.

[0315] like Fig.14 As shown, the authentication center successfully authenticates based on the backed-up first token and the first token contained in the access authentication request, including:

[0316] Step S1410, obtaining a target first token whose first token identifier is the same as the identifier of the first token contained in the access verification request from the backup first token;

[0317] Step S1420: If the token body of the target first token matches the token body of the first token contained in the access verification request, it is determined that the verification is successful.

[0318] Steps S1410 to S1420 are described in detail below.

[0319] In some embodiments, the authentication center can store tokens through a "key-value" storage database. When the token needs to be backed up to the authentication center, the authentication center's database parses the token to obtain the token identifier and the token body, and then stores the token identifier in the "key" field of the "key-value" storage database, and stores the token body in the corresponding "value" field. Then, a hash table structure is used to store the "key" field so that each "key" field has a corresponding token index.

[0320] In step S1410, the process of searching for the target first token in the database of the authentication center is as follows: when it is necessary to obtain the target first token whose token identifier is the same as the identifier of the first token contained in the access verification request from the tokens backed up by the authentication center, a hash function calculation can be performed on the identifier of the first token contained in the access verification request to obtain a token index, and the "key" field of the stored target first token can be searched according to the token index, that is, the token identifier of the target first token is found, and then the token body of the target first token is obtained. In this way, the data of the authentication center can meet the backup storage requirements of a large number of tokens, and can quickly realize the search of the target first token when an access verification request is received, thereby improving verification efficiency.

[0321] In step S1420, the token body of the target first token matches the token body of the first token contained in the access verification request, which means that the token body of the target first token is equal to the token body of the first token contained in the access verification request, or the token body of the target first token is equal to the token body of the first token contained in the access verification request after being calculated by a preset algorithm, or the token body of the target first token is equal to the token body of the first token contained in the access verification request after being calculated by a preset algorithm. The preset algorithm may be an encryption algorithm, such as the MD5 encryption algorithm.

[0322] The advantage of this embodiment is that it uses a "key-value" method to perform retrieval verification, thereby improving verification efficiency.

[0323] In one embodiment, the token body of the first token contained in the access verification request is a token body encrypted using a predetermined encryption algorithm; step S1420 includes:

[0324] Encrypting the token body of the target first token using a predetermined encryption algorithm to obtain an encrypted token body;

[0325] If the encrypted token body is consistent with the token body of the first token contained in the access verification request, it is determined that the verification is successful.

[0326] Exemplarily, assume that the structure of the first token contained in the access verification request is [ID, MD5(password)], where ID is the first token identifier, and MD5(password) is the token body encrypted with the password string using the MD5 encryption algorithm; the token body of the target first token stored in the authentication center is an unencrypted token body. After finding the target first token for verification, the authentication center obtains the token body of the target first token, and then encrypts and calculates the token body using the MD5 encryption algorithm, and then performs an equivalence calculation on the token body of the encrypted target first token and the token body of the first token contained in the access verification request to determine whether the two are equal. If so, the verification is successful, otherwise the verification fails. If the verification is successful, the second storage cluster is notified of the successful verification result; if the verification is unsuccessful, the second storage cluster may be notified of the failed verification result, or no processing may be performed.

[0327] The multi-storage cluster access authentication method of the disclosed embodiment can further improve the security of cross-cluster authentication in the following four ways:

[0328] (I) Mixed verification method for similar operations

[0329] In this verification method, cross-cluster verification requires that the access verification request holds a token previously issued in the same task, and that the operation of the access verification request and the operation of the target first token stored by the authentication center are of the same type of operation. This is because it is safer to share the same token for the same type of operation. For example, a token was previously issued for a read operation because the read operation does not change the data stored in the storage cluster. However, a write operation will change the data stored in the storage cluster, so the token previously issued for the read operation may not be used for the write operation.

[0330] Specifically, the first token issuance request includes a first identifier of a first operation that requires access to the first storage cluster, and its frame structure is as follows: Figure 5A or Figure 5B As shown. The first identifier and the first token are backed up in the authentication center accordingly. The access verification request includes a second identifier of a second operation that needs to access the second storage cluster, and its frame structure is as follows: Fig. 13B or Fig. 13C The authentication center verifies successfully based on the backup first token and the first token included in the access verification request, including: if the backup first token is consistent with the first token included in the access verification request, and the first identifier is consistent with the second identifier, the verification is successful.

[0331] Exemplarily, the content of the first token issuance request sent by the client to the first storage cluster includes: "TCP192.168.1.1 10000 202.17.88.76 80 0001" The first identifier used to identify the first operation in the request is 0001, that is, a read operation. The first token issued by the first storage cluster in response to the first token issuance request is KKKKKKKKKK. The first identifier 0001 together with the first token KKKKKKKKK are backed up in the authentication center. Assume that the content of the first access verification request sent by the client to the second storage cluster includes: "TCP 192.168.1.1 10000 202.17.89.96 800010KKKKKKKKK" The second identifier used to identify the second operation in the request is 0010, that is, a write operation. Although the first token carried in the access verification request matches the first token backed up by the authentication center, the second identifier 0010 is inconsistent with the first identifier 0001, and the two belong to different operation types, and the verification fails. Assume that the client sends a second access verification request to the second storage cluster, including the content of "TCP 192.168.1.1 10000 202.17.89.96800001KKKKKKKKKK" The second identifier used to identify the second operation in the request is 0001, which is a read operation. The first token carried in the access verification request matches the first token backed up by the authentication center. Since the second identifier 0001 is consistent with the first identifier 0001, the two belong to the same operation type, and the verification succeeds.

[0332] The advantage of this embodiment is that, in the same task, only tokens that have been applied for the same type of operation can be used for the current verification, thereby improving the security of token verification.

[0333] (II) Hybrid Verification Time Limit Method

[0334] In this verification method, cross-cluster verification (hybrid verification) requires that the access verification request holds a token previously issued in the same task, and also requires that the verification processing time of the access verification request be within the hybrid verification period.

[0335] Specifically, the first token has a mixed verification deadline, and its frame structure is as follows: Fig.8D The authentication center verifies successfully based on the backup first token and the first token contained in the access verification request, including: if the backup first token is consistent with the first token contained in the access verification request, and the time when the authentication center receives the access verification request is no later than the hybrid verification deadline, the verification is successful.

[0336] Exemplarily, the content of the first token includes: "ID KKKKKKKKKK T1" wherein ID is the token identifier, KKKKKKKKKK is the token body, and T1 is the hybrid verification deadline. Assume that the client sends a first access verification request to the second storage cluster, the first token carried by the first access verification request matches the first token backed up by the authentication center, the time when the authentication center receives the first access verification request is T2, and T2 is less than T1, then the verification is successful. Assume that the client sends a second access verification request to the second storage cluster, the first token carried by the second access verification request matches the first token backed up by the authentication center, the time when the authentication center receives the second access verification request is T3, and T3 is greater than T1, then the verification fails.

[0337] The advantage of this embodiment is that the longer the time interval between the time when the first token is used to access the second storage cluster and the time when the first token is issued, the less likely the access is associated with the first token. Not only is it considered whether the token used to access the second storage cluster is a token that has been issued in this task, but also the time interval between the time when the token is issued and the current time, which further improves the security of token verification.

[0338] (III) Mixed verification method in the same group

[0339] In this verification method, cross-cluster verification (hybrid verification) requires that the first storage cluster that issues the token and the second storage cluster to be accessed belong to the same group in addition to requiring the access verification request to hold a token previously issued in the same task. This can be determined specifically based on the group identifiers of the tokens issued by the first storage cluster and the second storage cluster. For example, a task is divided into phases A, B, and C. Phase A accesses storage clusters A1-A4, and the tokens issued by storage clusters A1-A4 constitute token group H1; phase B accesses storage clusters B1-B2, and the tokens issued by storage clusters B1-B2 constitute token group H2; phase C accesses storage clusters C1-C6, and the tokens issued by storage clusters C1-C6 constitute token group H3. It is obviously inappropriate to use a token in token group H1 to access storage clusters C1-C6, because storage clusters A1-A4 and storage clusters C1-C6 are used in different phases.

[0340] Specifically, the authentication center can group the storage clusters within its management scope and back up the group identifiers of the storage clusters. The first token has the first group identifier to which the first token belongs, and its frame structure is as follows: Fig. 8EAs shown. The second storage cluster issues a second token, and the second token has a second group identifier to which the second token belongs. The authentication center verifies successfully based on the backed-up first token and the first token contained in the access verification request, including: if the backed-up first token is consistent with the first token contained in the access verification request, and the first group identifier is consistent with the second group identifier, the verification is successful.

[0341] Exemplarily, the content of the first token issued by the first storage cluster includes: "ID1KKKKKKKKKK G1", wherein ID1 is the token identifier, KKKKKKKKKK is the token body, and G1 is the first group identifier of the first token; the content of the second token issued by the second storage cluster includes: "ID2YYYYYYYY G2", wherein ID2 is the token identifier, YYYYYYYY is the token body, and G2 is the second group identifier of the second token; the content of the third token issued by the third storage cluster includes: "ID3WWWWWWW G3", wherein ID3 is the token identifier, WWWWWWW is the token body, and G3 is the third group identifier of the third token; and G1=G2≠G3. Assume that the client sends the first access verification request to the second storage cluster, the first token carried by the first access verification request matches the first token backed up by the authentication center, and the first group identifier G1 is consistent with the second group identifier G2, and the verification is successful. Assume that the client sends a second access verification request to the third storage cluster. The first token carried in the second access verification request matches the first token backed up by the authentication center, but the first group identifier G1 is inconsistent with the third group identifier G3, and the verification fails.

[0342] The advantage of this embodiment is that when the tokens issued in the same task are not completely equal but have relatively strong group attributes, the potential safety hazards caused by mixed verification between token groups are reduced.

[0343] (IV) Hybrid verification based on tags

[0344] In this verification mode, cross-cluster verification (hybrid verification) requires that the access verification request holds a token previously issued in the same task, and also requires that the cross-cluster access flag of the first token carried by the access verification request is in a set state.

[0345] Specifically, the first token has a cross-cluster access flag, and its frame structure is as follows: Fig.8F The authentication center verifies successfully based on the backup first token and the first token included in the access verification request, including: if the backup first token is consistent with the first token included in the access verification request, and the cross-cluster access mark is set, the verification is successful.

[0346] Exemplarily, the client sends a first access verification request to the second storage cluster, and the content of the first token carried by the first access verification request includes: "ID1 KKKKKKKKKK 0", wherein ID1 is the token identifier, KKKKKKKKKK is the token body, 0 is the cross-cluster access tag, and the value represents that the cross-cluster access tag is not set. The first token carried by the first access verification request matches the first token backed up by the authentication center, but the cross-cluster access tag is not set, and the verification fails. The client sends a second access verification request to the second storage cluster, and the content of the first token carried by the second access verification request includes: "ID1 KKKKKKKKKK 1", wherein ID1 is the token identifier, KKKKKKKKKK is the token body, 1 is the cross-cluster access tag, and the value represents that the cross-cluster access tag is set. The first token carried by the second access verification request matches the first token backed up by the authentication center, and the cross-cluster access tag is set, and the verification succeeds.

[0347] The advantage of this embodiment is that through the set state, the hybrid verification method can be flexibly enabled or disabled. For example, when the set state is set, the hybrid verification of the embodiment of the present disclosure is allowed, and when the set state is not set, the hybrid verification of the embodiment of the present disclosure is not allowed, thereby improving the compatibility of the hybrid verification scheme of the embodiment of the present disclosure with existing schemes.

[0348] Detailed description of step S450

[0349] In step S450, when the authentication center returns the result of successful authentication to the second storage cluster, the second storage cluster allows the client to access. Exemplarily, for an access verification request from the client for reading file D1, the metadata node of the second storage cluster can return the metadata of file D1 to the client, and the client reads the corresponding file D1 from the corresponding working storage node in the second storage cluster according to the metadata.

[0350] In addition, after step S450, the multi-storage cluster access authentication method may further include:

[0351] Step S460, determining that the task to be executed is completed;

[0352] Step S470: Send a first token cancellation request to the first storage cluster so that the first storage cluster cancels the first token and notifies the authentication center to delete the backed-up first token.

[0353] It is understandable that after the execution of the pending task is completed, the client can notify the authentication center to delete the backed-up first token by executing steps S460 and S470. After receiving the first token for deleting the backed-up, the authentication center performs the deletion operation to make the first token invalid as soon as possible after the execution of the pending task is completed, thereby improving the security of data access to the storage cluster.

[0354] Exemplarily, the client can send a delete token operation request to the first storage cluster. The delete token operation request includes a client identifier, a first storage cluster identifier, a third identifier, and a first token. Among them, the third identifier is used to represent the deletion operation. For example, the content of a certain access verification request is: "192.168.1.1 10000 202.17.89.96 801000KKKKKKKKKK" means that the client with an IP address of 192.168.1.1 sends a request to the second storage cluster with an IP address of 202.17.89.96 and a port of 80 through port 10000. The operation corresponding to the request is 1000, that is, a deletion operation, and the first token carried is KKKKKKKKKK. After receiving the delete token operation request, the first storage cluster forwards the delete token operation request to the authentication center. The request queue of the authentication center receives the delete token operation request, and sends the delete token operation request to the database of the authentication center when the predetermined conditions are met. After receiving the delete token operation request, the database of the authentication center deletes the stored first token.

[0355] An example of a specific use process of the multi-storage cluster access authentication method according to an embodiment of the present disclosure

[0356] Refer to the following Fig.15 , a specific use process of the multi-storage cluster access authentication method of the embodiment of the present disclosure is described in detail, which includes but is not limited to the following steps S1501 to S1522. This example takes the storage cluster as an HDFS storage cluster as an example, and the storage cluster has a metadata storage node and a working storage node.

[0357] Task start-up phase

[0358] Step S1501: The client determines the first storage cluster HDFS1 that needs to be accessed by the task to be executed according to the task to be executed;

[0359] Step S1502: The client sends a first token issuance request to the first storage cluster HDFS1.

[0360] Step S1503: After receiving the first token issuance request, the first storage cluster HDFS1 generates a globally unique token identifier, generates a token body, and generates a first token based on the first token identifier and the token body.

[0361] Step S1504: The first storage cluster HDFS1 sends the first token to the client.

[0362] Step S1505: The first storage cluster HDFS1 backs up the first token to the authentication center.

[0363] Task running phase

[0364] Step S1506: The client determines the second storage cluster HDFS2 that needs to be accessed.

[0365] Step S1507: The client sends an access verification request to the metadata storage node of the second storage cluster HDFS2, where the access verification request contains the first token.

[0366] Step S1508: The metadata storage node of the second storage cluster HDFS2 performs local verification on the first token contained in the access verification request based on the locally stored token, and the verification result is unsuccessful.

[0367] Step S1509: The metadata storage node of the second storage cluster HDFS2 forwards the access verification request to the authentication center.

[0368] Step S1510: The authentication center performs hybrid verification on the first token contained in the access verification request based on the backup first token, and the verification result is success.

[0369] Step S1511: The authentication center returns the successful verification result to the metadata storage node of the second storage cluster HDFS2.

[0370] Step S1512: After receiving the verification result, the metadata storage node of the second storage cluster HDFS2 allows the client's access request, responds to the client's request, and returns the corresponding metadata to the client. The metadata is used to guide the client to connect to the corresponding working storage node of the second storage cluster HDFS2.

[0371] Step S1513: The client obtains a working storage node connection with the corresponding second storage cluster HDFS2 according to the received metadata to read the corresponding data.

[0372] The multi-storage cluster access authentication method performed by the authentication center in the embodiment of the present disclosure is described

[0373] In addition, if Fig.16 As shown, the embodiment of the present disclosure also provides a multi-storage cluster access authentication method, including:

[0374] Step S1610, receiving a first token issued by a first storage cluster for a task to be executed for backup;

[0375] Step S1620, receiving an access verification request forwarded by the second storage cluster, wherein the access verification request includes a first token, which is used by the client to access the second storage cluster with the first token in the task to be executed;

[0376] Step S1630, performing verification based on the backed-up first token and the first token in the access verification request;

[0377] Step S1640: After successful verification, the client is allowed to access the second storage cluster.

[0378] A multi-storage cluster access authentication method can be applied to an authentication center of a multi-storage cluster access authentication system. The multi-cluster distributed file system at least includes an authentication center, a first storage cluster and a second storage cluster, and the authentication center is respectively connected to the first storage cluster and the second storage cluster.

[0379] It should be noted that the multi-storage cluster access authentication method executed in the authentication center corresponds to the aforementioned multi-storage cluster access authentication method executed in the client, and both belong to the same inventive concept. For example, the client issues the first token and backs it up to the authentication center by executing the aforementioned steps S410 and S420. Correspondingly, the authentication center executes step S1610 to receive the first token issued by the first storage cluster for the task to be executed for backup. The client sends an access verification request to the second storage cluster by executing step S440 so that the second storage cluster forwards the access verification request to the authentication center. Correspondingly, the authentication center executes step S1620 to receive the access verification request forwarded by the second storage cluster, and then executes step S1630 for verification, and finally executes step S1630 to send the verification success to the second storage cluster to allow the client to access the second storage cluster. The client executes step S450 to access the second storage cluster. Therefore, these embodiments have the same implementation principles and technical effects, and the relevant descriptions of the aforementioned steps S410-step S450 are also applicable to this embodiment and will not be described in detail here.

[0380] Description of the apparatus and device of the present disclosure

[0381] It is to be understood that, although the steps in the above-mentioned flowcharts are sequentially displayed according to the characterization of arrows, these steps are not necessarily executed in sequence according to the order of arrow characterization. Unless there is a clear description in the present embodiment, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the above-mentioned flowcharts can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.

[0382] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to the characteristics of the target object such as the target object attribute information or attribute information set, the permission or consent of the target object will be obtained first, and the collection, use and processing of these data will comply with the relevant laws, regulations and standards of the relevant countries and regions. In addition, when the embodiment of the present application needs to obtain the attribute information of the target object, the separate permission or separate consent of the target object will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the separate permission or separate consent of the target object, the necessary target object-related data used to enable the normal operation of the embodiment of the present application will be obtained.

[0383] Reference Fig.17A , Fig.17A A multi-storage cluster access authentication device 1700 provided in an embodiment of the present disclosure includes:

[0384] The first determining unit 1701 is configured to determine, in response to obtaining a task to be executed, a first storage cluster that needs to be accessed by the task to be executed;

[0385] The first sending unit 1702 is used to send a first token issuance request to the first storage cluster so that the first storage cluster issues a first token, wherein the first token is used to access the first storage cluster, and the first token is backed up to the authentication center after issuance;

[0386] The second determining unit 1703 is used to determine the second storage cluster that needs to be accessed by the task to be executed during the execution of the task to be executed;

[0387] The second sending unit 1704 is used to send an access verification request to the second storage cluster, wherein the access verification request contains the first token, so that after the second storage cluster forwards the access verification request to the authentication center, the authentication center verifies successfully based on the backed up first token and the first token contained in the access verification request;

[0388] The access unit 1705 is configured to access the second storage cluster.

[0389] Optionally, the first determining unit 1701 is specifically configured to:

[0390] In response to obtaining the task to be executed, starting the master node, and determining, by the master node, a first storage cluster that needs to be accessed by the task to be executed;

[0391] The second determining unit 1703 is specifically configured to:

[0392] By means of the master node, the task to be executed is divided into a plurality of subtasks, and the subtasks are sent to a plurality of slave nodes corresponding to the plurality of subtasks for execution; in the process of the slave nodes executing the subtasks corresponding to the slave nodes, a second storage cluster that needs to be accessed by the subtasks is determined;

[0393] The second sending unit 1704 is specifically configured to:

[0394] Sending the access verification request to the second storage cluster includes: sending the access verification request to the second storage cluster by the slave node.

[0395] Optionally, the first token has a first expiration date;

[0396] The multi-storage cluster access authentication device 1700 further includes:

[0397] A third determining unit (not shown), configured to determine whether the current time exceeds the first time limit;

[0398] The token renewal unit (not shown) is used to request the first storage cluster to renew the first token to a second period if the task to be executed has not been completed.

[0399] Optionally, the second term is determined by:

[0400] Get the task type of the task to be executed;

[0401] Get the average execution time of tasks of the task type;

[0402] Based on the average execution time and the first coefficient, a second deadline is determined.

[0403] Optionally, the first token is backed up to the authentication center in the following manner:

[0404] storing the first token in a request queue;

[0405] In response to predetermined conditions, the tokens stored in the request queue are packaged and sent to a database in the authentication center.

[0406] Optionally, in response to a predetermined condition, packaging the tokens stored in the request queue and sending them to a database in the authentication center includes:

[0407] Determine the number of tokens stored in the request queue;

[0408] If the number of tokens reaches the first threshold, or the number of tokens does not reach the first threshold but the difference between the current time and the last package sending time reaches the second threshold, the first token stored in the request queue is packaged and sent to the database in the authentication center.

[0409] Optionally, the first token has a priority tag;

[0410] In response to a predetermined condition, the tokens stored in the request queue are packaged and sent to a database in the authentication center, including:

[0411] Make sure the priority flag is set;

[0412] The tokens stored in the request queue are packaged and sent to the database in the authentication center.

[0413] Optionally, the second sending unit 1704 is specifically configured to:

[0414] Obtain the maximum value of the time difference between every two adjacent package sendings recorded in the request queue log as the first duration;

[0415] An access verification request is sent to the second storage cluster at predetermined time intervals within the first duration.

[0416] Optionally, the predetermined time interval is determined by:

[0417] Get the variance of the time difference between every two adjacent package sendings recorded in the request queue log;

[0418] Based on the variance, a predetermined time interval is determined.

[0419] Optionally, issuing a first token comprises:

[0420] generating a first token identifier, wherein first token identifiers of different first tokens are different from each other;

[0421] Generate a token body;

[0422] Based on the first token identifier and the token body, generate a first token for issuance;

[0423] The authentication center verifies successfully based on the backed-up first token and the first token contained in the access verification request, including:

[0424] Obtaining, from the backup first token, a target first token whose first token identifier is the same as the identifier of the first token contained in the access verification request;

[0425] If the token body of the target first token matches the token body of the first token contained in the access verification request, it is determined that the verification is successful.

[0426] Optionally, the token body of the first token contained in the access verification request is a token body encrypted using a predetermined encryption algorithm;

[0427] If the token body of the target first token matches the token body of the first token included in the access verification request, determining that the verification is successful includes:

[0428] Encrypting the token body of the target first token using a predetermined encryption algorithm to obtain an encrypted token body;

[0429] If the encrypted token body is consistent with the token body of the first token contained in the access verification request, it is determined that the verification is successful.

[0430] Optionally, generating a first token identifier includes:

[0431] Get the timestamp when the first token was issued;

[0432] Obtaining an identifier of a first storage cluster;

[0433] Get the serial number of the first token generated at the same timestamp;

[0434] A first token identifier is generated based on the timestamp, the identifier of the first storage cluster, and the sequence number.

[0435] Optionally, the number of digits of the sequence number is determined by the following method: the storage cluster set includes multiple sample storage clusters;

[0436] Get the number of tokens issued per unit time in each sample storage cluster;

[0437] Based on the number of tokens issued per unit time in each sample storage cluster, obtain the average number of tokens issued per unit time;

[0438] Based on the average value and the second coefficient, the number of digits of the serial number is determined.

[0439] Optionally, the second storage cluster has a token cache for caching tokens issued by the second storage cluster and tokens successfully authenticated by the authentication center after forwarding an access verification request to the authentication center;

[0440] The second storage cluster forwards the access verification request to the authentication center, including:

[0441] Comparing the first token contained in the access verification request with the token stored in the token cache, if it is consistent with a stored token, the verification is successful;

[0442] If the token is inconsistent with the token stored in the token cache, the access verification request is forwarded to the authentication center.

[0443] Optionally, the first token issuance request includes a first identifier of a first operation that requires access to the first storage cluster, wherein the first identifier and the first token are backed up in the authentication center correspondingly; the access verification request includes a second identifier of a second operation that requires access to the second storage cluster;

[0444] The authentication center successfully verifies based on the backup first token and the first token contained in the access verification request, including: if the backup first token is consistent with the first token contained in the access verification request, and the first identifier is consistent with the second identifier, the verification is successful.

[0445] Optionally, the first token has a hybrid verification deadline;

[0446] The authentication center successfully verifies based on the backup first token and the first token contained in the access verification request, including: if the backup first token is consistent with the first token contained in the access verification request, and the time when the authentication center receives the access verification request is no later than the hybrid verification deadline, the verification is successful.

[0447] Optionally, the first token has a first group identifier to which the first token belongs; the second storage cluster issues a second token, and the second token has a second group identifier to which the second token belongs;

[0448] The authentication center successfully verifies based on the backup first token and the first token contained in the access verification request, including: if the backup first token is consistent with the first token contained in the access verification request, and the first group identifier is consistent with the second group identifier, the verification is successful.

[0449] Optionally, the first token has a cross-cluster access flag;

[0450] The authentication center verifies successfully based on the backed-up first token and the first token contained in the access verification request, including: if the backed-up first token is consistent with the first token contained in the access verification request, and the cross-cluster access mark is set, the verification is successful.

[0451] Optionally, the multi-storage cluster access authentication device 1700 further includes:

[0452] A fourth determining unit (not shown), used to determine that the task to be executed is completed;

[0453] The token cancellation unit (not shown) sends a first token cancellation request to the first storage cluster so that the first storage cluster cancels the first token and notifies the authentication center to delete the backed-up first token.

[0454] According to one aspect of the embodiment of the present disclosure, Fig. 17B As shown, a multi-storage cluster access authentication device 1750 is provided, comprising:

[0455] The first receiving unit 1751 is used to receive a first token issued by the first storage cluster for a task to be executed for backup;

[0456] The second receiving unit 1752 is used to receive an access verification request forwarded by the second storage cluster, wherein the access verification request includes a first token, which is used for the client to access the second storage cluster with the first token in the task to be executed;

[0457] A verification unit 1753, configured to perform verification based on the backed-up first token and the first token in the access verification request;

[0458] The allowing unit 1754 is configured to allow the client to access the second storage cluster after the verification succeeds.

[0459] Reference Fig.18 , Fig.18 The structural block diagram of the client 100 for implementing the multi-storage cluster access authentication method of the embodiment of the present disclosure is as follows: the terminal includes: a radio frequency (RF) circuit 1810, a memory 1815, an input unit 1830, a display unit 1840, a sensor 1850, an audio circuit 1860, a wireless fidelity (WiFi) module 1870, a processor 1880, and a power supply 1890. Those skilled in the art can understand that Fig.18 The terminal structure shown in the figure does not constitute a limitation on the mobile phone or computer, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0460] The RF circuit 1810 may be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information from the base station, it is sent to the processor 1880 for processing; in addition, the designed uplink data is sent to the base station.

[0461] The memory 1815 may be used to store software programs and modules. The processor 1880 executes various functional applications and data processing of the terminal by running the software programs and modules stored in the memory 1815 .

[0462] The input unit 1830 may be used to receive input digital or character information and generate key signal input related to the terminal's settings and function control. Specifically, the input unit 1830 may include a touch panel 1831 and other input devices 1832 .

[0463] The display unit 1840 may be used to display input information or provided information and various menus of the terminal. The display unit 1840 may include a display panel 1841 .

[0464] The audio circuit 1860 , the speaker 1861 , and the microphone 1862 may provide an audio interface.

[0465] In this embodiment, the processor 1880 included in the terminal can execute the data integration method of the previous embodiment.

[0466] The terminals of the embodiments of the present disclosure include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, aircraft, etc. The embodiments of the present invention can be applied to various scenarios, including but not limited to cloud technology, big data, distributed storage, etc.

[0467] Reference Fig.19 , Fig.19 The structural block diagram of part of the server 200 for implementing the multi-storage cluster access authentication method of the embodiment of the present disclosure is shown. The server 200 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 1918 (for example, one or more processors) and memory 1932, and one or more storage media 1930 (for example, one or more mass storage devices) storing application programs 1942 or data 1944. Among them, the memory 1932 and the storage medium 1930 can be short-term storage or permanent storage. The program stored in the storage medium 1930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server 200. Furthermore, the central processing unit 1918 can be configured to communicate with the storage medium 1930 and execute a series of instruction operations in the storage medium 1930 on the server 200.

[0468] The server 200 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input and output interfaces 1958, and / or one or more operating systems 1941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0469] The processor in the server 200 can be used to execute the multi-storage cluster access authentication method of the embodiment of the present disclosure.

[0470] The embodiment of the present disclosure further provides a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the multi-storage cluster access authentication method of each of the aforementioned embodiments.

[0471] The embodiment of the present disclosure also provides a computer program product, which includes a computer program. A processor of a computer device reads and executes the computer program, so that the computer device implements the multi-storage cluster access authentication method.

[0472] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the embodiments of the present disclosure described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "comprises" and "comprising" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0473] It should be understood that in the embodiments of the present disclosure, "at least one (item)" refers to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can represent: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0474] It should be understood that in the description of the embodiments of the present disclosure, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood to not include the number, and above, below, within, etc. are understood to include the number.

[0475] In the several embodiments provided in the embodiments of the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0476] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0477] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0478] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of each embodiment method of the embodiment of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0479] It should also be understood that the various implementations provided in the embodiments of the present disclosure can be combined arbitrarily to achieve different technical effects.

[0480] The above is a specific description of the implementation methods of the embodiments of the present disclosure, but the embodiments of the present disclosure are not limited to the above implementation methods. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the embodiments of the present disclosure. These equivalent modifications or substitutions are all included in the scope defined by the claims of the embodiments of the present disclosure.

Claims

1. A multi-storage cluster access authentication method, It is characterized in that include: In response to obtaining the task to be executed, determining a first storage cluster that needs to be accessed by the task to be executed; Sending a first token issuance request to the first storage cluster so that the first storage cluster issues a first token, wherein the first token is used to access the first storage cluster and the first token is backed up to an authentication center after issuance; During the execution of the task to be executed, determining a second storage cluster that needs to be accessed by the task to be executed; Sending an access verification request to the second storage cluster, wherein the access verification request contains the first token, so that after the second storage cluster forwards the access verification request to the authentication center, the authentication center verifies successfully based on the backed-up first token and the first token contained in the access verification request; Access the second storage cluster.

2. The multi-storage cluster access authentication method according to claim 1, It is characterized in that In response to obtaining the task to be executed, determining the first storage cluster that the task to be executed needs to access includes: in response to obtaining the task to be executed, starting a master node, and determining, by the master node, the first storage cluster that the task to be executed needs to access; The determining, during the execution of the task to be executed, the second storage cluster that the task to be executed needs to access comprises: dividing the task to be executed into a plurality of subtasks through the master node, and sending the subtasks to a plurality of slave nodes corresponding to the subtasks for execution; and determining, during the execution of the subtasks corresponding to the slave nodes by the slave nodes, the second storage cluster that the subtasks need to access; The sending the access verification request to the second storage cluster includes: the slave node sending the access verification request to the second storage cluster.

3. The multi-storage cluster access authentication method according to claim 1, It is characterized in that The first token has a first expiration date; After sending the first token issuance request to the first storage cluster, the multi-storage cluster access authentication method further includes: Determining that the current time exceeds the first period; If the task to be executed has not been completed, a request is made to the first storage cluster to renew the first token to a second deadline.

4. The multi-storage cluster access authentication method according to claim 1, It is characterized in that The first token is backed up to the authentication center in the following manner: storing the first token backup request in a request queue, wherein the first token backup request contains the first token, the request queue contains a plurality of token operation requests, and the plurality of token operation requests contain the first token backup request; In response to a predetermined condition, the plurality of token operation requests stored in the request queue are packaged and sent to the authentication center so that the authentication center takes out the first token from the first token backup request and stores it in the database.

5. The multi-storage cluster access authentication method according to claim 4, It is characterized in that In response to a predetermined condition, the multiple token operation requests stored in the request queue are packaged and sent to the authentication center, comprising: Determining the number of token operation requests stored in the request queue; If the number of token operation requests reaches a first threshold, or the number of token operation requests does not reach the first threshold, but the difference between the current time and the time of the last package sending reaches a second threshold, the token operation requests stored in the request queue are packaged and sent to the authentication center.

6. The multi-storage cluster access authentication method according to claim 4, It is characterized in that The first token has a priority tag; In response to a predetermined condition, the multiple token operation requests stored in the request queue are packaged and sent to the authentication center, comprising: determining that the priority flag is set; The multiple token operation requests stored in the request queue are packaged and sent to the authentication center.

7. The multi-storage cluster access authentication method according to claim 4, It is characterized in that The sending an access verification request to the second storage cluster includes: Obtain the maximum value of the time difference between every two adjacent package sendings recorded in the request queue log as the first duration; An access verification request is sent to the second storage cluster at predetermined time intervals within the first duration.

8. The multi-storage cluster access authentication method according to claim 7, It is characterized in that The predetermined time interval is determined by: Get the variance of the time difference between every two adjacent package sendings recorded in the request queue log; Based on the variance, the predetermined time interval is determined.

9. The multi-storage cluster access authentication method according to claim 1, It is characterized in that The issuing of the first token comprises: generating a first token identifier, wherein the first token identifiers of different first tokens are different from each other; Generate a token body; Based on the first token identifier and the token body, generate the first token for issuance; The authentication center successfully authenticates based on the backed-up first token and the first token included in the access authentication request, including: Obtaining, from the backup first token, a target first token whose first token identifier is the same as an identifier of the first token included in the access verification request; If the token body of the target first token matches the token body of the first token contained in the access verification request, it is determined that the verification is successful.

10. The multi-storage cluster access authentication method according to claim 9, It is characterized in that The generating of the first token identification comprises: Obtaining a timestamp when the first token is issued; Obtaining an identifier of the first storage cluster; Obtaining a serial number of the first token generated at the same timestamp; The first token identifier is generated based on the timestamp, the identifier of the first storage cluster, and the sequence number.

11. The multi-storage cluster access authentication method according to claim 1, It is characterized in that The second storage cluster has a token cache for caching tokens issued by the second storage cluster and tokens successfully authenticated by the authentication center after forwarding the access verification request to the authentication center; The second storage cluster forwards the access verification request to the authentication center, including: Comparing the first token contained in the access verification request with the token stored in the token cache, if the token is consistent with one of the stored tokens, verification is successful; If it is inconsistent with the token stored in the token cache, the access verification request is forwarded to the authentication center.

12. The multi-storage cluster access authentication method according to claim 1, It is characterized in that The first token issuance request includes a first identifier of a first operation that requires access to the first storage cluster, wherein the first identifier and the first token are backed up in the authentication center in correspondence; the access verification request includes a second identifier of a second operation that requires access to the second storage cluster; The authentication center successfully verifies based on the backup first token and the first token contained in the access verification request, including: if the backup first token is consistent with the first token contained in the access verification request, and the first identifier is consistent with the second identifier, the verification is successful.

13. The multi-storage cluster access authentication method according to claim 1, It is characterized in that The first token has a hybrid verification deadline; The authentication center successfully verifies based on the backup first token and the first token contained in the access verification request, including: if the backup first token is consistent with the first token contained in the access verification request, and the time when the authentication center receives the access verification request is no later than the hybrid verification deadline, the verification is successful.

14. The multi-storage cluster access authentication method according to claim 1, It is characterized in that After accessing the second storage cluster, the multi-storage cluster access authentication method further includes: Determining that the task to be performed is completed; A first token cancellation request is sent to the first storage cluster so that the first storage cluster cancels the first token and notifies the authentication center to delete the backed-up first token.

15. A multi-storage cluster access authentication method, It is characterized in that include: Receiving a first token issued by the first storage cluster for a task to be executed for backup; receiving an access verification request forwarded by the second storage cluster, wherein the access verification request includes the first token, which is used by the client to access the second storage cluster with the first token in the task to be executed; Performing verification based on the backed-up first token and the first token in the access verification request; After successful verification, the client is allowed to access the second storage cluster.

16. A multi-storage cluster access authentication device, It is characterized in that include: A first determining unit, configured to determine, in response to obtaining a task to be executed, a first storage cluster that needs to be accessed by the task to be executed; A first sending unit, configured to send a first token issuance request to the first storage cluster, so that the first storage cluster issues a first token, wherein the first token is used to access the first storage cluster, and the first token is backed up to an authentication center after issuance; A second determining unit, configured to determine, during the execution of the task to be executed, a second storage cluster that needs to be accessed by the task to be executed; a second sending unit, configured to send an access verification request to the second storage cluster, wherein the access verification request contains the first token, so that after the second storage cluster forwards the access verification request to the authentication center, the authentication center verifies successfully based on the backed-up first token and the first token contained in the access verification request; An access unit, configured to access the second storage cluster.

17. A multi-storage cluster access authentication device, It is characterized in that include: A first receiving unit, configured to receive a first token issued by a first storage cluster for a task to be executed for backup; A second receiving unit, configured to receive an access verification request forwarded by a second storage cluster, wherein the access verification request includes the first token, and is used for the client to access the second storage cluster with the first token in the task to be executed; a verification unit, configured to perform verification based on the backed-up first token and the first token in the access verification request; The allowing unit is used to allow the client to access the second storage cluster after successful verification.

18. An electronic device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the multi-storage cluster access authentication method according to any one of claims 1 to 14 or the multi-storage cluster access authentication method according to claim 15 is implemented.

19. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the multi-storage cluster access authentication method according to any one of claims 1 to 14 or the multi-storage cluster access authentication method according to claim 15 is implemented.

20. A computer program product, comprising a computer program, wherein the computer program is read and executed by a processor of a computer device, so that the computer device executes the multi-storage cluster access authentication method according to any one of claims 1 to 14 or the multi-storage cluster access authentication method according to claim 15.