Method for dynamically extracting time series index data, electronic device and storage medium

By presetting buried points and dynamic extraction rules in log data, efficient extraction and analysis of massive log data is achieved, solving the problems of high hardware cost and statistical complexity, and achieving flexible business adaptation and low-cost storage.

CN113568967BActive Publication Date: 2024-10-11ZHANGYUE TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202110866426.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-29
Publication Date
2024-10-11
Estimated Expiration
2041-07-29

AI Technical Summary

Technical Problem

The existing technology requires a large number of servers when analyzing massive log data, the hardware cost is high, and the formats of log data generated by different businesses are different, resulting in increased complexity of statistical processing.

Method used

By presetting the buried points in the log data and confirming the indicator extraction rules dynamically issued by the server based on the buried points, the time series indicator data is dynamically extracted and converted into structured data for easy analysis and storage.

Benefits of technology

It simplifies data storage costs and reduces hardware costs. Dynamic extraction rules can quickly adapt to different log data formats and flexibly meet business needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113568967B_ABST
    Figure CN113568967B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for dynamically extracting time series indicator data, an electronic device and a storage medium. The method includes: reading at least one log data stored in a queue, wherein a tracking point is preset for at least one log data; based on the tracking point, confirming whether at least one indicator extraction rule dynamically issued by a server is received; if so, converting and extracting at least one log data according to at least one indicator extraction rule to obtain time series indicator data. Rapid extraction based on the dynamically issued indicator extraction rules to obtain time series indicator data greatly simplifies data storage costs, and is also convenient for analysis based on time series indicator data, without the need for a large amount of server hardware support, thereby reducing hardware costs. On the other hand, the indicator extraction rules are dynamically issued, which can quickly adapt to different log data and flexibly meet business needs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a method for dynamically extracting time series indicator data, an electronic device and a storage medium. Background Art

[0002] The log records the user's access operations to various services, the change processing of business data, etc. By conducting statistical analysis on the log, you can intuitively and quickly understand the user's demand for the service, business access statistics and other data, so as to make timely adjustments to the service based on statistical analysis.

[0003] When analyzing massive log data, the existing technology generally uses a large number of servers as computing support, which has high hardware costs. Furthermore, the log data generated by different businesses has different formats, and different statistical processing methods need to be used for different formats when performing statistical processing, which increases the complexity of statistical processing. Summary of the invention

[0004] In view of the above problems, the present invention is proposed to provide a method for dynamically extracting time series indicator data, an electronic device and a storage medium that overcome the above problems or at least partially solve the above problems.

[0005] According to one aspect of the present invention, a method for dynamically extracting time series indicator data is provided, comprising:

[0006] Read at least one piece of log data stored in the queue, wherein a tracking point is preset for the at least one piece of log data;

[0007] Based on the tracking point, confirm whether at least one indicator extraction rule dynamically sent by the server is received;

[0008] If so, at least one log data is converted and extracted to obtain time series indicator data according to at least one indicator extraction rule.

[0009] According to another aspect of the present invention, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0010] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the following operations:

[0011] Read at least one piece of log data stored in the queue, wherein a tracking point is preset for the at least one piece of log data;

[0012] Based on the tracking point, confirm whether at least one indicator extraction rule dynamically sent by the server is received;

[0013] If so, at least one log data is converted and extracted to obtain time series indicator data according to at least one indicator extraction rule.

[0014] According to another aspect of the present invention, a computer storage medium is provided, in which at least one executable instruction is stored, and the executable instruction enables a processor to execute operations corresponding to any of the above-mentioned methods for dynamically extracting timing indicator data.

[0015] According to the method, electronic device and storage medium for dynamically extracting time series indicator data provided by the present invention, time series indicator data can be quickly extracted based on the dynamically issued indicator extraction rules. On the one hand, the data storage cost is greatly simplified, and it is also convenient to analyze based on the time series indicator data without the need for a large amount of server hardware support, thereby reducing hardware costs. On the other hand, the indicator extraction rules are dynamically issued, which can quickly adapt to different log data and flexibly meet business needs.

