Health diagnosis processing method and device of Redis instance and electronic equipment

By collecting indicator data of Redis instances and using the health scoring model and abnormality judgment model to automatically determine and execute repair measures, it solves the problem of being unable to proactively solve Redis anomalies in the existing technology, achieves rapid detection and repair, and improves Redis health. Degree scoring accuracy and system stability.

CN118796589APending Publication Date: 2024-10-18CHINA MOBILE GROUP ZHEJIANG +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311276406.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-27
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing technology cannot actively solve the problem of Redis anomalies, lacks a response mechanism for anomalies, and relies on manual judgment and simple scoring models to analyze Redis health in depth.

Method used

By collecting real-time indicator data and historical indicator data of Redis instances, analysis is performed based on the health score model, and combined with the pre-trained abnormality judgment model, repair measures are automatically determined and executed, including automatic repair and manual repair.

Benefits of technology

It realizes the rapid detection and repair of Redis anomalies, improves the accuracy and detection speed of the health score of Redis instances, reduces manual intervention, and improves the stability and performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796589A_ABST
    Figure CN118796589A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer software, and provides a Redis instance health diagnosis processing method and device and electronic equipment. The method comprises the steps of collecting index total data of at least one Redis instance, wherein the index total data comprises real-time index data and historical index data in a preset historical time period; based on a health degree scoring model, determining health degree scores of the Redis instances according to the index total data of the Redis instances; and for the abnormal Redis instances of which the health degree scores are lower than a preset score threshold, based on a pre-trained transaction judgment model, according to the real-time index data of the abnormal Redis instances, determining repair measures corresponding to the abnormal Redis instances. According to the method, the health degree of the Redis instance is deeply analyzed through the historical index data and the real-time index data, and then abnormity repair can be rapidly carried out based on repair measures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer software technology, and in particular to a health diagnosis and processing method, device and electronic device for a Redis instance. Background Art

[0002] With the continuous enrichment of various business scenarios and the explosive growth of business volume, as well as the increase in the number of users, the concurrent volume has increased, making the system's demand for cache Redis increasingly greater. Especially in the telecommunications industry, operators themselves have built a lot of application systems to provide consumers with various special services, and some system functions involve sub-functions of multiple business systems, which require multi-system collaboration to work properly. At this time, cache Redis can reduce the frequency of access to physical data sources and improve the system's operating performance. Therefore, whether Redis is healthy is of great significance, and abnormal Redis may cause system failures.

[0003] In the related art, there are two ways to diagnose the health of Redis. One is to diagnose the health of Redis based on expert experience. This method uses Python scripts to collect Redis health indicators in real time, and experts judge whether each indicator is normal based on their experience. The other is to score a single indicator separately through a scoring model after obtaining the indicator, and then summarize the scores of all indicators to obtain the overall health of Redis.

[0004] The first method mentioned above requires manual collection of health indicators and manual judgment of health, which is cumbersome and labor-intensive. Although the second method uses a scoring model to score, saving labor costs, the above two methods cannot actively solve the problem of Redis exceptions and lack a response mechanism for exceptions. Summary of the invention

[0005] The embodiments of the present application provide a health diagnosis and processing method, device and electronic device for a Redis instance, which are used to solve the technical problem of being unable to proactively solve Redis exceptions and lacking a response mechanism for exceptions.

[0006] In a first aspect, an embodiment of the present application provides a health diagnosis and processing method for a Redis instance, comprising:

[0007] Collecting full indicator data of at least one Redis instance, wherein the full indicator data includes real-time indicator data and historical indicator data within a preset historical time period;

[0008] Based on the health score model, determine the health score of each Redis instance according to the full indicator data of each Redis instance;

[0009] For abnormal Redis instances whose health scores are lower than a preset score threshold, based on a pre-trained anomaly judgment model, the repair measures corresponding to the abnormal Redis instances are determined according to the real-time indicator data of the abnormal Redis instances.

[0010] In one embodiment, the pre-trained abnormality judgment model determines the repair measures corresponding to the abnormal Redis instance according to the real-time indicator data of the abnormal Redis instance, including:

[0011] Input the real-time indicator data of the abnormal Redis instance into a pre-trained abnormality judgment model to obtain the repair measures corresponding to the abnormal Redis instance output by the abnormality judgment model;

