Time sequence database data storage method and device and electronic equipment

By splitting the timing database file according to the data access frequency in the object store and generating an index, the problem of low efficiency in timing database data query is solved, and more efficient data query is achieved.

CN120216558APending Publication Date: 2025-06-27BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311812312.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-26
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the prior art, the time series database data query in object storage is inefficient, and a large number of files need to be traversed and downloaded for querying.

Method used

Before storing the timing database data into distributed object storage, the target file is split into multiple sub-target files according to the frequency of access of the data, and a target index is generated for each sub-target file and stored in the distributed object storage.

Benefits of technology

Through splitting and indexing processing, the number of files that need to be downloaded during query is reduced, local memory consumption is reduced, and the efficiency of time-series database data query is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216558A_ABST
    Figure CN120216558A_ABST
Patent Text Reader

Abstract

The invention relates to a time sequence database data storage method and device, a storage medium and electronic equipment. The method comprises the steps that before a target file is stored in a target space, the target file is split into a plurality of sub-target files according to the accessed frequency of data in the target file, the target space is a distributed object storage space, and the sub-target files are stored in the distributed object storage space; the target file is a monitoring data file at a certain moment obtained by monitoring a target cluster, and the monitoring data file at each moment of the target cluster forms a time sequence database file of monitoring data of the target cluster; determining a target index of the plurality of sub-target files; and storing the plurality of sub-target files and the target index in the target space. According to the method and the device, the technical problem of low query efficiency when the time sequence database data in the object storage is queried is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data storage, and particularly to a method, device, storage medium, and electronic device for storing time-series database data. Background Art

[0002] In the prior art, for the monitoring of a cluster, the monitored data can be stored in an object storage. Since the monitored data is divided into files according to time points, the monitored data for each time point is stored in a file.

[0003] However, in the prior art, the monitored data for each time point is stored as a file in a database of the object storage. When searching for data, it is necessary to traverse the objects in the object storage, filter the data within a certain time range, and download a large number of files in the object storage to the local, resulting in low query efficiency. Summary of the Invention

[0004] This application provides a method, device, storage medium, and electronic device for storing time-series database data to solve the technical problem of low query efficiency when querying time-series database data in an object storage.

[0005] In a first aspect, this application provides a method for storing time-series database data, including: before storing a target file into a target space, splitting the target file into multiple sub-target files according to the access frequency of the data in the target file, where the target space is a distributed object storage space, the target file is a monitored data file at a certain moment obtained by monitoring a target cluster, and the monitored data files at each moment of the target cluster form a time-series database file of the monitored data of the target cluster; determining a target index for the multiple sub-target files; and storing the multiple sub-target files and the target index into the target space.

[0006] In a second aspect, this application provides a device for storing time-series database data, including: a splitting module, configured to split a target file into multiple sub-target files according to the access frequency of the data in the target file before storing the target file into a target space, where the target space is a distributed object storage space, the target file is a monitored data file at a certain moment obtained by monitoring a target cluster, and the monitored data files at each moment of the target cluster form a time-series database file of the monitored data of the target cluster; a determining module, configured to determine a target index for the multiple sub-target files; and a storing module, configured to store the multiple sub-target files and the target index into the target space.

[0007] As an alternative example, the above-mentioned splitting module includes: a splitting unit configured to determine the access frequency of each monitored parameter of each monitored node of each monitored target cluster in the above-mentioned target file, where the above-mentioned monitored parameters include at least one parameter among a central processing unit usage parameter, a disk occupancy parameter, a memory occupancy parameter, and a network bandwidth occupancy parameter; and divide the data in the above-mentioned target file with the access frequencies in the same interval into a sub-target file to obtain the above-mentioned multiple sub-target files.

[0008] As an alternative example, the above-mentioned splitting module further includes: a determining unit configured to, before determining the access frequency of the monitored parameters of each monitored node of each monitored target cluster in the above-mentioned target file, in the case of receiving a monitoring instruction, determine the above-mentioned target cluster to be monitored from all clusters; determine the above-mentioned monitored nodes from all nodes of each of the above-mentioned target clusters; and determine at least one parameter among the above-mentioned central processing unit usage parameter, disk occupancy parameter, memory occupancy parameter, and network bandwidth occupancy parameter as the monitored parameter of each of the above-mentioned monitored nodes.

