Data query method, device, computer equipment and storage medium

By receiving the terminal's data query request and forwarding it to the hiveserver2 component, the metadata query results for user permissions are obtained, and the complexity of permission synchronization between Spark-thrift and hiveserver2 is solved, and a safe and stable data query process is realized.

CN112579536BActive Publication Date: 2024-12-20BEIJING GRIDSUM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910945679.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-30
Publication Date
2024-12-20
Estimated Expiration
2039-09-30

AI Technical Summary

Technical Problem

The prior art requires permission synchronization between Spark-thrift and hiveserver2, resulting in the permission verification process being complex and unstable, and poses security risks.

Method used

By receiving the terminal's data query request, user information is read and forwarded to the hiveserver2 component, the metadata query results of user permissions are obtained, the target data is obtained and feedback based on the results, and permission re-verification is carried out when necessary to ensure the security of data transmission .

Benefits of technology

The permission verification process is simplified, the complexity of permission synchronization is avoided, the security and stability of data queries are improved, and the effective control of user permissions is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112579536B_ABST
    Figure CN112579536B_ABST
Patent Text Reader

Abstract

The present application relates to a data query method, device, computer equipment and storage medium, which are applied to Spark-thrift components, by receiving data query requests uploaded by terminals; reading user information carried in data query requests; forwarding data query requests and user information to hiveserver2 components; receiving metadata query results corresponding to user permissions sent by hiveserver2 components; obtaining target data according to metadata query results, and feeding back target data to terminals. Based on hiveserver2 components, the control of user permissions corresponding to query requests can be ensured, and the query process does not need to ensure permission synchronization, and the method is simpler and easier.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data query method, device, computer equipment and storage medium. Background Art

[0002] With the development of computer Internet technology, Hadoop technology has emerged. Hadoop is a distributed system infrastructure. Users can develop distributed programs without understanding the underlying details of the distribution. Make full use of the power of the cluster for high-speed computing and storage. Hadoop implements HDFS (Hadoop Distributed File System). HDFS has the characteristics of high fault tolerance and is designed to be deployed on low-cost hardware; it also provides high throughput to access application data, suitable for applications with very large data sets. HDFS relaxes the requirements of POSIX (Portable Operating System Interface) and can access data in the file system in the form of streams.

[0003] Hive and Spark are two services based on Hadoop. Hive contains two important components, MetaStore and Hiveserver2. Spark contains an important component, Spark-thrift. MetaStore is a key service area for querying Hive, while Hiveserver2 is a service provided by Hive for clients to connect and query. Spark-thrift can also query the Hive database directly. When Spark queries Hive, it must first query the metadata from MetaStore, and then query the data based on the metadata. Spark-thrift will also start a Hiveserver2 process in its own service to query MetaStore, but MetaStore does not have permission verification, while Hive permission verification is performed through Hiveserver2. Spark-thrift also does not have the permission verification function. When users query Hive through Spark-thrift, they can query databases outside its entire line, causing security risks.

[0004] The current technical solution is generally to encapsulate another layer of permission verification mechanism on spark-thrift to ensure the security of the query process through spark-thrift. However, this solution requires the permission synchronization of spark-thrift and hiveserver2 at all times, which is relatively complex to implement. Summary of the invention

[0005] Based on this, it is necessary to provide a simpler data query method, device, computer equipment and storage medium to solve the more complex problem of ensuring the synchronization of spark-thrift and hiveserver2 permissions at any time in the existing technical solutions.

[0006] A data query method is applied to a Spark-thrift component, and the method comprises:

[0007] Receive data query requests uploaded by terminals;

[0008] Reading user information carried in the data query request;

[0009] Forward the data query request and the user information to the hiveserver2 component;

[0010] Receive the metadata query result corresponding to the user authority sent by the hiveserver2 component;

[0011] Target data is acquired according to the metadata query result, and the target data is fed back to the terminal.