[0016] 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

[0017] 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:

[0018] Figure 1 A schematic diagram showing a flow chart of a method for dynamically extracting time series indicator data according to an embodiment of the present invention is shown;

[0019] Figure 2 A schematic diagram showing a flow chart of a method for dynamically extracting time series indicator data according to another embodiment of the present invention;

[0020] Figure 3 A schematic structural diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0021] It should be noted that currently, some data analysis engines on the market (such as Hadoop, etc.) support visual analysis of data, but these data need to be structured data and cannot be applied to scattered and differentiated streaming data.

[0022] Embodiment 1

[0023] Figure 1FIG. 4 shows a flow chart of a method for dynamically extracting time series indicator data according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0024] It should be noted that the execution subject of the method of the embodiment of the present application can be a server, which can realize the dynamic extraction of time series indicator data by converting, extracting and analyzing the log data in each business database. Here, the business database stores various user data generated by various servers in the process of providing business services to users.

[0025] In addition, time series indicator data facilitates data statistics from the time dimension, converting streaming data into structured data, which can be directly parsed by the data analysis engine, for example, called by the visualization engine for visualization analysis, etc., to provide operation and maintenance personnel with a more intuitive data reference.

[0026] Step S101, reading at least one log data stored in a queue.

[0027] Log data is used to record user access, business processing and other data. Different log data corresponds to different recording objects. Due to the different codes, interfaces and business requirements used in recording, the final log data contains multiple different types of streaming data. When performing statistics, it is necessary to perform targeted statistics on different types of streaming data, which makes it difficult to directly perform statistics on log data.

[0028] Based on the above problems, this embodiment processes the log data stored in the queue so as to dynamically extract the time series indicator data. The log data in the queue can be obtained from multiple different databases. The types of different databases can be the same or different, and the types of log data in different databases can be the same or different. The log data contained in at least one database is converged into the corresponding queue, such as converging the log data of one or more databases of the same database type into one queue, so that the queue can analyze and convert it later to generate structured and easy-to-store data, thereby reducing storage space. The queue can adopt a kafka queue, and when reading at least one log data stored in the queue, at least one log data can be pre-buried. The buried point can be set in the queue to facilitate the processing of the log data when reading.

[0029] Step S102, based on the tracking point, confirm whether at least one indicator extraction rule dynamically sent by the server is received.

[0030] Based on the tracking point, it is determined whether at least one indicator extraction rule dynamically issued by the server has been received. Specifically, when setting the tracking point, an empty function is set in the tracking point. After receiving the indicator extraction rule dynamically issued by the server, the tracking point is re-embedded, and step S103 is executed to trigger the execution of the tracking point to realize extraction according to the indicator extraction rule.

[0031] In an optional embodiment, at least one indicator extraction rule is sent by the server and stored in a designated database, such as a zookeeper database. Based on the watch mechanism of the zookeeper database, when the server dynamically sends new indicator extraction rules, or dynamically sends modified indicator extraction rules, etc., zookeeper can monitor the changes in the indicator extraction rules, and notify the tracking points of the queue accordingly, to determine that the designated database has received at least one indicator extraction rule dynamically sent by the server, and to perform built-in tracking points on the indicator extraction rules so as to call the tracking points and extract data according to the indicator extraction rules.

[0032] In this embodiment, the indicator extraction rules are dynamically issued by the server, so that the indicator extraction rules can be dynamically adjusted according to different business needs at different times. When issuing, one or more indicator extraction rules can be issued according to needs to adapt to different needs and be more flexible. Specifically, when extracting log data in the read queue, this embodiment does not need to write multiple indicator extraction rules required for log data in the code in advance, and does not need to consider in advance that the indicator extraction rules will fully cover all log data, and can flexibly respond to different log data. Furthermore, if the type of log data in the queue changes, the modified indicator extraction rules can be dynamically issued, which is easy to modify and does not require modification of other codes, etc. It can quickly adapt to various log data, and has strong applicability and extensibility.

