Transparent encryption key remote storage method, device and system and medium

By storing transparent encryption keys in a distributed database in a remote high-power metadatabase, and driving the database proxy node to perform encryption tasks by the cluster manager, the problem of key exposure risks and consistency in a distributed database is solved, and efficient transparent encryption function and data security guarantee.

CN119293841APending Publication Date: 2025-01-10JINZHUAN INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411335617.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The lack of remote storage technology for transparent encryption keys in distributed databases leads to high risk of key exposure and it is difficult to ensure data security and consistency.

Method used

Receive transparent encryption tasks through the operation and maintenance management platform, convert them into functional messages and send them to the metadata manager, generate and store them in the high-powered metadata database, and drive the database proxy node to perform encryption tasks, ensuring that the key is in the remote high-powered metadata database. In isolation storage, the data storage node caches encrypted information to achieve consistency.

Benefits of technology

It realizes the transparent encryption function of distributed databases and guarantees data security and consistency, avoids the risk of key exposure, and improves encryption efficiency and consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293841A_ABST
    Figure CN119293841A_ABST
Patent Text Reader

Abstract

The invention discloses a method for remotely storing a transparent encryption key in a distributed database, which comprises the following steps that: an operation and maintenance management platform receives a transparent encryption task, converts the transparent encryption task into a transparent encryption function message and sends the transparent encryption function message to a metadata manager; the metadata manager analyzes the transparent encryption function message and performs pre-inspection, then generates transparent encryption information according to the transparent encryption function message, and stores the transparent encryption information in a high-weight metadata database; the metadata manager sends the transparent encryption information to a cluster manager of the distributed data management node; the cluster manager communicates with all database agent nodes in the tenants and sends the transparent encryption information to the corresponding database agent nodes; the database agent node executes a transparent encryption task of the transparent encryption information, and caches the transparent encryption information in the database agent node and the data storage node; and the data storage node encrypts the data file according to the transparent encryption information in the cache, so that the encryption key is isolated from the data storage node, and the data security is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of database technology, and in particular to a method, device, system and medium for remote storage of transparent encryption keys in a distributed database. Background Art

[0002] The database can use transparent encryption to encrypt the database files, which ensures the security of the database files. Although transparent encryption can use different complex algorithms to encrypt files, there is a certain risk of data being deciphered after the key is exposed, thus causing data leakage. Therefore, the storage and management of transparent encryption keys in the database are crucial to ensure data security.

[0003] At present, most relational databases have the function of transparent encryption, while distributed databases lack related technologies. For relational databases, the generation and use of transparent encryption keys depend on the database itself or associated plug-ins, so that most keys are directly stored locally in the database. The key records the file path in the relevant configuration. If a hacker successfully invades the database server, obtains database data, logs, and configurations, and obtains the key file based on the configuration information, on the one hand, malicious tampering with the key file may cause database data anomalies, and on the other hand, copying the file to other servers can start and access the database, read the data content in the database, and achieve cracking, so there is a more obvious security risk.

[0004] In the context of the need to separate transparent encryption keys from database files, there are some studies in the industry, but they are only applicable to single database nodes. Distributed databases have high availability and high consistency requirements. In the scenario of multiple shards and multiple database storage nodes, data sub-libraries and sub-tables are stored in data storage nodes of different shards, so it is necessary to maintain the consistency of transparent encryption functions within the tenant to ensure the security of all data. Summary of the invention

[0005] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide a method, device, system and medium for remote storage of transparent encryption keys in a distributed database, so as to realize the transparent encryption function of the distributed database while ensuring the security and consistency of the data.

[0006] The technical solution of the present invention is as follows:

[0007] A method for remote storage of transparent encryption keys in a distributed database, comprising:

[0008] The operation and maintenance management platform receives the transparent encryption task and converts it into a transparent encryption function message and sends it to the metadata manager of the distributed data management node;

[0009] After the metadata manager parses the transparent encryption function message and performs pre-verification, it generates transparent encryption information according to the transparent encryption function message and stores it in the high-power metadata database;

[0010] The metadata manager sends the transparent encryption information to the cluster manager of the distributed data management node;

[0011] The cluster manager communicates with all database proxy nodes in the tenant and sends the transparent encryption information to the corresponding database proxy nodes;

[0012] The database proxy node executes the transparent encryption task of the transparent encryption information, and caches the transparent encryption information in the database proxy node and the data storage node;

[0013] The data storage node encrypts the data file according to the transparent encryption information in the cache.

