Database object processing method, system, device, and medium

CN122086998BActive Publication Date: 2026-09-25TIANJIN NANKAI UNIV GENERAL DATA TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610534574.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-04-22
Publication Date
2026-09-25
Estimated Expiration
2046-04-22

AI Technical Summary

Technical Problem

[0003]本申请提供了一种数据库对象处理方法、系统、设备及介质,用以解决多种元数据服务并存场景下,数据交互易因不同元数据服务的数据库对象的唯一标识键不统一而产生混乱的问题

Benefits of technology

本申请通过构建统一的映射机制、识别机制及逆映射机制,保证了数据交互时数据库对象在不同元数据服务中的标识键的语义和结构相同,有效解决了多种元数据服务并存场景下,数据交互易因不同元数据服务的数据库对象的唯一标识键不统一而产生混乱的问题,同时使数据库集群能够在无需修改元数据管理模块的前提下,兼容多种元数据服务,显著提升了数据库集群的扩展性与工程实施效率,便于快速接入新类型的元数据服务。而且,通过引入固定格式识别与数字指纹校验机制,构建了高效可靠的双向映射体系,有效降低了映射结果与自然字符串之间的误匹配风险,确保了数据库对象的映射标识键在映射与逆映射过程中的一致性和准确性,从而增强了数据库集群内部通信的稳定性和鲁棒性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122086998B_ABST
    Figure CN122086998B_ABST
Patent Text Reader

Abstract

The application discloses a database object processing method, system, device and medium, and is applied to the technical field of databases. In the mapping stage, each hierarchical identifier after removing the hierarchical separator in the original identification key is connected into a hierarchical identifier string and a first digital fingerprint is generated; and a mapping identification key is generated based on a target starting character, a target digital fingerprint algorithm identifier, the first digital fingerprint, a target hierarchical identifier length and the hierarchical identifier string. In the reverse mapping stage, after determining that the mapping identification key starts with the target starting character, each hierarchical identifier is obtained by splitting the hierarchical identifier string based on the target hierarchical identifier length and a second digital fingerprint is generated; and when it is determined that the second digital fingerprint matches the first digital fingerprint, each hierarchical identifier is restored to the original identification key by using the hierarchical separator. By constructing a unified bidirectional mapping mechanism, the database cluster can be compatible with different metadata services, and the system scalability is significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of database technology, and in particular to a database object processing method, system, device and medium. Background Technology

[0002] In database clusters, especially multi-source heterogeneous database clusters that support multiple metadata services (such as Hive Metastore, AWS Glue DataCatalog, or different versions of their own metadata services), different metadata services organize database objects (such as tables and views) in different hierarchical ways, resulting in different semantics and structures of the identifier keys for database objects in different metadata services. In scenarios where multiple metadata services coexist, data interaction is prone to confusion due to the inconsistent identifier keys of database objects in different metadata services, severely restricting the scalability of the database cluster and making the cost of accessing new metadata services high. Summary of the Invention

[0003] This application provides a database object processing method, system, device, and medium to solve the problem of data interaction confusion caused by inconsistent unique identifier keys of database objects from different metadata services in scenarios where multiple metadata services coexist. The technical solution provided by this application is as follows: Firstly, this application provides a database object processing method, including: Retrieve the raw identifier key of the database object; where the raw identifier key contains hierarchical identifiers of different levels connected by hierarchical separators; Concatenate the level identifiers of each level in the original identifier key after removing the level separators into a level identifier string; The first digital fingerprint of the hierarchical identifier string is generated using the target digital fingerprint algorithm. Obtain the target start character, the target level identifier length, and the target digital fingerprint algorithm identifier; Based on the target start character, the target digital fingerprint algorithm identifier, the first digital fingerprint, the target level identifier length, and the level identifier string, generate the mapping identifier key for the database object.

[0004] Optionally, a target digital fingerprint algorithm is used to generate the first digital fingerprint of the hierarchical identifier string, including: If the randomness of the original identifier key is lower than the first threshold, the target digital fingerprint algorithm is determined to be a first-class digital fingerprint algorithm; the first-class digital fingerprint algorithm is used to generate the first digital fingerprint of the hierarchical identifier string; If the randomness of the original identifier key is higher than the second threshold, the target digital fingerprint algorithm is determined to be a second-type digital fingerprint algorithm; the second-type digital fingerprint algorithm is used to generate the first digital fingerprint of the hierarchical identifier string; wherein, the collision resistance of the second-type digital fingerprint algorithm is stronger than that of the first-type digital fingerprint algorithm.

[0005] Optionally, the target start character, target level identifier length, and target digital fingerprint algorithm identifier are obtained, including: Determine the target starting character based on a fixed starting character; Determine the target level identifier length based on the length of the level identifier at least one level; Based on the target digital fingerprint algorithm, determine the target digital fingerprint algorithm identifier.