[0033] Step S103: According to at least one indicator extraction rule, at least one log data is converted and extracted to obtain time series indicator data.

[0034] In the process of converting at least one log data, customized conversion is performed for different streaming data structures to unify the data format and facilitate subsequent parsing and extraction. The converted time series data is extracted according to at least one indicator extraction rule dynamically issued, and the time series indicator data is obtained. The time series indicator data is more convenient to be counted from the time dimension, and the statistical information of the time dimension is obtained, so as to quickly discover the abnormalities generated in the time dimension.

[0035] Furthermore, compared with various types of log data, the storage of time series indicator data can use different compression algorithms, which greatly saves storage space costs.

[0036] According to the method for dynamically extracting time series indicator data provided by the present invention, time series indicator data is quickly extracted based on the dynamically issued indicator extraction rules. On the one hand, the data storage cost is greatly simplified, and it is also convenient to analyze based on the time series indicator data without a large amount of server hardware support, thereby reducing hardware costs. On the other hand, the indicator extraction rules are dynamically issued, which can quickly adapt to different log data and flexibly meet business needs.

[0037] Embodiment 2

[0038] Figure 2 FIG. 4 is a flow chart showing a method for dynamically extracting time series indicator data according to another embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:

[0039] Step S201, reading at least one piece of log data stored in the queue.

[0040] Step S202, based on the tracking point, confirm whether at least one indicator extraction rule dynamically sent by the server is received.

[0041] The above steps refer to the description of steps S101-S102 of the first embodiment, and will not be repeated here.

[0042] Step S203: Analyze and convert at least one piece of log data to obtain corresponding time series data.

[0043] Create customized analysis conversion rules for log data based on different data structures. Log data is streaming data containing different data types. You can specify its conversion into corresponding structured data based on different data structures in streaming data. Time series data is structured data and can be represented in json format. According to customized analysis conversion rules, log data is converted into time series data in a specified format.

[0044] Step S204: extracting time series indicator data according to at least one indicator extraction rule.

[0045] After the indicator extraction rules are dynamically issued, at least one indicator extraction rule is parsed, and the corresponding time series data model can be obtained based on the indicator extraction rules. The tracking points corresponding to the time series data model have been pre-built into the parsing process of the indicator extraction rules, that is, an empty function is pre-set in the tracking points, and the time series data model is built into the tracking points during the parsing process. Through the issued indicator extraction rules, based on the time series data model built into the tracking points, the time series data is dynamically compared with the indicator extraction rules, such as by using regular expressions, etc., to extract indicator data that meets the indicator extraction rules from the time series data; if the comparison result does not meet the requirements, the time series data is skipped and not extracted. The time series data model is used to define time series indicators of a specified type, including statistical type time series indicators, state type time series indicators, range type time series indicators, etc., and the time series data that meets the indicator extraction rules is extracted based on the above time series data model to obtain time series indicator data.

[0046] The indicator extraction rules dynamically issued are as follows: {"rule":"PHP","order":1,"method":"xx_method","alias":"alias1","domain":"xxx.http","action":"keep","kind":"transaction"}. The indicator extraction rules include at least one of the following, such as specifying the method to be executed, specifying the scope of the method, recording method, specifying type conversion, sorting method, convergence dimension, etc. rule is the name of the rule, order specifies the sorting method, method specifies the method to be executed, and method is a dynamically variable method. Different methods are set according to the implementation requirements to extract time series indicator data. domain specifies the scope of the method method, action is the recording method, such as keep keeps the original data for recording. action can also set the corresponding recording method according to specific requirements to record related data, which will not be explained here. kind specifies the data type conversion. When it meets the specified type, it is converted. alias specifies the alias for the data. When multiple different time series data that meet the rules are assigned the same alias according to the requirements, the time series data is reduced in dimension and converged to obtain low-dimensional time series data, which is convenient for storage and statistical analysis. For example, if the URL addresses visited by users vary, take user registration as an example. The URL addresses visited by different users during registration will be different for different users. For example, the URL address of user 1 is http: / / xxxxxxxx.xx.com&useid=1, and the URL address of user 2 is http: / / xxxxxxxx.xx.com&useid=2. Although the URL addresses are different overall, they have some of the same content, such as the content before useid, indicating that both users are registering and accessing. The time series data can be reduced and converged to the registration access dimension by specifying an alias, so as to convert non-sparse data into sparse data, which is convenient for statistics, such as the number of registration behaviors and the time point of occurrence. Furthermore, data with the same alias can be associated and analyzed, and the characteristics of the time series data can be reused, so that the data can be combined from the time series for more accurate analysis. The above is an example. The specific indicator extraction rules are set according to the implementation situation, which is not limited here.

