Database alarm method and device

Through the database alarm method, the prediction model is used to automatically judge database abnormalities and generate real-time alarm information, which solves the problems of low alarm accuracy and processing lag in the existing technology, and improves the stability and data security of database operation.

CN118796613BActive Publication Date: 2024-12-06SUZHOU JIBEISI DATA TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411275801.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-06
Estimated Expiration
2044-09-12

AI Technical Summary

Technical Problem

The existing database alarm system relies on manual rules, resulting in low alarm accuracy, high cost, and lag in handling exceptions, which may lead to business interruption or data loss.

Method used

The database alarm method is adopted, and the database operation parameter set is obtained, and the database operation parameter set is input into the prediction model for prediction and state prediction, real-time alarm information is generated, and the parameter prediction sub-model and state prediction sub-model are used to automatically judge database abnormalities and generate alarm information.

Benefits of technology

It improves the real-time and accuracy of database alarms, reduces manual intervention, reduces lag in handling exceptions, and ensures data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796613B_ABST
    Figure CN118796613B_ABST
Patent Text Reader

Abstract

The present invention provides a database alarm method and device, which can be applied to the database and data security technology fields. The method includes: obtaining a set of operating parameters of a database within a first predetermined period; inputting the set of operating parameters within the first predetermined period into a parameter prediction submodel of a database alarm prediction model to obtain a set of prediction parameters within a second predetermined period; inputting the set of prediction parameters within the second predetermined period into a state prediction submodel of the database alarm prediction model to obtain multiple state prediction results of the database within the second predetermined period, wherein each state prediction result represents a state prediction result of the database at a moment within the second predetermined period; and generating database alarm information when the state prediction result represents an abnormality in the database, the database alarm information including an alarm time and a state prediction result, the alarm time representing the moment when the database is abnormal in the state prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of database and data security, and in particular to a database alarm method and device. Background Art

[0002] During the operation of the database, if a failure or performance degradation occurs, it may lead to serious consequences such as business interruption and data loss. Therefore, by monitoring the database in real time through the monitoring and alarm system, potential problems can be discovered in time and corresponding treatment measures can be taken to ensure the continuity and stability of the business and the security of the data.

[0003] In the process of implementing the present invention, the inventors found that the prior art has at least the following problems: the database system usually relies on manually set alarm rules for alarms. Since the database alarm needs to monitor many indicators, the judgment thresholds for various indicators cannot be unified, and manual analysis will lead to low alarm accuracy and high labor costs. In addition, database alarms are usually handled by operation and maintenance personnel after detecting abnormal database indicators and issuing alarms. There is a lag in the handling of database abnormalities, which may cause business interruption or data loss. Summary of the invention

[0004] In view of the above problems, the present invention provides a database alarm method and device.

[0005] According to a first aspect of the present invention, there is provided a database alarm method, comprising: obtaining an operating parameter set of a database within a first predetermined period, wherein the operating parameter set within the first predetermined period includes a plurality of first operating parameters corresponding one-to-one to a plurality of moments; inputting the operating parameter set within the first predetermined period into a parameter prediction sub-model of a database alarm prediction model, to obtain a prediction parameter set within a second predetermined period, wherein the second predetermined period is a period after the first predetermined period, and the prediction parameter set within the second predetermined period includes a plurality of prediction parameters corresponding one-to-one to a plurality of moments; inputting the prediction parameter set within the second predetermined period into a state prediction sub-model of the database alarm prediction model, to obtain a plurality of state prediction results of the database within the second predetermined period, wherein each state prediction result represents a state of the database within the second predetermined period. The state prediction result at a moment within the scheduled time period; and when the state prediction result indicates that an abnormality has occurred in the database, a database alarm information is generated, the database alarm information includes the alarm time and the state prediction result, the alarm time indicates the moment when the abnormality has occurred in the database in the state prediction result; wherein the parameter prediction sub-model is trained in the following manner: when it is determined that the parameter characteristics of the operating parameter set within the first scheduled time period do not match the predetermined parameter characteristic set, the parameter prediction sub-model is trained using the prediction parameter set within the second scheduled time period and the operating parameter set within the second scheduled time period, wherein the predetermined parameter characteristic set includes the parameter characteristics of the historical training samples used to train the parameter prediction sub-model, and wherein the operating parameter set within the second scheduled time period includes a plurality of second operating parameters corresponding one-to-one to a plurality of moments.

[0006] According to an embodiment of the present invention, the database alarm method also includes: utilizing a feature matching component in a parameter prediction sub-model to perform feature type matching on parameter features of an operating parameter set within a first predetermined period of time and a predetermined parameter feature set; and determining that the parameter features of the operating parameter set within the first predetermined period of time do not match the predetermined parameter feature set when the predetermined parameter feature set does not include the parameter feature type of the operating parameter set within the first predetermined period of time.

[0007] According to an embodiment of the present invention, a set of operating parameters within a first predetermined period of time is input into a parameter prediction sub-model of a database alarm prediction model to obtain a set of prediction parameters within a second predetermined period of time, including: determining parameter characteristics of the database within the first predetermined period of time based on the set of operating parameters within the first predetermined period of time; and determining the set of prediction parameters within the second predetermined period of time using the parameter prediction sub-model based on the parameter characteristics.

[0008] According to an embodiment of the present invention, based on the operating parameter set within the first predetermined time period, the parameter characteristics of the database within the first predetermined time period are determined, including: mapping multiple first operating parameters in the operating parameter set within the first predetermined time period in a coordinate system to obtain a parameter curve of the first predetermined time period; respectively determining the slope of the parameter curve at each moment in the first predetermined time period; determining the periodic characteristics of the operating parameter set within the first predetermined time period; determining the initial parameter characteristics based on the curve slope, the periodic characteristics and the operating parameter set within the first predetermined time period; and reducing the dimension of the initial parameter characteristics to obtain the parameter characteristics.

[0009] According to an embodiment of the present invention, initial parameter characteristics are determined based on the curve slope, periodic characteristics and a set of operating parameters within a first predetermined time period, including: performing feature selection on the curve slope, periodic characteristics and a set of operating parameters within the first predetermined time period to obtain key curve slopes, key periodic characteristics and key operating parameters; and determining initial parameter characteristics based on the key curve slopes and key periodic characteristics.

[0010] According to an embodiment of the present invention, the prediction parameters include multiple prediction sub-parameters of different types; the prediction parameter set within the second predetermined time period is input into the state prediction sub-model of the database alarm prediction model to obtain multiple state prediction results of the database within the second predetermined time period, including: inputting the prediction parameter set within the second predetermined time period into the state prediction sub-model, and determining the multiple state prediction results of the database within the second predetermined time period based on multiple prediction sub-parameters in each prediction parameter in the prediction parameter set within the second predetermined time period and multiple alarm parameter thresholds.

[0011] According to an embodiment of the present invention, the database alarm method also includes: determining that the state prediction result represents a database abnormality when the parameter difference between the prediction sub-parameter and the alarm parameter threshold corresponding to the prediction sub-parameter satisfies a preset size relationship with the predetermined difference threshold; determining the abnormality type and abnormality level of the database based on the parameter type and parameter difference of the prediction sub-parameter; generating database alarm information when the state prediction result represents a database abnormality, including: determining that the state prediction result corresponds to a target time within a second predetermined time period; generating database alarm information based on the target time and the state prediction result, wherein the state prediction result includes the abnormality type and abnormality level; and uploading the database alarm information to a server.