[0006] Optionally, based on the target start character, the target digital fingerprint algorithm identifier, the first digital fingerprint, the target level identifier length, and the level identifier string, a mapping identifier key for the database object is generated, including: The target start character, target digital fingerprint algorithm identifier, first digital fingerprint, target level identifier length, and level identifier string are concatenated sequentially to generate the mapping identifier key for the database object.

[0007] Optionally, when the original identifier key contains hierarchical identifiers of multiple levels, a recursive approach is used to generate the mapping identifier key for the database object; wherein, in each recursion, the mapping identifier key generated in the previous recursion is connected and mapped with the hierarchical identifier to be mapped in the current recursion.

[0008] Secondly, this application provides a database object processing method, including: Obtain the mapping identifier key of the database object; wherein the mapping identifier key is generated using the database object processing method provided in the first aspect above; After determining that the mapping identifier key starts with the target start character, the target digital fingerprint algorithm identifier, the first digital fingerprint, the target level identifier length, and the level identifier string are parsed from the mapping identifier key; Based on the target level identifier length, the level identifier string is split to obtain the level identifiers of each level, and then the validity of each level identifier is verified. After the legality verification of the hierarchical identifiers at each level is passed, the target digital fingerprint algorithm corresponding to the target digital fingerprint identifier is used to generate the second digital fingerprint of the hierarchical identifier string. When it is determined that the second digital fingerprint matches the first digital fingerprint, the mapping identifier key is determined to be a valid mapping identifier key for the database object.

[0009] Thirdly, this application provides a database object processing method, including: Obtain the mapping identifier key of the database object; wherein, the mapping identifier key is a valid mapping identifier key that has passed the verification using the database object processing method provided in the second aspect above; Based on the length of the target level identifier in the mapping identifier key, the level identifier string in the mapping identifier key is split to obtain the level identifier of each level; By using the same level separator as the original identifier key in the database object, the level identifiers of each level are restored to the original identifier key.

[0010] Fourthly, this application provides a database object processing system, including: The mapping service node is used to receive database object access requests initiated by the business request node; after generating the mapping identifier key of the database object in the database object access request using the database object processing method provided in the first aspect above, the mapping identifier key is sent. The communication service node is used to intercept the mapping identifier key of the database object sent by the mapping service node; to verify the mapping identifier key using the database object processing method provided in the second aspect above; and to send the mapping identifier key after determining that it is a valid mapping identifier key. The reverse mapping service node is used to receive the mapping identifier key of the database object sent by the communication service node; after restoring the mapping identifier key to the original identifier key using the database object processing method provided in the third aspect above, the original identifier key is sent. The metadata service node is used to receive the original identifier key of the database object sent by the reverse mapping service node; obtain the database object access result based on the original identifier key; and return the database object access result to the business request node.

[0011] Fifthly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described database object processing method.

[0012] Sixthly, this application also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the aforementioned database object processing method.

[0013] The beneficial effects of this application are as follows: This application constructs a unified mapping, identification, and reverse mapping mechanism to ensure that the semantics and structure of the identifier keys of database objects in different metadata services are identical during data interaction. This effectively solves the problem of data interaction confusion caused by inconsistent unique identifier keys of database objects in different metadata services when multiple metadata services coexist. Simultaneously, it enables the database cluster to be compatible with multiple metadata services without modifying the metadata management module, significantly improving the scalability and engineering implementation efficiency of the database cluster and facilitating the rapid integration of new types of metadata services. Furthermore, by introducing a fixed-format recognition and digital fingerprint verification mechanism, a highly efficient and reliable bidirectional mapping system is constructed, effectively reducing the risk of mismatches between mapping results and natural strings. This ensures the consistency and accuracy of the mapping identifier keys of database objects during the mapping and reverse mapping processes, thereby enhancing the stability and robustness of internal communication within the database cluster.

[0014] Other features and advantages of this application will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0015] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic diagram outlining the database object processing method applied to the mapping service node in this embodiment of the application. Figure 2 This is a schematic diagram outlining the database object processing method applied to a communication service node in an embodiment of this application. Figure 3 This is a schematic diagram outlining the database object processing method applied to the reverse mapping service node in this embodiment of the application. Figure 4 This is a schematic diagram of the composition structure of the database object processing system in the embodiments of this application; Figure 5 This is a schematic diagram of the hardware structure of the electronic device in the embodiments of this application. Detailed Implementation

[0016] To make the objectives, technical solutions, and beneficial effects of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0017] Currently, in multi-source heterogeneous database clusters, the metadata management module within the database typically relies on the identifier key (Key) of the database object to identify it. Since different metadata services use different identifier key structures, directly modifying the metadata management module to adapt to different hierarchical structures will lead to the following problems: (1) The metadata management module has a lengthy and complex structure, making it difficult to maintain; (2) When multiple metadata services are running simultaneously within a database cluster, data interaction between different services can easily become chaotic; (3) The system has poor scalability and is difficult to support new metadata services.

