Data query method, device, medium, equipment and product based on edge computing

By using grouping and concurrent querying methods in the edge computing monitoring system, the problem of excessively long query response time was solved, achieving efficient data querying and business response, and improving user experience and system stability.

CN120994702BActive Publication Date: 2026-05-08BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING VOLCANO ENGINE TECH CO LTD
Filing Date
2025-08-07
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In edge computing monitoring systems, excessively long query response times and low data return efficiency make it difficult to meet business needs, especially in situations with a large number of edge computing nodes and massive amounts of data.

Method used

The target edge computing nodes are determined by data service instances, and the nodes are grouped according to a preset grouping strategy. The data query engine is used to query data in each group concurrently. The grouping strategy is adopted to minimize the time complexity of data query and is split into multiple subqueries to be executed in parallel.

Benefits of technology

It improves data query efficiency, reduces user waiting time, enhances the data query experience and business processing efficiency, and ensures stable and efficient return of query results in complex network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994702B_ABST
    Figure CN120994702B_ABST
Patent Text Reader

Abstract

A data query method, device, medium, equipment and product based on edge computing, relating to the technical field of edge computing, the method comprising: in response to receiving a data query request, determining a plurality of target edge computing nodes for data query of the data query request through a data service instance, and grouping the plurality of target edge computing nodes based on a preset grouping strategy to obtain a plurality of groups; concurrently performing data query on the target edge computing nodes in each group through a data query engine, and determining a target data query result for the data query request according to the data query result of each group. Thus, the data query on the plurality of target edge computing nodes can be split into a plurality of sub-queries, and the plurality of sub-queries can be concurrently executed through the data query engine, thereby improving data query efficiency and reducing user waiting time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of edge computing technology, and more specifically, to a data query method, apparatus, medium, device, and product based on edge computing. Background Technology

[0002] In edge computing monitoring systems, a combination of Prometheus and Thanos is typically used for data querying. Specifically, when a business application initiates a query request, Thanos distributes the request to various Prometheus instances. After each Prometheus instance returns its local data, the Thanos query engine aggregates and processes this data, ultimately returning a unified query result, which is then fed back to the business application.

[0003] However, edge computing monitoring systems face the challenge of a large number of edge computing nodes, each generating a massive amount of data. In this context, the aforementioned direct query method leads to excessively long query response times and low data return efficiency, making it difficult to meet business needs. Summary of the Invention

[0004] This content section is provided to briefly introduce the concepts, which will be described in detail in the subsequent detailed description section. This content section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] Firstly, this disclosure provides a data query method based on edge computing, applied in a central data center, wherein the central data center deploys data service instances and a data query engine, and the data query method based on edge computing includes:

[0006] In response to receiving a data query request, the data service instance determines multiple target edge computing nodes for data querying based on the data query request, and groups the multiple target edge computing nodes based on a preset grouping strategy to obtain multiple groups. The grouping strategy is used to group the multiple target edge computing nodes with the goal of minimizing the complexity of data query time.

[0007] The data query engine concurrently queries the target edge computing nodes in each group to obtain data query results, and determines the target data query result for the data query request based on the data query results of each group.

[0008] Secondly, this disclosure provides a data query device based on edge computing, applied in a central data center, wherein the central data center is equipped with data service instances and a data query engine, and the data query device based on edge computing includes:

[0009] The first processing module is configured to respond to a received data query request by determining multiple target edge computing nodes for data querying based on the data service instance, and grouping the multiple target edge computing nodes according to a preset grouping strategy to obtain multiple groups, wherein the grouping strategy is used to group the multiple target edge computing nodes with the goal of minimizing the complexity of data query time.

[0010] The second processing module is used to concurrently perform data queries on the target edge computing nodes in each group through the data query engine, obtain data query results, and determine the target data query result for the data query request based on the data query results of each group.

[0011] Thirdly, this disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.

[0012] Fourthly, this disclosure provides an electronic device, comprising:

[0013] A storage device on which computer programs are stored;

[0014] A processing device for executing the computer program in the storage device to implement the steps of the method in the first aspect.

[0015] Fifthly, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in the first aspect.

[0016] The above technical solution allows for the identification of multiple target edge computing nodes for data querying upon receiving a data query request. These nodes are then grouped based on a pre-defined grouping strategy. The data query engine can concurrently query the target edge computing nodes within each group and determine the target data query result for the specific data query request based on the query results for each group. This approach breaks down data queries for multiple target edge computing nodes into multiple sub-queries, which can be executed concurrently by the data query engine. This improves query efficiency and reduces user waiting time. Furthermore, since the grouping strategy aims to minimize query time complexity, the concurrent querying of each group by the data query engine further enhances query efficiency, reduces user waiting time, and improves the user's data query experience.

