Metadata management method, related apparatus, device, and storage medium
By receiving and processing client metadata management requests on the server side, the isolation and expansion of metadata tenants is achieved, which solves the problem of metadata resource conflicts in the existing technology and improves the metadata management capabilities and isolation effect of cloud accounts.
Patent Information
- Application Number
- PCT/CN2022/118865
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2021-11-04
- Filing Date
- 2022-09-15
- Publication Date
- 2024-09-12
AI Technical Summary
The existing distributed data warehouse metadata management method affects metadata resources between tenants, making it difficult to expand the metadata management boundaries of cloud accounts and achieve isolation of metadata resources.
By implementing the metadata management method on the server side, it receives the client's account authentication request, and sends a metadata tenant set based on the successfully authenticated cloud account information, supporting tenant selection and database query requests, and realizing the isolation and expansion of metadata resources.
It effectively expands the number of multi-tenants supported by cloud accounts, realizes the isolation of metadata resources, avoids metadata resource conflicts between different tenants, and improves the effect of metadata management.
Smart Images

Figure CN2022118865_12092024_PF_FP
Abstract
Description
A metadata management method, related device, equipment and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on November 4, 2021, application number 202111302438.1, and application name "A metadata management method, related devices, equipment and storage medium", all contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of cloud technology, and in particular to a metadata management method, related apparatus, equipment, and storage medium. Background Art
[0003] A distributed data warehouse utilizes high-speed computer networks to connect multiple physically dispersed data storage units into a logically unified data warehouse. In recent years, with the rapid growth of data volumes, distributed data warehouse technology has also experienced rapid development. Distributed data warehouses store data dispersed across multiple network-connected data nodes, thereby achieving greater storage capacity and increased concurrent access.
[0004] Metadata management is crucial for distributed data warehouses. Typically, metadata is persisted in a relational database. To access metadata, you first need to query the metadata to obtain the database table structure and data storage location. Then, you execute Structured Query Language (SQL) to perform operations such as adding, deleting, modifying, and querying the metadata.
[0005] However, this metadata management method will affect metadata resources between tenants. For example, if Tenant A creates a metadata database named "DB.01", Tenant B cannot create a metadata database named "DB.01". Tenant B may need to try multiple times to create a metadata database with the correct name.
[0006] Summary of the Invention
[0007] The present invention provides a metadata management method, related apparatus, device, and storage medium. This method not only helps expand the boundaries of metadata management for cloud accounts, but also enables the isolation of metadata resources (e.g., metadata databases and metadata tables), preventing metadata resources between different tenants from being affected, thereby achieving better metadata management results.
[0008] In view of this, the present application provides, on one hand, a metadata management method, which is executed by a server and includes:
[0009] Receive an account authentication request sent by the client, where the account authentication request carries cloud account information;
[0010] If the account authentication request is successfully verified, the metadata tenant set is sent to the client, where the metadata tenant set is bound to the cloud account information;
[0011] In response to a tenant selection request sent by the client, sending a metadata repository set to the client, wherein the tenant selection request carries an identifier of a metadata tenant to be requested, the metadata tenant to be requested is included in the metadata tenant set, and the metadata repository set and the metadata tenant to be requested have a mapping relationship;
[0012] In response to a database query request sent by the client, a metadata table set is sent to the client, wherein the database query request carries an identifier of a metadata database to be requested, the metadata database to be requested is included in the metadata database set, and the metadata table set and the metadata database to be requested have a mapping relationship.
[0013] Another aspect of the present application provides a metadata management device, which is deployed on a server and includes:
[0014] A receiving module, configured to receive an account authentication request sent by a client, wherein the account authentication request carries cloud account information;
[0015] A sending module, configured to send a metadata tenant set to the client if the account authentication request is successfully verified, wherein the metadata tenant set is bound to the cloud account information;
[0016] The sending module is further configured to send the metadata repository set to the client in response to a tenant selection request sent by the client, wherein the tenant selection request carries an identifier of a metadata tenant to be requested, the metadata tenant to be requested is included in the metadata tenant set, and the metadata repository set and the metadata tenant to be requested have a mapping relationship;
[0017] The sending module is further configured to send a metadata table set to the client in response to a database query request sent by the client, wherein the database query request carries an identifier of a metadata database to be requested, the metadata database to be requested is included in the metadata database set, and the metadata table set and the metadata database to be requested have a mapping relationship.
[0018] Another aspect of the present application provides a computer device, comprising: a memory, a processor, and a bus system;
[0019] Wherein, the memory is used to store programs;
[0020] The processor is used to execute the program in the memory, and the processor is used to perform the above-mentioned methods according to the instructions in the program code;
[0021] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
[0022] Another aspect of the present application provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium. When the computer-readable storage medium is run on a computer, the computer is enabled to execute the above-mentioned methods.
[0023] Another aspect of the present application provides a computer program product, the computer program product including a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the methods provided in the above aspects.
[0024] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0025] In an embodiment of the present application, a metadata management method is provided. The method receives an account authentication request sent by a client. If the account authentication request is passed, a metadata tenant set is sent to the client. The metadata tenant set is bound to the cloud account information. Based on this, the client can trigger a tenant selection request. The server responds to the tenant selection request sent by the client and sends a metadata database set to the client. The client can trigger a database query request. Then, the server responds to the database query request sent by the client and sends a metadata table set to the client. The metadata table set has a mapping relationship with the requested metadata database. Through the above method, the concept of metadata tenants is designed at the upper layer of the metadata database. The metadata tenant is used as the minimum granularity for isolating tenants and supports a mode in which a cloud account is bound to multiple metadata tenants. Therefore, when the number of multi-tenants supported by the cloud account needs to be expanded, the metadata tenants bound to the cloud account can be increased, which is conducive to expanding the number of multi-tenants supported by the cloud account, that is, it is conducive to expanding the boundary of the cloud account for metadata management. For the same metadata tenant, there is an independent metadata management space. For different metadata tenants, metadata resources (e.g., metadata databases and metadata tables) can be isolated, avoiding the impact of metadata resources between different tenants, thereby achieving better metadata management effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] FIG1 is a schematic diagram of a physical architecture of a metadata management system according to an embodiment of the present application;
[0027] FIG2 is a schematic diagram of a logical architecture of a metadata management system according to an embodiment of the present application;
[0028] FIG3 is a schematic diagram of an application scenario of data lake computing in an embodiment of the present application;
[0029] FIG4 is a schematic diagram of an application scenario of data lake construction in an embodiment of the present application;
[0030] FIG5 is a flow chart of a metadata management method according to an embodiment of the present application;
[0031] FIG6 is a schematic diagram of a multi-tenant design model according to an embodiment of the present application;
[0032] FIG7 is another schematic diagram of a multi-tenant design model according to an embodiment of the present application;
[0033] FIG8 is a schematic diagram of associating metadata tenants based on business scenarios in an embodiment of the present application;
[0034] FIG9 is another schematic diagram of associating metadata tenants based on business scenarios in an embodiment of the present application;
[0035] FIG10 is another schematic diagram of associating metadata tenants based on business scenarios in an embodiment of the present application;
[0036] FIG11 is a schematic diagram of the compatibility of multiple computing engines in an embodiment of the present application;
[0037] FIG12 is a schematic diagram of a process of information authentication in an embodiment of the present application;
[0038] FIG13 is another schematic diagram of the information authentication process in an embodiment of the present application;
[0039] FIG14 is a schematic diagram of implementing information authentication based on a security framework in an embodiment of the present application;
[0040] FIG15 is a schematic diagram of a process for creating a metadata table in an embodiment of the present application;
[0041] FIG16 is a schematic diagram of a process for updating a metadata table in an embodiment of the present application;
[0042] FIG17 is a schematic diagram of a process for deleting a metadata table in an embodiment of the present application;
[0043] FIG18 is a schematic diagram of a process for querying a metadata table in an embodiment of the present application;
[0044] FIG19 is a schematic diagram of a general metadata data model according to an embodiment of the present application;
[0045] FIG20 is another schematic diagram of a general metadata data model according to an embodiment of the present application;
[0046] FIG21 is a comparative diagram of response time consumption in an embodiment of the present application;
[0047] FIG22 is a comparative diagram of the number of request transactions per second in an embodiment of the present application;
[0048] FIG23 is a schematic diagram of a metadata management device according to an embodiment of the present application;
[0049] FIG24 is a schematic structural diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION
[0050] The present invention provides a metadata management method, related apparatus, device, and storage medium. This method not only helps expand the boundaries of metadata management for cloud accounts, but also enables the isolation of metadata resources (e.g., metadata databases and metadata tables), preventing metadata resources between different tenants from being affected, thereby achieving better metadata management results.
[0051] With the widespread use of big data and cloud computing, the importance of data catalogs and data governance has become increasingly apparent. Data governance requires a clear understanding of the data available. Manual data organization is clearly unable to keep up with the rate of data growth and change. As data operations mature and data pipelines become increasingly complex, traditional data catalogs often fail to meet these requirements. Therefore, implementing metadata management is crucial.
[0052] The process of metadata management can involve big data technologies and public cloud applications, each of which will be explained below. Big data refers to data sets that cannot be captured, managed, and processed within a specific timeframe using conventional software tools. These are massive, rapidly growing, and diverse information assets that require new processing models to enhance decision-making, insight discovery, and process optimization. With the advent of the cloud era, big data has attracted increasing attention. Big data requires specialized technologies to effectively process large amounts of time-sensitive data. Technologies suitable for big data include massively parallel processing databases, data mining, distributed file systems, distributed databases, cloud computing platforms, the internet, and scalable storage systems.
[0053] A public cloud typically refers to a cloud provided by a third-party provider for users to use. Public clouds are typically available over the internet and may be free or low-cost. The core attribute of a public cloud is shared resource services. There are many instances of this type of cloud, providing services across today's open public networks.
[0054] In order to achieve better metadata management effects, the present application proposes a metadata management method, which is applied to a metadata management system. For ease of understanding, the physical architecture composition of the metadata management system will be introduced below in conjunction with Figure 1. Please refer to Figure 1, which is a physical architecture diagram of the metadata management system in an embodiment of the present application. As shown in the figure, the metadata service is a microservice architecture design, which makes the service independent and internally closed according to the functional module, and the call between the services is implemented through a remote procedure call (RPC). The dotted box shown in Figure 1 constitutes a metadata microservice system, which mainly includes three parts, namely basic services, component services and business services. Among them, the basic services include core basic services (Hybris Service), unified data source services (Hybris DataSource) and unified scheduling services (Hybris Scheduler). The basic services are responsible for the basic functions of metadata management and basic module maintenance, and can realize the addition, deletion, modification and query of metadata, data source management, metadata discovery scheduling task management, etc. Component services include the online metadata service (Hybris MetaStore) and the message middleware data processing service (Hybris Databus). Component services provide general non-business processing capabilities to external components, enabling online metadata management RPC services and metadata message processing services. Business services include the business interface service (Hybris Center). Business services are related to specific product operations and provide Hypertext Transfer Protocol (HTTP) interfaces for metadata management for different business products, such as data development platforms, data lake computing, and data lake construction.
[0055] For ease of understanding, the overall architecture of multi-tenant metadata online data directory management will be introduced in conjunction with Figure 2 below. Please refer to Figure 2, which is a logical architecture diagram of the metadata management system in an embodiment of the present application. As shown in the figure, the core logic of unified metadata online management is to define the data directory model, and two types of data model definitions are shown. One type is the Hive data model, which is used to store Hive type metadata and provide metadata directory management core functions compatible with Hive Metastore, such as database (Database, DB), table (Table), field (Columns) and partition (Partitions), etc. The other type is a general data model, which is used to store a wider range of non-Hive metadata and provide general metadata directory management functions for other data sources (i.e., other relational database management systems). On top of the data directory model, multi-tenancy and authentication (or, authorization) management is performed to achieve secure and reliable public cloud multi-tenant metadata online data directory management; and external components can implement metadata access and management through the provided self-developed software development kit (Software Development Kit, SDK), general RPC interface and HTTP interface.
[0056] To facilitate understanding, the professional terms involved in this application are introduced below.
[0057] (1) Hive Metastore: It is a built-in online metadata management service provided by the Hive system. It is mainly used to manage and store metadata such as databases, tables, fields, partitions, and user-defined functions (UDFs) defined in Hive.
[0058] (2) Metadata: It is an abstraction of data and describes the data, such as the attribute information or organizational relationships of the data. In a relational database, table structure information (including table name and field name list) describes the organizational relationships of specific table data, and this table structure information is the metadata of the table data.
[0059] (3) Data Catalog: This is an ordered list of an enterprise's data assets, providing a central summary of metadata to facilitate understanding, analyzing, and managing data. This application focuses on data catalogs for structured data, such as metadata such as libraries, tables, fields, and partitions in relational database systems.
[0060] (4) Data directory management: management services based on the data directory, including the functions of adding, deleting, correcting, updating and searching the data directory, adding classification labels, data maps and other functions.
[0061] (5) Online data catalog management: Data catalog management can be divided into online management and offline management. Online management needs to ensure the immediacy, atomicity, and consistency of management operations. After the execution is completed, users can quickly obtain the results of the management operations. Offline management mainly implements data asset mining and analysis based on non-real-time offline computing, such as data trend partitioning and data quality management. This application can realize multi-tenant online data catalog management. Common scenarios are the addition, deletion, modification, and query management operations on databases, tables, fields, and partitions.
[0062] (6) Multi-tenant technology: also known as multi-tenancy technology, is a software architecture technology that explores how to share the same program software in a multi-tenant environment (for example, user groups and resource groups, etc.). A single software architecture can provide services to multiple different tenants, and the resources associated with each tenant (provided by the software service) are isolated and do not interfere with each other. Multi-tenant technology is the basic capability provided by cloud services, ensuring resource isolation for customers on the cloud. This application is designed with two multi-tenant technology dimensions, namely metadata tenants and business tenants, to achieve common metadata resource isolation management in public cloud scenarios.
[0063] (7) Metadata tenant: This is one of the tenant dimensions defined in this application. It is the minimum granularity for metadata multi-tenant isolation in data catalog management. That is, a metadata tenant is shared by multiple upper-level tenants (e.g., user groups and resource groups). In this application, a metadata tenant can be compared to a Hive Metastore system, or a database management system. Under a metadata tenant, multiple databases with unique names can be created.
[0064] (8) Business tenant: This is one of the tenant dimensions defined in this application. In data catalog management, business divisions are used to isolate tenant resources based on general business divisions. Business tenants are an abstraction of specific business scenarios. Through the design of business tenants, this application can be universally adapted to personalized specific business scenarios. For example, a business tenant in a data development platform represents a workspace, and a business tenant in data lake computing represents a data source. Based on business tenants, a data catalog management system can be used to support different product requirements.
[0065] (9) Tenant dimension mapping: There is no direct and definite association between the two tenant dimensions defined in this application (i.e., metadata tenants and business tenants). However, the mapping relationship between metadata tenants and business tenants can be defined through tenant dimension mapping. This mapping relationship is related to the specific business logic requirements, that is, the specific mapping is implemented according to the business scenario. For example, in the data development platform, a business tenant represents a workspace, and a workspace can correspond to multiple metadata tenants. Therefore, the business tenant and the metadata tenant are in a one-to-many mapping relationship. In data lake computing, a business tenant represents a data source, and a data source corresponds to a metadata tenant. Therefore, the business tenant and the metadata tenant are in a one-to-one mapping relationship.
[0066] (10) Data Lake Compute (DLC): It is used to provide agile and efficient data lake analysis and computing services. The multi-tenant online data directory system supports different call access entries and scenarios. For ease of understanding, please refer to Figure 3, which is a schematic diagram of an application scenario of data lake computing in an embodiment of the present application. As shown in the figure, the Structured Query Language (SQL) routing is to perform SQL routing forwarding and identify the SQL passed in by users (such as tenant A and tenant B). If the SQL is of the Data Definition Language (DDL) type, the routing is forwarded to the online data processing directory for processing. If the SQL is of the Data Query Language (DQL) type, the routing is forwarded to the computing engine. Supports data directory management in the form of SQL statements. DLC also supports general big data computing engines, etc., and performs data directory management based on the RPC interface.
[0067] (11) Data Lake Formation (DLF): This is used to provide rapid construction of data lakes and, together with metadata management services on the lake, help users quickly and efficiently build enterprise data lake technology architectures. The main responsibility of the multi-tenant online data catalog is to connect with data discovery and lake entry construction tasks and provide metadata operation and management capabilities. For ease of understanding, please refer to Figure 4, taking tenant A and tenant B as examples. Data discovery can support metadata discovery and collection of multiple types of existing data sources and Cloud Object Storage (COS) data files, obtain metadata structure information (for example, library definition structure and table definition structure), and ultimately persist and maintain it in the multi-tenant data catalog management system (i.e., the multi-tenant online data catalog). Lake entry construction can support real-time and offline data synchronization methods, migrating and integrating data from the original data source into the COS object storage system. During the migration process, the lake entry construction task will synchronize metadata information to the data catalog management system to facilitate subsequent computational analysis of the migrated COS data.
[0068] In combination with the above introduction, the metadata management method in this application will be introduced below. Please refer to Figure 5. An embodiment of the metadata management method in this application includes:
[0069] 110. Receive an account authentication request sent by the client, where the account authentication request carries cloud account information.
[0070] In one or more embodiments, the metadata management device receives an account authentication request sent by a client. The account authentication request carries cloud account information. The cloud account can be an account registered with an enterprise, and the cloud account information can include the enterprise account number and password. The cloud account can also be an account registered with an individual, and the cloud account information can include the personal account number (or mobile phone number, email address, etc.) and password.
[0071] It should be noted that the metadata management device can be deployed on one or more servers, and supports not only physical servers (for example, a server cluster or distributed system composed of multiple physical servers), but also containerized deployment.
[0072] It should be noted that the client can be run on the terminal device in the form of a browser or a standalone application (APP). The specific presentation format of the client is not limited here. The terminal device can be a smartphone, tablet computer, laptop computer, PDA, personal computer, smart TV, smart watch, in-vehicle device, wearable device, etc., but is not limited to these.
[0073] 120. If the account authentication request is successfully verified, the metadata tenant set is sent to the client, wherein the metadata tenant set is bound to the cloud account information.
[0074] In one or more embodiments, the metadata management device verifies the cloud account information carried in the account authentication request. After the verification is successful, a metadata tenant set can be fed back to the client, wherein one cloud account information is bound to one metadata tenant set, and the metadata tenant set includes at least one optional metadata tenant.
[0075] The metadata tenant set may be presented on the client in the form of a list. For ease of understanding, please refer to Table 1, which is a schematic diagram of the relationship between cloud account information and metadata tenant sets.
[0076] Table 1
[0077]
[0078]
[0079] It should be noted that the corresponding relationship shown in Table 1 is only an illustration and should not be understood as a limitation to this application.
[0080] 130. In response to a tenant selection request sent by the client, a metadata repository set is sent to the client, wherein the tenant selection request carries an identifier of the metadata tenant to be requested, the metadata tenant to be requested is included in the metadata tenant set, and the metadata repository set has a mapping relationship with the metadata tenant to be requested.
[0081] In one or more embodiments, a user selects a metadata tenant from a metadata tenant set and triggers a tenant selection request for the metadata tenant. The tenant selection request carries an identifier of the requested metadata tenant, where the requested metadata tenant belongs to the metadata tenant set. Based on the tenant selection request, the metadata management device returns a metadata repository set to the client. Each metadata tenant is associated with a metadata repository set, and the metadata repository set includes at least one metadata repository.
[0082] The metadata repository collection can be presented on the client in the form of a list. In conjunction with Table 1, it is assumed that the user selects "metadata tenant A" as the metadata tenant to be requested from the metadata tenant collection. Based on this, please refer to Table 2, which is an illustration of the relationship between the metadata tenant to be requested and the metadata repository collection.
[0083] Table 2
[0084]
[0085] It should be noted that the corresponding relationship shown in Table 2 is only an illustration and should not be understood as a limitation to this application.
[0086] 140. In response to a database query request sent by the client, send a metadata table set to the client, wherein the database query request carries an identifier of a metadata database to be requested, the metadata database to be requested is included in the metadata database set, and the metadata table set and the metadata database to be requested have a mapping relationship.
[0087] In one or more embodiments, a user selects a metadatabase from a metadatabase set and triggers a database query request for the metadatabase. The database query request carries an identifier of the metadatabase to be requested, where the metadatabase to be requested belongs to the metadatabase set. Based on the database query request, the metadata management device returns a metadata table set to the client. Each metadatabase is associated with a metadata table set, and the metadata table set includes at least one metadata table.
[0088] The metadata table set can be presented on the client in the form of a list. Combined with Table 3, assuming that the user selects "metadatabase A" from the metadatabase set as the metadatabase to be requested, based on this, please refer to Table 3, which is an illustration of the relationship between the metadatabase to be requested and the metadata table set.
[0089] Table 3
[0090]
[0091] It should be noted that the corresponding relationship shown in Table 3 is only an illustration and should not be understood as a limitation to this application.
[0092] In an embodiment of the present application, a metadata management method is provided. Through the above method, the concept of metadata tenants is designed in the upper layer of the metadata database, and the metadata tenants are used as the minimum granularity for isolation between tenants, and a mode of binding multiple metadata tenants to a cloud account is supported. Therefore, when it is necessary to expand the number of multi-tenants supported by the cloud account, it is sufficient to increase the metadata tenants bound to the cloud account, which is conducive to expanding the number of multi-tenants supported by the cloud account, that is, it is conducive to expanding the boundaries of metadata management of the cloud account. For the same metadata tenant, there is an independent metadata management space. For different metadata tenants, the isolation of metadata resources (for example, metadata databases and metadata tables) can be achieved to avoid the metadata resources between different tenants being affected, thereby achieving better metadata management effects.
[0093] Based on the embodiments corresponding to FIG. 5 above, in another optional embodiment provided by the embodiment of the present application, in response to a database query request sent by the client, after sending the metadata table set to the client, the following may also be included:
[0094] In response to a data table query request sent by a client, a metadata table to be requested is sent to the client, wherein the data table query request carries an identifier of the metadata table to be requested, and the metadata table to be requested is included in the metadata table set.
[0095] In one or more embodiments, a method for implementing metadata table queries based on metadata tenants is described. As can be seen from the aforementioned embodiments, a user selects a metadata table from a metadata table set and triggers a data table query request for that metadata table. The data table query request carries the identifier of the requested metadata table, which belongs to the metadata table set. Based on the data table query request, the requested metadata is fed back to the client.
[0096] For ease of understanding, please refer to Figure 6, which is a schematic diagram of the multi-tenant design model in an embodiment of the present application. As shown in the figure, the cloud account information (for example, the cloud account information applied for by Company A) and the metadata tenant are a one-to-many mapping relationship (i.e., 1 to 0...*). Multiple metadata tenants can be created under one cloud account information. The one-to-many mapping relationship can be analogous to Company A maintaining multiple Hive Metastores under its cloud account information, and these metadata tenants are private and isolated from the metadata of other metadata tenants. The one-to-many mapping relationship can greatly expand the boundaries of metadata management for a single cloud account information. In order to facilitate the management and identification of metadata tenants, users can customize the namespace (i.e., name identifier) of the metadata tenant. One cloud account information and one namespace can uniquely identify a metadata tenant. In addition, the type of metadata tenant is customizable and can support different metadata types, such as Hive, MySQL, etc.
[0097] The metadata tenant and the metadata repository have a one-to-many mapping relationship (i.e., 1 to 0...*). Based on this, multiple metadata repositories can be created under one metadata tenant.
[0098] The metadata database and metadata table have a one-to-many mapping relationship (i.e., 1 to 0...*). Multiple metadata tables can be created under one metadata database.
[0099] Secondly, the embodiments of this application provide a method for implementing metadata table queries based on metadata tenants. This method, designed for online data catalog management, allows for the division of metadata, using metadata tenants as the minimum granularity for multi-tenant isolation. This ensures that metadata under different metadata tenants is isolated from each other and does not affect each other. Therefore, different metadata tenants can perform operations such as metadata table queries while maintaining metadata isolation, thereby improving the flexibility and feasibility of the solution.
[0100] Based on the various embodiments corresponding to FIG. 5 above, another optional embodiment provided by the embodiment of the present application may further include:
[0101] If the account authentication request is successfully verified, the business tenant set is sent to the client, where the business tenant set is bound to the cloud account information;
[0102] In response to the service selection request sent by the client, service processing information generated based on the service tenant to be requested is sent to the client, wherein the service selection request carries the identifier of the service tenant to be requested, and the service tenant to be requested is included in the service tenant set.
[0103] In one or more embodiments, a metadata management method under a multi-dimensional tenant system is introduced. As can be seen from the aforementioned embodiments, this application also defines a business tenant, which is an abstraction of a specific business scenario and isolates tenant resources based on a general business division. Through the design of business tenants, it is possible to universally adapt to different personalized specific business scenarios. Designing business tenants can decouple the strong association between metadata tenants and specific business scenarios, so that the underlying metadata tenants are unrelated to the specific business, and the business tenants are linked to the specific business usage scenarios.
[0104] For ease of understanding, please refer to Figure 7, which is another schematic diagram of the multi-tenant design model in an embodiment of the present application. As shown in the figure, the cloud account information (for example, the cloud account information applied for by Company A) and the business tenant are in a one-to-many relationship (i.e., 1 to 0...*), and multiple business tenants can be created under one cloud account information. The one-to-many mapping relationship can greatly expand the boundaries of a single cloud account information for business management. In order to facilitate the management and identification of business tenants, users can customize the namespace of the business tenant (i.e., name identifier). One cloud account information and one namespace can uniquely identify a business tenant. The business tenant and the data source are in a one-to-many mapping relationship (i.e., 1 to 0...*), based on which, multiple data sources can be created under one business tenant. The data source and the data source engine are in a many-to-one mapping relationship (i.e., 0...* to 1).
[0105] The metadata management device verifies the cloud account information included in the account authentication request. Upon successful verification, it returns a service tenant set to the client. Each cloud account is associated with a service tenant set, which includes at least one selectable service tenant. The service tenant set can be presented on the client as a list. For ease of understanding, see Table 4, which illustrates the relationship between cloud account information and service tenant sets.
[0106] Table 4
[0107]
[0108] It should be noted that the corresponding relationship shown in Table 4 is only an illustration and should not be understood as a limitation to this application.
[0109] The user selects a business tenant from the business tenant set and triggers a business selection request for the business tenant. The business selection request carries the identifier of the business tenant to be requested, where the business tenant to be requested belongs to the business tenant set. Thus, business processing information generated based on the business tenant to be requested is fed back to the client according to the business selection request, and the client can display the business processing information. A business tenant is associated with a metadata tenant set, and the metadata tenant set includes at least one metadata tenant. It is understandable that the business tenant and the metadata tenant can be a one-to-one mapping relationship, or a one-to-many mapping relationship, or a many-to-one mapping relationship, or a many-to-many mapping relationship.
[0110] In conjunction with Table 4, assuming that the user selects "Business Tenant_01" from the business tenant set as the business tenant to be requested, based on this, please refer to Table 5, which is an illustration of the relationship between the business tenant to be requested and the metadata tenant set to be requested.
[0111] Table 5
[0112]
[0113]
[0114] It should be noted that the corresponding relationship shown in Table 5 is only an illustration and should not be understood as a limitation to this application.
[0115] Secondly, the embodiments of this application provide a metadata management method for a multi-tenant system. To meet the needs of unified multi-tenant metadata management in public cloud scenarios, this application abstractly designs a multi-dimensional tenant domain model, namely metadata tenants and business tenants. This can meet the needs of different business scenarios for unified metadata and provide multi-tenant online data catalog management capabilities for public clouds.
[0116] Based on the various embodiments corresponding to FIG. 5 above, in another optional embodiment provided by the embodiment of the present application, in response to a type selection request sent by a client, sending service processing information generated based on the requested service tenant to the client may specifically include:
[0117] In response to the service selection request sent by the client, determining a set of metadata tenants to be requested, wherein the set of metadata tenants to be requested has a mapping relationship with the service tenants to be requested;
[0118] Obtain a set of metadata tables to be requested that have a mapping relationship with the set of metadata tenants to be requested;
[0119] Obtain business data according to the metadata table set to be requested, and process the business data to obtain business processing information;
[0120] Send business processing information to the client.
[0121] In one or more embodiments, a method for performing business processing in different business scenarios is introduced. As can be seen from the aforementioned embodiments, business tenants and metadata tenants are associated through tenant dimension mapping. The tenant dimension mapping can be expressed in the form of a mapping table. Based on this, according to the identifier of the requested business tenant carried in the business selection request, the corresponding set of metadata tenants to be requested can be determined. Thus, a set of metadata tables to be requested that has a mapping relationship with the set of metadata tenants to be requested is obtained. Relevant business data is obtained in combination with the set of metadata tables to be requested. Thus, the business data is processed accordingly according to the type of business to be requested to obtain business processing information, which is then sent to the client.
[0122] For example, please refer to Figure 8, which is a schematic diagram of associating metadata tenants based on business scenarios in an embodiment of the present application. As shown in the figure, taking the data development platform as an example, a business tenant represents a workspace, and a workspace can correspond to a metadata tenant set (that is, including at least one metadata tenant). Therefore, there is a one-to-many mapping relationship between business tenants and metadata tenants. For example, the metadata tenant set corresponding to workspace_01 includes metadata tenant A, metadata tenant B, and metadata tenant C. The metadata tenant set corresponding to workspace_02 includes metadata tenant D and metadata tenant E.
[0123] For example, please refer to Figure 9, which shows another schematic diagram of associating metadata tenants based on business scenarios in an embodiment of this application. As shown in the figure, using the data development platform as an example, metadata tenants and business tenants have a many-to-many mapping relationship. For example, the metadata tenant set corresponding to Workspace_01 includes metadata tenant A, metadata tenant B, and metadata tenant C. The metadata tenant set corresponding to Workspace_02 includes metadata tenant B, metadata tenant C, metadata tenant D, and metadata tenant E.
[0124] For example, please refer to Figure 10, which is another schematic diagram of associating metadata tenants based on business scenarios in an embodiment of the present application. As shown in the figure, using the DLC or DLF business scenario as an example, each business tenant represents a data source, and each data source corresponds to a metadata tenant. Therefore, there is a one-to-one mapping between business tenants and metadata tenants. For example, Data Source_01 corresponds to Metadata Tenant A, and Data Source_02 corresponds to Metadata Tenant B.
[0125] Furthermore, in an embodiment of the present application, a method for performing business processing in different business scenarios is provided. Through this method, the association between two tenant dimensions is achieved based on tenant dimension mapping. Specifically, the mapping relationship between metadata tenants and business tenants is defined through tenant dimension mapping. This mapping relationship is related to specific business logic requirements and is mapped in conjunction with specific business scenarios, thereby realizing a universal and multi-scenario central metadata online data catalog management system. This online data catalog management system has the advantages of high scalability, high performance, and high fault tolerance, and supports rapid adaptation and docking of multiple computing engines.
[0126] Based on the various embodiments corresponding to the above Figure 5, in another optional embodiment provided by the embodiment of the present application, if the account authentication request is successfully verified, the cloud account information is stored in the pending session, wherein the pending session is created based on the account authentication request; when a remote procedure call RPC request is received, the cloud account information is obtained from the pending session.
[0127] Based on this, in another optional embodiment provided by the embodiment of the present application, receiving the account authentication request sent by the client may specifically include:
[0128] The account authentication request sent by the client is received through the communication interface to be requested, where the communication interface to be requested is a communication interface natively supported by the client.
[0129] In one or more embodiments, a method for enhancing security authentication while achieving compatibility among multiple computing engines is introduced. It can be seen from the aforementioned embodiments that, considering that some native online metadata management services (for example, Hive Metastore) are general and recognized online data directory management components, many big data components are adapted to connect to general data directory management component services (i.e., Hive Metastore) for data directory management. In order to reduce the switching costs of existing components and clients, and support fast and efficient metadata system switching, this application designs a set of RPC interface services that are compatible with general data directory management component services (i.e., Hive Metastore), and completes metadata switching docking at a relatively low transformation cost. In addition to providing RPC interface calls for big data computing and analysis engines, an HTTP interface is also provided to support data directory management operations on the interface to meet the diverse usage requirements of upper-level business products.
[0130] For ease of understanding, please refer to Figure 11, which is a schematic diagram of the compatibility of multiple computing engines in an embodiment of the present application. As shown in the figure, taking the native Hive Metastore as an example, an interface class IHMSHandler is defined in the native Hive Metastore, and this class inherits the ThriftHiveMetastore.Iface defined by the RPC interface. The HMSHandler class implements all interfaces defined by IHMSHandler and performs persistence of single-tenant metadata based on the Java Data Objects (JDO) framework. Commonly used metadata storage databases include but are not limited to databases written in Java (Derby), relational database management systems (MySQL), and object-relational database management systems (PostgreSQL). In order to ensure RPC interface compatibility, the present application creates and implements a custom Handler class, which inherits the IHMSHandler interface and completely reimplements the metadata management logic. The custom Handler mainly performs authentication and data encapsulation processing on the request parameters, and calls the service layer of the metadata underlying service through the RPC interface inside the metadata to implement persistence operations.
[0131] In the case of RPC interface compatibility, the RPC interface can also be strengthened with security authentication. For ease of understanding, please refer to Figure 12, which is a flow chart of information authentication in an embodiment of the present application. As shown in the figure, the existing interface set_ugi can be reused to transmit authentication information. Among them, the native set_ugi interface is used to set the user group information (UserGroupInformation, UGI) of the distributed system infrastructure (for example, Hadoop) used in the Hive type, that is, set_ugi (set UserGroupInformation). Due to the public cloud scenario, the user group information of Hadoop cannot be used based on COS storage. Therefore, it is necessary to rewrite and reuse this method to receive cloud account information and perform authentication verification.
[0132] In step A1, the metadata store client (Metastore Client) creates an RPC connection.
[0133] In step A2, the Metastore Client sends an account authentication request to the metadata store (Hybris Metastore) through the pending communication interface (ie, the native set_ugi interface).
[0134] In step A3, the Hybris Metastore calls the RPC server to verify the account authentication request, which can be achieved through an authentication center, for example. If the cloud account information fails to pass the authentication, the RPC call is closed.
[0135] In step A4, if the cloud account information passes the authentication, the cloud account information will be stored in the pending session (session) of this call. When the account authentication request passes, the pending session can be created in the local thread (ThreadLocal).
[0136] In step A5, the Metastore Client initiates another RPC request to the Hybris Metastore.
[0137] In step A6, the cloud account information required for the RPC request is obtained from the pending session of ThreadLocal.
[0138] Secondly, the embodiments of this application provide a method for enhancing security authentication while achieving compatibility with multiple computing engines. This method creates and implements a custom Handler class that inherits the IHMSHandler interface and reimplements the metadata management logic. The custom Handler class primarily authenticates request parameters and encapsulates data. Ultimately, it calls the metadata underlying service layer through the RPC interface within the metadata to perform persistence operations. Furthermore, existing interfaces can be directly reused to strengthen security authentication of the RPC interface, thereby improving data security.
[0139] In the case where cloud account information can be obtained from the requested session through an RPC request, in another optional embodiment provided by the embodiment of the present application, receiving the account authentication request sent by the client may specifically include:
[0140] Receiving an account authentication request sent by a client, wherein the account authentication request is generated by the client after encapsulating the cloud account information by calling the first transmission method;
[0141] The second transmission method is called to decapsulate the account authentication request to obtain cloud account information, wherein the second transmission method and the first transmission method use the same protocol type.
[0142] In one or more embodiments, another method for enhancing security authentication while achieving multi-computing engine compatibility is introduced. As can be seen from the aforementioned embodiments, in order to reduce the switching costs of existing components and clients and support fast and efficient metadata system switching, this application not only designs a set of RPC interface services compatible with native online metadata management services, but also provides an HTTP interface to support data directory management operations, meeting the diverse usage requirements of upper-level business products.
[0143] It should be noted that the design of multi-computing engine compatibility can be referred to Figure 11 and the corresponding description of Figure 11, which will not be repeated here. In the case of RPC interface compatibility, the RPC interface can also be strengthened with security authentication. For ease of understanding, please refer to Figure 13, which is another schematic flow chart of information authentication in an embodiment of the present application. As shown in the figure, the RPC server uses TSaslServerTranspor and customizes the authentication call function (CallbackHandler) to obtain the authentication information from the RPC client connection for verification.
[0144] In step B1, the metadata store client (Metastore Client) establishes an RPC connection and sends an account authentication request to the metadata store (Hybris Metastore).
[0145] In step B2, the Hybris Metastore calls the RPC server to verify the account authentication request, which can be achieved through an authentication center, for example. If the cloud account information fails to pass the authentication, the RPC call is closed.
[0146] In step B3, if the cloud account information passes the authentication, the cloud account information will be stored in the pending session (session) of this call. When the account authentication request passes, the pending session can be created in the local thread (ThreadLocal).
[0147] In step B4, the Metastore Client initiates another RPC request to the Hybris Metastore.
[0148] In step B5, the cloud account information required for the RPC request is obtained from the pending session of ThreadLocal.
[0149] Under the expanded RPC authentication framework, corresponding modules have been added to both the RPC server and the RPC client. See Figure 14, which shows a schematic diagram of information authentication based on the security framework in an embodiment of the present application. As shown, the RPC server calls the TSaslServerTransport method to authenticate cloud account information, and the RPC client calls the TSaslClientTransport method to encapsulate the authentication information. Finally, the TSaslTransport method and the TTransport method can be called to perform secure authentication transmission.
[0150] Secondly, the embodiments of this application provide another method for enhancing security authentication while achieving compatibility with multiple computing engines. Through the above method, a custom Handler class is created and implemented. This Handler class inherits the IHMSHandler interface and reimplements the metadata management logic. The custom Handler class primarily authenticates and encapsulates request parameters, and ultimately calls the metadata underlying service layer through the RPC interface within the metadata to perform persistence operations. In addition, authentication can be performed on each request, which helps improve authentication security.
[0151] Based on the various embodiments corresponding to FIG. 5 above, another optional embodiment provided by the embodiment of the present application may further include:
[0152] If the account authentication request is successfully verified, a metadata table creation request sent by the client is received, wherein the metadata table creation request carries a first object parameter, and the first object parameter includes metadata category information;
[0153] Perform parameter verification on the first object parameter carried in the metadata table creation request;
[0154] If the first object parameter verification passes, a metadata table is created according to the metadata category information.
[0155] In one or more embodiments, a method for creating a metadata table is described. As can be seen from the aforementioned embodiments, the online service provides an RPC interface method. Based on this, after the account authentication request is successfully verified, the create_table method can be called to create the metadata table based on the metadata table creation request sent by the client. The metadata table creation request carries a first object parameter, which includes metadata category information and other parameters. The metadata category information is used to indicate the data type, such as the Hive type. After the first object parameter is verified, if the verification is successful, the corresponding metadata table is created.
[0156] For ease of understanding, the metadata table creation process will be introduced below with reference to diagrams. Please refer to Figure 15, which is a flow chart of creating a metadata table in an embodiment of the present application. As shown in the figure, the online metadata service (Hybris MetaStore) includes an online metadata service processor (HybrisMetastoreHandler) and a METASTORE table converter (MetastoreTableConverter), and the core basic service (Hybris Service) includes a metadata table service (MetaTblService), a Hive table service (HiveTblService), and an Elastic Search (ES) index.
[0157] In step C1, HybrisMetastoreHandler calls the create_table method to create the metadata table.
[0158] In step C1.1, user authentication is performed, that is, the client's cloud account information is obtained, and authentication verification is performed at the authentication center to determine whether the user is authenticated. If the authentication is passed, the execution continues, otherwise the connection will be disconnected.
[0159] In step C1.2, object encapsulation and service interface call are performed, that is, the first object parameter of the RPC interface is obtained, the first object parameter is encapsulated, and converted into the request parameter object required by the underlying service.
[0160] In step C1.3, the creation interface of the underlying service is requested through an inter-service call. The underlying service is a basic component used to encapsulate the final persistence operation of the management metadata.
[0161] In step C1.3.1, general pre-verification of table creation is performed, for example, to determine whether all parameters are complete and whether there are any tenant resource restrictions, such as the number of data tables that can be created by the database.
[0162] In step C1.3.2, after the pre-verification succeeds, based on the metadata category information specified by the input parameter, if it is a Hive type metadata operation, the Hive metadata table management class HiveTblService is called to perform the creation.
[0163] In step C1.3.2.1, a pre-check is performed, for example, to determine whether the corresponding database exists.
[0164] In step C1.3.2.2, after the pre-verification is completed, the serialized object storage descriptor (SDS) of the metadata table is saved.
[0165] In step C1.3.2.3, save the table information.
[0166] In step C1.3.2.4, save the field information associated with the table, including partition and non-partition fields.
[0167] In step C1.3.3, a general table creation post-hook execution method is adopted to implement corresponding operations through the asynchronous event processing mechanism.
[0168] In step C1.3.3.1, the metadata table information is synchronized to the ES index to facilitate global retrieval of metadata information.
[0169] Secondly, in an embodiment of the present application, a method for creating a metadata table is provided. Through the above method, the creation of the metadata table can be implemented based on the RPC interface method provided by the online service. Therefore, while being compatible with multiple computing engines, the metadata underlying service is called through the RPC interface inside the metadata to perform persistence operations, thereby improving the feasibility and operability of the solution.
[0170] Based on the various embodiments corresponding to FIG. 5 above, another optional embodiment provided by the embodiment of the present application may further include:
[0171] If the account authentication request is successfully verified, a metadata table update request sent by the client is received, wherein the metadata table update request carries a second object parameter, and the second object parameter includes metadata category information and table name information;
[0172] Perform parameter verification on the second object parameter carried in the metadata table update request;
[0173] If the second object parameter verification passes, the metadata table is obtained according to the table name information;
[0174] Delete the field information in the metadata table and update the metadata table according to the metadata category information.
[0175] In one or more embodiments, a method for updating a metadata table is introduced. As can be seen from the aforementioned embodiments, the online service provides an RPC interface method, based on which, after the account authentication request is successfully verified, the alter_table method can be called to update the metadata table according to the metadata table update request sent by the client. Among them, the metadata table update request carries a second object parameter, and the second object parameter includes metadata category information and table name information, etc. The metadata category information is used to indicate the data type, for example, the Hive type. After the second object parameter is verified, if the verification is successful, the metadata table is obtained according to the table name information, and then the field information in the metadata table is deleted, and the field is recreated according to the metadata category information, thereby updating the metadata table.
[0176] For ease of understanding, the metadata table creation process will be introduced below with reference to diagrams. Please refer to Figure 16, which is a flow chart of updating the metadata table in an embodiment of the present application. As shown in the figure, the online metadata service (Hybris MetaStore) includes an online metadata service processor (HybrisMetastoreHandler) and a METASTORE table converter (MetastoreTableConverter), and the core basic service (Hybris Service) includes a metadata table service (MetaTblService), a Hive table service (HiveTblService), and an Elastic Search (ES) index.
[0177] In step D1, HybrisMetastoreHandler calls the alter_table method to update the metadata table.
[0178] In step D1.1, user authentication is performed, that is, the client's cloud account information is obtained, and authentication verification is performed at the authentication center to determine whether the user is authenticated. If the authentication is passed, the execution continues, otherwise the connection will be disconnected.
[0179] In step D1.2, object encapsulation and service interface call are performed, that is, the second object parameter of the RPC interface is obtained, the second object parameter is object encapsulated, and converted into the request parameter object required by the underlying service.
[0180] In step D1.3, an update interface of the underlying service is requested through an inter-service call. The underlying service is a basic component used to encapsulate the final persistence operation of the metadata management.
[0181] In step D1.3.1, general pre-verification of table creation is performed, for example, to determine whether the parameters are complete and whether there are any tenant resource restrictions, such as the number of data tables that can be created by the database.
[0182] In step D1.3.2, after the pre-verification succeeds, based on the metadata category information specified by the input parameter, if it is a Hive type metadata operation, the Hive metadata table management class HiveTblService is called to perform the update operation.
[0183] In step D1.3.2.1, a pre-check is performed, for example, determining whether the corresponding database exists and performing a table rename check.
[0184] In step D1.3.2.2, after the pre-verification is completed, the original information of the old table of the table to be updated is obtained.
[0185] In step D1.3.2.3, it is determined whether there is a table field cascade operation.
[0186] In step D1.3.2.4, the serialized object storage descriptor (SDS) of the metadata table is updated.
[0187] In step D1.3.2.5, the table information is updated.
[0188] In step D1.3.2.6, delete the original full field information.
[0189] In step D1.3.2.7, rebuild the field information associated with the entire table (including partitioned and non-partitioned fields)
[0190] In step D1.3.3, a general table creation post-hook execution method is adopted to implement corresponding operations through an asynchronous event processing mechanism.
[0191] In step D1.3.3.1, the metadata table information is synchronized to the ES index to facilitate global retrieval of metadata information.
[0192] Secondly, in an embodiment of the present application, a method for updating the metadata table is provided. Through the above method, the metadata table can be changed based on the RPC interface method provided by the online service. Therefore, while being compatible with multiple computing engines, the metadata underlying service is called through the RPC interface inside the metadata to perform persistence operations, thereby improving the feasibility and operability of the solution.
[0193] Based on the various embodiments corresponding to FIG. 5 above, another optional embodiment provided by the embodiment of the present application may further include:
[0194] If the account authentication request is successfully verified, a metadata table deletion request sent by the client is received, wherein the metadata table deletion request carries a third object parameter, and the third object parameter includes metadata category information and table name information;
[0195] Perform parameter verification on the third object parameter carried in the metadata table deletion request;
[0196] If the third object parameter verification passes, the metadata table is deleted according to the table name information.
[0197] In one or more embodiments, a method for deleting a metadata table is introduced. As can be seen from the aforementioned embodiments, the online service provides an RPC interface method. Based on this, after the account authentication request is successfully verified, the alter_table method can be called to delete the metadata table according to the metadata table deletion request sent by the client. Among them, the metadata table deletion request carries a third object parameter, and the third object parameter includes metadata category information and table name information. The metadata category information is used to indicate the data type, for example, the Hive type. After the third object parameter is verified, if the verification is successful, the metadata table is obtained according to the table name information, and then the field information in the metadata table is deleted, thereby deleting the metadata table.
[0198] For ease of understanding, the metadata table creation process will be introduced below with reference to diagrams. Please refer to Figure 17, which is a flow chart of deleting a metadata table in an embodiment of the present application. As shown in the figure, the online metadata service (Hybris MetaStore) includes an online metadata service processor (HybrisMetastoreHandler) and a METASTORE table converter (MetastoreTableConverter), and the core basic service (Hybris Service) includes a metadata table service (MetaTblService), a Hive table service (HiveTblService), and an Elastic Search (ES) index.
[0199] In step E1, HybrisMetastoreHandler calls the delete_table method to delete the metadata table.
[0200] In step E1.1, user authentication is performed, that is, the client's cloud account information is obtained, and authentication verification is performed at the authentication center to determine whether the user is authenticated. If the authentication is passed, the execution continues, otherwise the connection will be disconnected.
[0201] In step E1.2, object encapsulation and service interface call are performed, that is, the third object parameter of the RPC interface is obtained, the third object parameter is object encapsulated, and converted into the request parameter object required by the underlying service.
[0202] In step E1.3, a deletion interface of the underlying service is requested through an inter-service call. The underlying service is a basic component used to encapsulate the final persistence operation of the management metadata.
[0203] In step E1.3.1, general pre-verification of table creation is performed, for example, to determine whether all parameters are complete and whether there are any tenant resource restrictions, such as the number of data tables that can be created by the database.
[0204] In step E1.3.2, after the pre-verification succeeds, based on the metadata category information specified by the input parameter, if it is a Hive type metadata operation, the Hive metadata table management class HiveTblService is called to perform the deletion operation.
[0205] In step E1.3.2.1, a pre-check is performed, for example, determining whether the corresponding database exists and performing table rename check.
[0206] In step E1.3.2.2, after the pre-verification is completed, the original information of the old table of the table to be deleted is obtained.
[0207] In step E1.3.2.3, it is determined whether there is a table field cascade operation.
[0208] In step E1.3.2.4, the serialized object storage descriptor (SDS) of the metadata table is deleted.
[0209] In step E1.3.2.5, the table information is deleted.
[0210] In step E1.3.2.6, delete the original full field information.
[0211] In step E1.3.3, a general table creation post-hook execution method is adopted to implement corresponding operations through the asynchronous event processing mechanism.
[0212] In step E1.3.3.1, the metadata table information is synchronized to the ES index to facilitate global retrieval of metadata information.
[0213] Secondly, in an embodiment of the present application, a method for deleting a metadata table is provided. Through the above method, the metadata table can be deleted based on the RPC interface method provided by the online service. Therefore, while being compatible with multiple computing engines, the metadata underlying service is called through the RPC interface inside the metadata to perform persistence operations, thereby improving the feasibility and operability of the solution.
[0214] Based on the various embodiments corresponding to FIG. 5 above, in another optional embodiment provided by the embodiment of the present application, the data table query request further carries a fourth object parameter, wherein the fourth object parameter includes query information;
[0215] In response to a data table query request sent by a client, sending the requested metadata table to the client may specifically include:
[0216] Perform parameter verification on the fourth object parameter carried in the data table query request;
[0217] If the fourth object parameter verification passes, the metadata table to be requested is sent to the client according to the query information.
[0218] In one or more embodiments, a method for searching a metadata table is described. As can be seen from the aforementioned embodiments, the online service provides an RPC interface method. Based on this, after the account authentication request is successfully verified, the metadata table can be queried based on a data table query request sent by the client. The metadata table creation request carries a fourth object parameter, which includes metadata category information and table name information. After the fourth object parameter is verified successfully, the corresponding metadata table is queried.
[0219] For ease of understanding, the query process of the metadata table will be introduced below with reference to diagrams. Please refer to Figure 18, which is a flow chart of querying the metadata table in an embodiment of the present application. As shown in the figure, the online metadata service (Hybris MetaStore) includes an HMS processor (HybrisMetastoreHandler) and a METASTORE table converter (MetastoreTableConverter), and the core basic service (Hybris Service) includes a metadata table service (MetaTblService), a Hive table service (HiveTblService) and an elastic search (ES) index.
[0220] In step F1, HybrisMetastoreHandler calls the query_table method to query the metadata table.
[0221] In step F1.1, user authentication is performed, that is, the client's cloud account information is obtained, and authentication verification is performed at the authentication center to determine whether the user is authenticated. If the authentication is passed, the execution continues, otherwise the connection will be disconnected.
[0222] In step F1.2, object encapsulation and service interface call are performed, that is, the fourth object parameter of the RPC interface is obtained, the fourth object parameter is object encapsulated, and converted into the request parameter object required by the underlying service.
[0223] In step F1.3, a query interface of the underlying service is requested through an inter-service call. The underlying service is a basic component used to encapsulate the final persistence operation of the management metadata.
[0224] In step F1.3.1, general pre-verification of table creation is performed, for example, to determine whether the parameters are complete and whether there are any tenant resource restrictions, such as the number of data tables that can be created by the database.
[0225] In step F1.3.2, after the pre-verification succeeds, based on the metadata category information specified by the input parameter, if it is a Hive type metadata operation, the Hive metadata table management class HiveTblService is called to execute the query.
[0226] In step F1.3.2.1, a pre-check is performed, for example, determining whether the corresponding database exists and performing a table rename check.
[0227] In step F1.3.2.2, after the pre-verification is completed, the queried table details are obtained.
[0228] In step F1.3.3, a general table creation post-hook execution method is adopted to implement corresponding operations through the asynchronous event processing mechanism.
[0229] Secondly, in an embodiment of the present application, a method for searching a metadata table is provided. Through the above method, the metadata table can be searched based on the RPC interface method provided by the online service. Thus, while being compatible with multiple computing engines, the metadata underlying service is called through the RPC interface inside the metadata to perform persistence operations, thereby improving the feasibility and operability of the solution.
[0230] Based on the various embodiments corresponding to FIG. 5 above, another optional embodiment provided by the embodiment of the present application may further include:
[0231] When a first query request is received, determining a metadatabase corresponding to the metadatabase foreign key from the first metadata table according to the first query request, wherein the first query request carries a table identifier, and the table identifier has an association relationship with the metadatabase foreign key;
[0232] When a second query request is received, determining a metadata table corresponding to the metadata table foreign key from the second metadata table according to the second query request, wherein the second query request carries a field, and the field has an association relationship with the metadata table foreign key;
[0233] When a third query request is received, determining a metadata table corresponding to the metadata table foreign key from the third metadata table according to the third query request, wherein the third query request carries a partition identifier, and the partition identifier has an association relationship with the metadata table foreign key;
[0234] When a fourth query request is received, determining a storage descriptor corresponding to the storage table foreign key from a fourth metadata table according to the fourth query request, wherein the fourth query request carries a partition identifier, and the partition identifier has an association relationship with the storage table foreign key;
[0235] When a fifth query request is received, determining a storage descriptor corresponding to the storage table foreign key from the fifth metadata table according to the fifth query request, wherein the fifth query request carries a table identifier, and the table identifier has an association relationship with the storage table foreign key;
[0236] When a sixth query request is received, the metadatabase corresponding to the metadatabase foreign key is determined from the sixth metadata table according to the sixth query request, wherein the sixth query request carries a function identifier, and the function identifier is associated with the metadatabase foreign key.
[0237] In one or more embodiments, another general metadata data model is introduced. As can be seen from the aforementioned embodiments, the native data model has a relatively complex design for data modules and performs association operations between multiple tables, resulting in slow metadata reading and writing. In addition, the native data model cannot support multi-tenant design. Therefore, this application transforms and streamlines the native data model, which can only achieve logical partitioning of metadata under multi-tenancy and improve metadata reading and writing performance.
[0238] For ease of understanding, please refer to Figure 19, which is a schematic diagram of a general metadata data model in an embodiment of the present application. As shown in the figure, the metadata data model includes a metadata database (DBS), metadata tables (TBLS), fields (COLUMNS), storage descriptors (SDS), partitions (PARTITIONS), partition fields (PART_COLUMNS), user-defined functions (UDFs), and UDF resources (UDF Resources). These models are described below.
[0239] The metadata database (DBS) is a database definition used to maintain basic information of a general database (e.g., database name, database description, etc.) and its metadata tenants.
[0240] The metadata table (TBLS) is the definition of a data table and is used to maintain basic information of a general data table (for example, table name, table description, etc.) and the metadata tenant to which it belongs.
[0241] The fields (COLUMNS) include non-partition and partition field definitions of Hive-like tables and are used to maintain basic field information (for example, field name, field type, etc.).
[0242] A storage descriptor (SDS) is a serialized storage description of a Hive table, used to maintain serialization information (for example, serialization name, serialization lib package, etc.);
[0243] PARTITIONS is the partition information of a Hive table and is used to maintain table partition details (for example, specific partition names, etc.).
[0244] The partition field (PART_COLUMNS) is the partition field definition of the Hive table. Each partition of the Hive-like table can independently maintain the corresponding field information. If not maintained, the table partition field definition is used as the primary default.
[0245] For example, the metadata table (TBLS) maintains the association between tables and libraries through a metadata library foreign key (i.e., DB_ID). Table records can be linked to corresponding library records in the metadata library (DBS). For example, when a first query request is received, the metadata library (DBS) corresponding to the DB_ID can be found based on the table identifier (i.e., TBL_ID) carried in the first query request and the association between TBL_ID and DB_ID, thereby implementing a data query.
[0246] For example, the field (COLUMNS) maintains an association between the field and the table through the metadata table FK (i.e., TBL_ID). The field record can be linked to the corresponding table record in the metadata table (TBLS). For example, when a second query request is received, the metadata table (TBLS) corresponding to the TBL_ID can be found based on the field carried in the second query request and the association between the field and TBL_ID, thereby implementing data query.
[0247] For example, partitions (PARTITIONS) maintain the association between partitions and tables through the metadata table FK (i.e., TBL_ID). Partition records can be linked to corresponding table records in the metadata table (TBLS). For example, when a third query request is received, the metadata table (TBLS) corresponding to the TBL_ID can be found based on the partition identifier (i.e., PART_ID) carried in the third query request and the association between PART_ID and TBL_ID, thereby implementing data query.
[0248] For example, PARTITIONS maintains an association between partitions and storage descriptors through the storage table FK (i.e., SD_ID). Partition records can be associated with corresponding records in the storage descriptor (SDS). For example, when a fourth query request is received, the storage descriptor (SDS) corresponding to the SD_ID can be found based on the partition identifier (i.e., PART_ID) carried in the fourth query request and the association between PART_ID and SD_ID, thereby enabling data query.
[0249] Exemplarily, the metadata table (TBLS) maintains the association between the table and the storage descriptor by storing the table FK (i.e., SD_ID). Table records can be linked to corresponding records in the storage descriptor (SDS). For example, upon receiving the fifth query request, the storage descriptor (SDS) corresponding to the SD_ID can be found based on the table identifier (i.e., TBL_ID) carried in the fifth query request and the association between TBL_ID and SD_ID, thereby enabling data query.
[0250] For example, the UDF maintains the association between functions and libraries through the metadata library FK (i.e., DB_ID). This allows the function to be associated with the corresponding library record in the metadata library (DBS). For example, when the sixth query request is received, the metadata library (DBS) corresponding to the DB_ID can be found based on the function identifier (i.e., func_ID) carried in the sixth query request and the association between func_ID and DB_ID, thereby enabling data query.
[0251] Secondly, the embodiments of this application provide a general metadata data model. For Hive-type data, a more streamlined general data model is designed to logically partition metadata resources while supporting metadata multi-tenancy. By optimizing the design of the underlying data model, metadata management performance can be improved, metadata read and write performance can be accelerated, and multi-table dependencies in the database can be removed, enabling dependency relationships to be implemented logically. Furthermore, based on a distributed storage system, it can support the storage and management of massive amounts of metadata.
[0252] Based on the various embodiments corresponding to FIG. 5 above, another optional embodiment provided by the embodiment of the present application may further include:
[0253] When a first query request is received, determining a metadatabase corresponding to the metadatabase foreign key from the first metadata table according to the first query request, wherein the first query request carries a table identifier, and the table identifier has an association relationship with the metadatabase foreign key;
[0254] When a second query request is received, a metadata table corresponding to the metadata table foreign key is determined from the second metadata table according to the second query request, wherein the second query request carries a field, and the field has an association relationship with the metadata table foreign key.
[0255] In one or more embodiments, another general metadata data model is introduced. As can be seen from the aforementioned embodiments, the native data model has a relatively complex design for data modules and performs association operations between multiple tables, resulting in slow metadata reading and writing. In addition, the native data model cannot support multi-tenant design. Therefore, this application transforms and streamlines the native data model, which can only achieve logical partitioning of metadata under multi-tenancy and improve metadata reading and writing performance.
[0256] For easier understanding, please refer to Figure 20, which is another schematic diagram of the general metadata data model in the embodiment of the present application. As shown in the figure, the metadata data model includes a metadata database (DBS), metadata tables (TBLS), and fields (COLUMNS). The description of these models is shown in the corresponding embodiment of Figure 19 and will not be repeated here.
[0257] For example, the metadata table (TBLS) maintains the association between tables and libraries through the metadata library FK (i.e., DB_ID). Table records can be linked to corresponding library records in the metadata library (DBS). For example, when a first query request is received, the metadata library (DBS) corresponding to the DB_ID can be found based on the table identifier (i.e., TBL_ID) carried in the first query request and the association between TBL_ID and DB_ID, thereby implementing a data query.
[0258] For example, the field (COLUMNS) maintains an association between the field and the table through the metadata table FK (i.e., TBL_ID). The field record can be linked to the corresponding table record in the metadata table (TBLS). For example, when a second query request is received, the metadata table (TBLS) corresponding to the TBL_ID can be found based on the field carried in the second query request and the association between the field and TBL_ID, thereby implementing data query.
[0259] Secondly, in the embodiments of the present application, another general metadata data model is provided. For non-Hive type data, a more streamlined general data model is designed. For example, the metadata in the storage system database management system can adopt this data model, and only the metadata of the library, table and field need to be concerned. While supporting metadata multi-tenancy, the metadata resources are logically divided. By optimizing the design of the underlying data model, the performance of metadata management can be improved, the metadata reading and writing performance can be accelerated, the multi-table dependency of the database can be removed, and the dependency relationship can be realized through logic. In addition, based on the distributed storage system, it can support the storage and management of massive metadata.
[0260] Based on the above introduction, the following will evaluate the performance of the data catalog management provided by this application. Compared to native data catalog management (for example, Hive Metastore data catalog management), this application implements universal public cloud multi-tenant metadata online data catalog management. It can provide services to different accounts on the cloud with a set of Software-as-a-Service (SaaS) metadata management services, supporting scalable, highly scalable, and low-cost metadata management.
[0261] In addition, the performance of the online directory management of unified metadata has been greatly improved. For ease of explanation, please refer to Figure 21, which is a comparative diagram of the response time in the embodiment of the present application. As shown in the figure, the data directory management provided by the present application has a significant reduction in the response time in creating libraries, creating tables, and creating partitions compared to the native data directory management. Please refer to Figure 22, which is a comparative diagram of the number of request transactions per second in the embodiment of the present application. As shown in the figure, the data directory management provided by the present application has a significantly improved number of request transactions per second (Transactions Per Second, TPS) compared to the native data directory management. Based on the creation operation of 10 million partitions (wherein the concurrent threads are 200), the native data directory management has a TPS of 1200 for partition operations and an average response time of 160 milliseconds. The data directory management provided by the present application has a TPS of 7000 for partition operations and an average response time of 28 milliseconds.
[0262] The metadata management device in the present application is described in detail below. Please refer to FIG. 23 , which is a schematic diagram of an embodiment of the metadata management device in the present application. The metadata management device 20 includes:
[0263] The receiving module 210 is configured to receive an account authentication request sent by a client, wherein the account authentication request carries cloud account information;
[0264] The sending module 220 is configured to send the metadata tenant set to the client if the account authentication request is successfully verified, wherein the metadata tenant set is bound to the cloud account information;
[0265] The sending module 220 is further configured to send a metadata repository set to the client in response to a tenant selection request sent by the client, wherein the tenant selection request carries an identifier of a metadata tenant to be requested, the metadata tenant to be requested is included in the metadata tenant set, and the metadata repository set and the metadata tenant to be requested have a mapping relationship;
[0266] The sending module 220 is further configured to send a metadata table set to the client in response to a database query request sent by the client, wherein the database query request carries an identifier of a metadata database to be requested, the metadata database to be requested is included in the metadata database set, and the metadata table set has a mapping relationship with the metadata database to be requested.
[0267] In an embodiment of the present application, a metadata management device is provided. Using the above device, the concept of metadata tenants is designed in the upper layer of the metadata database, and the metadata tenants are used as the minimum granularity for isolation between tenants, and a mode of binding multiple metadata tenants to a cloud account is supported. Therefore, when it is necessary to expand the number of multi-tenants supported by the cloud account, it is sufficient to increase the metadata tenants bound to the cloud account, which is conducive to expanding the number of multi-tenants supported by the cloud account, that is, it is conducive to expanding the boundaries of metadata management of the cloud account. For the same metadata tenant, there is an independent metadata management space. For different metadata tenants, the isolation of metadata resources (for example, metadata databases and metadata tables) can be achieved to avoid the metadata resources between different tenants being affected, thereby achieving better metadata management effects.
[0268] Based on the embodiment corresponding to FIG. 23 above, in another embodiment of the metadata management device 20 provided in the embodiment of the present application,
[0269] The sending module 220 is further configured to respond to a database query request sent by the client, send a metadata table set to the client, and then respond to a data table query request sent by the client to send a metadata table to be requested to the client, wherein the data table query request carries an identifier of the metadata table to be requested, and the metadata table to be requested is included in the metadata table set.
[0270] In an embodiment of the present application, a metadata management device is provided. Using this device, the concept of metadata tenants is designed for online data catalog management. This allows for the division of metadata, using metadata tenants as the minimum granularity for multi-tenant isolation. This ensures that metadata under different metadata tenants is isolated from each other and does not affect each other. Therefore, different metadata tenants can perform operations such as querying metadata tables while maintaining metadata isolation, thereby improving the flexibility and feasibility of the solution.
[0271] Based on the embodiment corresponding to FIG. 23 above, in another embodiment of the metadata management device 20 provided in the embodiment of the present application,
[0272] The sending module 220 is further configured to send the business tenant set to the client if the account authentication request verification is successful, wherein the business tenant set is bound to the cloud account information;
[0273] The sending module 220 is further configured to send business processing information generated based on the requested business tenant to the client in response to the business selection request sent by the client, wherein the business selection request carries the identifier of the requested business tenant, and the requested business tenant is included in the business tenant set.
[0274] In an embodiment of this application, a metadata management device is provided. Using this device, to address the unified management of multi-tenant metadata in public cloud scenarios, this application abstractly designs a multi-dimensional tenant domain model, namely, metadata tenants and business tenants. This model can meet the unified metadata needs of various business scenarios and provide multi-tenant online data catalog management capabilities for public clouds.
[0275] Based on the embodiment corresponding to FIG. 23 above, in another embodiment of the metadata management device 20 provided in the embodiment of the present application,
[0276] The sending module 220 is specifically configured to determine a set of metadata tenants to be requested in response to a service selection request sent by a client, wherein the set of metadata tenants to be requested has a mapping relationship with the service tenants to be requested;
[0277] Obtain a set of metadata tables to be requested that have a mapping relationship with the set of metadata tenants to be requested;
[0278] Obtain business data according to the metadata table set to be requested, and process the business data to obtain business processing information;
[0279] Send business processing information to the client.
[0280] In an embodiment of the present application, a metadata management device is provided. Using this device, an association between two tenant dimensions is achieved based on tenant dimension mapping. Specifically, the mapping relationship between metadata tenants and business tenants is defined through tenant dimension mapping. This mapping relationship is related to specific business logic requirements and is mapped in conjunction with specific business scenarios, thereby implementing a universal and multi-scenario central metadata online data catalog management system. This online data catalog management system offers the advantages of high scalability, high performance, and high fault tolerance, and supports rapid adaptation and docking of multiple computing engines.
[0281] Based on the embodiment corresponding to FIG. 23 , in another embodiment of the metadata management device 20 provided in the embodiment of the present application, the metadata management device 20 further includes a processing module 230 and an acquisition module 240 ;
[0282] The processing module 230 is configured to store the cloud account information in a pending request session if the account authentication request is successfully verified, wherein the pending request session is created based on the account authentication request;
[0283] The acquisition module 240 is further configured to acquire cloud account information from the session to be requested when a remote procedure call (RPC) request is received.
[0284] Based on the embodiment corresponding to the above-mentioned Figure 23, in another embodiment of the metadata management device 20 provided in the embodiment of the present application, the receiving module 210 is specifically used to receive the account authentication request sent by the client through the requested communication interface, wherein the requested communication interface is a communication interface natively supported by the client.
[0285] In one embodiment of the present application, a metadata management device is provided. Using this device, a custom Handler class is created and implemented. This Handler class inherits the IHMSHandler interface and reimplements metadata management logic. The custom Handler class primarily authenticates request parameters and encapsulates data. Ultimately, it calls the metadata underlying service layer through an RPC interface within the metadata to perform persistence operations. Furthermore, existing interfaces can be directly reused, strengthening the security authentication of the RPC interface and thus improving data security.
[0286] Based on the embodiment corresponding to FIG. 23 above, in another embodiment of the metadata management device 20 provided in the embodiment of the present application,
[0287] The receiving module 210 is specifically configured to receive an account authentication request sent by a client, wherein the account authentication request is generated by the client after encapsulating the cloud account information by calling the first transmission method;
[0288] The second transmission method is called to decapsulate the account authentication request to obtain cloud account information, wherein the second transmission method and the first transmission method use the same protocol type.
[0289] In one embodiment of the present application, a metadata management device is provided. Using this device, a custom Handler class is created and implemented. This Handler class inherits the IHMSHandler interface and reimplements metadata management logic. The custom Handler class primarily authenticates request parameters and encapsulates data. Ultimately, it calls the metadata underlying service layer through an RPC interface within the metadata to perform persistence operations. Furthermore, each request can be authenticated, thereby enhancing authentication security.
[0290] Based on the embodiment corresponding to FIG. 23 above, in another embodiment of the metadata management device 20 provided in the embodiment of the present application,
[0291] The receiving module 210 is further configured to receive a metadata table creation request sent by the client if the account authentication request is successfully verified, wherein the metadata table creation request carries a first object parameter including metadata category information;
[0292] The processing module 230 is further configured to perform parameter verification on the first object parameter carried in the metadata table creation request;
[0293] The processing module 230 is further configured to create a metadata table according to the metadata category information if the first object parameter verification passes.
[0294] In an embodiment of the present application, a metadata management device is provided. Using this device, metadata tables can be created based on the RPC interface method provided by online services. This allows for persistence operations to be performed by calling the underlying metadata service through the RPC interface within the metadata, while being compatible with multiple computing engines. This improves the feasibility and operability of the solution.
[0295] Based on the embodiment corresponding to FIG. 23 above, in another embodiment of the metadata management device 20 provided in the embodiment of the present application,
[0296] The receiving module 210 is further configured to receive a metadata table update request sent by the client if the account authentication request is successfully verified, wherein the metadata table update request carries a second object parameter, and the second object parameter includes metadata category information and table name information;
[0297] The processing module 230 is further configured to perform parameter verification on the second object parameter carried in the metadata table update request;
[0298] The acquisition module 240 is further configured to acquire the metadata table according to the table name information if the second object parameter verification passes;
[0299] The processing module 230 is further configured to delete the field information in the metadata table and update the metadata table according to the metadata category information.
[0300] In an embodiment of the present application, a metadata management device is provided. Using this device, metadata tables can be modified based on the RPC interface method provided by the online service. This allows for persistence operations to be performed by calling the underlying metadata service through the RPC interface within the metadata, while being compatible with multiple computing engines. This improves the feasibility and operability of the solution.
[0301] Based on the embodiment corresponding to FIG. 23 above, in another embodiment of the metadata management device 20 provided in the embodiment of the present application,
[0302] The receiving module 210 is further configured to receive a metadata table deletion request sent by the client if the account authentication request verification succeeds, wherein the metadata table deletion request carries a third object parameter, and the third object parameter includes metadata category information and table name information;
[0303] The processing module 230 is further configured to perform parameter verification on the third object parameter carried in the metadata table deletion request;
[0304] The processing module 230 is further configured to delete the metadata table according to the table name information if the third object parameter verification passes.
[0305] In an embodiment of the present application, a metadata management device is provided. Using this device, metadata tables can be deleted based on the RPC interface method provided by the online service. This allows for persistence operations to be performed by calling the underlying metadata service through the RPC interface within the metadata, while being compatible with multiple computing engines. This improves the feasibility and operability of the solution.
[0306] Based on the embodiment corresponding to FIG. 23 , in another embodiment of the metadata management device 20 provided in the embodiment of the present application, the data table query request further carries a fourth object parameter, wherein the fourth object parameter includes query information;
[0307] The sending module 220 is specifically configured to perform parameter verification on the fourth object parameter carried in the data table query request;
[0308] If the fourth object parameter verification passes, the metadata table to be requested is sent to the client according to the query information.
[0309] In an embodiment of the present application, a metadata management device is provided. Using this device, metadata table lookups can be performed based on the RPC interface method provided by the online service. Thus, while being compatible with multiple computing engines, the underlying metadata service can be called through the RPC interface within the metadata to perform persistence operations, thereby improving the feasibility and operability of the solution.
[0310] Based on the embodiment corresponding to FIG. 23 above, in another embodiment of the metadata management device 20 provided in the embodiment of the present application,
[0311] The processing module 230 is further configured to, upon receiving a first query request, determine, from the first metadata table, a metadata base corresponding to the metadata base foreign key according to the first query request, wherein the first query request carries a table identifier, and the table identifier is associated with the metadata base foreign key;
[0312] The processing module 230 is further configured to, when receiving a second query request, determine, from the second metadata table, a metadata table corresponding to the metadata table foreign key according to the second query request, wherein the second query request carries a field, and the field has an association relationship with the metadata table foreign key;
[0313] The processing module 230 is further configured to, upon receiving a third query request, determine, from the third metadata table, a metadata table corresponding to the metadata table foreign key according to the third query request, wherein the third query request carries a partition identifier, and the partition identifier is associated with the metadata table foreign key;
[0314] The processing module 230 is further configured to, upon receiving a fourth query request, determine, from a fourth metadata table, a storage descriptor corresponding to the storage table foreign key according to the fourth query request, wherein the fourth query request carries a partition identifier, and the partition identifier is associated with the storage table foreign key;
[0315] The processing module 230 is further configured to, upon receiving a fifth query request, determine, from a fifth metadata table, a storage descriptor corresponding to the storage table foreign key according to the fifth query request, wherein the fifth query request carries a table identifier, and the table identifier is associated with the storage table foreign key;
[0316] The processing module 230 is further configured to determine, when receiving a sixth query request, a metadatabase corresponding to the metadatabase foreign key from the sixth metadata table according to the sixth query request, wherein the sixth query request carries a function identifier, and the function identifier is associated with the metadatabase foreign key.
[0317] In an embodiment of the present application, a metadata management device is provided. Using this device, a more streamlined universal data model is designed for Hive-type data, enabling logical partitioning of metadata resources while supporting metadata multi-tenancy. By optimizing the design of the underlying data model, metadata management performance can be improved, metadata read and write performance can be accelerated, and dependencies between multiple database tables can be eliminated, enabling logical implementation of dependencies. Furthermore, based on a distributed storage system, it can support the storage and management of massive amounts of metadata.
[0318] Based on the embodiment corresponding to FIG. 23 above, in another embodiment of the metadata management device 20 provided in the embodiment of the present application,
[0319] The processing module 230 is further configured to, upon receiving a first query request, determine, from the first metadata table, a metadata base corresponding to the metadata base foreign key according to the first query request, wherein the first query request carries a table identifier, and the table identifier is associated with the metadata base foreign key;
[0320] The processing module 230 is further configured to determine, when receiving a second query request, a metadata table corresponding to the metadata table foreign key from the second metadata table according to the second query request, wherein the second query request carries a field, and the field has an association relationship with the metadata table foreign key.
[0321] In an embodiment of the present application, a metadata management device is provided. Using the above device, a more streamlined general data model is designed for non-Hive type data. For example, the metadata in the storage system database management system can adopt this data model, and only the metadata of the library, table and field need to be concerned. While supporting metadata multi-tenancy, the metadata resources are logically divided. Through the design optimization of the underlying data model, the performance of metadata management can be improved, the metadata reading and writing performance can be accelerated, the multi-table dependency of the database can be removed, and the dependency relationship can be realized through logic. In addition, based on the distributed storage system, it can support the storage and management of massive metadata.
[0322] Figure 24 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 300 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 322 (for example, one or more processors) and memory 332, and one or more storage media 330 (for example, one or more mass storage devices) for storing application programs 342 or data 344. Among them, the memory 332 and the storage medium 330 can be temporary storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the computer device. Furthermore, the central processing unit 322 can be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the computer device 300.
[0323] The computer device 300 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input and output interfaces 358, and / or one or more operating systems 341, such as Windows Server 2003 or Windows Server 2003R. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.
[0324] The steps executed by the computer device in the above embodiment can be based on the computer device structure shown in Figure 24.
[0325] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the methods described in the aforementioned embodiments.
[0326] An embodiment of the present application also provides a computer program product including a program, which, when executed on a computer, enables the computer to execute the methods described in the aforementioned embodiments.
[0327] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0328] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0329] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0330] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0331] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0332] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A metadata management method, the method being executed by a server, comprising: Receive an account authentication request sent by a client, wherein the account authentication request carries cloud account information; If the account authentication request is successfully verified, a metadata tenant set is sent to the client, wherein the metadata tenant set is bound to the cloud account information; In response to a tenant selection request sent by the client, sending a metadata repository set to the client, wherein the tenant selection request carries an identifier of a metadata tenant to be requested, the metadata tenant to be requested is included in the metadata tenant set, and the metadata repository set has a mapping relationship with the metadata tenant to be requested; In response to a database query request sent by the client, a metadata table set is sent to the client, wherein the database query request carries an identifier of a metadata database to be requested, the metadata database to be requested is included in the metadata database set, and the metadata table set has a mapping relationship with the metadata database to be requested.
2. The management method according to claim 1, after sending the metadata table set to the client in response to the database query request sent by the client, the method further comprises: In response to the data table query request sent by the client, a metadata table to be requested is sent to the client, wherein the data table query request carries an identifier of the metadata table to be requested, and the metadata table to be requested is included in the metadata table set.
3. The management method according to claim 1, further comprising: If the account authentication request is successfully verified, a business tenant set is sent to the client, wherein the business tenant set is bound to the cloud account information; In response to the service selection request sent by the client, service processing information generated based on the service tenant to be requested is sent to the client, wherein the service selection request carries the identifier of the service tenant to be requested, and the service tenant to be requested is included in the service tenant set.
4. The management method according to claim 3, wherein, in response to the service selection request sent by the client, the sending of service processing information generated based on the tenant of the service to be requested to the client comprises: In response to the service selection request sent by the client, determining a set of metadata tenants to be requested, wherein the set of metadata tenants to be requested has a mapping relationship with the service tenant to be requested; Acquire a set of metadata tables to be requested that have a mapping relationship with the set of metadata tenants to be requested; Acquire business data according to the metadata table set to be requested, and process the business data to obtain the business processing information; Sending the service processing information to the client.
5. The management method according to claim 1, The method further comprises: If the account authentication request is successfully verified, the cloud account information is stored in a pending request session, wherein the pending request session is created based on the account authentication request; When a remote procedure call (RPC) request is received, the cloud account information is obtained from the session to be requested.
6. The management method according to claim 5, wherein receiving the account authentication request sent by the client comprises: The account authentication request sent by the client is received through a communication interface to be requested, wherein the communication interface to be requested is a communication interface natively supported by the client.
7. The management method according to claim 5, wherein receiving the account authentication request sent by the client comprises: receiving the account authentication request sent by the client, wherein the account authentication request is generated by the client invoking the first transmission method to encapsulate the cloud account information; A second transmission method is called to decapsulate the account authentication request to obtain the cloud account information, wherein the second transmission method and the first transmission method use the same protocol type.
8. The management method according to any one of claims 1 to 7, further comprising: If the account authentication request is successfully verified, receiving a metadata table creation request sent by the client, wherein the metadata table creation request carries a first object parameter, and the first object parameter includes metadata category information; Performing parameter verification on the first object parameter carried in the metadata table creation request; If the first object parameter verification passes, a metadata table is created according to the metadata category information.
9. The management method according to any one of claims 1 to 7, further comprising: If the account authentication request is successfully verified, receiving a metadata table update request sent by the client, wherein the metadata table update request carries a second object parameter, and the second object parameter includes metadata category information and table name information; Performing parameter verification on the second object parameter carried in the metadata table update request; If the second object parameter verification passes, obtaining the metadata table according to the table name information; The field information in the metadata table is deleted, and the metadata table is updated according to the metadata category information.
10. The management method according to any one of claims 1 to 7, further comprising: If the account authentication request is successfully verified, receiving a metadata table deletion request sent by the client, wherein the metadata table deletion request carries a third object parameter, and the third object parameter includes metadata category information and table name information; Performing parameter verification on the third object parameter carried in the metadata table deletion request; If the third object parameter verification passes, the metadata table is deleted according to the table name information.
11. The management method according to claim 2, wherein the data table query request further carries a fourth object parameter, wherein: The fourth object parameter includes query information; The step of sending the metadata table to be requested to the client in response to the data table query request sent by the client includes: Performing parameter verification on the fourth object parameter carried in the data table query request; If the fourth object parameter verification passes, the metadata table to be requested is sent to the client according to the query information.
12. The management method according to claim 1, further comprising: When a first query request is received, determining a metadatabase corresponding to a metadatabase foreign key from a first metadata table according to the first query request, wherein the first query request carries a table identifier, and the table identifier has an association relationship with the metadatabase foreign key; When a second query request is received, determining, from a second metadata table, a metadata table corresponding to the metadata table foreign key according to the second query request, wherein the second query request carries a field, and the field has an association relationship with the metadata table foreign key; When a third query request is received, determining, from a third metadata table, a metadata table corresponding to the metadata table foreign key according to the third query request, wherein the third query request carries a partition identifier, and the partition identifier has an association relationship with the metadata table foreign key; When a fourth query request is received, determining a storage descriptor corresponding to the storage table foreign key from a fourth metadata table according to the fourth query request, wherein the fourth query request carries a partition identifier, and the partition identifier has an association relationship with the storage table foreign key; When a fifth query request is received, determining a storage descriptor corresponding to the storage table foreign key from a fifth metadata table according to the fifth query request, wherein the fifth query request carries a table identifier, and the table identifier has an association relationship with the storage table foreign key; When a sixth query request is received, a metadatabase corresponding to the metadatabase foreign key is determined from a sixth metadata table according to the sixth query request, wherein the sixth query request carries a function identifier associated with the metadatabase foreign key.
13. The management method according to claim 1, further comprising: When a first query request is received, determining a metadatabase corresponding to a metadatabase foreign key from a first metadata table according to the first query request, wherein the first query request carries a table identifier, and the table identifier has an association relationship with the metadatabase foreign key; When a second query request is received, a metadata table corresponding to the metadata table foreign key is determined from the second metadata table according to the second query request, wherein the second query request carries a field, and the field has an association relationship with the metadata table foreign key.
14. A metadata management device, deployed on a server, comprising: A receiving module, configured to receive an account authentication request sent by a client, wherein the account authentication request carries cloud account information; a sending module, configured to send a metadata tenant set to the client if the account authentication request is successfully verified, wherein the metadata tenant set is bound to the cloud account information; The sending module is further configured to send a metadata repository set to the client in response to a tenant selection request sent by the client, wherein the tenant selection request carries an identifier of a metadata tenant to be requested, the metadata tenant to be requested is included in the metadata tenant set, and the metadata repository set has a mapping relationship with the metadata tenant to be requested; The sending module is further configured to send a metadata table set to the client in response to a database query request sent by the client, wherein the database query request carries an identifier of a metadata database to be requested, the metadata database to be requested is included in the metadata database set, and the metadata table set has a mapping relationship with the metadata database to be requested.
15. A computer device comprising: Memory, processor, and bus system; Wherein, the memory is used to store programs; The processor is configured to execute the program in the memory, and the processor is configured to execute the management method according to any one of claims 1 to 13 according to instructions in the program code; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other. 16 . A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to execute the management method according to claim 1 .
17. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the management method according to any one of claims 1 to 13.