[0047] Time series indicator data include cumulative indicators, counting indicators, distribution indicators, etc. Different time series indicator data can be set according to the specific implementation situation to count events that occur within a time point, fluctuations of events at different time points, etc.

[0048] Step S205: store the converted time series data in a column storage database.

[0049] The converted time series data can be stored in a column storage database. Time series data is structured data, such as expressed in json format. The field of the time series data corresponding to any json field corresponds to the wide table of the column storage database. The column storage database can be a clickhouse database. Time series data is the data obtained after the log data is converted. It corresponds to the log data, which is convenient for finding the corresponding data from the column storage database for review when there are abnormalities in statistics or data does not correspond. Converting log data to time series data for storage can greatly reduce the amount of data storage. For example, the original log data is about tens of billions of data, and the time series data obtained after conversion is tens of thousands or hundreds of thousands of data, which greatly reduces the storage space occupied by the database, and is also convenient for analysis based on time series data, reducing the hardware cost required for analysis, etc.

[0050] In an optional embodiment, the converted time series data is compressed and stored to reduce storage space. Compressed storage can be performed based on a bitmap model, where bit is the smallest unit of data storage, which can greatly reduce storage space. Through compressed storage, non-sparse data can be converted into sparse data, which is convenient for compressed storage and subsequent query statistics by dimension.

[0051] In an optional embodiment, an index can also be created based on the bitmap in the time dimension to facilitate searching for data in the column storage database. Specifically, the data in the column storage database can be mapped to a specified range of numeric types through a mapping algorithm, such as func(data)=>int. The specific mapping rules can be set according to the actual situation and are not limited here. Lock the time dimension to create an index, such as creating an index in units of days, such as the index name YYYY-MM-DD-indexName, and generate an index value every minute. There are 1440 minutes in a day, and the bitmap length is 1440 in total. The number of bitmaps is the number of func(data) mappings, that is, the value range of int is determined, which is convenient for using time as an index to query the data corresponding to the mapping in the column storage database, thereby speeding up the search speed.

[0052] Furthermore, the bitmap model can also use two-dimensional data for calculations, such as using the time dimension as one dimension and different data types as another corresponding dimension. The value of the intersection of the two dimensions is 0 or 1, where 0 and 1 are used to mark whether the data of this type appears in the specified time range. Different calculations can also be performed based on the two-dimensional data, such as OR operations, AND operations, intersection operations, difference operations, and remainder operations, etc., which can quickly obtain calculation results and perform statistics. Using 0 and 1 to perform operations in accordance with computer calculation principles can perform calculations in memory, reduce calculation complexity, and make calculations faster and more efficient.

[0053] Step S206: Use a cardinality statistical algorithm to perform deduplication processing on the time series data according to a specified dimension, so as to extract time series indicator data based on the deduplication time series data.