[0012] In one embodiment, acquiring target data according to the metadata query result includes:

[0013] According to the metadata query result, obtaining a target data storage location;

[0014] Query the target data according to the target data storage location.

[0015] In one embodiment, acquiring target data according to the metadata query result and feeding back the target data to the terminal further includes:

[0016] The metadata query result obtains target data;

[0017] Obtaining user authority information corresponding to the target data;

[0018] Performing authority recheck based on the user authority information and the user information;

[0019] When the result of the authority re-check is passed, the target data is fed back to the terminal.

[0020] In one embodiment, after rechecking the authority according to the user authority information and the user information, the method further includes:

[0021] When the result of the authority re-verification is failure, deleting the data in the target data where the user authority information and the user information do not match, and obtaining updated target data;

[0022] The updated target data is fed back to the terminal.

[0023] A data query method, applied to a hiveserver2 component, comprising:

[0024] Receive data query requests and user information sent by the Spark-thrift component;

[0025] Obtaining metadata query results corresponding to user permissions according to the data query request and user information;

[0026] Send the metadata query result to the Spark-thrift component.

[0027] In one embodiment, obtaining metadata query results corresponding to user permissions according to the data query request and user information includes:

[0028] According to the data query request and the user information, a data query is performed in the MetaStore to obtain a metadata query result corresponding to the user authority.

[0029] A data query device, applied to a Spark-thrift component, comprising:

[0030] A request receiving module, used to receive a data query request uploaded by a terminal;

[0031] A user information reading module, used to read the user information carried in the data query request;

[0032] A request forwarding module, used for forwarding the data query request and the user information to the hiveserver2 component;

[0033] A data receiving module, used for receiving the metadata query result corresponding to the user authority sent by the hiveserver2 component;

[0034] The target data acquisition module is used to acquire the target data according to the metadata query result and feed back the target data to the terminal.

[0035] A data query device, applied to a hiveserver2 component, comprising:

[0036] The information receiving module is used to receive the data query request and user information sent by the Spark-thrift component;

[0037] A metadata query module, used to obtain metadata query results corresponding to user permissions according to the data query request and user information;

[0038] The metadata sending module is used to send the metadata query result to the Spark-thrift component.

[0039] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0040] Receive data query requests uploaded by terminals;

[0041] Reading user information carried in the data query request;

[0042] Forward the data query request and the user information to the hiveserver2 component;

[0043] Receive the metadata query result corresponding to the user authority sent by the hiveserver2 component;

[0044] Target data is acquired according to the metadata query result, and the target data is fed back to the terminal.

[0045] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0046] Receive data query requests and user information sent by the Spark-thrift component;

[0047] Obtaining metadata query results corresponding to user permissions according to the data query request and user information;

[0048] Send the metadata query result to the Spark-thrift component.

[0049] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0050] Receive data query requests uploaded by terminals;

[0051] Reading user information carried in the data query request;

[0052] Forward the data query request and the user information to the hiveserver2 component;

[0053] Receive the metadata query result corresponding to the user authority sent by the hiveserver2 component;

[0054] Target data is acquired according to the metadata query result, and the target data is fed back to the terminal.

[0055] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0056] Receive data query requests and user information sent by the Spark-thrift component;

[0057] Obtaining metadata query results corresponding to user permissions according to the data query request and user information;

[0058] Send the metadata query result to the Spark-thrift component.

[0059] The above data query method, device, computer equipment and storage medium are applied to the Spark-thrift component, which receives the data query request uploaded by the terminal; reads the user information carried in the data query request; forwards the data query request and the user information to the hiveserver2 component; receives the metadata query result corresponding to the user authority sent by the hiveserver2 component; obtains the target data according to the metadata query result, and feeds back the target data to the terminal. Based on the hiveserver2 component, the control of the user authority corresponding to the query request can be ensured, and the query process does not need to ensure the synchronization of the authority, and the method is simpler and easier. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 An application environment diagram of a data query method in an embodiment;

