Monitoring data processing method, system, electronic device and storage medium

By filtering and generating monitoring data storage tables and relational mapping tables, the problem of performance degradation of time series databases when processing large amounts of monitoring data is solved, traceability and trend analysis of historical monitoring data are achieved, and query efficiency and user experience are improved.

CN115080614BActive Publication Date: 2024-10-15INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210566943.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-23
Publication Date
2024-10-15
Estimated Expiration
2042-05-23

AI Technical Summary

Technical Problem

The performance of the time series database decreases when processing large amounts of monitoring data, resulting in delays in real-time query and analysis functions. Long-term storage of monitoring data increases storage pressure and affects query efficiency.

Method used

By filtering the original monitoring data storage table, a second monitoring data storage table and a relational mapping table are generated. According to the query conditions, it is judged whether the preset conditions are met. If not, the downsampled stored data is matched and queried through the relational mapping table to achieve historical analysis. Traceability and trend analysis of monitoring data.

Benefits of technology

Without affecting the performance of the time series database, the traceability and trend analysis of historical monitoring data are achieved, the query time is reduced, and the user experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080614B_ABST
    Figure CN115080614B_ABST
Patent Text Reader

Abstract

The present application provides a monitoring data processing method, system, electronic device and storage medium, including screening out a first monitoring data storage table in an original monitoring data storage table; continuously querying the first monitoring data storage table to generate a second monitoring data storage table; generating a relationship mapping table between the second monitoring data storage table and the first monitoring data storage table; receiving a query condition to determine whether the query condition meets a preset condition; if the query condition meets the preset condition, querying the target monitoring data from the original monitoring data storage table corresponding to the target query table name; if the query condition does not meet the preset condition, matching the second monitoring data storage table corresponding to the target query table according to the relationship mapping table, and querying the second monitoring data storage table to obtain the target monitoring data. By introducing a time series database, and based on a retention policy and continuous query, the monitoring data is downsampled and stored; taking into account the performance of the time series database while ensuring the traceability of historical monitoring data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a monitoring data processing method, system, electronic device and storage medium Background Art

[0002] Since the collected monitoring data are all time series data, and the time series database (InfluxDB) has the characteristics of handling high-load reading and writing, and supports a variety of data analysis functions, which is conducive to rapid analysis of monitoring data, the monitoring data uses the time series database as the storage medium.

[0003] When there are fewer cluster nodes and shorter running time, there is no problem in relying on the time series database for real-time query and analysis of monitoring data. However, when there are more cluster nodes and longer running time, a large amount of monitoring data will be generated. Although the time series database can process hundreds of thousands of data per second, if a large amount of data is stored for a long time, it will seriously affect the performance of the time series database itself, resulting in a decrease in the query efficiency of the time series database, directly leading to delays in the real-time query and analysis functions of the monitoring data, and even affecting the normal use of the functions.

[0004] In addition to real-time monitoring of the data of each monitoring indicator, most monitoring systems also need to check the monitoring data trends of each monitoring indicator over a period of time, such as monitoring systems used in AI training platforms. This requires that the monitoring data needs to be stored in the time series database for a long time; however, long-term storage of monitoring data will increase the storage pressure of the time series database and affect the performance of the time series database itself. In addition, there are various requirements for the use of monitoring data, including checking the abnormal alarm of the latest data and viewing the trend chart display of indicator data for a whole year. The larger the amount of data, the longer the query takes. If it is processed on the browser side, it will also consume a lot of memory, which not only puts a lot of pressure on the monitoring system, but also brings an unbearable query experience to users.

[0005] Therefore, there is an urgent need for a monitoring data processing method that takes into account the performance of the time series database and can trace back the historical monitoring data to solve the above-mentioned technical problems of the prior art. Summary of the invention

[0006] In order to solve the deficiencies of the prior art, the main purpose of the present invention is to provide a risk identification method and system to solve the above-mentioned technical problems of the prior art.

[0007] In order to achieve the above object, the present invention provides a monitoring data processing method in a first aspect, the method comprising:

[0008] Filter out the first monitoring data storage table among the original monitoring data storage tables;

[0009] Continuously querying the first monitoring data storage table to generate a second monitoring data storage table, wherein the number of the first monitoring data table is at least one;

[0010] Generate a relationship mapping table between the second monitoring data storage table and the first monitoring data storage table;