[0054] This step is optional. When it is necessary to count the time series data and determine the number of statistics, when the amount of data is large, it is allowed to count it within the specified error range. You can consider using the cardinality statistics algorithm to deduplicate the time series data. For example, when it is necessary to extract the statistical time series indicator data of the access user, when the user cardinality is large, for multiple access requests made by the same user at different time points, when it is necessary to deduplicate multiple access requests of the same user, you can use the cardinality statistics algorithm, such as hyperloglog, to quickly deduplicate, reduce memory resource usage, and achieve dynamic statistics at a faster speed. Hyperloglog is an algorithm that approximates the number of deduplicated elements. It maintains multiple buckets such as 16384 buckets to record the number of elements in each bucket. When an element (equivalent to the data to be deduplicated) is obtained, it is hashed to one of the buckets. For each element, the element is hashed to one of the small sets for storage through the hash algorithm. The same element will always be hashed to the same small set, and the total count is the sum of the sizes of all small sets. In addition to increasing elements, using hyperloglog to accurately count can also reduce elements. Thus, the space actually occupied by a hyperloglog is about 16384*6bit / 8=12k bytes. However, when the count is small, the count values ​​of most buckets are zero, so if most of the bytes in 12k bytes are zero, the occupied space can be appropriately saved.

[0055] Furthermore, if the count value is relatively small, Redis can use sparse storage, which occupies much less than 12k bytes. When the count becomes larger, dense storage is used, which is relatively sparse storage. Dense storage will occupy a constant 12k bytes to ensure that less memory resources are occupied.

[0056] When used specifically, deduplication is performed according to the specified dimensions based on the specific business of the time series data and time series indicator data, and there is no limitation here.

[0057] Step S207: periodically sending and storing the time series indicator data to a time series database, so that the time series database can be called by a visualization engine to display corresponding visualization analysis results.

[0058] The extracted time series indicator data is sent to the time series database periodically, such as by minute or hour, to facilitate statistical analysis of the time series indicator data. Statistical analysis is performed based on the time dimension, and the sending time can be used as the time dimension.

[0059] By statistically analyzing the time series indicator data, we can obtain information about normal or abnormal business execution. When the business is abnormal, we can analyze the abnormal start time, end time, abnormal proportion, abnormal error type, etc. based on the time series indicator data to achieve abnormal operation and maintenance monitoring and management in the time series dimension.

[0060] In order to help management users (such as operation and maintenance personnel, business personnel, etc.) understand time series data more clearly and intuitively, visualization can be achieved based on time series data. By querying the time series database, data can be obtained according to specified dimensions (for example, quantity dimension, status dimension, etc.) and displayed in the visualization panel, so that visualization results can be viewed intuitively, such as in the form of a bar chart.

[0061] Through this embodiment, the streaming data is converted into time series data, the data is collected in real time and the time series indicators are calculated in real time, and periodic merging is performed after the calculation is completed. This can reduce the visualization deployment cost, quickly realize data visualization and solve most (for example, more than 80%) indicator extraction rules.

[0062] According to the method for dynamically extracting time series indicator data provided by the present invention, streaming data can be quickly analyzed and converted into time series data, which simplifies storage costs. It can also be compressed and stored based on time series data, and massive data can be analyzed with a smaller amount of data. Dynamically and quickly issuing indicator extraction rules can quickly respond to the variability of business models, reduce the development cycle of new statistical analysis requirements, and improve processing efficiency. Furthermore, statistical analysis is performed based on the time dimension, and a visualization panel is provided, which can help management users intuitively and quickly discover abnormal fluctuations in the time dimension and perform maintenance management in a timely manner.

[0063] Embodiment 3

[0064] Embodiment 3 of the present application provides a non-volatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the method for dynamically extracting timing indicator data in any of the above method embodiments.

[0065] The executable instructions can be specifically used to enable the processor to perform the following operations: read at least one log data stored in the queue, wherein a tracking point is preset for at least one log data; based on the tracking point, confirm whether at least one indicator extraction rule dynamically issued by the server is received; if so, according to at least one indicator extraction rule, convert at least one log data and extract time series indicator data.

[0066] In an optional implementation, at least one indicator extraction rule is sent by the server and stored in a designated database; the executable instructions further cause the processor to perform the following operations: based on the embedding point, determine whether the designated database has received at least one indicator extraction rule dynamically sent by the server.

