Business data monitoring method, rule data generation method, device and system
By configuring business indicators and statistical dimensions in the alarm platform, generating monitoring rule data, and using business flow data and hot storage databases for real-time monitoring and analysis, the existing technology solves the problem of being unable to achieve real-time monitoring and putting pressure on the data acceleration layer. Improved real-time performance and efficiency of monitoring.
Patent Information
- Application Number
- CN202011492921.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-17
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-12-17
AI Technical Summary
Existing multi-dimensional combined business indicator monitoring methods cannot achieve real-time monitoring, and put great pressure on the data acceleration layer, especially when there are too many monitoring indicators.
By configuring business indicators and statistical dimensions in the alarm platform, monitoring rule data is generated, and real-time monitoring and analysis is performed based on statistical frequency and alarm policies, and business flow data and hot storage databases are used to reduce dependence on the data acceleration layer.
It realizes real-time monitoring of business data, reduces the pressure on the data acceleration layer, and improves the real-time and efficiency of monitoring.
Smart Images

Figure CN112463543B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data analysis technology, and in particular to a method, device and system for monitoring business data. Background Art
[0002] In the existing technology of multi-dimensional business indicator monitoring, each business indicator has its own statistical dimension, and the monitoring of business indicators is based on these dimensions. In the existing technology, for business indicators under multi-dimensional combination, most of them use OLAP system, and its main method is to drop the real-time business data to the data acceleration layer, such as: Druid, PostGreSQL or ClickHouse, and then combine the business indicators and their corresponding dimensions based on the data acceleration layer, and poll the business data regularly according to the combined business indicator dimensions, and then compare with the pre-set threshold conditions for early warning monitoring. The defects of the above monitoring method are: it is impossible to realize real-time monitoring of business data, and if there are too many monitored indicators, the pressure on the data acceleration layer is also relatively large. Summary of the invention
[0003] In order to solve the problems of the prior art, the embodiments of the present invention provide a method, device and system for monitoring business data. The technical solution is as follows:
[0004] In a first aspect, a method for monitoring business data is provided, the method comprising:
[0005] The service nodes in the cluster obtain the monitoring rule data based on the transmission mode of the monitoring rule data determined by the alarm platform, wherein the monitoring rule data includes: the service indicator pre-configured in the alarm platform and the statistical dimension corresponding to the service indicator;
[0006] Combining the business indicator with the corresponding statistical dimension to form an indicator combination;
[0007] Receive business flow data in real time and obtain business data;
[0008] The business data is counted according to the indicator combination, and the business data is monitored and analyzed.
[0009] Furthermore, the monitoring rule data also includes: pre-configured statistical frequency, alarm strategy, alarm mode, and statistical sliding window;
[0010] The statistically analyzing the business data according to the indicator combination and monitoring and analyzing the business data include:
[0011] The business data is counted according to the indicator combination, the business data is monitored and analyzed according to the statistical frequency and the statistical sliding window, and it is determined whether the business data is abnormal according to the alarm strategy. If there is an abnormality, an alarm message is issued according to the alarm method.
[0012] Furthermore, the dividing the business data according to the indicator combination and monitoring and analyzing the business data include:
[0013] Acquire current business data corresponding to the indicator combination from the business flow data;
[0014] Acquire historical business data corresponding to the indicator combination from a database;
[0015] Monitoring and analysis are performed based on the current business data and the historical business data.
[0016] Furthermore, the service node in the cluster obtains the monitoring rule data based on the transmission mode of the monitoring rule data determined by the alarm platform, including:
[0017] Receiving rule flow data converted from monitoring rule data, wherein the monitoring rule data is generated by the alarm platform, and the rule flow data is generated by the flow data processing platform according to the conversion of the monitoring rule data;
[0018] The rule flow data is parsed to obtain the monitoring rule data.
[0019] Furthermore, the service node in the cluster obtains the monitoring rule data based on the transmission mode of the monitoring rule data determined by the alarm platform, including:
[0020] The monitoring rule data in the hot storage database is asynchronously queried, and the monitoring rule data is generated by the alarm platform and stored in the hot storage database.
[0021] Furthermore, the service node in the cluster obtains the monitoring rule data based on the transmission mode of the monitoring rule data determined by the alarm platform, including:
[0022] The monitoring rule data is loaded periodically, and the monitoring rule data is generated and stored by the alarm platform.
[0023] In a second aspect, a method for generating monitoring rule data is provided, the method comprising:
[0024] Acquire monitoring configuration data, the monitoring configuration data including: business indicators and statistical dimensions and statistical frequencies corresponding to the business indicators;
[0025] Generate monitoring rule data according to the monitoring configuration data;
[0026] The transmission method of the monitoring rule data is determined according to the statistical data demand and the statistical frequency corresponding to the business indicator.
[0027] Furthermore, the monitoring configuration data also includes statistical frequency, alarm strategy, alarm mode, and statistical sliding window corresponding to the business indicators.
[0028] Furthermore, when the statistical data demand and the statistical frequency of the business indicator meet the third threshold condition, the transmission mode of the monitoring rule data may be:
[0029] The monitoring rule data is sent to the stream data processing platform, so that the stream data processing platform converts the monitoring rule data into rule stream data.
[0030] Furthermore, when the statistical data demand and the statistical frequency of the business indicator meet the second threshold condition, the transmission mode of the monitoring rule data may be:
[0031] Store monitoring rule data in a hot storage database so that business nodes in the cluster can query it asynchronously.
[0032] Furthermore, when the statistical data demand and the statistical frequency of the business indicator meet the first threshold condition, the transmission mode of the monitoring rule data may be:
[0033] Store monitoring rule data locally or in Zookeeper.
[0034] In a third aspect, a device for monitoring business data is provided, the device comprising:
[0035] A rule data acquisition module is used for a service node in a cluster to acquire the monitoring rule data based on a transmission mode of the monitoring rule data determined by an alarm platform, wherein the monitoring rule data includes: the pre-configured service indicator and the statistical dimension corresponding to the service indicator;
[0036] A combination module, used to combine the business indicator and the corresponding statistical dimension to form an indicator combination;
[0037] A business data acquisition module is used to receive business flow data in real time and acquire business data;
[0038] The monitoring module is used to collect statistics on the business data according to the indicator combination and monitor and analyze the business data.
[0039] Furthermore, the monitoring rule data also includes: pre-configured statistical frequency, alarm strategy, alarm mode, and statistical sliding window;
[0040] The monitoring module is specifically used to count business data according to the indicator combination, monitor and analyze the business data according to the statistical frequency and statistical sliding window, and determine whether there are any abnormalities in the business data according to the alarm strategy. If there are any abnormalities, an alarm message is issued in an alarm manner.
[0041] Furthermore, the monitoring module is also specifically used for:
[0042] Obtaining current business data corresponding to the indicator combination from the business flow data;
[0043] Obtain historical business data corresponding to the indicator combination from the database;
[0044] Conduct monitoring and analysis based on current and historical business data.
[0045] Furthermore, the rule data acquisition module is specifically used for:
[0046] Receiving rule flow data converted from monitoring rule data, the monitoring rule data is generated by the alarm platform, and the rule flow data is generated by the flow data processing platform according to the conversion of the monitoring rule data;
[0047] Parse the rule flow data and obtain monitoring rule data.
[0048] Furthermore, the rule data acquisition module is specifically used for:
[0049] Asynchronously query the monitoring rule data in the hot storage database, where the monitoring rule data is generated by the alarm platform and stored in the hot storage database.
[0050] Furthermore, the rule data acquisition module is specifically used for:
[0051] The monitoring rule data is loaded regularly. The monitoring rule data is generated and stored by the alarm platform.
[0052] In a fourth aspect, a device for generating monitoring rule data is provided, the device comprising:
[0053] A configuration module is used to obtain monitoring configuration data, wherein the monitoring configuration data includes: business indicators and statistical dimensions and statistical frequencies corresponding to the business indicators;
[0054] A rule generation module, used to generate monitoring rule data according to the monitoring configuration data;
[0055] The transmission mode determination module is used to determine the transmission mode of the monitoring rule data according to the statistical data demand and the statistical frequency corresponding to the business indicator.
[0056] Furthermore, the monitoring configuration data also includes statistical frequency, alarm strategy, alarm mode, and statistical sliding window corresponding to the business indicators.
[0057] Furthermore, when the statistical data demand and the statistical frequency of the business indicator meet the third threshold condition, the transmission mode of the monitoring rule data may be:
[0058] The monitoring rule data is sent to the stream data processing platform, so that the stream data processing platform converts the monitoring rule data into rule stream data.
[0059] Furthermore, when the statistical data demand and the statistical frequency of the business indicator meet the second threshold condition, the transmission mode of the monitoring rule data may be:
[0060] Store monitoring rule data in a hot storage database so that business nodes in the cluster can query it asynchronously.
[0061] Furthermore, when the statistical data demand and the statistical frequency of the business indicator meet the first threshold condition, the transmission mode of the monitoring rule data may be:
[0062] Store monitoring rule data locally or in Zookeeper.
[0063] In a fifth aspect, a computer system is provided, comprising:
[0064] one or more processors; and
[0065] A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the method described in any one of the first aspects above.
[0066] The technical solution provided by the embodiment of the present invention has the following beneficial effects:
[0067] 1. The business data monitoring technical solution disclosed in the present invention can monitor the changes of monitoring rule data in real time, obtain business data by using business flow data, and monitor business data in real time. Compared with the existing technology, it does not need to rely too much on the data acceleration layer and improves the real-time performance of data monitoring.
[0068] 2. The technical solution for generating monitoring rule data disclosed in the present invention proposes three transmission methods for monitoring rule data according to the statistical dimensions and statistical frequencies corresponding to the business indicators. Among them, the transmission method of rule flow data and the transmission method of hot storage do not require polling the data acceleration layer, reducing the pressure on the data acceleration layer. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0070] Figure 1 is a flow chart of a method for monitoring business data provided by an embodiment of the present invention;
[0071] Figure 2 is a flow chart of a method for generating monitoring rule data provided by an embodiment of the present invention;
[0072] Figure 3 is a schematic diagram of the structure of a monitoring device for business data provided by an embodiment of the present invention;
[0073] Figure 4 It is a schematic diagram of the structure of a device for generating monitoring rule data provided by an embodiment of the present invention;
[0074] Figure 5 It is a schematic diagram of the computer system structure provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0075] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0076] As described in the background technology, the existing multi-dimensional indicator data monitoring method is based on the OLAP system. The OLAP system is an online analytical processing system, which mainly combines and divides the dimensions in the dimension cube by operations such as drilling down, drilling up, slicing, dicing, and rotating, and then polls the business data from the data acceleration layer regularly according to the dimension combination to realize the monitoring and analysis of the business data. However, since the above method is based on obtaining business data from the data acceleration layer, it cannot realize real-time monitoring and analysis, and once there are too many monitored indicators or the monitoring frequency is too high, it is necessary to frequently poll the data acceleration layer, which increases the operating pressure of the data acceleration layer.
[0077] In order to solve the problems of the prior art, the present invention provides a business data monitoring method, rule data generation method, device and system. The specific technical solutions are as follows:
[0078] like Figure 1 As shown, a method for monitoring business data includes:
[0079] S11, the service nodes in the cluster obtain monitoring rule data based on the transmission mode of monitoring rule data determined by the alarm platform. The monitoring rule data includes: service indicators pre-configured in the alarm platform and statistical dimensions corresponding to the service indicators.
[0080] In the above, cluster mainly refers to Flink cluster, which is a computing framework and separate processing engine for stateful computing of unbounded and bounded data streams. Flink cluster contains multiple nodes, which are divided into JobManager, TaskManager and JobClient according to distributed programs. JobClient is responsible for submitting tasks to JobManager, and JobManager dispatches tasks to each TaskManager for execution. The business nodes in the present invention generally refer to the above three nodes.
[0081] As mentioned above, the monitoring rule data corresponds to the business indicators, and the transmission method of the monitoring rule data is predetermined by the alarm platform. The alarm platform is a system proposed in an embodiment of the present invention that can generate alarm rule data according to personnel configuration. The alarm platform can determine the transmission method of the alarm rule data according to the business indicators and statistical frequencies in the alarm configuration data. The business nodes in the cluster need to first determine the transmission method of the corresponding monitoring rules based on the business indicators, and then obtain the business indicator data according to the transmission method. It should be noted that the acquisition here can be active loading, querying, or passive reception.
[0082] In one embodiment, the monitoring rule data also includes: pre-configured statistical frequency, alarm strategy, alarm mode, and statistical sliding window.
[0083] The statistical frequency, alarm strategy, alarm mode, and statistical sliding window are all configured in the alarm platform. The alarm strategy refers to the threshold condition used to determine whether the business data is abnormal, and the alarm mode refers to the type of alarm information sent, such as light alarm, trend alarm, and fluctuation alarm light. The statistical sliding window refers to the data sliding acquisition unit used for data statistics, for example, a window from [0, k-1] records its sum, and then moves the window to the right to [1, k], then to [2, k+1], until the end of the array.
[0084] In one embodiment, the transmission method may be to convert the monitoring rule data into rule stream data, and broadcast the rule stream data to the service nodes in the cluster. Therefore, step S11 is specifically as follows:
[0085] Receiving rule flow data converted from monitoring rule data, the monitoring rule data is generated by the alarm platform, and the rule flow data is generated by the flow data processing platform according to the conversion of the monitoring rule data;
[0086] Parse the rule flow data and obtain monitoring rule data.
[0087] Specifically, the monitoring rule data generated by the alarm platform is stored in Zookeeper, and the monitoring function of Zookeeper is started to monitor the changes in the monitoring rule data. Once the monitoring rule data of the corresponding business indicators are updated on the alarm platform, Zookeeper obtains the updated monitoring rule data and sends it to the stream data processing platform (mainly Kafka), which is broadcast by Kafka to the business nodes in the cluster.
[0088] The above-mentioned method for acquiring monitoring rule data is passive acquisition, which is mainly aimed at monitoring rule data of business indicators with a small amount of business indicator statistics and a high statistical frequency.
[0089] The above-mentioned transmission method of monitoring rule data can obtain the update status of monitoring rule data in real time. Compared with the existing technology that only operates according to the dimension cube but lacks real-time acquisition of rule data change status, it is more conducive to accurate real-time monitoring of business data.
[0090] In one embodiment, the above transmission method can be to store the monitoring rule data in a hot storage database such as Redis, Hbase, ES, etc. Therefore, step S11 is specifically as follows:
[0091] Asynchronously query the monitoring rule data in the hot storage database, where the monitoring rule data is generated by the alarm platform and stored in the hot storage database.
[0092] The above-mentioned method for acquiring monitoring rule data is active acquisition, which is mainly aimed at monitoring rule data of business indicators with large statistical data volume and relatively low statistical frequency.
[0093] In one embodiment, the above transmission method may be to store the monitoring rule data in the alarm platform or Zookeeper. Therefore, step S11 is specifically as follows:
[0094] The monitoring rule data is loaded regularly. The monitoring rule data is generated and stored by the alarm platform.
[0095] The above-mentioned method for acquiring monitoring rule data is active acquisition, which is mainly aimed at monitoring rule data of business indicators with large statistical data volume and low statistical frequency.
[0096] S12. Combine the business indicators with their corresponding statistical dimensions to form an indicator combination.
[0097] As mentioned above, a business indicator can correspond to multiple statistical dimensions, and the correspondence between them is determined in the alarm platform. The monitoring rule data contains the correspondence between business indicators and statistical dimensions, so after obtaining the monitoring rule data, it can be directly combined.
[0098] In one embodiment, when combining business indicators and statistical dimensions, different dimension values of the same dimension can be merged, and the same business indicators of the same business flow data can also be merged.
[0099] S13. Receive business flow data in real time and obtain business data.
[0100] As mentioned above, the business flow data may be the flow data sent by the business platform through Kafka, which mainly includes real-time business data. The business flow data can be divided into sales business flow data, traffic business flow data, inventory business flow data, etc. according to the business type. In the prior art, business data is mainly obtained from the data acceleration layer, so real-time monitoring cannot be achieved. The present invention utilizes business flow data to perform real-time data acquisition and real-time monitoring.
[0101] S14. Count the business data according to the indicator combination and monitor and analyze the business data.
[0102] As mentioned above, statistically analyzing business data according to the indicator combination mainly refers to associating the indicator combination with the business data and dividing the business data according to the indicator combination. Monitoring and analyzing business data mainly refers to comparing the statistical results according to the indicator combination with the threshold conditions to determine whether the business data is abnormal.
[0103] In one embodiment, when the monitoring rule data further includes: statistical frequency, alarm strategy, alarm mode, and statistical sliding window, step S14 specifically includes:
[0104] Business data is counted according to the indicator combination, and business data is monitored and analyzed according to the statistical frequency and statistical sliding window. It is determined whether there are abnormalities in the business data based on the alarm strategy. If there are abnormalities, an alarm message is issued according to the alarm method.
[0105] In actual application scenarios, there are situations where comparative analysis of data from the same period is required. For example, a band-range warning is made between the current period's business indicator data and the same period last year's business indicator data. Therefore, it is necessary to store historical business data in the data acceleration layer. The data acceleration layer can be: Druid, PostGreSQL or ClickHouse.
[0106] Therefore, in one embodiment, step S14 may further include:
[0107] Obtaining current business data corresponding to the indicator combination from the business flow data;
[0108] Obtain historical business data corresponding to the indicator combination from the database;
[0109] Conduct monitoring and analysis based on current and historical business data.
[0110] As mentioned above, the database is preferably the data acceleration layer of the Flink cluster.
[0111] In one embodiment, the monitoring rule data may further include: a rule effectiveness condition, that is, whether the updated monitoring rule is effective in the current statistical sliding window or the next statistical sliding window.
[0112] like Figure 2 As shown, based on the above-mentioned business data monitoring method, the present invention also discloses a method for generating monitoring rule data, including:
[0113] S21. Obtain monitoring configuration data, where the monitoring configuration data includes: business indicators and statistical dimensions and statistical frequencies corresponding to the business indicators.
[0114] As mentioned above, the monitoring configuration data is formed by personnel inputting configuration data based on the alarm platform.
[0115] In one embodiment, the monitoring configuration data also includes statistical frequency, alarm strategy, alarm mode, and statistical sliding window corresponding to the business indicator.
[0116] In the above, the alarm strategy refers to the threshold condition used to determine whether the business data is abnormal, and the alarm mode refers to the type of alarm information sent. The statistical sliding window refers to the data sliding acquisition unit used for data statistics.
[0117] In one embodiment, the monitoring rule data may further include: a rule effectiveness condition, that is, whether the updated monitoring rule is effective in the current statistical sliding window or the next statistical sliding window.
[0118] S22. Generate monitoring rule data according to the monitoring configuration data.
[0119] As described above, the generated monitoring rule data corresponds to the business indicators.
[0120] Based on the configuration contents in the monitoring configuration data, the generated monitoring rule data also includes the statistical frequency, alarm strategy, alarm mode, statistical sliding window, and rule effectiveness conditions corresponding to the business indicators.
[0121] S23. Determine the transmission method of the monitoring rule data according to the statistical data demand and statistical frequency corresponding to the business indicators.
[0122] As mentioned above, each transmission mode has a threshold condition of the statistical data demand corresponding to the corresponding business indicator and a threshold condition of the statistical frequency. The statistical data demand and the statistical frequency corresponding to the business indicator are compared with the above threshold conditions respectively, and the transmission mode is determined according to the comparison results.
[0123] Specifically, the threshold conditions may include a first threshold condition, a second threshold condition, and a third threshold condition, wherein the three threshold conditions are sorted according to the statistical data demand corresponding to the business indicators as follows: first threshold condition > second threshold condition > third threshold condition, and sorted according to statistical frequency as follows: first threshold condition < second threshold condition < third threshold condition.
[0124] In one embodiment, when the statistical data requirement and the statistical frequency of the business indicator meet the third threshold condition, the transmission mode of the monitoring rule data may be:
[0125] The monitoring rule data is sent to the stream data processing platform, so that the stream data processing platform converts the monitoring rule data into rule stream data.
[0126] Specifically, the monitoring rule data is saved in Zookeeper, and Zookeeper listens to changes in the monitoring rule data. Once the monitoring rule data of the corresponding business indicator is updated on the alarm platform, Zookeeper obtains the updated monitoring rule data and sends it to the stream data processing platform, which broadcasts it to the business nodes in the cluster.
[0127] In one embodiment, when the statistical data requirement and the statistical frequency of the business indicator meet the second threshold condition, the transmission mode of the monitoring rule data may be:
[0128] Store monitoring rule data in hot storage databases such as Redis, Hbase, and ES so that business nodes in the cluster can query asynchronously.
[0129] In one embodiment, when the statistical data requirement and the statistical frequency of the business indicator meet the first threshold condition, the transmission mode of the monitoring rule data may be:
[0130] Store monitoring rule data locally or in Zookeeper.
[0131] As mentioned above, further, different transmission modes have business indicator tables, and business indicators that meet the rules are stored in corresponding tables. Therefore, business nodes in the cluster can obtain the corresponding transmission mode of monitoring rule data according to the business indicator table, thereby obtaining monitoring rule data.
[0132] like Figure 3As shown, based on the above-mentioned method for monitoring business data, an embodiment of the present invention further provides a device for monitoring business data, including:
[0133] The rule data acquisition module 301 is used for the service nodes in the cluster to acquire the monitoring rule data based on the transmission mode of the monitoring rule data determined by the alarm platform. The monitoring rule data includes: pre-configured service indicators and statistical dimensions corresponding to the service indicators.
[0134] As mentioned above, in one embodiment, the monitoring rule data also includes: pre-configured statistical frequency, alarm strategy, alarm mode, and statistical sliding window.
[0135] The statistical frequency, alarm strategy, alarm mode, and statistical sliding window are all configured in the alarm platform. The alarm strategy refers to the threshold condition used to determine whether the business data is abnormal, and the alarm mode refers to the type of alarm information sent, such as light alarm, trend alarm, and fluctuation alarm light. The statistical sliding window refers to the data sliding acquisition unit used for data statistics, for example, a window from [0, k-1] records its sum, and then moves the window to the right to [1, k], then to [2, k+1], until the end of the array.
[0136] In one embodiment, the rule data acquisition module 301 is specifically used to:
[0137] Receiving rule flow data converted from monitoring rule data, the monitoring rule data is generated by the alarm platform, and the rule flow data is generated by the flow data processing platform according to the conversion of the monitoring rule data;
[0138] Parse the rule flow data and obtain monitoring rule data.
[0139] Specifically, the monitoring rule data generated by the alarm platform is stored in Zookeeper, and the monitoring function of Zookeeper is started to monitor the changes in the monitoring rule data. Once the monitoring rule data of the corresponding business indicators are updated on the alarm platform, Zookeeper obtains the updated monitoring rule data and sends it to the stream data processing platform (mainly Kafka), which is broadcast by Kafka to the business nodes in the cluster.
[0140] In one embodiment, the rule data acquisition module 301 is specifically used to:
[0141] Asynchronously query the monitoring rule data in the hot storage database, where the monitoring rule data is generated by the alarm platform and stored in the hot storage database.
[0142] In one embodiment, the rule data acquisition module 301 is specifically used to:
[0143] The monitoring rule data is loaded regularly. The monitoring rule data is generated and stored by the alarm platform.
[0144] The combination module 302 is used to combine the business indicator with its corresponding statistical dimension to form an indicator combination.
[0145] As mentioned above, a business indicator can correspond to multiple statistical dimensions, and the correspondence between them is determined in the alarm platform. The monitoring rule data contains the correspondence between business indicators and statistical dimensions, so after obtaining the monitoring rule data, it can be directly combined.
[0146] In one embodiment, the combining module 302 includes: merging different dimension values of the same dimension, and merging the same business indicators of the same business flow data.
[0147] The service data acquisition module 303 is used to receive service flow data in real time and acquire service data.
[0148] As mentioned above, the business flow data may be the flow data sent by the business platform through Kafka, which mainly includes real-time business data.
[0149] The monitoring module 304 is used to collect statistics on business data according to the indicator combination and to monitor and analyze the business data.
[0150] As mentioned above, statistically analyzing business data according to the indicator combination mainly refers to associating the indicator combination with the business data and dividing the business data according to the indicator combination. Monitoring and analyzing business data mainly refers to comparing the statistical results according to the indicator combination with the threshold conditions to determine whether the business data is abnormal.
[0151] In one embodiment, when the monitoring rule data further includes: statistical frequency, alarm strategy, alarm mode, and statistical sliding window, the monitoring module 304 is specifically used to:
[0152] Business data is counted according to the indicator combination, and business data is monitored and analyzed according to the statistical frequency and statistical sliding window. It is determined whether there are abnormalities in the business data based on the alarm strategy. If there are abnormalities, an alarm message is issued according to the alarm method.
[0153] In one embodiment, in order to be applicable to analysis situations requiring historical business data, the monitoring module 304 is further specifically used to:
[0154] Obtaining current business data corresponding to the indicator combination from the business flow data;
[0155] Obtain historical business data corresponding to the indicator combination from the database;
[0156] Conduct monitoring and analysis based on current and historical business data.
[0157] As mentioned above, the database is preferably the data acceleration layer of the Flink cluster.
[0158] In one embodiment, the monitoring rule data may further include: a rule effectiveness condition, that is, whether the updated monitoring rule is effective in the current statistical sliding window or the next statistical sliding window.
[0159] like Figure 4 As shown, based on the above-mentioned method for generating monitoring rule data, an embodiment of the present invention further provides a device for generating monitoring rule data, including:
[0160] Configuration module 401 is used to obtain monitoring configuration data, which includes: business indicators and statistical dimensions and statistical frequencies corresponding to the business indicators.
[0161] As mentioned above, the monitoring configuration data is formed by personnel inputting configuration data based on the alarm platform.
[0162] In one embodiment, the monitoring configuration data also includes an alarm strategy, an alarm mode, and a statistical sliding window corresponding to the business indicator.
[0163] In the above, the alarm strategy refers to the threshold condition used to determine whether the business data is abnormal, and the alarm mode refers to the type of alarm information sent. The statistical sliding window refers to the data sliding acquisition unit used for data statistics.
[0164] In one embodiment, the monitoring rule data may further include: a rule effectiveness condition, that is, whether the updated monitoring rule is effective in the current statistical sliding window or the next statistical sliding window.
[0165] The rule generation module 402 is used to generate monitoring rule data according to the monitoring configuration data.
[0166] As described above, the generated monitoring rule data corresponds to the business indicators.
[0167] Based on the configuration contents in the monitoring configuration data, the generated monitoring rule data also includes the statistical frequency, alarm strategy, alarm mode, statistical sliding window, and rule effectiveness conditions corresponding to the business indicators.
[0168] The transmission mode determination module 403 is used to determine the transmission mode of the monitoring rule data according to the statistical data demand and statistical frequency corresponding to the business indicator.
[0169] As mentioned above, each transmission mode has a threshold condition for the statistical data demand corresponding to the corresponding business indicator and a threshold condition for the statistical frequency. The transmission mode determination module 403 is specifically used to compare the statistical data demand and the statistical frequency corresponding to the business indicator with the above threshold conditions respectively, and determine the transmission mode according to the comparison results.
[0170] Specifically, the transmission modes include three types, each corresponding to one of the three threshold conditions.
[0171] In one embodiment, when the statistical data requirement and the statistical frequency of the business indicator meet the third threshold condition, the transmission mode of the monitoring rule data may be:
[0172] The monitoring rule data is sent to the stream data processing platform, so that the stream data processing platform converts the monitoring rule data into rule stream data.
[0173] In one embodiment, when the statistical data requirement and the statistical frequency of the business indicator meet the second threshold condition, the transmission mode of the monitoring rule data may be:
[0174] Store monitoring rule data in hot storage databases such as Redis, Hbase, and ES so that business nodes in the cluster can query asynchronously.
[0175] In one embodiment, when the statistical data requirement and the statistical frequency of the business indicator meet the first threshold condition, the transmission mode of the monitoring rule data may be:
[0176] Store monitoring rule data locally or in Zookeeper.
[0177] Based on the above-mentioned business data monitoring method, the present invention also provides a computer system, comprising:
[0178] one or more processors; and
[0179] A memory associated with one or more processors, the memory is used to store program instructions, and when the program instructions are read and executed by one or more processors, the above-mentioned business data monitoring method is executed.
[0180] in, Figure 5 The computer system architecture is shown as an example, which may include a processor 510, a video display adapter 511, a disk drive 512, an input / output interface 513, a network interface 514, and a memory 520. The processor 510, the video display adapter 511, the disk drive 512, the input / output interface 513, the network interface 514, and the memory 520 may be communicatively connected via a communication bus 530.
[0181] Among them, the processor 510 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in this application.
[0182] The memory 520 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 520 can store an operating system 521 for controlling the operation of the electronic device 500, and a basic input and output system 522 (BIOS) for controlling the low-level operation of the electronic device 500. In addition, a web browser 523, a data storage management system 524, and a device identification information processing system 525, etc. can also be stored. The above-mentioned device identification information processing system 525 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided by the present application is implemented by software or firmware, the relevant program code is stored in the memory 520 and is called and executed by the processor 510.
[0183] The input / output interface 513 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0184] The network interface 514 is used to connect to a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0185] The bus 530 comprises a pathway for transmitting information between the various components of the device (eg, the processor 510, the video display adapter 511, the disk drive 512, the input / output interface 513, the network interface 514, and the memory 520).
[0186] In addition, the electronic device 500 can also obtain information on specific collection conditions from the virtual resource object collection condition information database for use in condition judgment, etc.
[0187] It should be noted that, although the above device only shows a processor 510, a video display adapter 511, a disk drive 512, an input / output interface 513, a network interface 514, a memory 520, a bus 530, etc., in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include components necessary for implementing the solution of the present application, and does not necessarily include all the components shown in the figure.
[0188] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application or some parts of the embodiments.
[0189] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0190] The technical solution provided by the embodiment of the present invention has the following beneficial effects:
[0191] 1. The business data monitoring technical solution disclosed in the present invention can monitor the changes of monitoring rule data in real time, obtain business data by using business flow data, and monitor business data in real time. Compared with the existing technology, it does not need to rely too much on the data acceleration layer and improves the real-time performance of data monitoring.
[0192] 2. The technical solution for generating monitoring rule data disclosed in the present invention proposes three transmission methods for monitoring rule data according to the statistical dimensions and statistical frequencies corresponding to the business indicators. Among them, the transmission method of rule flow data and the transmission method of hot storage do not require polling the data acceleration layer, reducing the pressure on the data acceleration layer.
[0193] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present invention, which will not be described in detail here.
[0194] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for monitoring business data, characterized in that: include: The business node in the cluster determines the transmission mode of the monitoring rule data based on the alarm platform to obtain the monitoring rule data, wherein the monitoring rule data includes: business indicators pre-configured in the alarm platform and statistical dimensions corresponding to the business indicators; wherein the transmission mode of the monitoring rule data includes sending the monitoring rule data to the stream data processing platform, storing the monitoring rule data in a hot storage database, storing the monitoring rule data locally or storing it in Zookeeper; Combining the business indicator with the corresponding statistical dimension to form an indicator combination; Receive business flow data in real time and obtain business data; Counting the business data according to the indicator combination, and monitoring and analyzing the business data; Wherein, when the transmission mode of the monitoring rule data is to send the monitoring rule data to the stream data processing platform, the service node in the cluster obtains the monitoring rule data based on the transmission mode of the monitoring rule data determined by the alarm platform, including: Receive rule flow data converted from monitoring rule data, wherein the monitoring rule data is generated by the alarm platform, and the rule flow data is generated by the flow data processing platform according to the conversion of the monitoring rule data; parse the rule flow data to obtain the monitoring rule data.
2. The method according to claim 1, characterized in that The monitoring rule data also includes: pre-configured statistical frequency, alarm strategy, alarm mode, and statistical sliding window; The statistically analyzing the business data according to the indicator combination and monitoring and analyzing the business data include: The business data is counted according to the indicator combination, the business data is monitored and analyzed according to the statistical frequency and the statistical sliding window, and it is determined whether the business data is abnormal according to the alarm strategy. If there is an abnormality, an alarm message is issued according to the alarm method.
3. The method according to claim 1, characterized in that The dividing the business data according to the indicator combination and monitoring and analyzing the business data includes: Acquire current business data corresponding to the indicator combination from the business flow data; Acquire historical business data corresponding to the indicator combination from a database; Monitoring and analysis are performed based on the current business data and the historical business data.
4. The method according to any one of claims 1 to 3, characterized in that When the transmission mode of the monitoring rule data is to store the monitoring rule data in a hot storage database, the service nodes in the cluster obtain the monitoring rule data based on the transmission mode of the monitoring rule data determined by the alarm platform, including: The monitoring rule data in the hot storage database is asynchronously queried, and the monitoring rule data is generated by the alarm platform and stored in the hot storage database.
5. The method according to any one of claims 1 to 3, characterized in that: When the transmission mode of the monitoring rule data is to store the monitoring rule data locally or in Zookeeper, the service node in the cluster obtains the monitoring rule data based on the transmission mode of the monitoring rule data determined by the alarm platform, including: The monitoring rule data is loaded periodically, and the monitoring rule data is generated and stored by the alarm platform.
6. A method for generating monitoring rule data, characterized in that: include: Acquire monitoring configuration data, the monitoring configuration data including: business indicators and statistical dimensions and statistical frequencies corresponding to the business indicators; Generate monitoring rule data according to the monitoring configuration data; Determining a transmission method of the monitoring rule data according to the statistical data demand and the statistical frequency corresponding to the business indicator; Each transmission mode has a threshold condition of the statistical data demand amount and a threshold condition of the statistical frequency corresponding to the corresponding business indicator. The statistical data demand amount and the statistical frequency corresponding to the business indicator are compared with the above threshold conditions respectively, and the transmission mode is determined according to the comparison result. The threshold conditions include a first threshold condition, a second threshold condition, and a third threshold condition, wherein the three threshold conditions are sorted according to the statistical data demand corresponding to the business indicator as follows: the first threshold condition> the second threshold condition> the third threshold condition, and the sorting according to the statistical frequency is as follows: the first threshold condition< the second threshold condition< the third threshold condition; When the statistical data demand and statistical frequency of the business indicator meet the first threshold condition, the monitoring rule data is transmitted in a manner of storing the monitoring rule data locally or storing the monitoring rule data in Zookeeper; When the statistical data demand and the statistical frequency of the business indicator meet the second threshold condition, the monitoring rule data is transmitted in a manner of storing the monitoring rule data in a hot storage database; When the statistical data demand and the statistical frequency of the business indicator meet the third threshold condition, the monitoring rule data is transmitted in a manner of sending the monitoring rule data to the stream data processing platform.
7. A monitoring device for business data, characterized in that: include: A rule data acquisition module is used for the service nodes in the cluster to determine the transmission mode of the monitoring rule data based on the alarm platform to obtain the monitoring rule data, wherein the monitoring rule data includes: pre-configured service indicators and statistical dimensions corresponding to the service indicators; wherein the transmission mode of the monitoring rule data includes sending the monitoring rule data to the stream data processing platform, storing the monitoring rule data in a hot storage database, storing the monitoring rule data locally or storing it in Zookeeper; Wherein, when the transmission mode of the monitoring rule data is to send the monitoring rule data to the stream data processing platform, the service node in the cluster obtains the monitoring rule data based on the transmission mode of the monitoring rule data determined by the alarm platform, including: receiving rule stream data converted from the monitoring rule data, the monitoring rule data is generated by the alarm platform, and the rule stream data is generated by the stream data processing platform according to the conversion of the monitoring rule data; parsing the rule stream data to obtain the monitoring rule data; A combination module, used to combine the business indicator and the corresponding statistical dimension to form an indicator combination; A business data acquisition module is used to receive business flow data in real time and acquire business data; The monitoring module is used to collect statistics on the business data according to the indicator combination and monitor and analyze the business data.
8. A device for generating monitoring rule data, characterized in that: include: A configuration module, used to obtain monitoring configuration data, wherein the monitoring configuration data includes: business indicators and statistical dimensions and statistical frequencies corresponding to the business indicators; A rule generation module, used to generate monitoring rule data according to the monitoring configuration data; A transmission mode determination module, used to determine the transmission mode of the monitoring rule data according to the statistical data demand corresponding to the business indicator and the statistical frequency; Each transmission mode has a threshold condition of the statistical data demand amount and a threshold condition of the statistical frequency corresponding to the corresponding business indicator. The statistical data demand amount and the statistical frequency corresponding to the business indicator are compared with the above threshold conditions respectively, and the transmission mode is determined according to the comparison result. The threshold conditions include a first threshold condition, a second threshold condition, and a third threshold condition, wherein the three threshold conditions are sorted according to the statistical data demand corresponding to the business indicator as follows: the first threshold condition> the second threshold condition> the third threshold condition, and the sorting according to the statistical frequency is as follows: the first threshold condition< the second threshold condition< the third threshold condition; When the statistical data demand and statistical frequency of the business indicator meet the first threshold condition, the monitoring rule data is transmitted in a manner of storing the monitoring rule data locally or storing the monitoring rule data in Zookeeper; When the statistical data demand and the statistical frequency of the business indicator meet the second threshold condition, the monitoring rule data is transmitted in a manner of storing the monitoring rule data in a hot storage database; When the statistical data demand and the statistical frequency of the business indicator meet the third threshold condition, the monitoring rule data is transmitted in a manner of sending the monitoring rule data to the stream data processing platform.
9. A computer system, characterized in that: include: one or more processors; as well as A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the method according to any one of claims 1 to 5.