[0011] Receiving query conditions and determining whether the query conditions meet preset conditions;

[0012] If the query condition meets the preset condition, query the target monitoring data from the original monitoring data storage table corresponding to the target query table name;

[0013] If the query condition does not meet the preset condition, a second monitoring data storage table corresponding to the query target table name is matched according to the relationship mapping table, and the second monitoring data storage table is queried to obtain the target monitoring data.

[0014] In some embodiments, the query condition includes a query time range and a query target table name, and the determining whether the query condition meets a preset condition further includes:

[0015] Comparing whether the query time range is less than a preset threshold;

[0016] If the query time range is less than the preset threshold, it is determined that the query condition does not meet the preset condition;

[0017] If the query time range is greater than a preset threshold, it is determined whether the query condition meets the preset condition according to the query target table name and the relationship mapping table.

[0018] In some embodiments, judging whether the query condition meets a preset condition according to the query target table name and the relationship mapping table includes:

[0019] Determine whether there is a second monitoring data storage table corresponding to the query target table name in the relationship mapping table;

[0020] If there is a second monitoring data storage table corresponding to the query target table name, determining that the query condition does not meet the preset condition;

[0021] If there is no second monitoring data storage table corresponding to the query target table name, it is determined that the query condition meets the preset condition.

[0022] In some embodiments, filtering out the first monitoring data storage table in the original storage table includes:

[0023] Obtain the original monitoring data storage table corresponding to all monitoring data in the time series database;

[0024] Get the current running data storage table of the current monitoring system application;

[0025] The storage table that exists in both the original monitoring data storage table and the current running data storage table is selected as the first monitoring data storage table.

[0026] In some embodiments, the method further comprises:

[0027] Storing the relationship mapping table in a relational database and a distributed cache;

[0028] When a new relationship between the second monitoring data storage table and the first monitoring data storage table is generated, the relationship mapping table in the relational database and the distributed cache is updated.

[0029] In some embodiments, the method further comprises:

[0030] When the query condition does not meet the preset condition, query the relationship mapping table in the distributed cache to match the second monitoring data storage table corresponding to the query target table name;

[0031] If the second monitoring data storage table corresponding to the query target table name cannot be matched according to the relationship mapping table in the distributed cache, the relationship mapping table in the relational database is queried to match the second monitoring data storage table corresponding to the query target table name.

[0032] In some embodiments, the method further comprises:

[0033] Query the query scope, aggregation method, time interval, execution frequency and query fields preset by the monitoring system;

[0034] Generate the continuous query according to the query scope and the aggregation mode and the execution frequency;

[0035] The first monitoring data storage table is subjected to the continuous query once according to the time interval and the query field, and a corresponding second monitoring data storage table including the query field is generated.

[0036] In a second aspect, the present application provides a monitoring data processing system, the system comprising:

[0037] A preparation module, used for filtering out a first monitoring data storage table from the original monitoring data storage table;

[0038] The preparation module is further used to continuously query the first monitoring data storage table to generate a second monitoring data storage table, and the number of the first monitoring data table is at least one;

[0039] The preparation module is further used to generate a relationship mapping table between the second monitoring data storage table and the first monitoring data storage table;

[0040] A judgment module, used for receiving a query condition and judging whether the query condition meets a preset condition, wherein the query condition includes a query time range and a query target table name;

[0041] A query module, used for querying target monitoring data from an original monitoring data table corresponding to a query target table name when the query condition meets the preset condition;

[0042] The query module is further configured to match a second monitoring data storage table corresponding to the query target table name according to the relationship mapping table when the query condition does not meet the preset condition, and query the second monitoring data storage table to obtain the target monitoring data.

[0043] In a third aspect, the present application provides an electronic device, the electronic device comprising:

[0044] one or more processors;

[0045] and a memory associated with the one or more processors, the memory being used to store program instructions, the program instructions when read and executed by the one or more processors performing the following operations:

[0046] Filter out the first monitoring data storage table among the original monitoring data storage tables;

[0047] Continuously querying the first monitoring data storage table to generate a second monitoring data storage table, wherein the number of the first monitoring data table is at least one;

[0048] Generate a relationship mapping table between the second monitoring data storage table and the first monitoring data storage table;

[0049] Receiving query conditions and determining whether the query conditions meet preset conditions;