[0018] To address the aforementioned issues, this application maps the original identifier key of a database object to a uniformly formatted mapped identifier key. When accessing metadata services is required, the mapped identifier key is reverse-mapped back to the original identifier key. By constructing a unified bidirectional mapping mechanism, the semantics and structure of the identifier key of a database object remain consistent across different metadata services during data interaction. This effectively solves the problem of data interaction becoming chaotic due to inconsistent unique identifier keys of database objects across different metadata services in scenarios with multiple metadata services coexisting. Furthermore, it enables the database cluster to be compatible with multiple metadata services without modifying the metadata management module, significantly improving the scalability and engineering implementation efficiency of the database cluster and facilitating the rapid integration of new types of metadata services.

[0019] After introducing the application scenarios and design concepts of this application, the technical solutions provided by this application will be described in detail below.

[0020] Example 1 This application provides a database object processing method applied to a mapping service node, see below. Figure 1 As shown, the general flow of the database object processing method provided in this application embodiment is as follows: Step 101: Obtain the original identifier key of the database object; wherein the original identifier key contains the hierarchical identifiers of different levels connected by hierarchical separators.

[0021] In this embodiment of the application, the business request node initiates a database object access request to the mapping service node (such as querying the db.ns.table table in the Hive database). The mapping service node extracts the original identifier key of the database object (such as db.ns.table) from the database object access request. The original identifier key contains hierarchical identifiers of different levels connected by hierarchical separators (such as "."), such as hierarchical identifiers containing 3 levels: db (database layer), ns (namespace layer), and table (table layer).

[0022] Step 102: Concatenate the level identifiers of each level in the original identifier key after removing the level separators into a level identifier string.

[0023] In this embodiment of the application, after removing all level separators (such as ".") from the original identifier key, the mapping service node concatenates the level identifiers of each level in sequence to obtain a level identifier string (such as dbnstable).

[0024] Step 103: Use the target digital fingerprint algorithm to generate the first digital fingerprint of the hierarchical identifier string.

[0025] In this embodiment of the application, when the mapping service node uses the target digital fingerprint algorithm to generate the first digital fingerprint of the hierarchical identifier string, it may use, but is not limited to, the following methods: First, the randomness of the original identifier key is determined based on the distribution characteristics of symbols, letters, and numbers in the original identifier key. Specifically, the Shannon entropy value is calculated based on the character frequency of different characters in the original identifier key; the digit density is calculated based on the number of digit characters in the original identifier key; the continuity of special symbols is determined based on the number of consecutive occurrences of special symbols; and the dictionary matching decay rate is calculated based on the total length of the canonical characters in the canonical dictionary contained in the original identifier key. The randomness of the original identifier key is obtained by weighting the Shannon entropy value, digit density, special symbol continuity, and dictionary matching decay rate. Here, the canonical dictionary is a pre-established canonical character library, such as table, view, etc.; the weight coefficients of the Shannon entropy value, digit density, special symbol continuity, and dictionary matching decay rate can be pre-set fixed values, such as 0.4, 0.3, 0.2, 0.1, etc.

[0026] The formula for calculating Shannon's entropy is: ;in, This is the Shannon entropy value; It is the set of all characters in the original identifier key (including letters, numbers, and special symbols). For characters Frequency of occurrence in the original identifier key The higher the Shannon entropy value, the higher the degree of randomness.

[0027] The formula for calculating number density is: ;in, For digital density; The number of numeric characters (0-9) in the original identifier key; The total number of characters in the original identifier key (including all character types); the higher the number density, the higher the degree of randomness.