[0009] As an alternative example, the above-mentioned determining module includes: a generating unit configured to generate an index file for each of the above-mentioned sub-target files according to the attributes and storage locations of the above-mentioned multiple sub-target files to obtain multiple first indexes; generate a secondary index file for each of the above-mentioned sub-target files in terms of time dimension and file name dimension to obtain multiple second indexes; and determine the above-mentioned first indexes and the above-mentioned second indexes as the above-mentioned target indexes.

[0010] As an alternative example, the above-mentioned generating unit includes: an allocating subunit configured to allocate indexes in the same time dimension for the above-mentioned multiple sub-target files to obtain one of the above-mentioned second indexes; and allocate indexes in the same file name dimension for the sub-files with the same file name among the above-mentioned multiple sub-target files to obtain one or more of the above-mentioned second indexes, where each identical file name corresponds to an index in the file name dimension.

[0011] As an alternative example, the above-mentioned apparatus further includes: a searching module configured to, after storing the above-mentioned multiple sub-target files and the above-mentioned target indexes into the above-mentioned target space, in the case of receiving a data query instruction, obtain a time dimension parameter and a file name dimension parameter from the above-mentioned data query instruction; find one or more of the above-mentioned second indexes from the above-mentioned secondary index file according to the above-mentioned time dimension parameter and the above-mentioned file name dimension parameter; search for database data according to the found above-mentioned second indexes; and return the found above-mentioned database data.

[0012] As an alternative example, the above-mentioned search module includes: a search unit, which is used to start multiple query services to search the database data in parallel in the order from high to low of the priorities of the found second indexes, where the priorities of the second indexes are determined according to the access frequencies of the data in the sub-target files corresponding to the second indexes.

[0013] In a third aspect, the present application provides an electronic device, including: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; at least one memory connected to the at least one bus, where the memory stores a computer program, and the processor is configured to implement the storage method of the time-series database data in any one of the above when executing the computer program.

[0014] In a fourth aspect, the present application further provides a computer storage medium storing computer-executable instructions for executing the storage method of the time-series database data in any one of the above in the present application.

[0015] The above technical solution provided by the embodiments of the present application has the following advantages compared with the prior art: For the time-series database data, the present application first splits according to the access frequency to obtain multiple sub-target files, then establishes a target index for the sub-target files, and finally stores the sub-target files and the target index in the storage space of the distributed object storage, so that when searching for data, it is not necessary to download the full-volume files at each time point to the local for query, reducing the local memory consumption and improving the query efficiency for querying the time-series database data in the distributed object storage. Description of the Drawings

[0016] The drawings here are incorporated into the specification and constitute a part of the specification, showing the embodiments consistent with the present invention, and are used together with the specification to explain the principles of the present invention.

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0018] One or more embodiments are exemplarily illustrated by the pictures in the corresponding drawings. These exemplary illustrations do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, unless otherwise stated, and the drawings in the drawings do not constitute a proportional limitation.

[0019] Figure 1Flowchart of a method for storing time - series database data provided by an embodiment of the present application;

[0020] Figure 2 Sub - target file diagram of a method for storing time - series database data provided by an embodiment of the present application;

[0021] Figure 3 Flowchart of another method for storing time - series database data provided by an embodiment of the present application;

[0022] Figure 4 Monitoring diagram of monitored parameters of a method for storing time - series database data provided by an embodiment of the present application;

[0023] Figure 5 Flowchart of yet another method for storing time - series database data provided by an embodiment of the present application;

[0024] Figure 6 Flowchart of yet another method for storing time - series database data provided by an embodiment of the present application;

[0025] Figure 7 Flowchart of yet another method for storing time - series database data provided by an embodiment of the present application;

[0026] Figure 8 Structural schematic diagram of a device for storing time - series database data provided by an embodiment of the present application;

[0027] Figure 9 Schematic diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0029] The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. To simplify the disclosure of the present invention, components and settings of specific examples are described below. Of course, they are only examples and are not intended to limit the present invention. In addition, the present invention may repeat reference numerals and / or letters in different examples. This repetition is for the purpose of simplification and clarity and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0030] In order to solve the technical problem of low query efficiency when querying time-series database data in object storage in the prior art, the present application provides a method for storing time-series database data, which can achieve the effect of improving the query efficiency of querying time-series database data in distributed object storage.

[0031] Figure 1 It is a flowchart of a method for storing time-series database data provided by an embodiment of the present application. As Figure 1 shown, the above-mentioned method for storing time-series database data includes:

[0032] S102, before storing the target file into the target space, split the target file into multiple sub-target files according to the access frequency of the data in the target file, where the target space is a distributed object storage space, the target file is a monitoring data file at a certain moment obtained by monitoring the target cluster, and the monitoring data files at each moment of the target cluster form a time-series database file of the monitoring data of the target cluster;

[0033] S104, determine the target index of multiple sub-target files;

[0034] S106, store multiple sub-target files and the target index into the target space.

[0035] The above-mentioned time-series database data can be monitoring data obtained by monitoring the cluster. During the process of monitoring the cluster, at different moments, the state of the cluster is different. Therefore, different monitoring data will be obtained at different moments. The monitoring data at each moment is a target file, and the target file records the state data of the nodes in the monitored cluster. For example, there are a total of 10 clusters to be monitored, and each cluster has 100 nodes. Then, at each moment, the target file obtained records the state data of 1000 nodes at this moment.

[0036] For each target file, in this embodiment, the target file is first split into multiple sub-target files. The splitting basis is the access frequency of the data in the target file, and the access frequency can be statistically obtained according to the historical data of the target file for a period of time. If the data in the target file has not been accessed yet, the access frequency can be estimated according to the data type of the data in the target file. The data with a high access frequency is split into one sub-target file, and the data with a low access frequency is split into another sub-target file. Specifically, an interval of the access frequency can be set, and the data with different access frequencies in different intervals are divided into different sub-target files.

[0037] For example, the above 1000 nodes belong to different clusters. However, due to the division by access frequency, it is possible that the monitoring data of 90 nodes (which may belong to the same cluster or different clusters) is divided into one sub-target file, and the monitoring data of 110 nodes is divided into another sub-target file... Thus, the monitoring data of 1000 nodes is divided into multiple sub-target files, and each sub-target file is stored as a database file.

[0038] After the target file is divided into different sub-target files, the data of each sub-target file can be used as a database to generate a target index for the data in the sub-target file. After generating the target index, the sub-target file and the target index are stored in the distributed object storage.

[0039] For example, as Figure 2 shown, for a target file, it is divided into multiple sub-target files, and each sub-target file generates its own target index.

[0040] The solution provided in the embodiments of the present application, for the time series database data, first splits it according to the access frequency, splits it into multiple sub-target files, then establishes a target index for the sub-target files, and finally stores the sub-target files and the target index in the storage space of the distributed object storage. Thus, when searching for data, it is not necessary to download the full amount of files at each time point to the local for query, reducing the local memory consumption and improving the query efficiency for querying the time series database data in the distributed object storage.

[0041] As an optional example, as Figure 3 shown, before storing the target file in the target cluster, splitting the target file into multiple sub-target files according to the access frequency of the data in the target file includes:

[0042] S302, determine the access frequency of each monitored parameter of each monitored node of each monitored target cluster in the target file, where the monitored parameters include at least one of the central processor usage parameter, disk occupancy parameter, memory occupancy parameter, and network bandwidth occupancy parameter;

[0043] S304, divide the data with the same access frequency range in the target file into one sub-target file to obtain multiple sub-target files.

[0044] In this embodiment, each node corresponds to monitored parameters, which are at least one of the parameters of the central processing unit usage parameter, disk occupancy parameter, memory occupancy parameter, and network bandwidth occupancy parameter. For example, if the monitored parameters are the disk occupancy parameter and the memory occupancy parameter, then the disk occupancy parameter and the memory occupancy parameter of each node can be monitored. The disk occupancy parameter has an access frequency, and the memory occupancy parameter has an access frequency. According to different intervals to which the access frequencies belong, the disk occupancy parameter can be placed in a sub-target file, and the memory occupancy parameter can be placed in another sub-target file.

[0045] In addition, in this embodiment, the monitored parameters to be monitored for each node can also be different. For example, for the nodes in Cluster 1, the disk occupancy parameter is monitored, and for the nodes in Cluster 2, the memory occupancy parameter is monitored, etc., which can also be configured.

[0046] For example, as Figure 4 shown, Figure 4 in, the disk occupancy parameters of Nodes 1 to 3 in Cluster 1 are monitored, and the memory occupancy parameters of Nodes 4 to 6 in Cluster 2 are monitored.