[0050] If the query condition meets the preset condition, query the target monitoring data from the original monitoring data storage table corresponding to the target query table name;

[0051] If the query condition does not meet the preset condition, a second monitoring data storage table corresponding to the query target table name is matched according to the relationship mapping table, and the second monitoring data storage table is queried to obtain the target monitoring data.

[0052] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program enables a computer to perform the following operations:

[0053] Filter out the first monitoring data storage table among the original monitoring data storage tables;

[0054] Continuously querying the first monitoring data storage table to generate a second monitoring data storage table, wherein the number of the first monitoring data table is at least one;

[0055] Generate a relationship mapping table between the second monitoring data storage table and the first monitoring data storage table;

[0056] Receiving query conditions and determining whether the query conditions meet preset conditions;

[0057] If the query condition meets the preset condition, query the target monitoring data from the original monitoring data storage table corresponding to the target query table name;

[0058] If the query condition does not meet the preset condition, a second monitoring data storage table corresponding to the query target table name is matched according to the relationship mapping table, and the second monitoring data storage table is queried to obtain the target monitoring data.

[0059] The beneficial effects achieved by this application are:

[0060] The present application provides a monitoring data processing method, including screening out a first monitoring data storage table in an original monitoring data storage table; continuously querying the first monitoring data storage table to generate a second monitoring data storage table, wherein the number of the first monitoring data tables is at least one; generating a relationship mapping table between the second monitoring data storage table and the first monitoring data storage table; receiving a query condition to determine whether the query condition meets a preset condition; if the query condition meets the preset condition, querying the target monitoring data from the original monitoring data storage table corresponding to the target query table name; if the query condition does not meet the preset condition, matching the second monitoring data storage table corresponding to the query target table name according to the relationship mapping table, and querying the second monitoring data storage table to obtain the target monitoring data. By introducing a time series database into the monitoring system, the monitoring data is downsampled and stored based on the retention policy and continuous query of the time series database. The recent monitoring data is fully saved; the data generated for a long time is downsampled and stored, and the corresponding original data is deleted at the same time. The traceability of historical monitoring data is ensured without affecting the performance of the time series database, and the analysis of the change trend of monitoring data is supported.

[0061] Furthermore, by pre-setting parameters such as query range, aggregation method and execution frequency in the monitoring system, and generating continuous queries according to the pre-set parameters and performing continuous queries on the first monitoring data storage table, automatic generation and automatic query of continuous queries are achieved, avoiding the complexity of manually creating multiple continuous queries, saving manpower and time costs, and increasing the accuracy of continuous queries. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which:

[0063] Figure 1 It is a relationship mapping table acquisition flow chart provided in an embodiment of the present application;

[0064] Figure 2 It is a monitoring data query flow chart provided in an embodiment of the present application;

[0065] Figure 3 is a flow chart of the method provided in the embodiment of the present application;

[0066] Figure 4 is a system structure diagram provided by an embodiment of the present application;

[0067] Figure 5 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0069] It should be understood that in the description of the present application, unless the context clearly requires otherwise, words such as "include", "comprises", and the like in the entire specification and claims should be interpreted as inclusive rather than exclusive or exhaustive; that is, the meaning of "including but not limited to".

[0070] It should also 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 addition, in the description of this application, unless otherwise specified, "plurality" means two or more.

[0071] It should be noted that the terms "S1", "S2", etc. are only used for the purpose of describing the steps, and do not specifically refer to the order or sequence, nor are they used to limit the present application. They are only for the convenience of describing the method of the present application, and cannot be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.

[0072] According to the background technology, artificial intelligence training platforms and the like need to query and analyze monitoring data in real time, and if monitoring data analysis is to be achieved, it is necessary to obtain monitoring data for a longer period of time. For example, to analyze the changing trend of monitoring indicator data for a whole year, it is necessary to analyze the monitoring data for a whole year. However, for time series databases, storing a large amount of data for a long time will seriously affect the performance of the time series database itself, resulting in reduced query efficiency for monitoring data, which directly leads to delays in real-time query and analysis functions of monitoring data.

[0073] In order to solve the above technical problems, this application provides a monitoring data processing method, which implements downsampling storage of monitoring data based on the retention strategy and continuous query of the time series database. The recent monitoring data is fully saved; the data with a longer generation time is downsampled and stored, and the corresponding original data is deleted. It is achieved that the traceability of historical monitoring data is guaranteed without affecting the performance of the time series database, and the analysis of the changing trend of monitoring data is supported.

