Data query method and device, storage medium and electronic equipment
Through hierarchical compression processing of operating indicator data, the problem of data loss and distortion in data query is solved, and accurate and comprehensive storage and query of data are realized.
Patent Information
- Application Number
- CN202310175582.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2024-08-27
AI Technical Summary
Existing data query methods are prone to data loss and distortion during the storage process, resulting in subsequent query data that is not accurate and comprehensive enough.
The operating indicator data is processed using a hierarchical compression method, the compression level is determined based on the collection time and the current time, compression is performed, and the compressed package is stored in a predetermined location, and the compressed package of the target device is obtained in response to the user query request.
It effectively avoids data loss and distortion, retains detailed data, reduces the amount of data, and ensures the accuracy and comprehensiveness of data query.
Smart Images

Figure CN118551081A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a data query method, device, storage medium and electronic equipment. Background Art
[0002] With the continuous development of Internet technology, new media and other businesses have emerged. When new media businesses are running, the operation status of the equipment related to the new media business is usually collected and stored. When it is necessary to understand the historical operation status of the equipment later, the relevant operation data can be obtained through query, and then the new media business can be operated and maintained based on the operation data obtained by the query, which improves the intelligence level of new media business operation and maintenance and makes the operation and maintenance efficiency more efficient.
[0003] However, existing query methods are prone to data loss and distortion during the data storage process, which in turn causes the problem that subsequent query data is not accurate and comprehensive enough. Summary of the invention
[0004] In view of this, the present invention provides a data query method, device and storage medium, the main purpose of which is to solve the problem that the current query data is not accurate and comprehensive enough.
[0005] To solve the above problems, the present application provides a data query method, comprising:
[0006] Obtaining a number of operating indicator data corresponding to each device at each collection time; each operating indicator data is associated with a device identifier and a collection time;
[0007] Based on the collection time of each operation index data and the current time in real time, a hierarchical compression method is used to compress each operation index data to obtain a plurality of index compression packages, and each of the index compression packages is stored in a predetermined storage location;
[0008] In response to a query request generated based on a user's query operation, a plurality of target indicator compressed packages corresponding to the target device within the query time are obtained from a predetermined storage location based at least on a device identifier of the target device in the query request and the query time.
[0009] Optionally, the obtaining of several operation indicator data corresponding to each device in each collection time includes:
[0010] Collect the operating data of several devices in real time to obtain several original operating index data corresponding to each device at each collection time;
[0011] The original operation index data are converted to obtain operation index data corresponding to the original operation index data.
[0012] Optionally, the converting of each of the original operation index data to obtain operation index data corresponding to each of the original operation index data specifically includes:
[0013] Based on the indicator type of each original operation indicator data, determine the target processing method corresponding to the indicator type;
[0014] Based on the target processing method, the corresponding original operation index data are converted to obtain the operation index data corresponding to each original operation index data.
[0015] Optionally, based on the collection time of each operating indicator data and the current time, a hierarchical compression method is used to compress each operating indicator data to obtain a plurality of indicator compression packages, specifically including:
[0016] Determine the compression level corresponding to each operation indicator data based on the collection time of each operation indicator data and the current time;
[0017] Based on the compression level of each operating indicator data, compression processing is performed using a compression method corresponding to the compression level to obtain a number of indicator compression packages.
[0018] Optionally, determining the compression level corresponding to each operation indicator data based on the collection time of each operation indicator data and the current time includes:
[0019] In a case where the collection time of the operating index data is the current time, determining the compression level of the operating index data to be the first compression level;
[0020] When the collection time of the operation index data is earlier than the current time and the time difference between the collection time and the current time is less than the first predetermined time threshold, determining the compression level of the operation index data to be the second compression level;
[0021] When the collection time of the operation index data is earlier than the current time, and the time difference between the collection time and the current time is greater than or equal to the first predetermined time threshold, the compression level of the operation index data is determined to be the third compression level.
[0022] Optionally, each of the compression modes includes a compression period;
[0023] The compression method corresponding to the compression level is used to perform compression processing based on the compression level of each operation indicator data to obtain a plurality of indicator compression packages, specifically including:
[0024] Based on the operation index data corresponding to the same compression level, the operation index data are grouped using the compression period in the compression method to obtain a data set corresponding to each compression period;
[0025] Each of the data sets is compressed respectively to obtain a plurality of index compression packages.
[0026] Optionally, the data query method further includes:
[0027] Delete in real time the various operating indicator data after compression processing using the compression method corresponding to the third compression level.
[0028] Optionally, after obtaining the data sets corresponding to each compression period, the method further includes:
[0029] Acquire feature data in each of the data sets;
[0030] After obtaining the index compression package, the method further includes:
[0031] The characteristic data obtained based on the data set is associated with the corresponding indicator compression package and stored, so that when the target indicator compression package is queried, the characteristic data associated with the target indicator compression package is obtained.
[0032] To solve the above problems, the present application provides a data query device, comprising:
[0033] The acquisition module is used to acquire a number of operating index data corresponding to each device at each collection time; each operating index data is associated with a device identifier and a collection time;
[0034] A compression module is used to compress each operating indicator data in real time based on the collection time of each operating indicator data and the current time, adopt a hierarchical compression method, obtain a number of indicator compression packages, and associate each of the indicator compression packages, the corresponding device identification and the collection time range to store in a predetermined storage location;
[0035] The query module is used to respond to the query request generated based on the user's query operation, so as to obtain several target indicator compressed packages of the target device within the query time from the predetermined storage location based on at least the device identification of the target device in the query request and the query time.
[0036] To solve the above problems, the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above data query methods are implemented.
[0037] The data query method, device, storage medium and electronic device in the present application collect the operating index data of each device in real time, and then use different compression methods and hierarchical compression processing for the currently collected operating index data and the historically collected operating index data, which can retain detailed data, avoid data loss and distortion caused by excessive compression, and also avoid the problem of excessive data volume. This provides a guarantee for accurate and comprehensive acquisition of relevant data in subsequent data queries.
[0038] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0040] Figure 1 This is a flow chart of a data query method according to an embodiment of the present application;
[0041] Figure 2 This is a structural block diagram of a data query device according to another embodiment of the present application;
[0042] Figure 3 This is a structural block diagram of an electronic device according to another embodiment of the present application. DETAILED DESCRIPTION
[0043] Various aspects and features of the present application are described herein with reference to the accompanying drawings.
[0044] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.
[0045] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0046] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0047] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.
[0048] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
[0049] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.
[0050] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.
[0051] The present application embodiment provides a data query method, which can be specifically applied to electronic devices such as terminals and servers. Figure 1 As shown, the data query method in this embodiment includes the following steps:
[0052] Step S101, obtaining a number of operation index data corresponding to each device in each collection time; each operation index data is associated with a device identifier and a collection time;
[0053] In this step, the device refers to: a network device for running new media services or a server for running new media services, etc. The network device may be a switch, etc.
[0054] The operation indicator data may specifically include one or more of the following: CPU usage, memory capacity, disk capacity, port traffic, port status, disk usage, memory usage, etc.
[0055] In the specific implementation process of this step, the operation index data of each network device and / or server can be collected in real time, so as to obtain a number of operation index data of each device at different collection times. When collecting the operation index data, the collection time of each operation index data can be obtained based on the clock of the device itself. Of course, the time of the clock of the device itself can be further compared with the actual time. In the case of inconsistency between the two, the collection time of the operation index data can be adjusted based on the time difference between the two, so as to make the obtained collection time more accurate.
[0056] Step S102, based on the collection time of each operating indicator data and the current time, a hierarchical compression method is used to compress each operating indicator data to obtain a plurality of indicator compression packages, and each indicator compression package, the corresponding device identification and the collection time range are associated and stored in a predetermined storage location;
[0057] In the specific implementation process of this step, the compression level corresponding to each operation index data can be determined based on the collection time and the current time; then, each operation index data is compressed according to the compression method corresponding to the compression level. That is, the compression methods corresponding to the operation index data at different collection times are different. By using such a plurality of compression methods for compression processing, the accuracy of the compressed data is guaranteed, the problem of data loss and distortion is avoided, and the amount of compressed data can be kept small.
[0058] Step S103, responding to a query request generated based on a user's query operation, obtaining a plurality of target indicator compressed packages corresponding to the target device within the query time from a predetermined storage location based at least on a device identifier of the target device in the query request and the query time.
[0059] During the specific implementation of this step, the terminal device can receive the user's click, input, drag and drop operations on the predetermined interface to generate a query request, and then respond to the query request to obtain a number of corresponding target compressed packages.
[0060] In this step, after obtaining a number of target compressed packages, each compressed package may be displayed in a predetermined order.
[0061] The data query method in this embodiment collects the operating index data of each device in real time, and then uses different compression methods to perform hierarchical compression processing on the currently collected operating index data and the historically collected operating index data, which can retain detailed data, avoid data loss and distortion caused by excessive compression, and also avoid the problem of excessive data volume. This provides a guarantee for accurate and comprehensive acquisition of relevant data in subsequent data queries.
[0062] Another embodiment of the present application provides a data query method, comprising the following steps:
[0063] Step S201, real-time collection of operating data of a number of devices to obtain a number of original operating index data corresponding to each device at each collection time;
[0064] The original operation index data in this step refers to the data directly collected from the device, and may include, for example: memory size, disk size, port traffic speed, port status, etc.
[0065] Step S202: converting each of the original operation index data to obtain operation index data corresponding to each of the original operation index data.
[0066] In the specific implementation process of this step, each original operation index data may be converted based on the index type of the index data. That is, based on the index type of each original operation index data, a target processing method corresponding to the index type is determined; then based on the target processing method, the corresponding original operation index data is converted to obtain the operation index data corresponding to each original operation index data.
[0067] In this step, the indicator types may specifically include four types of indicators: real-time numerical indicators, cumulative indicators, status indicators, and percentage indicators:
[0068] For real-time numerical indicators, they may include: CPU occupancy, memory capacity, disk capacity and other indicator data. Since this type of indicator data is real-time numerical data, it can be directly collected and stored, that is, no conversion processing is required.
[0069] For cumulative indicators, they may include indicator data such as switch port traffic. Since this type of indicator data needs to be accumulated from the original operating indicator data, it can be calculated by the time dimension difference and converted into numerical data to obtain the converted operating indicator data.
[0070] The state-type indicators specifically include: port status, such as port available or port unavailable. The indicator data for this type is descriptive information, so the descriptive original operation indicator data can be converted into numerical data using computer language to obtain the converted operation indicator data. For example, the unavailable state can be converted into "0" and the available state can be converted into "1" such numerical data.
[0071] For percentage indicators, they specifically include: memory usage, disk usage, etc. Since this type of data needs to be calculated, it can be converted into percentage data processing in the same time dimension to obtain the converted operating indicator data.
[0072] Step S203, determining the compression level corresponding to each operation index data based on the collection time of each operation index data and the current time;
[0073] During the implementation of this step, the specific process of determining the compression level is as follows: when the collection time of the operating index data is the current time, the compression level of the operating index data is determined to be the first compression level; when the collection time of the operating index data is earlier than the current time, and the time difference between the collection time and the current time is less than the first predetermined time threshold, the compression level of the operating index data is determined to be the second compression level; when the collection time of the operating index data is earlier than the current time, and the time difference between the collection time and the current time is greater than or equal to the first predetermined time threshold, the compression level of the operating index data is determined to be the third compression level. In this embodiment, the first predetermined time threshold can be set to 2 days, that is, of course, it can also be adjusted according to actual needs, and multiple compression levels can be set according to actual needs.
[0074] Step S204, based on the compression level of each operation index data, compression processing is performed using a compression method corresponding to the compression level to obtain a plurality of index compression packages.
[0075] In the specific implementation process of this step, the corresponding compression method can be configured for each compression level in advance, so that after determining the compression level of the operating index data, the corresponding compression method can be directly obtained. Among them, each compression method can include a compression period, that is, a compression time interval, that is, the time interval at which compression is performed.
[0076] In this embodiment, after determining the compression level corresponding to each operating indicator data, the operating indicator data corresponding to the same compression level can be grouped using the compression time period in the compression method to obtain a data set corresponding to each compression time period; and then each data set is compressed separately to obtain a number of indicator compression packages.
[0077] In this embodiment, for the first level compression, the compression period / compression time interval in the corresponding compression method can range from 1 minute to 3 minutes. Taking the compression period of 1 minute as an example, that is, the real-time collected operation indicator data is grouped according to the 1-minute dimension to obtain each data set, and then the data in each data set is merged and compressed to obtain a number of indicator compression packages.
[0078] For the second level compression, the compression period / compression time interval in the corresponding compression method can range from 10 minutes to 15 minutes. Taking the compression period of 10 minutes as an example, that is, the operation indicator data within 2 days are grouped according to the 10-minute dimension to obtain each data set, and then the data in each data set is merged to obtain several indicator compression packages.
[0079] For the third level compression, the compression period / compression time interval in the corresponding compression method ranges from 1 hour to 1.5 hours. Taking the compression period of 1 hour as an example, the operating indicator data of more than 2 days are grouped according to the 1-hour dimension to obtain each data set, and then the data in each data set is merged to obtain several indicator compression packages.
[0080] Step S205, responding to a query request generated based on a user's query operation, obtaining a plurality of target indicator compressed packages corresponding to the target device within the query time from a predetermined storage location based at least on a device identifier of the target device in the query request and the query time.
[0081] During the specific implementation of this step, the terminal device can receive the user's click, input, drag and drop operations on the predetermined interface to generate a query request, and then respond to the query request to obtain a number of corresponding target compressed packages.
[0082] The data query method in this embodiment collects the operating index data of each device in real time, and then uses different compression methods to perform hierarchical compression processing on the currently collected operating index data and the historically collected operating index data, which can retain detailed data, avoid data loss and distortion caused by excessive compression, and also avoid the problem of excessive data volume. This provides a guarantee for accurate and comprehensive acquisition of relevant data in subsequent data queries.
[0083] In the specific implementation process of this embodiment, before converting each of the original operating index data to obtain the operating index data corresponding to each of the original operating index data, the method further includes:
[0084] Based on the collection time of each original operation index data, each original operation index data is sorted, and each original operation index data is converted based on the arrangement order of each original operation index. In this embodiment, by sorting each original operation index data in chronological order, it is possible to facilitate subsequent conversion operations on the original operation index data, so that the conversion result is accurate.
[0085] On the basis of the above-mentioned embodiment, another embodiment of the present application provides a data query method. In this embodiment, each operation index data after compression processing by the compression method corresponding to the third compression level can also be deleted in real time. That is, after the operation index data is compressed according to the compression method corresponding to the third compression level, the part of the operation index data can be further deleted. By deleting this part of the data, it is possible to avoid the situation where the storage space of the predetermined storage location is insufficient due to the large amount of data. At the same time, when performing subsequent data queries, it is conducive to quickly obtaining query results and avoiding the problem of slow query speed due to the large amount of data.
[0086] Another embodiment of the present application provides a data query method, after obtaining the data set corresponding to each compression period, it also includes: obtaining the characteristic data in each of the data sets; thus, after obtaining the index compression package, the characteristic data obtained based on the data set can be associated with the corresponding index compression package for storage, so as to obtain the characteristic data associated with the target index compression package when querying to obtain the target index compression package. In this embodiment, the characteristic data can specifically include any one or more of the following: the highest value of the operating index data, the lowest value of the operating index data, the average value of the operating index data, the 95 peak value of the operating index data, and the median of the operating index data. In this embodiment, for each data set to be compressed, by obtaining the above-mentioned characteristic data and associating these data with the compressed index compression package for storage, the original detailed data can be retained. This makes the stored data more comprehensive, and provides a guarantee for obtaining comprehensive operating status data when performing subsequent data searches.
[0087] In the specific implementation process of this embodiment, when performing data query, the corresponding target compression level can also be determined based on the time span of the query time in the query request, and then the target index compression packages corresponding to the target compression level are obtained. That is, when the time span of the query time is large and greater than the first predetermined value, the third compression level is determined as the target compression level, and then the index compression packages corresponding to the third compression level are obtained, that is, the index compression packages with a compression time period of 1 hour are obtained. When the time span of the query time is large, greater than the second predetermined value and less than the first predetermined value, the second compression level is determined as the target compression level, and then the index compression packages corresponding to the second compression level are obtained, that is, the index compression packages with a compression time period of 10 minutes are obtained; similarly, when the time span of the query time is small and less than the second predetermined value, the first compression level is determined as the target compression level, and then the index compression packages corresponding to the first compression level are obtained, that is, the index compression packages with a compression time period of 1 minute are obtained. Among them, the first predetermined value is greater than the second predetermined value, and the specific time values of the two can be set according to actual needs.
[0088] Another embodiment of the present application provides a data query device, such as Figure 2 As shown, including:
[0089] Acquisition module 1, used to acquire a number of operating index data corresponding to each device in each collection time; each operating index data is associated with a device identifier and a collection time;
[0090] Compression module 2, used for compressing each operating indicator data in real time based on the collection time of each operating indicator data and the current time, using a hierarchical compression method to obtain a plurality of indicator compression packages, and storing each indicator compression package, the corresponding device identification and the collection time range in a predetermined storage location in association;
[0091] The query module 3 is used to respond to the query request generated based on the user's query operation, so as to obtain several target indicator compressed packages of the target device within the query time from the predetermined storage location based at least on the device identification of the target device in the query request and the query time.
[0092] In the specific implementation of this embodiment, the acquisition module 1 specifically includes a collection unit and a conversion unit. The collection unit is used to: collect the operating data of several devices in real time, and obtain several original operating indicator data corresponding to each device in each collection time; the conversion unit is used to: convert each of the original operating indicator data, and obtain the operating indicator data corresponding to each original operating indicator data.
[0093] In the specific implementation of this embodiment, the conversion unit is specifically used to: determine the target processing method corresponding to the indicator type based on the indicator type of each original operating indicator data; based on the target processing method, convert the corresponding original operating indicator data to obtain the operating indicator data corresponding to each original operating indicator data.
[0094] In the specific implementation of this embodiment, the compression module is used to: determine the compression level corresponding to each operating indicator data based on the collection time of each operating indicator data and the current time; based on the compression level of each operating indicator data, use the compression method corresponding to the compression level to perform compression processing to obtain a number of indicator compression packages.
[0095] In the specific implementation of this embodiment, the compression module is used to: when the collection time of the operating index data is the current time, determine the compression level of the operating index data to be the first compression level; when the collection time of the operating index data is earlier than the current time, and the time difference between the collection time and the current time is less than the first predetermined time threshold, determine the compression level of the operating index data to be the second compression level; when the collection time of the operating index data is earlier than the current time, and the time difference between the collection time and the current time is greater than or equal to the first predetermined time threshold, determine the compression level of the operating index data to be the third compression level.
[0096] In the specific implementation of this embodiment, each compression method includes a compression period, and the compression module is used to: based on the operation index data corresponding to the same compression level, use the compression period in the compression method to group each operation index data to obtain a data set corresponding to each compression period; compress each data set separately to obtain a number of index compression packages.
[0097] In a specific implementation of this embodiment, the data query device further includes a deletion module, and the deletion module is used to: delete in real time each operation index data after compression processing by the compression method corresponding to the third compression level.
[0098] In a specific implementation of this embodiment, the data query device further includes a feature acquisition module, and the feature acquisition module is used to obtain feature data in each data set after obtaining the data set corresponding to each compression period;
[0099] The compression module is also used to: after obtaining the indicator compression package, associate and store the feature data obtained based on the data set with the corresponding indicator compression package, so as to obtain the feature data associated with the target indicator compression package when querying to obtain the target indicator compression package.
[0100] The data query device in the present application collects the operating index data of each device in real time, and then uses different compression methods and hierarchical compression processing for the currently collected operating index data and the historically collected operating index data, which can retain detailed data, avoid data loss and distortion caused by excessive compression, and also avoid the problem of excessive data volume. This provides a guarantee for accurate and comprehensive acquisition of relevant data in subsequent data queries.
[0101] Another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the following method steps are implemented:
[0102] Step 1: Obtain a number of operating index data corresponding to each device at each collection time; each operating index data is associated with a device identifier and a collection time;
[0103] Step 2: Based on the collection time and current time of each operation index data, a hierarchical compression method is used to compress each operation index data to obtain a plurality of index compression packages, and each index compression package, the corresponding device identification and the collection time range are associated and stored in a predetermined storage location;
[0104] Step three, responding to a query request generated based on a user's query operation, obtaining a plurality of target indicator compressed packages of the target device within the query time from the predetermined storage location based at least on the device identification of the target device in the query request and the query time.
[0105] The specific implementation process of the above method steps can refer to the embodiments of any of the above data query methods, and this embodiment will not be repeated here.
[0106] In this application, by collecting the operating index data of each device in real time, and then using different compression methods and hierarchical compression processing for the currently collected operating index data and the historically collected operating index data, detailed data can be retained, avoiding data loss and distortion caused by excessive compression, and also avoiding the problem of excessive data volume. This provides a guarantee for accurate and comprehensive acquisition of relevant data in subsequent data queries.
[0107] Another embodiment of the present application provides an electronic device, such as Figure 3 As shown, at least a memory 1 and a processor 2 are included, the memory 1 stores a computer program, and the processor 2 implements the following method steps when executing the computer program on the memory 1:
[0108] Step 1: Obtain a number of operating index data corresponding to each device at each collection time; each operating index data is associated with a device identifier and a collection time;
[0109] Step 2: Based on the collection time and current time of each operation index data, a hierarchical compression method is used to compress each operation index data to obtain a plurality of index compression packages, and each index compression package, the corresponding device identification and the collection time range are associated and stored in a predetermined storage location;
[0110] Step three, responding to a query request generated based on a user's query operation, obtaining a plurality of target indicator compressed packages of the target device within the query time from the predetermined storage location based at least on the device identification of the target device in the query request and the query time.
[0111] The specific implementation process of the above method steps can refer to the embodiments of any of the above data query methods, and this embodiment will not be repeated here.
[0112] In this application, by collecting the operating index data of each device in real time, and then using different compression methods and hierarchical compression processing for the currently collected operating index data and the historically collected operating index data, detailed data can be retained, avoiding data loss and distortion caused by excessive compression, and also avoiding the problem of excessive data volume. This provides a guarantee for accurate and comprehensive acquisition of relevant data in subsequent data queries.
[0113] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A data query method, characterized in that: include: Obtaining a number of operating indicator data corresponding to each device at each collection time; each operating indicator data is associated with a device identifier and a collection time; Based on the collection time of each operating indicator data and the current time in real time, a hierarchical compression method is used to compress each operating indicator data to obtain a number of indicator compression packages, and each indicator compression package, the corresponding device identification and the collection time range are associated and stored in a predetermined storage location; In response to a query request generated based on a user's query operation, a plurality of target indicator compressed packages of the target device within the query time are obtained from the predetermined storage location based at least on a device identifier of the target device in the query request and the query time.
2. The method according to claim 1, characterized in that The obtaining of several operating indicator data corresponding to each device during each collection time includes: Collect the operating data of several devices in real time to obtain several original operating index data corresponding to each device at each collection time; The original operation index data are converted to obtain operation index data corresponding to the original operation index data.
3. The method according to claim 2, characterized in that The converting process of each of the original operation index data to obtain the operation index data corresponding to each of the original operation index data specifically includes: Based on the indicator type of each original operation indicator data, determine the target processing method corresponding to the indicator type; Based on the target processing method, the corresponding original operation index data are converted to obtain the operation index data corresponding to each original operation index data.
4. The method according to claim 1, characterized in that Based on the collection time of each operating indicator data and the current time, a hierarchical compression method is used to compress each operating indicator data to obtain several indicator compression packages, including: Determine the compression level corresponding to each operation indicator data based on the collection time of each operation indicator data and the current time; Based on the compression level of each operating indicator data, compression processing is performed using a compression method corresponding to the compression level to obtain a number of indicator compression packages.
5. The method according to claim 4, characterized in that The step of determining the compression level corresponding to each operation indicator data based on the collection time of each operation indicator data and the current time includes: In a case where the collection time of the operation index data is the current time, determining the compression level of the operation index data to be the first compression level; When the collection time of the operation index data is earlier than the current time and the time difference between the collection time and the current time is less than the first predetermined time threshold, determining the compression level of the operation index data to be the second compression level; When the collection time of the operation index data is earlier than the current time, and the time difference between the collection time and the current time is greater than or equal to the first predetermined time threshold, the compression level of the operation index data is determined to be the third compression level.
6. The method according to claim 4, characterized in that Each of the compression modes includes a compression period; The compression method corresponding to the compression level is used to perform compression processing based on the compression level of each operation indicator data to obtain a plurality of indicator compression packages, specifically including: Based on the operation index data corresponding to the same compression level, the operation index data are grouped using the compression period in the compression method to obtain a data set corresponding to each compression period; Each of the data sets is compressed respectively to obtain a plurality of index compression packages.
7. The method according to claim 5, characterized in that The method further comprises: Delete in real time the various operating indicator data after compression processing using the compression method corresponding to the third compression level.
8. The method according to claim 6, characterized in that After obtaining the data sets corresponding to each compression period, the method further includes: Acquire feature data in each of the data sets; After obtaining the index compression package, the method further includes: The characteristic data obtained based on the data set is associated with the corresponding indicator compression package and stored, so that when the target indicator compression package is queried, the characteristic data associated with the target indicator compression package is obtained.
9. A data query device, characterized in that: include: The acquisition module is used to obtain a number of operating indicator data corresponding to each device during each collection time; Each operating indicator data is associated with the equipment identification and collection time; A compression module is used to compress each operating indicator data in real time based on the collection time of each operating indicator data and the current time, adopt a hierarchical compression method, obtain a number of indicator compression packages, and associate each of the indicator compression packages, the corresponding device identification and the collection time range to store in a predetermined storage location; The query module is used to respond to the query request generated based on the user's query operation, so as to obtain several target indicator compressed packages of the target device within the query time from the predetermined storage location based on at least the device identification of the target device in the query request and the query time.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data query method according to any one of claims 1 to 8 are implemented.