[0014] In one embodiment, the method for remote storage of transparent encryption keys in a distributed database further includes:

[0015] When the data storage node restarts, the transparent encryption information is obtained from the cache of the database proxy node;

[0016] When the database proxy node restarts, it obtains transparent encryption information from the high-authority metadata database.

[0017] In one embodiment, the method for remote storage of transparent encryption keys in a distributed database further includes:

[0018] When the data storage node or the database proxy node is restarted, the database proxy node communicates with the data storage node and the metadata manager to obtain transparent encryption information from the data storage node and the high-power metadata database respectively;

[0019] If the transparent encryption information obtained from the cache of the data storage node is different from the transparent encryption information obtained from the high-power metadata database, an alarm message is reported to the operation and maintenance management platform.

[0020] In one embodiment, the step of receiving the transparent encryption task by the operation and maintenance management platform and converting it into a transparent encryption function message and sending it to the metadata manager of the distributed data management node includes:

[0021] The operation and maintenance management platform displays tenant-level transparent encryption function options, and assembles the selected transparent encryption function options and the corresponding tenant ID into a message; the transparent encryption function options are the transparent encryption tasks, including but not limited to enabling the transparent encryption function, updating the key, and disabling the transparent encryption function;

[0022] The operation and maintenance management platform sends the metadata to the metadata manager of the distributed data management node in the form of a message protocol.

[0023] In one embodiment, the transparent encryption information includes a transparent encryption function option and a transparent encryption key, and the transparent encryption key is stored in a high-authority metadata database.

[0024] In one embodiment, after the metadata manager parses the transparent encryption function message and performs pre-verification, the steps of generating transparent encryption information according to the transparent encryption function message and storing the information in the high-power metadata database include:

[0025] The metadata manager receives the transparent encryption function message from the operation and maintenance management platform, and parses the transparent encryption function message;

[0026] The metadata manager generates a transparent encryption information change task according to the transparent encryption function message and performs a pre-check;

[0027] After the pre-verification passes, the transparent encryption information is updated.

[0028] In one embodiment, the pre-verification includes:

[0029] The metadata manager obtains the transparent encryption information from the high-authority metadata database, converts it into a message and sends it to the cluster manager;

[0030] The cluster manager verifies whether a mutually exclusive task with the transparent encryption information change is currently being executed. If there is no mutually exclusive task, it verifies whether the transparent encryption information of the specified tenant in the current cache is consistent, and sends a pre-verification message to the database proxy node if the verification passes;

[0031] The database proxy node verifies whether the current data storage node status is normal. If the status is normal, then verify whether the database proxy node is executing a task that is mutually exclusive with the transparent encryption information change. If there is no mutually exclusive task, then verify whether the transparent encryption information in the cache of the database proxy node is consistent. If the verification is consistent, then verify whether it is consistent with the transparent encryption information stored in the data storage node.

[0032] When the verification is consistent, the database proxy node sends the verification success result to the cluster manager;

[0033] After receiving the verification result, the cluster manager sends a verification success response to the metadata manager;

[0034] After receiving the successful response sent by the cluster manager, the metadata manager generates new transparent encryption information.

[0035] A remote storage device for transparent encryption keys in a distributed database, comprising:

[0036] The operation and maintenance management platform is used to receive transparent encryption tasks and convert them into transparent encryption function messages and send them to the metadata manager of the distributed data management node;

[0037] A metadata manager, configured to generate transparent encryption information according to the transparent encryption function message, store the information in a high-power metadata database, and send the transparent encryption information to a cluster manager of a distributed data management node;

[0038] The cluster manager is used for communication among all database proxy nodes within the tenant, and sends the transparent encryption information to the corresponding database proxy node;

[0039] A database proxy node, used to execute the transparent encryption task of the transparent encryption information, and cache the transparent encryption information in the database proxy node and the data storage node;

[0040] The data storage node is used to encrypt data files according to the transparent encryption information in the cache.

[0041] A remote storage system for transparent encryption keys in a distributed database, the system comprising at least one processor; and

[0042] a memory communicatively connected to the at least one processor; wherein,

[0043] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for remote storage of transparent encryption keys in a distributed database.

[0044] A non-volatile computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the one or more processors can execute the above-mentioned method for remote storage of transparent encryption keys in a distributed database.