[0017] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description

[0018] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings:

[0019] Figure 1 This is a flowchart illustrating a data query method based on edge computing according to an exemplary embodiment of the present disclosure;

[0020] Figure 2 This is a system architecture diagram of an edge computing monitoring system according to an exemplary embodiment of the present disclosure;

[0021] Figure 3 This is a timing diagram illustrating a data query method based on edge computing according to an exemplary embodiment of the present disclosure;

[0022] Figure 4 This is a block diagram illustrating a data query apparatus based on edge computing according to an exemplary embodiment of the present disclosure;

[0023] Figure 5 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation

[0024] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0025] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0026] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0027] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0028] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0029] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0030] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0031] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0032] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0033] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0034] Meanwhile, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0035] As mentioned in the background section, edge computing monitoring systems typically employ a Prometheus + Thanos architecture for data querying. Prometheus is a popular open-source system monitoring and alerting toolkit, usually deployed on edge computing nodes, responsible for collecting, storing, and querying various metric data from these nodes. Thanos is an extension solution built on top of Prometheus, designed to address Prometheus's limitations in large-scale data monitoring scenarios, such as long-term data storage and global querying across multiple Prometheus instances. By aggregating data from multiple Prometheus instances, Thanos provides a unified query interface, enabling users to easily obtain monitoring data from different data sources. Specifically, when a business application initiates a query request, Thanos distributes the request to various Prometheus instances. After each Prometheus instance returns its local data, the Thanos query engine aggregates and processes this data, ultimately returning a unified query result, which is then fed back to the business application.

[0036] However, edge computing monitoring systems typically face the challenge of a large number of edge computing nodes, each generating a massive amount of data. In such cases, the direct query method described above leads to excessively long query response times and inefficient data return. This is especially true for complex queries involving multiple Prometheus instances and large amounts of data (such as calculating the Cartesian product of a large volume of data), where query efficiency drops significantly, making it difficult to meet business requirements.

[0037] In view of this, the present disclosure provides a data query method, apparatus, medium, device and product based on edge computing to solve the above-mentioned technical problems.

[0038] The embodiments of this disclosure will be further explained below with reference to the accompanying drawings.

[0039] Figure 1 This is a flowchart illustrating a data query method based on edge computing according to an exemplary embodiment of the present disclosure, with reference to... Figure 1 This method can be applied to central data centers, which can deploy data service instances and data query engines, and the method can include the following steps:

[0040] S101: In response to receiving a data query request, determine multiple target edge computing nodes for data querying through the data service instance, and group the multiple target edge computing nodes according to a preset grouping strategy to obtain multiple groups. The grouping strategy is used to group the multiple target edge computing nodes with the goal of minimizing the complexity of data query time.

[0041] In this embodiment, there can be one or more data service instances, and this disclosure does not impose any limitations on this. In some possible ways, to increase the system's disaster recovery capability, multiple data service instances can be configured. Furthermore, to improve the response efficiency to data query requests and the data query efficiency, the central data center can also be configured with a load balancer. Thus, upon receiving a data query request, the load balancer can distribute the data query request to a data service instance with more available resources among the multiple data service instances, and then determine multiple target edge computing nodes for data querying based on that data service instance.

[0042] It should be understood that the data query engine is a key component in the Prometheus-Thanos architecture, supporting efficient data storage, indexing, and querying. The specific data query engine can be determined based on actual circumstances, and this disclosure does not impose any limitations on it. For example, the data query engine can be a time-series database query engine.

[0043] In this embodiment, the data query request may be initiated by the service user of edge computing, and the service may include video-on-demand service or live streaming service, etc.

[0044] For example, when the data query engine receives a data query request initiated by the live streaming service provider, it can use the service discovery function of edge computing itself to obtain multiple target edge computing nodes on which the live streaming service depends. After obtaining multiple target edge computing nodes, it can group the multiple target edge computing nodes according to a preset grouping strategy to obtain multiple groups.

[0045] Among the possible methods, the preset grouping strategy can be obtained in the following way:

[0046] Assume there is Each edge computing node needs to perform a data query operation. Assume the time complexity of querying a single edge computing node is O(log n). Then this can be... The cluster is divided into Groups, each group contains There are edge computing nodes, then there are .

[0047] For each group, the time complexity of querying a single edge computing node is O(n). Therefore, the time complexity of querying a group can be , .

[0048] Given the extremely high CPU (Central Processing Unit) overhead of querying massive metrics, and the inability of the system to process all calculations in parallel, this embodiment considers a sequential approach to calculate the total time complexity. ,Right now .

