Data query method, data query system, electronic equipment and medium

By integrating data sources into data assets and dynamically managing metadata, the flexibility and efficiency problems of querying across multiple data sources in the big data processing framework are solved, and efficient cross-data source query capabilities are achieved.

CN119248836APending Publication Date: 2025-01-03BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411368278.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the big data processing framework, when performing complex query operations across multiple different types of data sources, the prior art lacks flexibility and efficiency, especially when data sources change frequently or dynamically expand, static configurations are difficult to adapt.

Method used

By integrating different types of data sources into data assets and providing a method based on a data query system, the query engine can dynamically manage metadata and target data sources according to user query needs, and realize flexible data queries across different data sources.

Benefits of technology

It realizes flexible data queries across different data sources, improves query efficiency and system scalability, reduces manual configuration requirements, and adapts to data source changes and dynamic expansion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248836A_ABST
    Figure CN119248836A_ABST
Patent Text Reader

Abstract

The invention provides a data query method and system, electronic equipment and a medium, and relates to the technical field of big data and data processing, in particular to the technical field of data circulation management. The data query system comprises a data source; the metadata management device is used for storing data assets corresponding to the data sources; a query engine; the method comprises the following steps: in response to a received data query request from a user, sending the data query request to a query engine by a metadata management device; in response to a received data query request from the metadata management device, based on the information of the to-be-queried data assets, determining the type of a target data source corresponding to the to-be-queried data assets by a query engine; in response to determining that the type of the target data source is the first type, obtaining target metadata corresponding to the to-be-queried data assets from the metadata management device by the query engine; and obtaining a target data table corresponding to the target metadata from the data source by the query engine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of big data and data processing technology, in particular to the field of data circulation management technology, and specifically to a data query method based on a data query system, a data query system, an electronic device, a computer-readable cache medium, and a computer program product. Background Art

[0002] In today's data-intensive computing environment, the diversity and complexity of data sources make cross-data source data query a major technical challenge. Especially in big data processing frameworks, query engines are often required to perform complex query operations in multiple different types of data sources. Therefore, there is an urgent need for an efficient data query system and method that can dynamically manage data sources and metadata.

[0003] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention

[0004] The present disclosure provides a data query method based on a data query system, a data query system, an electronic device, a computer-readable storage medium, and a computer program product.

[0005] According to one aspect of the present disclosure, a data query method based on a data query system is provided, the data query system comprising: a data source for storing a data table; a metadata management device for storing data assets, wherein the data assets are generated based on information and attribute information of the data table stored in the data source, and wherein the attribute information comprises the type of the data source, and the data assets comprise metadata of the data table; and a query engine configured to communicate with the data source and the metadata management device; the method comprising: in response to receiving a data query request from a user, the metadata management device sending the data query request to the query engine, wherein the data query request comprises information of the data asset to be queried; in response to receiving the data query request from the metadata management device, the query engine determining the type of a target data source corresponding to the data asset to be queried based on the information of the data asset to be queried in the data query request; in response to determining that the type of the target data source is a first type, the query engine acquiring target metadata corresponding to the data asset to be queried from the metadata management device; and the query engine acquiring a target data table corresponding to the target metadata from the data source, and sending the target data table to the metadata management device.

[0006] According to another aspect of the present disclosure, a data query system is provided, comprising: a data source for storing a data table; a metadata management device for storing data assets, wherein the data assets are generated based on information of the data table and attribute information stored in the data source, and wherein the attribute information includes the type of the data source, and the data assets include metadata of the data table; and a query engine, wherein the metadata management device is configured to: in response to receiving a data query request from a user, send the data query request to the query engine, wherein the data query request includes information of the data asset to be queried; wherein the query engine is configured to: in response to receiving the data query request from the metadata management device, determine the type of a target data source corresponding to the data asset to be queried based on the information of the data asset to be queried in the data query request; in response to determining that the type of the target data source is the first type, obtain target metadata corresponding to the data asset to be queried from the metadata management device; and obtain a target data table corresponding to the target metadata from the data source, and send the target data table to the metadata management device.

[0007] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above method.

[0008] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above method.

[0009] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the above method when executed by a processor.

[0010] According to one or more embodiments of the present disclosure, a data query method based on a data query system is provided, which integrates different types of data sources into data assets, thereby enabling flexible data query across different data sources according to user query requirements.