[0074] It can be understood that the monitoring data processing method disclosed in the present application can be applied to an artificial intelligence training platform for monitoring data statistics and analysis, and can also be applied to any other platform or system that needs to analyze monitoring data over a longer time range.

[0075] Embodiment 1

[0076] Specifically, the process of using the monitoring data processing method disclosed in this embodiment to query the monitoring data in the time series database includes:

[0077] S100: Obtain and store a relationship mapping table between a first monitoring data storage table and a second monitoring data storage table.

[0078] Specifically, Figure 1 As shown, the steps of obtaining and storing the above relationship mapping table include:

[0079] S110, read all storage tables used to store monitoring data in the time series database, recorded as the original monitoring data storage table; parse the storage table used in the monitoring request code in the monitoring system, recorded as the current running data storage table; compare the original monitoring data storage table and the current running data storage table, and filter out the storage table that exists in both the original monitoring data storage table and the current running data storage table, which is the first monitoring data storage table that needs to be continuously queried. It should be understood that the original monitoring data table refers to all storage tables used to store monitoring data in the time series database, but not all storage tables are required by the currently used monitoring system when storing monitoring data; although the currently used monitoring system uses the current running data storage table to store data, some storage tables are not used to store monitoring data, but may also be used to store some related business data; therefore, the storage table that is filtered out and exists in both the original monitoring data storage table and the current running data storage table is the storage table used by the current monitoring system to store monitoring data, recorded as the first monitoring data storage table.

[0080] S120: Generate a second monitoring data storage table.

[0081] According to the query range and aggregation method pre-set in the monitoring system, each continuous query is generated at a certain time interval. The query time range includes 15 minutes, 30 minutes, 1 hour, 6 hours, 12 hours, 1 day, 7 days, 30 days, etc., and the aggregation methods include maximum value, minimum value, average value, latest value, cumulative value, etc. A continuous query is performed on the first monitoring data storage table according to the execution frequency and query field to generate a second monitoring data table containing the query field. Among them, the query range, aggregation method, execution frequency and query field are pre-set according to user needs and stored in the monitoring system. It can be understood that the storage table used by the current monitoring system to store monitoring data is the first monitoring data storage table, so it is only necessary to continuously query the first monitoring data monitoring table to realize the downsampling storage of the historical monitoring data required by the current monitoring system.

[0082] S130: Generate a relationship mapping table between a first monitoring data storage table and a second monitoring data, and store the relationship mapping table in a relational database and a distributed cache.

[0083] Among them, the generated relationship mapping table between the first monitoring data storage table and the second monitoring data may include the following contents: continuous query name, source database (the database corresponding to the first monitoring data storage table), source retention policy (i.e., retention policy for monitoring data), source table name (i.e., first monitoring data storage table name), target database (i.e., database corresponding to the second monitoring data storage table), target retention policy (i.e., retention policy for continuous query), target table name (i.e., second monitoring data storage table name), time interval (i.e., how long is the interval for a continuous query), execution frequency (frequency of generating continuous queries), query field (monitoring data field to be queried), aggregation method, and query scope. The generated relationship mapping table is stored in a relational database, for example, as shown in Table 1:

[0084]

[0085] Table 1

[0086] In addition, since it is necessary to query the relationship mapping table between the first monitoring data storage table and the second monitoring data storage table to determine whether to query the monitoring data from the original monitoring data storage table or from the second monitoring data storage table, this process will be more frequent. If this relationship is checked from the relational database every time, it will be more time-consuming and affect efficiency. Therefore, this application stores the data of the relationship mapping table in the distributed cache while storing the mapping relationship in the relational database. Because the data in the relationship mapping table basically does not change frequently, it is also very appropriate to store the relationship mapping table in the distributed cache. In this way, every time the relationship is queried, it can be queried in the distributed cache first. If it is not found in the distributed cache, it is queried in the relational database. It is to solve the problem of consistency between the data in the relational data and the data in the distributed cache. Therefore, when a new monitoring item is added, a new original table for storing the monitoring data will be created, so that this new relationship needs to be added to the cache mentioned above at the same time.