[0061] Figure 2 A schematic diagram of a flow chart of a data query method in an embodiment;

[0062] Figure 3 is a flow chart of a data query method in another embodiment;

[0063] Figure 4 is a structural block diagram of a data query device in an embodiment;

[0064] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

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

[0066] The data query method provided in this application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the first server 104 through the network, and the first server communicates with the second server 106 through the network. The first server is loaded with the Spark-thrift component, and the second server is loaded with the hiveserver2 component. First, the terminal 102 submits the corresponding query request to the big data server 104, and performs data query through the Spark-thrift service inside the first server. The Spark-thrift component in the big data server 104 first receives the data query request; then reads the user information carried in the data query request; forwards the data query request and the user information to the hiveserver2 component of the second server 106, and the hiveserver2 component in the second server receives the data query request and the user information sent by the Spark-thrift component; according to the data query request and the user information, obtains the metadata query result corresponding to the user authority; and then sends the metadata query result to the Spark-thrift component. The Spark-thrift component receives the metadata query result corresponding to the user authority sent by the hiveserver2 component; obtains the target data according to the metadata query result. And the searched data is fed back to the terminal 102. The terminal 102 may be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices, and the first server 104 and the second server 106 may be implemented as independent servers or a server cluster consisting of multiple servers.

[0067] In one embodiment, Figure 2 As shown, a data query method is provided, which is applied to Figure 1 Taking the Spark-thrift component in the first server 104 in the example as an example, the following steps are included:

[0068] S210, receiving a data query request uploaded by a terminal.

[0069] The data query request refers to a request sent by a user to a big data server in the hope of performing a corresponding data query. The first server may specifically be a sub-server in a server cluster including a hodoop database. The server cluster platform includes sub-servers that provide two services, hive and spark. Hive contains two important components, MetaStore and hiveserver2. Spark contains an important component, spark-thrift. Acquiring the data query request specifically involves acquiring the data query request sent by the user through the spark-thrift component in the spark service. The specific server may receive the data query request from the user end through the corresponding interface.

[0070] S230: The server reads the user information carried in the data query request.

[0071] The server needs to query the user information corresponding to the data query request. The hiveserver2 inside the server can determine the database permissions corresponding to the user based on the user's identity information and perform permission verification. Therefore, it is necessary to first confirm the user information corresponding to the user according to the data query request to perform the subsequent permission verification process to ensure the security of the data query process.

[0072] S250, forwarding the data query request and user information to the hiveserver2 component.

[0073] S270, receiving the metadata query result corresponding to the user authority sent by the hiveserver2 component.

[0074] Metadata, also known as intermediary data or relay data, is data that describes data, mainly information that describes data attributes, and is used to support functions such as indicating storage location, historical data, resource search, and file records. Metadata is a kind of electronic directory. In order to achieve the purpose of compiling a directory, it is necessary to describe and collect the content or characteristics of the data, thereby achieving the purpose of assisting data retrieval. Hive is a SQL query engine built in a big data server for data query. The hiveserver2 group is a server-side interface that enables remote clients to execute queries on hive and return results. This application forwards the query application sent to spark-thrift to the hiveserver2 component to perform data query corresponding to user permissions. Since the hive permission check is placed in hiveserver2, spark-thrift does not have the permission check function. If you query hive directly from spark-thrift, the query security cannot be guaranteed. It is necessary to forward the data query request sent to spark-thrift to the hiveserver2 component of hive, and the hiveserver2 component completes the metadata query process and obtains the metadata query results fed back from the hiveserver2 component.

[0075] S290, acquiring target data according to the metadata query result, and feeding back the target data to the terminal.

[0076] The metadata records the storage location of the corresponding target data and historical data and other information. According to the metadata query results, the corresponding target data of the user's query request can be directly obtained from the corresponding storage location, and this part of the target data can be fed back to the terminal to complete the data query process.