[0012] According to an embodiment of the present invention, the database alarm method also includes: obtaining an initial set of operating parameters within a first predetermined time period; deleting abnormal parameters outside the operating parameter threshold in the initial operating parameter set; using a data completion method to complete the missing data in the initial operating parameter set to obtain completed operating parameters; performing data standardization on the completed operating parameters to obtain an operating parameter set within the first predetermined time period; and storing the operating parameter set within the first predetermined time period in a database.

[0013] According to an embodiment of the present invention, a database alarm prediction model is trained based on the following method: obtaining a set of operating parameters of the database within a target predetermined period and an operating state of the database, wherein the target predetermined period includes a first sub-period and a second sub-period, and the first sub-period is a period before the second sub-period; inputting the set of operating parameters within the first sub-period into an initial parameter prediction sub-model to obtain a set of prediction parameters within the second sub-period; adjusting model parameters of the initial parameter prediction sub-model based on the set of operating parameters within the second sub-period and the set of prediction parameters within the second sub-period to obtain a parameter prediction sub-model; inputting the set of operating parameters within the target predetermined period into an initial state prediction sub-model to obtain multiple state prediction results of the database within the target predetermined period; adjusting model parameters of the initial state prediction sub-model based on multiple state prediction results within the target predetermined period and the operating state of the database within the target predetermined period to obtain a state prediction sub-model; and determining a database alarm prediction model based on the parameter prediction sub-model and the state prediction sub-model.

[0014] A second aspect of the present invention provides a database alarm device, comprising:

[0015] A parameter determination module, used to obtain an operating parameter set in a first predetermined period from a database, wherein the operating parameter set in the first predetermined period includes a plurality of first operating parameters corresponding to a plurality of time moments in one-to-one correspondence;

[0016] A parameter prediction module, used to input the operating parameter set within the first predetermined period into the parameter prediction sub-model of the database alarm prediction model to obtain the prediction parameter set within the second predetermined period, wherein the second predetermined period is a period after the first predetermined period, and the prediction parameter set within the second predetermined period includes a plurality of prediction parameters corresponding to a plurality of time points one by one;

[0017] A result prediction module, used to input the prediction parameter set within the second predetermined period into the state prediction sub-model of the database alarm prediction model, to obtain a plurality of state prediction results of the database within the second predetermined period, wherein each state prediction result represents a state prediction result of the database at a moment within the second predetermined period; and

[0018] An information generation module, used to generate database alarm information when the state prediction result indicates that the database is abnormal, the database alarm information includes an alarm time and a state prediction result, and the alarm time indicates the time when the database is abnormal in the state prediction result;

[0019] Among them, the parameter prediction sub-model is trained using the following modules:

[0020] A model training module is used to train a parameter prediction sub-model using a prediction parameter set within a second predetermined period and an operating parameter set within the second predetermined period when it is determined that the parameter characteristics of an operating parameter set within a first predetermined period do not match a predetermined parameter characteristic set, wherein the predetermined parameter characteristic set includes parameter characteristics of historical training samples used to train the parameter prediction sub-model, and wherein the operating parameter set within the second predetermined period includes a plurality of second operating parameters corresponding one-to-one to a plurality of time moments.

[0021] A third aspect of the present invention provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0022] The fourth aspect of the present invention further provides a computer-readable storage medium on which a computer program or instruction is stored, and the steps of the above method are implemented when the above computer program or instruction is executed by a processor.

[0023] The fifth aspect of the present invention also provides a computer program product, including a computer program or instructions, which implement the steps of the above method when executed by a processor.

[0024] According to an embodiment of the present invention, the operating parameter set of the database within the first predetermined period is input into the parameter prediction sub-model to obtain the prediction parameter set within the second predetermined period, and the prediction parameter set within the second predetermined period is processed by the state prediction sub-model to determine multiple state prediction results within the second predetermined period, and database alarm information is generated based on the state prediction results. The future state of the database can be predicted based on the operating parameter set of the current period or the historical period, so that the real-time performance of the database alarm information is stronger, and the data security issues caused by database failures are reduced. In the case of determining that the parameter features of the operating parameter set within the first predetermined period do not match the predetermined parameter feature set, the parameter prediction sub-model is updated and trained using the prediction parameter set within the second predetermined period and the operating parameter set within the second predetermined period to ensure the accuracy of the database state prediction results determined based on the prediction parameter set within the second predetermined period. In addition, after the parameter prediction sub-model learns the parameter features of the operating parameter set within the first predetermined period, it can process more parameter feature types, thereby improving the generalization ability of the parameter prediction sub-model. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings.

[0026] Figure 1 An application scenario diagram of a database alarm method, apparatus, device, medium, and program product according to an embodiment of the present invention is shown.

[0027] Figure 2 A flow chart of a database alarm method according to an embodiment of the present invention is shown.

[0028] Figure 3 A network structure diagram of a fast and slow learning network of a database alarm method according to an embodiment of the present invention is shown.

[0029] Figure 4 A structural block diagram of a database alarm device according to an embodiment of the present invention is shown.

[0030] Figure 5 A block diagram of an electronic device suitable for implementing a database alarm method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0031] Below, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of concepts of the present invention.

[0032] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0033] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0034] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0035] In the technical solution of the present invention, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, invention and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0036] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present invention provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.

[0037] An embodiment of the present invention provides a database alarm method, comprising: obtaining an operating parameter set of a database within a first predetermined time period, wherein the operating parameter set within the first predetermined time period includes a plurality of first operating parameters corresponding one-to-one to a plurality of moments; inputting the operating parameter set within the first predetermined time period into a parameter prediction sub-model of a database alarm prediction model to obtain a prediction parameter set within a second predetermined time period, wherein the second predetermined time period is a time period after the first predetermined time period, and the prediction parameter set within the second predetermined time period includes a plurality of prediction parameters corresponding one-to-one to a plurality of moments; inputting the prediction parameter set within the second predetermined time period into a state prediction sub-model of the database alarm prediction model to obtain a plurality of state prediction results of the database within the second predetermined time period, wherein each state prediction result represents the state of the database within the second predetermined time period. The state prediction result of a moment within the first predetermined period; and when the state prediction result indicates that the database is abnormal, a database alarm information is generated, the database alarm information includes the alarm time and the state prediction result, the alarm time indicates the moment when the database in the state prediction result is abnormal; wherein the parameter prediction sub-model is trained in the following manner: when it is determined that the parameter characteristics of the operating parameter set within the first predetermined period do not match the predetermined parameter characteristic set, the parameter prediction sub-model is trained using the prediction parameter set within the second predetermined period and the operating parameter set within the second predetermined period, wherein the predetermined parameter characteristic set includes the parameter characteristics of the historical training samples used to train the parameter prediction sub-model, and wherein the operating parameter set within the second predetermined period includes multiple second operating parameters corresponding one-to-one to multiple moments.

[0038] Figure 1 The application scenario diagram of the database alarm method, apparatus, device, medium and program product according to the embodiment of the present invention is schematically shown.

[0039] like Figure 1As shown, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0040] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0041] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0042] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0043] It should be noted that the database alarm method provided in the embodiment of the present invention can generally be executed by the server 105. Accordingly, the database alarm device provided in the embodiment of the present invention can generally be set in the server 105. The database alarm method provided in the embodiment of the present invention can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the database alarm device provided in the embodiment of the present invention can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.