[0049] According to the mean inequality It can be concluded that if and only if The equality holds true, so the optimal solution for grouping is: In other words, among possible approaches, multiple target edge computing nodes can be grouped based on a preset grouping strategy to obtain multiple groups, which may include:

[0050] Determine the number of nodes for multiple target edge computing nodes; based on the square root operation result corresponding to the number of nodes, group the multiple target edge computing nodes into multiple groups.

[0051] It is understandable that, for different numbers of nodes, the result of the square root operation corresponding to the number of nodes can be an integer or a non-integer. If the result of the square root operation corresponding to the number of nodes is an integer, the multiple target edge computing nodes can be directly distributed evenly according to the square root result. That is to say, in possible ways, multiple target edge computing nodes are grouped according to the square root result corresponding to the number of nodes, resulting in multiple groups, which may include:

[0052] If the result of the square root operation corresponding to the number of nodes is an integer, the result of the square root operation is determined as the number of groups, and multiple target edge computing nodes are evenly distributed according to the number of groups to obtain multiple groups.

[0053] For example, if the number of nodes is 16, the square root result corresponding to the number of nodes is 4. Therefore, when grouping the 16 target edge computing nodes, the 16 target edge computing nodes can be divided into 4 groups, with each group containing 4 target edge computing nodes.

[0054] When the square root result corresponding to the number of nodes is not an integer, it is impossible to distribute them evenly according to the square root result. Therefore, in order to make the number of target edge computing nodes in each group relatively balanced, the multiple target edge computing nodes can be distributed according to the square root result, ensuring that the difference in the number of target edge computing nodes in any two groups is no greater than 1. Alternatively, the multiple target edge computing nodes can be evenly distributed according to the square root result first, and then the unallocated target edge computing nodes can be grouped separately, thus obtaining multiple groups. In other words, among the possible methods, grouping multiple target edge computing nodes according to the square root result corresponding to the number of nodes to obtain multiple groups can include:

[0055] If the result of the square root operation corresponding to the number of nodes is not an integer, the integer part of the square root operation result is determined as the number of groups, and multiple target edge computing nodes are allocated according to the number of groups to obtain multiple groups. Among the multiple groups, the difference in the number of target edge computing nodes in any two groups is not greater than 1. Alternatively, if the result of the square root operation corresponding to the number of nodes is not an integer, the first group is divided according to the integer part of the square root operation result, and the target edge computing nodes that are not assigned to the first group are divided into the second group to obtain multiple groups. Among the multiple groups, the number of target edge computing nodes in each first group is equal to the integer part.

[0056] For example, if the number of nodes is 21, the square root result corresponding to the number of nodes is approximately 4.58. Since the integer part of the square root result is 4, when grouping the 21 target edge computing nodes, they can be divided into 4 groups, with 3 groups containing 5 target edge computing nodes and 1 group containing 6 target edge computing nodes. Alternatively, they can first divide into 4 first groups based on the integer part of the square root result, with each first group containing 4 target edge computing nodes, and then treat the 5 unassigned target edge computing nodes as a separate second group, thus obtaining 5 groups.

[0057] In this embodiment, the target edge computing nodes in each group can be randomly assigned, or assigned according to a preset node order, or assigned in other ways. This disclosure does not impose any restrictions on this.

[0058] By grouping data using the aforementioned preset strategy, each group can contain a similar number of edge computing nodes. This reduces the likelihood of some groups having excessively heavy query loads while others have insufficient loads when the data query engine queries data from target edge computing nodes within each group. This achieves a more ideal load balance for data query tasks across groups, helping to fully utilize system resources, such as computing and / or network resources, and improving overall resource utilization. Furthermore, the preset grouping strategy allows the data query engine to simultaneously query target edge computing nodes in multiple groups, reducing query latency and improving query efficiency. This enables business users to obtain the required data more quickly, significantly improving the real-time nature of data acquisition and eliminating long waiting times for data returns, allowing for more efficient work and significantly improving business processing efficiency.

[0059] S102: The data query engine concurrently performs data queries on the target edge computing nodes in each group to obtain the data query results for each group, and determines the target data query results for the data query request based on the data query results for each group.

[0060] For example, after obtaining 5 groups through grouping, the data query engine can treat each group as an independent subquery and perform data queries on the target edge computing nodes in these 5 groups in a concurrent manner. After the 5 subqueries are completed, the obtained data query results can be merged to obtain the target data query result for the data query request. The target data query result can then be returned to the business party for subsequent business processing.