[0077] The above data query method is applied to the Spark-thrift component, which receives the data query request uploaded by the terminal; reads the user information carried in the data query request; forwards the data query request and the user information to the hiveserver2 component; receives the metadata query result corresponding to the user authority sent by the hiveserver2 component; obtains the target data according to the metadata query result, and feeds back the target data to the terminal. Based on the hiveserver2 component, the control of the user authority corresponding to the query request can be ensured, and the query process does not need to ensure the synchronization of the authority, and the method is simpler and easier.

[0078] In one embodiment, feeding back corresponding data query results according to the metadata query results includes:

[0079] Obtain the corresponding target data storage location according to the metadata query result;

[0080] Query the target data according to the target data storage location.

[0081] Metadata contains information describing the attributes of data, and is used to support functions such as indicating storage location, historical data, resource search, file records, etc. In order to achieve the purpose of cataloging, metadata describes and collects the content and characteristics of data, which can assist in data retrieval.

[0082] In one embodiment, step S290 includes:

[0083] Get target data based on metadata query results.

[0084] Get the user permission information corresponding to the target data.

[0085] Recheck permissions based on user permission information and user information.

[0086] When the result of the permission review is passed, the target data is fed back.

[0087] Before feeding back the target data to the user, a permission check can be performed again based on the permission information corresponding to the target data, so as to improve the rigor of the permission check process and the security of the data. Specifically, the server can query the permission information corresponding to the target data, and then compare and verify it with the obtained user information to complete the complete process of data verification. When the permission re-verification result is passed, it means that the target data found has no permission problem, and these data can be fed back to the user terminal. When the result of the permission re-verification is not passed, the target data in which the user permission information does not match the user information can be deleted, and the target data can be fed back. When it fails, when the result of the permission re-verification is not passed, the data in which the user permission information does not match the user information in the target data is deleted to obtain the updated target data, and then the updated target data is fed back to the user terminal to complete the data query process.

[0088] In one embodiment, Figure 3 As shown, a data query method is provided, which is applied to Figure 1 Taking the hiveserver2 component in the second server 106 as an example, the following steps are included:

[0089] S610, receiving a data query request and user information sent by a Spark-thrift component.

[0090] S630, obtaining metadata query results corresponding to user rights according to the data query request and the user information. S630 specifically includes performing data query in MetaStore according to the data query request and the user information, and obtaining metadata query results corresponding to user rights.

[0091] S650: Send the metadata query result to the Spark-thrift component.

[0092] Originally, when querying Hive through Spark, it is also necessary to first query the metadata from MetaStore, and then query the data based on the metadata. The specific process is that the spark-thrift component in Spark starts a hiveserver2 process in its own service to query MetaStore to obtain the corresponding metadata query results. However, if the hiveserver2 process is started directly from the spark-thrift component to query, the security of the data query process cannot be guaranteed. The technical solution of the present application can be implemented by rewriting spark-thrift, directly forwarding the user query request to the hiveserver2 component of Hive, and performing data query corresponding to the user's permissions in MetaStore according to the data query request through the hiveserver2 component, ensuring that the query result is a query result that has passed an effective permission check, thereby ensuring the security of the query process.

[0093] It should be understood that although Figure 2-3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0094] In one embodiment, Figure 4 As shown, a data query device is provided, which is applied to the Spark-thrift component, and the device includes:

[0095] The request receiving module 210 is used to receive a data query request.

[0096] The user information reading module 230 is used to read the user information carried in the data query request.

[0097] The request forwarding module 250 is used to forward the data query request and user information to the hiveserver2 component.

[0098] The data receiving module 270 is used to receive the metadata query result corresponding to the user authority sent by the hiveserver2 component.

[0099] The target data acquisition module 290 is used to acquire the target data according to the metadata query result and feed back the target data to the terminal.

[0100] In one embodiment, the target data acquisition module 290 is used to acquire the target data storage location according to the metadata query result; and query the target data according to the target data storage location.