[0045] Beneficial effects: The present invention discloses a method, device, system and medium for remote storage of transparent encryption keys in a distributed database. Compared with the prior art, the present invention stores transparent encryption keys in a remote high-authority metadata database, which is isolated from the data storage node. The client cannot obtain key information, which greatly ensures data security. Moreover, distributed services obtain consistent transparent encryption information directly from the cache without the need to obtain it from the remote end, thereby improving the efficiency of transparent encryption. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:

[0047] Figure 1A flow chart of a method for remote storage of transparent encryption keys in a distributed database provided by an embodiment of the present invention;

[0048] Figure 2 A flow chart of step S100 in the method for remote storage of transparent encryption keys in a distributed database provided by an embodiment of the present invention;

[0049] Figure 3 A flow chart of step S200 in the method for remote storage of transparent encryption keys in a distributed database provided by an embodiment of the present invention;

[0050] Figure 4 A schematic diagram of an application embodiment of the method for remote storage of transparent encryption keys in a distributed database provided by an embodiment of the present invention;

[0051] Figure 5 A schematic diagram of functional modules of a remote storage device for transparent encryption keys in a distributed database provided by an embodiment of the present invention;

[0052] Figure 6 A schematic diagram of the hardware structure of a transparent encryption key remote storage system in a distributed database provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail below. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. The embodiments of the present invention are described below in conjunction with the accompanying drawings.

[0054] The method for remote storage of transparent encryption keys in a distributed database of the present invention can realize the distributed transparent encryption function and ensure the consistency of transparent encryption of the distributed database in all data storage nodes of the tenants. The transparent encryption keys are stored in a remote high-authority metadata database, which is isolated from the data storage nodes, and the business level (i.e., the client end) cannot obtain the key information, which greatly ensures data security.

[0055] The present invention implements secure transparent encryption of data files in the scenario of multiple database storage nodes in a distributed database, and ensures high availability and data consistency of the distributed database. Based on the separable characteristics of the distributed data management node and the data storage node, the present invention generates a transparent encryption key at a remote management node (i.e., a metadata manager) and stores it in a high-power metadata database, and the cluster manager drives the database proxy node to execute the activation, key update, and shutdown of transparent encryption, thereby implementing secure transparent encryption of the distributed database.

[0056] The method for remote storage of transparent encryption keys in a distributed database of the present invention mainly uses an operation and maintenance management platform, a distributed data management node (MDS), a cluster manager (CM), a database agent node (DBAgent) and a data storage node. Among them, the operation and maintenance management platform provides a human-computer interaction interface for administrators (or operation and maintenance personnel) to select transparent encryption function options (i.e., transparent encryption tasks); MDS is responsible for managing transparent encryption keys and transparent encryption tasks; CM is responsible for sending tasks to DBAgent; DBAgent executes encryption tasks on data storage nodes and caches transparent encryption information.

[0057] Figure 1 A flow chart of the method for remote storage of transparent encryption keys in a distributed database provided by the present invention. As shown in the figure, the method specifically includes the following steps:

[0058] S100: The operation and maintenance management platform receives the transparent encryption task, converts it into a transparent encryption function message and sends it to the metadata manager of the distributed data management node.

[0059] In this embodiment, the transparent encryption task is mainly a functional option of transparent encryption, which can be directly selected in the human-computer interaction interface (Insight) of the operation and maintenance management platform. It is isolated from the database business and is sent to the distributed data management node metadata manager (MDS) via a message protocol after being selected in Insight.

[0060] Among them, the function options of transparent encryption include turning on transparent encryption, updating keys, and turning off transparent encryption. These options are based on the granularity of database tenants. The transparent encryption functions between different tenants are isolated, that is, the clients of different tenants ensure the security and consistency of data.

[0061] Each tenant can have a single data storage node or a data storage node with a multi-shard master-slave relationship featuring distributed database characteristics. The transparent encryption function of all data storage nodes in the tenant is consistent.

[0062] The present invention selects the transparent encryption function option in Insight, isolates it from the database business, and does not affect the business execution of all database proxy nodes in the tenant. After selection through Insight, the selected transparent encryption function option and the corresponding tenant ID (such as the client ID, the client can communicate with the database proxy node) are assembled into a message, and then sent to the distributed data management node metadata manager MDS in the form of a message protocol.

[0063] S200: After parsing the transparent encryption function message and performing a pre-check, the metadata manager generates transparent encryption information according to the transparent encryption function message and stores the information in a high-authority metadata database.

[0064] The transparent encryption information includes transparent encryption function options and transparent encryption keys, and the transparent encryption keys are stored in a high-powered metadata database.