[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0013] Figure 1 is a schematic diagram illustrating an example system in which the various methods described herein may be implemented according to an exemplary embodiment.

[0014] Figure 2 A flow chart of a data query method based on a data query system according to an embodiment of the present disclosure is shown;

[0015] Figure 3 A flow chart showing a data query operation that a data query system according to an embodiment of the present disclosure is configured to perform;

[0016] Figure 4 A flow chart showing a data query operation that a data query system according to an embodiment of the present disclosure is configured to perform;

[0017] Figure 5A structural block diagram of a data query system according to an embodiment of the present disclosure is shown; and

[0018] Figure 6 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0019] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0020] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.

[0021] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.

[0022] In the related technology, optimization is usually performed for specific data sources, and static configuration is used to access and manage different data sources. This method often lacks flexibility and efficiency when dealing with large-scale and diverse data sources, especially when data sources change frequently or expand dynamically, and static configuration is difficult to effectively adapt.

[0023] To solve the above problems, the present disclosure provides a data query method based on a data query system, which integrates different types of data sources into data assets, thereby enabling flexible data query across different data sources according to user query requirements.

[0024] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0025] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.

[0026] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable execution of a service providing method based on a large language model.

[0027] In some embodiments, server 120 may also provide other services or software applications that may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.

[0028] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is an example of a system for implementing the methods described herein and is not intended to be limiting.

[0029] The user may use client devices 101, 102, 103, 104, 105 and / or 106 to perform a data query method based on the data query system. The client device may provide an interface that enables the user of the client device to interact with the client device. The client device may also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.

[0030] Client devices 101, 102, 103, 104, 105 and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and may use various communication protocols.

[0031] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0032] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0033] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.

[0034] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.

[0035] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.

[0036] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.

[0037] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.

[0038] Figure 1 The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.

[0039] Figure 2 A flow chart of a data query method based on a data query system according to an embodiment of the present disclosure is shown. The data query system includes: a data source for storing a data table; a metadata management device for storing data assets, wherein the data assets are generated based on information and attribute information of the data table stored in the data source, and wherein the attribute information includes the type of the data source, and the data assets include metadata of the data table; and a query engine configured to communicate with the data source and the metadata management device.

[0040] like Figure 2 As shown, the data query method 200 includes:

[0041] Step S201: In response to receiving a data query request from a user, the metadata management device sends the data query request to the query engine, wherein the data query request includes information about the data asset to be queried;

[0042] Step S202: In response to receiving the data query request from the metadata management device, the query engine determines the type of target data source corresponding to the data asset to be queried based on the information of the data asset to be queried in the data query request;

[0043] Step S203: in response to determining that the type of the target data source is the first type, the query engine acquires the target metadata corresponding to the data asset to be queried from the metadata management device; and

[0044] Step S204: The query engine obtains a target data table corresponding to the target metadata from the data source, and sends the target data table to the metadata management device.

[0045] The data source is the database or data warehouse that stores the actual data in the data query system, which may include various types of data sources (such as MYSQL, DORIS, HIVE, etc.). These data sources provide basic data for the query.

[0046] The metadata management device is used to store data assets corresponding to the data source. The data assets are generated based on the data table information and attribute information of the data source. It is an integration operation for different types of data sources. On the basis of extracting the data table information of the data source (such as key information such as field information, source, and domain), the configuration of attribute information is added. In some examples, tag information can be added, so that in the process of searching and filtering data assets, retrieval and filtering can be performed according to the configured attribute information and / or tag information to improve the convenience of retrieval and filtering.

[0047] Thus, in the data query method 200, the metadata management device can be used to store and manage metadata related to the data source, which includes data table information, data source type, and other attribute information, such as, for example, connection information of the data source, access rights, etc. By managing metadata, the system can abstractly represent the data source, so that subsequent queries can be based on these metadata without directly contacting the data source itself.

[0048] In an example, the attribute information may also include row filtering information of the data source, desensitization rules used in preprocessing, and data partition information.

[0049] The query engine is used to execute query operations and extract actual data from the data source based on the information provided by the metadata management device.

[0050] Therefore, the above architecture clearly separates metadata from actual data, realizes abstract management of data sources through metadata management devices, reduces the frequency of direct interaction with data sources, and optimizes the efficiency of data query. The metadata management device receives the user's query request and forwards it to the query engine. Through the query engine's response and processing of the user's request, it can quickly determine the target data source and the corresponding query path based on metadata, and realize a unified query mechanism across data sources.