[0087] S200: According to the query conditions, query the corresponding monitoring data storage table to obtain monitoring data.

[0088] Specifically, Figure 2As shown, first determine whether the query time range in the query condition is less than the preset threshold specified in the preset condition, where the preset threshold is user-defined. Generally, in order to reduce the storage pressure of the time series database, the preset threshold is set to a value with a relatively small time range such as one day. Taking the preset threshold of one day as an example, when the query time range is less than one day, such as 15 minutes, 30 minutes, 1 hour, 6 hours, 12 hours, 1 day or other user-defined hour 24 hour time range, directly query the original monitoring data storage table for storing monitoring data in the time series database corresponding to the query target table name, and directly return the data after querying the corresponding monitoring data.

[0089] If the query time range in the query condition is greater than the preset threshold, it means that the monitoring data to be queried by the monitoring system at this time is historical monitoring data with a long time. At this time, it is determined from which monitoring data storage table to query the monitoring data by judging whether there is a corresponding second monitoring data storage table for the query target table name in the query condition. According to the query target table name, it is checked in the relationship mapping table whether there is a second monitoring data table corresponding to the query target table name.

[0090] If there is a second monitoring data storage table corresponding to the query target table name, it means that the monitoring system has continuously queried the original monitoring data storage table corresponding to the query target table name and generated a second monitoring data storage table; at this time, the second monitoring data storage table is queried to obtain the target monitoring data and return it. If there is no second monitoring data storage table corresponding to the query target table name, it means that the monitoring system has not continuously queried the monitoring data in the original monitoring storage table corresponding to the query target table name. In this case, the target monitoring data can only be queried in the original monitoring data storage table of the time series database corresponding to the query target table name.

[0091] When there are new monitoring items in the monitoring system, a new original monitoring data storage table will be created to store the monitoring data corresponding to the new monitoring items, which will further generate new mapping relationships and update the relationship mapping table in the relational database; in order to ensure the consistency of the relationship mapping table in the relational database and the distributed cache, the relationship mapping table with the new mapping relationship added needs to be updated to the cache.

[0092] Based on the monitoring data processing method disclosed in the embodiment of the present application, by introducing continuous query of the time series database in the monitoring system, downsampling storage of historical monitoring data is realized, which effectively meets the monitoring and tracing of data within different query time ranges by the monitoring system, and provides strong support for the comprehensive monitoring of the system and analysis of the historical trends of monitoring indicators.

[0093] Embodiment 2

[0094] Corresponding to the above embodiment, the present application provides a method for monitoring data processing, such as Figure 3 As shown, the method includes:

[0095] 3100. Filter out a first monitoring data storage table from the original monitoring data storage table;

[0096] Preferably, the step of filtering out the first monitoring data storage table from the original monitoring data storage table includes:

[0097] 3110. Obtain the original monitoring data storage table corresponding to all monitoring data in the time series database;

[0098] 3120. Obtain the current running data storage table of the current monitoring system application;

[0099] 3130. Filter a storage table that exists in both the original monitoring data storage table and the current running data storage table as a first monitoring data storage table.

[0100] 3200. Continuously query the first monitoring data storage table to generate a second monitoring data storage table, where the number of the first monitoring data table is at least one;

[0101] Preferably, the method further comprises:

[0102] 3210. Query the query scope, aggregation method, time interval, execution frequency and query field preset in the monitoring system;

[0103] 3220. Generate the continuous query according to the query scope and the aggregation mode and according to the execution frequency;

[0104] 3230. Perform the continuous query on the first monitoring data storage table according to the time interval and the query field, and generate a corresponding second monitoring data storage table containing the query field.

[0105] 3300. Generate a relationship mapping table between the second monitoring data storage table and the first monitoring data storage table;

[0106] Preferably, the method further comprises:

[0107] 3310. Storing the relationship mapping table in a relational database and a distributed cache;

[0108] 3320. When a new relationship between the second monitoring data storage table and the first monitoring data storage table is generated, the relationship mapping table in the relational database and the distributed cache is updated.

[0109] 3400. Receive a query condition and determine whether the query condition meets a preset condition;

[0110] Preferably, the query condition includes a query time range and a query target table name, and the determining whether the query condition meets a preset condition further includes:

[0111] 3410. Compare whether the query time range is less than a preset threshold;