[0012] The abnormality judgment model is obtained based on decision tree algorithm training.

[0013] In one embodiment, it further includes:

[0014] When the repair measure corresponding to the abnormal Redis instance is an automatic repair measure, calling the repair program corresponding to the automatic repair measure to perform abnormal repair on the abnormal Redis instance;

[0015] When the repair measure corresponding to the abnormal Redis instance is a manual repair measure, repair instruction information is sent to the repair personnel, and the repair instruction information is used to instruct the repair personnel to perform abnormal repair on the abnormal Redis instance.

[0016] In one embodiment, the health score of each Redis instance is determined based on the health score model according to the full amount of indicator data of each Redis instance, including:

[0017] Based on the health scoring model, the probability density corresponding to each indicator type in the full indicator data of the Redis instance is calculated respectively, wherein the health scoring model is a model constructed based on the HBOS algorithm;

[0018] Determine the probability density of the Redis instance based on the probability density corresponding to each of the indicator types;

[0019] The probability density of the Redis instance is scaled to obtain a health score of the Redis instance.

[0020] In one embodiment, it further includes:

[0021] Visually output the real-time indicator data of the Redis instance through a visualization tool;

[0022] The real-time indicator data includes: indicators of the Redis instance, indicators of the host to which the Redis instance belongs, logs of the Redis instance, and logs of the host to which the Redis instance belongs.

[0023] In one embodiment, the collecting of full indicator data of at least one Redis instance, wherein the full indicator data includes real-time indicator data and historical indicator data within a preset historical time period, includes:

[0024] Collect full indicator data of at least one Redis instance, store the full indicator data in ClickHouse, and store real-time indicator data in the full indicator data in MongoDB;

[0025] Among them, the full amount of indicator data used to determine the health score of each Redis instance is obtained from the ClickHouse; the real-time indicator data of the abnormal Redis instance visualized by the visualization tool is obtained from the MongoDB.

[0026] In a second aspect, an embodiment of the present application provides a health diagnosis and processing device for a Redis instance, comprising:

[0027] A collection unit, used to collect full indicator data of at least one Redis instance, wherein the full indicator data includes real-time indicator data and historical indicator data within a preset historical time period;

[0028] A health diagnosis unit, used to determine the health score of each Redis instance based on the health scoring model and the full amount of indicator data of each Redis instance;

[0029] The abnormal repair unit is used to determine the repair measures corresponding to the abnormal Redis instance whose health score is lower than a preset score threshold based on a pre-trained abnormal change judgment model and according to the real-time indicator data of the abnormal Redis instance.

[0030] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing a computer program, wherein when the processor executes the program, the steps of the health diagnosis and processing method for the Redis instance described in the first aspect are implemented.

[0031] In a fourth aspect, an embodiment of the present application provides a processor-readable storage medium storing a computer program, wherein the computer program is used to enable the processor to implement the steps of the health diagnosis and processing method for the Redis instance described in the first aspect when executed.

[0032] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the health diagnosis and processing method for the Redis instance described in the first aspect.

[0033] The health diagnosis and processing method, device and electronic device for Redis instances provided in the embodiments of the present application can timely determine the health score of each Redis instance by collecting real-time indicator data and historical indicator data of the Redis instance to form full indicator data, and analyze the full indicator data based on the health scoring model, and can deeply analyze the health of the Redis instance through historical indicator data and real-time indicator data; and for abnormal Redis instances whose health scores are lower than a preset score threshold, it can also actively determine the corresponding repair measures for the abnormal Redis instances according to the real-time indicator data of the abnormal Redis instances, and then can quickly repair the abnormality based on the repair measures. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0035] Figure 1 This is one of the flowcharts of the health diagnosis and processing method of the Redis instance provided in the embodiment of the present application;

[0036] Figure 2 It is a flowchart of a method for collecting and storing full amount of indicator data provided by an embodiment of the present application;

[0037] Figure 3 It is one of the structural schematic diagrams of the health diagnosis and processing device of the Redis instance provided in the embodiment of the present application;

[0038] Figure 4 This is the second structural diagram of the health diagnosis and processing device of the Redis instance provided in the embodiment of the present application;

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

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