[0044] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0045] The following will be based on Figure 1 The scene described by Figure 2~Figure 3 The database alarm method of the embodiment of the invention is described in detail.

[0046] Figure 2 The flowchart of the database alarm method according to an embodiment of the present invention is schematically shown.

[0047] like Figure 2 As shown, the database alarm method of this embodiment includes operations S210 to S240.

[0048] In operation S210, an operating parameter set within a first predetermined period of time is acquired from a database, wherein the operating parameter set within the first predetermined period of time includes a plurality of first operating parameters corresponding one-to-one to a plurality of time moments.

[0049] In operation S220, the operating parameter set within the first predetermined time period is input into the parameter prediction sub-model of the database alarm prediction model to obtain the prediction parameter set within the second predetermined time period, wherein the second predetermined time period is the time period after the first predetermined time period, and the prediction parameter set within the second predetermined time period includes multiple prediction parameters corresponding one-to-one to multiple time moments.

[0050] In operation S230, the prediction parameter set within the second predetermined period is input into the state prediction sub-model of the database alarm prediction model to obtain multiple state prediction results of the database within the second predetermined period, wherein each state prediction result represents the state prediction result of the database at a moment within the second predetermined period.

[0051] In operation S240, when the state prediction result indicates that the database is abnormal, database alarm information is generated. The database alarm information includes an alarm time and a state prediction result. The alarm time indicates the time when the database is abnormal in the state prediction result.

[0052] According to an embodiment of the present invention, an agent collector, such as a database agent or a database monitoring agent, can be used to collect the operating parameters of the database in real time, and the first operating parameters of multiple moments collected by the agent collector within a first predetermined time period are combined in a collection order to obtain a set of operating parameters of the database within the first predetermined time period.

[0053] According to an embodiment of the present invention, a database alarm prediction model can be used to predict the state of a database in a future time period based on a set of operating parameters of the database in a time period, and includes a parameter prediction sub-model and a state prediction sub-model. The parameter prediction sub-model can be used to predict the set of operating parameters of the database in a future time period based on a set of operating parameters of the database in a time period, and the state prediction sub-model can be used to predict the state of the database in the future time period based on the predicted operating parameters of the database in the time period.

[0054] According to an embodiment of the present invention, a set of operating parameters within a first predetermined period is input into a parameter prediction sub-model of a database alarm prediction model to obtain a set of prediction parameters within a second predetermined period, wherein the second predetermined period is a period after the first predetermined period, and the set of prediction parameters within the second predetermined period includes multiple prediction parameters corresponding one-to-one to multiple time moments.

[0055] According to an embodiment of the present invention, a set of prediction parameters within the second predetermined time period is input into the state prediction sub-model of the database alarm prediction model to obtain multiple state prediction results of the database within the second predetermined time period, wherein each state prediction result represents the state prediction result of the database at a moment within the second predetermined time period.

[0056] According to an embodiment of the present invention, when a status prediction result indicates that a database abnormality has occurred, database alarm information is generated, wherein the status prediction result indicating that a database abnormality has occurred includes indicating that insufficient database resources lead to instance suspension, improper database configuration leads to instance service failure to operate normally, and internal network problems of the cluster lead to inability to communicate between nodes, etc. The database alarm information includes an alarm time and a status prediction result, and the alarm time indicates the time when the database abnormality occurs in the status prediction result.

[0057] According to an embodiment of the present invention, the parameter prediction sub-model is trained in the following manner: when it is determined that the parameter features of the operating parameter set within the first predetermined period do not match the predetermined parameter feature set, the parameter prediction sub-model is trained using the prediction parameter set within the second predetermined period and the operating parameter set within the second predetermined period, so that the updated parameter prediction sub-model can determine the prediction parameter set within the second predetermined period based on the operating parameter set within the first predetermined period, the error between the operating parameter set within the second predetermined period and the preset error threshold satisfies the preset size relationship, and the parameter features of the operating parameter set within the first predetermined period are added to the predetermined parameter feature set. Wherein, the predetermined parameter feature set includes the parameter features of the historical training samples used to train the parameter prediction sub-model, and wherein the operating parameter set within the second predetermined period includes multiple second operating parameters corresponding one-to-one to multiple time moments.

[0058] According to an embodiment of the present invention, the operating parameter set of the database within the first predetermined period is input into the parameter prediction sub-model to obtain the prediction parameter set within the second predetermined period, and the prediction parameter set within the second predetermined period is processed by the state prediction sub-model to determine multiple state prediction results within the second predetermined period, and database alarm information is generated based on the state prediction results. The future state of the database can be predicted based on the operating parameter set of the current period or the historical period, so that the real-time performance of the database alarm information is stronger, and the data security issues caused by database failures are reduced. In the case of determining that the parameter features of the operating parameter set within the first predetermined period do not match the predetermined parameter feature set, the parameter prediction sub-model is updated and trained using the prediction parameter set within the second predetermined period and the operating parameter set within the second predetermined period to ensure the accuracy of the database state prediction results determined based on the prediction parameter set within the second predetermined period. In addition, after the parameter prediction sub-model learns the parameter features of the operating parameter set within the first predetermined period, it can process more parameter feature types, thereby improving the generalization ability of the parameter prediction sub-model.

[0059] According to an embodiment of the present invention, the database alarm method also includes: utilizing a feature matching component in a parameter prediction sub-model to perform feature type matching on parameter features of an operating parameter set within a first predetermined period of time and a predetermined parameter feature set; and determining that the parameter features of the operating parameter set within the first predetermined period of time do not match the predetermined parameter feature set when the predetermined parameter feature set does not include the parameter feature type of the operating parameter set within the first predetermined period of time.

[0060] According to an embodiment of the present invention, the parameter prediction sub-model may include a model for processing constantly changing time series data, such as a Fast and Slow Learning Network (FSNet), including a fast learning component, namely a feature matching component and a slow learning component, wherein the feature matching component is used to determine the parameter characteristics of a set of operating parameters within a first predetermined time period, and to determine whether the parameter characteristics match a predetermined parameter feature set.

[0061] According to an embodiment of the present invention, when the parameter features in the predetermined parameter feature set do not include the parameter features of the operating parameter set within the first predetermined period, it is determined that the parameter features of the operating parameter set within the first predetermined period do not match the predetermined parameter feature set.

[0062] Figure 3 The network structure diagram of the fast and slow learning networks of the database alarm method according to the embodiment of the present invention is schematically shown.

[0063] like Figure 3As shown, the fast and slow learning network 301 includes an FSNet module 312, L convolution blocks and a regressor. After the operating parameter set within the first predetermined time period is input into the temporal convolution network, FSNet extracts features of the operating parameter set, and after the parameter features are processed by the L convolution blocks, the state prediction result within the second predetermined time period is obtained through the regressor, wherein each convolution block 311 includes two dilated convolutions, after the output features of the previous convolution block are input into the current convolution block, the data after the dilated convolution is obtained after two dilated convolutions, and the data after the dilated convolution is residually connected with the output data of the previous convolution block to obtain the output features of the current convolution block.

[0064] The FSNet module 312 includes a feature matching component 3121 and a slow learning component 3122, wherein the feature matching component 3121 includes an adapter and an associative memory, the adapter is used to determine whether the parameter feature matches the predetermined parameter feature set, and the associative memory is used to store and recall important and recurring parameter features observed during the training process. When it is determined that the parameter features in the predetermined parameter feature set do not include the parameter features of the operating parameter set within the first predetermined period, the feature matching component 3121 sends a parameter adjustment instruction to the slow learning component 3122, and the slow learning component 3122 adjusts the model parameters of FSNet according to the predicted parameter set within the second predetermined period and the operating parameter set within the second predetermined period output by FSNet after the second predetermined period.