[0051] According to some embodiments, the query engine is a Trino engine adapted to the metadata management device.

[0052] According to some embodiments, the first type of data source includes MYSQL, DORIS, and HIVE data tables.

[0053] According to some embodiments, the data query system further includes a first connector and a second connector, and wherein step S203 includes: the query engine acquiring target metadata corresponding to the data asset to be queried from the metadata management device via the first connector; and step S204 includes: the query engine acquiring a target data table corresponding to the target metadata from the data source via the second connector.

[0054] In some embodiments, the first connector is a Hive Connector adapted based on the metadata management device, and is used as a connector for accessing data assets in the metadata management device. When the metadata management device is used as the MetaStore of the Trino query engine, the Trino query engine can configure relevant parameters to obtain metadata of data assets in the metadata management device in HTTP form.

[0055] According to some embodiments, the second connector includes multiple second sub-connectors for transmitting data tables stored in data sources of corresponding types, and wherein method 200 further includes: the query engine creates a directory corresponding to the type based on the type of the target data source, wherein the directory includes connection information of the target data source; the query engine associates the directory with a second target sub-connector corresponding to the target data source among the multiple second sub-connectors, wherein obtaining a target data table corresponding to the target metadata from the data source by the query engine includes: obtaining, by the query engine, the target data table corresponding to the target metadata from the data source via the second target sub-connector.

[0056] According to some embodiments, each second connector may have multiple directories, i.e., Catalogs. In the Trino query engine, Catalogs are logical representations of data sources. Each Catalog, as a top-level namespace, contains a set of connection information for a data source or database system. When the Trino query engine performs a query, Catalogs are equivalent to an entry point, through which database objects such as tables and views in a specific data source can be accessed.

[0057] For example, each Catalog has a unique identifier and is associated with a corresponding second sub-connector to be responsible for connecting the interface of the actual data source. Through the Catalog, the Trino query engine can abstract the differences of the underlying data sources and provide users with a unified query experience.

[0058] The dynamic directory creation mechanism ensures that the data query system is flexible when dealing with different types of data sources. It can dynamically generate connection information based on the target data source type in the query request, reducing the need for manual configuration. At the same time, through the design of multiple sub-connectors, the system can support multiple types of data sources, improving the scalability and query efficiency of the system.

[0059] According to some embodiments, the data query request includes user authority information of the user, and the attribute information also includes access authority information of the data source, and wherein method 200 further includes: in response to receiving the data query request from the metadata management device, based on the information of the data asset to be queried in the data query request, the query engine obtains the access authority information corresponding to the data asset to be queried from the metadata management device via the second connector; and based on the user authority information and the access authority information corresponding to the data asset to be queried, the query engine determines whether the user has the authority to query the data asset to be queried, wherein the step of the query engine obtaining the target metadata corresponding to the data asset to be queried from the metadata management device is performed in response to determining that the user has the authority to query the data asset to be queried.

[0060] The data query system further introduces a permission management mechanism. Each data query request is accompanied by the user's permission information. The data query system determines whether the user has the right to query the data asset based on the access rights of the data asset. Only after the permission is passed, the query engine will obtain the metadata and execute the query. Therefore, through the permission verification mechanism, the data query system can ensure the security of data query and prevent unauthorized users from accessing sensitive data assets. The introduction of permission management further increases the flexibility of the system, and can dynamically adjust the query results and data access levels according to the roles and permissions of different users.

[0061] According to some embodiments, the data query system also includes a storage subsystem, and wherein method 200 also includes: in response to determining that the type of the data source corresponding to the data asset to be queried is the second type, the query engine obtains the target metadata corresponding to the data asset to be queried from the storage subsystem.

[0062] According to some embodiments, the second type of data source comprises a data lake.

[0063] Exemplarily, the storage subsystem can be a distributed file system (Hadoop Distributed File System, HDFS). The HDFS storage subsystem can be used to manage and store metadata of certain large-scale data sources (such as data lakes), which can effectively handle metadata queries in large-scale data sources, especially the management of unstructured and semi-structured data. By using HDFS, the data query system can improve the storage efficiency of large data sets and ensure high reliability and fault tolerance of data query operations. In a distributed environment, the high throughput characteristics provided by HDFS make the data query system more stable and fast when processing large-scale data queries.