[0061] The above technical solution allows for the identification of multiple target edge computing nodes for data querying upon receiving a data query request. These nodes are then grouped based on a pre-defined grouping strategy. The data query engine can concurrently query the target edge computing nodes within each group and determine the target data query result for the specific data query request based on the query results for each group. This approach breaks down data queries for multiple target edge computing nodes into multiple sub-queries, which can be executed concurrently by the data query engine. This improves query efficiency and reduces user waiting time. Furthermore, since the grouping strategy aims to minimize query time complexity, the concurrent querying of each group by the data query engine further enhances query efficiency, reduces user waiting time, and improves the user's data query experience.

[0062] It should be understood that when using Thanos to query monitoring metrics, if faced with a massive volume of queries and a network bottleneck at one of the edge computing nodes, Thanos's Partial Response Strategy may fail. Specifically, the entire data query request will fail and return a 429 status code. Specifically, Partial Response Strategy relies on the `store.response.timeout` configuration to filter abnormal peers; if a peer does not send any data within the set time, it will be filtered out. However, the situation is different on nodes with network bottlenecks: the connection to these nodes is not completely interrupted, but the data transmission efficiency is significantly reduced. This results in the problem that when the global query approaches its timeout, the data from the abnormal peer has not yet been fully returned. Simultaneously, since the queryable interface (Querable) will forcibly return results within the timeout configuration period, another problem arises: time-series metrics require an expanding series (decompression sequence) process, which becomes slower with larger data volumes. Because the return of data from the abnormal peer takes too much time, the data from the normal peer cannot be fully expanded and returned in time, ultimately causing the global query to time out, leaving the business with no data available. To overcome the aforementioned technical problems, if a data query for a particular group fails, that group can be used as new input to further split the target edge computing nodes within that group, until the data query succeeds or each group contains only a preset number of target edge computing nodes. In other words, among possible approaches, edge computing-based data query methods may also include:

[0063] If the data query engine fails to query data within a group, the group is designated as the target group to be processed, and the following steps are executed iteratively:

[0064] The data service instance groups the target edge computing nodes in the target group according to a preset grouping strategy, resulting in multiple subgroups. The data query engine concurrently queries the target edge computing nodes in each subgroup to obtain new data query results for each subgroup. If the new data query results indicate that the data query engine failed to query the data in the subgroup, the subgroup is used as a new target group until the new data query results indicate that the data query engine succeeded in querying the data in the subgroup, or until the number of target edge computing nodes in the target group reaches a preset number.

[0065] For example, if grouping according to a preset grouping strategy results in group A, group B, and group C, each containing four target edge computing nodes, and if the data query result for group B indicates that the data query engine failed to query data in group B, then group B can be taken as the target group to be processed. Based on the preset grouping strategy, the four target edge computing nodes in group B are split into subgroups B-1 and B-2, with each subgroup containing two target edge computing nodes. Then, the data query engine can concurrently query the target edge computing nodes in subgroups B-1 and B-2 to obtain new data query results for subgroups B-1 and B-2. If the new data query result for subgroup B-1 indicates that the data query engine succeeded in querying data in subgroup B-1, and the new data query result for subgroup B-2 indicates that the data query engine succeeded in querying data in subgroup B-2, then the target data query result is determined based on the data query results of groups A, group C, subgroup B-1, and subgroup B-2. If the new data query result for subgroup B-2 indicates that the data query engine failed to perform a data query in subgroup B-2, then subgroup B-2 can be used as the new target group, and the above process can be repeated until the new data query result indicates that the data query engine successfully performs a data query in the subgroup, or until the number of target edge computing nodes in the target group is the preset number.

[0066] The preset quantity can be determined according to the actual situation, and this disclosure does not impose any restrictions on it.

[0067] By employing the above method, when a grouped data query fails, the group can be used as new input to further split the target edge computing nodes within that group. This reduces the probability of a global query failure due to network congestion on a single edge computing node. In other words, this recursive decomposition method maintains resource query efficiency while ensuring service availability. Consequently, even in complex network environments and with massive amounts of metric queries, the system can still stably and efficiently return complete query results, further improving the user experience.

[0068] In some possible ways, the central computer room also deploys a caching device to store the correspondence between the node identifiers of edge computing nodes and the data in the edge computing nodes. Accordingly, the data query method based on edge computing may also include:

[0069] Data queries are performed in the cache device based on the node identifiers of multiple edge computing nodes using a data query engine;

[0070] Accordingly, multiple edge computing nodes are grouped based on a preset grouping strategy using a data service instance, resulting in multiple groups, which may include:

[0071] If no data is found in the cache device, multiple edge computing nodes are grouped by the data service instance based on a preset grouping strategy to obtain multiple groups.