[0065] According to an embodiment of the present invention, a feature matching component is used to determine that when a predetermined parameter feature set does not include the parameter feature type of an operating parameter set within a first predetermined time period, it is determined that the parameter feature of the operating parameter set within the first predetermined time period does not match the predetermined parameter feature set, so as to determine that the parameter prediction sub-model needs to be updated, thereby increasing the types of parameter features that the parameter prediction sub-model can handle, thereby improving the generalization ability of the parameter prediction sub-model.

[0066] According to an embodiment of the present invention, a set of operating parameters within a first predetermined period of time is input into a parameter prediction sub-model of a database alarm prediction model to obtain a set of prediction parameters within a second predetermined period of time, including: determining parameter characteristics of the database within the first predetermined period of time based on the set of operating parameters within the first predetermined period of time; and determining the set of prediction parameters within the second predetermined period of time using the parameter prediction sub-model based on the parameter characteristics.

[0067] According to an embodiment of the present invention, based on the operating parameter set within the first predetermined time period, a feature extraction method is used to determine the parameter characteristics of the database within the first predetermined time period, and based on the parameter characteristics, a parameter prediction sub-model is used to determine the predicted parameter set within the second predetermined time period.

[0068] According to an embodiment of the present invention, based on a set of operating parameters within a first predetermined time period, the parameter characteristics within the time period are first determined, and the parameter characteristics of the time period are further used to predict a set of predicted parameters within a second predetermined time period, thereby improving the accuracy of the set of predicted parameters within the second predetermined time period and thus improving the accuracy of database alarms.

[0069] According to an embodiment of the present invention, based on the operating parameter set within the first predetermined time period, the parameter characteristics of the database within the first predetermined time period are determined, including: mapping multiple first operating parameters in the operating parameter set within the first predetermined time period in a coordinate system to obtain a parameter curve of the first predetermined time period; respectively determining the slope of the parameter curve at each moment in the first predetermined time period; determining the periodic characteristics of the operating parameter set within the first predetermined time period; determining the initial parameter characteristics based on the curve slope, the periodic characteristics and the operating parameter set within the first predetermined time period; and reducing the dimension of the initial parameter characteristics to obtain the parameter characteristics.

[0070] According to an embodiment of the present invention, multiple first operating parameters in a set of operating parameters within a first predetermined period of time are mapped in a coordinate system to obtain a parameter curve of the first predetermined period of time, wherein each first operating parameter may include multiple first operating sub-parameters, for example, central processing unit (CPU) usage, memory occupancy, disk input / output (Input / Output), network bandwidth, number of database connections, cache hit rate, etc., and the multiple first operating sub-parameters are respectively mapped in a coordinate system corresponding to the sub-parameter to obtain sub-parameter curves of the multiple sub-parameters of the first predetermined period of time.

[0071] According to an embodiment of the present invention, the curve slope of the parameter curve at each moment in the first predetermined period is determined respectively, wherein the curve slope can be determined by using a moving window method, and the curve slope at moment t can be determined by using a specified window size w. Calculate as shown in formula (1):

[0072] (1)

[0073] in, express The parameter value at the moment, express The parameter value at the moment.

[0074] According to an embodiment of the present invention, the periodic characteristics of the operating parameter set within a first predetermined time period are determined, wherein the time series data can be converted from time domain data to frequency domain data using Fast Fourier Transform (FFT), so as to determine the periodic characteristics of the operating parameter set through the frequency domain data, wherein since the periodic characteristics are reflected in the peak position in the spectrum, corresponding to the main period of the indicator data, the frequency corresponding to the peak can be extracted as the periodic characteristics of the operating parameter set.

[0075] According to an embodiment of the present invention, based on the slope of the curve, the periodic characteristics and the set of operating parameters within the first predetermined time period, the initial parameter characteristics are determined, and the initial parameter characteristics are reduced in dimension to obtain the parameter characteristics, wherein principal component analysis (PCA) can be used to perform data dimensionality reduction, and the covariance matrix of the set of operating parameters within the first predetermined time period is subjected to feature decomposition to obtain multiple eigenvalues ​​and corresponding eigenvectors, and the eigenvectors corresponding to a preset number of the largest eigenvalues ​​are selected in order of the size of the eigenvalues ​​as the basis of the new feature space, and the initial parameter characteristics are projected onto the new feature space to obtain the initial parameter characteristics after dimensionality reduction, that is, the parameter characteristics.

[0076] According to an embodiment of the present invention, the operating parameter set within the first predetermined time period is processed to obtain the parameter characteristics of the database within the first predetermined time period, thereby ensuring that the parameter characteristics include the curve slope of the first operating parameter and the periodic characteristics of the operating parameter set, thereby improving the accuracy of characteristic determination.

[0077] According to an embodiment of the present invention, initial parameter characteristics are determined based on the curve slope, periodic characteristics and a set of operating parameters within a first predetermined time period, including: performing feature selection on the curve slope, periodic characteristics and a set of operating parameters within the first predetermined time period to obtain key curve slopes, key periodic characteristics and key operating parameters; and determining initial parameter characteristics based on the key curve slopes and key periodic characteristics.

[0078] According to an embodiment of the present invention, feature selection is performed on the curve slope, periodic characteristics and the set of operating parameters within the first predetermined time period to obtain key curve slopes, key periodic characteristics and key operating parameters, wherein the chi-square validation can be used to calculate the amount of information that each of the multiple curve slopes, multiple periodic characteristics and multiple operating parameters in the set of operating parameters within the first predetermined time period contains about the parameter characteristics of the database within the first predetermined time period.

[0079] According to an embodiment of the present invention, in the chi-square verification, the information amount of the parameter characteristics of the database within the first predetermined period is calculated as shown in formula (2):

[0080] (2)

[0081] in, represents the amount of information of the i-th parameter, M is the number of possible values ​​of the parameter features of the database, represents the observation frequency, that is, the number of parameters with the same parameter value as the i-th parameter whose actual parameter characteristics are the j-th parameter characteristics. represents the expected frequency, the number of parameters with the same parameter value as the i-th parameter whose expected parameter characteristics are the j-th parameter characteristics, It can be calculated using formula (3):

[0082] (3)

[0083] in, It indicates the proportion of parameters with the same value as the i-th parameter among all parameters of the same type. It represents the proportion of parameter features with the same value as the jth parameter feature among all parameter features in the database, and N is the total number of samples.

[0084] According to an embodiment of the present invention, after determining the amount of information of each of multiple curve slopes, multiple periodic characteristics and multiple operating parameters in a set of operating parameters within a first predetermined time period, several curve slopes, periodic characteristics and several operating parameters in a set of operating parameters within a first predetermined time period with the highest amount of information are selected to obtain key curve slopes, key periodic characteristics and key operating parameters, and based on the key curve slopes, key periodic characteristics and key operating parameters, initial parameter characteristics are determined.

[0085] According to an embodiment of the present invention, feature selection is performed on the curve slope, periodic characteristics and the set of operating parameters within the first predetermined time period to determine the initial parameter characteristics. Under the premise of ensuring that the parameters in the initial parameter characteristics sufficiently reflect the parameter characteristics, the amount of parameters included in the initial parameter characteristics can be reduced, thereby reducing the amount of data that needs to be processed during the database alarm process and improving the efficiency and real-time performance of the database alarm.