[0028] The formula for calculating the continuity of special symbols is: ;in, For special symbol continuity, This is the number of consecutive special symbols. Consecutive special symbols are non-alphanumeric special symbols with a length of ≥2 (such as __, #, #, etc.). For example, in a##b!c, ## is counted once, and ! is not counted. This represents the total number of occurrences of all consecutive special symbols; the higher the continuity of special symbols, the higher the degree of randomness.

[0029] The formula for calculating the dictionary matching attenuation rate is: ;in, Match the decay rate to the dictionary; The first one contained in the original identifier key The length of a standard character; The number of canonical characters contained in the original identifier key; The total length of all canonical characters contained in the original identifier key; The total length of the original identifier key; the higher the dictionary matching decay rate, the higher the degree of randomness.

[0030] Then, the target digital fingerprint algorithm is determined based on the degree of randomness of the original identifier key.

[0031] In one embodiment, if the randomness of the original identifier key is lower than a first threshold, the target digital fingerprint algorithm is determined to be a first-type digital fingerprint algorithm; the first-type digital fingerprint algorithm is used to generate a first digital fingerprint of the hierarchical identifier string; if the randomness of the original identifier key is higher than a second threshold, the target digital fingerprint algorithm is determined to be a second-type digital fingerprint algorithm; the second-type digital fingerprint algorithm is used to generate a first digital fingerprint of the hierarchical identifier string. The second-type digital fingerprint algorithm has stronger collision resistance than the first-type digital fingerprint algorithm. For example, the first-type digital fingerprint algorithm is a simple hash algorithm, and the second-type digital fingerprint algorithm is a cryptographic hash algorithm.

[0032] In another embodiment, if the randomness of the original identifier key is below a first threshold, the target digital fingerprint algorithm is determined to be a first-type digital fingerprint algorithm, and a first digital fingerprint of the hierarchical identifier string is generated using the first-type digital fingerprint algorithm. If the randomness of the original identifier key is between the first and second thresholds, the target digital fingerprint algorithm is determined to be a second-type digital fingerprint algorithm, and a first digital fingerprint of the hierarchical identifier string is generated using the second-type digital fingerprint algorithm. If the randomness of the original identifier key is above the second threshold, the target digital fingerprint algorithm is determined to be a third-type digital fingerprint algorithm, and a first digital fingerprint of the hierarchical identifier string is generated using the third-type digital fingerprint algorithm. The third-type digital fingerprint algorithm has stronger collision resistance than the second-type digital fingerprint algorithm, which in turn has stronger collision resistance than the first-type digital fingerprint algorithm. For example, the first-type digital fingerprint algorithm is a simple hash algorithm, the second-type digital fingerprint algorithm is a salted simple hash algorithm, and the third-type digital fingerprint algorithm is a cryptographic hash algorithm.

[0033] In this way, the digital fingerprint algorithm is dynamically selected based on the randomness of the original identifier key, which balances the efficiency of mapping calculation while ensuring low collision risk and adapts to the database object identifier key processing needs with different naming characteristics.

[0034] Step 104: Obtain the target start character, target level identifier length, and target digital fingerprint algorithm identifier.

[0035] In this embodiment of the application, when the mapping service node obtains the target start character, the target level identifier length, and the target digital fingerprint algorithm identifier, it may use, but is not limited to, the following methods: The target starting character is determined based on a fixed starting character. Specifically, in one embodiment, the mapping service node can read a preset fixed starting character (such as Z) directly as the target starting character. The preset fixed starting character is a unique starting character for the mapping identifier key that is uniformly agreed upon within the database cluster, distinguishing it from natural strings. The fixed starting character can be configured as Z (which can be modified by operations and maintenance personnel in the configuration center, such as changing it to R). In another embodiment, the mapping service node can also read the preset fixed starting character (such as Z) and the current version identifier (such as v1), and combine the fixed starting character (such as Z) and the current version identifier (such as v1) to generate the target starting character (such as Zv1) to support the iterative upgrade of the bidirectional mapping algorithm.

[0036] The target level identifier length is determined based on the length of at least one level's level identifier. Specifically, in one embodiment, the mapping service node can obtain the lengths of the first N-1 level identifiers out of the N level identifiers to be mapped as the target level identifier length, where N is the number of level identifiers to be mapped; for example, for level ab to be mapped, if the length of the first level's level identifier is 2 and the length of the second level's level identifier is 2, then the target level identifier length is 2. In another embodiment, the mapping service node can also obtain the lengths of the N level identifiers to be mapped as the target level identifier length; for example, for level ab to be mapped, if the length of the first level's level identifier is 2 and the length of the second level's level identifier is 2,2, then the target level identifier length is 2,2.

[0037] Based on the target digital fingerprint algorithm, a target digital fingerprint algorithm identifier is determined. Specifically, according to the selected target digital fingerprint algorithm, a target digital fingerprint algorithm identifier is determined. For example, H1 represents a first-class digital fingerprint algorithm, H2 represents a second-class digital fingerprint algorithm, and H3 represents a third-class digital fingerprint algorithm.

[0038] Step 105: Generate a mapping identifier key for the database object based on the target start character, the target digital fingerprint algorithm identifier, the first digital fingerprint, the target level identifier length, and the level identifier string.

[0039] In this embodiment of the application, when the mapping service node generates the mapping identifier key of the database object based on the target start character, the target digital fingerprint algorithm identifier, the first digital fingerprint, the target level identifier length, and the level identifier string, it may use, but is not limited to, the following methods: The target start character, target digital fingerprint algorithm identifier, first digital fingerprint, target level identifier length, and level identifier string are concatenated sequentially to generate the mapping identifier key for the database object. For example, the mapping service node concatenates the target start character, target digital fingerprint algorithm identifier, first digital fingerprint, target level identifier length, and level identifier string in the order of target start character → target digital fingerprint algorithm identifier → first digital fingerprint → target level identifier length → level identifier string to obtain the mapping identifier key for the database object, such as Z+H1+8f9b7e6d5c4b3a2e1f+2,2+dbnstable→ZH18f9b7e6d5c4b3a2e1f22dbnstable. This fixed concatenation order and delimiter-free design ensure the uniqueness and resolvability of the mapping identifier key, avoiding parsing failures caused by delimiter conflicts with the original characters.

[0040] It is worth mentioning that, in the embodiments of this application, when the original identifier key of the original database object contains multiple (three or more) levels of hierarchical identifiers, in one embodiment, the above method can be used to map the original identifier key of the original database object to the mapping identifier key in one go; in another embodiment, the mapping identifier key of the database object can be generated recursively for every N (N≥2) hierarchical identifiers; wherein, in each recursion, the mapping identifier key generated in the previous recursion is connected and mapped with the hierarchical identifier to be mapped in the current recursion; the hierarchical identifier to be mapped in the current recursion is the N-1 hierarchical identifiers after the N hierarchical identifiers processed in the previous recursion.

[0041] For example: If the original identifier key is a 5-level structure db.ns.schema.part.table (≥3 levels), the mapping service node uses the following recursive method: First mapping calculation: (1) Process the first two layers: db.ns → remove the separator to get dbns; (2) Generate the first digital fingerprint (H1 algorithm): 1a2b3c4d5e6f7g8h9i; (3) Obtain the target starting character Z, the first layer level identifier length 2 (db length) and the target digital fingerprint algorithm identifier H1; (4) Concatenate them into the middle mapping identifier key: ZH11a2b3c4d5e6f7g8h9i2dbns.

[0042] First recursive operation: (1) Treat the mapping identifier key as a whole and connect it with the third-level schema: ZH11a2b3c4d5e6f7g8h9i2dbnsschema; (2) Generate a new first digital fingerprint: 2c3d4e5f6g7h8i9j0k; (3) Obtain the target starting character Z, the first-level hierarchical identifier length 26 (mapping identifier key length) and the target digital fingerprint algorithm identifier H1; (4) Concatenate them into the middle mapping identifier key: ZH12c3d4e5f6g7h8i9j0k26ZH11a2b3c4d5e6f7g8h9i2dbnsschema.

[0043] Subsequent recursive operations: Repeat the above logic, successively merging the fourth-level part and the fifth-level table, and finally generating a complete 5-level structure of mapping identifier keys.

[0044] In this embodiment, the original identifier keys with different levels and different randomness are converted into semantically and structurally unified mapped identifier keys through a unified mapping rule. This can adapt to the format uniformity requirements of multi-source heterogeneous database clusters. The recursive mapping logic supports arbitrary multi-level structures, improving the compatibility and scalability of database object identifiers within the database cluster.

[0045] Example 2 This application provides a database object processing method applied to a communication service node. (See attached document.) Figure 2 As shown, the general flow of the database object processing method provided in this application embodiment is as follows: Step 201: Obtain the mapping identifier key of the database object.

[0046] In this embodiment of the application, the communication service node obtains the mapping identifier key of the database object, such as ZH18f9b7e6d5c4b3a2e1f22dbnstable, by intercepting the mapping identifier key sent by the mapping service node.

[0047] Step 202: After determining that the mapping identifier key starts with the target start character, parse the target digital fingerprint algorithm identifier, the first digital fingerprint, the target level identifier length, and the level identifier string from the mapping identifier key.

[0048] In this embodiment, the communication service node checks whether the mapping identifier key begins with the target start character; if not, it is determined to be an unmapped original identifier key, and returns to the mapping process (steps 101-105) for mapping; if yes, the target digital fingerprint algorithm identifier, the first digital fingerprint, the target level identifier length, and the level identifier string are parsed from the mapping identifier key; for example, the communication service node parses the mapping identifier key in a fixed order: the target start character is Z, the target digital fingerprint algorithm identifier is H1, the first digital fingerprint is 8f9b7e6d5c4b3a2e1f, the target level identifier length is 2,2; and the level identifier string is dbnstable.

[0049] Step 203: Based on the target level identifier length, segment the level identifier string to obtain level identifiers for each level. Then, perform validity verification on each level identifier. Validity verification includes basic format verification, hierarchical structure verification, and business naming rule verification. Basic format verification verifies whether each segmented level identifier conforms to the basic naming conventions of the database object, such as character range. Hierarchical structure verification verifies that the overall hierarchical structure of each segmented level identifier conforms to the hierarchical logic of the database object, such as no remaining / missing characters and matching level numbers. Business naming rule verification verifies that each segmented level identifier conforms to business naming rules, such as the level identifier not containing cluster-disabled keywords or containing preset business prefixes.

[0050] For example, the communication service node divides dbnstable into db (first 2 characters), ns (middle 2 characters) and table (remaining part) according to the target hierarchical identifier length of 2,2, and then performs basic format verification, hierarchical structure verification, business naming rule verification and other legality verification on db, ns and table.

[0051] Step 204: After verifying the legality of the hierarchical identifiers at each level, the second digital fingerprint of the hierarchical identifier string is generated using the target digital fingerprint algorithm corresponding to the target digital fingerprint identifier.

[0052] For example, the communication service node uses the first type of digital fingerprint algorithm corresponding to the target digital fingerprint algorithm identifier H1 to generate the second digital fingerprint of the hierarchical identifier string dbnstable, such as 8f9b7e6d5c4b3a2e1f.

[0053] Step 205: When it is determined that the second digital fingerprint matches the first digital fingerprint, the mapping identifier key is determined to be a valid mapping identifier key for the database object.

[0054] In this embodiment of the application, the communication service node compares the first digital fingerprint and the second digital fingerprint; if the first digital fingerprint and the second digital fingerprint are the same, the mapping identifier key is determined to be a valid mapping identifier key of the database object, and the transfer is allowed; otherwise, the mapping identifier key is determined to be an invalid mapping identifier key, and the remapping process (steps 101-105) is triggered to perform mapping.

[0055] It is worth mentioning that when the mapping identifier key of the original database object is generated recursively, the communication service node, based on the length of the target level identifier in the mapping identifier key, divides the level identifier string in the mapping identifier key into various level identifiers. If it determines that there is a level identifier in each level identifier that starts with the target starting character, it determines that the level identifier is the intermediate mapping identifier key. Steps 202-205 are then executed to identify and verify the intermediate mapping identifier key until there is no level identifier in each of the segmented level identifiers that starts with the target starting character. After the segmented level identifiers have passed the verification, the complete mapping identifier key of the database object is determined to be the valid mapping identifier key.

[0056] In this embodiment of the application, by verifying the legitimacy and comparing the digital fingerprint, the integrity and legitimacy of the mapped identifier key can be ensured, and the chaos in cluster communication caused by repeated mapping and forged identifier keys can be avoided.

[0057] Example 3 This application provides a database object processing method applied to a reverse mapping service node. See [link / reference]. Figure 3 As shown, the general flow of the database object processing method provided in this application embodiment is as follows: Step 301: Obtain the mapping identifier key of the database object; wherein, the mapping identifier key is a valid mapping identifier key verified by the communication service node.

[0058] In this embodiment of the application, the reverse mapping service node obtains the mapping identifier key of the database object by receiving the mapping identifier key sent by the communication service node, for example, ZH18f9b7e6d5c4b3a2e1f22dbnstable.

[0059] Step 302: Based on the length of the target level identifier in the mapping identifier key, split the level identifier string in the mapping identifier key to obtain the level identifier of each level.

[0060] In this embodiment, the inverse mapping service node parses the target digital fingerprint algorithm identifier, the first digital fingerprint, the target level identifier length, and the level identifier string from the mapping identifier key. Based on the target level identifier length in the mapping identifier key, it segments the level identifier string in the mapping identifier key to obtain the level identifiers for each level. For example, the mapping identifier key is ZH18f9b7e6d5c4b3a2e1f22dbnstable; the communication service node parses the mapping identifier key in a fixed order: the target starting character is Z, the target digital fingerprint algorithm identifier is H1, the first digital fingerprint is 8f9b7e6d5c4b3a2e1f, the target level identifier length is 2,2, and the level identifier string is dbnstable; then, based on the target level identifier length 2,2, it segments the level identifier string dbnstable into the level identifiers db, ns, and table. For example, the mapping identifier key is ZH12c3d4e5f6g7h8i9j0k26ZH11a2b3c4d5e6f7g8h9i2dbnsschema; the communication service node parses the mapping identifier key in a fixed order: the target starting character is Z, the target digital fingerprint algorithm identifier is H1, the first digital fingerprint is 2c3d4e5f6g7h8i9j0k, the target level identifier length is 26, and the level identifier string is ZH11a2b3c4d5e6f7g8h9i2dbnsschema; then, based on the target level identifier length of 26, the level identifier string ZH11a2b... The string 3c4d5e6f7g8h9i2dbns is divided into hierarchical identifiers ZH11a2b3c4d5e6f7g8h9i2dbns and schema. When it is determined that there is a hierarchical identifier ZH11a2b3c4d5e6f7g8h9i2dbns starting with the target start character among the hierarchical identifiers after the division, this hierarchical identifier ZH11a2b3c4d5e6f7g8h9i2dbns is determined as the intermediate mapping identifier key. Based on the length 2 of the target hierarchical identifier in the intermediate mapping identifier key, the hierarchical identifier string dbns in the mapping identifier key is further divided into hierarchical identifiers db and ns.

[0061] Step 303: Using the same level delimiter as the level delimiter in the original identifier key of the database object, restore the level identifier of each level to the original identifier key.

[0062] In this embodiment, the reverse mapping service node reads the hierarchical separator of the original identifier key of the database object from the configuration information of the metadata service node; using the same hierarchical separator as the original identifier key of the database object, it restores the hierarchical identifiers of each level to the original identifier key. For example, the reverse mapping service node uses a hierarchical separator (such as ".") to concatenate the hierarchical identifiers db, ns, and table in the mapped identifier key ZH18f9b7e6d5c4b3a2e1f22dbnstable to restore the original identifier key db.ns.table. As another example, the reverse mapping service node uses a hierarchical separator (such as ".") to concatenate the hierarchical identifiers db, ns, and schema in the mapped identifier key ZH12c3d4e5f6g7h8i9j0k26ZH11a2b3c4d5e6f7g8h9i2dbnsschema to restore the original identifier key db.ns.schema.

[0063] In this embodiment, through precise length segmentation and delimiter adaptation, the unified mapping identifier key is restored to the original identifier key that can be recognized by the target metadata service node, thereby achieving compatible access across service levels.

[0064] Based on the above embodiments, this application provides a database object processing system, see below. Figure 4 As shown, the database object processing system 400 provided in this application embodiment includes at least: Mapping service node 401 is used to receive database object access requests initiated by business request nodes; it uses the database object processing method provided in Embodiment 1 to generate and send the mapping identifier key of the database object in the database object access request. Communication service node 402 is used to intercept the mapping identifier key of the database object sent by the mapping service node; to verify the mapping identifier key using the database object processing method provided in Embodiment 2; and to send the mapping identifier key after determining that the mapping identifier key is a valid mapping identifier key. The reverse mapping service node 403 is used to receive the mapping identifier key of the database object sent by the communication service node; after reversing the mapping identifier key to restore the original identifier key using the database object processing method provided in Embodiment 3, the original identifier key is sent. Metadata service node 404 is used to receive the original identifier key of the database object sent by the reverse mapping service node; obtain the database object access result based on the original identifier key; and return the database object access result to the business request node.

[0065] In this embodiment, the mapping service node 401, the communication service node 402, and the reverse mapping service node 403 together constitute the mapping layer, which serves as a standardized adapter between the metadata management module and the underlying heterogeneous metadata services. This allows the metadata management module to remain unaware of the differences in the underlying services. By reducing the complexity of adapting to heterogeneous metadata services to the mapping layer, the metadata management module can remain lightweight, stable, and easily scalable. This achieves the goal of being compatible with multiple metadata services without modifying the metadata management module, significantly improving the scalability of the database cluster and facilitating the rapid access to new types of metadata services.

[0066] It should be noted that the principle of the database object processing system provided in this application embodiment to solve the technical problem is similar to that of the database object processing method provided in this application embodiment. Therefore, the implementation of the database object processing system provided in this application embodiment can refer to the implementation of the database object processing method provided in this application embodiment, and repeated details will not be described again.

[0067] After introducing the database object processing method and system provided in the embodiments of this application, the electronic device provided in the embodiments of this application will be briefly introduced next.

[0068] The electronic devices provided in this application embodiment may be, but are not limited to, mapping service nodes, communication service nodes, and reverse mapping service nodes, etc. See also... Figure 5 As shown, the electronic device 500 provided in this application embodiment includes at least a processor 501, a memory 502, and a computer program stored on the memory 502 and executable on the processor 501. When the processor 501 executes the computer program, it implements the database object processing method provided in this application embodiment.

[0069] In one possible implementation, processor 501 can be a single processing element or a collective term for multiple processing elements. For example, processor 501 can be a central processing unit (CPU), or one or more integrated circuits configured to implement the database object processing method described in the embodiments of this application. Specifically, processor 501 can be a general-purpose processor, including but not limited to CPUs, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0070] In one possible implementation, memory 502 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 5021 and / or cache memory 5022, and may further include read-only memory (ROM) 5023; memory 502 may also include a program tool 5025 having a set (at least one) of program modules 5024, including but not limited to: operating subsystem, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0071] In one possible implementation, the electronic device 500 provided in this application embodiment may further include a bus 503 connecting different components (including processor 501 and memory 502). The bus 503 represents one or more types of bus structures, including memory bus, peripheral bus, local area bus, etc.