[0064] Figure 3 FIG. 1 is a flow chart showing a data query operation that a data query system according to an embodiment of the present disclosure is configured to perform. It can be understood that Figure 3 The flowchart shown is a data query operation that the data query system is configured to perform when the type of the target data source is the first type.

[0065] like Figure 3 As shown, first, the user initiates a data query request to the metadata management device. In one example, the user initiates a data query request through an SQL statement, in which the name of the data asset can be directly filled into the SQL as the data table name. Exemplarily, the data asset name can be named in Chinese. In response to the user's data query request, the metadata management device passes the query request to the Trino query engine through JDBC. Exemplarily, the Trino query engine can obtain metadata related to the data asset, such as table structure, data type, etc., by calling the damppClient.getTable instruction. When the type of the corresponding target data source of the data asset is the first type, that is, including MYSQL, DORIS, HIVE and other data sources, the Trino query engine will query in the form of a mapping table, that is, Figure 3 As shown in , tableType = MAPPING.

[0066] Exemplarily, the Trino query engine can obtain the user's permission information for the table, including row filtering, column permissions, and desensitization rules, by calling the dampClient.getTablePermission instruction.

[0067] It is understandable that the command names given above are only examples, and the specific command names and their definitions can be set according to actual needs. Therefore, by calling the corresponding commands, the Trino query engine can obtain the metadata information corresponding to the data assets, including table structure, data type, partition information, row filtering rules and desensitization rules, etc. Furthermore, the Trino query engine can obtain the corresponding data table from the data source based on the metadata information, and return it to the metadata management device, and then the metadata management device returns this query result to the user to complete the data query process.

[0068] Figure 4 FIG. 1 is a flowchart showing a data query operation that a data query system according to an embodiment of the present disclosure is configured to perform; it can be understood that, Figure 4 Shown is a flow chart of a data query operation that the data query system is configured to perform when the type of the target data source is the second type, i.e., a data lake.

[0069] like Figure 4As shown, first, the user initiates a data query request to the metadata management device. In one example, the user initiates a data query request through an SQL statement, in which the name of the data asset can be directly filled into the SQL as the data table name. In this example, the user queries the data asset whose underlying data source is the data lake EDAP physical table. In response to the user's data query request, the metadata management device passes the query request to the Trino query engine through JDBC. Exemplarily, the Trino query engine can obtain metadata related to the data asset, such as table structure, data type, etc., by calling the damppClient.getTable instruction. In response to the type of the corresponding target data source of the data asset being the second type, the Trino query engine will query in the form of a management table, such as Figure 4 As shown in , tableType=MANAGED.

[0070] Exemplarily, the Trino query engine can obtain the user's permission information for the table, including row filtering, column permissions, and desensitization rules, by calling the dampClient.getTablePermission instruction.

[0071] It is understandable that the command names given above are only examples, and the specific command names and their definitions can be set according to actual needs. Therefore, by calling the corresponding commands, the Trino query engine can obtain the metadata information corresponding to the data assets, including table structure, data type, partition information, row filtering rules and desensitization rules, etc. Furthermore, the Trino query engine can perform data query in the storage subsystem HDFS through the EDAP gateway based on the metadata information, and the query results are returned to the user through the metadata management device to complete the data query process.

[0072] According to another aspect of the present disclosure, a data query system is provided. Figure 5As shown, the data query system 500 includes: a data source 501 for storing data tables; a metadata management device 502 for storing data assets, wherein the data assets are generated based on the information of the data tables and attribute information stored in the data source 501, and wherein the attribute information includes the type of the data source, and the data assets include the metadata of the data table; and a query engine 503, wherein the metadata management device 502 is configured to: in response to receiving a data query request from a user, send the data query request to the query engine 503, wherein the data query request includes the information of the data assets to be queried; wherein the query engine 503 is configured to: in response to receiving the data query request from the metadata management device 502, determine the type of the target data source corresponding to the data assets to be queried based on the information of the data assets to be queried in the data query request; in response to determining that the type of the target data source is the first type, obtain the target metadata corresponding to the data assets to be queried from the metadata management device 502; and obtain the target data table corresponding to the target metadata from the data source 501, and send the target data table to the metadata management device 502.