[0065] In one embodiment, the message is sent to the MDS via a message protocol (such as HTTP, TCP / IP, etc.), and the MDS receives and parses the message content to prepare for the next step of processing.

[0066] The MDS generates transparent encryption information according to the received message content, and the transparent encryption information includes a function option flag (keyring_flag) and key content (keyring_info).

[0067] If you choose to turn off the transparent encryption function in Insight, set keyring_flag to 0 and do not generate key content; if you choose to turn on or update the key function, set keyring_flag to 1, and generate key content keyring_info according to the encryption algorithm. The generated transparent encryption information is recorded in the high-powered metadata database, and the high-powered metadata database is isolated from the data storage node to ensure the security of the key. In addition, the distributed business directly obtains consistent transparent encryption information from the cache without having to obtain it from the remote end, thereby improving the efficiency of transparent encryption. The present invention does not cache transparent encryption information in MDS, but reads it from the metadata database when needed, so that the transparent encryption function between tenants is isolated, ensuring the security of the data.

[0068] Among them, the encryption algorithm can adopt aes256, national encryption and other encryption algorithms, and the algorithm can be adjusted or upgraded through the data storage node. After the transparent encryption function is turned on, the database proxy node can choose to encrypt the library table through the business. When the database proxy node executes the relevant transparent encryption library table business, the data storage node can encrypt the data file according to the transparent encryption key information in the cache with the set encryption algorithm.

[0069] S300: The metadata manager sends the transparent encryption information to the cluster manager of the distributed data management node.

[0070] When the metadata manager (MDS) receives a transparent encryption function message, it parses the message content, extracts the function options and tenant ID, generates a task based on the message, updates the transparent encryption information after pre-verification, and sends it to the cluster manager (CM).

[0071] S400: The cluster manager communicates with all database proxy nodes in the tenant and sends the transparent encryption information to the corresponding database proxy nodes.

[0072] The cluster manager can communicate with all database proxy nodes in the tenant. The cluster manager receives transparent encryption tasks from the metadata manager, parses the task content, determines the database proxy node that needs to perform transparent encryption, and then sends the transparent encryption task to the specified database proxy node. The cluster manager can connect to multiple database proxy nodes at the same time (that is, it can manage multiple tenants) and perform consistency checks with the database proxy nodes to ensure the consistency of the distributed storage transparent encryption information within the tenant.

[0073] S500: The database proxy node executes the transparent encryption task of the transparent encryption information, and caches the transparent encryption information in the database proxy node and the data storage node.

[0074] The database proxy node receives a transparent encryption task from a distributed data management node cluster manager, then parses the task content, obtains transparent encryption information, and caches the transparent encryption information locally and in a corresponding data storage node.

[0075] S600: The data storage node encrypts the data file according to the transparent encryption information in the cache.

[0076] In this embodiment, the database storage node encrypts the data file using an encryption algorithm based on the transparent encryption key information in the cache. In the distributed database multi-data storage node scenario, the transparent encryption key is remotely stored in tenants, and the transparent encryption functions of the storage nodes within the tenant are consistent, ensuring that there is no impact on the backup, recovery and high-availability switching of the distributed database.

[0077] In one embodiment, the method for remote storage of transparent encryption keys in a distributed database of the present invention also includes: when the data storage node is restarted, transparent encryption information is obtained from the cache of the database proxy node, and when the database proxy node is restarted, transparent encryption information is obtained from the high-authority metadata database to ensure that this node always has transparent encryption information that is consistent with the tenants.

[0078] In one embodiment, the method for remote storage of transparent encryption keys in a distributed database of the present invention further includes:

[0079] When the data storage node or the database proxy node is restarted, the database proxy node communicates with the data storage node and the metadata manager to obtain transparent encryption information from the data storage node and the high-power metadata database respectively;

[0080] If the transparent encryption information obtained from the cache of the data storage node is different from the transparent encryption information obtained from the high-authority metadata database, an alarm message is reported to the operation and maintenance management platform to inform the operation and maintenance personnel that manual intervention is required to check and repair the abnormal node to keep it consistent.

[0081] In addition, when MDS manages transparent encryption change tasks, if it finds that there is inconsistency in node transparent encryption information within the tenant, it will report it to Insight through errors or alarms to let the operation and maintenance personnel know that manual intervention is needed to maintain consistency.