[0067] In an optional embodiment, the executable instructions further cause the processor to perform the following operations: analyze and convert at least one log data to obtain corresponding time series data; parse at least one indicator extraction rule, and embed at least one time series data model corresponding to the indicator extraction rule in the tracking point; the time series data model is used to define a specified type of time series indicator; according to the time series data model, according to at least one indicator extraction rule, the time series data is extracted to obtain time series indicator data; the indicator extraction rule includes at least one of the following: specifying the method to be executed, specifying the scope of the method, the recording method, specifying the type conversion, the sorting method, and the convergence dimension.

[0068] In an optional embodiment, the executable instructions further cause the processor to perform the following operations: create customized analysis conversion rules based on the data structure of the log data; convert the log data into time series data in a specified format based on the customized analysis conversion rules; wherein the time series data is structured data and is represented in json format.

[0069] In an optional implementation, the executable instructions further cause the processor to perform the following operations: storing the converted time series data in a column storage database; wherein the fields of the time series data correspond one-to-one to the wide table of the column storage database.

[0070] In an optional embodiment, the executable instructions further cause the processor to perform the following operations: based on a bitmap model, compress the converted time series data; wherein the bitmap model creates an index based on the time dimension; and store the compressed time series data in a column storage database.

[0071] In an optional embodiment, the executable instructions further cause the processor to perform the following operations: use a cardinality statistical algorithm to deduplicate the time series data according to a specified dimension, so as to extract time series indicator data based on the deduplicated time series data.

[0072] In an optional implementation, the executable instructions further cause the processor to perform the following operations: periodically send and store the time series indicator data to a time series database, so that the time series database can be called by the visualization engine to display corresponding visualization analysis results.

[0073] In an optional implementation, the executable instructions further cause the processor to perform the following operations: converge the log data contained in at least one database into a corresponding queue; the log data is streaming data containing multiple different types.

[0074] Embodiment 4

[0075] Figure 3 A schematic structural diagram of an electronic device according to a fourth embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.

[0076] like Figure 3 As shown, the electronic device may include: a processor (processor) 302 , a communication interface (Communications Interface) 304 , a memory (memory) 306 , and a communication bus 308 .

[0077] in:

[0078] The processor 302 , the communication interface 304 , and the memory 306 communicate with each other via the communication bus 308 .

[0079] The communication interface 304 is used to communicate with other devices such as clients or other servers.

[0080] The processor 302 is used to execute the program 310, and specifically can execute the relevant steps in the above-mentioned embodiment of the method for dynamically extracting time series indicator data.

[0081] Specifically, the program 310 may include program codes, which include computer operation instructions.

[0082] The processor 302 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the server may be processors of the same type, such as one or more CPUs, or processors of different types, such as one or more CPUs and one or more ASICs.

[0083] The memory 306 is used to store the program 310. The memory 306 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0084] Program 310 can be specifically used to enable the processor 302 to perform the following operations: read at least one log data stored in the queue, wherein a tracking point is preset for at least one log data; based on the tracking point, confirm whether at least one indicator extraction rule dynamically issued by the server is received; if so, according to at least one indicator extraction rule, convert at least one log data and extract time series indicator data.

[0085] In an optional implementation, at least one indicator extraction rule is sent by the server and stored in a designated database; program 310 is used to enable the processor 302 to determine whether the designated database has received at least one indicator extraction rule dynamically sent by the server based on the embedding point.

[0086] In an optional embodiment, the program 310 is used to enable the processor 302 to analyze and convert at least one log data to obtain corresponding time series data; parse at least one indicator extraction rule, and embed at least one time series data model corresponding to the indicator extraction rule in the tracking point; the time series data model is used to define a specified type of time series indicator; according to the time series data model, according to at least one indicator extraction rule, the time series data is extracted to obtain time series indicator data; the indicator extraction rule includes at least one of the following: specifying the method to be executed, specifying the scope of the method, the recording method, specifying the type conversion, the sorting method, and the convergence dimension.