[0073] Data source 501 is a database or data warehouse storing actual data in the data query system, and may include various types of data sources (such as MYSQL, DORIS, HIVE, etc.) These data sources provide basic data for query.

[0074] The metadata management device 502 is used to store data assets corresponding to the data source. The data assets are generated based on the data table information and attribute information of the data source. It is an integration operation for different types of data sources. On the basis of extracting the data table information of the data source (such as key information such as field information, source, and domain), the configuration of attribute information is added. In some examples, tag information can be added, so that in the process of searching and filtering data assets, retrieval and filtering can be performed according to the configured attribute information and / or tag information to improve the convenience of retrieval and filtering.

[0075] Thus, the metadata management device 502 can be used to store and manage metadata related to the data source, including data table information, data source type and other attribute information, such as data source connection information, access rights, etc. By managing metadata, the system can abstractly represent the data source, so that subsequent queries can be based on these metadata without directly contacting the data source itself.

[0076] In an example, the attribute information may also include row filtering information of the data source, desensitization rules used in preprocessing, and data partition information.

[0077] The query engine 503 is used to execute query operations and extract actual data from the data source according to the information provided by the metadata management device.

[0078] Thus, the above architecture of the data query system 500 clearly separates metadata from actual data, realizes abstract management of data sources through metadata management devices, reduces the frequency of direct interaction with data sources, and optimizes the efficiency of data query. The metadata management device 502 receives the user's query request and forwards it to the query engine 503. Through the response and processing of the query engine 503 to the user's request, the target data source and the corresponding query path can be quickly determined based on the metadata, realizing a unified query mechanism across data sources.

[0079] According to some embodiments, the query engine 503 is a Trino engine adapted to the metadata management device 502 .

[0080] According to some embodiments, the first type of data source includes MYSQL, DORIS, and HIVE data tables.

[0081] According to some embodiments, the data query system 500 also includes a first connector and a second connector, and wherein the query engine 503 is further configured to obtain the target metadata from the metadata management device 502 via the first connector, and is configured to obtain a data table corresponding to the target metadata from the data source 501 via the second connector.

[0082] In some embodiments, the first connector is a Hive Connector adapted based on the metadata management device, and is used as a connector for accessing data assets in the metadata management device. When the metadata management device 502 is used as the MetaStore of the Trino query engine, the Trino query engine can configure relevant parameters to obtain metadata of data assets in the metadata management device in HTTP form.

[0083] According to some embodiments, the second connector includes multiple second sub-connectors for transmitting data sources of corresponding types, and wherein the query engine 503 is further configured to: create a directory corresponding to the type based on the type of the target data source, wherein the directory includes connection information of the target data source; associate the directory with a second target sub-connector corresponding to the target data source among the multiple second sub-connectors; and obtain a target data table corresponding to the target metadata from the data source 501 via the second target sub-connector.

[0084] According to some embodiments, each second connector may have multiple directories, i.e., Catalogs. In the Trino query engine, Catalogs are logical representations of data sources. Each Catalog, as a top-level namespace, contains a set of connection information for a data source or database system. When the Trino query engine performs a query, Catalogs are equivalent to an entry point, through which database objects such as tables and views in a specific data source can be accessed.

[0085] For example, each Catalog has a unique identifier and is associated with a corresponding second sub-connector to be responsible for connecting the interface of the actual data source. Through the Catalog, the Trino query engine can abstract the differences of the underlying data sources and provide users with a unified query experience.

[0086] The dynamic directory creation mechanism ensures that the data query system 500 is flexible in processing different types of data sources, and can dynamically generate connection information according to the target data source type in the query request, reducing the need for manual configuration. At the same time, through the design of multiple sub-connectors, the system can support multiple types of data sources, improving the scalability and query efficiency of the system.

[0087] According to some embodiments, the data query request includes user authority information of the user, and the attribute information also includes access authority information of the data source, and wherein the query engine 503 is further configured to: in response to receiving the data query request from the metadata management device 502, based on the information of the data asset to be queried in the data query request, obtain the access authority information corresponding to the data asset to be queried from the metadata management device 502 via the second connector; and based on the user authority information and the access authority information corresponding to the data asset to be queried, determine whether the user has the authority to query the data asset to be queried, wherein the operation of obtaining the target metadata corresponding to the data asset to be queried from the metadata management device 502 is performed in response to determining that the user has the authority to query the data asset to be queried.