[0072] For example, when the data query engine receives a data query request from the live streaming service provider, it can leverage the service discovery function of edge computing to obtain multiple target edge computing nodes for data querying. After obtaining these target edge computing nodes, the data query engine can perform data queries in the caching device based on the node identifier of each node. If the required target data is found in the caching device based on the node identifier, the target data is merged and output to the live streaming service provider. If the required target data is not found in the caching device based on the node identifier, the data service instance groups the multiple target edge computing nodes according to a preset grouping strategy, resulting in multiple groups. The data query engine then concurrently queries the target edge computing nodes in each group to obtain the data query results for each group. Based on the data query results for each group, the target data query results for the data query request are determined.

[0073] In this embodiment, the implementation method of grouping multiple edge computing nodes based on a preset grouping strategy through a data service instance is as described above and will not be repeated here.

[0074] In this embodiment, the caching device can be any device capable of data storage, and the specific device can be determined according to the actual situation. This disclosure does not impose any limitations on this embodiment. In possible ways, the caching device can be a key-value database, wherein the key of the key-value pair in the key-value database can correspond to the node identifier of the edge computing node, and the value can correspond to the data in the edge computing node.

[0075] Understandably, in edge computing scenarios, edge computing nodes are widely distributed and transmission links are long. This means that during the execution of scheduled tasks, data from individual edge computing nodes may be lost in some cycles due to network issues. However, by caching using edge computing nodes as keys, the most up-to-date data can be provided at the node level. Even if data is lost from individual edge computing nodes, the business can still obtain cached data from the previous task cycle, ensuring at least some usable data and effectively avoiding adverse effects such as data loss. Furthermore, since the edge computing node information relied upon by each business is clear to the edge computing service discovery system, using edge computing nodes as keys for data storage and retrieval can significantly reduce the time spent on key scan operations in the key-value database, thereby achieving faster response times and meeting the business's need for rapid data retrieval.

[0076] Furthermore, a TTL (Time To Live) can be set for cached data in the key-value database. When the TTL of cached data is reached, the cached data will be automatically cleared from the key-value database. This can reduce the storage of expired or invalid cached data in the key-value database, thereby improving the storage space utilization of the key-value database and reducing the waste of storage resources.

[0077] In possible ways, data service instances may include multiple instances, and correspondingly, edge computing-based data query methods may also include:

[0078] Based on the instance-based master selection strategy, a master data service instance is determined from multiple data service instances. The master data service instance then queries the target data from the data query engine based on a preset cache query statement and a preset cache update frequency, and caches the target data into the value of the key-value pair.

[0079] It should be understood that the instance leader election strategy can be determined according to the actual situation, and the embodiments of this disclosure do not impose any restrictions on it. For example, the instance leader election strategy can be based on a leader election strategy, a leader election strategy based on the node's own characteristics, or a leader election strategy based on a token ring, etc. Among them, the leader election strategy can use the consensus algorithm Raft or Paxos to complete the election of the master node through voting and consensus mechanisms among nodes; the leader election strategy based on the node's own characteristics can specify the initial master node according to static configuration or dynamically elect a master node based on performance indicators such as CPU load and memory usage of the node; the leader election strategy based on a token ring can use the transfer of tokens in the node ring to make the node holding the token the master node.

[0080] After obtaining the master data service instance, the master data service instance can query the target data from the data query engine based on the preset cache query statement and preset cache update frequency. This allows the master data service instance to periodically read the required cached data in a polling manner and store it in a way that the key corresponds to the node identifier of the edge computing node and the value corresponds to the data in the edge computing node.

[0081] By employing the above method, a caching device can be set up in the central data center. Upon receiving a data query request from a business, the data can first be retrieved from the caching device. If the data retrieval fails, then the data can be retrieved from the edge computing node. Compared to related technologies where data must be retrieved from the edge computing node every time a data query request is received, this approach reduces data query latency and improves query efficiency. Furthermore, when faced with network fluctuations at the edge, the data can be retrieved from the caching device, effectively reducing the probability of data retrieval failures due to network volatility, thereby improving the continuity and integrity of business data.

[0082] To facilitate a better understanding of the edge computing-based data query method provided in the embodiments of this disclosure, the following describes a possible implementation of this disclosure in conjunction with the system architecture diagram of the edge computing monitoring system and the timing diagram of the edge computing-based data query method.

[0083] First, the edge computing monitoring system in the embodiments of this disclosure will be described.