[0072] In one possible implementation, the electronic device 500 can also communicate with one or more devices that enable a user to interact with the electronic device 500 (e.g., mobile phones, computers, etc.), and / or with external devices 504 such as devices that enable the electronic device 500 to communicate with one or more other electronic devices 500 (e.g., routers, modems, etc.). This communication can be performed via an input / output (I / O) interface 505. Furthermore, the electronic device 500 can also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 506. Figure 5 As shown, network adapter 506 communicates with other modules of electronic device 500 via bus 503. It should be understood that, although... Figure 5 As not shown, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to microcode, device drivers, redundant processors, external disk drive arrays, Redundant Arrays of Independent Disks (RAID) subsystems, tape drives, and data backup storage subsystems.

[0073] It should be noted that, Figure 5 The electronic device 500 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0074] Furthermore, embodiments of this application also provide a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the database object processing method described above in embodiments of this application. Specifically, the computer instructions may be built into or installed in a processor, enabling the processor to implement the database object processing method described above in embodiments of this application by executing the built-in or installed computer instructions.

[0075] Of course, the database object processing method provided in the embodiments of this application can also be implemented as a program product, which includes program code. When the program code is executed by a processor, it implements the database object processing method provided in the embodiments of this application.

[0076] The program product provided in this application embodiment can be any combination of one or more readable media, wherein the readable media can be a readable signal medium or a readable storage medium, and the readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. Specifically, more specific examples of readable storage media (a non-exhaustive list) include: electrical connections with one or more wires, portable disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM), optical fibers, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0077] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.