[0112] 3420. If the query time range is less than a preset threshold, it is determined that the query condition does not meet the preset condition;

[0113] 3430. If the query time range is greater than a preset threshold, determine whether the query condition meets the preset condition based on the query target table name and the relationship mapping table.

[0114] Preferably, judging whether the query condition meets a preset condition according to the query target table name and the relationship mapping table includes:

[0115] 3431. Determine whether there is a second monitoring data storage table corresponding to the query target table name in the relationship mapping table;

[0116] 3432. If there is a second monitoring data storage table corresponding to the query target table name, it is determined that the query condition does not meet the preset condition;

[0117] 3433. If there is no second monitoring data storage table corresponding to the query target table name, it is determined that the query condition meets the preset condition.

[0118] 3500. If the query condition meets the preset condition, query the target monitoring data from the original monitoring data storage table corresponding to the target query table name;

[0119] 3600. If the query condition does not meet the preset condition, match a second monitoring data storage table corresponding to the query target table name according to the relationship mapping table, and query the second monitoring data storage table to obtain target monitoring data.

[0120] Preferably, the method further comprises:

[0121] 3610. When the query condition does not meet the preset condition, query the relationship mapping table in the distributed cache to match the second monitoring data storage table corresponding to the query target table name;

[0122] 3620. If the second monitoring data storage table corresponding to the query target table name cannot be matched according to the relationship mapping table in the distributed cache, query the relationship mapping table in the relational database to match the second monitoring data storage table corresponding to the query target table name.

[0123] Embodiment 3

[0124] like Figure 4 As shown, corresponding to the above-mentioned embodiment 1 and embodiment 2, the embodiment of the present application provides a monitoring data processing system, the system comprising:

[0125] A preparation module 410 is used to filter out a first monitoring data storage table from the original monitoring data storage table;

[0126] The preparation module 410 is further used to continuously query the first monitoring data storage table to generate a second monitoring data storage table, wherein the number of the first monitoring data table is at least one;

[0127] The preparation module 410 is further configured to generate a relationship mapping table between the second monitoring data storage table and the first monitoring data storage table;

[0128] The judgment module 420 is used to receive the query condition and judge whether the query condition meets the preset condition, wherein the query condition includes the query time range and the query target table name;

[0129] A query module 430, configured to query target monitoring data from an original monitoring data table corresponding to a query target table name when the query condition meets the preset condition;

[0130] The query module 430 is further configured to match a second monitoring data storage table corresponding to the query target table name according to the relationship mapping table when the query condition does not meet the preset condition, and query the second monitoring data storage table to obtain target monitoring data.

[0131] In some embodiments, the judgment module 420 is also used to compare whether the query time range is less than a preset threshold; if the query time range is less than the preset threshold, the judgment module 420 determines that the query condition does not meet the preset condition; if the query time range is greater than the preset threshold, the judgment module 420 determines whether the query condition meets the preset condition based on the query target table name and the relationship mapping table.

[0132] In some embodiments, the judgment module 420 is also used to determine whether there is a second monitoring data storage table corresponding to the query target table name in the relationship mapping table; if there is a second monitoring data storage table corresponding to the query target table name, the judgment module 420 determines that the query condition does not meet the preset condition; if there is no second monitoring data storage table corresponding to the query target table name, the judgment module 420 determines that the query condition meets the preset condition.

[0133] In some embodiments, the preparation module 410 is also used to obtain the original monitoring data storage table corresponding to all monitoring data in the time series database; the preparation module 410 is also used to obtain the current running data storage table of the current monitoring system application; the preparation module 410 is also used to filter the storage table that exists in both the original monitoring data storage table and the current running data storage table as the first monitoring data storage table.

[0134] In some embodiments, the preparation module 410 is also used to store the relationship mapping table in a relational database and a distributed cache; when generating a new relationship between the second monitoring data storage table and the first monitoring data storage table, the preparation module 410 is also used to update the relationship mapping table in the relational database and the distributed cache.

[0135] In some embodiments, the query module 430 is also used to query the relationship mapping table in the distributed cache to match the second monitoring data storage table corresponding to the query target table name when the query condition does not meet the preset condition; if the second monitoring data storage table corresponding to the query target table name cannot be matched according to the relationship mapping table in the distributed cache, then the query module 430 queries the relationship mapping table in the relational database to match the second monitoring data storage table corresponding to the query target table name.