[0086] According to an embodiment of the present invention, the prediction parameters include multiple prediction sub-parameters of different types; the prediction parameter set within the second predetermined time period is input into the state prediction sub-model of the database alarm prediction model to obtain multiple state prediction results of the database within the second predetermined time period, including: inputting the prediction parameter set within the second predetermined time period into the state prediction sub-model, and determining the multiple state prediction results of the database within the second predetermined time period based on multiple prediction sub-parameters in each prediction parameter in the prediction parameter set within the second predetermined time period and multiple alarm parameter thresholds.

[0087] According to an embodiment of the present invention, the prediction parameter includes a plurality of prediction sub-parameters of different types. The prediction parameter set within the second predetermined period is input into the state prediction sub-model, and based on the plurality of prediction sub-parameters in each prediction parameter in the prediction parameter set within the second predetermined period and the plurality of alarm parameter thresholds, the relationship between the plurality of prediction sub-parameters of the prediction parameter at each moment within the second predetermined period and the parameter alarm threshold corresponding to the prediction sub-parameter is determined by comparing, and the plurality of state prediction results of the database within the second predetermined period are determined.

[0088] According to an embodiment of the present invention, a set of prediction parameters within a second predetermined time period is input into a state prediction sub-model. The state prediction sub-model determines multiple state prediction results of a database based on multiple prediction sub-parameters and multiple alarm parameter thresholds in each prediction parameter, thereby improving the calculation efficiency of the state prediction results and ensuring the accuracy of the state prediction results.

[0089] According to an embodiment of the present invention, the database alarm method also includes: determining that the state prediction result represents a database abnormality when the parameter difference between the prediction sub-parameter and the alarm parameter threshold corresponding to the prediction sub-parameter satisfies a preset size relationship with the predetermined difference threshold; determining the abnormality type and abnormality level of the database based on the parameter type and parameter difference of the prediction sub-parameter; generating database alarm information when the state prediction result represents a database abnormality, including: determining that the state prediction result corresponds to a target time within a second predetermined time period; generating database alarm information based on the target time and the state prediction result, wherein the state prediction result includes the abnormality type and abnormality level; and uploading the database alarm information to a server.

[0090] According to an embodiment of the present invention, for prediction sub-parameters whose higher values ​​indicate a greater possibility of representing database abnormality, such as CPU usage, memory occupancy, number of database connections, etc., when it is determined that the parameter difference between the prediction sub-parameter and the alarm parameter threshold corresponding to the prediction sub-parameter is greater than a predetermined difference threshold, it is determined that the status prediction result represents database abnormality.

[0091] According to an embodiment of the present invention, for a prediction sub-parameter whose lower value represents a greater possibility of database abnormality, such as a cache hit rate, when it is determined that the parameter difference between the prediction sub-parameter and the alarm parameter threshold corresponding to the prediction sub-parameter is less than a predetermined difference threshold, it is determined that the status prediction result represents database abnormality.

[0092] According to an embodiment of the present invention, the abnormality type and abnormality level of the database are determined based on the parameter type and parameter difference of the prediction sub-parameter. For example, when the parameter difference between the memory occupancy rate and the alarm parameter threshold corresponding to the memory occupancy rate is greater than the predetermined difference threshold, the abnormality type of the database is determined to be too high memory occupancy rate. For example, if the parameter difference is 30 and the predetermined difference threshold is 10, it can be determined that a serious abnormality has occurred. If the parameter difference is 12 and the predetermined difference threshold is 10, it can be determined that a slight abnormality has occurred.

[0093] According to an embodiment of the present invention, it is determined that the state prediction result corresponds to a target moment within a second predetermined period, wherein the state prediction result characterizes a database abnormality, that is, the state of the database at the target moment within the second predetermined period is abnormal, and therefore, database alarm information is generated based on the target moment and the state prediction result, wherein the state prediction result includes anomaly type and anomaly level, and the database alarm information is uploaded to the server.

[0094] According to the embodiment of the present invention, the relationship between the prediction sub-parameter and the alarm parameter threshold is used to determine the abnormality type and abnormality level of the database, so that the cause of the database abnormality can be quickly and accurately located so as to eliminate the abnormality and restore the normal operation of the database. Database alarm information is generated based on the target time corresponding to the state prediction result and the abnormality type and abnormality level of the database, so that the time when the database may be abnormal, the abnormality type and the abnormality level can be accurately warned, so as to take timely measures to ensure data security.

[0095] According to an embodiment of the present invention, the database alarm method also includes: obtaining an initial set of operating parameters within a first predetermined time period; deleting abnormal parameters outside the operating parameter threshold in the initial operating parameter set; using a data completion method to complete the missing data in the initial operating parameter set to obtain completed operating parameters; performing data standardization on the completed operating parameters to obtain an operating parameter set within the first predetermined time period; and storing the operating parameter set within the first predetermined time period in a database.

[0096] According to an embodiment of the present invention, since the initial operating parameter set within the first predetermined period collected by the Agent collector may include abnormal values, missing values, etc., it is necessary to perform data preprocessing on the initial operating parameter set within the first predetermined period to obtain the operating parameter set within the first predetermined period.

[0097] According to an embodiment of the present invention, abnormal parameters outside the operating parameter threshold in the initial operating parameter set are deleted, wherein the operating parameter threshold ranges corresponding to different sub-parameters are different. The missing data in the initial operating parameter set are completed using a data completion method to obtain completed operating parameters, and the operating parameter set within the first predetermined time period is stored in a database, wherein the data completion method includes completing the data using the mean, median, and interpolation method. The completed operating parameters are data standardized to obtain the operating parameter set within the first predetermined time period, and the completed operating parameters can be standardized using the mean and standard deviation of the completed operating parameters, as shown in formula (4):

[0098] (4)

[0099] in, represents the i-th data after standardization, represents the i-th original data, represents the standard deviation of the completed operating parameters, Represents the mean of the completed running parameters.

[0100] According to an embodiment of the present invention, through operations such as outlier processing, data completion, and data standardization, the specificity of the data can be reduced, thereby avoiding overfitting of the database alarm prediction model and improving the generalization ability of the database alarm prediction method.

[0101] According to an embodiment of the present invention, a database alarm prediction model is trained based on the following method: obtaining a set of operating parameters of the database within a target predetermined period and an operating state of the database, wherein the target predetermined period includes a first sub-period and a second sub-period, and the first sub-period is a period before the second sub-period; inputting the set of operating parameters within the first sub-period into an initial parameter prediction sub-model to obtain a set of prediction parameters within the second sub-period; adjusting model parameters of the initial parameter prediction sub-model based on the set of operating parameters within the second sub-period and the set of prediction parameters within the second sub-period to obtain a parameter prediction sub-model; inputting the set of operating parameters within the target predetermined period into an initial state prediction sub-model to obtain multiple state prediction results of the database within the target predetermined period; adjusting model parameters of the initial state prediction sub-model based on multiple state prediction results within the target predetermined period and the operating state of the database within the target predetermined period to obtain a state prediction sub-model; and determining a database alarm prediction model based on the parameter prediction sub-model and the state prediction sub-model.

