Data query method and related device
By using the aggregation query task and content query task methods in the data query interface, some precise query results are used for approximate estimation, which solves the problem of quickly finding target data in massive data and reducing query costs, achieving rapid response and overhead saving effects.
Patent Information
- Application Number
- CN202311861516.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-10-30
- Filing Date
- 2023-12-29
- Publication Date
- 2025-05-02
AI Technical Summary
It is a difficult problem to quickly find target data in massive data and reduce query costs, especially when it is necessary to query data within a time frame of multiple months or even one year.
By providing a data query interface, the query tasks entered by the user are obtained, and the method of aggregated query tasks and content query tasks is used to approximate estimate some accurate query results, display the first estimated query results, and gradually improve the accuracy of the results through multiple rounds of accurate queries.
It realizes rapid response to users, helps users quickly understand query results trends, and saves query overhead, ensuring that users obtain available data in a short time.
Smart Images

Figure CN119917530A_ABST
Abstract
Description
[0001] This application claims priority to Chinese patent application No. 202311426946.X filed on October 30, 2023, with invention name “A data query method, device and computing device cluster”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of cloud computing, and in particular to a data query method and related devices. Background Art
[0003] With the continuous development of information technology, various industries inevitably use computer equipment in the work process, and the relevant data generated will also be stored accordingly. In addition, the amount of data involved in various industries and users is constantly expanding with the expansion of business. In real life, when inspectors and operation and maintenance personnel are looking for target data, they sometimes need to query massive amounts of data within a period of several months or even a year. Faced with such a large amount of data, how to quickly find the target data and reduce the query cost as much as possible is a problem that needs to be solved urgently. Summary of the invention
[0004] The present application provides a data query method and related devices, which can quickly find target data and reduce the query cost as much as possible. The technical solution is as follows:
[0005] In a first aspect, a data query method is provided, the method comprising: providing a data query interface, the data query interface being used to obtain a query task input by a user; obtaining an aggregate query task from the data query interface, the aggregate query task being used to query a total amount of data that meets a query condition, the query condition including a query term and a query time range; and displaying a first estimated query result of the aggregate query task in the data query interface, wherein the first estimated query result comprises a first total amount of data that meets the query condition obtained by approximate estimation based on a first part of precise query results, the first part of precise query results comprising an amount of data that meets the query condition queried from M data blocks, the M data blocks being sampled from N data blocks that match the aggregate query task, M and N being integers, and M being less than N.
[0006] For aggregate query tasks, approximate estimation is performed based on partial precise query results to obtain query results that meet the query conditions, and then the estimated query results are displayed in the data query interface. Compared with complete precise query results, approximate estimation through partial precise query results can not only respond to users quickly and facilitate users to quickly understand the trend of query results, but also save costs. In other words, through the method of estimating the whole through samples, the total amount of data that meets the query conditions is approximated based on the first part of the precise query results, and a query result can be quickly obtained, allowing users to obtain available data in a shorter time.
[0007] Optionally, before displaying the first estimated query result of the aggregate query task in the data query interface, the method also includes: displaying the second estimated query result of the aggregate query task in the data query interface, wherein the second estimated query result includes a second total data volume that meets the query conditions obtained by approximate estimation based on the second part of the precise query results, and the second part of the precise query results includes the amount of data that meets the query conditions queried from P data blocks, and the P data blocks are sampled from N data blocks matching the aggregate query task, and the above-mentioned M data blocks include the P data blocks; displaying the first estimated query result of the aggregate query task in the data query interface includes: replacing the second estimated query result with the first estimated query result in the data query interface.
[0008] For aggregate query tasks, you can get complete and precise query results through multiple rounds of precise query. In this way, the first part of the precise query results is the results obtained by the first i rounds of precise query in the multiple rounds of precise query, and the second part of the precise query results is the results obtained by the first i-1 rounds of precise query in the multiple rounds of precise query. Each round has new precise query results. Each round makes an approximate estimate of the amount of data that meets the query conditions based on all the current precise query results, and displays the results on the data query interface. In this way, the number of precise query results is gradually increased, making the approximate estimate results more accurate.
[0009] Optionally, before replacing the second estimated query result with the first estimated query result in the data query interface, the method also includes: determining a newly sampled data block; based on the query conditions, querying the newly sampled data block to determine a new query result, the new query result including the amount of data that meets the query conditions queried from the newly sampled data block; determining the first part of the precise query results based on the new query results and the second part of the precise query results.
[0010] Each data block contains multiple data contents, and each data content corresponds to a data generation time. Therefore, when querying the newly sampled data blocks in the i-th round, all data contents in each data block can be traversed. When a certain data content contains the query word and the data generation time of the data content is within the query time range, the data content is determined to be data that meets the query conditions, thereby obtaining the amount of data that meets the query conditions in the newly sampled data blocks in the i-th round. After obtaining the amount of data that meets the query conditions in the newly sampled data blocks in the i-th round, add the amount of data that meets the query conditions in the newly sampled data blocks in each round in the previous i rounds to obtain the amount of data that meets the query conditions in the M data blocks. Among them, the sum of the amount of data that meets the query conditions in the newly sampled data blocks in the previous i-1 rounds is the amount of data that meets the query conditions in the P data blocks.
[0011] Optionally, the method further includes displaying complete and precise query results of the aggregate query task in a data query interface, where the complete and precise query results include a total amount of data that meets the query conditions and is queried from the N data blocks.
[0012] For aggregate query tasks, each round makes an approximate estimate of the total amount of data that meets the query conditions based on the partially accurate query results. Through multiple iterations, complete and accurate query results can be obtained, so that the data query interface can progressively display more and more accurate results to users.
[0013] Optionally, the first estimated query result further includes a first data statistical graph, where the first data statistical graph is used to indicate the distribution of the first total data volume in different time intervals.
[0014] By displaying the first data statistics chart in the data query interface, the temporal distribution of the amount of data that meets the query conditions can be intuitively displayed to the user, allowing the user to have a further understanding of the amount of data that meets the query conditions, giving the user a comfortable experience.
[0015] Optionally, the method further includes: displaying the query progress of the aggregate query task in the data query interface.
[0016] Optionally, the method further includes: determining N data blocks matching the aggregate query task from the target database based on the query condition and the index directory of the target database.
[0017] By using the index directory, N data blocks that match the aggregate query task can be efficiently screened out, and then the screened N data blocks can be scanned to obtain the data content that meets the query conditions without traversing all the data in the target database. This can improve the efficiency of data query and reduce the consumption of cloud platform processing resources.
[0018] In some cases, it may take a relatively long time to determine the first part of the precise query results. In order to quickly respond to users, after obtaining the aggregate query task, you can also first perform a rough query on the target database based on the query conditions to obtain a rough query result. The rough query result includes the amount of data that meets the query conditions obtained by performing a rough query on the target database. In this way, before displaying the first estimated query result, the rough query result can be displayed in the data query interface.
[0019] Since the speed of rough query is very fast, the rough query result can be quickly obtained and displayed on the data query interface, so that the user can quickly see the query result and quickly have a general understanding of the number of data that meet the query conditions. Moreover, in the above-mentioned aggregate query, rough query and multiple rounds of precise query are designed, and precise query results are obtained through multiple iterations, so that the data query interface can not only quickly display the rough query results to the user, but also gradually display more precise results to the user, further enabling the user to obtain available data in a shorter time.
[0020] In a second aspect, another data query method is provided, the method comprising: providing a data query interface, the data query interface being used to obtain a query task input by a user; obtaining a content query task from the data query interface, the content query task being used to query target data content that meets the query conditions, the query conditions including query terms and query time range; performing a first query operation based on the query conditions and a single query result return condition, and displaying the first data content obtained by the first query operation in the data query interface, wherein the single query result return condition includes a single maximum query data volume and a single maximum query delay, the first query operation being used to query a part of the target data content, the query delay of the first query operation being no greater than the single maximum query delay and the data volume of the first data content being no greater than the single maximum query data volume.
[0021] The maximum amount of data in a single query in the single query result return condition refers to the maximum amount of data content that meets the query conditions when a query operation is performed each time.
[0022] The single maximum query delay in the single query result return condition refers to the maximum query time for each query operation. When the time for each query operation reaches the single maximum query delay, the query is stopped.
[0023] When the amount of data in the target database is large, it may take a long time to find the data content that meets the query conditions for the maximum number of single queries. If the number of queried data reaches the maximum number of single queries, or when all data has been traversed, the query results are fed back to the user, which may greatly reduce the user experience. However, through the existence of the maximum single query delay, the response time of each query operation can be controlled within a certain period of time, so that the cloud platform can promptly feedback the current query status of the user content query task, so that the user can know the current query results in time, reducing the impact of excessive data volume on user experience.
[0024] Optionally, based on the query conditions and the single query result return conditions, a first query operation is performed, and the first data content obtained through the first query operation is displayed in the data query interface, including: based on the query conditions and the single query result return conditions, a first query operation is performed; when any one of multiple target conditions is met first, the first query operation is terminated, and the first data content obtained through the first query operation is displayed in the data query interface, the multiple target conditions include: the query delay of the first query operation reaches the single maximum query delay, the amount of data retrieved by the first query operation reaches the single maximum query data amount, and the first query operation has completed the query of the target data content.
[0025] For content query tasks, it is often necessary to perform multiple query operations to find all target data contents. In this case, the first query operation can be any query operation. Of course, the cloud platform may also be able to find all target data contents through only one query operation. In this case, the query operation is regarded as the first query operation.
[0026] Optionally, based on the query conditions and the single query result return conditions, a first query operation is performed, and the first data content obtained by the first query operation is displayed in the data query interface, including: determining the estimated total query delay of the content query task; based on the query conditions, the estimated total query delay and the single maximum query delay, the content query task is divided into multiple ordered subtasks, wherein each subtask is used to query a part of the target data content, and the estimated query delay of each subtask does not exceed the single maximum query delay; the first query operation is performed by executing at least one subtask; when any one of the multiple target conditions is met first, the first query operation is terminated, and the first data content obtained by the first query operation is displayed in the data query interface, the multiple target conditions include: the query delay of the first query operation reaches the single maximum query delay, the data volume of the first data content reaches the single maximum query data volume, and the target subtask is completed, wherein the target subtask is the last subtask among the multiple subtasks, or, when the target subtask is completed, the sum of the query delay of the first query operation and the estimated query delay of the next subtask of the target subtask is greater than the single maximum query delay.
[0027] Optionally, after the first query operation is completed, the method also includes: recording the pause position of the content query task; displaying a target query option in the data query interface, the target query option being used to indicate continuing to query the data content; after receiving a user trigger operation on the target query option, performing a second query operation based on the pause position.
[0028] Optionally, after the first query operation is completed, the method further includes: determining the query progress of the content query task; and displaying the query progress of the content query task in the data query interface. In this way, the user can obtain the completion status of the current content query task in a timely manner, so that the user can end the task in advance as needed, saving time and reducing expenses.
[0029] Optionally, the method also includes: obtaining a context query task triggered by the user regarding the benchmark data content, the context query task being used to query the target context data content that meets the context query conditions, the context query conditions including a previous time range, a following time range and a query statement, and the benchmark data content being any data content displayed on the data query interface; performing a first previous query operation and a first following query operation based on the context query conditions and a single query result return condition, and displaying the first previous data content obtained by the first previous query operation and the first following data content obtained by the first following query operation in the data query interface, the first previous query operation and the first following query operation being used to query a part of the target context data content, the query delays of the first previous query operation and the first following query operation being no greater than the single maximum query delay, and the data volumes of the first previous data content and the first following data content being no greater than the single maximum query data volume.
[0030] After performing the above content query task, the user may trigger a context query task on a certain data content displayed in the data query interface. At this time, the method further includes the above content.
[0031] Optionally, the maximum single query data volume and / or the maximum single query delay are input by the user in the data query interface.
[0032] For content query tasks and context query tasks, by setting the maximum single query delay, the time for each query operation to return results can be controlled within a certain period of time. By setting the conditions for returning single query results, the cloud platform can return some ordered results in a timely manner in various situations, thereby improving the user experience. The target query option provided by the data query interface allows users to initiate queries for more data after obtaining the current results, ensuring that users can obtain the data content they need. In addition, the data query interface displays the current task query progress, which helps users understand the current query status of the content query task and helps users determine whether to end the content query task according to their needs, so as to save time and reduce costs.
[0033] In a third aspect, a data query device is provided, wherein the data query device has the function of implementing the data query method in the first aspect. The data query device includes at least one module, and the at least one module is used to implement the data query method provided in the first aspect.
[0034] In a fourth aspect, another data query device is provided, which has the function of implementing the data query method in the second aspect. The data query device includes at least one module, and the at least one module is used to implement the data query method provided in the second aspect.
[0035] In a fifth aspect, a computer device cluster is provided, the computer device cluster comprising at least one computer device, each computer device comprising a processor and a memory, the processor of the at least one computer device being used to execute instructions stored in the memory of the at least one computer device to implement the method described in the first aspect and / or the second aspect above.
[0036] Optionally, the computer device cluster may further include a communication bus, which is used to establish a connection between the processor and the memory of the at least one computer device.
[0037] In a sixth aspect, a computer-readable storage medium is provided, wherein the storage medium stores instructions. When the instructions are executed by a computing device cluster, the computing device cluster executes the steps of the data query method described in the first aspect and / or the second aspect.
[0038] In a seventh aspect, a computer program product comprising instructions is provided, and when the instructions are executed by a computer device cluster, the computer device cluster executes the steps of the data query method described in the first aspect and / or the second aspect. In other words, a computer program is provided, and when the computer program is executed on a computer, the computer executes the steps of the data query method described in the first aspect and / or the second aspect.
[0039] The technical effects obtained by the above-mentioned third and fourth aspects are respectively similar to the technical effects obtained by the corresponding technical means in the first and second aspects, and the technical effects obtained by the above-mentioned fifth, sixth and seventh aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect and / or the second aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is a flow chart of a data query method provided by an embodiment of the present application;
[0041] Figure 2 It is a schematic diagram of a data query interface including the execution result of an aggregate query task provided in an embodiment of the present application;
[0042] Figure 3 is a schematic diagram of an approximate estimation method provided in an embodiment of the present application;
[0043] Figure 4 It is a schematic diagram of another data query interface including the execution result of the aggregate query task provided in an embodiment of the present application;
[0044] Figure 5 is a flow chart of another data query method provided by an embodiment of the present application;
[0045] Figure 6 is a schematic diagram of a data query interface including content query task execution results provided by an embodiment of the present application;
[0046] Figure 7 is a schematic diagram of another data query interface including content query task execution results provided by an embodiment of the present application;
[0047] Figure 8 is a schematic diagram of a data query interface including a context query task execution result provided by an embodiment of the present application;
[0048] Fig. 9 It is a structural schematic diagram of a data query device provided in an embodiment of the present application;
[0049] Fig.10 is a structural schematic diagram of another data query device provided in an embodiment of the present application;
[0050] Fig.11 is a structural schematic diagram of a computer device provided in an embodiment of the present application;
[0051] Fig.12 is a schematic diagram of a computer device cluster provided in an embodiment of the present application;
[0052] Fig.13 This is a schematic diagram of one or more computer devices in a computer device cluster provided by an embodiment of the present application being connected through a network. DETAILED DESCRIPTION
[0053] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0054] Before explaining in detail the data query method provided in the embodiment of the present application, the application scenarios involved in the embodiment of the present application are first introduced.
[0055] With the continuous development of information technology, various industries inevitably use computer equipment in the process of work, and the relevant data generated will also be stored accordingly. At present, the amount of data involved in various industries and users is constantly expanding with the expansion of business. In real life, when inspectors and operation and maintenance personnel are looking for target data, they sometimes need to query massive data within a period of several months or even a year. For example, for log data, inspectors sometimes find that a certain log has an error during their daily inspections. Since the inspectors may not know the time interval when the error occurred, they may need to traverse the log data within a longer time range to obtain detailed data related to the log with the error, so as to facilitate the analysis of the root cause of the error. Or, sometimes it is necessary to use log data to count the number of visits to a certain Internet protocol (IP) address within a period of time. Since this type of log is usually a high-frequency log (i.e., a log with a high frequency of occurrence), it may be necessary to traverse a considerable amount of log data to obtain the number of visits to the IP address within a period of time. Faced with such a large amount of data, how to quickly find the target data and reduce the query cost as much as possible is a problem that needs to be solved urgently.
[0056] The related technology provides two methods for data query. The first method is to query data by setting the maximum query data volume. That is, in the process of querying data, if the amount of data that meets the query conditions reaches the maximum query data volume, the query result is returned. If the amount of data that meets the query conditions does not reach the maximum query data volume, the traversal will continue until the maximum query data volume is reached and the query result is returned, or until the amount of data that meets the query conditions does not reach the maximum query data volume but all the data has been traversed. The query result is returned. The second method is to query data by setting the maximum query delay. That is, in the process of querying data, if the query delay reaches the maximum query delay, the query result is returned. If the query delay does not reach the maximum query delay, the traversal will continue.
[0057] The first method may result in inaccurate query results, and this solution may often take a long time to return query results, resulting in a poor user experience. In addition, in application scenarios where data is strongly ordered in time, such as contextual queries, in order to return the maximum query data volume, a lot of data may be traversed, and such products usually calculate the cost based on the number of traversed data. However, in most cases, users can find one or more pieces of data they need only through data that partially meets the query conditions. In other words, this type of solution will also implicitly increase the user's query cost. The second method controls the query time by setting the maximum query delay. When the query times out, the query is terminated. However, in scenarios with massive data, this solution may fail to obtain query results.
[0058] Based on this, the embodiment of the present application provides a data query method. In the method provided by the embodiment of the present application, the task that needs to count non-detailed data content such as IP address access volume is called an aggregate query task, and the task that needs to query detailed content data such as log content is called a content query task. For the aggregate query task, the embodiment of the present application performs approximate estimation based on the partial precise query results to obtain the query results that meet the query conditions, and then displays the estimated query results in the data query interface. Compared with the complete and precise query results, the approximate estimation through the partial precise query results can not only respond to the user quickly, facilitate the user to quickly know the trend of the query results, but also save costs. For the content query task, the query operation is performed by setting a single query result return condition, and the query delay of the query operation is not greater than the single maximum query delay included in the single query result return condition, and the data volume of the data content obtained by the query operation is not greater than the single maximum query data volume included in the single query result return condition; at the same time, the pause position is also recorded and a target query option is provided, which is used to indicate to continue querying the data content. In this way, after performing a query operation, the data content obtained through the query operation can be displayed in the data query interface in a timely manner, so that the user can end the task early after obtaining the desired query results based on the data content obtained by the query operation, saving time and expenses, and allowing the user to initiate multiple queries through the target query option to ensure that the data content required by the user can be obtained.
[0059] The executor of the data query method provided in the embodiment of the present application can be a cloud platform or an electronic device with a data query function. The cloud platform can be a server cluster or a distributed system composed of multiple physical servers, etc., or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, or it can be a cloud server or a cloud computing service center.
[0060] Next, the data query method provided in the embodiment of the present application is explained in detail. For the convenience of description, the data query method provided in the embodiment of the present application is introduced with the cloud platform as the execution subject. It should also be noted that the data query method provided in the embodiment of the present application does not limit the type of data queried, which can be logs, images, documents, etc.
[0061] Figure 1 This is a flow chart of a data query method provided by an embodiment of the present application. Please refer to Figure 1 , the method comprises the following steps.
[0062] Step 101: providing a data query interface, where the data query interface is used to obtain a query task input by a user.
[0063] The data query interface may include multiple different areas, each of which is used to trigger different query tasks. Of course, the data query interface may also include multiple independent sub-interfaces, each of which is used to trigger different query tasks. The embodiment of the present application does not limit this.
[0064] Each query task has a corresponding target database, which is one or more databases that the user currently needs to query. The one or more databases are usually stored in a cloud platform. The embodiment of the present application does not limit the data type stored in the one or more databases. The data stored in the target database uses a data block as the minimum operation unit, and each data block has a corresponding time range, which is the range of the data generation time of the data stored in the data block.
[0065] In some embodiments, the target database is selected by the user, and the embodiments of the present application do not limit the way in which the user selects the target database. For example, the data query interface provided by the cloud platform includes a database selection area, and the user can select the target database through the database selection area. Of course, the database selection area can also be an independent sub-interface in the data query interface, or an interface independent of the data query interface. Alternatively, the cloud platform provides a command input window, and the user can enter relevant commands in the command input window to select the target database.
[0066] Step 102: Obtain an aggregate query task from the data query interface, where the aggregate query task is used to query the total amount of data that meets the query conditions, where the query conditions include query terms and a query time range.
[0067] An aggregate query task is a task that counts the amount of data in the target database that meets the query conditions. For example, count the amount of data in the target database that contains the character "life", count the number of times user A visits website B on November 1, 2023, and so on.
[0068] The data query interface may include multiple different areas, which are used to obtain different query parameters in the query conditions of the aggregate query task (such as query terms and query time range, etc.). Of course, the data query interface may also include multiple independent sub-interfaces, which are used to obtain different query parameters in the query conditions of the aggregate query task. The embodiments of the present application do not limit this.
[0069] For different application scenarios and the data types queried by the aggregate query task, the query terms may be different. For example, if you currently need to query the reason why a customer failed to successfully pay for a takeaway order, and the data type queried by the aggregate query task is log, the query term can be the IP address of the electronic device used by the customer to pay for the takeaway order, so as to facilitate finding the log content within the time period when the customer paid for the takeaway order to analyze the reasons for the unsuccessful payment. For another example, if you currently need to count the number of errors reported on a service platform on that day, and the data type queried by the aggregate query task is log, the query term can be error, so as to facilitate determining the number of logs for all errors reported on that day by the service platform.
[0070] The query word can be a single query word or a combination of multiple query words. For example, if you need to query the number of errors reported by a server on that day, the query word can be a combination of the IP address of the server and error. The query word can be input by the user in the data query interface, or selected by the user from multiple query words provided in the data query interface, or obtained by other means.
[0071] The query time range is determined by the time information input or selected by the user in the data query interface. The time information input or selected by the user in the data query interface can be a relative time length or an absolute time range, which is not limited in the present embodiment.
[0072] The relative time length is the time length from the start time of the query operation, and the query time range is the time range from the relative time to the start time of the query operation. The relative time is the time before the start time of the query operation and the time length from the start time of the query operation is the relative time length. For example, if the relative time length is 1 hour and the start time of the query operation is 20:30 on November 23, 2023, then the relative time is 19:30 on November 23, 2023, and the query time range is from 19:30 on November 23, 2023 to 20:30 on November 23, 2023. The absolute time range refers to the time range from the first absolute time to the second absolute time, and the first absolute time and the second absolute time are both times entered or selected by the user.
[0073] The relative time length may be input by the user in the data query interface, or may be selected by the user from multiple relative time lengths provided in the data query interface. For example, the data query interface provides a relative time length menu, which includes multiple relative time lengths, and the user may select a relative time length according to the time range required for the aggregate query task.
[0074] The first absolute moment and the second absolute moment may be input by the user in the data query interface, or may be selected by the user from the absolute moments provided in the data query interface. For example, the data query interface further includes an absolute time input box, and the user may directly input the first absolute moment and the second absolute moment into the absolute time input box, or the data query interface further includes an absolute time calendar page, and the user may select the first absolute moment and the second absolute moment through the absolute time calendar page.
[0075] Of course, the above is only an example. In actual applications, the data query interface can also provide other types of operation areas for users to input or select relative time length, first absolute moment and second absolute moment. The embodiments of the present application do not limit this.
[0076] After the cloud platform obtains the aggregate query task through the data query interface, the aggregate query task can be executed immediately, or it can be executed within the first time period after obtaining the aggregate query task, and it is determined that the user has not modified the query conditions. Of course, the aggregate query task can also be executed after receiving the query instruction issued by the user. Among them, the size of the first time period can be set according to the actual application scenario. The first time period can be pre-set by the cloud platform or set by the user. The embodiment of the present application does not limit the size and setting method of the first time period. There are many ways for users to issue query instructions. For example, when the cloud platform provides an instruction input window, users can issue query instructions through the instruction input window. When the data query interface also includes a query analysis button, users can complete the issuance of query instructions by clicking the query analysis button. The embodiment of the present application does not limit the way users issue query instructions.
[0077] For example, the data query interface is as follows Figure 2 As shown, area A indicates that the user inputs a query word, area B indicates that the user selects a relative time length, area C is a query analysis button for issuing query instructions, and area D is used to display query results.
[0078] Step 103: Display the first estimated query result of the aggregate query task in the data query interface, wherein the first estimated query result includes a first total data volume that meets the query conditions obtained by approximate estimation based on the first part of the precise query results, and the first part of the precise query results includes the amount of data that meets the query conditions queried from M data blocks, and the M data blocks are sampled from N data blocks that match the aggregate query task, M and N are integers, and M is less than N.
[0079] In some embodiments, the first estimated query result of the aggregate query task may be determined according to the following steps (1)-(3).
[0080] (1) M data blocks are sampled from the N data blocks that match the aggregation query task.
[0081] For aggregate query tasks, the cloud platform can obtain complete and precise query results through multiple rounds of precise queries. In this way, the first part of the precise query results can be the results obtained by the first i rounds of precise queries in the multiple rounds of precise queries. Of course, the cloud platform does not need to obtain complete and precise query results, but only needs to approximate a query result through one round of precise queries. In this way, the first part of the precise query results is the result obtained by the one round of precise queries. In different cases, the implementation methods of sampling M data blocks from the N data blocks are different, so they will be introduced separately below.
[0082] In the first case, the cloud platform obtains complete and accurate query results through multiple rounds of accurate query, and the first part of the accurate query results is the result obtained by the first i rounds of accurate query in the multiple rounds of accurate query. At this time, the newly sampled data blocks of the i-th round are determined from the N data blocks, and the newly sampled data blocks of the i-th round and the P data blocks are determined as the M data blocks. The P data blocks are the confluence of the newly sampled data blocks in each round in the first i-1 rounds.
[0083] In some embodiments, any sampling algorithm can be used to determine the newly sampled data blocks of the i-th round from the N data blocks. The sampling algorithm can be uniform sampling, exponential sampling, etc. In practical applications, a suitable sampling algorithm can be selected according to needs, and the embodiments of the present application do not limit this. For example, if you do not want to affect the overall performance, you can use uniform sampling to make the number of newly sampled data blocks in each round the same, but it may take a little longer to obtain a complete and accurate query result; if you do not mind slightly affecting the overall performance, you can use exponential sampling to make the number of newly sampled data blocks in each round grow explosively, so that you can quickly obtain a complete and accurate query result.
[0084] In some embodiments, the sampling algorithm can be selected by the user. For example, when the data query interface provides an algorithm selection menu, the user can select a sampling algorithm through the algorithm selection menu, and the cloud platform will determine the newly sampled data blocks for the i-th round according to the sampling algorithm selected by the user.
[0085] In the second case, the cloud platform approximates the query result through a round of precise query, and the first part of the precise query result is the result obtained by the round of precise query. At this time, a part of the data blocks is sampled from the N data blocks, and the sampled part of the data blocks is determined as the M data blocks.
[0086] In some embodiments, a portion of the data blocks may be sampled from the N data blocks by any sampling algorithm, such as randomly selecting a portion of the data blocks, which is not limited in this embodiment of the present application.
[0087] In some embodiments, before sampling M data blocks from N data blocks matching the aggregate query task, the N data blocks may be first determined from the target database.
[0088] Since the target database usually contains multiple data blocks, each data block contains multiple data contents, each data content corresponds to a data generation time, and the index directory of the target database usually records the content summary of each data block and the range of data generation time, therefore, based on the query conditions and the index directory of the target database, N data blocks matching the aggregate query task can be determined from the target database, the data content stored in each of the N data blocks matches the query term, and the data generation time of the data content stored in each data block matches the query time range. In other words, the content summary of the data content stored in the N data blocks matches the query term, and the range of data generation time of the data content stored in the N data blocks at least overlaps with the query time range.
[0089] The above index directory is a structure that sorts the values of one or more columns in the database (the database is usually stored in a table form). Each database can establish its own corresponding index directory, and the index directory can be used to quickly access specific information in the database. For example, a query task needs to find the data content with an identity identification code (ID) of 44 in database D. If there is no index directory, the entire database must be traversed until the row with ID equal to 44 is found; if there is an index directory and the index directory is established for the ID column, 44 can be directly searched in the index directory to know the location of this row, that is, if this row is found, the data content with ID 44 can be obtained.
[0090] By using the index directory, N data blocks that match the aggregate query task can be efficiently screened out, and then the screened N data blocks can be scanned to obtain the data content that meets the query conditions without traversing all the data in the target database. This can improve the efficiency of data query and reduce the consumption of cloud platform processing resources.
[0091] (2) Determine a first part of accurate query results, where the first part of accurate query results includes the amount of data found in the M data blocks that meets the query condition.
[0092] Based on the above description, for the aggregate query task, the cloud platform can obtain complete and precise query results through multiple rounds of precise queries. In this way, the first part of the precise query results is the result obtained by the first i rounds of precise queries in the multiple rounds of precise queries. Of course, the cloud platform does not need to obtain complete and precise query results, but only needs to approximate a query result through one round of precise queries. In this way, the first part of the precise query results is the result obtained by the one round of precise queries. In different situations, the implementation methods for determining the first part of the precise query results are different, so they will be introduced separately below.
[0093] In the first case, the cloud platform obtains complete and accurate query results through multiple rounds of accurate query. The first part of the accurate query results is the result obtained from the first i rounds of accurate query in the multiple rounds of accurate query. At this time, based on the query conditions, the newly sampled data blocks of the i-th round are queried to determine the newly added query results. The newly added query results include the amount of data that meets the query conditions queried from the newly sampled data blocks; based on the newly added query results and the second part of the accurate query results, the first part of the accurate query results is determined. The second part of the accurate query results includes the amount of data that meets the query conditions queried from P data blocks.
[0094] As can be seen from the above description, each data block contains multiple data contents, and each data content corresponds to a data generation time. Therefore, when querying the newly sampled data blocks in the i-th round, all data contents in each data block can be traversed. When a certain data content contains the query word and the data generation time of the data content is within the query time range, the data content is determined to be data that meets the query conditions, thereby obtaining the amount of data that meets the query conditions in the newly sampled data blocks in the i-th round. After obtaining the amount of data that meets the query conditions in the newly sampled data blocks in the i-th round, the amount of data that meets the query conditions in the newly sampled data blocks in each round of the previous i rounds is added to obtain the amount of data that meets the query conditions in the M data blocks. Among them, the sum of the amount of data that meets the query conditions in the newly sampled data blocks in the previous i-1 rounds is the amount of data that meets the query conditions in the P data blocks.
[0095] Since each data content in the data block corresponds to a data generation time, when the newly sampled data block is queried based on the query condition, the data generation time of the data content in the newly sampled data block that meets the query condition can also be obtained. In this way, the newly added query result also includes the data generation time of the data content that meets the query condition found in the newly sampled data block. Similarly, the second part of the precise query result also includes the data generation time of the data content that meets the query condition found in the P data blocks. Therefore, the first part of the precise query result can also include the data generation time of the data content that meets the query condition found in the M data blocks.
[0096] In the second case, the cloud platform approximates the query result through a round of precise query, and the first part of the precise query result is the result obtained by the round of precise query. At this time, based on the query condition, the M data blocks are queried to determine the first part of the precise query result.
[0097] In some embodiments, all data contents in the M data blocks are traversed, and when a certain data content contains a query term and the data generation time of the data content is within the query time range, the data content is determined to be data that meets the query conditions, thereby obtaining the amount of all data that meet the query conditions in the M data blocks.
[0098] Since each data content in the data block corresponds to a data generation time, when the M data blocks are queried based on the query condition, the data generation time of the data content in the M data blocks that meets the query condition can also be obtained. In this way, the first part of the precise query results can also include the data generation time of the data content that meets the query condition found from the M data blocks.
[0099] (3) Based on the first part of the precise query results, an approximate estimate is made to obtain a first estimated query result.
[0100] Based on the above description, for the aggregation query task, the cloud platform can obtain complete and accurate query results through multiple rounds of accurate query, so that the first part of the accurate query results is the result obtained by the first i rounds of accurate query in the multiple rounds of accurate query. Of course, the cloud platform does not need to obtain complete and accurate query results, but only needs to approximate a query result through one round of accurate query, so that the first part of the accurate query results is the result obtained by the one round of accurate query. Moreover, the first part of the accurate query results includes the amount of data that meets the query conditions queried from the M data blocks, so in the first case, when the i-th round is the last round, the amount of data that meets the query conditions queried in the first i rounds is the total amount of data that meets the query conditions in the N data blocks, that is, the first total amount of data. When the i-th round is not the last round, the first total amount of data that meets the query conditions can be approximated based on the first part of the accurate query results. In the second case, the first total amount of data that meets the query conditions can be directly approximated based on the first part of the accurate query results.
[0101] The implementation process of performing an approximate estimation based on the precise query results of the first part to obtain the first total data volume that meets the query conditions includes: dividing the data volume that meets the query conditions queried from the M data blocks by M to obtain a first estimated average value; multiplying the first estimated average value by N to obtain the total data volume that meets the query conditions in the N data blocks, that is, the first total data volume.
[0102] Of course, the first total data volume may also be approximately estimated by other methods, which is not limited in the embodiments of the present application.
[0103] Combine the following Figure 3 The above approximate estimation process is explained below. Figure 3 , assuming that there are three data sets in the target database, and each data set has 9 data blocks that match the aggregation query task. There are 27 data blocks that match the aggregation query task in the three data sets. The data generation time range of the three data sets is the same, but for any data set, the data generation time range of each data block in the data set does not overlap. Assume that in the current aggregation query task, 3 data blocks that match the query task have been taken out from the three data sets in a streaming reading manner and scanned, that is, 9 data blocks have been extracted from the 27 data blocks that match the aggregation query task and scanned, and the scan results have been aggregated and cached. Assuming that the amount of data that meets the query condition in each scanned data block is 1000, the amount of data that meets the query condition in the first part of the precise query result is 9000, so the first estimated average value is 9000 / 9=1000, so it can be estimated that the total amount of data that meets the query condition in the 27 data blocks that match the aggregation query task is 1000×27=27000, that is, the first total amount of data is approximately estimated to be 27000.
[0104] The above method uses the precise results obtained by scanning some data blocks to make an approximate estimate and obtain the total amount of data that meets the query conditions. Since only some data blocks are scanned, compared with scanning all data blocks that match the aggregate query task, the above method can greatly shorten the query time, allowing users to quickly have a general understanding of the amount of data that meets the query conditions.
[0105] Based on the above description, the first part of the precise query results also includes the data generation time of the data content that meets the query conditions in the M data blocks. Therefore, in some embodiments, the first data statistical graph can also be generated based on the data generation time of the data content that meets the query conditions in the M data blocks, and the amount of data that meets the query conditions in the M data blocks. That is, in addition to the first total data volume, the first estimated query result also includes a first data statistical graph, which is used to indicate the distribution of the first total data volume in different time intervals. The first data statistical graph includes but is not limited to at least one of the following: an interval histogram, a line statistical graph, a pie-shaped statistical graph, etc.
[0106] Among them, each time interval in the first data statistics chart can be obtained by dividing the query time range through a time interval division mechanism, and the time interval division mechanism can be pre-set by the cloud platform or set by the user. For example, the time interval division mechanism pre-set by the cloud platform is: divide the query time range into 10 intervals on average; or, the data query interface also includes a time interval division mechanism setting area, and the time interval division mechanism set by the user through this area is: divide the query time range into 3 minutes as an interval. Of course, these two cases are only examples, and the time interval division mechanism can be set according to actual application requirements. In addition, it should be noted that the length of each time interval obtained by division is usually not less than the length of the time range corresponding to each data block.
[0107] When generating the first data statistics graph, for the M data blocks that have been traversed, the amount of data that meets the query conditions in these data blocks and the data generation time of each data content that meets the query conditions can be obtained. Therefore, the amount of data in different time intervals can be directly counted according to the data generation time of the data content that meets the query conditions in these data blocks; and for the data blocks that have not been traversed in the N data blocks that match the aggregate query task, the amount of data that meets the query conditions in each data block can be estimated, and at the same time, the time range corresponding to each data block can be obtained from the metadata corresponding to each data block. The time range is the range of the data generation time of the data content in each data block, so the amount of data in different time intervals in the data blocks that have not been traversed can also be counted. Among them, the metadata of each data block contains basic information about the data block, such as the range of the data generation time of the data content in the data block, the type of data and the amount of data contained in the data block, etc.
[0108] After the first estimated query result is obtained in the above manner, the first estimated query result can be displayed in the data query result. Moreover, when the first estimated query result includes a first data statistical graph, by displaying the first data statistical graph in the data query interface, the distribution of the amount of data that meets the query condition over time can be intuitively displayed to the user, so that the user can have a further understanding of the amount of data that meets the query condition, bringing a comfortable experience to the user.
[0109] In the case where the first part of the precise query results is the result obtained by the first i rounds of precise query in multiple rounds of precise query, before displaying the first estimated query result in the data query interface, the second estimated query result of the aggregate query task can also be displayed in the data query interface, wherein the second estimated query result includes the second total amount of data that meets the query condition obtained by approximate estimation based on the second part of the precise query result, and the second part of the precise query result includes the amount of data that meets the query condition queried from P data blocks, the P data blocks are sampled from N data blocks that match the aggregate query task, and the M data blocks include P data blocks. In this case, when displaying the first estimated query result of the aggregate query task in the data query interface, the second estimated query result displayed in the data query interface can be replaced with the first estimated query result.
[0110] Among them, the process of determining the precise query results of the second part, and the process of approximating the second total data volume that meets the query conditions based on the precise query results of the second part, are similar to the above-mentioned process of determining the precise query results of the first part, and the process of approximating the first total data volume that meets the query conditions based on the precise query results of the first part, and will not be repeated here.
[0111] Similarly, in some embodiments, in addition to the second total data volume, the second estimated query result also includes a second data statistical graph, which is used to indicate the distribution of the second total data volume in different time intervals. The method for determining the second data statistical graph is similar to the method for determining the first data statistical graph, and will not be repeated here.
[0112] In summary, for aggregate query tasks, after determining the N data blocks that match the aggregate query task, multiple rounds of sampling can be performed on these N data blocks, with each round having new precise query results. Each round makes an approximate estimate of the amount of data that meets the query conditions based on all the precise query results currently obtained, and displays the results on the data query interface. In this way, the number of precise query results is gradually increased, making the approximate estimate results more accurate.
[0113] In some embodiments, when displaying the first estimated query result, the query progress of the aggregate query task may also be displayed in the data query interface. For example, the query progress of the aggregate query task is obtained by dividing the above M by N.
[0114] By displaying the query progress of the aggregate query task on the data query interface, users can clearly understand the query status of the current task, so that users can control the query task in a timely manner and end the task in advance when the required results are obtained to avoid excessive overhead.
[0115] In some embodiments, when the first estimated query result of the aggregate query task is displayed in the data query interface, the first query result description can also be displayed in the data query interface. The first query result description can be "The current result is an estimated result" or the like, to prompt the user that the query result displayed on the current data query interface is an estimated result, not an exact result.
[0116] Continuing with the above example, please refer to Figure 2 , Figure 2 The query result displayed is the first estimated query result. At this time, the N data blocks matching the aggregate query task have not been traversed. The query result is an approximate estimation result. The progress of the query progress bar is about 10%. The first total data volume is 9886605. The first data statistics chart corresponding to the first total data volume is Figure 2 The interval histogram in , which takes 3 minutes as an interval interval, shows the distribution of the first total data volume over time.
[0117] In some embodiments, the data query interface also provides a pause button and a continue button. In this case, if the user no longer needs more accurate query results based on demand after seeing a certain round of query results, the pause button can be used to trigger the pause task operation. The cloud platform responds to the pause task operation triggered by the user and does not perform the next round of query; if the user still needs more accurate query results based on demand after seeing a certain round of query results, the continue button can be used to trigger the continue task operation. The cloud platform responds to the continue task operation triggered by the user and performs the next round of query. Of course, in other embodiments, after displaying a certain round of query results in the data query interface, the cloud platform can directly perform the next round of query.
[0118] In some embodiments, the complete and precise query result of the aggregate query task can also be displayed in the data query interface, and the complete and precise query result includes the total amount of data that meets the query conditions queried from the above N data blocks. In this case, the above N data blocks that match the aggregate query task have all been traversed.
[0119] In some embodiments, when displaying complete and accurate query results, the data query interface also displays a second query result description, which may be "the current result is an accurate result" or the like, to prompt the user that the query result currently displayed on the data query interface is an accurate query result.
[0120] Similarly, in some embodiments, while displaying the complete and accurate query results, a third data statistical graph can also be displayed in the data query interface, and the third data statistical graph is used to indicate the distribution of the total amount of data that meets the query conditions in the N data blocks in different time intervals. The method of determining the third data statistical graph is similar to the method of determining the first data statistical graph and the second data statistical graph, and will not be repeated here.
[0121] Continuing with the above example, please refer to Figure 4 , Figure 4 The query results displayed are complete and accurate query results. The current task query progress is 100%. The N data blocks matching the aggregate query task have all been traversed. The total amount of data that meets the query conditions is 10458243. The third data statistics chart corresponding to this total amount is Figure 4 Interval histogram in .
[0122] In some cases, it may take a relatively long time to determine the first part of the precise query results. In order to quickly respond to users, after obtaining the aggregate query task, you can also first perform a rough query on the target database based on the query conditions to obtain a rough query result. The rough query result includes the amount of data that meets the query conditions obtained by performing a rough query on the target database. In this way, before displaying the first estimated query result, the rough query result can be displayed in the data query interface.
[0123] When performing a rough query on the target database, it can be implemented through the HyperLogLog algorithm, or through the pre-aggregation algorithm, or through other similar algorithms. As long as the rough query results can be obtained quickly, the embodiments of the present application do not limit this.
[0124] Optionally, the rough query result may further include a rough data statistics graph, where the rough data statistics graph is used to indicate the distribution of the amount of data meeting the query condition obtained by performing a rough query on the target database in different time intervals.
[0125] Since the rough query is very fast, the rough query result can be quickly obtained and displayed on the data query interface, so that the user can quickly see the query result and quickly have a general understanding of the number of data that meet the query conditions.
[0126] In some embodiments, the data query interface also provides a pause button and a continue button. In this case, if the user only needs to understand the rough query results, after seeing the rough query results, the pause task operation can be triggered by the pause button. The cloud platform responds to the pause task operation triggered by the user and does not proceed to subsequent steps; if the user sees the rough query results and judges that a more accurate query result is needed based on the current application scenario, the continue task operation can be triggered by the continue button. The cloud platform responds to the continue task operation triggered by the user and proceeds to subsequent steps.
[0127] Of course, in other embodiments, after the rough query results are displayed in the data query interface, the cloud platform can directly proceed to the subsequent steps, or, after the duration of the rough query results displayed in the data query interface reaches the second duration, the cloud platform automatically performs multiple rounds of precise queries on the target database. Among them, the size of the second duration can be set according to the actual application scenario, and the second duration can be pre-set by the cloud platform or set by the user. The embodiment of the present application does not limit the size and setting method of the second duration.
[0128] In some embodiments, the data query interface also displays a third query result description, such as "the current result is a rough query result", etc., to prompt the user that the query result currently displayed on the data query interface is a rough query result.
[0129] Since the aggregate query task does not require high accuracy of the query results, but has high requirements for the efficiency of feeding back the query results to the user, for the aggregate query task, the sample estimation method is used to estimate the whole. Each round of the total amount of data that meets the query conditions is approximately estimated based on the partial accurate query results. Through multiple iterations, the complete and accurate query results can be obtained, so that the data query interface can progressively display more and more accurate results to the user. Since each round only needs to traverse part of the data blocks, the response time of each round of query is very short, allowing users to obtain available data in a shorter time. Moreover, the current task query progress is displayed through the data query interface, which is convenient for users to obtain the completion status of the current query task. In addition, users can trigger the pause task operation in various ways, which allows users to end the query task in time after a certain round of query according to the accuracy requirements of the data in actual applications, thereby saving query time and reducing query costs. Furthermore, in the above-mentioned aggregate query, rough queries and multiple rounds of precise queries are designed, and precise query results are obtained through multiple iterations, so that the data query interface can not only quickly display rough query results to users, but also gradually display more precise results to users, further enabling users to obtain available data in a shorter time.
[0130] Figure 5 This is a flowchart of another data query method provided by an embodiment of the present application. Please refer to Figure 5 , the method comprises the following steps.
[0131] Step 501: providing a data query interface, where the data query interface is used to obtain a query task input by a user.
[0132] This step is the same as the content in the above step 101. Please refer to the above description for detailed implementation content, which will not be repeated here.
[0133] Step 502: Obtain a content query task from the data query interface, where the content query task is used to query target data content that meets a query condition, where the query condition includes a query term and a query time range.
[0134] Content query tasks refer to tasks that require querying detailed content data such as log content. For example, if you need to find all error logs in the target database and analyze the causes of the errors, this query task is a content query task, and the contents of the error logs need to be displayed in the data query interface to facilitate the user to analyze the causes of the errors.
[0135] It should be noted that the data that the content query task needs to query is strongly time-ordered, that is, the data that the content query task needs to query is sorted in sequence according to the chronological order of data generation time. For multiple data with the same data generation time, they are sorted and scanned in the chronological order of storage of the multiple data.
[0136] The target data content refers to all data content in the target database that meets the query conditions.
[0137] The method for obtaining the query conditions of the content query task is similar to the method for obtaining the query conditions of the above-mentioned aggregation query task. Please refer to the above description for detailed implementation content, which will not be repeated here.
[0138] After the cloud platform obtains the content query task through the data query interface, the content query task can be executed immediately, or it can be executed within the third time period after obtaining the content query task, if it is determined that the user has not modified the query conditions. Of course, the content query task can also be executed when a query instruction triggered by the user is received. Among them, the size of the third time period can be set according to the actual application scenario. The third time period can be pre-set by the cloud platform or set by the user. The embodiment of the present application does not limit the size and setting method of the third time period. There are many ways for users to trigger query instructions. For example, when the cloud platform provides an instruction input window, users can issue query instructions through the instruction input window. When the data query interface also includes a query analysis button, users can complete the issuance of query instructions by clicking the query analysis button. The embodiment of the present application does not limit the way users issue query instructions.
[0139] Step 503: Based on the query conditions and the single query result return conditions, perform a first query operation, and display the first data content obtained by the first query operation in the data query interface, wherein the single query result return conditions include a single maximum query data volume and a single maximum query delay, and the first query operation is used to query a part of the target data content. The query delay of the first query operation is not greater than the single maximum query delay and the data volume of the first data content is not greater than the single maximum query data volume.
[0140] In content query tasks, due to the existence of conditions for returning a single query result, only one query operation can often only query part of the data content that meets the query conditions, that is, part of the target data content. If all data content that meets the query conditions is to be queried, multiple query operations are often required.
[0141] The single maximum query data volume in the single query result return condition refers to the maximum number of data contents that meet the query conditions in each query operation. As can be seen from the above description, the data that needs to be queried in the content query task is in order, so each query operation needs to traverse the data in order forward or backward. When the number of data that meets the query conditions in the scanned data reaches the single maximum query data volume in each query operation, the data scanning is stopped.
[0142] The single maximum query delay in the single query result return condition refers to the maximum query time for each query operation. When the time for each query operation reaches the single maximum query delay, the query is stopped.
[0143] When the amount of data in the target database is large, it may take a long time to find the data content that meets the query conditions for the maximum number of single queries. If the number of queried data reaches the maximum number of single queries, or when all data has been traversed, the query results are fed back to the user, which may greatly reduce the user experience. However, through the existence of the maximum single query delay, the response time of each query operation can be controlled within a certain period of time, so that the cloud platform can promptly feedback the current query status of the user content query task, so that the user can know the current query results in time, reducing the impact of excessive data volume on user experience.
[0144] Based on the above description, the cloud platform often finds all target data content through multiple query operations. In this case, the first query operation can be any query operation. If the first query operation is the first query operation, the first query operation starts from the earliest time or the latest time in the query time range of the content query task, and queries the data content forward or backward in chronological order; if the first query operation is not the first query operation, the first query operation starts the query from the pause position of the last query operation. Of course, the cloud platform may also find all target data content through only one query operation. In this case, the query operation is regarded as the first query operation, and the first query operation also starts from the earliest time or the latest time in the query time range of the content query task, and queries the data content forward or backward in chronological order.
[0145] In some embodiments, a first query operation is performed based on query conditions and single query result return conditions, and the implementation process of displaying the first data content obtained through the first query operation in a data query interface includes: performing a first query operation based on query conditions and single query result return conditions; when any one of multiple target conditions is met first, ending the first query operation, and displaying the first data content obtained through the first query operation in the data query interface, the multiple target conditions include: the query delay of the first query operation reaches the single maximum query delay, the amount of data retrieved by the first query operation reaches the single maximum query data amount, and the first query operation has completed the query of the target data content.
[0146] That is to say, if the first query operation has not completed the query of the target data content and the amount of data found by the first query operation has not reached the single maximum query data amount, but the query delay of the first query operation has reached the single maximum query delay, or, the first query operation has not completed the query of the target data content and the query delay of the first query operation has not reached the single maximum query delay, but the amount of data found by the first query operation has reached the single maximum query data amount, then the first query operation is terminated; if the query delay of the first query operation has not reached the single maximum query delay and the amount of data found by the first query operation has not reached the single maximum query data amount, but the first query operation has found the last data that needs to be scanned in chronological order, it means that the target data content has been completely searched, and therefore, the first query operation is also terminated.
[0147] In some embodiments, when the cloud platform receives a first query request triggered by a user, a first query operation is performed. The user may trigger the query request by pressing the enter key, or by clicking the query button when the data query interface includes a query button, or by other methods, which are not limited in the embodiments of the present application.
[0148] In other embodiments, when it is detected that the query condition has not been updated within the fourth time period, the first query operation is performed. The fourth time period may be preset by the cloud platform or set by the user. The size of the fourth time period may be set according to actual application requirements. The embodiment of the present application does not limit the setting method and size of the fourth time period.
[0149] In some embodiments, if the first query operation is the first query operation, then when performing the first query operation, first determine the Q data blocks in the target database that match the content query task. In this case, each query operation is performed in the Q data blocks, rather than in all data blocks within the query time range. In this way, the amount of data scanned one by one by the content query task can be reduced, the query time can be shortened, and the query results can be returned more quickly. The method of determining the Q data blocks is similar to the method of determining the N data blocks that match the aggregate query task in step 103 above, and will not be repeated here.
[0150] In some other embodiments, the content query task may be first divided into multiple subtasks. In this case, based on the query condition and the single query result return condition, a first query operation is performed, and the first data content obtained by the first query operation is displayed in the data query interface, including the following steps (1)-(4):
[0151] (1) Determine the estimated total query latency of the content query task.
[0152] In some embodiments, based on metadata of data blocks in the target database within the query time range, the amount of data within the query time range, ie, the amount of pre-queried data, is determined, and the estimated total query latency is determined based on the amount of pre-queried data.
[0153] Among them, the estimated total query delay refers to the time required to scan the pre-checked data one by one. When determining the estimated total query delay, the average time required to scan one data can be multiplied by the pre-checked data volume to obtain the estimated total query delay. Among them, the average time required to scan one data can be estimated by the cloud platform based on the current available processing resources. Of course, the estimated total query delay can also be determined by other methods, and the embodiments of the present application are not limited to this.
[0154] (2) Based on the query conditions, the estimated total query delay, and the single maximum query delay, the content query task is divided into multiple ordered subtasks, where each subtask is used to query a part of the target data content, and the estimated query delay of each subtask does not exceed the single maximum query delay.
[0155] In some embodiments, when splitting a content query task, all data blocks within the query time range are split in chronological order according to a task splitting mechanism to obtain groups of data blocks. The data contained in each group of data blocks is the data that needs to be queried for each subtask, thereby obtaining multiple subtasks.
[0156] The task splitting mechanism can be pre-set by the cloud platform or set by the user. For example, the task splitting mechanism pre-set by the cloud platform is: the estimated query delay of each subtask is half of the single maximum query delay. At this time, assuming that when splitting the content query task, the single total query delay is divided by half of the single maximum query delay to obtain the number of subtasks n, and the data blocks within the query time range are evenly divided into n groups in chronological order, and one group of data blocks corresponds to one subtask. Of course, this situation is only an example, and the task splitting mechanism can be set according to needs in actual applications.
[0157] It should be noted that the data that each subtask needs to query is still strongly ordered by time. That is to say, the data that each subtask needs to query is sorted in sequence according to the chronological order of data generation time. For multiple data with the same data generation time, they are sorted and scanned in the chronological order of storage of the multiple data.
[0158] (3) Performing the first query operation by executing at least one subtask.
[0159] Based on the above description, after the content query task is split, multiple ordered subtasks can be obtained, and each subtask corresponds to a part of the data block. Therefore, if the first query operation is the first query operation, the scan starts from the data block corresponding to the first subtask; if the first query operation is not the first query operation, the scan starts from the pause position of the previous query operation.
[0160] In the process of scanning the data content in the data block, for a certain data content scanned, if the data content contains the query word and the data generation time of the data content is within the query time range, then the data content is determined to be data that meets the query condition. In this way, the data block corresponding to the at least one subtask is queried to obtain the first data content obtained by the first query operation.
[0161] (4) When any one of the multiple target conditions is satisfied first, the first query operation is terminated, and the first data content obtained by the first query operation is displayed in the data query interface, wherein the multiple target conditions include: the query delay of the first query operation reaches the single maximum query delay, the data volume of the first data content reaches the single maximum query data volume, and the target subtask is completed, wherein the target subtask is the last subtask among the multiple subtasks, or, when the target subtask is completed, the sum of the query delay of the first query operation and the estimated query delay of the next subtask of the target subtask is greater than the single maximum query delay.
[0162] That is, when the jth subtask among the multiple subtasks is executed through the first query operation, the first query operation is terminated when any of the following three situations occur:
[0163] In the first case, if the jth subtask is not completed, but the query delay of the first query operation has reached the single maximum query delay, or if the jth subtask is not completed, the query delay of the first query operation has not reached the single maximum query delay, but the amount of data retrieved by the first query operation has reached the single maximum query data amount, then the first query operation is terminated.
[0164] In the second case, if the jth subtask has been completed, the query delay of the first query operation has not reached the single maximum query delay, the amount of data retrieved by the first query operation has not reached the single maximum query data amount, but the jth subtask is the last subtask, then the first query operation is terminated.
[0165] In this case, all target data contents have been checked.
[0166] In the third case, if the jth subtask has been completed, but the query delay of the first query operation has not reached the single maximum query delay, the amount of data found by the first query operation has not reached the single maximum query data amount, and the jth subtask is not the last subtask, then determine whether the sum of the query delay of the first query operation and the estimated query delay of the next subtask is greater than the single maximum query delay when the jth subtask is completed. If the sum of the query delay of the first query operation and the estimated query delay of the j+1th subtask is greater than the single maximum query delay, then terminate the first query operation, otherwise, execute the j+1th subtask. In the process of executing the j+1th subtask, the above logic is also used for judgment, and the first query operation is terminated when a certain condition is met.
[0167] The estimated query latency of the next subtask can be determined in this way, that is, the number of data blocks corresponding to the next subtask is divided by the number of data blocks corresponding to the completed j-th subtask, and then the result is multiplied by the query latency of completing the j-th subtask to obtain the estimated query latency of the next subtask. Of course, the estimated query latency of the next subtask can also be determined in other ways, which are not limited in the embodiments of the present application.
[0168] In some embodiments, after the first query operation is completed, the pause position of the content query task is recorded; a target query option is displayed in the data query interface, and the target query option is used to indicate to continue to query the data content; after receiving the user's trigger operation on the target query option, a second query operation is performed based on the pause position. The second query operation is the next query operation of the first query operation.
[0169] It should be noted that after the second query operation is completed, the data content obtained through the second query operation is also displayed in the data query interface, but the data content does not cover the first data content obtained by the first query operation.
[0170] That is to say, the user can determine whether to continue with the next query operation based on the query results of a certain query operation displayed on the data query interface. If the next query operation is required, the user can initiate the next query operation by triggering the target query option. If the next query operation is not required, the user can not trigger the target query option, thereby ending the content query task early and saving time and expenses.
[0171] In some embodiments, after the first query operation is completed, the query progress of the content query task is determined; and the query progress of the content query task is displayed in the data query interface. In this way, the user can obtain the completion status of the current content query task in a timely manner, so that the user can end the task in advance as needed, saving time and reducing expenses.
[0172] The query progress of the content query task can be determined by dividing the amount of data in the target database within the time range that has been scanned by the amount of data in the target database within the query time range, and using the result as the query progress of the content query task. Of course, the query progress of the content query task can also be determined by other methods, which are not limited in the embodiments of the present application.
[0173] For example, please refer to Figure 6 , assuming that the query term of a content query task is @version: do you wannabuild a snowman, and the query time range is 1 year (on the hour) (i.e., from 0:00 on January 1 of this year to the start time of the task), Figure 6 It is the data query interface after a query operation is completed. Figure 6 It can be seen that the query progress of the current task is 7.14%. Since no data content that meets the query conditions is currently found, no data content appears in the data query interface, and "No table data" and "Query progress 7.14%" appear. After the user obtains the current query results, he wants to query more data content, so he clicks the target query option, that is, Figure 6 The cloud platform responds to the operation and continues to query more data content. After that, the data query interface after the next query operation is as follows Figure 7 As shown by Figure 7 It can be seen that the query progress of the current content query task is 56.04%, and a piece of data content that meets the query conditions is queried. The row number of the data content is 1, and the data generation time is 14:20:40 on September 19, 2023.
[0174] It should be noted that before the first query operation is performed, the content query task can be split into multiple subtasks, and after each query operation is completed, the start query position of the next query operation is the pause position of the previous query operation. Of course, before the first query operation, the content query task can be split into multiple subtasks, and after each query operation is completed, the remaining part of the content query task can be split again to obtain multiple subtasks, and then executed from the first subtask, and the subsequent steps are still the same as the above steps (3) and (4).
[0175] After querying and displaying the data content through the above steps, the user may trigger a context query task about a certain data content. At this time, the method further includes the following steps.
[0176] Step 504: Obtain a context query task about the benchmark data content, where the context query task is used to query the target context data content that meets the context query conditions, where the context query conditions include the previous time range, the following time range, and the query statement, and the benchmark data content is any data content displayed on the data query interface.
[0177] After finding data content that meets the query conditions through the above content query task, the user can select a data content from the data content displayed on the data query interface as the benchmark data content, thereby triggering a context query task about the benchmark data content. Of course, the benchmark data content can also be any data content displayed on the data query interface, not necessarily the data content obtained by the above content query task.
[0178] In some embodiments, the context query task about the benchmark data content can be triggered by the user in a variety of ways. For example, please refer to Figure 7 , the user clicks on the view details area before a certain data content, that is Figure 7 In the area E, Figure 7 The data content with row number 1 is used as the benchmark data content, thereby triggering a context query task about the benchmark data content.
[0179] The definition of the query statement is similar to that of the query words mentioned above, and will not be repeated here. Moreover, the query statement is usually a statement in the data content to be queried. If the benchmark data content is a data content queried by the above content query task, the query statement of the context query task is usually different from the query words of the content query task.
[0180] The context query task includes the previous query task and the following query task. The previous query task is used to query the data content whose data generation time is before the data generation time of the benchmark data content and meets the context query conditions. The following query task is used to query the data content whose data generation time is after the data generation time of the benchmark data content and meets the context query conditions.
[0181] Regardless of whether the reference data content is the data content queried by the above content query task or other data content, when determining the above context time range based on the data generation time of the reference data content, the first time range can be used as the above context time range, and the first time range is the time range from the earliest data generation time in the target database to the data generation time of the reference data content. In the case where the reference data content is the data content queried by the above content query task, the second time range can also be used as the above context time range, and the second time range is the time range from the earliest time of the query time range in the above query condition to the data generation time of the reference data content.
[0182] Similarly, regardless of whether the reference data content is the data content queried by the above content query task or other data content, when determining the following time range based on the data generation time of the reference data content, the third time range can be used as the following time range, and the third time range is the time range from the data generation time of the reference data content to the latest data generation time in the target database. In the case where the reference data content is the data content queried by the above content query task, the fourth time range can also be used as the following time range, and the fourth time range is the time range from the data generation time of the reference data content to the latest time of the query time range in the above query condition.
[0183] Step 505: Based on the context query condition and the single query result return condition, perform a first previous context query operation and a first context query operation, and display the first previous context data content obtained through the first previous context query operation and the first context data content obtained through the first context query operation in the data query interface. The first previous context query operation and the first context query operation are both used to query a part of the target context data content, and the query delays of the first previous context query operation and the first context query operation are not greater than the single maximum query delay, and the data volume of the first previous context data content and the first context data content is not greater than the single maximum query data volume.
[0184] The implementation process of the previous query task and the following query task is similar to the above-mentioned content query task. Similarly, the process of performing the first previous query operation and the process of performing the first following query operation are similar to the above-mentioned process of performing the first query operation, and will not be described in detail here. Since the implementation process of the previous query task is similar to the implementation process of the following query task, the following is a brief introduction using the previous query task as an example.
[0185] In some embodiments, a first context query operation is performed based on a query statement, a context time range, and a single query result return condition, and the first context data content obtained through the first context query operation is displayed in a data query interface.
[0186] As an example, a first context query operation is performed based on a query statement, a context time range, and a single query result return condition; when any one of multiple target conditions is met first, the first context query operation is terminated, and the first context data content obtained through the first context query operation is displayed in a data query interface. The multiple target conditions include: the query delay of the first context query operation reaches a single maximum query delay, the amount of data retrieved by the first context query operation reaches a single maximum query data amount, and the first context query operation has completed the query of the target context data content.
[0187] As another example, the above query task can also be split to obtain multiple above subtasks. In this case, based on the query statement, the above time range and the single query result return condition, the first above query operation is performed, and the first above data content obtained by the first above query operation is displayed in the data query interface, including the following steps (1)-(4):
[0188] (1) Determine the estimated total query latency of the query task.
[0189] The method for determining the estimated total query delay above is similar to the method for determining the estimated total query delay in the above step 503, and will not be repeated here.
[0190] (2) Based on the query statement, the context time range, the estimated total context query delay and the single maximum query delay, the context query task is divided into multiple ordered context subtasks, where each context subtask is used to query a part of the target context data content, and the estimated query delay of each context subtask does not exceed the single maximum query delay.
[0191] The target context data content refers to data content in the target context data content, the data generation time of which is earlier than the data generation time of the reference data content.
[0192] Similarly, the method of cutting multiple ordered subtasks may refer to the method of cutting multiple ordered subtasks in the above step 503 .
[0193] (3) Performing the first context query operation by executing at least one context subtask.
[0194] (4) When any one of the multiple target conditions is satisfied first, the first context query operation is terminated, and the first context data content obtained by the first context query operation is displayed in the data query interface, wherein the multiple target conditions include: the query delay of the first context query operation reaches the single maximum query delay, the data volume of the first context data content reaches the single maximum query data volume, and the target context subtask is completed, wherein the target context subtask is the last subtask among the multiple context subtasks, or, when the target context subtask is completed, the sum of the query delay of the first context query operation and the estimated context query delay of the next context subtask of the target context subtask is greater than the single maximum query delay.
[0195] For the description of the case where the first preceding text query operation is terminated, please refer to the description of the case where the first query operation is terminated in the above step 503, which will not be repeated here.
[0196] Similarly, before the first above query operation is performed, the above query task can be cut to obtain multiple above subtasks, and after each above query operation is completed, the start query position of the next above query operation is the pause position of the previous above query operation. Of course, before the first above query operation, the above query task can be cut to obtain multiple above subtasks, and after each above query operation is completed, the remaining part of the above query task can be cut again to obtain multiple above subtasks, and then start from the first above subtask, and the subsequent steps are still the same as the above steps (3) and (4).
[0197] In some embodiments, after the first context query operation is completed, the pause position of the context query task is recorded; a target context query option is displayed in the data query interface, and the target context query option is used to indicate to continue to query the context data content; after receiving a trigger operation of the target context query option by the user, a second context query operation is performed based on the pause position. The second context query operation is the next context query operation of the first context query operation.
[0198] That is to say, the user can determine whether to continue the next previous query operation based on the current query results of the previous query task displayed on the data query interface. If the next previous query operation is required, the user can initiate the next previous query operation by triggering the target previous query option. If the next previous query operation is not required, the user can not trigger the target previous query option, thereby ending the previous query task early and saving time and expenses.
[0199] Next, we will use the query task above as an example to illustrate:
[0200] In some embodiments, when a first context query request triggered by a user is received, a first context query operation is performed. The user may trigger the first context query request by pressing the enter key, or by clicking the query button when the data query interface includes a query button, or by other methods, which are not limited in the embodiments of the present application.
[0201] In other embodiments, when it is detected that the query condition has not been updated within the fifth time period, the first above query operation is performed. The fifth time period may be preset by the cloud platform or set by the user. The size of the fifth time period may be set according to actual application requirements. The embodiment of the present application does not limit the setting method and size of the fifth time period.
[0202] In some embodiments, after the first context query operation is completed, the query progress of the context query task is determined; and the query progress of the context query task is displayed in the data query interface. In this way, the user can obtain the completion status of the current context query task in a timely manner, so that the user can end the task in advance as needed, saving time and reducing expenses.
[0203] The query progress of the above query task can be determined by dividing the amount of data in the above time range that has been scanned in the target database by the amount of all data in the above time range in the target database, and the result obtained is the query progress of the above query task. Of course, the query progress of the above query task can also be determined by other methods, which are not limited in the embodiments of the present application.
[0204] In some embodiments, after the first context query operation is completed, the data generation time of the last data currently scanned in the context query task is recorded, and the data generation time is the time position currently scanned by the context query task; the time position currently scanned by the context query task is displayed in the data query interface.
[0205] Through the current scanned time position, the user can know the time range that has been scanned. Before starting the task, the user can often roughly understand the time range of the data to be obtained. If the user is sure that there is no content to be queried within the unscanned time range, the query can be terminated in advance to avoid the overhead caused by meaningless scanning.
[0206] For example, please refer to Figure 7 , Figure 7 The current data query interface for a content query task. Suppose you select Figure 7 The data content with row number 1 shown in the table is used as the benchmark data content. Perform a context query on the benchmark data content. Click Figure 7 In area E, a context query task about the content of the benchmark data is triggered. Figure 8 , Figure 8 Area 1 in the figure instructs the user to select context, that is, to instruct the user to enter the query statement of the triggered context query task. The query statement of the context query task is "Source_host:xxx", the upper time range is from the earliest data generation time in the target database to the data generation time of the benchmark data content, and the lower time range is from the data generation time of the benchmark data content to the latest data generation time in the target database. After the user enters the query statement and selects the upper and lower time ranges, the context query request is triggered by clicking the "OK" button, and the cloud platform will execute the upper query task and the lower query task at the same time; Figure 8 The "Earlier" and "Update" buttons are the target previous query options and the target next query options respectively. By clicking the "Earlier" and "Update" buttons, the cloud platform can continue to query more previous and context data content based on the paused position.
[0207] Figure 8 It is the data query interface of the triggered context query task after a query operation is completed. Figure 8 It can be seen that the query progress of the current above query task is 1.65%, and the current scanned time position is 6:29:57:510 on September 19, 2023. The query progress of the current below query task is 2.86%, and the current scanned time position is 8:44:22:070 on September 20, 2023. The data content queried by the above query task is displayed above the benchmark data content, such as Figure 8The data content with the bank number of -1 and the data generation time of 550 on September 19, 2023 at 14:17:18 is displayed below the benchmark data content. Figure 8 The data content is Bank of China number 1 and the data generation time is 14:29:49:580 on September 19, 2023.
[0208] In some embodiments, when the query task is a content query task and / or a context query task, the maximum single query data volume and / or the maximum single query delay are input by the user in the data query interface. If the user wants to see the query results of each time as quickly as possible, a smaller maximum single query data volume and a shorter maximum single query delay can be set. The size of the maximum single query data volume and the maximum single query delay can be adjusted according to actual needs, and the embodiments of the present application do not limit the setting method and size of the two. For example, Figure 6 Middle area F, Figure 7 Middle area G, Figure 8 As shown in the middle area H, the data query interface also provides a single maximum query delay input area, through which the user can input the single maximum query delay.
[0209] In some embodiments, when the query task is a content query task and / or a context query task, the above multiple target conditions also include that the amount of data scanned by the query operation reaches a single maximum scan number, and the single maximum scan number refers to the maximum amount of data traversed each time the query operation is performed. The single maximum scan number can be preset by the cloud platform or set by the user.
[0210] Since related data query products are often charged based on the amount of data scanned by the cloud platform, allowing users to set the maximum number of single scans themselves can enable users to control query costs from the bottom up and thus save expenses.
[0211] In content query tasks and context query tasks, by setting the maximum single query delay, the time for each query operation to return results can be controlled within a certain time. By setting the single query result return conditions, the cloud platform can return some ordered results in a timely manner in various situations, thereby improving the user experience. Through the target query options, target previous query options, and target next query options provided by the data query interface, users can initiate queries for more data after obtaining the current results, ensuring that users can obtain the required data content. Since related data query products are often charged based on the number of data scanned by the cloud platform, by setting the maximum single scan number, users can control the query cost from the bottom layer, thereby saving costs. In addition, the data query interface displays the current task query progress and the current scanned time position, which helps users understand the current query status of the context query task and helps users determine whether to end the context query task according to their needs, so as to save time and reduce costs.
[0212] Fig. 9 is a structural diagram of a data query device provided in an embodiment of the present application. Fig. 9 The device includes: an interface providing module 901, a task acquiring module 902 and a first result displaying module 903.
[0213] The interface providing module 901 is used to provide a data query interface, and the data query interface is used to obtain the query task input by the user;
[0214] A task acquisition module 902 is used to acquire an aggregate query task from a data query interface, where the aggregate query task is used to query the total amount of data that meets a query condition, where the query condition includes a query term and a query time range;
[0215] The first result display module 903 is used to display the first estimated query result of the aggregate query task in the data query interface, wherein the first estimated query result includes a first total data volume that meets the query conditions obtained by approximate estimation based on the first part of the precise query results, and the first part of the precise query results includes the amount of data that meets the query conditions queried from M data blocks, and the M data blocks are sampled from N data blocks that match the aggregate query task, M and N are integers, and M is less than N.
[0216] Optionally, the device further comprises:
[0217] A second result display module is used to display a second estimated query result of the aggregate query task in the data query interface, wherein the second estimated query result includes a second total amount of data that meets the query condition obtained by approximate estimation based on the second part of the precise query result, and the second part of the precise query result includes the amount of data that meets the query condition queried from P data blocks, where the P data blocks are sampled from N data blocks that match the aggregate query task, and the M data blocks include the P data blocks;
[0218] In this case, the first result display module is specifically used for:
[0219] In the data query interface, the second estimated query result is replaced by the first estimated query result.
[0220] Optionally, the device further comprises:
[0221] A first determination module, used to determine a newly added sampled data block;
[0222] A query module, used to query the newly sampled data block based on the query condition and determine a newly added query result, wherein the newly added query result includes the amount of data that meets the query condition queried from the newly sampled data block;
[0223] The second determining module is used to determine the first part of the precise query results according to the newly added query results and the second part of the precise query results.
[0224] Optionally, the device further comprises:
[0225] The complete result display module is used to display the complete and accurate query results of the aggregate query task in the data query interface. The complete and accurate query results include the total amount of data that meets the query conditions queried from the above N data blocks.
[0226] Optionally, the first estimated query result further includes a first data statistical graph, where the first data statistical graph is used to indicate the distribution of the first total data volume in different time intervals.
[0227] Optionally, the device further comprises:
[0228] The progress display module is used to display the query progress of the aggregate query task in the data query interface.
[0229] Optionally, the device further comprises:
[0230] The third determination module is used to determine N data blocks matching the aggregate query task from the target database based on the query condition and the index directory of the target database.
[0231] Among them, each of the above modules can be implemented by software or hardware. Exemplarily, the following takes the interface providing module as an example to introduce the implementation of the interface providing module. Similarly, the implementation of the above other modules can refer to the implementation of the interface providing module.
[0232] As an example of a software functional unit, the interface providing module may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the above-mentioned computing instance may be one or more. For example, the interface providing module may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region (region) or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple data centers with close geographical locations. Among them, usually a region may include multiple AZs.
[0233] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.
[0234] As an example of a hardware functional unit, the interface providing module may include at least one computing device, such as a server, etc. Alternatively, the interface providing module may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The above-mentioned PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
[0235] The multiple computing devices included in the interface providing module can be distributed in the same region or in different regions. The multiple computing devices included in the interface providing module can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the interface module can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0236] In the embodiment of the present application, for the aggregate query task, the method of estimating the whole by the sample is used to make an approximate estimate of the total amount of data that meets the query conditions based on the partial accurate query results in each round, and the complete and accurate query results can be obtained through multiple iterations, so that the data query interface can progressively show the user more and more accurate results, and because each round only needs to traverse part of the data blocks, the response time of each round of query is very short, so that the user can obtain available data in a shorter time. In addition, the current task query progress is displayed through the data query interface, which is convenient for the user to obtain the completion status of the current query task.
[0237] It should be noted that: the data query device provided in the above embodiment only uses the division of the above functional modules as an example when performing data query. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Figure 1 The corresponding data query method embodiments belong to the same concept, and their specific implementation processes are detailed in the method embodiments, which will not be repeated here.
[0238] Fig.10 is a schematic diagram of the structure of another data query device provided in an embodiment of the present application. Fig.10 The device includes: an interface providing module 1001, a first task acquiring module 1002 and a first query module 1003.
[0239] The interface providing module 1001 is used to provide a data query interface, and the data query interface is used to obtain the query task input by the user;
[0240] A first task acquisition module 1002 is used to acquire a content query task from a data query interface, where the content query task is used to query target data content that meets a query condition, where the query condition includes a query term and a query time range;
[0241] The first query module 1003 is used to perform a first query operation based on the query conditions and the single query result return conditions, and display the first data content obtained through the first query operation in the data query interface, wherein the single query result return conditions include the single maximum query data volume and the single maximum query delay. The first query operation is used to query a part of the target data content, the query delay of the first query operation is not greater than the single maximum query delay and the data volume of the first data content is not greater than the single maximum query data volume.
[0242] Optionally, the first query module 1003 includes:
[0243] A query submodule, used to perform a first query operation based on a query condition and a single query result return condition;
[0244] The first content display submodule is used to end the first query operation and display the first data content obtained by the first query operation in the data query interface when any one of multiple target conditions is met first. The multiple target conditions include: the query delay of the first query operation reaches the single maximum query delay, the amount of data retrieved by the first query operation reaches the single maximum query data amount, and the first query operation has completed the query of the target data content.
[0245] Optionally, the first query module 1003 includes:
[0246] The latency determination submodule is used to determine the estimated total query latency of the content query task;
[0247] A cutting submodule is used to cut the content query task into multiple ordered subtasks based on the query conditions, the estimated total query delay and the single maximum query delay, wherein each subtask is used to query a part of the target data content, and the estimated query delay of each subtask does not exceed the single maximum query delay;
[0248] An execution submodule, configured to perform a first query operation by executing at least one subtask;
[0249] The second content display submodule is used to end the first query operation and display the first data content obtained by the first query operation in the data query interface when any one of multiple target conditions is met first. The multiple target conditions include: the query delay of the first query operation reaches the single maximum query delay, the data volume of the first data content reaches the single maximum query data volume, and the target subtask is completed, wherein the target subtask is the last subtask among the multiple subtasks, or, when the target subtask is completed, the sum of the query delay of the first query operation and the estimated query delay of the next subtask of the target subtask is greater than the single maximum query delay.
[0250] Optionally, the device further comprises:
[0251] A recording module, used to record the pause position of the content query task;
[0252] A display module, used to display a target query option in the data query interface, where the target query option is used to indicate to continue querying the data content;
[0253] The second query module is used to perform a second query operation based on the pause position after receiving a trigger operation of the user on the target query option.
[0254] Optionally, the device further comprises:
[0255] A progress determination module, used to determine the query progress of the content query task;
[0256] The progress display module is used to display the query progress of the content query task in the data query interface.
[0257] Optionally, the device further comprises:
[0258] A second task acquisition module is used to acquire a context query task about a benchmark data content triggered by a user, where the context query task is used to query a target context data content that meets a context query condition, where the context query condition includes a previous time range, a following time range, and a query statement, and the benchmark data content is any data content displayed on a data query interface;
[0259] A context query module is used to perform a first previous context query operation and a first subsequent context query operation based on context query conditions and a single query result return condition, and to display the first previous context data content obtained through the first previous context query operation and the first subsequent context data content obtained through the first subsequent context query operation in a data query interface. The first previous context query operation and the first subsequent context query operation are both used to query a part of the target context data content. The query delays of the first previous context query operation and the first subsequent context query operation are both no greater than a single maximum query delay, and the data volumes of the first previous context data content and the first subsequent context data content are both no greater than a single maximum query data volume.
[0260] Optionally, the above-mentioned maximum single query data volume and / or maximum single query delay are input by the user in the data query interface.
[0261] Among them, each of the above modules can be implemented by software or hardware. Exemplarily, the following takes the interface providing module as an example to introduce the implementation of the interface providing module. Similarly, the implementation of the above other modules can refer to the implementation of the interface providing module.
[0262] As an example of a software functional unit, the interface providing module may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the above-mentioned computing instance may be one or more. For example, the interface providing module may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region (region) or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple data centers with close geographical locations. Among them, usually a region may include multiple AZs.
[0263] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.
[0264] As an example of a hardware functional unit, the interface providing module may include at least one computing device, such as a server, etc. Alternatively, the interface providing module may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The above-mentioned PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
[0265] The multiple computing devices included in the interface providing module can be distributed in the same region or in different regions. The multiple computing devices included in the interface providing module can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the interface module can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0266] In the embodiment of the present application, for content query tasks and context query tasks, by setting a single maximum query delay, the time for each query operation to return results can be controlled within a certain time length, and by setting a single query result return condition, the cloud platform can return partial ordered results in a timely manner in various situations, thereby improving the user experience. The target query option provided by the data query interface enables users to initiate queries for more data after obtaining the current results, ensuring that users can obtain the required data content. In addition, displaying the current task query progress through the data query interface helps users understand the current query status of the content query task, and helps users determine whether to end the content query task according to their needs, so as to save time and reduce expenses.
[0267] It should be noted that: the data query device provided in the above embodiment only uses the division of the above functional modules as an example when performing data query. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Figure 5 The corresponding data query method embodiments belong to the same concept, and their specific implementation processes are detailed in the method embodiments, which will not be repeated here.
[0268] The present application embodiment also provides a computing device 1100. Fig.11 As shown, the computing device 1100 includes: a bus 1102, a processor 1104, a memory 1106, and a communication interface 1108. The processor 1104, the memory 1106, and the communication interface 1108 communicate through the bus 1102. The computing device 1100 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 1100.
[0269] The bus 1102 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 The bus 1104 may include a path for transmitting information between various components of the computing device 1100 (eg, the memory 1106, the processor 1104, and the communication interface 1108).
[0270] The processor 1104 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0271] The memory 1106 may include a volatile memory, such as a random access memory (RAM). The processor 1104 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0272] The memory 1106 stores executable program codes, and the processor 1104 executes the executable program codes to respectively implement the functions of each module in the at least one data query device described above, thereby achieving Figure 1 and / or Figure 5 Corresponding data query method. That is, the memory 1106 stores the method for executing Figure 1 and / or Figure 5 The corresponding data query method instructions.
[0273] The communication interface 1103 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 1100 and other devices or a communication network.
[0274] The embodiment of the present application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.
[0275] like Fig.12 As shown, the computing device cluster includes at least one computing device 1100. The memory 1106 in one or more computing devices 1100 in the computing device cluster may store the same Figure 1 and / or Figure 5 The corresponding data query method instructions.
[0276] In some possible implementations, the memory 1106 of one or more computing devices 1100 in the computing device cluster may also store a program for executing Figure 1 and / or Figure 5 In other words, the combination of one or more computing devices 1100 can jointly execute the instructions for executing Figure 1 and / or Figure 5 The corresponding data query method instructions.
[0277] It should be noted that the instructions stored in the memory 1106 in different computing devices 1100 in the computing device cluster can implement the functions of one or more modules in the modules in the at least one data query device mentioned above.
[0278] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig.13 A possible implementation is shown. Fig.13 As shown, two computing devices 1100A and 1100B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 1106 in the computing device 1100A stores instructions for executing the functions of a portion of the modules in the aforementioned at least one data query device. At the same time, the memory 1106 in the computing device 1100B stores instructions for executing the functions of another portion of the modules in the aforementioned at least one data query device.
[0279] It should be understood that Fig.13 The functions of the computing device 1100A shown in FIG. 1100A may also be completed by multiple computing devices 1100. Similarly, the functions of the computing device 1100B may also be completed by multiple computing devices 1100.
[0280] The present application also provides a computer-readable storage medium. The computer-readable storage medium may be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute Figure 1 and / or Figure 5 The corresponding data query method.
[0281] The present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes Figure 1 and / or Figure 5 The corresponding data query method.
[0282] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiment of the present application may be a non-volatile storage medium, in other words, a non-transient storage medium.
[0283] It should be understood that the "multiple" mentioned herein refers to two or more. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit them to be necessarily different.
[0284] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of the present application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0285] The above-mentioned embodiments are provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A data query method, characterized in that: The method comprises: Providing a data query interface, wherein the data query interface is used to obtain a query task input by a user; Acquire an aggregate query task from the data query interface, wherein the aggregate query task is used to query the total amount of data that meets the query conditions, wherein the query conditions include a query term and a query time range; A first estimated query result of the aggregate query task is displayed in the data query interface, wherein the first estimated query result includes a first total data volume that meets the query conditions obtained by approximate estimation based on the first part of the precise query results, and the first part of the precise query results includes the amount of data that meets the query conditions queried from M data blocks, and the M data blocks are sampled from N data blocks that match the aggregate query task, M and N are integers, and M is less than N.
2. The method according to claim 1, characterized in that Before displaying the first estimated query result of the aggregate query task in the data query interface, the method further includes: Displaying a second estimated query result of the aggregate query task in the data query interface, wherein the second estimated query result includes a second total amount of data that meets the query condition and is obtained by approximate estimation based on the second part of the precise query result, and the second part of the precise query result includes the amount of data that meets the query condition and is queried from P data blocks, wherein the P data blocks are sampled from N data blocks that match the aggregate query task, and the M data blocks include the P data blocks; The displaying the first estimated query result of the aggregate query task in the data query interface includes: The second estimated query result is replaced with the first estimated query result in the data query interface.
3. The method according to claim 2, characterized in that Before replacing the second estimated query result with the first estimated query result in the data query interface, the method further includes: Determine the data block for new sampling; Based on the query condition, query the newly added sampled data block to determine a newly added query result, wherein the newly added query result includes the amount of data found in the newly added sampled data block that meets the query condition; The first part of accurate query results is determined according to the newly added query results and the second part of accurate query results.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: The complete and accurate query result of the aggregate query task is displayed in the data query interface, and the complete and accurate query result includes the total amount of data that meets the query conditions queried from the N data blocks.
5. The method according to any one of claims 1 to 4, characterized in that The first estimated query result also includes a first data statistical graph, and the first data statistical graph is used to indicate the distribution of the first total data volume in different time intervals.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: The query progress of the aggregate query task is displayed in the data query interface.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Based on the query condition and the index directory of the target database, the N data blocks matching the aggregate query task are determined from the target database.
8. A data query method, characterized in that: The method comprises: Providing a data query interface, wherein the data query interface is used to obtain a query task input by a user; Acquire a content query task from the data query interface, wherein the content query task is used to query target data content that meets a query condition, wherein the query condition includes a query term and a query time range; Based on the query conditions and the single query result return conditions, a first query operation is performed, and the first data content obtained by the first query operation is displayed in the data query interface, wherein the single query result return conditions include a single maximum query data volume and a single maximum query delay, and the first query operation is used to query a part of the target data content, the query delay of the first query operation is not greater than the single maximum query delay and the data volume of the first data content is not greater than the single maximum query data volume.
9. The method according to claim 8, characterized in that The performing a first query operation based on the query condition and the single query result return condition, and displaying the first data content obtained by the first query operation in the data query interface, includes: Based on the query condition and the single query result return condition, perform the first query operation; When any one of multiple target conditions is met first, the first query operation is terminated, and the first data content obtained through the first query operation is displayed in the data query interface. The multiple target conditions include: the query delay of the first query operation reaches the single maximum query delay, the amount of data retrieved by the first query operation reaches the single maximum query data amount, and the first query operation has completed the query of the target data content.
10. The method according to claim 8, characterized in that The performing a first query operation based on the query condition and the single query result return condition, and displaying the first data content obtained by the first query operation in the data query interface, includes: Determining an estimated total query latency for the content query task; Based on the query condition, the estimated total query delay and the single maximum query delay, the content query task is divided into a plurality of ordered subtasks, wherein each subtask is used to query a portion of the target data content, and the estimated query delay of each subtask does not exceed the single maximum query delay; Performing the first query operation by executing at least one subtask; When any one of multiple target conditions is met first, the first query operation is terminated, and the first data content obtained through the first query operation is displayed in the data query interface, and the multiple target conditions include: the query delay of the first query operation reaches the single maximum query delay, the data volume of the first data content reaches the single maximum query data volume, and the target subtask is completed, wherein the target subtask is the last subtask among the multiple subtasks, or, when the target subtask is completed, the sum of the query delay of the first query operation and the estimated query delay of the next subtask of the target subtask is greater than the single maximum query delay.
11. The method according to any one of claims 8 to 10, characterized in that After the first query operation is completed, the method further includes: Recording the pause position of the content query task; Displaying a target query option in the data query interface, wherein the target query option is used to indicate to continue querying data content; After receiving a trigger operation of the user on the target query option, a second query operation is performed based on the pause position.
12. The method according to any one of claims 8 to 11, characterized in that After the first query operation is completed, the method further includes: Determining the query progress of the content query task; The query progress of the content query task is displayed in the data query interface.
13. The method according to any one of claims 8 to 12, characterized in that The method further comprises: Acquire a context query task about the benchmark data content triggered by the user, wherein the context query task is used to query the target context data content that meets the context query condition, wherein the context query condition includes a previous time range, a following time range, and a query statement, and the benchmark data content is any data content displayed on the data query interface; Based on the context query condition and the single query result return condition, a first preceding context query operation and a first following context query operation are performed, and the first preceding context data content obtained through the first preceding context query operation and the first following context data content obtained through the first following context query operation are displayed in the data query interface, the first preceding context query operation and the first following context query operation are both used to query a part of the target context data content, the query delays of the first preceding context query operation and the first following context query operation are both no greater than the single maximum query delay, and the data volumes of the first preceding context data content and the first following context data content are both no greater than the single maximum query data volume.
14. The method according to any one of claims 8 to 13, characterized in that The single maximum query data volume and / or the single maximum query delay are input by the user in the data query interface.
15. A data query device, characterized in that: The device comprises: An interface providing module, used to provide a data query interface, wherein the data query interface is used to obtain a query task input by a user; A task acquisition module, used to acquire an aggregate query task from the data query interface, wherein the aggregate query task is used to query the total amount of data that meets the query conditions, wherein the query conditions include query terms and query time range; A first result display module is used to display a first estimated query result of the aggregate query task in the data query interface, wherein the first estimated query result includes a first total data volume that meets the query conditions obtained by approximate estimation based on the first part of the precise query results, and the first part of the precise query results includes the amount of data that meets the query conditions queried from M data blocks, and the M data blocks are sampled from N data blocks that match the aggregate query task, M and N are integers, and M is less than N.
16. The device according to claim 15, characterized in that The device also includes: A second result display module is used to display a second estimated query result of the aggregate query task in the data query interface, wherein the second estimated query result includes a second total amount of data that meets the query condition obtained by approximate estimation based on the second part of the precise query result, and the second part of the precise query result includes the amount of data that meets the query condition queried from P data blocks, wherein the P data blocks are sampled from N data blocks that match the aggregate query task, and the M data blocks include the P data blocks; The first result display module is specifically used for: The second estimated query result is replaced with the first estimated query result in the data query interface.
17. The device according to claim 16, characterized in that The device also includes: A first determination module, used to determine a newly added sampled data block; A query module, configured to query the newly sampled data block based on the query condition and determine a newly added query result, wherein the newly added query result includes the amount of data found in the newly sampled data block that meets the query condition; The second determining module is used to determine the first part of accurate query results according to the newly added query results and the second part of accurate query results.
18. The device according to any one of claims 15 to 17, characterized in that The device also includes: A complete result display module is used to display the complete and accurate query results of the aggregate query task in the data query interface, and the complete and accurate query results include the total amount of data that meets the query conditions queried from the N data blocks.
19. The device according to any one of claims 15 to 18, characterized in that The first estimated query result also includes a first data statistical graph, and the first data statistical graph is used to indicate the distribution of the first total data volume in different time intervals.
20. The device according to any one of claims 15 to 19, characterized in that The device also includes: A progress display module is used to display the query progress of the aggregate query task in the data query interface.
21. The device according to any one of claims 15 to 20, characterized in that The device also includes: The third determination module is used to determine the N data blocks matching the aggregate query task from the target database based on the query condition and the index directory of the target database.
22. A data query device, characterized in that: The device comprises: An interface providing module, used to provide a data query interface, wherein the data query interface is used to obtain a query task input by a user; A first task acquisition module, used to acquire a content query task from the data query interface, wherein the content query task is used to query target data content that meets a query condition, wherein the query condition includes a query term and a query time range; A first query module is used to perform a first query operation based on the query conditions and the single query result return conditions, and display the first data content obtained by the first query operation in the data query interface, wherein the single query result return conditions include a single maximum query data volume and a single maximum query delay, the first query operation is used to query a part of the target data content, the query delay of the first query operation is not greater than the single maximum query delay and the data volume of the first data content is not greater than the single maximum query data volume.
23. The device according to claim 22, characterized in that The first query module includes: A query submodule, configured to perform the first query operation based on the query condition and the single query result return condition; The first content display submodule is used to end the first query operation and display the first data content obtained by the first query operation in the data query interface when any one of multiple target conditions is met first. The multiple target conditions include: the query delay of the first query operation reaches the single maximum query delay, the amount of data retrieved by the first query operation reaches the single maximum query data amount, and the first query operation has completed the query of the target data content.
24. The device according to claim 22, characterized in that The first query module includes: A delay determination submodule, used to determine the estimated total query delay of the content query task; A cutting submodule, configured to cut the content query task into a plurality of ordered subtasks based on the query condition, the estimated total query delay and the single maximum query delay, wherein each subtask is used to query a portion of the target data content, and the estimated query delay of each subtask does not exceed the single maximum query delay; An execution submodule, configured to perform the first query operation by executing at least one subtask; The second content display submodule is used to end the first query operation and display the first data content obtained by the first query operation in the data query interface when any one of multiple target conditions is met first, and the multiple target conditions include: the query delay of the first query operation reaches the single maximum query delay, the data volume of the first data content reaches the single maximum query data volume, and the target subtask is completed, wherein the target subtask is the last subtask among the multiple subtasks, or, when the target subtask is completed, the sum of the query delay of the first query operation and the estimated query delay of the next subtask of the target subtask is greater than the single maximum query delay.
25. The device according to any one of claims 22 to 24, characterized in that The device also includes: A recording module, used for recording the pause position of the content query task; A display module, used to display a target query option in the data query interface, wherein the target query option is used to indicate to continue to query the data content; The second query module is used to perform a second query operation based on the pause position after receiving a trigger operation of the user on the target query option.
26. The device according to any one of claims 22 to 25, characterized in that The device also includes: A progress determination module, used to determine the query progress of the content query task; The progress display module is used to display the query progress of the content query task in the data query interface.
27. The device according to any one of claims 22 to 26, characterized in that The device also includes: A second task acquisition module is used to acquire a context query task about the benchmark data content triggered by the user, wherein the context query task is used to query the target context data content that meets the context query condition, wherein the context query condition includes a previous time range, a following time range, and a query statement, and the benchmark data content is any data content displayed on the data query interface; A context query module is used to perform a first preceding query operation and a first following query operation based on the context query condition and the single query result return condition, and display the first preceding data content obtained through the first preceding query operation and the first following data content obtained through the first following query operation in the data query interface, wherein the first preceding query operation and the first following data content are both used to query a part of the target context data content, the query delays of the first preceding query operation and the first following query operation are both no greater than the single maximum query delay, and the data volumes of the first preceding data content and the first following data content are both no greater than the single maximum query data volume.
28. The device according to any one of claims 22 to 27, characterized in that The single maximum query data volume and / or the single maximum query delay are input by the user in the data query interface.
29. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 7.
30. A computer-readable storage medium, characterized in that: The storage medium stores instructions. When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 7.
31. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 7.
32. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 8 to 14.
33. A computer-readable storage medium, characterized in that: The storage medium stores instructions. When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 8 to 14.
34. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 8 to 14.
Citation Information
Cited By
Data query method and related apparatus
EP4797116A1
Data query method and related apparatus
WO2025091857A1