[0082] The present invention backs up the transparent encryption key remotely while backing up the tenant data storage node. In the disaster recovery scenario, when the data storage node data is restored, the remotely backed-up transparent key is loaded into the memory through DBAgent for use, which does not affect the backup and recovery functions while ensuring the security of the backup data.

[0083] In one embodiment, see Figure 2 , the step S100 comprises:

[0084] S101. The operation and maintenance management platform displays tenant-level transparent encryption function options, and assembles the selected transparent encryption function options and the corresponding tenant ID into a message; the transparent encryption function options are the transparent encryption tasks, including but not limited to enabling the transparent encryption function, updating the key, and disabling the transparent encryption function;

[0085] S102: The operation and maintenance management platform sends the metadata to the metadata manager of the distributed data management node in the form of a message protocol.

[0086] In one embodiment, see Figure 3 , the step S200 comprises:

[0087] S201, the metadata manager receives a transparent encryption function message from the operation and maintenance management platform, and parses the transparent encryption function message;

[0088] S202, the metadata manager generates a transparent encryption information change task according to the transparent encryption function message, and performs a pre-verification;

[0089] S203: After the pre-verification is passed, the transparent encryption information is updated.

[0090] In one embodiment, the metadata manager manages transparent encryption change tasks. When the metadata manager receives transparent encryption information for the first time, it is a transparent encryption task. When the metadata manager receives the transparent encryption task from the operation and maintenance management platform again, it is called a transparent encryption change task because it needs to change the previous transparent encryption task (such as changing the original transparent encryption function from closed to open), and a task includes inspection and execution, two subtasks in succession, which include: verifying whether the transparent encryption information in the metadata database in the current tenant is consistent with the database agent node (DBAgent) cache, whether it is consistent with the data storage node cache, and verifying whether the status of the metadata manager, DBAgent and data storage node is normal, verifying whether the links of each node are normal, and verifying whether there are mutually exclusive tasks with the transparent encryption change, such as tenant backup and recovery, inconsistent transparent encryption information, abnormal node status, abnormal node link or the existence of mutually exclusive tasks, the transparent encryption change task cannot be executed.

[0091] When executing a transparent encryption change task, MDS generates new transparent encryption information according to the transparent encryption change task, updates the transparent encryption information in the metadata database, and then sends the transparent encryption information to each node. DBAgent updates the cache and sets the data storage node cache. If it fails, the change is rolled back to ensure that the transparent encryption information is consistent before and after the change.

[0092] In a specific embodiment, the pre-check includes:

[0093] The metadata manager obtains the transparent encryption information from the high-authority metadata database, converts it into a message and sends it to the cluster manager;

[0094] The cluster manager verifies whether a mutually exclusive task with the transparent encryption information change is currently being executed. If there is no mutually exclusive task, it verifies whether the transparent encryption information of the specified tenant in the current cache is consistent, and sends a pre-verification message to the database proxy node if the verification passes;

[0095] The database proxy node verifies whether the current data storage node status is normal. If the status is normal, then verify whether the database proxy node is executing a task that is mutually exclusive with the transparent encryption information change. If there is no mutually exclusive task, then verify whether the transparent encryption information in the cache of the database proxy node is consistent. If the verification is consistent, then verify whether it is consistent with the transparent encryption information stored in the data storage node.

[0096] When the verification is consistent, the database proxy node sends the verification success result to the cluster manager;

[0097] After receiving the verification result, the cluster manager sends a verification success response to the metadata manager;

[0098] After receiving the successful response sent by the cluster manager, the metadata manager generates new transparent encryption information.

[0099] In the method for remote storage of transparent encryption keys in a distributed database of the present invention, "mutually exclusive task change" generally refers to tasks that may conflict or depend on other tasks when executing transparent encryption information changes, and thus cannot be performed simultaneously. For example, in the process of executing transparent encryption changes, if a database backup or recovery operation is performed at the same time, it may affect the correctness of the encryption change or cause inconsistency in the backup data. Therefore, the system needs to detect and ensure that when executing the transparent encryption change task, no other mutually exclusive tasks are in progress to ensure data security and consistency.

[0100] The present invention realizes the transparent encryption function of distributed database and remote storage of keys, solves the data security problems and transparent encryption consistency problems after the transparent encryption of database is enabled in a multi-shard and multi-data storage node environment, and can be applied to transparent encryption scenarios in various distributed databases, thereby improving the data security and consistency of the distributed database.

[0101] See also Figure 4 In order to better understand the technical solution of the present invention, the following pre-verification and change of transparent encryption information are taken as an example to describe in detail the remote storage method of transparent encryption keys in a distributed database of the present invention:

[0102] Step 1: Select the encryption option through the human-computer interaction interface (Insight) of the operation and maintenance management platform, assemble the encryption option and the corresponding tenant ID into a message, and then send it to MDS in the form of a message protocol.

[0103] Among them, the operation and maintenance management platform has tenant-level transparent encryption function options including encryption function options such as turning on, updating keys and turning off.

[0104] Step 2: MDS receives the transparent encryption function message, parses the message content, generates a transparent encryption task based on the message, initiates a pre-verification, and updates the transparent encryption information after the pre-verification passes.

[0105] The pre-verification process includes:

[0106] 1) MDS obtains the transparent encryption information in the metadata database of the current designated tenant, and then assembles it into a message and sends it to CM.

[0107] 2) CM verifies whether it is currently executing a task that is mutually exclusive with the transparent encryption information change. If there is no mutually exclusive task, it verifies the transparent encryption information of the specified tenant in the current cache. If the verification is consistent, it sends a pre-verification message to the DBAgent corresponding to all the data storage nodes managed in the tenant.

[0108] 3) DBAgent verifies whether the data storage node status of the current agent is normal. If the status is normal, verify whether it is executing a task that is mutually exclusive with the transparent encryption information change. If there is no mutually exclusive task, verify whether the transparent encryption information in the current cache is consistent. After verifying that it is consistent, verify whether the transparent encryption information in the data storage node cache of the agent is consistent.

[0109] 4) DBAgent pre-checks the data storage node of the current agent successfully and returns a success response to CM.

[0110] 5) After receiving all the successful responses from the DBAgents, the CM returns a successful response to the MDS.

[0111] 6) After receiving the successful response from CM, MDS executes the next action, which is the new transparent encryption information.

[0112] Step 3: MDS generates new transparent encryption information. When the transparent encryption function option is to turn off transparent encryption, set keyring_flag = 0 and do not set keyring_info. When the transparent encryption function option is to turn on or update the key, set keyring_flag = 1, and generate key content keyring_info according to a specific algorithm. The generated transparent encryption information is recorded in the high-power metadata database.

[0113] Step 4: MDS initiates a transparent encryption information change. After generating new transparent encryption information, it is necessary to update the transparent encryption information of each node to maintain the consistency of the transparent encryption information of each node, which includes:

[0114] 1) MDS uses the newly generated transparent encryption information of the specified tenant to assemble a message and send it to CM.

[0115] 2) CM checks whether it is currently executing a task that is mutually exclusive with the transparent encryption information change. If there is no mutually exclusive task, it updates the transparent encryption information of the specified tenant in the cache, and then sends the transparent encryption information change to the DBAgent corresponding to all data storage nodes managed in the tenant.

[0116] 3) DBAgent verifies whether the data storage node status of the current agent is normal. If the status is normal, it verifies whether it is executing a task that is mutually exclusive with the transparent encryption information change. If there is no mutually exclusive task, it updates the transparent encryption information in the cache, then connects to the agent's data storage node, and executes the action of updating the data storage node cache.

[0117] 4) After DBAgent updates the cache successfully and executes the action of updating the data storage node cache successfully, it returns a change success response to CM.

[0118] 5) After receiving all DBAgent change success responses, CM returns a change success response to MDS.

[0119] 6) After receiving the CM change success response, MDS returns a success response message to Insight.

[0120] After the above actions, the transparent encryption function of each node in the tenant is consistent. If the transparent encryption function is turned on, the database business client can transparently encrypt the database table according to the business.

[0121] During the operation of the database tenant, if the data storage node is restarted, the transparent encryption information is obtained from the DBAgent cache and cached in the corresponding data storage node. If the DBAgent is restarted, it is obtained from the management node, ensuring that this node always has consistent transparent encryption information for tenants.

[0122] The consistency of the above transparent encryption function does not mean that the transparent encryption keys of all data storage nodes are the same, but the consistency of the function switch. That is, if the tenant enables transparent encryption, all storage nodes are enabled, but the keys of each node can be different and are uniformly coordinated and managed through the management node.

[0123] Another embodiment of the present invention provides a remote storage device for transparent encryption keys in a distributed database, such as Figure 5 As shown, the device 1 comprises:

[0124] The operation and maintenance management platform 11 is used to receive the transparent encryption task and convert it into a transparent encryption function message and send it to the metadata manager of the distributed data management node;