[0047] As an optional example, before determining the access frequency of the monitored parameters of each monitored node of each monitored target cluster in the target file, the above method further includes: when receiving a monitoring instruction, determining the target cluster to be monitored from all clusters; determining the monitored nodes from all nodes of each target cluster; and determining at least one of the parameters of the central processing unit usage parameter, disk occupancy parameter, memory occupancy parameter, and network bandwidth occupancy parameter as the monitored parameter of the monitored node for each monitored node.

[0048] In this embodiment, the clusters to be monitored and the monitored nodes in the clusters can be set. That is to say, it can be configured which clusters to monitor. For the nodes in the cluster, it can be configured to monitor all nodes or some nodes. For the determined monitored nodes, it can be configured which monitored parameters to monitor. Different clusters or different nodes can be configured with the same monitored parameters or different monitored parameters. If the same monitored parameters are set, all parameters can be monitored, which is relatively comprehensive. If different monitored parameters are set, flexible monitoring is achieved, and there is no need to store redundant data.

[0049] As an optional example, as Figure 5 shown, determining the target index of multiple sub-target files includes:

[0050] S502. Generate an index file for each sub-target file according to the attributes and storage locations of multiple sub-target files, obtaining multiple first indexes;

[0051] S504. Generate a secondary index file for each sub-target file in terms of time dimension and file name dimension, obtaining multiple second indexes;

[0052] S506. Determine the first index and the second index as the target index.

[0053] In this embodiment, when generating the target index for each sub-target file, it can be divided into two aspects. The first aspect is to create an index for the sub-target file, which can point to the data in the sub-target file. Through this index, the data in the sub-target file can be quickly searched. This part of the index is the first index. On the other hand, for the data in the sub-target file, a second index also needs to be generated in terms of time dimension and file name dimension. The second index can be regarded as a subordinate index of the first index, pointing to the data in the sub-target file with a finer granularity. For example, if only the first index is used, such as searching for the monitoring data of the monitored parameters of a certain node in a certain cluster during a certain period of time, then traverse the first index, find the indexes at each moment corresponding to the corresponding cluster and corresponding node from the first index, and then search for the corresponding data through the found indexes. If the second index is added, still searching for the monitoring data of the monitored parameters of a certain node in a certain cluster during a certain period of time, since there is a second index in the time dimension under the first index, the second index within this period of time can be directly determined through the time dimension, without having to traverse the first index to find the index within the corresponding time, improving the efficiency of index searching.

[0054] As an optional example, as Figure 6 shown, generating a secondary index file for multiple sub-target files in terms of time dimension and file name dimension, obtaining multiple second indexes includes:

[0055] S602. Assign indexes in the same time dimension to multiple sub-target files, obtaining a second index;

[0056] S604. Assign indexes in the same file name dimension to the sub-files with the same file name among multiple sub-target files, obtaining one or more second indexes, where each same file name corresponds to an index in the file name dimension.

[0057] In this embodiment, for each sub-target file, since it is obtained by splitting the target file at a certain moment, for each sub-target file, an index in the same time dimension is created. For example, they all have the same timestamp. In addition, for sub-target files with the same file name, the same file name identifier is assigned, so that the first indexes of multiple sub-target files are further divided according to the time dimension and the file name dimension to obtain the second index.

[0058] As an optional example, as Figure 7 shown, after storing multiple sub-target files and the target index in the target space, the above method further includes:

[0059] S702, when receiving a data query instruction, obtain the time dimension parameter and the file name dimension parameter from the data query instruction;

[0060] S704, according to the time dimension parameter and the file name dimension parameter, find one or more second indexes from the secondary index file;

[0061] S706, find the database data according to the found second index;

[0062] S708, return the found database data.

[0063] In this embodiment, after storing the sub-target file and the target index in the storage space of the distributed object storage, if a query instruction is received and some data needs to be queried, the time dimension parameter and the file name dimension parameter can be obtained from the query instruction first. Through the time dimension parameter, the time index in the second index can be directly located, and through the file name dimension parameter, the file name index in the second index can be located. Thus, the data corresponding to the located index is found according to the located index.

[0064] As an optional example, finding the database data according to the found second index includes: starting multiple query services to find the database data in parallel in the order from high to low of the priority of the found second index, where the priority of the second index is determined according to the access frequency of the data in the sub-target file corresponding to the second index.