[0078] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0079] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0080] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.

Claims

1. A database object processing method, characterized in that, include: Obtain the original identifier key of the database object; wherein, the original identifier key contains hierarchical identifiers of different levels connected by hierarchical separators; The hierarchical identifiers of each level after removing the hierarchical separator from the original identifier key are concatenated into a hierarchical identifier string; The first digital fingerprint of the hierarchical identifier string is generated using the target digital fingerprint algorithm. Obtain the target start character, the target level identifier length, and the target digital fingerprint algorithm identifier; Based on the target start character, the target digital fingerprint algorithm identifier, the first digital fingerprint, the target hierarchical identifier length, and the hierarchical identifier string, a mapping identifier key for the database object is generated; The process of generating the first digital fingerprint of the hierarchical identifier string using a target digital fingerprint algorithm includes: If the randomness of the original identifier key is lower than the first threshold, then the target digital fingerprint algorithm is determined to be a first type of digital fingerprint algorithm; using the first type of digital fingerprint algorithm, the first digital fingerprint of the hierarchical identifier string is generated; If the randomness of the original identifier key is higher than the second threshold, then the target digital fingerprint algorithm is determined to be a second type of digital fingerprint algorithm; the second type of digital fingerprint algorithm is used to generate the first digital fingerprint of the hierarchical identifier string; wherein, the collision resistance of the second type of digital fingerprint algorithm is stronger than that of the first type of digital fingerprint algorithm.