[0125] The metadata manager 12 is used to generate transparent encryption information according to the transparent encryption function message, store it in the high-power metadata database, and send the transparent encryption information to the cluster manager of the distributed data management node;

[0126] The cluster manager 13 is used for communication among all database proxy nodes in the tenant, and sends the transparent encryption information to the corresponding database proxy node;

[0127] A database proxy node 14, used to execute the transparent encryption task of the transparent encryption information, and cache the transparent encryption information in the database proxy node and the data storage node;

[0128] The data storage node 15 is used to encrypt the data file according to the transparent encryption information in the cache.

[0129] The module referred to in the present invention refers to a series of computer program instruction segments that can perform specific functions, which is more suitable for describing the execution process of remote storage of transparent encryption keys in a distributed database than a program. For the specific implementation methods of each module, please refer to the corresponding method embodiments above, which will not be repeated here.

[0130] Another embodiment of the present invention provides a remote storage system for transparent encryption keys in a distributed database. Figure 6 As shown, the system 10 includes:

[0131] One or more processors 110 and memory 120, Figure 6 A processor 110 is used as an example for description. The processor 110 and the memory 120 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.

[0132] The processor 110 is used to complete various control logics of the system 10, and it can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components. In addition, the processor 110 can also be any traditional processor, microprocessor or state machine. The processor 110 can also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP and / or any other such configuration.

[0133] The memory 120, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions corresponding to the method for remote storage of transparent encryption keys in a distributed database in an embodiment of the present invention. The processor 110 executes various functional applications and data processing of the system 10 by running the non-volatile software programs, instructions and units stored in the memory 120, that is, the method for remote storage of transparent encryption keys in a distributed database in the above method embodiment is implemented.

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

[0135] One or more units are stored in the memory 120, and when executed by one or more processors 110, the following steps are implemented:

[0136] The operation and maintenance management platform receives the transparent encryption task and converts it into a transparent encryption function message and sends it to the metadata manager of the distributed data management node;

[0137] After the metadata manager parses the transparent encryption function message and performs pre-verification, it generates transparent encryption information according to the transparent encryption function message and stores it in the high-power metadata database;

[0138] The metadata manager sends the transparent encryption information to the cluster manager of the distributed data management node;

[0139] The cluster manager communicates with all database proxy nodes in the tenant and sends the transparent encryption information to the corresponding database proxy nodes;

[0140] The database proxy node performs the transparent encryption task of the transparent encryption information and caches the transparent encryption information in the database proxy node and the data storage node.

[0141] The data storage node encrypts the data file according to the transparent encryption information in the cache.

[0142] An embodiment of the present invention provides a non-volatile computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, for example, to execute the above-described Figure 1 The method comprises steps S100 to S600.