[0084] The system architecture diagram of the edge computing monitoring system in this embodiment can be as follows: Figure 2As shown, the system includes a central data center and multiple edge computing nodes. Each edge computing node is configured with an Agent instance to collect monitoring metric data from the edge computing nodes. The central data center deploys a time-series database query engine, a distributed key-value database, a load balancer, and multiple data service instances. The time-series database query engine communicates with the Agent instances of each edge computing node via a VPN (Virtual Private Network) to integrate and query global monitoring data. The distributed key-value database is used to cache the metric data collected from the edge computing nodes, ensuring that the cached keys correspond to the names of the edge computing nodes and the values ​​correspond to the specific metric data. The data service instances are used to process received data query requests.

[0085] Next, the data query process in the embodiments of this disclosure will be described.

[0086] Reference Figure 2 and Figure 3 As shown, when a data query request is received from a business system, the target data service instance for handling the request can first be determined from multiple data service instances based on the load balancer. Next, the target data service instance can leverage the service discovery function of edge computing to obtain multiple target edge computing nodes for data querying. Then, the node identifiers of these target edge computing nodes can be sent to the time-series database query engine. The time-series database query engine performs metric data queries in the distributed key-value database based on the node identifier of each target edge computing node. If the required target metric data is found in the distributed key-value database based on the node identifier, the target metric data is merged and output to the business system. If the required target metric data is not found in the distributed key-value database based on the node identifier, the target data service instance groups the multiple target edge computing nodes according to a preset grouping strategy, resulting in multiple groups. The node identifiers of the target edge computing nodes in each group are then sent to the time-series database query engine. The time-series database query engine concurrently performs data queries on the target edge computing nodes in each group based on the node identifiers. If the data query results for each group are obtained, the data query results for each group can be merged to obtain the target data query results for the data query request and output to the business system.

[0087] If a data query fails for any group during the above query process, a secondary recursive query can be performed on the failed group. That is, the failed group can be treated as a target group to be processed, and the target data service instance can be used to group the failed group into multiple subgroups based on a preset grouping strategy. The node identifiers of the target edge computing nodes in each subgroup are then sent to the time-series database query engine. The time-series database query engine concurrently queries the target edge computing nodes in each subgroup, obtaining new data query results for each subgroup. If data query results for each subgroup are obtained, the existing data query results and the data query results for each subgroup are merged and output to the business system. If a data query for any subgroup fails, the above process is repeated until new data query results for each subgroup are obtained, or until the number of target edge computing nodes in the target group reaches a preset number.

[0088] The above technical solution allows data queries targeting multiple edge computing nodes to be broken down into multiple sub-queries, which can then be executed concurrently by the data query engine. This improves data query efficiency and reduces user waiting time. Furthermore, in cases where a grouped data query fails, the group can be used as new input to further split the target edge computing nodes within that group. This reduces the probability of global query failures due to network congestion on a single edge computing node, enabling businesses to obtain more complete and accurate data. This reduces analytical errors and decision-making mistakes caused by missing data, providing robust data support and enhancing the reliability of business decisions.

[0089] Based on the same concept, this disclosure also provides a data query device based on edge computing, applied in a central data center, where data service instances and a data query engine are deployed, such as... Figure 4 As shown, the edge computing-based data query device 400 may include:

[0090] The first processing module 401 is used to respond to receiving a data query request, determine multiple target edge computing nodes for data querying through a data service instance, and group the multiple target edge computing nodes according to a preset grouping strategy to obtain multiple groups. The grouping strategy is used to group the multiple target edge computing nodes with the goal of minimizing the complexity of data query time.

[0091] The second processing module 402 concurrently performs data queries on the target edge computing nodes in each group through the data query engine, obtains the data query results for each group, and determines the target data query results for the data query request based on the data query results for each group.

[0092] The edge computing-based data query device 400 described above can, upon receiving a data query request, determine multiple target edge computing nodes for the data query request through a data service instance. These nodes are then grouped according to a preset grouping strategy, resulting in multiple groups. The data query engine can concurrently query the target edge computing nodes within each group, and based on the query results for each group, determine the target data query result for the data query request. This allows the data query for multiple target edge computing nodes to be broken down into multiple sub-queries, which can be executed concurrently by the data query engine. In other words, the data query engine can simultaneously query multiple target edge computing nodes, thereby improving data query efficiency and reducing user waiting time. Furthermore, since the grouping strategy aims to minimize the complexity of data query time when grouping multiple target edge computing nodes, the concurrent data querying of each group by the data query engine further improves data query efficiency, reduces user waiting time, and ultimately enhances the user's data query experience.

[0093] In one possible manner, the first processing module 401 may include:

[0094] The determination submodule is used to determine the number of nodes for multiple target edge computing nodes;

[0095] The grouping submodule is used to group multiple target edge computing nodes according to the square root operation results corresponding to the number of nodes, resulting in multiple groups.