[0088] The data query system 500 further introduces a permission management mechanism. Each data query request is accompanied by the user's permission information, and the data query system determines whether the user has the right to query the data asset based on the access rights of the data asset. Only after the permission is passed, the query engine will obtain the metadata and execute the query. Therefore, through the permission verification mechanism, the data query system can ensure the security of data query and prevent unauthorized users from accessing sensitive data assets. The introduction of permission management further increases the flexibility of the system, and can dynamically adjust the query results and data access levels according to the roles and permissions of different users.

[0089] According to some embodiments, the data query system also includes a storage subsystem, and wherein the query engine is further configured to: in response to determining that the type of the data source corresponding to the data asset to be queried is a second type, obtain target metadata corresponding to the data asset to be queried from the storage subsystem.

[0090] According to some embodiments, the second type of data source comprises a data lake.

[0091] Exemplarily, the storage subsystem can be a distributed file system (Hadoop Distributed File System, HDFS). The HDFS storage subsystem can be used to manage and store metadata of certain large-scale data sources (such as data lakes), which can effectively handle metadata queries in large-scale data sources, especially the management of unstructured and semi-structured data. By using HDFS, the data query system can improve the storage efficiency of large data sets and ensure high reliability and fault tolerance of data query operations. In a distributed environment, the high throughput characteristics provided by HDFS make the data query system more stable and fast when processing large-scale data queries.

[0092] According to another aspect of the present disclosure, a data query method based on a data query system is provided. The data query system includes: a data source; a metadata management device for storing data assets corresponding to the data source, wherein the data assets are generated based on data table information and attribute information of the data source, and wherein the attribute information includes the type of the data source, and the data assets include metadata of the data source; and a query engine configured to communicate with the data source and the metadata management device, respectively.

[0093] According to another aspect of the present disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the aforementioned method.

[0094] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is further provided, wherein the computer instructions are used to enable the computer to execute the aforementioned method.

[0095] According to another aspect of the present disclosure, a computer program product is also provided, including a computer program, wherein the computer program implements the aforementioned method when executed by a processor.

[0096] like Figure 6As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0097] Multiple components in the electronic device 600 are connected to the I / O interface 605, including: an input unit 606, an output unit 607, a storage unit 608 and a communication unit 609. The input unit 606 can be any type of device that can input information to the electronic device 600. The input unit 606 can receive input digital or character information, and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone and / or a remote control. The output unit 607 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator and / or a printer. The storage unit 608 can include but is not limited to a disk, an optical disk. The communication unit 609 allows the electronic device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as Bluetooth TM devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0098] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as a data query method based on a data query system. For example, in some embodiments, a data query method based on a data query system may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the data query method based on the data query system described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to execute a data query method based on a data query system in any other appropriate manner (for example, by means of firmware).

[0099] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0100] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0101] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0102] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0103] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0104] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0105] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0106] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.

Claims

1. A data query method based on a data query system, the data query system comprising: Data source, used to store data tables; a metadata management device for storing data assets, wherein the data assets are generated based on information of a data table and attribute information stored in the data source, and wherein the attribute information includes a type of the data source, and the data assets include metadata of the data table; and A query engine configured to communicate with the data source and the metadata management device; The method comprises: In response to receiving a data query request from a user, the metadata management device sends the data query request to the query engine, wherein the data query request includes information about the data asset to be queried; In response to receiving the data query request from the metadata management device, the query engine determines the type of target data source corresponding to the data asset to be queried based on the information of the data asset to be queried in the data query request; In response to determining that the type of the target data source is the first type, the query engine acquires target metadata corresponding to the data asset to be queried from the metadata management device; and The query engine obtains a target data table corresponding to the target metadata from the data source, and sends the target data table to the metadata management device.

2. The method according to claim 1, wherein: The data query system further includes a first connector and a second connector, and wherein, The step of obtaining, by the query engine, target metadata corresponding to the data asset to be queried from the metadata management device includes: The query engine obtains target metadata corresponding to the data asset to be queried from the metadata management device via the first connector; The acquiring, by the query engine, a target data table corresponding to the target metadata from the data source comprises: The query engine obtains a target data table corresponding to the target metadata from the data source via the second connector.