2. The database object processing method as described in claim 1, characterized in that, Obtain the target start character, target level identifier length, and target digital fingerprint algorithm identifier, including: The target starting character is determined based on a fixed starting character; The length of the target hierarchical identifier is determined based on the length of the hierarchical identifier of at least one level; Based on the target digital fingerprint algorithm, the target digital fingerprint algorithm identifier is determined.

3. The database object processing method as described in claim 1, characterized in that, Based on the target start character, the target digital fingerprint algorithm identifier, the first digital fingerprint, the target hierarchical identifier length, and the hierarchical identifier string, a mapping identifier key for the database object is generated, including: The target start character, the target digital fingerprint algorithm identifier, the first digital fingerprint, the target level identifier length, and the level identifier string are concatenated sequentially to generate the mapping identifier key of the database object.

4. The database object processing method as described in claim 1, characterized in that, When the original identifier key contains hierarchical identifiers of multiple levels, a recursive method is used to generate the mapping identifier key of the database object; wherein, in each recursion, the mapping identifier key generated in the previous recursion is connected and mapped with the hierarchical identifier to be mapped in the current recursion.

5. A database object processing method, characterized in that, include: Obtain the mapping identifier key of the database object; wherein the mapping identifier key is generated using the database object processing method as described in any one of claims 1-4; After determining that the mapping identifier key starts with the target start character, the target digital fingerprint algorithm identifier, the first digital fingerprint, the target level identifier length, and the level identifier string are parsed from the mapping identifier key; Based on the target level identifier length, the level identifier string is segmented to obtain the level identifiers of each level, and then the legality of each level identifier is verified. After the validity verification of the hierarchical identifiers at each level is confirmed, the target digital fingerprint algorithm corresponding to the target digital fingerprint algorithm identifier is used to generate the second digital fingerprint of the hierarchical identifier string. When it is determined that the second digital fingerprint matches the first digital fingerprint, the mapping identifier key is determined to be a valid mapping identifier key for the database object.