[0101] In one embodiment, the target data acquisition module 290 is also used to obtain the target data according to the metadata query result; obtain the user authority information corresponding to the target data; perform authority verification based on the user authority information and user information; and when the result of the authority verification is passed, feedback the target data.

[0102] In one embodiment, the target data acquisition module 290 is also used to, when the result of the authority re-verification is failure, delete the data in the target data where the user authority information does not match the user information, to obtain updated target data; and feed back the updated target data.

[0103] In one embodiment, a data query device is provided, which is applied to a hiveserver2 component, and includes:

[0104] The information receiving module is used to receive the data query request and user information sent by the Spark-thrift component;

[0105] The metadata query module is used to obtain the metadata query results corresponding to the user authority according to the data query request and user information;

[0106] The metadata sending module is used to send metadata query results to the Spark-thrift component.

[0107] In one of the embodiments, the metadata query module is used to perform data query in MetaStore according to the data query request and user information, and obtain metadata query results corresponding to user permissions.

[0108] For the specific definition of the data query device, please refer to the definition of the data query method above, which will not be repeated here. Each module in the above-mentioned data query device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0109] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store user information data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data query method is implemented.

[0110] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0111] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0112] Receive data query requests uploaded by terminals;

[0113] Read the user information carried in the data query request;

[0114] Forward data query requests and user information to the hiveserver2 component;

[0115] Receive the metadata query results of the corresponding user permissions sent by the hiveserver2 component;

[0116] Obtain target data based on metadata query results and feed back target data to the terminal.

[0117] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the target data storage location according to the metadata query result; and querying the target data according to the target data storage location.

[0118] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining target data as a result of the metadata query;

[0119] Obtain user permission information corresponding to the target data;

[0120] Recheck permissions based on user permission information and user information;

[0121] When the result of the permission re-inspection is passed, the target data is fed back to the terminal.

[0122] In one embodiment, when the processor executes the computer program, the following steps are further implemented: when the result of the authority re-verification is failure, deleting the data in the target data that does not match the user authority information and the user information, and obtaining updated target data;

[0123] Feedback the updated target data to the terminal.

[0124] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0125] Receive data query requests and user information sent by the Spark-thrift component;

[0126] According to the data query request and user information, obtain the metadata query results corresponding to the user permissions;

[0127] Send metadata query results to the Spark-thrift component.

[0128] In one embodiment, when the processor executes the computer program, the following steps are further implemented: performing a data query in the MetaStore according to the data query request and the user information, and obtaining a metadata query result corresponding to the user authority.

[0129] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0130] Receive data query requests uploaded by terminals;

[0131] Read the user information carried in the data query request;

[0132] Forward data query requests and user information to the hiveserver2 component;

[0133] Receive the metadata query results of the corresponding user permissions sent by the hiveserver2 component;

[0134] Obtain target data based on metadata query results and feed back target data to the terminal.

[0135] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the target data storage location according to the metadata query result; and querying the target data according to the target data storage location.

[0136] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: obtaining target data as a result of the metadata query;

[0137] Obtain user permission information corresponding to the target data;

[0138] Recheck permissions based on user permission information and user information;

[0139] When the result of the permission re-inspection is passed, the target data is fed back to the terminal.

[0140] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: when the result of the authority re-verification is failure, deleting the data in the target data that does not match the user authority information and the user information, and obtaining updated target data;

[0141] Feedback the updated target data to the terminal.

[0142] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0143] Receive data query requests and user information sent by the Spark-thrift component;

[0144] According to the data query request and user information, obtain the metadata query results corresponding to the user permissions;

[0145] Send metadata query results to the Spark-thrift component.

[0146] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: performing data query in MetaStore according to the data query request and user information, and obtaining metadata query results corresponding to user permissions.