[0087] In an optional embodiment, program 310 is used to enable processor 302 to create customized analysis conversion rules based on the data structure of log data; according to the customized analysis conversion rules, the log data is converted into time series data in a specified format; wherein the time series data is structured data and is represented in json format.

[0088] In an optional implementation, the program 310 is used to enable the processor 302 to store the converted time series data in a column storage database; wherein the fields of the time series data correspond one-to-one to the wide table of the column storage database.

[0089] In an optional implementation, the program 310 is used to enable the processor 302 to compress the converted time series data based on a bitmap model; wherein the bitmap model creates an index based on the time dimension; and the compressed time series data is stored in a column storage database.

[0090] In an optional implementation, the program 310 is used to enable the processor 302 to use a cardinality statistical algorithm to perform deduplication processing on the time series data according to a specified dimension, so as to extract time series indicator data based on the deduplication time series data.

[0091] In an optional implementation, the program 310 is used to enable the processor 302 to periodically send and store the time series indicator data to the time series database, so that the time series database can be called by the visualization engine to display the corresponding visualization analysis results.

[0092] In an optional implementation, the program 310 is used to enable the processor 302 to converge the log data contained in at least one database into a corresponding queue; the log data is streaming data containing multiple different types.

[0093] The specific implementation of each step in program 310 can refer to the corresponding description of the corresponding steps in the above-mentioned embodiment of dynamic extraction of time series indicator data, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above-mentioned method embodiment, which will not be repeated here.

[0094] Through the solution provided by this embodiment, the time series indicator data can be quickly extracted based on the dynamically issued indicator extraction rules. On the one hand, the data storage cost is greatly simplified, and it is also convenient to analyze based on the time series indicator data without a large amount of server hardware support, thus reducing the hardware cost. On the other hand, the indicator extraction rules are dynamically issued, which can quickly adapt to different log data and flexibly meet business needs.

[0095] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0096] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those expressly recited in each claim. Rather, as reflected in the claims, inventive aspects lie in less than all of the features of the individual embodiments previously disclosed. Therefore, the claims that follow the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the present invention.

[0097] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0098] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims, any one of the claimed embodiments may be used in any combination.

[0099] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets should not be constructed as a limitation to the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention can be implemented by means of hardware including a number of different elements and by means of a suitably programmed computer. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.

Claims

1. A method for dynamically extracting time series indicator data, comprising: Read at least one piece of log data stored in the queue, wherein a tracking point is preset for the at least one piece of log data; Based on the tracking point, confirm whether at least one indicator extraction rule dynamically sent by the server is received; If so, convert the at least one log data and extract the time series indicator data according to the at least one indicator extraction rule; The converting the at least one log data and extracting the time series indicator data according to the at least one indicator extraction rule further includes: Analyze and convert the at least one piece of log data to obtain corresponding time series data; Parsing the at least one indicator extraction rule, and embedding a time series data model corresponding to the at least one indicator extraction rule in the tracking point; the time series data model is used to define a time series indicator of a specified type; According to the time series data model, the time series data is extracted according to the at least one indicator extraction rule to obtain time series indicator data; the indicator extraction rule includes at least one of the following: specifying the method to be executed, specifying the scope of the method, the recording method, specifying type conversion, sorting method, and convergence dimension.

2. The method according to claim 1, wherein: The at least one indicator extraction rule is sent by the server and stored in a designated database; Confirming based on the tracking point whether at least one indicator extraction rule dynamically issued by the server is received is specifically: determining based on the tracking point whether the designated database has received at least one indicator extraction rule dynamically issued by the server.

3. The method according to claim 1, wherein: The analyzing and converting the at least one log data to obtain corresponding time series data further includes: Create customized analysis and transformation rules based on the data structure of log data; According to the customized analysis conversion rules, the log data is converted into time series data in a specified format; wherein the time series data is structured data and is represented in json format.

4. The method according to claim 1, wherein: The method further comprises: The converted time series data is stored in a column storage database; wherein the fields of the time series data correspond one-to-one to the wide table of the column storage database.

