Method and device for executing repair operation, computer equipment and storage medium
Through the pre-built performance indicator prediction model and automatic repair mechanism, the problem of monitoring business operations in the information technology occupies a large amount of human resources, realizes automatic prediction and repair, reduces human resource occupation and abnormal situations, and improves system security.
Patent Information
- Application Number
- CN202411154327.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-11-29
AI Technical Summary
In the field of information technology, abnormal situations often occur in business processing of different processor architectures and operating systems, which require real-time monitoring and resolution by technicians, occupying a large amount of human resources.
Through the pre-constructed target performance indicator prediction model, the performance indicator value of the current cycle is predicted based on the actual performance indicator value of the previous few cycles, and compared it with the standard performance indicator interval, automatically perform repair operations and generate alarm notifications to reduce the consumption of human resources and abnormal situations occur.
It realizes automatic prediction and repair operations without real-time monitoring, reduces human resources waste, improves system security, promptly alerts and confirms that the repair is successful or failed, and avoids execution errors.
Smart Images

Figure CN119046044A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and specifically to methods, devices, computer equipment and storage media for performing repair operations. Background Art
[0002] In the field of information technology, in order to adapt to the actual needs of different work fields, various new processor architectures and operating systems have begun to be developed and put into use. However, due to the different processor architectures and different operating systems, various abnormal situations may occur when processing business, and technical personnel are required to stay on site at the customer site to monitor the business operation and provide solutions when abnormalities occur.
[0003] However, this monitoring method takes up a lot of human resources. Summary of the invention
[0004] In view of this, the present invention provides a method, apparatus, computer equipment, storage medium and program product for performing a repair operation to solve the problem that monitoring business operation status occupies a large amount of human resources.
[0005] In a first aspect, the present invention provides a method for performing a repair operation, the method comprising:
[0006] In a current cycle, obtaining actual performance indicator values corresponding to a target number of cycles before the current cycle and cycle identifiers corresponding to each cycle in the target number of cycles;
[0007] Inputting the actual performance indicator values and period identifiers respectively corresponding to the target number of periods into a pre-built target performance indicator prediction model to obtain the predicted performance indicator value of the current period output by the target performance indicator prediction model;
[0008] Obtaining a standard performance indicator value interval corresponding to the current period;
[0009] Determine whether the predicted performance indicator value of the current period is within the standard performance indicator value interval;
[0010] When it is determined that the predicted performance indicator value of the current period is not within the standard performance indicator value interval, a target repair operation is performed and an alarm notification is generated.
[0011] The method for performing a repair operation provided by the present invention has the following advantages:
[0012] In the current cycle, the predicted performance index value of the current cycle can be predicted based on the actual performance index values corresponding to the target number of cycles before the cycle, and then the predicted performance index value can be compared with the standard performance index interval to predict whether an abnormality will occur, so as to perform preventive operations in advance. Since the standard performance index interval can indicate the normal operation of the system, by comparing the predicted performance index value with the standard performance index interval, it can be determined whether an abnormality will occur in the current cycle, and the corresponding target repair operation can be performed to prevent the occurrence of abnormal conditions. At the same time, an alarm notification is generated, so that the technicians can understand the situation in time and perform manual intervention according to the actual situation. In this way, the target repair operation can be automatically predicted and executed without the need for real-time monitoring by the technicians, which can reduce the waste of human resources and avoid the occurrence of abnormal conditions. In addition, through timely alarms, the technicians can confirm whether the operation is successful when the system automatically performs the repair operation, avoid abnormal problems caused by execution errors, and provide double security for the system.
[0013] In an optional implementation, the target performance indicator prediction model is a time series model;
[0014] Before obtaining, in the current cycle, actual performance indicator values corresponding to the target number of cycles before the current cycle and cycle identifiers corresponding to each cycle in the target number of cycles, the method further includes:
[0015] Acquire multiple performance data groups, wherein each of the performance data groups includes coordinates corresponding to at least one data point, and different performance data groups include different numbers of data points, and the coordinates include a period identifier and a performance indicator value;
[0016] According to the coordinates of all data points included in each of the performance data groups, the initial performance indicator prediction model is fitted respectively to obtain a performance indicator prediction model corresponding to each of the performance data groups;
[0017] Obtaining an identifier of a target test cycle and an actual performance indicator value of the target test cycle;
[0018] According to the identifier of the target test cycle, obtain actual performance indicator values and cycle identifiers respectively corresponding to a first number of cycles before the target test cycle, wherein the first number is the number of data points in a first performance data group, and the first performance data group is any one of the multiple performance data groups;
[0019] Inputting the actual performance indicator values and the cycle identifiers respectively corresponding to the first number of cycles into a first performance indicator prediction model to obtain the predicted performance indicator value of the target test cycle output by the first performance indicator prediction model, wherein the first performance indicator prediction model is a performance indicator prediction model corresponding to the first performance data group;
[0020] Obtaining a stability coefficient corresponding to each of the performance indicator prediction models;
[0021] According to the predicted performance indicator value of the target test cycle output by each of the performance indicator prediction models, as well as the actual performance indicator value of the target test cycle, the preset reliability, and the stability coefficient corresponding to each of the performance indicator prediction models, the target performance indicator prediction model is selected from the performance indicator prediction models corresponding to the multiple performance data groups, wherein the target number is the same as the number of data points included in the target performance data group corresponding to the target performance indicator prediction model.
[0022] Specifically, too many or too few data points in the performance data group will lead to inaccurate fitting models, which will in turn lead to inaccurate predicted performance indicator values in the subsequent prediction process. Therefore, in this scheme, by using data groups with different numbers of data points to fit the model, multiple performance indicator prediction models can be obtained. By selecting the target performance indicator prediction model based on the prediction accuracy of these multiple performance indicator prediction models, an accurate model can be selected, so that the prediction results are more in line with the actual situation and are more conducive to timely detection of anomalies and taking recovery operations.
[0023] In an optional implementation, the target performance indicator prediction model is selected from the performance indicator prediction models corresponding to the multiple performance data groups according to the predicted performance indicator value of the target test cycle output by each performance indicator prediction model, the actual performance indicator value of the target test cycle, the preset reliability, and the stability coefficient corresponding to each performance indicator prediction model, including:
[0024] Determine a prediction error value of each of the performance indicator prediction models according to the predicted performance indicator value of the target test cycle output by each of the performance indicator prediction models and the actual performance indicator value of the target test cycle;
[0025] Determining whether each of the performance indicator prediction models meets a preset credibility standard according to the prediction error value of each of the performance indicator prediction models, the actual performance indicator value of the target test cycle, the preset credibility, and the stability coefficient corresponding to each of the performance indicator prediction models;
[0026] When it is determined that there is one of the performance indicator prediction models that meets the preset credibility standard, determining the performance indicator prediction model that meets the preset credibility standard as the target performance indicator prediction model;
[0027] or,
[0028] When it is determined that there are multiple performance indicator prediction models that meet the preset credibility standard, the preset credibility is increased to obtain a first confidence;
[0029] Determining whether each of the performance indicator prediction models meets the preset credibility standard again based on the prediction error value of each of the performance indicator prediction models, the actual performance indicator value of the target test cycle, the first confidence level, and the stability coefficient corresponding to each of the performance indicator prediction models;
[0030] Until it is determined that there is only one performance indicator prediction model that meets the preset credibility standard, the performance indicator prediction model that meets the preset credibility standard is determined as the target performance indicator prediction model.
[0031] Specifically, this solution determines whether each performance indicator prediction model meets the pre-set credibility standard. If multiple performance indicator prediction models meet the pre-set credibility standard, the confidence level is increased, thereby improving the selection standard, and finally only one performance indicator prediction model is selected as the target performance indicator prediction model. In this way, the selected target performance indicator prediction model is more accurate, and thus, it can more accurately predict whether an abnormality will occur.
[0032] In an optional implementation, the target performance indicator prediction model uses the following expression:
[0033]
[0034] Among them, x n+1 is the predicted performance index value of the current cycle, P is the average performance index value calculated according to the actual performance index values corresponding to the target number of cycles, n is the target number, i is the cycle identifier, and X i is the actual performance index value of the i-th cycle among the target number of cycles, r i For the X i The corresponding impact factor, S is the cycle length, and ε is the preset fluctuation value.
[0035] In an optional implementation, the preset credibility standard adopts the following expression:
[0036]
[0037] Among them, en+1 is the prediction error value, S is the cycle length, CI is the preset confidence, μ is the stability coefficient, and n is the target number.
[0038] In an optional embodiment, the method further includes:
[0039] Each time a log is generated, determining whether the type of the log is an error log;
[0040] When it is determined that the type of the log is an error log, the log is input into a pre-built log analysis model to obtain an abnormal scenario indicated by the log;
[0041] According to the abnormal scenario, obtaining at least one repair instruction corresponding to the abnormal scenario;
[0042] A repair operation is performed according to at least one of the repair instructions.
[0043] Specifically, the automated error log processing in this solution reduces the need for manual intervention and the workload of technical personnel, which means that it can reduce the occupation of human resources. In addition, this solution can quickly identify problem patterns and automatically take corresponding measures through the pre-built log analysis model, so that abnormal scenarios can be restored in time, reducing the impact of abnormal situations on the business running the service platform.
[0044] In an optional implementation manner, the acquiring the standard performance indicator value interval corresponding to the current period includes:
[0045] Determine an average performance index value according to actual performance index values corresponding to the target number of cycles;
[0046] Determine the standard deviation according to the actual performance index values and the average performance index values corresponding to the target number of cycles;
[0047] The standard performance indicator value interval is determined according to the standard deviation and the average performance indicator value.
[0048] Specifically, since the services performed by the service platform in different time periods are different, that is, the operation of the service platform in different time periods is different, if a common preset performance indicator value interval is compared with the predicted performance indicator value to predict whether the current cycle will be abnormal, it may lead to inaccurate prediction results. Therefore, in this solution, the actual performance indicator value before the current cycle is taken to determine the standard performance indicator value interval, so that the operation status in the recent period can be understood. When determining the predicted performance indicator value, the predicted performance indicator value can be compared with the operation status in the recent period, which is more in line with the actual situation and makes the prediction result more accurate.
[0049] In a second aspect, the present invention provides a device for performing a repair operation, the device comprising:
[0050] An acquisition module is used to acquire, in a current cycle, actual performance indicator values corresponding to a target number of cycles before the current cycle and a cycle identifier corresponding to each cycle in the target number of cycles;
[0051] A prediction module, used to input the actual performance indicator values and cycle identifiers corresponding to the target number of cycles into a pre-built target performance indicator prediction model, and obtain the predicted performance indicator value of the current cycle output by the target performance indicator prediction model;
[0052] The acquisition module is further used to acquire a standard performance indicator value interval corresponding to the current cycle;
[0053] A determination module, used to determine whether the predicted performance indicator value of the current period is within the standard performance indicator value interval;
[0054] The repair module is used to perform a target repair operation and generate an alarm notification when it is determined that the predicted performance indicator value of the current cycle is not within the standard performance indicator value interval.
[0055] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for performing a repair operation according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0056] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to cause a computer to execute the method for performing a repair operation according to the first aspect or any corresponding embodiment thereof.
[0057] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the method for performing a repair operation according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0059] Figure 1is a flow chart of a method for performing a repair operation according to an embodiment of the present invention;
[0060] Figure 2 is a flow chart of another method for performing a repair operation according to an embodiment of the present invention;
[0061] Figure 3 is a flowchart of another method for performing a repair operation according to an embodiment of the present invention;
[0062] Figure 4 is a flowchart of another method for performing a repair operation according to an embodiment of the present invention;
[0063] Figure 5 is a structural block diagram of an apparatus for performing a repair operation according to an embodiment of the present invention;
[0064] Figure 6 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0066] The embodiments of the present invention can be applied to various service platforms or terminals. The service platform can be a separate server or a server cluster, and the computer device can be a server, etc. For example, a bank service platform, a cloud service platform, etc. The terminal can be a desktop computer, a laptop computer, etc. The following is an example of a service platform.
[0067] The embodiment of the present invention provides a method for performing a repair operation, which can reduce the occupation of human resources by automatically predicting whether an abnormality will occur in the future based on the actual performance value before the current cycle, and performing prevention and warning in advance.
[0068] According to an embodiment of the present invention, a method embodiment for performing a repair operation is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0069] In this embodiment, a method for performing a repair operation is provided, which can be performed by the above-mentioned service platform or terminal. Figure 1 is a flowchart of a method for performing a repair operation according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0070] Step S101 : in a current cycle, obtaining actual performance indicator values corresponding to a target number of cycles before the current cycle and a cycle identifier corresponding to each cycle in the target number of cycles.
[0071] The actual performance indicator value may be the average system load of the service platform, CPU occupancy, memory occupancy, disk data read and write efficiency, network bandwidth, etc., or the CPU occupancy and memory occupancy of each process of the service platform. The cycle identifier may be used to indicate the corresponding time interval, for example, 12:01-12:15.
[0072] Specifically, the service platform can monitor its actual performance index value, and in each cycle, it can use the actual performance value and cycle identifier corresponding to the consecutive target number of cycles immediately before the cycle. For example, if the target number is 5 and the current cycle is 13:16-13:30, the service platform can obtain the actual performance values corresponding to 12:01-12:15, 12:16-12:30, 12:31-12:45, 12:46 to 13:00, and 13:01 to 13:15.
[0073] Step S102: input the actual performance indicator values and the period identifiers corresponding to the target number of periods into a pre-built target performance indicator prediction model to obtain the predicted performance indicator value of the current period output by the target performance indicator prediction model.
[0074] The target performance indicator prediction model may be a time series model. For example, the target performance indicator prediction model may be expressed as follows:
[0075]
[0076] x n+1 is the predicted performance index value of the current cycle, and P is the average performance index value calculated based on the actual performance index values corresponding to the target number of cycles, that is, n is the target number, i is the cycle identifier, X i is the actual performance index value of the i-th cycle among the target number of cycles, r i For X i The corresponding impact factor (also called autocorrelation coefficient) is used to indicate the i The impact on the final prediction performance index value, S is the cycle length, and ε is the preset fluctuation value.
[0077] It should be noted that different types of actual performance values can be input into different performance indicator prediction models. That is, the service platform can first determine the type of actual performance value obtained, and then obtain the corresponding performance indicator prediction model according to the type of actual performance value. The type of actual performance value is used to indicate the source of the actual performance value, such as system, process, etc., and to indicate whether the actual performance value is average load, CPU usage, memory usage, disk data read and write efficiency, network bandwidth, etc.
[0078] Step S103, obtaining a standard performance indicator value interval corresponding to the current cycle.
[0079] Method 1: The service platform may obtain a preset standard performance indicator value interval as the standard performance indicator value interval corresponding to the current period.
[0080] Method 2: The service platform can first determine the average performance indicator value based on the actual performance indicator values corresponding to the target number of periods. Then, determine the standard deviation based on the actual performance indicator values and the average performance indicator values corresponding to the target number of periods. Finally, determine the standard performance indicator value interval based on the standard deviation and the average performance indicator value, that is, the difference between the average performance indicator value and the preset multiple standard deviation is used as the left interval boundary value of the standard performance indicator value interval, and the sum of the average performance indicator value and the preset multiple standard deviation is used as the right interval boundary value of the standard performance indicator value interval. The preset multiple can be 3.
[0081] Step S104, determining whether the predicted performance indicator value of the current period is within the standard performance indicator value interval.
[0082] Step S105: When it is determined that the predicted performance indicator value of the current cycle is not within the standard performance indicator value interval, a target repair operation is performed and an alarm notification is generated.
[0083] Specifically, after calculating the predicted performance index value of the current cycle, the service platform can determine whether the predicted performance index value of the current cycle is within the standard performance index value interval. If so, it is considered that there will be no abnormal situation in the current cycle. If not, it is considered that there will be abnormal situation in the current cycle. The service platform can repair the process currently running on the service platform based on the predicted performance index value of the current cycle and the standard performance index value interval. Specifically, it can be: when the above-mentioned actual performance value is for the entire system of the service platform, the priority of each process in the currently running process and the resource situation occupied by each process can be obtained, and the process service with a priority lower than the preset threshold can be closed. When the above-mentioned actual performance value is for a certain process, the process can be restarted. In addition, the service platform can generate an alarm notification to prompt the technical staff to check in time. In the process of automatically executing the target repair operation, if an abnormal execution occurs, manual intervention is carried out in time to ensure the normal execution of the service platform's business.
[0084] The method for performing the repair operation provided in this embodiment can predict the predicted performance index value of the current cycle according to the actual performance index values corresponding to the target number of cycles before the cycle in the current cycle, and then compare the predicted performance index value with the standard performance index interval to predict whether an abnormality will occur, so as to perform preventive operations in advance. Since the standard performance index interval can indicate the normal operation of the system, by comparing the predicted performance index value with the standard performance index interval, it can be determined whether an abnormality will occur in the current cycle, and the corresponding target repair operation can be performed to prevent the occurrence of abnormal conditions. At the same time, an alarm notification is generated, so that the technician can understand the situation in time and perform manual intervention according to the actual situation. In this way, the target repair operation can be automatically predicted and executed without the need for real-time monitoring by the technician, which can reduce the waste of human resources and avoid the occurrence of abnormal conditions. In addition, through timely alarms, the technician can confirm whether the operation is successful when the system automatically performs the repair operation, avoid abnormal problems caused by execution errors, and provide double security for the system.
[0085] In this embodiment, a method for selecting a performance indicator prediction model is provided, which can be executed by the above-mentioned service platform or terminal. Figure 2 is a flowchart of a method for performing a repair operation according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0086] Step S201, obtaining multiple performance data groups.
[0087] Each performance data group includes coordinates corresponding to at least one data point, and different performance data groups include different numbers of data points, and the coordinates include a period identifier and a performance indicator value. For example, performance data group A may include 12 data points, performance data group B may include 16 data points, and performance data group C may include 20 data points.
[0088] Step S202: fitting the initial performance indicator prediction model respectively according to the coordinates of all data points included in each performance data group to obtain a performance indicator prediction model corresponding to each performance data group.
[0089] The initial performance indicator prediction model can be a time series model, such as an Arima model. The time series model can include an autoregressive term (AR), a moving average term (MA), and a difference term (d). The autoregressive term indicates that the model takes into account the impact of the historical value of the time series data on its current value, the moving average term takes into account the impact of random errors or noise on the predicted performance indicator value of the current period, and the difference term indicates the number of difference operations performed to make the time series data stable.
[0090] Specifically, taking the target performance data group as an example, the service platform can input the coordinates of all data points included in the target performance data group (hereinafter referred to as time series data) into the initial performance indicator prediction model. The initial performance indicator prediction model can first perform a stationarity check on the time series data. If the result of the stationarity check is that the time series data is stationary, the subsequent model fitting operation can be performed. If the result of the stationarity check is that the time series data is not stationary, the time series data can be differentially operated to remove abnormal values until the time series data after the difference becomes stable, and then the subsequent model coefficient fitting operation is performed to obtain the corresponding model coefficient fitting value. Then, the model coefficient fitting value can be substituted into the initial performance indicator prediction model to obtain the performance indicator prediction model corresponding to the performance data group.
[0091] In some optional implementations, L1, L2 regularization or dropout techniques may be used during the model fitting process to prevent the model from overfitting.
[0092] In some optional implementations, as time goes by, new time series data is continuously generated, and these data can be used to improve the model.
[0093] Step S203, obtaining the identifier of the target test cycle and the actual performance indicator value of the target test cycle.
[0094] Step S204: According to the identifier of the target test cycle, actual performance indicator values and cycle identifiers corresponding to a first number of cycles before the target test cycle are obtained.
[0095] The first number is the number of data points in a first performance data group, and the first performance data group is any one of a plurality of performance data groups.
[0096] Step S205: input the actual performance indicator values and the cycle identifiers respectively corresponding to the first number of cycles into the first performance indicator prediction model to obtain the predicted performance indicator value of the target test cycle output by the first performance indicator prediction model.
[0097] Among them, the first performance indicator prediction model is a performance indicator prediction model corresponding to the first performance data group.
[0098] Step S206, obtaining the stability coefficient corresponding to each performance indicator prediction model.
[0099] The stability coefficient may be determined during the above-mentioned stability check process.
[0100] Step S207, based on the predicted performance indicator value of the target test cycle output by each performance indicator prediction model, as well as the actual performance indicator value of the target test cycle, the preset reliability, and the stability coefficient corresponding to each performance indicator prediction model, a target performance indicator prediction model is selected from the performance indicator prediction models corresponding to multiple performance data groups.
[0101] The target quantity is the same as the number of data points included in the target performance data group corresponding to the target performance indicator prediction model.
[0102] Step 1: Determine the prediction error value of each performance indicator prediction model based on the predicted performance indicator value of the target test cycle output by each performance indicator prediction model and the actual performance indicator value of the target test cycle.
[0103] Step 1 can be expressed as follows: n+1 =x n+1 -X n+1 , where e n+1 is the prediction error value, x n+1 is the predicted performance index value of the target test cycle, X n+1 is the actual performance indicator value of the target test cycle.
[0104] Step 2: Determine whether each performance indicator prediction model meets the preset credibility standard based on the prediction error value of each performance indicator prediction model, the actual performance indicator value of the target test cycle, the preset credibility, and the stability coefficient corresponding to each performance indicator prediction model.
[0105] The default credibility standard is expressed as follows:
[0106]
[0107] Where S is the cycle length, CI is the preset confidence, and μ is the stability coefficient. The cycle length can be 15 minutes, 1 hour, etc. The preset confidence can be 95%.
[0108] Step three: when it is determined that there is a performance indicator prediction model that meets the preset credibility standard, the performance indicator prediction model that meets the preset credibility standard is determined as the target performance indicator prediction model.
[0109] Step 4: When it is determined that there are multiple performance indicator prediction models that meet the preset credibility standard, the preset credibility is increased to obtain a first confidence.
[0110] For example, the first confidence level may be 98%.
[0111] Step five, re-determine whether each performance indicator prediction model meets the preset credibility standard based on the prediction error value of each performance indicator prediction model, the actual performance indicator value of the target test cycle, the first confidence level, and the stability coefficient corresponding to each performance indicator prediction model.
[0112] Step six: until it is determined that only one performance indicator prediction model meets the preset credibility standard, the performance indicator prediction model that meets the preset credibility standard is determined as the target performance indicator prediction model.
[0113] In some optional implementations, the service platform can use each performance indicator prediction model to predict multiple prediction periods respectively, and obtain the predicted performance indicator values corresponding to the multiple prediction periods respectively. In addition, the service platform can also obtain the actual performance indicator value corresponding to each of the multiple prediction periods. Then, for each performance indicator prediction model, the prediction error value corresponding to the performance indicator prediction model can be calculated based on the predicted performance indicator values corresponding to the multiple prediction periods respectively predicted by the performance indicator prediction model, and the actual performance indicator value corresponding to each prediction period. Finally, the target performance indicator prediction model can be selected based on the prediction error value corresponding to each performance indicator prediction model, that is, the performance indicator prediction model with the smallest prediction error value can be selected. In this way, by combining the prediction errors of multiple prediction periods, a target performance indicator prediction model with accurate prediction can be selected.
[0114] In some optional embodiments, the prediction error value corresponding to the above-mentioned performance indicator prediction model may be: for each prediction period, the absolute value of the difference between the actual performance indicator value and the predicted performance indicator value of the prediction period is calculated, and then, based on the absolute value of the difference corresponding to each prediction period, the average absolute value of the difference is calculated, and the average absolute value of the difference is determined as the prediction error value corresponding to the performance indicator prediction model.
[0115] The method for selecting a performance indicator prediction model provided in this embodiment, because too many or too few data points in the performance data group will lead to an inaccurate fitted model, which will further lead to inaccurate predicted performance indicator values in the subsequent prediction process. Therefore, in this scheme, multiple performance indicator prediction models can be obtained by fitting models using data groups with different numbers of data points. By selecting the target performance indicator prediction model based on the prediction accuracy of these multiple performance indicator prediction models, an accurate model can be selected, so that the prediction result is more in line with the actual situation, which is more conducive to timely detection of anomalies and taking recovery operations.
[0116] In this embodiment, a method for performing a repair operation is provided, which can be performed by the above-mentioned service platform or terminal. Figure 3 is a flowchart of a method for performing a repair operation according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0117] Step S301: for each log generated, determine whether the type of the log is an error log.
[0118] Specifically, the service platform may be installed with various log collection tools, such as rsyslog and Fluentd. The service platform may store a database, and the database may also have its own binary log, such as binlog. The log may be a log collected by a log collection tool, or a log of a database. After the service platform generates a log, the type field of the log may be parsed. When the parsed type is an error log, step S302 may be executed. When the parsed type is a normal log, the next log may be continued to be generated.
[0119] Step S302: When it is determined that the type of the log is an error log, the log is input into a pre-built log analysis model to obtain an abnormal scenario indicated by the log.
[0120] The log analysis model may be a machine learning model, such as a logistic regression model, a decision tree model, a random forest model, etc.
[0121] Step S303: According to the abnormal scenario, at least one repair instruction corresponding to the abnormal scenario is obtained.
[0122] Specifically, the service platform may pre-select and store at least one abnormal scenario identifier and a repair instruction sheet corresponding to the identifier of each abnormal scenario (the repair instruction sheet may include one or more repair instructions). Since an abnormal scenario may be caused by different reasons, for each abnormal scenario, the service platform may record the repair instructions corresponding to each reason.
[0123] Step S304: performing a repair operation according to at least one repair instruction.
[0124] Specifically, the priority of at least one repair instruction corresponding to each abnormal scenario is different.
[0125] The service platform can execute the repair instructions according to the priority from high to low. After executing the first repair instruction with the first priority, the service platform can obtain the execution result corresponding to the first repair instruction. If the execution result is successful, it is considered that the abnormal scene is repaired. If the execution result is a failure, it is considered that the abnormal scene has not been repaired, and the second repair instruction with the second priority can be executed, and the execution result corresponding to the second repair instruction can be obtained. If the execution result is successful, it is considered that the abnormal scene has been repaired. If the execution result is a failure, it is considered that the abnormal scene has not been repaired, and the repair instructions with lower priority can continue to be executed. And so on, until all the repair instructions corresponding to the abnormal scenes determined in the above step S302 are executed. If the execution result is called a failure after the repair instruction with the lowest priority is executed, an alarm notification can be generated to prompt the technician to check and repair the abnormal scene in time.
[0126] In some optional implementations, for a target abnormal scenario (any abnormal scenario), the priority may be determined in the following manner:
[0127] Step 1: Obtain multiple historical logs corresponding to the target abnormal scenario.
[0128] Step 2: According to each historical log, determine the reason corresponding to each historical log.
[0129] Step three, count at least one reason that occurs and the number of times each reason occurs.
[0130] Step 4: Determine the priority of each reason based on the number of times each reason occurs.
[0131] Among them, the number of occurrences is proportional to the priority.
[0132] Step 5: Obtain repair instructions corresponding to each cause.
[0133] Step six, determining the priority of the repair instruction corresponding to the target cause as the priority corresponding to the target cause.
[0134] The target cause is any one of at least one cause.
[0135] In this way, since the number of occurrences can indicate the probability of each cause leading to the occurrence of the target abnormal scenario, after determining the priority of the repair instruction corresponding to the target scenario according to the above method, when the repair instruction is subsequently executed, the success rate of repairing the target abnormal scenario can be higher after executing the repair instruction with the highest priority, which can improve the repair efficiency.
[0136] The method for performing repair operations provided in this embodiment reduces the need for manual intervention and the workload of technical personnel through automated error log processing, which can also reduce the occupation of human resources. In addition, this solution can quickly identify problem patterns and automatically take corresponding measures through the pre-built log analysis model, so as to restore abnormal scenarios in a timely manner and reduce the impact of abnormal situations on the business running the service platform.
[0137] In this embodiment, a method for performing a repair operation is provided, which can be performed by the above-mentioned service platform or terminal. Figure 4 is a flowchart of a method for performing a repair operation according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:
[0138] Step S401, obtaining target transaction data.
[0139] The target transaction data may include the start and end time of the transaction, the identifier of the database table involved, the executed structured query language (SQL), etc.
[0140] Step S402: input the target transaction data into a pre-built transaction data analysis model to obtain a target scenario indicated by the target transaction data.
[0141] Among them, the transaction data analysis model can be a machine learning model, such as a logistic regression model, a decision tree model, a random forest model, etc.
[0142] Step S403: when it is determined that the target scene is an abnormal scene, at least one repair instruction corresponding to the abnormal scene is obtained according to the abnormal scene.
[0143] Step S404: performing a repair operation according to at least one repair instruction.
[0144] The specific processing of step S403 to step S404 can refer to the specific processing of step S303 to step S304 mentioned above, which will not be repeated here.
[0145] The method for performing repair operations provided in this embodiment reduces the need for manual intervention and the workload of technical personnel through automated transaction data processing, which can also reduce the occupation of human resources. In addition, this solution can quickly identify problem patterns and automatically take corresponding measures through the pre-built transaction data analysis model, so as to restore abnormal scenarios in a timely manner and reduce the impact of abnormal situations on the business running the service platform.
[0146] The above-mentioned repair operation based on the historical actual performance indicator value, log and transaction data can be performed simultaneously. In this way, detecting anomalies from different dimensions can make the basis for detecting anomalies more comprehensive, so that anomalies can be detected more accurately and comprehensively. In some optional implementations, different abnormal scenarios can be detected and repaired in different ways. For example, assuming that there are 100 abnormal scenarios that may occur in the service platform, 20 of which can be detected and repaired by Figure 1 The steps shown in the figure are used to detect and repair anomalies. 30 types of anomalies can be detected and repaired by Figure 3 The steps shown in the figure are used to detect and repair anomalies. 50 types of anomalies can be detected and repaired by Figure 4 The steps shown in the figure are used to detect and repair anomalies. If an anomaly occurs at a certain moment, and at the same time Figure 1 The steps shown are as follows Figure 3 The steps shown are as follows Figure 4 The steps shown all detect anomalies, which may result in multiple repair operations being performed simultaneously, wasting resources and possibly causing more serious errors. Therefore, different anomaly scenarios can be detected and repaired in different ways to avoid this problem.
[0147] In the present embodiment, a device for performing a repair operation is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0148] This embodiment provides a device for performing a repair operation, such as Figure 5 As shown, including:
[0149] An acquisition module 501 is used to acquire, in a current cycle, actual performance indicator values corresponding to a target number of cycles before the current cycle and a cycle identifier corresponding to each cycle in the target number of cycles;
[0150] Prediction module 502, used to input the actual performance indicator values and period identifiers corresponding to the target number of periods into a pre-built target performance indicator prediction model, and obtain the predicted performance indicator value of the current period output by the target performance indicator prediction model;
[0151] The acquisition module 501 is further used to acquire the standard performance indicator value interval corresponding to the current cycle;
[0152] A determination module 503 is used to determine whether the predicted performance index value of the current cycle is within the standard performance index value interval;
[0153] The repair module 504 is used to perform a target repair operation and generate an alarm notification when it is determined that the predicted performance indicator value of the current cycle is not within the standard performance indicator value interval.
[0154] In some optional implementations, the target performance indicator prediction model is a time series model;
[0155] The acquisition module 501 is further used for:
[0156] Acquire multiple performance data groups, wherein each performance data group includes coordinates corresponding to at least one data point, and different performance data groups include different numbers of data points, and the coordinates include a period identifier and a performance indicator value;
[0157] According to the coordinates of all data points included in each performance data group, the initial performance indicator prediction model is fitted respectively to obtain a performance indicator prediction model corresponding to each performance data group;
[0158] Obtaining an identifier of a target test cycle and an actual performance indicator value of the target test cycle;
[0159] According to the identifier of the target test cycle, obtain actual performance indicator values and cycle identifiers corresponding to a first number of cycles before the target test cycle, wherein the first number is the number of data points in a first performance data group, and the first performance data group is any one of the multiple performance data groups;
[0160] Inputting the actual performance indicator values and the period identifiers respectively corresponding to the first number of periods into a first performance indicator prediction model to obtain a predicted performance indicator value of a target test period output by the first performance indicator prediction model, wherein the first performance indicator prediction model is a performance indicator prediction model corresponding to the first performance data group;
[0161] Obtaining a stability coefficient corresponding to each performance indicator prediction model;
[0162] According to the predicted performance indicator value of the target test cycle output by each performance indicator prediction model, the actual performance indicator value of the target test cycle, the preset reliability, and the stability coefficient corresponding to each performance indicator prediction model, a target performance indicator prediction model is selected from the performance indicator prediction models corresponding to multiple performance data groups, wherein the target number is the same as the number of data points included in the target performance data group corresponding to the target performance indicator prediction model.
[0163] In some optional implementations, the acquisition module 501 is specifically configured to:
[0164] Determine a prediction error value of each performance indicator prediction model according to the predicted performance indicator value of the target test cycle output by each performance indicator prediction model and the actual performance indicator value of the target test cycle;
[0165] Determine whether each performance indicator prediction model meets the preset credibility standard according to the prediction error value of each performance indicator prediction model, the actual performance indicator value of the target test period, the preset credibility, and the stability coefficient corresponding to each performance indicator prediction model;
[0166] When it is determined that there is a performance indicator prediction model that meets the preset credibility standard, the performance indicator prediction model that meets the preset credibility standard is determined as the target performance indicator prediction model;
[0167] or,
[0168] When it is determined that there are multiple performance indicator prediction models that meet the preset credibility standard, the preset credibility is increased to obtain a first confidence level;
[0169] Re-determining whether each performance indicator prediction model meets the preset credibility standard based on the prediction error value of each performance indicator prediction model, the actual performance indicator value of the target test cycle, the first confidence level, and the stability coefficient corresponding to each performance indicator prediction model;
[0170] Until it is determined that there is only one performance indicator prediction model that meets the preset credibility standard, the performance indicator prediction model that meets the preset credibility standard is determined as the target performance indicator prediction model.
[0171] In some optional implementations, the target performance indicator prediction model uses the following expression:
[0172]
[0173] Among them, x n+1is the predicted performance index value of the current cycle, P is the average performance index value calculated based on the actual performance index values corresponding to the target number of cycles, n is the target number, i is the cycle identifier, and X i is the actual performance index value of the i-th cycle among the target number of cycles, r i For X i The corresponding impact factor, S is the cycle length, and ε is the preset fluctuation value.
[0174] In some optional implementations, the preset credibility standard adopts the following expression:
[0175]
[0176] Among them, e n+1 is the prediction error value, S is the cycle length, CI is the preset confidence, μ is the stability coefficient, and n is the target number.
[0177] In some optional implementations, the repair module 504 is further configured to:
[0178] Each time a log is generated, determine whether the log type is an error log;
[0179] When it is determined that the type of the log is an error log, the log is input into a pre-built log analysis model to obtain the abnormal scenario indicated by the log;
[0180] According to the abnormal scenario, obtaining at least one repair instruction corresponding to the abnormal scenario;
[0181] A repair operation is performed according to at least one repair instruction.
[0182] In some optional implementations, the acquisition module 501 is specifically configured to:
[0183] Determine the average performance index value according to the actual performance index values corresponding to the target number of cycles;
[0184] Determine the standard deviation based on the actual performance index values and the average performance index values corresponding to the target number of cycles;
[0185] According to the standard deviation and the average performance index value, the standard performance index value range is determined.
[0186] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0187] The device for performing the repair operation in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0188] The embodiment of the present invention also provides a computer device having the above Figure 5 The apparatus for performing the repair operation is shown.
[0189] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0190] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware integrated circuit. The hardware integrated circuit may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.
[0191] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0192] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0193] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0194] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0195] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0196] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0197] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for performing a repair operation, It is characterized in that The method comprises: In a current cycle, obtaining actual performance indicator values corresponding to a target number of cycles before the current cycle and cycle identifiers corresponding to each cycle in the target number of cycles; Inputting the actual performance indicator values and period identifiers corresponding to the target number of periods into a pre-built target performance indicator prediction model to obtain the predicted performance indicator value of the current period output by the target performance indicator prediction model; Obtaining a standard performance indicator value interval corresponding to the current period; Determine whether the predicted performance indicator value of the current period is within the standard performance indicator value interval; When it is determined that the predicted performance indicator value of the current period is not within the standard performance indicator value interval, a target repair operation is performed and an alarm notification is generated.
2. The method according to claim 1, It is characterized in that The target performance indicator prediction model is a time series model; Before obtaining, in the current cycle, actual performance indicator values corresponding to the target number of cycles before the current cycle and cycle identifiers corresponding to each cycle in the target number of cycles, the method further includes: Acquire multiple performance data groups, wherein each of the performance data groups includes coordinates corresponding to at least one data point, and different performance data groups include different numbers of data points, and the coordinates include a period identifier and a performance indicator value; According to the coordinates of all data points included in each of the performance data groups, the initial performance indicator prediction model is fitted respectively to obtain a performance indicator prediction model corresponding to each of the performance data groups; Obtaining an identifier of a target test cycle and an actual performance indicator value of the target test cycle; According to the identifier of the target test cycle, obtain actual performance indicator values and cycle identifiers respectively corresponding to a first number of cycles before the target test cycle, wherein the first number is the number of data points in a first performance data group, and the first performance data group is any one of the multiple performance data groups; Inputting the actual performance indicator values and the cycle identifiers respectively corresponding to the first number of cycles into a first performance indicator prediction model to obtain the predicted performance indicator value of the target test cycle output by the first performance indicator prediction model, wherein the first performance indicator prediction model is a performance indicator prediction model corresponding to the first performance data group; Obtaining a stability coefficient corresponding to each of the performance indicator prediction models; According to the predicted performance indicator value of the target test cycle output by each of the performance indicator prediction models, as well as the actual performance indicator value of the target test cycle, the preset reliability, and the stability coefficient corresponding to each of the performance indicator prediction models, the target performance indicator prediction model is selected from the performance indicator prediction models corresponding to the multiple performance data groups, wherein the target number is the same as the number of data points included in the target performance data group corresponding to the target performance indicator prediction model.
3. The method according to claim 2, It is characterized in that The target performance indicator prediction model is selected from the performance indicator prediction models corresponding to the multiple performance data groups according to the predicted performance indicator value of the target test cycle output by each performance indicator prediction model, the actual performance indicator value of the target test cycle, the preset reliability, and the stability coefficient corresponding to each performance indicator prediction model, including: Determine a prediction error value of each of the performance indicator prediction models according to the predicted performance indicator value of the target test cycle output by each of the performance indicator prediction models and the actual performance indicator value of the target test cycle; Determining whether each of the performance indicator prediction models meets a preset credibility standard according to the prediction error value of each of the performance indicator prediction models, the actual performance indicator value of the target test cycle, the preset credibility, and the stability coefficient corresponding to each of the performance indicator prediction models; When it is determined that there is one of the performance indicator prediction models that meets the preset credibility standard, determining the performance indicator prediction model that meets the preset credibility standard as the target performance indicator prediction model; or, When it is determined that there are multiple performance indicator prediction models that meet the preset credibility standard, the preset credibility is increased to obtain a first confidence; Determining whether each of the performance indicator prediction models meets the preset credibility standard again based on the prediction error value of each of the performance indicator prediction models, the actual performance indicator value of the target test cycle, the first confidence level, and the stability coefficient corresponding to each of the performance indicator prediction models; Until it is determined that there is only one performance indicator prediction model that meets the preset credibility standard, the performance indicator prediction model that meets the preset credibility standard is determined as the target performance indicator prediction model.
4. The method according to any one of claims 1 to 3, It is characterized in that The target performance indicator prediction model adopts the following expression: Among them, x n+1 is the predicted performance index value of the current cycle, P is the average performance index value calculated according to the actual performance index values corresponding to the target number of cycles, n is the target number, i is the cycle identifier, and X i is the actual performance index value of the i-th cycle among the target number of cycles, r i For the X i The corresponding impact factor, S is the cycle length, and ε is the preset fluctuation value.
5. The method according to claim 3, It is characterized in that The preset credibility standard adopts the following expression: Among them, e n+1 is the prediction error value, S is the cycle length, CI is the preset confidence, μ is the stability coefficient, and n is the target number.
6. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: Each time a log is generated, determining whether the type of the log is an error log; When it is determined that the type of the log is an error log, the log is input into a pre-built log analysis model to obtain an abnormal scenario indicated by the log; According to the abnormal scenario, obtaining at least one repair instruction corresponding to the abnormal scenario; A repair operation is performed according to at least one of the repair instructions.
7. The method according to any one of claims 1 to 3, It is characterized in that The obtaining of a standard performance indicator value interval corresponding to the current period includes: Determine an average performance index value according to actual performance index values corresponding to the target number of cycles; Determine the standard deviation according to the actual performance index values and the average performance index values corresponding to the target number of cycles; The standard performance indicator value interval is determined according to the standard deviation and the average performance indicator value.
8. A device for performing a repair operation, It is characterized in that The device comprises: An acquisition module is used to acquire, in a current cycle, actual performance indicator values corresponding to a target number of cycles before the current cycle and a cycle identifier corresponding to each cycle in the target number of cycles; A prediction module, used to input the actual performance indicator values and cycle identifiers corresponding to the target number of cycles into a pre-built target performance indicator prediction model, and obtain the predicted performance indicator value of the current cycle output by the target performance indicator prediction model; The acquisition module is further used to acquire a standard performance indicator value interval corresponding to the current cycle; A determination module, used to determine whether the predicted performance indicator value of the current period is within the standard performance indicator value interval; The repair module is used to perform a target repair operation and generate an alarm notification when it is determined that the predicted performance indicator value of the current cycle is not within the standard performance indicator value interval.
9. A computer device, It is characterized in that include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for performing a repair operation according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for performing a repair operation according to any one of claims 1 to 7.