[0102] According to an embodiment of the present invention, a set of operating parameters of a database within a target predetermined time period and an operating status of the database are obtained, wherein the operating status of the database can be determined based on expert knowledge, including whether the database is abnormal, the abnormality type and abnormality level of the database abnormality, the target predetermined time period includes a first sub-period and a second sub-period, the first sub-period is the period before the second sub-period, and the set of operating parameters within the target predetermined time period can be obtained after data preprocessing of the initial operating parameter set within the target predetermined time period.

[0103] According to an embodiment of the present invention, the operating parameter set within the first sub-period is input into the initial parameter prediction sub-model to obtain the prediction parameter set within the second sub-period, and based on the operating parameter set within the second sub-period and the prediction parameter set within the second sub-period, the initial parameter prediction sub-model prediction error between the operating parameter set within the second sub-period and the prediction parameter set within the second sub-period is determined, and based on the initial parameter prediction sub-model prediction error, the model parameters of the initial parameter prediction sub-model are adjusted to obtain the parameter prediction sub-model.

[0104] According to an embodiment of the present invention, a set of operating parameters within a target predetermined period is input into an initial state prediction sub-model to obtain a plurality of state prediction results of the database within the target predetermined period, and based on the operating state of the database within the target predetermined period, the operating state of the database at the moment of the plurality of state prediction results within the target predetermined period is determined, and based on the plurality of state prediction results within the target predetermined period and the operating state at the moment of the plurality of state prediction results within the target predetermined period, the prediction error of the initial state prediction sub-model is determined, and based on the prediction error of the initial state prediction sub-model, the model parameters of the initial state prediction sub-model are adjusted to obtain a state prediction sub-model.

[0105] According to an embodiment of the present invention, the initial state prediction sub-model may include a classification model such as a random forest, which divides the data space through a tree structure and determines the abnormal type and abnormal level of the database based on parameter differences and a predetermined difference threshold.

[0106] According to an embodiment of the present invention, a database alarm prediction model is determined based on a parameter prediction sub-model and a state prediction sub-model.

[0107] According to an embodiment of the present invention, the operating parameter set of the first sub-period is used to determine the prediction parameter set of the second sub-period, and the parameters of the initial parameter prediction sub-model are adjusted based on the prediction parameter set of the second sub-period and the operating parameter set of the second sub-period, so that the parameter prediction sub-model after the parameter adjustment is more accurate in predicting the parameter set. The operating parameter set within the target predetermined period is used to determine multiple state prediction results within the target predetermined period, and based on the state prediction results and the database operating state within the target predetermined period, the parameters of the initial state prediction sub-model are adjusted, so that the state prediction sub-model after the parameter adjustment is more accurate in judging the database operating state. Based on the parameter prediction sub-model and the state prediction sub-model, a database alarm prediction model is determined, thereby ensuring that the operating parameter set can be used to accurately predict the parameter set of the future period, and determine the operating state of the database in the future period, thereby improving the accuracy of the database alarm.

[0108] Based on the above database alarm method, the present invention also provides a database alarm device. Figure 4 The device is described in detail.

[0109] Figure 4 The structural block diagram of the database alarm device according to an embodiment of the present invention is schematically shown.

[0110] like Figure 4 As shown, the database alarm device 400 of this embodiment includes a parameter determination module 410 , a parameter prediction module 420 , a result prediction module 430 and an information generation module 440 .

[0111] The parameter determination module 410 is used to obtain an operating parameter set of the database within a first predetermined period, wherein the operating parameter set within the first predetermined period includes a plurality of first operating parameters corresponding one-to-one to a plurality of moments. In one embodiment, the parameter determination module 410 can be used to perform the operation S210 described above, which will not be described in detail herein.

[0112] The parameter prediction module 420 is used to input the operating parameter set within the first predetermined period into the parameter prediction sub-model of the database alarm prediction model to obtain the prediction parameter set within the second predetermined period, wherein the second predetermined period is a period after the first predetermined period, and the prediction parameter set within the second predetermined period includes multiple prediction parameters corresponding to multiple moments one by one. In one embodiment, the parameter prediction module 420 can be used to perform the operation S220 described above, which will not be repeated here.

[0113] The result prediction module 430 is used to input the prediction parameter set within the second predetermined period into the state prediction sub-model of the database alarm prediction model to obtain multiple state prediction results of the database within the second predetermined period, wherein each state prediction result represents the state prediction result of the database at a moment within the second predetermined period. In one embodiment, the result prediction module 430 can be used to perform the operation S230 described above, which will not be repeated here.

[0114] The information generation module 440 is used to generate database alarm information when the state prediction result indicates that the database is abnormal. The database alarm information includes an alarm time and a state prediction result. The alarm time indicates the time when the database is abnormal in the state prediction result. In one embodiment, the information generation module 440 can be used to perform the operation S240 described above, which will not be repeated here.

[0115] According to an embodiment of the present invention, the database alarm device 400 further includes a type matching module and a matching failure determination module.

[0116] The type matching module is used to use the feature matching component in the parameter prediction sub-model to perform feature type matching on the parameter features of the operating parameter set within the first predetermined time period and the predetermined parameter feature set.

[0117] The matching failure determination module is used to determine that the parameter characteristics of the operating parameter set within the first predetermined period do not match the predetermined parameter characteristic set when the predetermined parameter characteristic set does not include the parameter characteristic type of the operating parameter set within the first predetermined period.

[0118] According to an embodiment of the present invention, the parameter prediction module 420 includes a feature determination submodule and a parameter prediction submodule.

[0119] The feature determination submodule is used to determine the parameter features of the database within the first predetermined time period based on the operating parameter set within the first predetermined time period.

[0120] The parameter prediction submodule is used to determine a set of prediction parameters within a second predetermined time period based on parameter characteristics and using a parameter prediction submodel.

[0121] According to an embodiment of the present invention, the feature determination submodule includes a curve determination unit, a slope determination unit, a period determination unit, a feature determination unit and a parameter dimension reduction unit.

[0122] The curve determination unit is used to map a plurality of first operating parameters in the operating parameter set within the first predetermined period of time in a coordinate system to obtain a parameter curve of the first predetermined period of time.

[0123] The slope determination unit is used to determine the slope of the parameter curve at each moment in the first predetermined time period.

[0124] The period determination unit is used to determine the periodic characteristics of the operating parameter set within a first predetermined time period.

[0125] The feature determination unit is used to determine the initial parameter feature based on the curve slope, the periodic feature and the set of operating parameters within the first predetermined time period.

[0126] The parameter dimension reduction unit is used to reduce the dimension of the initial parameter features to obtain parameter features.

[0127] According to an embodiment of the present invention, the feature determination unit includes a feature selection subunit and a feature determination subunit.

[0128] The feature selection subunit is used to perform feature selection on the curve slope, periodic features and a set of operating parameters within a first predetermined period of time to obtain key curve slopes, key periodic features and key operating parameters.

[0129] The feature determination subunit is used to determine the initial parameter features based on the key curve slope and the key periodic features.

[0130] According to an embodiment of the present invention, the result prediction module 430 includes a result prediction submodule.

[0131] The result prediction submodule is used to input the prediction parameter set within the second predetermined time period into the state prediction submodel, and determine multiple state prediction results of the database within the second predetermined time period based on multiple prediction sub-parameters in each prediction parameter in the prediction parameter set within the second predetermined time period and multiple alarm parameter thresholds.

[0132] According to an embodiment of the present invention, the database alarm device 400 further includes an abnormality determination module, a type determination module and a level determination module.