5. The method according to claim 4, wherein: The storing the converted time series data into a column storage database further comprises: Based on the bitmap model, the converted time series data is compressed; wherein the bitmap model creates an index based on the time dimension; Store the compressed time series data in the column storage database.

6. The method according to any one of claims 1 to 5, wherein: The converting the at least one log data and extracting the time series indicator data according to the at least one indicator extraction rule further includes: The time series data is deduplicated according to a specified dimension using a cardinality statistical algorithm, so that time series indicator data can be extracted based on the deduplicated time series data.

7. The method according to any one of claims 1 to 5, wherein: After converting the at least one log data according to the at least one indicator extraction rule and extracting the time series indicator data, the method further includes: The time series indicator data is periodically sent and stored in a time series database, so that the time series database can be called by a visualization engine to display corresponding visualization analysis results.

8. The method according to claim 1, wherein: The method further comprises: The log data contained in at least one database is converged into a corresponding queue; the log data is streaming data containing multiple different types.

9. An electronic device, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the following operations: Read at least one piece of log data stored in the queue, wherein a tracking point is preset for the at least one piece of log data; Based on the tracking point, confirm whether at least one indicator extraction rule dynamically sent by the server is received; If so, convert the at least one log data and extract the time series indicator data according to the at least one indicator extraction rule; The converting the at least one log data and extracting the time series indicator data according to the at least one indicator extraction rule further includes: Analyze and convert the at least one piece of log data to obtain corresponding time series data; Parsing the at least one indicator extraction rule, and embedding a time series data model corresponding to the at least one indicator extraction rule in the tracking point; the time series data model is used to define a time series indicator of a specified type; According to the time series data model, the time series data is extracted according to the at least one indicator extraction rule to obtain time series indicator data; the indicator extraction rule includes at least one of the following: specifying the method to be executed, specifying the scope of the method, the recording method, specifying type conversion, sorting method, and convergence dimension.

10. The electronic device according to claim 9, wherein the at least one indicator extraction rule is sent by the server and stored in a designated database; The executable instructions further cause the processor to perform the following operations: Based on the tracking point, it is determined whether the designated database has received at least one indicator extraction rule dynamically issued by the server.

11. The electronic device according to claim 9, wherein the executable instructions further cause the processor to perform the following operations: Create customized analysis and transformation rules based on the data structure of log data; According to the customized analysis conversion rules, the log data is converted into time series data in a specified format; wherein, The time series data is structured data and is represented in JSON format.

12. The electronic device according to claim 9, wherein the executable instructions further cause the processor to perform the following operations: The converted time series data is stored in a column storage database; wherein, The fields of the time series data correspond one-to-one to the wide table of the column storage database.

13. The electronic device according to claim 12, wherein the executable instructions further cause the processor to perform the following operations: Based on the bitmap model, the converted time series data is compressed; The bitmap model creates an index based on the time dimension; Store the compressed time series data in the column storage database.

14. The electronic device according to any one of claims 9 to 13, wherein the executable instructions further cause the processor to perform the following operations: The time series data is deduplicated according to a specified dimension using a cardinality statistical algorithm, so that time series indicator data can be extracted based on the deduplicated time series data.

15. The electronic device according to any one of claims 9 to 13, wherein the executable instructions further cause the processor to perform the following operations: The time series indicator data is periodically sent and stored in a time series database, so that the time series database can be called by a visualization engine to display corresponding visualization analysis results.

16. The electronic device according to claim 9, wherein the executable instructions further cause the processor to perform the following operations: The log data contained in at least one database is converged into a corresponding queue; the log data is streaming data containing multiple different types.

17. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and wherein the executable instruction enables a processor to execute operations corresponding to the method for dynamically extracting time series indicator data according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Log analysis method based on elastic component

    CN107273267A

  • Abnormity handling method and system based on log analysis, terminal and medium

    CN111221702A

  • Data processing method and device, electronic equipment and computer readable storage medium

    CN111796993A

  • Log monitoring method and device and server

    CN112506743A

  • Log storage optimization

    US20170075932A1