[0136] In some embodiments, the preparation module 410 is also used to query the query range, aggregation method, time interval, execution frequency and query field preset by the monitoring system; the preparation module 410 is also used to generate the continuous query according to the query range and the aggregation method according to the execution frequency; the preparation module 410 is also used to perform the continuous query on the first monitoring data storage table according to the time interval and the query field, and generate a corresponding second monitoring data storage table containing the query field.

[0137] Embodiment 4

[0138] Corresponding to all the above embodiments, an embodiment of the present application provides an electronic device, including:

[0139] One or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions, the program instructions when read and executed by the one or more processors, performing the following operations:

[0140] Filter out the first monitoring data storage table among the original monitoring data storage tables;

[0141] Continuously querying the first monitoring data storage table to generate a second monitoring data storage table, wherein the number of the first monitoring data table is at least one;

[0142] Generate a relationship mapping table between the second monitoring data storage table and the first monitoring data storage table;

[0143] Receiving query conditions and determining whether the query conditions meet preset conditions;

[0144] If the query condition meets the preset condition, query the target monitoring data from the original monitoring data storage table corresponding to the target query table name;

[0145] If the query condition does not meet the preset condition, a second monitoring data storage table corresponding to the query target table name is matched according to the relationship mapping table, and the second monitoring data storage table is queried to obtain the target monitoring data.

[0146] in, Figure 5 The architecture of the electronic device is shown as an example, which may include a processor 510, a video display adapter 511, a disk drive 512, an input / output interface 513, a network interface 514, and a memory 520. The processor 510, the video display adapter 511, the disk drive 512, the input / output interface 513, the network interface 514, and the memory 520 may be communicatively connected via a bus 530.

[0147] Among them, the processor 510 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in this application.

[0148] The memory 520 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 520 can store an operating system 521 for controlling the execution of the electronic device 500, and a basic input and output system (BIOS) 522 for controlling the low-level operations of the electronic device 500. In addition, a web browser 523, a data storage management system 524, and an icon font processing system 525, etc. can also be stored. The above-mentioned icon font processing system 525 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided in the present application is implemented by software or firmware, the relevant program code is stored in the memory 520 and is called and executed by the processor 510.

[0149] The input / output interface 513 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0150] The network interface 514 is used to connect to a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0151] The bus 530 comprises a pathway for transmitting information between the various components of the device (eg, the processor 510, the video display adapter 511, the disk drive 512, the input / output interface 513, the network interface 514, and the memory 520).

[0152] In addition, the electronic device 500 can also obtain information on specific collection conditions from the virtual resource object collection condition information database for use in condition judgment, etc.

[0153] It should be noted that, although the above device only shows a processor 510, a video display adapter 511, a disk drive 512, an input / output interface 513, a network interface 514, a memory 520, a bus 530, etc., in the specific implementation process, the device may also include other components necessary for normal execution. In addition, it can be understood by those skilled in the art that the above device may also only include components necessary for implementing the solution of the present application, and does not necessarily include all the components shown in the figure.

[0154] Embodiment 5

[0155] Corresponding to all the above embodiments, the embodiments of the present application further provide a computer-readable storage medium, characterized in that it stores a computer program, and the computer program enables the computer to operate as follows:

[0156] Filter out the first monitoring data storage table among the original monitoring data storage tables;

[0157] Continuously querying the first monitoring data storage table to generate a second monitoring data storage table, wherein the number of the first monitoring data table is at least one;

[0158] Generate a relationship mapping table between the second monitoring data storage table and the first monitoring data storage table;

[0159] Receiving query conditions and determining whether the query conditions meet preset conditions;

[0160] If the query condition meets the preset condition, query the target monitoring data from the original monitoring data storage table corresponding to the target query table name;

[0161] If the query condition does not meet the preset condition, a second monitoring data storage table corresponding to the query target table name is matched according to the relationship mapping table, and the second monitoring data storage table is queried to obtain the target monitoring data.