[0096] In one possible approach, the grouping submodule can be used to determine the number of groups by taking the square root result corresponding to the number of nodes as an integer, and then distribute the multiple target edge computing nodes equally according to the number of groups to obtain multiple groups.

[0097] In one possible approach, the grouping submodule can be used to determine the integer part of the square root operation result as the group number when the result of the square root operation corresponding to the number of nodes is not an integer, and to allocate multiple target edge computing nodes according to the group number to obtain multiple groups, wherein the difference in the number of target edge computing nodes in any two groups is not greater than 1; or, when the result of the square root operation corresponding to the number of nodes is not an integer, to divide the first group according to the integer part of the square root operation result, and to divide the target edge computing nodes that are not assigned to the first group into a second group to obtain multiple groups, wherein the number of target edge computing nodes in each first group is equal to the integer part.

[0098] In some possible embodiments, the edge computing-based data query device 400 may further include:

[0099] The third processing module is used to select a group as the target group to be processed when the data query engine fails to perform a data query within the group, and then repeatedly executes the following steps:

[0100] The data service instance groups the target edge computing nodes in the target group according to a preset grouping strategy, resulting in multiple subgroups. The data query engine concurrently queries the target edge computing nodes in each subgroup to obtain new data query results for each subgroup. If the new data query results indicate that the data query engine failed to query the data in the subgroup, the subgroup is used as a new target group until the new data query results indicate that the data query engine succeeded in querying the data in the subgroup, or until the number of target edge computing nodes in the target group reaches a preset number.

[0101] In some possible configurations, the central computer room also deploys a caching device to store the correspondence between the node identifiers of the edge computing nodes and the data in the edge computing nodes. Accordingly, the edge computing-based data query device 400 may further include:

[0102] The query module is used to perform data queries in the cache device based on the node identifiers of multiple edge computing nodes through the data query engine;

[0103] Accordingly, the first processing module 401 can be used to: when no data is found in the cache device, group multiple edge computing nodes based on a preset grouping strategy through the data service instance to obtain multiple groups.

[0104] In one possible approach, the caching device is a key-value database, where the key of a key-value pair in the database corresponds to the node identifier of the edge computing node, and the value corresponds to the data in the edge computing node.

[0105] In possible embodiments, the data service instances include multiple instances, and correspondingly, the edge computing-based data query device 400 also includes:

[0106] The primary data service instance is determined from multiple data service instances based on the instance-based primary selection strategy.

[0107] The master data service instance queries the target data from the data query engine based on a preset cache query statement and a preset cache update frequency, and caches the target data into the value of the key-value pair.

[0108] Based on the same concept, embodiments of this disclosure also provide a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of any of the above-described edge computing-based data query methods.

[0109] Based on the same concept, this disclosure also provides an electronic device that may include:

[0110] A storage device on which computer programs are stored;

[0111] A processing device for executing a computer program stored in a storage device to implement the steps of any of the above-described edge computing-based data query methods.

[0112] Based on the same concept, this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described edge computing-based data query methods.

[0113] The following is for reference. Figure 5 This diagram illustrates a structural schematic of an electronic device 500 suitable for implementing embodiments of the present disclosure. The terminal devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0114] like Figure 5 As shown, electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. RAM 503 also stores various programs and data required for the operation of electronic device 500. Processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.

[0115] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0116] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.

[0117] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0118] In some implementations, communication can be conducted using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol), and can be interconnected with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.

[0119] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0120] The aforementioned computer-readable medium carries one or more programs. When the electronic device executes the aforementioned one or more programs, the electronic device causes the following actions: In response to receiving a data query request, the electronic device determines multiple target edge computing nodes for data querying based on a data service instance, and groups the multiple target edge computing nodes according to a preset grouping strategy to obtain multiple groups, wherein the grouping strategy is used to group the multiple target edge computing nodes with the goal of minimizing the complexity of data query time; for each group, the electronic device performs data querying on the target edge computing nodes in the group through a data query engine to obtain data query results, and determines the target data query results for the data query request based on the data query results of each group.

[0121] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0122] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0123] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules are not, in some cases, intended to limit the functionality of the module itself.

[0124] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.

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

[0126] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0127] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0128] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative forms of implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which the various modules perform their operations has been described in detail in the embodiments relating to the method, and will not be elaborated upon here.

Claims