[0041] In view of the problem that the prior art cannot actively solve the Redis exception and lacks a technical problem of coping mechanism for the exception, an embodiment of the present invention provides a health diagnosis and processing method for a Redis instance. Figure 1 FIG. 1 is a flow chart of a health diagnosis and processing method for a Redis instance provided in an embodiment of the present invention. Figure 1 As shown, the health diagnosis processing method of the Redis instance may include:

[0042] Step 110: Collect full indicator data of at least one Redis instance, where the full indicator data includes real-time indicator data and historical indicator data within a preset historical time period.

[0043] Exemplarily, there can be only one Redis instance, or there can be multiple, such as a Redis instance cluster. For example, when a health diagnosis needs to be performed on each Redis instance once every minute, the real-time indicator data refers to the indicator data collected when the health diagnosis is currently being performed. The preset historical time period can be pre-set according to the needs of health diagnosis. The preset historical time period can be, for example, one week, one month, or three months, etc., and this embodiment does not make specific limitations here. In this step, it is necessary to collect historical indicator data and real-time indicator data within the preset historical time period to form the full indicator data, so as to provide a health score for each Redis instance based on the full indicator data of each Redis instance.

[0044] The real-time indicator data and historical indicator data of the Redis instance may at least include: the indicator of the Redis instance and the indicator of the host to which the Redis instance belongs. Among them, the host's indicator may include the following indicator types: host CPU usage, host CPU IOWAIT status, host memory usage, host disk usage, and host disk read and write speed, etc. The indicator of the Redis instance may include the following indicator types: Redis instance deployment mode, Redis instance version, Redis instance role, number of connections of the Redis instance (combined with the maximum number of connections of the instance configuration), number of keys of the Redis instance, current memory used by the Redis instance (combined with the maximum memory configuration of the instance), memory fragmentation rate of the Redis instance, persistence mode of the Redis instance, usage status of the Redis instance, PING detection of the Redis instance, and memory recovery policy configuration of the Redis instance, etc.

[0045] Furthermore, the indicators of the Redis instance may also include: the master-slave connection status of the Redis instance, the cluster status of the Redis instance, the memory usage of the Redis instance, the number of slots successfully allocated by the cluster of the Redis instance, the connection usage of the Redis instance, the number of days the Redis instance has been running, the number of clients waiting for blocking calls of the Redis instance, the sentinel status of the Redis instance, the slow query configuration of the Redis instance, the RDB (Redis Data Base) persistence configuration of the Redis instance, the AOF (Append Only File) persistence configuration of the Redis instance, the AOF disk flushing configuration of the Redis instance, the hybrid persistence configuration of the Redis instance, the output buffer configuration of the Redis instance, and the repl-backlog-size configuration of the Redis instance. These indicator types can be individually selected indicator types, and the above indicator types can be individually selected according to the situation of the system to which the Redis instance belongs.

[0046] Step 120: Based on the health score model, determine the health score of each Redis instance according to the full indicator data of each Redis instance.

[0047] Specifically, after collecting the full amount of indicator data of each Redis instance, for each Redis instance, based on the health score model, the health score of each Redis instance can be determined according to the full amount of indicator data of each Redis instance.

[0048] It can be understood that the health scoring model is a model that can analyze the full amount of indicator data of the Redis instance and then score the health of the Redis instance.

[0049] Step 130: For an abnormal Redis instance whose health score is lower than a preset score threshold, based on a pre-trained anomaly judgment model, determine a repair measure corresponding to the abnormal Redis instance according to real-time indicator data of the abnormal Redis instance.

[0050] Exemplarily, a preset scoring threshold can be set in advance. After the health score of each Redis instance is scored, the health score of each Redis instance is compared with the preset scoring threshold. When the health score of the Redis instance is less than the preset scoring threshold, it means that the Redis instance is an abnormal Redis instance. When the health score of the Redis instance is greater than or equal to the preset scoring threshold, it means that the Redis instance is a healthy Redis instance. For example, the health score of each Redis instance can be set between 0 and 100 points, and the preset scoring threshold is 60 points. When the health score of a Redis instance is less than 60 points, it is determined to be an abnormal Redis instance.

[0051] For abnormal Redis instances whose health scores are lower than the preset score threshold, the pre-trained abnormality judgment model is called to determine the corresponding repair measures for the abnormal Redis instance according to the real-time indicator data of the abnormal Redis instance. Exemplarily, the abnormality judgment model can be a model that can classify and identify real-time indicator data and then match the corresponding repair measures.