[0147] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0148] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0149] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A data query method, applied to a Spark-thrift component of a first server, the method comprising: Receive data query requests uploaded by terminals; Reading user information carried in the data query request; Forwarding the data query request and the user information to the hiveserver2 component of the second server, so that the hiveserver2 component performs a data query corresponding to the user authority in the MetaStore to complete the metadata query process; Receive the metadata query result corresponding to the user authority sent by the hiveserver2 component; Acquire target data according to the metadata query result; Acquire user authority information corresponding to the target data; and perform authority re-verification based on the user authority information and the user information; When the result of the authority re-inspection is passed, the target data is fed back to the terminal; when the result of the authority re-inspection is not passed, the data in the target data where the user authority information does not match the user information is deleted to obtain the updated target data; The updated target data is fed back to the terminal.

2. The method according to claim 1, characterized in that The acquiring target data according to the metadata query result comprises: According to the metadata query result, obtaining a target data storage location; Query the target data according to the target data storage location.

3. The method according to claim 1, characterized in that: The data query request uploaded by the receiving terminal includes: Receive data query requests from the terminal through the corresponding interface.

4. The method according to claim 3, characterized in that The metadata is used to support functions of indicating storage location, historical data, resource search, and file records.

5. A data query method, applied to the hiveserver2 component of the second server, characterized in that: The method comprises: Receiving a data query request and user information sent by a Spark-thrift component of the first server; According to the data query request and the user information, a data query corresponding to the user authority is performed in the MetaStore to obtain a metadata query result corresponding to the user authority; Send the metadata query result to the Spark-thrift component to obtain the target data through the metadata query result; obtain the user authority information corresponding to the target data; perform authority re-verification according to the user authority information and the user information; when the result of the authority re-verification is passed, feed back the target data to the terminal; when the result of the authority re-verification is not passed, delete the data in the target data where the user authority information does not match the user information, and obtain the updated target data; feed back the updated target data to the terminal.

6. The method according to claim 5, characterized in that The step of obtaining a metadata query result corresponding to the user authority according to the data query request and the user information includes: According to the data query request and the user information, a data query is performed in the MetaStore to obtain a metadata query result corresponding to the user authority.

7. A data query device, applied to the Spark-thrift component of a first server, characterized in that: The device comprises: A request receiving module, used for receiving a data query request; A user information reading module, used to read the user information carried in the data query request; A request forwarding module, used for forwarding the data query request and the user information to the hiveserver2 component of the second server, so that the hiveserver2 component performs a data query corresponding to the user authority in the MetaStore to complete the metadata query process; A data receiving module, used for receiving the metadata query result corresponding to the user authority sent by the hiveserver2 component; A target data acquisition module is used to acquire target data according to the metadata query result; acquire user authority information corresponding to the target data; perform authority re-verification based on the user authority information and the user information; when the result of the authority re-verification is passed, feed back the target data to the terminal; when the result of the authority re-verification is failed, delete the data in the target data whose user authority information does not match the user information to obtain updated target data; and feed back the updated target data to the terminal.

8. A data query device, applied to the hiveserver2 component of the second server, characterized in that: The device comprises: An information receiving module, used to receive a data query request and user information sent by a Spark-thrift component of the first server; The metadata query module is used to perform a data query corresponding to the user authority in the MetaStore according to the data query request and the user information, and obtain the metadata query result corresponding to the user authority; The metadata sending module is used to obtain target data through the metadata query result; obtain user authority information corresponding to the target data; perform authority re-verification according to the user authority information and the user information; when the result of the authority re-verification is passed, feed back the target data to the terminal; when the result of the authority re-verification is not passed, delete the data in the target data whose user authority information does not match the user information to obtain updated target data; and feed back the updated target data to the terminal.

9. A computer device, characterized in that: It comprises at least one processor, at least one memory, and a bus; wherein the processor and the memory communicate with each other through the bus; and the processor is used to call program instructions in the memory to execute the method as described in any one of claims 1-6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.