[0133] The abnormality determination module is used to determine that the state prediction result represents the abnormality of the database when the parameter difference between the prediction sub-parameter and the alarm parameter threshold corresponding to the prediction sub-parameter satisfies the preset size relationship with the predetermined difference threshold.

[0134] The information determination module is used to determine the abnormality type and abnormality level of the database based on the parameter type and parameter difference of the predicted sub-parameters.

[0135] According to an embodiment of the present invention, the information generation module 440 includes a time determination submodule, an information generation submodule and an information upload submodule.

[0136] The time determination submodule is used to determine that the state prediction result corresponds to a target time within a second predetermined time period.

[0137] The information generation submodule is used to generate database alarm information based on the target time and the state prediction result, wherein the state prediction result includes the abnormality type and abnormality level.

[0138] The information upload submodule is used to upload database alarm information to the server.

[0139] According to an embodiment of the present invention, the database alarm device 400 further includes a parameter acquisition module, a parameter deletion module, a data completion module, a data standardization module and a parameter storage module.

[0140] The parameter acquisition module is used to acquire an initial operating parameter set within a first predetermined time period.

[0141] The parameter deletion module is used to delete abnormal parameters outside the operating parameter threshold in the initial operating parameter set.

[0142] The data completion module is used to complete the missing data in the initial operating parameter set using the data completion method to obtain the completed operating parameters.

[0143] The data standardization module is used to perform data standardization on the completed operating parameters to obtain an operating parameter set within a first predetermined time period.

[0144] The parameter storage module is used to store the operating parameter set within the first predetermined time period in a database.

[0145] According to an embodiment of the present invention, the database alarm device 400 further includes a state acquisition module, a first parameter input module, a first parameter adjustment module, a second parameter input module, a second parameter adjustment module and a model determination module.

[0146] The state acquisition module is used to acquire the operation parameter set of the database and the operation state of the database within a target predetermined period, wherein the target predetermined period includes a first sub-period and a second sub-period, and the first sub-period is the period before the second sub-period.

[0147] The first parameter input module is used to input the operating parameter set in the first sub-period into the initial parameter prediction sub-model to obtain the prediction parameter set in the second sub-period.

[0148] The first parameter adjustment module is used to adjust the model parameters of the initial parameter prediction sub-model based on the operating parameter set in the second sub-period and the prediction parameter set in the second sub-period to obtain the parameter prediction sub-model.

[0149] The second parameter input module is used to input the operating parameter set within the target predetermined time period into the initial state prediction sub-model to obtain multiple state prediction results of the database within the target predetermined time period.

[0150] The second parameter adjustment module is used to adjust the model parameters of the initial state prediction sub-model based on multiple state prediction results within the target predetermined period and the operating state of the database within the target predetermined period to obtain the state prediction sub-model.

[0151] The model determination module is used to determine the database alarm prediction model based on the parameter prediction sub-model and the state prediction sub-model.

[0152] According to an embodiment of the present invention, any multiple modules of the parameter determination module 410, the parameter prediction module 420, the result prediction module 430 and the information generation module 440 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present invention, at least one of the parameter determination module 410, the parameter prediction module 420, the result prediction module 430 and the information generation module 440 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in a suitable combination of any of them. Alternatively, at least one of the parameter determination module 410, the parameter prediction module 420, the result prediction module 430 and the information generation module 440 may be at least partially implemented as a computer program module, which may perform a corresponding function when executed.

[0153] Figure 5 A block diagram of an electronic device suitable for implementing a database alarm method according to an embodiment of the present invention is schematically shown.

[0154] like Figure 5 As shown, the electronic device 500 according to an embodiment of the present invention includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 to a random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include an onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.

[0155] In RAM 503, various programs and data required for the operation of electronic device 500 are stored. Processor 501, ROM 502 and RAM 503 are connected to each other via bus 504. Processor 501 performs various operations of the method flow according to the embodiment of the present invention by executing the program in ROM 502 and / or RAM 503. It should be noted that the program can also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 can also perform various operations of the method flow according to the embodiment of the present invention by executing the program stored in the one or more memories.

[0156] According to an embodiment of the present invention, the electronic device 500 may further include an input / output (I / O) interface 505, which is also connected to the bus 504. The electronic device 500 may further include one or more of the following components connected to the input / output (I / O) interface 505: an input portion 506 including a keyboard, a mouse, etc.; an output portion 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 508 including a hard disk, etc.; and a communication portion 509 including a network interface card such as a LAN card, a modem, etc. The communication portion 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output (I / O) interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that the computer program read therefrom is installed into the storage portion 508 as needed.

[0157] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present invention is implemented.

[0158] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present invention, the computer-readable storage medium may include the ROM 502 and / or RAM 503 described above and / or one or more memories other than ROM 502 and RAM 503.

[0159] The embodiment of the present invention also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present invention.

[0160] The computer program executes the above functions defined in the system / device of the embodiment of the present invention when it is executed by the processor 501. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0161] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 509, and / or installed from the removable medium 511. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0162] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the processor 501, the above functions defined in the system of the embodiment of the present invention are performed. According to the embodiment of the present invention, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0163] According to an embodiment of the present invention, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0164] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0165] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present invention may be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features described in the various embodiments of the present invention may be combined and / or combined in various ways. All of these combinations and / or combinations fall within the scope of the present invention.

[0166] The embodiments of the present invention are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment is described above, it does not mean that the measures in each embodiment cannot be used in combination advantageously. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.

Claims

1. A database alarm method, characterized in that: The method comprises: Acquire an operating parameter set in a first predetermined period of time from a database, wherein the operating parameter set in the first predetermined period of time includes a plurality of first operating parameters corresponding one-to-one to a plurality of time moments; Inputting the operating parameter set within the first predetermined period into the parameter prediction sub-model of the database alarm prediction model to obtain the prediction parameter set within the second predetermined period, wherein the second predetermined period is a period after the first predetermined period, and the prediction parameter set within the second predetermined period includes a plurality of prediction parameters corresponding to a plurality of time points one by one; Inputting the prediction parameter set within the second predetermined period into the state prediction sub-model of the database alarm prediction model to obtain a plurality of state prediction results of the database within the second predetermined period, wherein the state prediction sub-model is used to predict the operation state of the database according to the operation parameter set of the database and a plurality of alarm parameter thresholds, and each state prediction result represents a state prediction result of the database at one of the moments within the second predetermined period; and In the case where the state prediction result indicates that the database is abnormal, generating database alarm information, the database alarm information includes an alarm time and the state prediction result, the alarm time indicates the time when the database in the state prediction result is abnormal; The parameter prediction sub-model includes a fast and a slow learning network, and the fast and the slow learning network includes a feature matching component and a slow learning component, the feature matching component is used to determine the parameter characteristics of the operating parameter set within the first predetermined period, and the slow learning component is used to adjust the model parameters of the parameter prediction sub-model when it is determined that the parameter characteristics of the operating parameter set within the first predetermined period do not match the predetermined parameter characteristic set; The parameter prediction sub-model is trained in the following way: Using the feature matching component in the parameter prediction submodel, matching the parameter features of the operating parameter set within the first predetermined period with a predetermined parameter feature set; and In a case where the predetermined parameter feature set does not include the parameter feature type of the operating parameter set within the first predetermined period, determining that the parameter feature of the operating parameter set within the first predetermined period does not match the predetermined parameter feature set; When it is determined that the parameter characteristics of the operating parameter set within the first predetermined time period do not match the predetermined parameter characteristic set, the parameter prediction sub-model is trained using the slow learning component based on the predicted parameter set within the second predetermined time period and the operating parameter set within the second predetermined time period, wherein the predetermined parameter characteristic set includes parameter characteristics of historical training samples used to train the parameter prediction sub-model, and wherein the operating parameter set within the second predetermined time period includes multiple second operating parameters corresponding one-to-one to multiple time moments.