[0052] The health diagnosis and processing method for Redis instances provided in the embodiments of the present application can timely determine the health score of each Redis instance by collecting the real-time indicator data and historical indicator data of the Redis instance to form the full indicator data, and analyze the full indicator data based on the health scoring model, and can deeply analyze the health of the Redis instance through the historical indicator data and the real-time indicator data; and for abnormal Redis instances whose health scores are lower than the preset score threshold, it can also actively determine the corresponding repair measures for the abnormal Redis instances according to the real-time indicator data of the abnormal Redis instances, and then can quickly repair the abnormalities based on the repair measures.

[0053] In one embodiment, the pre-trained abnormality judgment model determines the repair measures corresponding to the abnormal Redis instance according to the real-time indicator data of the abnormal Redis instance, including:

[0054] Input the real-time indicator data of the abnormal Redis instance into a pre-trained abnormality judgment model to obtain the repair measures corresponding to the abnormal Redis instance output by the abnormality judgment model;

[0055] The abnormality judgment model is obtained based on decision tree algorithm training.

[0056] Specifically, the anomaly judgment model can be obtained by training based on a decision tree algorithm, for example, it can be obtained by training based on a CART (classification and regression tree) classification and regression tree algorithm. In the above embodiment, the CART classification and regression tree algorithm can be used to learn the anomaly judgment rules in the multi-index system, and then specify the subsequent corresponding repair procedures for the abnormal Redis instance.

[0057] When training based on the CART (classification and regression tree) classification and regression tree algorithm, for example, the number of categories of repair measures in the sample data set D is k, and the calculation formula of the Gini index Gini (D) is:

[0058]

[0059] In the above formula, r i It indicates the proportion of the number of samples corresponding to the repair measure category i to the total samples in the sample data set D.

[0060] It can be seen from the above formula that the higher the degree of mixing of the sample data in the sample data set D, that is, the more categories of repair measures, the higher the Gini index. When the sample data set D has only one category of repair measures, the minimum value of the Gini index is 0.

[0061] During the training process, if the selected split feature is indicator type A, the calculation formula for the Gini index of the sample data set D is:

[0062]

[0063] Among them, when the split feature is indicator type A, the sample data set D is divided into two parts, namely the D1 data set and the D2 data set.

[0064] Each time the decision tree splits, the feature with the smallest Gini index will be selected for splitting, and finally the repair measures corresponding to each anomaly type will be obtained.

[0065] The real-time indicator data of the abnormal Redis instance is input into the pre-trained anomaly judgment model. The anomaly judgment model determines the anomaly type of the abnormal Redis instance according to the real-time indicator data, and then matches the corresponding repair measures to repair the abnormal Redis instance.

[0066] In one embodiment, it further includes:

[0067] When the repair measure corresponding to the abnormal Redis instance is an automatic repair measure, calling the repair program corresponding to the automatic repair measure to perform abnormal repair on the abnormal Redis instance;

[0068] When the repair measure corresponding to the abnormal Redis instance is a manual repair measure, repair instruction information is sent to the repair personnel, and the repair instruction information is used to instruct the repair personnel to perform abnormal repair on the abnormal Redis instance.

[0069] Specifically, the abnormality judgment model can determine the corresponding repair measures based on the real-time indicator data of the abnormal Redis instance. The repair measures include two categories: automatic repair measures and manual repair measures.

[0070] Automatic repair measures are repair measures that can be performed automatically, such as restarting, etc. Automatic repair measures include multiple repair types, and each repair type has a matching repair program. When the repair measure corresponding to the abnormal Redis instance is an automatic repair measure, the repair program matching the repair type of the automatic repair measure will be automatically called to repair the abnormal Redis instance.

[0071] Manual repair measures require manual intervention to repair abnormal Redis instances. When the repair measures corresponding to abnormal Redis instances are manual repair measures, instruction information will be automatically sent to the repair personnel. The instruction information may include information such as the abnormal change type of the abnormal Redis instance. The instruction information is used to instruct and guide the repair personnel to repair the abnormal Redis instance. Exemplarily, the instruction information may be pushed to the repair personnel's client terminal in the form of SMS or WeChat, and the repair personnel can manually repair the abnormal Redis instance through the remote operation platform.