6. A database object processing method, characterized in that, include: Obtain the mapping identifier key of the database object; wherein, the mapping identifier key is a valid mapping identifier key that has passed the verification by the database object processing method as described in claim 5; Based on the length of the target level identifier in the mapping identifier key, the level identifier string in the mapping identifier key is segmented to obtain the level identifier of each level; Using the same level separator as the original identifier key of the database object, the level identifiers of each level are restored to the original identifier key.

7. A database object processing system, characterized in that, include: The mapping service node is used to receive database object access requests initiated by the business request node; The database object processing method as described in any one of claims 1-4 is used to generate the mapping identifier key of the database object in the database object access request and then send the mapping identifier key. A communication service node is used to intercept the mapping identifier key of the database object sent by the mapping service node; to verify the mapping identifier key using the database object processing method as described in claim 5; and to send the mapping identifier key after determining that the mapping identifier key is a valid mapping identifier key. A reverse mapping service node is used to receive the mapping identifier key of the database object sent by the communication service node; and after restoring the mapping identifier key to the original identifier key using the database object processing method as described in claim 6, the original identifier key is sent. The metadata service node is used to receive the original identifier key of the database object sent by the reverse mapping service node; and to obtain the database object access result based on the original identifier key. The database object access result is returned to the business request node.

8. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the database object processing method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the database object processing method as described in any one of claims 1-6.