[0143] As an example, non-volatile storage media can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) as external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM, (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The disclosed memory components or memories of the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.

[0144] In summary, compared with the prior art, the method, device, system and medium for remote storage of transparent encryption keys in a distributed database of the present invention have beneficial effects mainly in the following four aspects:

[0145] 1. Transparent encryption is more secure. The transparent encryption key is stored in a remote high-authority metadata database, which is isolated from the data storage node, and the business layer cannot obtain the key information, which greatly ensures data security.

[0146] 2. The transparent encryption function is consistent for all tenants. In the scenario of distributed database with multiple data storage nodes, the transparent encryption key is stored remotely in tenants, and the transparent encryption function of the storage nodes within the tenant is consistent, ensuring that there is no impact on the backup, recovery and high availability switching of the distributed database.

[0147] 3. This technical solution has strong scalability. The management node can set keys at the sharding granularity or storage node granularity, increasing the complexity of data transparent encryption, thereby improving the security of distributed data.

[0148] 4. Wide applicability. The solution of the present invention provides a remote key management method for transparent encryption function of a distributed database, which can be applied to various key management scenarios in a distributed database and has universal applicability.

[0149] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A method for remote storage of transparent encryption keys in a distributed database, characterized in that: include: The operation and maintenance management platform receives the transparent encryption task and converts it into a transparent encryption function message and sends it to the metadata manager of the distributed data management node; After the metadata manager parses the transparent encryption function message and performs pre-verification, it generates transparent encryption information according to the transparent encryption function message and stores it in the high-power metadata database; The metadata manager sends the transparent encryption information to the cluster manager of the distributed data management node; The cluster manager communicates with all database proxy nodes in the tenant and sends the transparent encryption information to the corresponding database proxy nodes; The database proxy node executes the transparent encryption task of the transparent encryption information, and caches the transparent encryption information in the database proxy node and the data storage node; The data storage node encrypts the data file according to the transparent encryption information in the cache.

2. The method for remote storage of transparent encryption keys in a distributed database according to claim 1, characterized in that: Also includes: When the data storage node restarts, the transparent encryption information is obtained from the cache of the database proxy node; When the database proxy node restarts, it obtains transparent encryption information from the high-authority metadata database.

3. The method for remote storage of transparent encryption keys in a distributed database according to claim 2, characterized in that: Also includes: When the data storage node or the database proxy node is restarted, the database proxy node communicates with the data storage node and the metadata manager to obtain transparent encryption information from the data storage node and the high-power metadata database respectively; If the transparent encryption information obtained from the cache of the data storage node is different from the transparent encryption information obtained from the high-power metadata database, an alarm message is reported to the operation and maintenance management platform.

4. The method for remote storage of transparent encryption keys in a distributed database according to claim 1, characterized in that: The step of receiving the transparent encryption task by the operation and maintenance management platform and converting it into a transparent encryption function message and sending it to the metadata manager of the distributed data management node includes: The operation and maintenance management platform displays tenant-level transparent encryption function options, and assembles the selected transparent encryption function options and the corresponding tenant ID into a message; the transparent encryption function options are the transparent encryption tasks, including but not limited to enabling the transparent encryption function, updating the key, and disabling the transparent encryption function; The operation and maintenance management platform sends the metadata to the metadata manager of the distributed data management node in the form of a message protocol.

5. The method for remote storage of transparent encryption keys in a distributed database according to claim 4, characterized in that: The transparent encryption information includes a transparent encryption function option and a transparent encryption key, and the transparent encryption key is stored in a high-authority metadata database.

6. The method for remote storage of transparent encryption keys in a distributed database according to claim 4, characterized in that: After the metadata manager parses the transparent encryption function message and performs pre-verification, the step of generating transparent encryption information according to the transparent encryption function message and storing the information in the high-power metadata database includes: The metadata manager receives the transparent encryption function message from the operation and maintenance management platform, and parses the transparent encryption function message; The metadata manager generates a transparent encryption information change task according to the transparent encryption function message and performs a pre-check; After the pre-verification passes, the transparent encryption information is updated.

7. The method for remote storage of transparent encryption keys in a distributed database according to claim 6, characterized in that: The pre-verification includes: The metadata manager obtains the transparent encryption information from the high-authority metadata database, converts it into a message and sends it to the cluster manager; The cluster manager verifies whether a mutually exclusive task with the transparent encryption information change is currently being executed. If there is no mutually exclusive task, it verifies whether the transparent encryption information of the specified tenant in the current cache is consistent, and sends a pre-verification message to the database proxy node if the verification passes; The database proxy node verifies whether the current data storage node status is normal. If the status is normal, then verify whether the database proxy node is executing a task that is mutually exclusive with the transparent encryption information change. If there is no mutually exclusive task, then verify whether the transparent encryption information in the cache of the database proxy node is consistent. If the verification is consistent, then verify whether it is consistent with the transparent encryption information stored in the data storage node. When the verification is consistent, the database proxy node sends the verification success result to the cluster manager; After receiving the verification result, the cluster manager sends a verification success response to the metadata manager; After receiving the successful response sent by the cluster manager, the metadata manager generates new transparent encryption information.

8. A device for remote storage of transparent encryption keys in a distributed database, characterized in that: include: The operation and maintenance management platform is used to receive transparent encryption tasks and convert them into transparent encryption function messages and send them to the metadata manager of the distributed data management node; A metadata manager, configured to generate transparent encryption information according to the transparent encryption function message, store the information in a high-power metadata database, and send the transparent encryption information to a cluster manager of a distributed data management node; The cluster manager is used for communication among all database proxy nodes within the tenant, and sends the transparent encryption information to the corresponding database proxy node; A database proxy node, used to execute the transparent encryption task of the transparent encryption information, and cache the transparent encryption information in the database proxy node and the data storage node; The data storage node is used to encrypt data files according to the transparent encryption information in the cache.

9. A remote storage system for transparent encryption keys in a distributed database, characterized in that: The system includes at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for remote storage of transparent encryption keys in a distributed database as described in any one of claims 1-7.

10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions, which, when executed by one or more processors, enable the one or more processors to execute the method for remote storage of transparent encryption keys in a distributed database as described in any one of claims 1-7.