3. The method according to claim 2, wherein: The data query request includes user authority information of the user, the attribute information also includes access authority information of the data source, and the method further includes: In response to receiving the data query request from the metadata management device, based on the information of the data asset to be queried in the data query request, the query engine obtains access permission information corresponding to the data asset to be queried from the metadata management device via the second connector; and Based on the user authority information and the access permission information corresponding to the data asset to be queried, the query engine determines whether the user has the authority to query the data asset to be queried, wherein the step of the query engine obtaining the target metadata corresponding to the data asset to be queried from the metadata management device is performed in response to determining that the user has the authority to query the data asset to be queried.

4. The method according to claim 2 or 3, wherein: The second connector includes a plurality of second sub-connectors for transmitting data tables stored in data sources of corresponding types, and wherein the method further includes: The query engine creates a directory corresponding to the type based on the type of the target data source, wherein the directory includes connection information of the target data source; The query engine associates the directory with a second target sub-connector corresponding to the target data source among the plurality of second sub-connectors, wherein: Acquiring, by the query engine, a target data table corresponding to the target metadata from the data source includes: The query engine obtains a target data table corresponding to the target metadata from the data source via the second target sub-connector.

5. The method according to any one of claims 1 to 4, wherein: The data query system further includes a storage subsystem, and wherein the method further includes: In response to determining that the type of the data source corresponding to the data asset to be queried is the second type, the query engine obtains target metadata corresponding to the data asset to be queried from the storage subsystem.

6. The method according to claim 5, wherein: The second type of data source includes a data lake.

7. The method according to any one of claims 1 to 6, wherein: The first type of data sources includes MYSQL, DORIS, and HIVE data tables.

8. A data query system, comprising: Data source, used to store data tables; a metadata management device for storing data assets, wherein the data assets are generated based on information of a data table and attribute information stored in the data source, and wherein the attribute information includes a type of the data source, and the data assets include metadata of the data table; and Query Engine, Wherein, the metadata management device is configured as follows: In response to receiving a data query request from a user, sending the data query request to the query engine, wherein the data query request includes information about the data asset to be queried; Wherein, the query engine is configured as follows: In response to receiving the data query request from the metadata management device, determining the type of the target data source corresponding to the data asset to be queried based on the information of the data asset to be queried in the data query request; In response to determining that the type of the target data source is the first type, acquiring target metadata corresponding to the data asset to be queried from the metadata management device; and A target data table corresponding to the target metadata is acquired from the data source, and the target data table is sent to the metadata management device.

9. The data query system according to claim 8, wherein: The data query system also includes a first connector and a second connector, and wherein the query engine is further configured to obtain the target metadata from the metadata management device via the first connector, and is configured to obtain a data table corresponding to the target metadata from the data source via the second connector.

10. The data query system according to claim 9, wherein: The data query request includes user authority information of the user, the attribute information also includes access authority information of the data source, and wherein the query engine is further configured to: In response to receiving the data query request from the metadata management device, based on the information of the data asset to be queried in the data query request, obtaining access permission information corresponding to the data asset to be queried from the metadata management device via the second connector; and Based on the user authority information and the access permission information corresponding to the data asset to be queried, determine whether the user has the authority to query the data asset to be queried, wherein the operation of obtaining the target metadata corresponding to the data asset to be queried from the metadata management device is performed in response to determining that the user has the authority to query the data asset to be queried.

11. The data query system according to claim 9 or 10, wherein: The second connector includes a plurality of second sub-connectors for transmitting data sources of corresponding types, and wherein the query engine is further configured to: Creating a directory corresponding to the type based on the type of the target data source, wherein the directory includes connection information of the target data source; associating the directory with a second target sub-connector of the plurality of second sub-connectors corresponding to the target data source; and A target data table corresponding to the target metadata is acquired from the data source via the second target sub-connector.

12. The data query system according to any one of claims 8 to 11, wherein: The data query system further includes a storage subsystem, and wherein the query engine is further configured to: In response to determining that the type of the data source corresponding to the data asset to be queried is the second type, target metadata corresponding to the data asset to be queried is acquired from the storage subsystem.

13. The data query system according to claim 12, wherein: The second type of data source includes a data lake.

14. The data query system according to any one of claims 8 to 13, wherein: The first type of data sources includes MYSQL, DORIS, and HIVE data tables.

15. An electronic device, comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

16. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.

17. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.