[0065] In this embodiment, after determining the index corresponding to the query instruction from the second index, the corresponding data can be queried according to this part of the index. Since the data corresponding to the index is distinguished by the access frequency (belonging to different sub-target files), the indexes can be sorted in the order from high to low of the access frequency of the data. When finding data according to the index, it is also found sequentially or in parallel in the order from high to low of the sorting order of the index. If finding sequentially, one service is started, and if finding in parallel, multiple services are started.

[0066] This embodiment can be applied in the process of monitoring and alarming multiple clusters using a combined service of the monitoring and alarming tool Prometheus and the extended system Thanos. Among the monitoring data generated by monitoring, the monitoring data at each moment is a target file. Before storing the target file in the storage space of the distributed object storage, the target file is first analyzed to analyze the priorities of the index and data files. The priorities are determined according to the access frequencies. The more the access frequency, the higher the priority. According to the priorities, the target file is split into multiple sub-target files, thereby splitting a time series database into multiple databases.

[0067] A target index is established for each sub-target file. The target index includes a first-level index established normally and a second-level index established under the first-level index according to the time dimension and file name dimension. The sub-target file and the target index are stored in the storage space of the distributed object storage.

[0068] When data is loaded or isolated, when the service starts, taking the second-level index and the priority (access frequency) as rules, the data is loaded and multiple services are started, and multiple services are used to query the data in parallel.

[0069] Figure 8 It is a schematic structural diagram of a storage device for time series database data provided by an embodiment of the present application. As Figure 8 shown, the above-mentioned storage device for time series database data includes:

[0070] A splitting module 802, configured to split a target file into multiple sub-target files according to the access frequency of the data in the target file before storing the target file in the target space, where the target space is a distributed object storage space, the target file is a monitoring data file at a certain moment obtained by monitoring a target cluster, and the monitoring data files at each moment of the target cluster form a time series database file of the monitoring data of the target cluster;

[0071] A determining module 804, configured to determine the target index of multiple sub-target files;

[0072] A storage module 806, configured to store multiple sub-target files and the target index in the target space.

[0073] The above time-series database data can be monitoring data obtained by monitoring the cluster. During the process of monitoring the cluster, the state of the cluster is different at different times. Therefore, different monitoring data will be obtained at different times. The monitoring data at each moment is a target file, and the target file records the state data of the nodes in the monitored cluster. For example, if there are 10 clusters to be monitored and each cluster has 100 nodes, then at each moment, the target file obtained records the state data of 1000 nodes at this moment.

[0074] For each target file, in this embodiment, the target file is first split into multiple sub-target files. The splitting basis is the access frequency of the data in the target file, and the access frequency can be statistically obtained according to the historical data of the target file over a period of time. If the data in the target file has not been accessed yet, then the access frequency can be estimated according to the data type of the data in the target file. The data with a high access frequency is split into one sub-target file, and the data with a low access frequency is split into another sub-target file. Specifically, an interval of the access frequency can be set, and the data with different access frequencies in different intervals are divided into different sub-target files.

[0075] For example, among the above 1000 nodes, which belong to different clusters, but due to the division according to the access frequency, it is possible that the monitoring data of 90 nodes (which may belong to the same cluster or different clusters) is divided into one sub-target file, and the monitoring data of 110 nodes is divided into another sub-target file... Thus, the monitoring data of 1000 nodes is divided into multiple sub-target files, and each sub-target file is stored as a database file.

[0076] After the target file is divided into different sub-target files, the data of each sub-target file can be used as a database, and a target index is generated for the data in the sub-target file. After generating the target index, the sub-target file and the target index are stored in the distributed object storage.

[0077] For example, as Figure 2 shown, for a target file, it is divided into multiple sub-target files, and each sub-target file generates its own target index.

[0078] The solution provided by the embodiment of the present application, for the time-series database data, first splits according to the access frequency to obtain multiple sub-target files, then establishes a target index for the sub-target files, and finally stores the sub-target files and the target index in the storage space of the distributed object storage. Therefore, when querying data, it is not necessary to download the full-scale files at each time point to the local for querying, reducing the local memory consumption and improving the query efficiency for querying the time-series database data in the distributed object storage.

[0079] For other examples of this embodiment, please refer to the above examples and will not be elaborated here.

[0080] As Figure 9 shown, an embodiment of the present application provides an electronic device, including a processor 111, a communication interface 112, a memory 113, and a communication bus 114. Among them, the processor 111, the communication interface 112, and the memory 113 complete mutual communication through the communication bus 114.

[0081] The memory 113 is used to store a computer program.