[0072] The health diagnosis and processing method for the Redis instance in the above embodiment will automatically match the corresponding repair measures for the abnormal Redis instance and perform the repair when an abnormal Redis instance is detected, so that the abnormal Redis instance can be repaired and restored to health as soon as possible.

[0073] In one embodiment, the health score of each Redis instance is determined based on the health score model according to the full amount of indicator data of each Redis instance, including:

[0074] Based on the health scoring model, the probability density corresponding to each indicator type in the full indicator data of the Redis instance is calculated respectively, wherein the health scoring model is a model constructed based on the HBOS algorithm;

[0075] Determine the probability density of the Redis instance based on the probability density corresponding to each of the indicator types;

[0076] The probability density of the Redis instance is scaled to obtain a health score of the Redis instance.

[0077] Exemplarily, the health score model may be a model based on the HBOS (Histogram-based Outlier Score) algorithm.

[0078] The process of calculating the health score of a Redis instance based on the health score model includes:

[0079] Assume that the full amount of indicator data of the Redis instance includes n indicator types. For each indicator type, an independent histogram is calculated. The frequency (relative number) of samples falling into each box, that is, the height of the box, represents the density estimate. Each histogram is normalized to obtain the probability density corresponding to each indicator type: P1(p), P2(p), ..., P n (p), the probability density P(p) of Redis instance p can be determined according to the probability density corresponding to each indicator type:

[0080] P(p)=P1(p)P2(p)…P n (p) (3)

[0081] In the above formula, the probability density P(p) of the Redis instance p ranges from (0, 1). The Redis instance tends to be abnormal, and the probability density of the Redis instance tends to 0.

[0082] After determining the probability density of the Redis instance, the probability density of the Redis instance is scaled. First, take the logarithm of both sides of formula (3) to obtain formula (4):

[0083]

[0084] In the above formula, the value range of log(P(p)) is (-∞, 0). When the Redis instance tends to be abnormal, the value of log(P(p)) tends to -∞, and P i (p) is the probability density corresponding to the i-th indicator type.

[0085] For the convenience of scoring, after obtaining formula (4), multiply both sides of formula (4) by -1 to obtain formula (5):

[0086]

[0087] In the above formula, the value range of -log(P(p)) is (0, +∞). When the Redis instance tends to be abnormal, the value of log(P(p)) tends to +∞.

[0088] As the Redis instance becomes more normal, the probability density value P(p) becomes larger, so the value in formula (5) The smaller the value of The value range of is (0, +∞). In order to make the health score more intuitive, the MinMaxScaler() scaling function is used to adjust the formula To zoom in, The value range is locked to [0, 100] and is subtracted from the fixed value 100, so that the larger the P(p) probability density value, the larger the health score H(p), indicating that the Redis instance is healthier.

[0089] Specifically, X is used to refer to Determine the maximum value X max and minimum value X min , then the MinMaxScaler() scaling function formula is:

[0090]

[0091] Wherein, the value range of the MinMaxScaler() scaling function in the above formula is [0, 1].

[0092] Finally, the expression of health score H(p) is obtained:

[0093]

[0094] In the above formula, the value range of the health score H(p) is [0, 100].

[0095] In the prior art, the detection of Redis instance anomalies relies on expert experience, the detection speed is slow, and the detection is only based on real-time indicator data, and the root cause cannot be deeply excavated. When the detection is performed according to the scoring model, only the scores of multiple indicators are simply summarized, and there is a lack of scenario analysis combining multiple indicators, and there is also a lack of trend analysis of historical data. The health diagnosis and processing method of the Redis instance in the above embodiment, through the health scoring model, conducts an in-depth analysis of the Redis instance based on real-time indicator data and historical indicator data, combines multiple categories of indicators for analysis and combines real-time indicator data and historical indicator data for analysis, and has a fast detection speed and high accuracy.

[0096] In one embodiment, it further includes:

[0097] Visually output the real-time indicator data of the Redis instance through a visualization tool;

[0098] The real-time indicator data includes: indicators of the Redis instance, indicators of the host to which the Redis instance belongs, logs of the Redis instance, and logs of the host to which the Redis instance belongs.