1. A data query method based on edge computing, characterized in that, Applied to a central data center, where data service instances and a data query engine are deployed, the edge computing-based data query method includes: In response to receiving a data query request, the system determines multiple target edge computing nodes for data querying based on the data service instance, and groups these nodes according to a preset grouping strategy to obtain multiple groups. The grouping strategy aims to minimize the complexity of the data query time. The process of grouping the multiple target edge computing nodes according to the preset grouping strategy includes: determining the number of nodes in the multiple target edge computing nodes; and grouping the multiple target edge computing nodes according to the square root operation result corresponding to the number of nodes to obtain multiple groups. The data query engine concurrently queries the target edge computing nodes in each group to obtain the data query results for each group, and determines the target data query results for the data query request based on the data query results for each group.

2. The data query method based on edge computing according to claim 1, characterized in that, The plurality of target edge computing nodes are grouped according to the square root operation result corresponding to the number of nodes, resulting in multiple groups, including: If the square root result corresponding to the number of nodes is an integer, the square root result is determined as the number of groups, and the multiple target edge computing nodes are evenly distributed according to the number of groups to obtain multiple groups.

3. The data query method based on edge computing according to claim 1, characterized in that, The plurality of target edge computing nodes are grouped according to the square root operation result corresponding to the number of nodes, resulting in multiple groups, including: If the square root result corresponding to the number of nodes is not an integer, the integer part of the square root result is determined as the number of groups, and the multiple target edge computing nodes are allocated according to the number of groups to obtain multiple groups. In these multiple groups, the difference in the number of target edge computing nodes between any two groups is not greater than 1; or... If the square root result corresponding to the number of nodes is not an integer, the first group is divided according to the integer part of the square root result, and the target edge computing nodes that are not assigned to the first group among the multiple target edge computing nodes are divided into a second group, resulting in multiple groups, wherein the number of target edge computing nodes in each first group is equal to the integer part.

4. The data query method based on edge computing according to claim 1, characterized in that, The edge computing-based data query method also includes: If the data query result indicates that the data query engine has failed to perform a data query on the group, the group will be designated as the target group to be processed, and the following steps will be executed repeatedly: The data service instance groups the target edge computing nodes in the target group according to the preset grouping strategy to obtain multiple subgroups; The data query engine concurrently queries the target edge computing nodes in each subgroup to obtain new data query results for each subgroup. If the new data query result indicates that the data query engine failed to perform a data query in the subgroup, the subgroup will be used as a new target group until the new data query result indicates that the data query engine successfully performed a data query in the subgroup, or until the number of target edge computing nodes in the target group is a preset number.

5. The data query method based on edge computing according to any one of claims 1-4, characterized in that, The central computer room is also equipped with a caching device, which stores the correspondence between the node identifiers of the edge computing nodes and the data in the edge computing nodes. The data query method based on edge computing further includes: The data query engine performs data queries in the caching device based on the node identifiers of the multiple edge computing nodes; The data service instance groups the multiple edge computing nodes based on a preset grouping strategy to obtain multiple groups, including: If no data is found in the cache device, the data service instance groups the multiple edge computing nodes based on a preset grouping strategy to obtain multiple groups.

6. The data query method based on edge computing according to claim 5, characterized in that, The caching device is a key-value database, wherein the key of the key-value pair in the key-value database corresponds to the node identifier of the edge computing node, and the value corresponds to the data in the edge computing node.

7. The data query method based on edge computing according to claim 6, characterized in that, The data service instances include multiple instances, and the edge computing-based data query method further includes: Based on the instance-based master selection strategy, the master data service instance is determined from the plurality of data service instances; The master data service instance queries the target data from the data query engine based on a preset cache query statement and a preset cache update frequency, and caches the target data into the value of the key-value pair.

8. A data query device based on edge computing, characterized in that, Applied to a central data center, where data service instances and a data query engine are deployed, the edge computing-based data query device includes: A first processing module is configured to, in response to receiving a data query request, determine multiple target edge computing nodes for data querying based on the data service instance, and group the multiple target edge computing nodes according to a preset grouping strategy to obtain multiple groups. The grouping strategy aims to minimize the complexity of data query time when grouping the multiple target edge computing nodes. The grouping of the multiple target edge computing nodes according to the preset grouping strategy includes: determining the number of nodes in the multiple target edge computing nodes; and grouping the multiple target edge computing nodes according to the square root operation result corresponding to the number of nodes to obtain multiple groups. The second processing module is used to concurrently perform data queries on the target edge computing nodes in each group through the data query engine, obtain the data query results for each group, and determine the target data query results for the data query request based on the data query results for each group.

9. A computer-readable medium having a computer program stored thereon, characterized in that, When executed by a processing device, the computer program performs the steps of the method according to any one of claims 1-7.

10. An electronic device, characterized in that, include: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the method according to any one of claims 1-7.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Data query method and device, electronic equipment and storage medium

    CN115495478A