[0162] It can be seen from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a cloud service end, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0163] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0164] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A monitoring data processing method, characterized in that: The method comprises: Filter out the first monitoring data storage table among the original monitoring data storage tables; Continuously querying the first monitoring data storage table to generate a second monitoring data storage table, wherein the number of the first monitoring data table is at least one; Generate a relationship mapping table between the second monitoring data storage table and the first monitoring data storage table; Receiving query conditions and determining whether the query conditions meet preset conditions; If the query condition meets the preset condition, query the target monitoring data from the original monitoring data storage table corresponding to the target query table name; If the query condition does not meet the preset condition, a second monitoring data storage table corresponding to the query target table name is matched according to the relationship mapping table, and the second monitoring data storage table is queried to obtain the target monitoring data; The query condition includes the query time range and the query target table name, and the determining whether the query condition meets the preset condition also includes: Comparing whether the query time range is less than a preset threshold; If the query time range is less than the preset threshold, it is determined that the query condition does not meet the preset condition; If the query time range is greater than a preset threshold, judging whether the query condition meets the preset condition according to the query target table name and the relationship mapping table; Wherein, judging whether the query condition meets the preset condition according to the query target table name and the relationship mapping table includes: Determine whether there is a second monitoring data storage table corresponding to the query target table name in the relationship mapping table; If there is a second monitoring data storage table corresponding to the query target table name, determining that the query condition does not meet the preset condition; If there is no second monitoring data storage table corresponding to the query target table name, it is determined that the query condition meets the preset condition.

2. The method according to claim 1, characterized in that The step of filtering out the first monitoring data storage table in the original storage table includes: Obtain the original monitoring data storage table corresponding to all monitoring data in the time series database; Get the current running data storage table of the current monitoring system application; The storage table that exists in both the original monitoring data storage table and the current running data storage table is selected as the first monitoring data storage table.

3. The method according to claim 1, characterized in that: The method further comprises: Storing the relationship mapping table in a relational database and a distributed cache; When a new relationship between the second monitoring data storage table and the first monitoring data storage table is generated, the relationship mapping table in the relational database and the distributed cache is updated.

4. The method according to claim 3, characterized in that The method further comprises: When the query condition does not meet the preset condition, query the relationship mapping table in the distributed cache to match the second monitoring data storage table corresponding to the query target table name; If the second monitoring data storage table corresponding to the query target table name cannot be matched according to the relationship mapping table in the distributed cache, the relationship mapping table in the relational database is queried to match the second monitoring data storage table corresponding to the query target table name.

5. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Query the query scope, aggregation method, time interval, execution frequency and query fields preset by the monitoring system; Generate the continuous query according to the query scope and the aggregation mode and the execution frequency; The first monitoring data storage table is subjected to the continuous query once according to the time interval and the query field, and a corresponding second monitoring data storage table including the query field is generated.

6. A monitoring data processing system, characterized in that: The system comprises: A preparation module, used for filtering out a first monitoring data storage table from the original monitoring data storage table; The preparation module is further used to continuously query the first monitoring data storage table to generate a second monitoring data storage table, and the number of the first monitoring data table is at least one; The preparation module is further used to generate a relationship mapping table between the second monitoring data storage table and the first monitoring data storage table; A judgment module, used for receiving a query condition and judging whether the query condition meets a preset condition, wherein the query condition includes a query time range and a query target table name; A query module, used for querying target monitoring data from an original monitoring data table corresponding to a query target table name when the query condition meets the preset condition; The query module is further configured to match a second monitoring data storage table corresponding to the query target table name according to the relationship mapping table when the query condition does not meet the preset condition, and query the second monitoring data storage table to obtain the target monitoring data; The judgment module is further used to compare whether the query time range is less than a preset threshold; The judgment module is further configured to determine that the query condition does not meet the preset condition when the query time range is less than a preset threshold; The judgment module is further used to judge whether the query condition meets the preset condition according to the query target table name and the relationship mapping table when the query time range is greater than the preset threshold; The judgment module is further used to judge whether there is a second monitoring data storage table corresponding to the query target table name in the relationship mapping table; The judgment module is further configured to determine that the query condition does not meet the preset condition when there is a second monitoring data storage table corresponding to the query target table name; The judgment module is further configured to determine that the query condition meets a preset condition when there is no second monitoring data storage table corresponding to the query target table name.

7. An electronic device, characterized in that: The electronic device comprises: one or more processors; And a memory associated with the one or more processors, the memory is used to store program instructions, and when the program instructions are read and executed by the one or more processors, the method according to any one of claims 1-5 is executed.

8. A computer-readable storage medium, characterized in that: The computer program stores a computer program, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 5.