[0099] Specifically, the real-time indicator data of the Redis instance may include the indicator of the Redis instance and the indicator of the host to which the Redis instance belongs, and may also include the log of the Redis instance and the log of the host to which the Redis instance belongs.

[0100] It is understandable that after collecting the full amount of indicator data of the Redis instance, the real-time indicator data of the Redis instance can be visualized through a visualization tool (such as Grafana) to display the current operation status of the Redis instance, so that the inspection personnel can manually re-inspect the Redis instance based on the current operation status of the Redis instance displayed visually. The health score of the Redis instance output by the health score model can also be visualized through a visualization tool (such as Grafana). It is understandable that personalized customized display is also supported when performing visualization.

[0101] In one embodiment, the collecting of full indicator data of at least one Redis instance, wherein the full indicator data includes real-time indicator data and historical indicator data within a preset historical time period, includes:

[0102] Collect full indicator data of at least one Redis instance, store the full indicator data in ClickHouse, and store real-time indicator data in the full indicator data in MongoDB;

[0103] Among them, the full amount of indicator data used to determine the health score of each Redis instance is obtained from the ClickHouse; the real-time indicator data of the abnormal Redis instance visualized by the visualization tool is obtained from the MongoDB.

[0104] Specifically, Figure 2 is a flow chart of a method for collecting and storing full amount of indicator data provided by an embodiment of the present application, such as Figure 2As shown in , the full amount of indicator data can be collected by deploying the collection tool Telegraf on the host to which the Redis instance belongs. Telegraf is an agent program written in Go for collecting machine data. Its compiled product is only a binary program. It does not require external dependencies for installation and operation. It is suitable for various Redis deployment environments, and has a small memory footprint and low host performance consumption during runtime. Telegraf's plug-in system allows new inputs to be easily added, and integrates various indicators and logs from popular containers and systems. This embodiment uses the Telegraf tool, and uses Shell scripts to collect indicators of the host to which the Redis instance belongs and logs of the host to which the Redis instance belongs, respectively. The go script collects indicators of the Redis instance and logs of the Redis instance, and sends the collected data to the message middleware.

[0105] The message middleware is used for temporary storage and transmission of data in different queues. The Telegraf tool has an output plug-in, which can send the collected indicator data to various other data storages, services, and message queues through the producer program, such as InfluxDB, Graphite, OpenTSDB, Datadog, Librato, Kafka, MQTT, or NSQ, etc. This embodiment can use NSQ (distributed real-time messaging platform) as the message middleware, and input the collected indicator data into the indicator queue of the Redis instance, the indicator queue of the host to which the Redis instance belongs, the log queue of the Redis instance, and the log queue of the host to which the Redis instance belongs, and divide it into real-time indicator data and full indicator data through the consumer program, wherein the real-time indicator data is delivered to MongoDB (distributed file storage database), and the full indicator data is delivered to ClickHouse (column storage database).

[0106] The following describes a health diagnosis and processing device for a Redis instance provided in an embodiment of the present application. The health diagnosis and processing device for a Redis instance described below and the health diagnosis and processing method for a Redis instance described above can refer to each other.

[0107] Figure 3 is one of the structural diagrams of the health diagnosis and processing device of the Redis instance provided in the embodiment of the present application, such as Figure 3 As shown, the health diagnosis and processing device 300 of the Redis instance provided in the embodiment of the present application includes: a collection unit 310, a health diagnosis unit 320 and an abnormality repair unit 330;

[0108] A collection unit 310 is used to collect full indicator data of at least one Redis instance, where the full indicator data includes real-time indicator data and historical indicator data within a preset historical time period;

[0109] A health diagnosis unit 320 is used to determine the health score of each Redis instance based on the health score model and the full amount of indicator data of each Redis instance;

[0110] The abnormal repair unit 330 is used to determine the repair measures corresponding to the abnormal Redis instance whose health score is lower than a preset score threshold based on the pre-trained abnormality judgment model and the real-time indicator data of the abnormal Redis instance.