2. The method according to claim 1, characterized in that: The step of inputting the set of operating parameters within the first predetermined period into the parameter prediction sub-model of the database alarm prediction model to obtain the set of prediction parameters within the second predetermined period includes: Determining parameter characteristics of the database within the first predetermined period based on the set of operating parameters within the first predetermined period; and Based on the parameter characteristics, the parameter prediction sub-model is used to determine a set of prediction parameters within the second predetermined time period.

3. The method according to claim 2, characterized in that The determining, based on the set of operating parameters within the first predetermined period, parameter characteristics of the database within the first predetermined period includes: Mapping the plurality of first operating parameters in the operating parameter set within the first predetermined period of time in a coordinate system to obtain a parameter curve of the first predetermined period of time; respectively determining the curve slope of the parameter curve at each moment in the first predetermined time period; Determining a periodic characteristic of a set of operating parameters within the first predetermined period; Determining an initial parameter characteristic based on the curve slope, the periodic characteristic, and a set of operating parameters within the first predetermined period; and The initial parameter feature is subjected to dimension reduction to obtain the parameter feature.

4. The method according to claim 3, characterized in that The determining of the initial parameter characteristics based on the curve slope, the periodic characteristics and the set of operating parameters within the first predetermined period includes: Performing feature selection on the curve slope, the periodic characteristics and the set of operating parameters within the first predetermined period to obtain key curve slopes, key periodic characteristics and key operating parameters; and The initial parameter characteristics are determined based on the key curve slope, the key periodic characteristics and the key operating parameters.

5. The method according to claim 1, characterized in that The prediction parameters include a plurality of prediction sub-parameters of different types; The step of inputting the prediction parameter set within the second predetermined period into the state prediction sub-model of the database alarm prediction model to obtain a plurality of state prediction results of the database within the second predetermined period includes: The prediction parameter set within the second predetermined time period is input into the state prediction sub-model, and based on the multiple prediction sub-parameters in each of the prediction parameters in the prediction parameter set within the second predetermined time period and the multiple alarm parameter thresholds, the multiple state prediction results of the database within the second predetermined time period are determined.

6. The method according to claim 1, characterized in that The method further comprises: In the case where it is determined that a parameter difference between the prediction sub-parameter and the alarm parameter threshold corresponding to the prediction sub-parameter satisfies a preset size relationship with a predetermined difference threshold, determining that the state prediction result represents that the database is abnormal; Determining the abnormality type of the database and the abnormality level of the database based on the parameter type of the prediction sub-parameter and the parameter difference; When the state prediction result indicates that the database is abnormal, generating database alarm information includes: Determining that the state prediction result corresponds to a target time within the second predetermined period; generating the database warning information based on the target time and the state prediction result, wherein the state prediction result includes the abnormality type and the abnormality level; and The database alarm information is uploaded to the server.

7. The method according to claim 1, characterized in that The method further comprises: Acquire an initial operating parameter set within the first predetermined period; Deleting abnormal parameters outside the operating parameter threshold in the initial operating parameter set; Using a data completion method, the missing data in the initial operating parameter set is completed to obtain completed operating parameters; performing data standardization on the completed operating parameters to obtain a set of operating parameters within the first predetermined time period; and The operating parameter set within the first predetermined period is stored in the database.

8. The method according to claim 1, characterized in that The database alarm prediction model is trained based on the following method: Acquire an operating parameter set of the database and an operating state of the database within a target predetermined period, wherein the target predetermined period includes a first sub-period and a second sub-period, and the first sub-period is a period before the second sub-period; Inputting the set of operating parameters in the first sub-period into the initial parameter prediction sub-model to obtain a set of prediction parameters in the second sub-period; Based on the operating parameter set in the second sub-period and the prediction parameter set in the second sub-period, adjusting the model parameters of the initial parameter prediction sub-model to obtain the parameter prediction sub-model; Inputting the set of operating parameters within the target predetermined period into the initial state prediction sub-model to obtain multiple state prediction results of the database within the target predetermined period; Based on a plurality of state prediction results within the target predetermined period and the operating state of the database within the target predetermined period, adjusting the model parameters of the initial state prediction sub-model to obtain the state prediction sub-model; and The database alarm prediction model is determined based on the parameter prediction sub-model and the state prediction sub-model.

9. A database alarm device, characterized in that: The device comprises: A parameter determination module, configured to obtain an operating parameter set in a first predetermined period from a database, wherein the operating parameter set in the first predetermined period includes a plurality of first operating parameters corresponding to a plurality of time moments in one-to-one correspondence; A parameter prediction module, used to input the operating parameter set within the first predetermined period into the parameter prediction sub-model of the database alarm prediction model to obtain a prediction parameter set within a second predetermined period, wherein the second predetermined period is a period after the first predetermined period, and the prediction parameter set within the second predetermined period includes a plurality of prediction parameters corresponding to a plurality of time points one by one; a result prediction module, used for inputting the prediction parameter set within the second predetermined period into the state prediction sub-model of the database alarm prediction model, and obtaining a plurality of state prediction results of the database within the second predetermined period, wherein the state prediction sub-model is used for predicting the operation state of the database according to the operation parameter set of the database and a plurality of alarm parameter thresholds, and each state prediction result represents the state prediction result of the database at one of the moments within the second predetermined period; and An information generation module, configured to generate database alarm information when the state prediction result indicates that the database is abnormal, wherein the database alarm information includes an alarm time and the state prediction result, and the alarm time indicates a time when the database in the state prediction result is abnormal; Wherein, the parameter prediction sub-model includes a fast and a slow learning network, and the fast and the slow learning network includes a feature matching component and a slow learning component, the feature matching component is used to determine the parameter characteristics of the operating parameter set within the first predetermined period, and determine whether the parameter characteristics match the predetermined parameter characteristic set, and the slow learning component is used to adjust the model parameters of the parameter prediction sub-model when it is determined that the parameter characteristics of the operating parameter set within the first predetermined period do not match the predetermined parameter characteristic set; The parameter prediction sub-model is trained using the following modules: a type matching module, configured to use the feature matching component in the parameter prediction sub-model to perform feature type matching on the parameter features of the operating parameter set within the first predetermined period of time and a predetermined parameter feature set; and a matching failure determination module, configured to determine that the parameter characteristics of the operating parameter set within the first predetermined period do not match the predetermined parameter characteristic set when the predetermined parameter characteristic set does not include the parameter characteristic type of the operating parameter set within the first predetermined period; A model training module is used to train the parameter prediction sub-model using the slow learning component based on the prediction parameter set within the second predetermined period and the operating parameter set within the second predetermined period when it is determined that the parameter characteristics of the operating parameter set within the first predetermined period do not match the predetermined parameter characteristic set, wherein the predetermined parameter characteristic set includes the parameter characteristics of the historical training samples used to train the parameter prediction sub-model, and wherein the operating parameter set within the second predetermined period includes multiple second operating parameters corresponding one-to-one to multiple time moments.