[0082] In an embodiment of the present application, when the processor 111 executes the program stored on the memory 113, it implements the storage method of the time series database data provided by any one of the foregoing method embodiments.

[0083] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the storage method of the time series database data provided by any one of the foregoing method embodiments.

[0084] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0085] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the related technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0086] It should be understood that the terms used herein are for the purpose of describing particular example embodiments only and are not intended to be limiting. Unless the context clearly dictates otherwise, the singular forms "a", "an", and "the" as used herein may also include the plural forms. The terms "comprising", "including", "containing", and "having" are inclusive and thus specify the presence of stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be performed in the particular order described or illustrated, unless an execution order is explicitly stated. It should also be understood that additional or alternative steps may be used.

[0087] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features claimed herein.

Claims

1. A storage method for time series database data, characterized in that, Including: Before storing the target file into the target space, splitting the target file into multiple sub-target files according to the access frequency of the data in the target file, where the target space is a distributed object storage space, the target file is a monitoring data file at a certain moment obtained by monitoring a target cluster, and the monitoring data files at each moment of the target cluster form a time series database file of the monitoring data of the target cluster; Determining the target index of the multiple sub-target files; Storing the multiple sub-target files and the target index into the target space.

2. The method according to claim 1, wherein The splitting the target file into multiple sub-target files according to the access frequency of the data in the target file before storing the target file into the target cluster includes: Determining the access frequency of each monitored parameter of each monitored node of each monitored target cluster in the target file, where the monitored parameters include at least one parameter among a central processing unit usage parameter, a disk occupancy parameter, a memory occupancy parameter, and a network bandwidth occupancy parameter; Dividing the data with the access frequency in the same interval in the target file into one sub-target file to obtain the multiple sub-target files.

3. The method according to claim 2, characterized in that, Before determining the access frequency of the monitored parameters of each monitored node of each monitored target cluster in the target file, the method further includes: When receiving a monitoring instruction, determining the target cluster to be monitored from all clusters; determining the monitored nodes from all nodes of each target cluster; and determining at least one parameter among a central processing unit usage parameter, a disk occupancy parameter, a memory occupancy parameter, and a network bandwidth occupancy parameter as the monitored parameter of each monitored node.

4. The method according to claim 1, characterized in that The determining the target index of the multiple sub-target files includes: Generating an index file for each sub-target file according to the attributes and storage locations of the multiple sub-target files to obtain multiple first indexes; Generating a secondary index file for each sub-target file in terms of time dimension and file name dimension to obtain multiple second indexes; Determining the first indexes and the second indexes as the target index.

5. The method according to claim 4, wherein The generating a secondary index file for the multiple sub-target files in terms of time dimension and file name dimension to obtain multiple second indexes includes: Assigning the same index in the time dimension to the multiple sub-target files to obtain one second index; Assigning the same index in the file name dimension to the sub-files with the same file name among the multiple sub-target files to obtain one or more second indexes, where each same file name corresponds to one index in the file name dimension.

6. The method according to claim 4, wherein After storing the multiple sub-target files and the target index into the target space, the method further includes: When receiving a data query instruction, obtaining a time dimension parameter and a file name dimension parameter from the data query instruction; One or more of the second indexes are found from the secondary index file according to the time dimension parameter and the file name dimension parameter; Database data is found according to the found second index; The found database data is returned.

7. The method according to claim 6, wherein The finding database data according to the found second index includes: According to the order of the priorities of the found second indexes from high to low, a plurality of query services are started to find the database data in parallel, wherein the priority of the second index is determined according to the access frequency of the data in the sub-target file corresponding to the second index.

8. A storage device for time-series database data, characterized in that, Including: A splitting module, configured to split the target file into a plurality of sub-target files according to the access frequency of the data in the target file before storing the target file into the target space, wherein the target space is a distributed object storage space, the target file is a monitoring data file at a certain moment obtained by monitoring the target cluster, and the monitoring data files at each moment of the target cluster form a time series database file of the monitoring data of the target cluster; A determining module, configured to determine the target indexes of the plurality of sub-target files; A storage module, configured to store the plurality of sub-target files and the target indexes into the target space.

9. An electronic device, characterized in that, Including: At least one communication interface; At least one bus connected to the at least one communication interface; At least one processor connected to the at least one bus; At least one memory connected to the at least one bus, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, wherein the storage medium stores computer-executable instructions for executing the method described in any one of claims 1 to 7 of the present application.