[0111] The health diagnosis and processing device for Redis instances provided in the embodiment of the present application can timely determine the health score of each Redis instance by collecting the real-time indicator data and historical indicator data of the Redis instance to form the full indicator data, and analyze the full indicator data based on the health scoring model, and can deeply analyze the health of the Redis instance through the historical indicator data and the real-time indicator data; and for abnormal Redis instances whose health scores are lower than the preset score threshold, it can also actively determine the corresponding repair measures for the abnormal Redis instances according to the real-time indicator data of the abnormal Redis instances, and then can quickly repair the abnormalities based on the repair measures.

[0112] In one embodiment, the anomaly repair unit 330 is specifically used to:

[0113] Input the real-time indicator data of the abnormal Redis instance into a pre-trained abnormality judgment model to obtain the repair measures corresponding to the abnormal Redis instance output by the abnormality judgment model;

[0114] The abnormality judgment model is obtained based on decision tree algorithm training.

[0115] In one embodiment, Figure 4 This is a second structural diagram of the health diagnosis and processing device for a Redis instance provided in an embodiment of the present application, such as Figure 4 As shown, the abnormality repair unit 330 also includes:

[0116] A repair module, used for calling a repair program corresponding to the automatic repair measure to perform abnormal repair on the abnormal Redis instance when the repair measure corresponding to the abnormal Redis instance is an automatic repair measure;

[0117] The alarm push module is used to send repair instruction information to the repair personnel when the repair measure corresponding to the abnormal Redis instance is a manual repair measure, and the repair instruction information is used to instruct the repair personnel to perform abnormal repair on the abnormal Redis instance.

[0118] In one embodiment, the health diagnosis unit 320 is specifically used for:

[0119] Based on the health scoring model, the probability density corresponding to each indicator type in the full indicator data of the Redis instance is calculated respectively, wherein the health scoring model is a model constructed based on the HBOS algorithm;

[0120] Determine the probability density of the Redis instance based on the probability density corresponding to each of the indicator types;

[0121] The probability density of the Redis instance is scaled to obtain a health score of the Redis instance.

[0122] In one embodiment, the health diagnosis unit 320 further includes:

[0123] A visualization module, used to visualize and output the real-time indicator data of the Redis instance through a visualization tool;

[0124] The real-time indicator data includes: indicators of the Redis instance, indicators of the host to which the Redis instance belongs, logs of the Redis instance, and logs of the host to which the Redis instance belongs.

[0125] In one embodiment, the acquisition unit 310 is specifically used for:

[0126] Collect full indicator data of at least one Redis instance, store the full indicator data in ClickHouse, and store real-time indicator data in the full indicator data in MongoDB;

[0127] Among them, the full amount of indicator data used to determine the health score of each Redis instance is obtained from the ClickHouse; the real-time indicator data of the abnormal Redis instance visualized by the visualization tool is obtained from the MongoDB.

[0128] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call a computer program in the memory 530 to execute the steps of the health diagnosis processing method of the Redis instance, for example, including:

[0129] Collecting full indicator data of at least one Redis instance, wherein the full indicator data includes real-time indicator data and historical indicator data within a preset historical time period;

[0130] Based on the health score model, determine the health score of each Redis instance according to the full indicator data of each Redis instance;

[0131] For abnormal Redis instances whose health scores are lower than a preset score threshold, based on a pre-trained anomaly judgment model, the repair measures corresponding to the abnormal Redis instances are determined according to the real-time indicator data of the abnormal Redis instances.

[0132] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this 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, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0133] On the other hand, an embodiment of the present application further provides a computer program product, the computer program product including a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can perform the steps of the health diagnosis processing method of the Redis instance provided in the above embodiments, for example, including:

[0134] Collecting full indicator data of at least one Redis instance, wherein the full indicator data includes real-time indicator data and historical indicator data within a preset historical time period;

[0135] Based on the health score model, determine the health score of each Redis instance according to the full indicator data of each Redis instance;

[0136] For abnormal Redis instances whose health scores are lower than a preset score threshold, based on a pre-trained anomaly judgment model, the repair measures corresponding to the abnormal Redis instances are determined according to the real-time indicator data of the abnormal Redis instances.

[0137] On the other hand, an embodiment of the present application further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, wherein the computer program is used to enable the processor to execute the steps of the health diagnosis processing method of the Redis instance provided in the above embodiments, for example, including:

[0138] Collecting full indicator data of at least one Redis instance, wherein the full indicator data includes real-time indicator data and historical indicator data within a preset historical time period;

