Data processing method and device, storage medium and electronic equipment
By introducing a shared cache mechanism and a historical query cache table into the distributed SQL query engine, and dynamically updating the cache table, the problem of low query cache hit rate in the distributed SQL query engine is solved and more efficient query performance is achieved.
Patent Information
- Application Number
- CN202310430340.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-19
- Publication Date
- 2024-10-22
AI Technical Summary
The problem of low query cache hit rate in distributed SQL query engines is mainly due to the fact that the local cache settings are static and cannot be dynamically adjusted, and the physical machine cache information of each cache node is isolated from each other, resulting in the inability to effectively cache and share data.
A shared cache mechanism is introduced to jointly maintain the historical query cache table through multiple shared cache working nodes, dynamically update the cache table, determine the target working node for data sharding, and obtain target business data based on the historical query cache table.
It greatly improves the cache hit rate, improves query performance, can cover more nodes, adapts to dynamic business needs, and reduces disk waste.
Smart Images

Figure CN118820318A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, device, storage medium and electronic device. Background Art
[0002] In the era of cloud computing, the architecture of separation of computing and storage is widely used. Distributed SQL query engines such as Trino based on this architecture often cache some remote files on the local disk for direct reading to avoid the need for large bandwidth to store and read the required business data from the remote end. This improves query performance and reduces storage pressure and query consumption. Summary of the invention
[0003] The present application provides a data processing method, device, storage medium and electronic device, and the technical solution is as follows:
[0004] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:
[0005] In response to at least one data query request for a distributed SQL query engine, determine a data split for the data query request;
[0006] Performing node scheduling processing on the data query request based on the data shard split to determine a target working node corresponding to the data shard split from a plurality of shared cache working nodes, wherein the plurality of shared cache working nodes jointly maintain a historical query cache library table;
[0007] Control the target working node to obtain the target business data corresponding to the data split split based on the historical query cache library table.
[0008] In a second aspect, an embodiment of the present application provides a data processing device, the device comprising:
[0009] A request response module, configured to respond to at least one data query request for a distributed SQL query engine and determine a data split for the data query request;
[0010] A node scheduling module, used to perform node scheduling processing on the data query request based on the data shard split, so as to determine a target working node corresponding to the data shard split from a plurality of shared cache working nodes, wherein the plurality of shared cache working nodes jointly maintain a historical query cache library table;
[0011] The query cache module is used to control the target working node to obtain the target business data corresponding to the data split split based on the historical query cache library table.
[0012] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.
[0013] In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.
[0014] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:
[0015] In one or more embodiments of the present application, the service platform can respond to a data query request for a distributed SQL query engine, determine the data shard split for the data query request, determine the target working node corresponding to the data shard split from multiple shared cache working nodes based on the data shard split, and control the target working node to obtain the target business data corresponding to the data shard split based on the historical query cache library table. By introducing a shared cache mechanism to multiple working nodes of the distributed SQL query engine, each shared cache working node jointly updates and maintains the historical query cache library table through a shared physical machine cache path. For any working node currently being processed, its query cache processing capability can cover more nodes, thereby greatly improving the cache hit rate and query performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a flowchart of a data processing method provided in an embodiment of the present application;
[0018] Figure 2 It is a schematic diagram of a historical query cache library table provided in an embodiment of the present application;
[0019] Figure 3 It is a flowchart of another embodiment of a data processing method provided in an embodiment of the present application;
[0020] Figure 4 It is a flowchart of node scheduling involved in a data processing method provided in an embodiment of the present application;
[0021] Figure 5 This is a schematic diagram of a node scheduling scenario provided by an embodiment of the present application;
[0022] Figure 6 It is a performance test comparison diagram after applying the data processing method provided in this manual;
[0023] Figure 7 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0024] Figure 8 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0025] Fig. 9 It is a schematic diagram of the structure of the operating system and user space provided in the embodiment of the present application;
[0026] Fig.10 yes Fig. 9 The architecture diagram of the Android operating system;
[0027] Fig.11 yes Fig. 9 Architecture diagram of the IOS operating system. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0029] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.
[0030] In the related art, when distributed SQL query engines such as Trino combine local cache to improve query performance, on the one hand, the related local cache methods can only be set in advance by operation and maintenance developers to set parameters for cached data, and the parameter settings of distributed SQL query engines such as Trino cannot be adjusted dynamically after they are running. On the one hand, in actual situations, there are many business parties in the Trino cluster and they will change frequently, and it is impossible to determine which data needs to be cached through fixed settings; on the other hand, the physical machine cache information on each cache node of distributed SQL query engines such as Trino is isolated from each other. Based on at least one of the above situations, the query cache hit rate of the distributed SQL query engine will be low.
[0031] The present application is described in detail below with reference to specific embodiments.
[0032] In one embodiment, Figure 1 As shown, a data processing method is proposed, which can be implemented by a computer program and can be run on a data processing device based on the von Neumann system. The computer program can be integrated in an application or run as an independent tool application. The data processing device can be a service platform, a separate server device, such as a rack-mounted, blade, tower, or cabinet-mounted server device, or a workstation, a large computer, or other hardware device with strong computing power; or a server cluster composed of multiple servers, each server in the service cluster can be composed in a symmetrical manner, wherein each server has equivalent functions and status in the transaction link, and each server can provide services to the outside independently, and the independent service can be understood as not requiring the assistance of other servers.
[0033] Specifically, the data processing method includes:
[0034] S102: In response to at least one data query request for a distributed SQL query engine, determine a data split for the data query request;
[0035] The distributed SQL query engine: a big data distributed SQL query engine, such as a Trino query computing engine, which adopts a storage and computing separation architecture, and some business data is usually stored in a cloud storage space;
[0036] In this specification, the distributed SQL query engine combines local caching to cache some business data in the cloud storage space on the local disk during data processing of data query requests. Compared with the method of reading from a remote end, caching some remote files on the local disk and reading them directly will be faster.
[0037] In this specification, the local cache in the distributed SQL query engine can be implemented based on the data cache mechanism in the relevant technology. Taking the distributed SQL query engine as the Trino engine as an example, the cache in Trino is implemented by relying on the introduced data cache framework, such as Rubix, which is a lightweight data cache framework that can be used for local disk cache in cloud storage systems and work across different big data engines. It is suitable for storage and computing separation architectures such as Trino.
[0038] Furthermore, based on the data caching mechanism, the distributed SQL query engine will subsequently respond to the client's data query request and implement the reading of specified business data through the cache mechanism interface of the data caching mechanism. For example, the cache mechanism interface of the data caching mechanism can read specified business data based on data sharding split. If the local data caching mechanism has cached the business data, it will be read directly from the local disk; otherwise, it will switch to reading the business data from the remote storage. At the same time, if this part of the business data meets the data caching mechanism and can be cached after reading, the business data will be saved to the local disk for subsequent direct reading. Subsequently, it will be calculated and processed in the memory according to the stage, and the final output result will be collected in a task.
[0039] The data shard split is also called split shard. A shard can be understood as a small subset of a large data set. The Source Stage will determine multiple data shard splits related to this query from the data source through the Coordinator component of the distributed SQL query engine. Based on the data shard split, the business data of this query can be located. It can be understood that the data segment indicated by the data shard split is the data required for this query. After processing, it will be continued by the downstream stage;
[0040] In the related art, the distributed SQL query engine responds to the data query request initiated by the client by receiving and processing the data query request through the Coordinator component, parsing the query statement to generate a query plan, and dividing the tasks corresponding to one or more data shards. That is, in the process of responding to the data query request, one or more data shards for this query will be determined;
[0041] S104: performing node scheduling processing on the data query request based on the data shard split, so as to determine a target working node corresponding to the data shard split from a plurality of shared cache working nodes, wherein the plurality of shared cache working nodes jointly maintain a historical query cache library table;
[0042] The distributed SQL query engine corresponds to multiple engine cluster slave nodes Worker. The engine cluster slave node Worker is the working node of the distributed SQL query engine, which is mainly used for data processing and task execution, and performs further processing operations Operator on one or more data shards split in the task;
[0043] In the related art, multiple engine cluster slave node workers are independent of each other, and the cache information on the physical machines corresponding to each engine cluster slave node worker is also independent and invisible to each other;
[0044] In this specification, a shared cache mechanism is introduced to multiple nodes in the engine cluster slave node Worker, and several engine cluster slave node Workers are configured as shared cache working nodes. Multiple shared cache working nodes can jointly maintain the historical query cache library table through a shared cache container;
[0045] Optionally, a container platform such as K8S may be used to share the logical volume management (Logical Volume Manager, lvm) of each node Worker.
[0046] For example, k8s can configure the cache directory through volume. Volume is a shared directory accessed by multiple containers in the k8s Pod, and there are many types. Considering the impact on the host intrusion, sharedlvm (shared storage logical volume) can be used. When creating related configurations for the relevant node container pod in the distributed SQL query engine, add the sharedlvm configuration. For example, the sharedlvm path of the node physical machine is set to / home / trino / cache, that is, the cache location hive.cache.location of the worker in the distributed SQL query engine is set to the cache path.
[0047] Schematically, the query SQL information of the distributed SQL query engine can be collected in advance, and the corresponding data can be further analyzed for characteristics such as libraries and tables. The cache table information is dynamically updated based on historical information through a data caching mechanism such as Rubix, that is, each shared cache worker node maintains a historical query cache library table for each other. The data cached by each shared cache worker node will be saved in a path mounted to the physical machine disk through the sharedlvm (shared storage logical volume) capability, thereby realizing the sharing of cache data between multiple shared cache worker nodes. For any Worker, the number of nodes that can be covered by the cache data can be expanded, thereby improving the cache hit rate.
[0048] Specifically, the service platform performs node scheduling processing on data query requests based on data shard split. The node scheduling processing is to determine the target working node corresponding to the data shard split from multiple shared cache working nodes. The determination of the target working node can be based on a pre-configured task allocation mechanism (such as a load balancing mechanism). Since the shared cache container of the target working node maintains a historical query cache library table, it can cover more node data, thereby improving the cache hit rate and speeding up the query speed.
[0049] The historical query cache library table is a characteristic model record library table established based on historical query data, and the historical query cache library table can be dynamically updated.
[0050] S106: Control the target working node to obtain the target business data corresponding to the data split split based on the historical query cache library table.
[0051] Schematically, the target working node is controlled to obtain the historical query cache library table in the target shared cache container, and then the cache path corresponding to the data shard split is queried based on the historical query cache library table, and the data indicated by the data split information is queried based on the data split information in combination with the historical query cache library table to determine whether the data is in the local cache space, and whether subsequent remote cache operations are required when the data split information is not cached, so as to at least obtain the target business data corresponding to the data shard split;
[0052] Optionally, when the data indicated by the data split information is queried in the local cache space based on the data split information combined with the historical query cache table, the target business data in the local cache (which may be on the target working node or other shared cache working nodes) can be obtained through the target working node.
[0053] Optionally, when the data indicated by the data split information is not in the local cache space according to the data split information combined with the historical query cache table, the target working node is controlled to obtain the target business data from the cloud.
[0054] In a feasible implementation, the target business data corresponding to the data split is obtained, and then the target working node performs calculations and processing in memory in sequence according to the stage. The final output results are collected into a task, and then the distributed SQL query engine obtains the results from the target working node worker through the Coordinator, aggregates them, and returns them to the client.
[0055] In one or more embodiments of the present specification, the service platform can respond to a data query request for a distributed SQL query engine, determine the data shard split for the data query request, determine the target working node corresponding to the data shard split from multiple shared cache working nodes based on the data shard split, and control the target working node to obtain the target business data corresponding to the data shard split based on the historical query cache library table. By introducing a shared cache mechanism to multiple working nodes of the distributed SQL query engine, each shared cache working node jointly updates and maintains the historical query cache library table through a shared physical machine cache path, and for any working node currently being processed, its query cache processing capability can cover more nodes, thereby greatly improving the cache hit rate and improving query performance.
[0056] See also Figure 2 , Figure 2 This is a schematic diagram of a historical query cache table involved in this specification. Figure 2 Explain the maintenance and management process of the historical query cache table:
[0057] S1002: Collecting multiple pieces of historical SQL query information for historical business data by the distributed SQL query engine, and generating a historical query characteristic information model based on the historical SQL query information;
[0058] The historical SQL query information can be understood as: the information record of the entire historical query process in which the distributed SQL query engine responds to the data query request initiated by the client and queries the historical business data. By collecting this historical SQL query information, it can be used to generate a historical query feature information model;
[0059] In a feasible implementation, taking the distributed SQL query engine as the Trino query engine as an example, the EventListener interface in Trino can be used, where the queyComplete function will be called when the query completion event occurs. Based on the queyComplete function, the query response process of the SQL query statement can be parsed and feature information extracted as needed, such as extracting: connector name (catalog), database name (schema) to which the data table belongs, table name (table) of the data table, partition information and completion time, etc. After parsing these extracted feature information, the feature information model corresponding to the historical query process can be determined. The feature information model composed of the feature information representing the historical query process can be directly saved in a database such as MySQL for subsequent use.
[0060] Indicatively, taking the connector name (catalog), the database name (schema) to which the data table belongs, the table name (table) of the data table, partition information, and completion time as an example, the table structure for storing query information can be set as follows:
[0061] CREATE TABLE `query_tables`(
[0062] `id`int(11)NOT NULL AUTO_INCREMENT COMMENT'id',
[0063] `catalog_name`varchar(64)DEFAULT NULL COMMENT'Connector name',
[0064] `schema_name`varchar(64)DEFAULT NULL COMMENT'(database name to which the table belongs)',
[0065] `table_name`varchar(64)DEFAULT NULL COMMENT 'table name',
[0066] `queried` long DEFAULT NULL COMMENT 'queried time',
[0067] PRIMARY KEY (`id`)
[0068] )ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '=Table query statistics';
[0069] Further, based on the above method, after collecting multiple historical SQL query information for historical business data of the distributed SQL query engine, a historical query characteristic information model can be generated based on the historical SQL query information;
[0070] Optionally, a historical query characteristic information model may be generated for each historical SQL query process;
[0071] Optionally, the historical query characteristic information model can be maintained and managed with historical business data. Only one historical query characteristic information model is maintained and managed for the same historical business data. After the historical query characteristic information model is created for the historical business data being queried, the subsequent historical SQL query process for the corresponding historical business data is to add records of some parameters of the original historical query characteristic information model. Different historical business data corresponds to different historical query characteristic information models.
[0072] S1004: Based on the multiple historical query characteristic information models, data cache decision rules are used to locally cache the query historical business data in the cloud storage service to obtain a historical query data cache, and the historical query cache library table is maintained based on the historical query data cache, and multiple shared cache working nodes are controlled to synchronize data for the historical query cache library table.
[0073] A historical query cache library table is created in advance on multiple shared cache working nodes. In the initial stage, the historical query cache library table is empty. The historical query cache library table can support dynamic update and maintenance. After the historical query cache library table is deployed, the steps of "collecting multiple historical SQL query information for historical business data of the distributed SQL query engine, generating a historical query characteristic information model based on the historical SQL query information, and using data cache decision rules based on multiple historical query characteristic information models to locally cache the query historical business data in the cloud storage service to obtain a historical query data cache" can be executed in real time or periodically, and then the historical query cache library table is maintained based on the historical query data cache, and multiple shared cache working nodes are controlled to synchronize data for the historical query cache library table.
[0074] The data cache decision rule is used to decide whether to locally cache remote business data stored in the cloud (remotely) based on the historical query characteristic information model, and select the corresponding business data for local caching according to the data cache decision rule combined with the historical query characteristic information model corresponding to the historical business data.
[0075] The settings of data cache decision rules can be configured based on one or more user concerns;
[0076] Optionally, the user's focus may be on the query repeatability of the business data table, and data caching decision rules may be set: if the number of successful queries on a table within a certain period of time reaches a threshold in combination with the historical query characteristic information model, the historical business data table corresponding to the historical query characteristic information model is cached; or, if the amount of query data corresponding to the historical business data reaches a certain set value, the historical business data table corresponding to the historical query characteristic information model is cached; optionally, the user's focus may be the query time. If the query time is greater than a certain threshold, the historical business data table corresponding to the historical query characteristic information model is cached.
[0077] The above data cache decision rules can be used individually or in combination according to actual conditions, and can be used to perform more refined screening of historical business data to achieve the purpose of caching key business data based on querying multiple feature information models.
[0078] Performing library table maintenance on the historical query cache library table based on the historical query data cache may be recording meta information (such as storage path, data size, start address, etc.) of the historical query data cache in the historical query cache library table;
[0079] Further, usually after any shared cache working node executes the steps of "collecting multiple historical SQL query information for historical business data of the distributed SQL query engine, generating a historical query characteristic information model based on the historical SQL query information, and locally caching the query historical business data in the cloud storage service using data cache decision rules based on multiple historical query characteristic information models to obtain a historical query data cache", for the current shared cache working node, the current shared cache working node can record the metadata of the historical query data cache in the historical query cache library table to complete the library table update maintenance, and then synchronize the cache data of the new historical query cache library table to other shared cache working nodes;
[0080] Optionally, the current shared cache working node synchronizes cache data of the new historical query cache library table to other shared cache working nodes; or the current shared cache working node synchronizes cache data of the new historical query cache library table and the new historical query data cache to other shared cache working nodes.
[0081] In addition, during the operation of the distributed SQL query engine, new data cache decision rules can be obtained in real time, that is, the maintenance side can adjust the original data cache decision rules and dynamically adjust the settings of the data cache decision rules for the distributed SQL query engine. By performing statistics and analysis on historical queries and customizing data cache decision rules, the data that needs to be cached can be dynamically adjusted without restarting the distributed SQL query engine, and some commonly used data or key business data can be fine-grainedly cached through the aforementioned data cache decision rules to update and maintain the historical query cache library table shared by each node, which can reduce disk waste and further improve the query speed of related businesses.
[0082] See also Figure 3 , Figure 3 This is a flow chart of another embodiment of a data processing method proposed in this application. Specifically:
[0083] S202: In response to at least one data query request for a distributed SQL query engine, determine a data split for the data query request;
[0084] S204: performing node scheduling processing on the data query request based on the data shard split, so as to determine a target working node corresponding to the data shard split from a plurality of shared cache working nodes, wherein the plurality of shared cache working nodes jointly maintain a historical query cache library table;
[0085] S206: Control the target working node to perform cache path matching on the data shard split based on the historical query cache library table to obtain a cache matching result;
[0086] Cache path matching
[0087] When the target working node (such as a Trino node) needs to query and read data, it will match the cache path of the data shard split in combination with the historical query cache library table, that is, detect whether it has been cached by the current target working node or other shared cache working nodes, and whether subsequent remote cache operations can be performed based on the data shard split if it has not been cached by the node.
[0088] In a feasible implementation, the cache path matching process is as follows:
[0089] A2: Obtain historical query characteristic information corresponding to each historical query data cache in the historical query cache table, perform characteristic information path matching on the data shard split based on the historical query characteristic information, and obtain a cache matching result;
[0090] Illustratively, the historical query characteristic information can be obtained by obtaining a historical query characteristic information model corresponding to the historical query data and based on the historical query characteristic information model. For example, the historical query characteristic information model can be directly used as the historical query characteristic information, and for another example, the historical query characteristic information can be obtained by extracting information from the historical query characteristic information model.
[0091] Optionally, the historical query feature information can be converted into a cache path matching rule. The cache path matching rule is an abstract representation of the path rule of the data shard split corresponding to the business data. After being abstracted into a cache path matching rule, in actual applications, it can be directly based on the current data shard split to "detect whether it has been cached by the current target working node or other shared cache working nodes, and whether subsequent remote caching operations can be performed based on the data shard split when it has not been cached by the node", thereby completing the cache path matching process based on historical optimization.
[0092] For example, the following historical query feature information is used as an example:
[0093]
[0094] catalog_name: connector name, schema_name: database name, table_name: table name, Quired: query time, status: status...
[0095] The above historical query characteristic information (record) can convert its case-specific encoding rules into a cache path matching rule, such as the cache path matching rule: .* / test.db / tmp / .*;
[0096] Furthermore, a cache path matching rule set is generated and maintained based on multiple cache path matching rules. Based on the above method, the historical query feature information model corresponding to the historical query data cache can be converted into a cache path matching rule after the path matching rule conversion; the cache path matching rule can be dynamically updated according to the real-time or periodically generated historical data
[0097] In the actual application stage, the cache path matching rule set corresponding to the historical query data cache in the historical query cache library table can be obtained;
[0098] Then, the data cache path information corresponding to the data split split is obtained, and cache association matching is performed on the data cache path information based on the cache path matching rule set to obtain a cache matching result.
[0099] Schematically, the data cache path information corresponding to the data shard split may be path information, start information, etc.;
[0100] Illustratively, cache association matching is performed on the data cache path information based on the cache path matching rule set, that is, detecting whether it has been cached by the current target working node or other shared cache working nodes (when the cache path matching rule set indexes the cache path matching rule corresponding to the data cache path information, it can be determined that the requested business data has been cached locally, otherwise it has not been cached locally), and whether subsequent remote cache operations can be performed based on data split when the data has not been cached by the node (combining characteristic information (such as the number of queries) to query whether the data cache decision rules are met).
[0101] A4: If the cache matching result is a query success type, then executing the step of determining the local cache path for the data split split based on the cache matching result;
[0102] The query success type is to complete the cache path matching process based on historical optimization and query relevant information records;
[0103] The cache matching result may be one that has been cached locally and carries changed path information, or one that has not been cached locally.
[0104] A6: If the cache matching result is a query failure type, obtain the query engine cache location list, perform cache list matching on the data shard split based on the query engine cache location list, and obtain a second cache matching result.
[0105] The query failure type means that the cache path matching process based on history optimization has not found any relevant information records;
[0106] Indicatively, based on the above query failure types, it will be downgraded to a simple execution step scheme of matching according to the cache blacklist and whitelist (i.e., cache list) set before startup. The cache blacklist and whitelist settings need to be set before the engine starts;
[0107] This execution step plan is a downgrade plan. Taking the distributed SQL query engine as the Trino query engine as an example, the operation and maintenance developers need to set rubix.cache.location.blacklist (rubix cache location blacklist) and rubix.cache.location.whitelist (rubix cache location whitelist) before starting Trino, and then determine the coarse-grained cache data based on the cache list matching rules in the relevant technology.
[0108] S208: Determine a local cache path for the data split split based on the cache matching result, and obtain target business data indicated by the local cache path.
[0109] In a feasible implementation, if the cache matching result indicates that the business data corresponding to the data shard split has been locally cached, the target working node may determine the local cache path of the data shard split;
[0110] Optionally, the business data corresponding to the data shard split may be stored at the physical address of the target working node, in which case the local cache path is also the physical path of the target working node;
[0111] Optionally, the business data corresponding to the data split may be stored at the physical address of other shared cache working nodes. In this case, the local cache path is also the physical address of a shared cache working node, and the target working node may obtain the target business data from the aforementioned shared cache working node.
[0112] Optionally, for any shared cache working node, it can maintain and manage the local cache data of all shared cache working nodes in the shared cache container, that is, the local cache data of all shared cache working nodes are consistent;
[0113] In the embodiments of the present specification, a shared cache mechanism is introduced to multiple working nodes of a distributed SQL query engine, and each shared cache working node jointly updates and maintains the historical query cache library table through a shared physical machine cache path. For any working node currently being processed, its query cache processing capability can cover a larger number of nodes; and a corresponding historical query feature model is established based on the query SQL statement, a series of screening rules are set according to the focus, and path matching settings can be performed without the user's perception, and data caching is more fine-grained, and the data processing process is improved and optimized. Combined with the shared historical query cache library table, fast query is achieved, thereby greatly improving the cache hit rate and enhancing query performance.
[0114] See also Figure 4 , Figure 4 This is a flowchart of node scheduling involved in a data processing method proposed in this application. Specifically:
[0115] S302: Obtain data cache node information carried by the data shard split, and obtain container node cache mapping maps corresponding to multiple shared cache working nodes;
[0116] In this specification, the scheduling rules are optimized when processing data shard splits. Taking the distributed SQL query engine as the Trino query engine as an example, in the pre-caching stage of some remote storage data, when the Trino query engine performs data query in a cluster that enables data caching frameworks such as RubiX, the data caching framework RubiX caches the data in the local disk of the shared cache working node when reading the data shard split from the cloud storage, and records the data cache node information of the business data corresponding to the data shard split. For different shared cache working nodes, the woker will use this to generate and maintain the container node cache mapping map. On the one hand, the subsequent distributed SQL query engine determines the data shard split and carries the data cache node information during subsequent scheduling; on the other hand, the shared cache working node can cover more nodes that can be mapped to the cache data, so that the data reading operations of more data shard splits can be performed on the local disk of the node, thereby improving the cache hit probability.
[0117] The container node cache map (containerNodeMap) includes meta information of relevant local cache data on multiple shared cache working nodes, such as cache path, cache data size, etc.
[0118] S304: Perform node scheduling processing based on the data cache node information and the container node cache mapping map to determine the target working node corresponding to the data split split from multiple shared cache working nodes.
[0119] The node scheduling process is to increase the number of data shards read by the cache. It is improved on the basis of the default distributed SQL query engine scheduling process, following the principle of allocating data shards to the cache nodes originally cached as much as possible while taking into account load balancing.
[0120] In a feasible implementation, the node scheduling process may refer to the following method:
[0121] C2: adopt a local priority strategy to determine the first cache working node corresponding to the data cache node information, allocate the data shard split to the first cache working node and / or a second cache working node that has a shared cache mapping relationship with the first cache working node, and obtain an unallocated reference data shard split;
[0122] C4: adopting a load scheduling strategy to distribute the reference data split to the third cache working node based on the node processing load;
[0123] C6: adopt a uniform distribution strategy to uniformly distribute the data split corresponding to each cache working node to determine the target working node corresponding to the data split, and the cache working node includes at least one of the first cache working node, the second cache working node and the third cache working node.
[0124] Indicatively, Figure 5 As shown, Figure 5 It is a schematic diagram of a node scheduling scenario. Node can be understood as a cache working node, such as Node1, Node2, and Node3. Figure 5 The allocation of data shards to workers can be roughly divided into three stages:
[0125] The first stage is to adopt the local cache priority processing with the local priority strategy. For the query, if the data shard split is local to a certain worker node (i.e., it has been cached by the node), it will be assigned to the worker node (i.e., the first cache worker node) and / or other nodes with shared cache mapping (i.e., the second cache worker node).
[0126] like Figure 5 As shown, after the local cache priority processing with the local priority strategy is adopted, Node1 is initially allocated to split1, split3, split5, split7, split9; Node2 is initially allocated to split2, split4, split6, split8, split10; Node3 is initially allocated to split11, split12;
[0127] The second stage is a load distribution process using a load scheduling strategy, which can act on the local data shard split and the unallocated reference data shard split in the first stage. For example, a load scheduling strategy can be adopted to allocate the reference data shard split to the third cache working node based on the node processing load.
[0128] This phase matches the default distributed SQL query engine scheduling process such as the trino engine scheduling process, and assigns data shard splits to nodes with the most available free slots, which helps generate a more even distribution of data shard splits.
[0129] like Figure 5 As shown, since the data corresponding to each data shard split is cached locally, there is no unallocated reference data shard split; the allocation of each Node remains unchanged.
[0130] The third stage is the uniform distribution process using the uniform distribution strategy, which is responsible for ensuring that the data shards split distributed in batches between nodes are uniform. For nodes that have been allocated a large number of data shards, this stage will reallocate the data shards split on them to nodes with fewer data shards split. This operation will optimize the reallocation of non-local data shard split processes. Therefore, it can ensure that the local split maintains a high degree of parallelism and the load on the working nodes is relatively uniform.
[0131] like Figure 5 As shown in the figure, after the uniform distribution process using the uniform distribution strategy, the working node loads of each Node are relatively uniform;
[0132] like Figure 6 As shown, Figure 6 This is a performance test comparison diagram after applying the data processing method of this manual. Figure 6 In the test, the distributed SQL query engine is used as the Trino query engine. By executing the data processing method involved in one or more embodiments of this specification, a 1G tpcds data set is used for testing. The Trino cluster is tested on the native open source system. In the three cases where the Trino cluster executes the data processing method without scheduling rule optimization and executes the data processing method in full and after scheduling rule optimization, the first 10 tpcds test statements are executed 20 times concurrently. From the performance comparison chart - Figure 5 It can be seen that after optimization, the average execution time of the test SQL statement is shortened by about 40% compared with that before optimization, and the maximum can reach 50%; compared with the case of only rubix cache, the optimized scheduling rules can improve the performance by an average of 10%.
[0133] In this specification, after scheduling, the cache hit rate on the node can be increased, and the query performance can be improved. The optimized scheduling rules can make the data shard split more likely to be allocated to the node that can perform disk read data operations, without consuming more bandwidth resources to pull data from remote storage, thereby improving query performance.
[0134] The following will be combined Figure 7 , the data processing device provided in the embodiment of the present application is introduced in detail. It should be noted that, Figure 7 The data processing device shown is used to execute the application Figure 1 to Figure 6 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 1 to Figure 6 The embodiment shown.
[0135] See also Figure 7 , which shows a schematic diagram of the structure of the data processing device of an embodiment of the present application. The data processing device 1 can be implemented as all or part of the user terminal through software, hardware or a combination of both. According to some embodiments, the data processing device 1 includes a request response module 11, a node scheduling module 1212 and a query cache module 13, which are specifically used to:
[0136] A request response module 11, configured to respond to at least one data query request for a distributed SQL query engine and determine a data split for the data query request;
[0137] A node scheduling module 12 is used to perform node scheduling processing on the data query request based on the data shard split, so as to determine a target working node corresponding to the data shard split from a plurality of shared cache working nodes, and the plurality of shared cache working nodes jointly maintain a historical query cache library table;
[0138] The query cache module 13 is used to control the target working node to obtain the target business data corresponding to the data split split based on the historical query cache library table.
[0139] Optionally, the query cache module 13 is used to:
[0140] Control the target working node to perform cache path matching on the data shard split based on the historical query cache library table to obtain a cache matching result;
[0141] Based on the cache matching result, a local cache path for the data split split is determined, and target business data indicated by the local cache path is obtained.
[0142] Optionally, the query cache module 13 is used to:
[0143] Obtain historical query characteristic information corresponding to each historical query data cache in the historical query cache library table, perform characteristic information path matching on the data shard split based on the historical query characteristic information, and obtain a cache matching result;
[0144] If the cache matching result is a query success type, then executing the step of determining the local cache path for the data split split based on the cache matching result;
[0145] If the cache matching result is a query failure type, a query engine cache location list is obtained, and a cache list match is performed on the data shard split based on the query engine cache location list to obtain a second cache matching result.
[0146] Optionally, the query cache module 13 is used to:
[0147] Obtain a cache path matching rule set corresponding to the historical query data cache in the historical query cache library table, wherein the cache path matching rule set is generated after performing path matching rule conversion based on the historical query characteristic information model corresponding to the historical query data cache;
[0148] The data cache path information corresponding to the data split split is obtained, and cache association matching is performed on the data cache path information based on the cache path matching rule set to obtain a cache matching result.
[0149] Optionally, the device 1 is further used to: collect multiple historical SQL query information for historical business data from the distributed SQL query engine, and generate a historical query characteristic information model based on the historical SQL query information;
[0150] Based on multiple historical query characteristic information models, data cache decision rules are used to locally cache the query historical business data in the cloud storage service to obtain a historical query data cache, and based on the historical query data cache, the historical query cache library table is maintained, and multiple shared cache working nodes are controlled to synchronize data for the historical query cache library table.
[0151] Optionally, the node scheduling module is used to:
[0152] Obtain the data cache node information carried by the data shard split, and obtain the container node cache mapping map corresponding to multiple shared cache working nodes;
[0153] Node scheduling processing is performed based on the data cache node information and the container node cache mapping map to determine the target working node corresponding to the data split split from multiple shared cache working nodes.
[0154] Optionally, the node scheduling module is used to:
[0155] Adopt a local priority strategy to determine the first cache working node corresponding to the data cache node information, allocate the data shard split to the first cache working node and / or a second cache working node that has a shared cache mapping relationship with the first cache working node, and obtain an unallocated reference data shard split;
[0156] Adopting a load scheduling strategy to distribute the reference data shard split to a third cache working node based on the node processing load;
[0157] A uniform distribution strategy is adopted to uniformly distribute the data shard split corresponding to each cache working node to determine the target working node corresponding to the data shard split, and the cache working node includes at least one of the first cache working node, the second cache working node and the third cache working node.
[0158] It should be noted that, when the data processing device provided in the above embodiment executes the data processing method, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the data processing device provided in the above embodiment and the data processing method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0159] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0160] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 1 to Figure 6 The data processing method of the embodiment shown in the figure can be specifically executed by referring to Figure 1 to Figure 6 The specific description of the illustrated embodiment will not be repeated here.
[0161] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 1 to Figure 6 The data processing method of the embodiment shown in the figure can be specifically executed by referring to Figure 1 to Figure 6 The specific description of the illustrated embodiment will not be repeated here.
[0162] Please refer to Figure 8, which shows a block diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. The electronic device in the present application may include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, the memory 120, the input device 130, and the output device 140 may be connected via the bus 150.
[0163] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.
[0164] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 120 includes a non-transitory computer-readable storage medium. The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The operating system may be an Android system, including a system deeply developed based on the Android system, an IOS system developed by Apple, including a system deeply developed based on the IOS system or other systems. The data storage area may also store data created by the electronic device during use, such as a phone book, audio and video data, chat record data, etc.
[0165] See also Fig. 9 As shown, the memory 120 can be divided into an operating system space and a user space. The operating system runs in the operating system space, and native and third-party applications run in the user space. In order to ensure that different third-party applications can achieve good operating results, the operating system allocates corresponding system resources to different third-party applications. However, different application scenarios in the same third-party application also have different requirements for system resources. For example, in the local resource loading scenario, the third-party application has higher requirements for disk reading speed; in the animation rendering scenario, the third-party application has higher requirements for GPU performance. The operating system and third-party applications are independent of each other, and the operating system often cannot perceive the current application scenario of the third-party application in a timely manner, resulting in the operating system being unable to perform targeted system resource adaptation according to the specific application scenario of the third-party application.
[0166] In order for the operating system to distinguish the specific application scenarios of third-party applications, it is necessary to open up data communication between third-party applications and the operating system so that the operating system can obtain the current scenario information of third-party applications at any time, and then perform targeted system resource adaptation based on the current scenario.
[0167] Taking the Android operating system as an example, the programs and data stored in the memory 120 are as follows: Fig.10As shown, the memory 120 may store a Linux kernel layer 320, a system runtime library layer 340, an application framework layer 360 and an application layer 380, wherein the Linux kernel layer 320, the system runtime library layer 340 and the application framework layer 360 belong to the operating system space, and the application layer 380 belongs to the user space. The Linux kernel layer 320 provides underlying drivers for various hardware of electronic devices, such as display drivers, audio drivers, camera drivers, Bluetooth drivers, Wi-Fi drivers, power management, etc. The system runtime library layer 340 provides the main feature support for the Android system through some C / C++ libraries. For example, the SQLite library provides database support, the OpenGL / ES library provides 3D drawing support, and the Webkit library provides browser kernel support, etc. The Android runtime library (Android runtime) is also provided in the system runtime library layer 340, which mainly provides some core libraries that allow developers to use the Java language to write Android applications. The application framework layer 360 provides various APIs that may be used when building applications. Developers can also use these APIs to build their own applications, such as activity management, window management, view management, notification management, content provider, package management, call management, resource management, and location management. At least one application runs in the application layer 380. These applications can be native applications that come with the operating system, such as contact applications, text messaging applications, clock applications, camera applications, etc.; they can also be third-party applications developed by third-party developers, such as game applications, instant messaging applications, photo beautification applications, etc.
[0168] Taking the operating system as an IOS system as an example, the programs and data stored in the memory 120 are as follows: Fig.11As shown, the IOS system includes: a core operating system layer 420 (Core OS layer), a core service layer 440 (Core Services layer), a media layer 460 (Media layer), and a touchable layer 480 (Cocoa Touch Layer). The core operating system layer 420 includes the operating system kernel, drivers, and underlying program frameworks, which provide functions closer to the hardware for use by the program framework located in the core service layer 440. The core service layer 440 provides system services and / or program frameworks required by the application, such as the foundation framework, account framework, advertising framework, data storage framework, network connection framework, geographic location framework, motion framework, etc. The media layer 460 provides audio-visual interfaces for the application, such as graphics and image related interfaces, audio technology related interfaces, video technology related interfaces, and wireless playback (AirPlay) interfaces for audio and video transmission technologies. The touchable layer 480 provides various commonly used interface-related frameworks for application development, and the touchable layer 480 is responsible for the user's touch interaction operations on the electronic device. For example, local notification service, remote push service, advertising framework, game tool framework, message user interface (UI) framework, user interface UIKit framework, map framework, etc.
[0169] exist Fig.11 Among the frameworks shown, the frameworks related to most applications include but are not limited to: the basic framework in the core service layer 440 and the UIKit framework in the touchable layer 480. The basic framework provides many basic object classes and data types, provides the most basic system services for all applications, and has nothing to do with UI. The classes provided by the UIKit framework are basic UI class libraries for creating touch-based user interfaces. iOS applications can provide UIs based on the UIKit framework, so it provides the basic architecture of applications for building user interfaces, drawing, processing and user interaction events, responding to gestures, etc.
[0170] Among them, the method and principle of implementing data communication between third-party applications and the operating system in the IOS system can be referred to the Android system, and this application will not go into details here.
[0171] Among them, the input device 130 is used to receive input instructions or data, and the input device 130 includes but is not limited to a keyboard, a mouse, a camera, a microphone or a touch device. The output device 140 is used to output instructions or data, and the output device 140 includes but is not limited to a display device and a speaker. In one example, the input device 130 and the output device 140 can be combined, and the input device 130 and the output device 140 are touch screen displays, which are used to receive touch operations on or near the user using any suitable object such as a finger or a touch pen, and to display the user interface of each application. The touch screen display is usually set on the front panel of the electronic device. The touch screen display can be designed as a full screen, a curved screen or a special-shaped screen. The touch screen display can also be designed as a combination of a full screen and a curved screen, or a combination of a special-shaped screen and a curved screen, which is not limited in the embodiments of the present application.
[0172] In addition, those skilled in the art will appreciate that the structure of the electronic device shown in the above drawings does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the electronic device also includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a power supply, a Bluetooth module and other components, which will not be described in detail here.
[0173] In the embodiment of the present application, the execution subject of each step may be the electronic device described above. Optionally, the execution subject of each step is the operating system of the electronic device. The operating system may be an Android system, an IOS system, or other operating systems, which is not limited in the embodiment of the present application.
[0174] The electronic device of the embodiment of the present application may also be equipped with a display device, which may be any device capable of realizing a display function, such as a cathode ray tube display (CR), a light-emitting diode display (LED), an electronic ink screen, a liquid crystal display (LCD), a plasma display panel (PDP), etc. The user may use the display device on the electronic device 101 to view displayed text, images, videos and other information. The electronic device may be a smart phone, a tablet computer, a gaming device, an AR (Augmented Reality) device, a car, a data storage device, an audio playback device, a video playback device, a notebook, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, electronic clothing and other devices.
[0175] exist Figure 8 In the electronic device shown, the processor 110 may be used to call an application stored in the memory 120 and specifically perform the following operations:
[0176] In response to at least one data query request for a distributed SQL query engine, determine a data split for the data query request;
[0177] Performing node scheduling processing on the data query request based on the data shard split to determine a target working node corresponding to the data shard split from a plurality of shared cache working nodes, wherein the plurality of shared cache working nodes jointly maintain a historical query cache library table;
[0178] Control the target working node to obtain the target business data corresponding to the data split split based on the historical query cache library table.
[0179] In one embodiment, the processor 110 executes the control of the target working node to obtain the target business data corresponding to the data split split based on the historical query cache library table, including:
[0180] Control the target working node to perform cache path matching on the data shard split based on the historical query cache library table to obtain a cache matching result;
[0181] Based on the cache matching result, a local cache path for the data split split is determined, and target business data indicated by the local cache path is obtained.
[0182] In one embodiment, the processor 110 performs cache path matching on the data shard split based on the historical query cache table in the target shared cache container to obtain a cache matching result, including:
[0183] Obtain historical query characteristic information corresponding to each historical query data cache in the historical query cache library table, perform characteristic information path matching on the data shard split based on the historical query characteristic information, and obtain a cache matching result;
[0184] If the cache matching result is a query success type, then executing the step of determining the local cache path for the data split split based on the cache matching result;
[0185] If the cache matching result is a query failure type, a query engine cache location list is obtained, and a cache list match is performed on the data shard split based on the query engine cache location list to obtain a second cache matching result.
[0186] In one embodiment, the processor 110 performs the acquisition of the historical query characteristic information corresponding to each historical query data cache in the historical query cache table, performs characteristic information path matching on the data shard split based on the historical query characteristic information, and obtains a cache matching result, including:
[0187] Obtain a cache path matching rule set corresponding to the historical query data cache in the historical query cache library table, wherein the cache path matching rule set is generated after performing path matching rule conversion based on the historical query characteristic information model corresponding to the historical query data cache;
[0188] The data cache path information corresponding to the data split split is obtained, and cache association matching is performed on the data cache path information based on the cache path matching rule set to obtain a cache matching result.
[0189] In one embodiment, the processor 110 further includes:
[0190] Collecting multiple pieces of historical SQL query information for historical business data by the distributed SQL query engine, and generating a historical query characteristic information model based on the historical SQL query information;
[0191] Based on multiple historical query characteristic information models, data cache decision rules are used to locally cache the query historical business data in the cloud storage service to obtain a historical query data cache, and based on the historical query data cache, the historical query cache library table is maintained, and multiple shared cache working nodes are controlled to synchronize data for the historical query cache library table.
[0192] In one embodiment, the processor 110 performs the node scheduling processing on the data query request based on the data shard split to determine the target working node corresponding to the data shard split from multiple shared cache working nodes, including:
[0193] Obtain the data cache node information carried by the data shard split, and obtain the container node cache mapping map corresponding to multiple shared cache working nodes;
[0194] Node scheduling processing is performed based on the data cache node information and the container node cache mapping map to determine the target working node corresponding to the data split split from multiple shared cache working nodes.
[0195] In one embodiment, the processor 110 performs the node scheduling process based on the data cache node information and the container node cache map to determine the target working node corresponding to the data shard split from multiple shared cache working nodes, including:
[0196] Adopt a local priority strategy to determine the first cache working node corresponding to the data cache node information, allocate the data shard split to the first cache working node and / or a second cache working node that has a shared cache mapping relationship with the first cache working node, and obtain an unallocated reference data shard split;
[0197] Adopting a load scheduling strategy to distribute the reference data shard split to a third cache working node based on the node processing load;
[0198] A uniform distribution strategy is adopted to uniformly distribute the data shard split corresponding to each cache working node to determine the target working node corresponding to the data shard split, and the cache working node includes at least one of the first cache working node, the second cache working node and the third cache working node.
[0199] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0200] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A data processing method, characterized in that: The method comprises: In response to at least one data query request for a distributed SQL query engine, determine a data split for the data query request; Performing node scheduling processing on the data query request based on the data shard split to determine a target working node corresponding to the data shard split from a plurality of shared cache working nodes, wherein the plurality of shared cache working nodes jointly maintain a historical query cache library table; Control the target working node to obtain the target business data corresponding to the data split split based on the historical query cache library table.
2. The method according to claim 1, characterized in that The controlling the target working node to obtain the target business data corresponding to the data shard split based on the historical query cache library table includes: Control the target working node to perform cache path matching on the data shard split based on the historical query cache library table to obtain a cache matching result; Based on the cache matching result, a local cache path for the data split split is determined, and target business data indicated by the local cache path is obtained.
3. The method according to claim 2, characterized in that The performing cache path matching on the data shard split based on the historical query cache library table in the target shared cache container to obtain a cache matching result includes: Obtain historical query characteristic information corresponding to each historical query data cache in the historical query cache library table, perform characteristic information path matching on the data shard split based on the historical query characteristic information, and obtain a cache matching result; If the cache matching result is a query success type, then executing the step of determining the local cache path for the data split split based on the cache matching result; If the cache matching result is a query failure type, a query engine cache location list is obtained, and a cache list match is performed on the data shard split based on the query engine cache location list to obtain a second cache matching result.
4. The method according to claim 3, characterized in that The acquiring of historical query characteristic information corresponding to each historical query data cache in the historical query cache table, and performing characteristic information path matching on the data shard split based on the historical query characteristic information to obtain a cache matching result includes: Obtain a cache path matching rule set corresponding to the historical query data cache in the historical query cache library table, wherein the cache path matching rule set is generated after performing path matching rule conversion based on the historical query characteristic information model corresponding to the historical query data cache; The data cache path information corresponding to the data split split is obtained, and cache association matching is performed on the data cache path information based on the cache path matching rule set to obtain a cache matching result.
5. The method according to claim 2, characterized in that: The method further comprises: Collecting multiple pieces of historical SQL query information for historical business data by the distributed SQL query engine, and generating a historical query characteristic information model based on the historical SQL query information; Based on multiple historical query characteristic information models, data cache decision rules are used to locally cache the query historical business data in the cloud storage service to obtain a historical query data cache, and based on the historical query data cache, the historical query cache library table is maintained, and multiple shared cache working nodes are controlled to synchronize data for the historical query cache library table.
6. The method according to claim 1, characterized in that The performing node scheduling processing on the data query request based on the data shard split to determine a target working node corresponding to the data shard split from a plurality of shared cache working nodes includes: Obtain the data cache node information carried by the data shard split, and obtain the container node cache mapping map corresponding to multiple shared cache working nodes; Node scheduling processing is performed based on the data cache node information and the container node cache mapping map to determine the target working node corresponding to the data split split from multiple shared cache working nodes.
7. The method according to claim 6, characterized in that The node scheduling process is performed based on the data cache node information and the container node cache map to determine the target working node corresponding to the data shard split from multiple shared cache working nodes, including: Adopt a local priority strategy to determine the first cache working node corresponding to the data cache node information, allocate the data shard split to the first cache working node and / or a second cache working node that has a shared cache mapping relationship with the first cache working node, and obtain an unallocated reference data shard split; Adopting a load scheduling strategy to distribute the reference data shard split to a third cache working node based on the node processing load; A uniform distribution strategy is adopted to uniformly distribute the data shard split corresponding to each cache working node to determine the target working node corresponding to the data shard split, and the cache working node includes at least one of the first cache working node, the second cache working node and the third cache working node.
8. A data processing device, characterized in that: The device comprises: A request response module, configured to respond to at least one data query request for a distributed SQL query engine and determine a data split for the data query request; A node scheduling module, used to perform node scheduling processing on the data query request based on the data shard split, so as to determine a target working node corresponding to the data shard split from a plurality of shared cache working nodes, wherein the plurality of shared cache working nodes jointly maintain a historical query cache library table; The query cache module is used to control the target working node to obtain the target business data corresponding to the data split split based on the historical query cache library table.
9. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 7.