[0139] Based on the health score model, determine the health score of each Redis instance according to the full indicator data of each Redis instance;

[0140] For abnormal Redis instances whose health scores are lower than a preset score threshold, based on a pre-trained anomaly judgment model, the repair measures corresponding to the abnormal Redis instances are determined according to the real-time indicator data of the abnormal Redis instances.

[0141] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

[0142] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0143] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A health diagnosis and processing method for a Redis instance, characterized in that: include: Collecting full indicator data of at least one Redis instance, wherein the full indicator data includes real-time indicator data and historical indicator data within a preset historical time period; Based on the health score model, determine the health score of each Redis instance according to the full indicator data of each Redis instance; For abnormal Redis instances whose health scores are lower than a preset score threshold, based on a pre-trained anomaly judgment model, the repair measures corresponding to the abnormal Redis instances are determined according to the real-time indicator data of the abnormal Redis instances.

2. The health diagnosis and processing method of a Redis instance according to claim 1, characterized in that: The pre-trained abnormality judgment model determines the repair measures corresponding to the abnormal Redis instance according to the real-time indicator data of the abnormal Redis instance, including: Input the real-time indicator data of the abnormal Redis instance into a pre-trained abnormality judgment model to obtain the repair measures corresponding to the abnormal Redis instance output by the abnormality judgment model; The abnormality judgment model is obtained based on decision tree algorithm training.

3. The health diagnosis and processing method of a Redis instance according to claim 2, characterized in that: Also includes: When the repair measure corresponding to the abnormal Redis instance is an automatic repair measure, calling the repair program corresponding to the automatic repair measure to perform abnormal repair on the abnormal Redis instance; When the repair measure corresponding to the abnormal Redis instance is a manual repair measure, repair instruction information is sent to the repair personnel, and the repair instruction information is used to instruct the repair personnel to perform abnormal repair on the abnormal Redis instance.

4. The health diagnosis and processing method of a Redis instance according to claim 1, characterized in that: The health score model is based on which the health score of each Redis instance is determined according to the full amount of indicator data of each Redis instance, including: Based on the health scoring model, the probability density corresponding to each indicator type in the full indicator data of the Redis instance is calculated respectively, wherein the health scoring model is a model constructed based on the HBOS algorithm; Determine the probability density of the Redis instance based on the probability density corresponding to each of the indicator types; The probability density of the Redis instance is scaled to obtain a health score of the Redis instance.

5. The health diagnosis and processing method for a Redis instance according to any one of claims 1 to 4, characterized in that: Also includes: Visually output the real-time indicator data of the Redis instance through a visualization tool; The real-time indicator data includes: indicators of the Redis instance, indicators of the host to which the Redis instance belongs, logs of the Redis instance, and logs of the host to which the Redis instance belongs.

6. The health diagnosis and processing method for a Redis instance according to any one of claim 5, characterized in that: The collecting of full indicator data of at least one Redis instance, wherein the full indicator data includes real-time indicator data and historical indicator data within a preset historical time period, includes: Collect full indicator data of at least one Redis instance, store the full indicator data in ClickHouse, and store real-time indicator data in the full indicator data in MongoDB; Among them, the full amount of indicator data used to determine the health score of each Redis instance is obtained from the ClickHouse; the real-time indicator data of the abnormal Redis instance visualized by the visualization tool is obtained from the MongoDB.

7. A health diagnosis and processing device for a Redis instance, characterized in that: include: A collection unit, used to collect full indicator data of at least one Redis instance, wherein the full indicator data includes real-time indicator data and historical indicator data within a preset historical time period; A health diagnosis unit, used to determine the health score of each Redis instance based on the health scoring model and the full amount of indicator data of each Redis instance; The abnormal repair unit is used to determine the repair measures corresponding to the abnormal Redis instance whose health score is lower than a preset score threshold based on a pre-trained abnormal change judgment model and according to the real-time indicator data of the abnormal Redis instance.

8. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the steps of the health diagnosis processing method of the Redis instance described in any one of claims 1 to 6 are implemented.

9. A processor-readable storage medium storing a computer program, characterized in that: The computer program is used to enable the processor to execute the steps of the health diagnosis processing method of the Redis instance as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the health diagnosis and processing method of the Redis instance described in any one of claims 1 to 6 are implemented.