WO2019047072A1 - 一种数据库的检测方法及其终端 - Google Patents

一种数据库的检测方法及其终端 Download PDF

Info

Publication number
WO2019047072A1
WO2019047072A1 PCT/CN2017/100753 CN2017100753W WO2019047072A1 WO 2019047072 A1 WO2019047072 A1 WO 2019047072A1 CN 2017100753 W CN2017100753 W CN 2017100753W WO 2019047072 A1 WO2019047072 A1 WO 2019047072A1
Authority
WO
WIPO (PCT)
Prior art keywords
fault
database
information
repair
algorithm
Prior art date
Application number
PCT/CN2017/100753
Other languages
English (en)
French (fr)
Inventor
卢汉利
Original Assignee
富璟科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 富璟科技(深圳)有限公司 filed Critical 富璟科技(深圳)有限公司
Priority to PCT/CN2017/100753 priority Critical patent/WO2019047072A1/zh
Priority to CN201780000979.4A priority patent/CN110178121B/zh
Publication of WO2019047072A1 publication Critical patent/WO2019047072A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0727Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a storage system, e.g. in a DASD or network based storage system
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • Invention name A database detection method and terminal thereof
  • the present invention belongs to the field of database technologies, and in particular, to a database detection method and a terminal thereof.
  • the in-depth development of information technology is inseparable from the storage and extraction of data, so the importance of the database is becoming more and more prominent. How to ensure that the database system can continue to work efficiently has become an important part of the development of the information process.
  • the existing database inspection technology mainly relies on the database engineer to collect information on the site and manually analyze the running status of the database to determine whether the database has abnormal conditions, but the method depends on the professional level of the database engineer, and different engineers
  • the detection criteria are inconsistent, resulting in a large difference in the abnormality determination, the detection accuracy is low, and the operation cost is large.
  • the embodiment of the present invention provides a database detection method and a terminal thereof, to solve the existing database inspection technology, mainly through the database engineer to determine the site to collect information and manually analyze the operation status of the database.
  • the method relies on the professional level of the database engineer, and the detection standards between different engineers are inconsistent, resulting in a large difference in the abnormality determination, low detection accuracy, and operating cost. Larger. And need to manually go to the database site for troubleshooting, the detection efficiency is low, often can not find the abnormal situation
  • a first aspect of the embodiments of the present invention provides a method for detecting a database, where the detection method of the database includes:
  • a second aspect of the embodiment of the present invention provides a detection terminal of a database, where the detection terminal of the database includes:
  • an operating state data obtaining module configured to acquire running state data of the database based on a patrol algorithm matching a feature of the database
  • a fault analysis data generating module configured to import the operating state data into a preset database fault analysis model, and generate fault analysis data corresponding to the operating state data; wherein the fault analysis data includes fault information and Fault warning information;
  • a repairing solution determining module configured to extract the fault information and the fault warning information included in the fault analysis data, and determine each of the fault information and a repairing solution corresponding to the fault warning information
  • the repairing scheme execution module is configured to separately perform a repair operation corresponding to the repairing scheme to repair a fault condition of the database.
  • a third aspect of an embodiment of the present invention provides a terminal device including a memory, a processor, and a computer program stored in the memory and operable on the processor, the processor executing the The computer program implements the following steps:
  • [0015] acquiring operation state data of the database based on a patrol algorithm matching a feature of the database; [0016] importing the operation state data into a preset database failure analysis model, and generating the operation state data corresponding to Fault analysis data; wherein the fault analysis data includes fault information and a fault warning f ⁇ ;
  • a fourth aspect of the embodiments of the present invention provides a computer readable storage medium, where the computer readable storage
  • the storage medium stores a computer program, which is executed by the processor, and implements the following steps: [0020] acquiring operation state data of the database based on a patrol algorithm matching the characteristics of the database;
  • the operation state data is imported to a preset database failure analysis model, and the failure analysis data corresponding to the operation state data is generated; wherein the failure analysis data includes failure information and a failure warning f ⁇ ;
  • a method for detecting a database and a terminal thereof provided by an embodiment of the present invention have the following beneficial effects: [0025]
  • the embodiment of the present invention does not rely on the expertise of a database engineer to troubleshoot a database, but is based on the database itself.
  • the feature is matched to the corresponding patrol algorithm, so that the running state data obtained by the patrol algorithm can better characterize whether the database contains the fault condition, and obtain the fault analysis data through the preset database fault analysis model.
  • the above operations do not require the intervention of a database engineer.
  • the detection terminal of the database can also automatically repair the fault condition according to the matched repair scheme, thereby improving the efficiency of detection and the ambiguity of repair.
  • FIG. 1 is a flowchart of an implementation of a method for detecting a database according to a first embodiment of the present invention
  • FIG. 2 is a flowchart of a specific implementation of a method for detecting a database S103 according to a second embodiment of the present invention.
  • 3 is a flowchart of a specific implementation of a method for detecting a database S101 according to a third embodiment of the present invention.
  • FIG. 4 is a flowchart of a specific implementation of a method for detecting a database according to a fourth embodiment of the present invention.
  • FIG. 5 is a specific implementation of a method for detecting a database S101 according to a fifth embodiment of the present invention.
  • FIG. 6 is a structural block diagram of a detection terminal of a database according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a terminal device according to an embodiment of the present invention.
  • the embodiment of the present invention solves the existing database inspection technology, mainly through the database engineer to collect information on the site and manually analyze the running status of the database, thereby discriminating whether the database has an abnormal situation, but the means depends on the database engineer The level of expertise, and the inconsistencies between different engineers are different, resulting in large differences in abnormality determination, low accuracy of detection, and high operating costs. Moreover, it is necessary to manually go to the database site for troubleshooting, and the detection efficiency is low, and it is often impossible to find the abnormal situation.
  • the execution entity of the process is a terminal device that is installed with a detection program of the database, and the terminal device includes a terminal such as a server, a computer device, a tablet computer, and the like, and is used to detect the running status of each database, whether there is a fault.
  • the terminal device accesses a detecting device in the database system, acquires the running state of each database server through the content network of the database system, and then detects and maintains the database included in the entire database system.
  • FIG. 1 is a flowchart showing an implementation of a method for detecting a database according to a first embodiment of the present invention, which is described in detail as follows:
  • the running status data of the database is acquired based on a patrol algorithm matching the characteristics of the database.
  • the terminal device first acquires a feature of the database, where the feature includes but is not limited to one or a combination of at least two: a type of the database, a sender information, and a stored data amount. And the data type, the version information of the database, etc., according to the characteristics of the database, the basic characteristics of the database can be determined, and the patrol plan corresponding to the patrol algorithm library is obtained by matching the basic characteristics.
  • the terminal device is a terminal device that is provided with a database program and a detection program of the database, that is, the detection method of the database provided in this embodiment is to detect the local database, that is, the terminal device may only include one tour.
  • the detection algorithm is the inspection algorithm corresponding to the local database.
  • the terminal device can update the patrol algorithm through the host server in a preset time, so that the patrol policy can be adaptively changed after the version of the local database is updated.
  • the terminal device obtains the patrol algorithm in addition to the patrol algorithm through the upper server, and the patrol algorithm can be obtained by the administrator of the database.
  • the terminal device can receive the corresponding management personnel.
  • the terminal device sends the completed patrol algorithm.
  • the terminal device After receiving the patrol algorithm, the terminal device establishes a correspondence between the database and the patrol algorithm. It should be noted that, before storing the patrol algorithm sent by the management personnel, the terminal device needs to perform an authentication operation on the management personnel, obtain account privilege information of the management personnel, and identify the account privilege information, and determine the account privilege information.
  • the patrol algorithm sent by the manager is stored; otherwise, if the privilege of the two does not match, it is determined that the setting operation of the patrol algorithm is an illegal setting operation, and the deletion is performed.
  • the inspection algorithm sent by the manager is performed.
  • the corresponding patrol algorithm may be determined based on characteristics of each database, and then multiple databases are obtained according to each patrol algorithm. Corresponding patrol scheme, so that the terminal device can perform unified fault detection on the database system composed of multiple databases based on the patrol scheme.
  • the terminal device after determining the patrol algorithm corresponding to the database in which the patrol is performed, obtains the running state data of the database by using the patrol algorithm.
  • the status running data includes but is not limited to: data redundancy rate of the database, average read/write rate of the database, data storage status of each partition in the database, allocation of storage addresses of each partition, database medium running status, and operation overflow Rate and so on.
  • the terminal device may run the simulation operation program included in the patrol algorithm in the database, and monitor related parameter parameters in the database to obtain the running state data of the database; or directly through the running data statistics module built in the database server, Extract the preset index parameters in the patrol algorithm to obtain the running status data of the database.
  • the operation state data is imported to a preset database failure analysis model, and the failure analysis data corresponding to the operation state data is generated; wherein the failure analysis data includes failure information and failure warning information.
  • the terminal device stores a database fault analysis model, and is configured to determine, according to the input operating state data, whether the fault state is included in the running state data, where the fault risk situation specifically includes whether the fault has occurred.
  • the fault information, and the fault warning information that may be faulty define the fault information and the fault warning information as multiple risk points, and generate fault analysis data corresponding to the running state data. Therefore, after acquiring the running state data of the database, the terminal device imports the running state data into the database fault analysis model, and has obtained the fault analysis data corresponding to the database.
  • the terminal device may further determine the database fault analysis model according to the characteristics of the database.
  • the terminal device stores a database failure analysis model corresponding to each database, and then the terminal device has acquired the characteristics of the database in S101, and in S102, matches the corresponding database failure analysis model by the feature, and then executes S102. Operation.
  • the database fault analysis model may also be included in the patrol algorithm.
  • the terminal device extracts the database analysis model included in the patrol algorithm. Therefore, the terminal device only needs to perform a matching operation on the characteristics of the database, and the patrol algorithm and the database analysis model can be obtained.
  • the database analysis model can be obtained by means of training and learning.
  • the administrator of the database can input the failure analysis data obtained in the other database server and the failure analysis data obtained by the local database for each inspection into the database analysis model, and thereby training and updating the database analysis model, thereby Through multiple iterative analysis, the accuracy of terminal equipment analysis for database failure is improved.
  • the fault information is specifically: In the patrol process, the related information that the database is in a fault state is detected, including the location where the fault occurs, the function affected, and the fault operation parameter.
  • the fault warning information is specifically: During the inspection process, the database is pre-judged according to the detected operating state. Modules or functions may be abnormal, or the stability and reliability of a module or function is lower than normal, and this information is summarized as the fault warning information. Therefore, the repair of the terminal device is not limited to the point of failure where the failure has occurred, and the risk point that may cause the failure is also repaired.
  • the terminal device determines each fault information and fault warning information included in the data according to the fault analysis data output by the database analysis model, and sequentially performs operations for extracting and matching the repair scheme. Specifically, the terminal device locates multiple causes that may cause the fault according to fault content of each fault information, such as a location where the fault occurs, a function module that affects, and a fault operation parameter, and is determined by a preset fault cause. The algorithm performs the troubleshooting one by one, and then determines the abnormal information that causes the fault, and extracts the corresponding repair scheme from the repair scheme resource pool according to the abnormality information.
  • the process of the fault warning information matching the repairing scheme is similar to the process of the foregoing fault information, and the process of determining the repairing scheme may be referred to by referring to the foregoing fault information, which will not be repeated herein.
  • the terminal device after determining all the fault information in the fault analysis data and the repairing scheme corresponding to the fault warning information, the terminal device performs the related operations of S104. Further, if the fault information or the fault warning information cannot be matched to the corresponding repair scheme, the fault information or the fault warning information may be repaired by combining one or more repair schemes with the highest matching degree, and if the repair is unsuccessful, Notify the corresponding database administrator to fix it.
  • the terminal device after determining the multiple repair solutions, performs a repair operation corresponding to the repair solution on the database, and is used to repair the corresponding fault condition in the database, and the fault condition also includes the fault information and the fault.
  • the fault condition corresponding to the warning information the terminal device immediately performs the repair operation corresponding to the repair solution, and so on, according to different fault information and the repair solution corresponding to the fault warning information. , that is, the repair process is carried out immediately, thereby improving the efficiency of the repair.
  • the terminal device may also collect and repair all the fault information and the fault repairing information corresponding to the fault warning information, and perform repair according to the priority of each repairing scheme and the corresponding repairing scope.
  • the scenarios are combined and the corresponding execution order is determined.
  • for repair operations Make the same repair operation, execute it uniformly, and fix it first for the repair plan with higher priority and wider scope.
  • the first fault information and the fault repair scheme corresponding to the second fault information are restarting the device, so the two fault repair operations may be combined and only one restart operation may be performed; or the repair areas corresponding to the two are different, but
  • the corresponding repair operations are the same, such as deleting the data of the cache area and deleting the data of the high-speed storage module.
  • the repair operations corresponding to the two are delete operations, but the corresponding execution areas are different, so the two repair schemes can be uniformly executed simultaneously. To improve execution efficiency.
  • the terminal device preferentially repairs a repair solution having a wide impact range.
  • the third fault information affects all modules and functions of the entire database, and the fourth fault information may only affect a certain functional module.
  • the terminal device first performs a repair operation corresponding to the third fault information to eliminate the entire impact. Database failure information. Since even if the fourth fault information is repaired, the impact of the third fault information on the database still exists. Therefore, during the fault repair detection process, the function module may still be unable to operate normally, and thus may be determined as repair failure, and the terminal device is lowered. The accuracy rate. Therefore, in order to avoid the above situation, the terminal device executes the respective repair solutions in sequence according to the repair scope.
  • the detection method of the database provided by the embodiment of the present invention first acquires the characteristics of the data, determines the matching inspection algorithm, and then acquires the running state data of the database based on the inspection algorithm; After obtaining the running state data, the detecting terminal imports the data into a preset database failure analysis model, and determines whether the running state data includes a fault condition or a fault early warning situation, and generates a fault analysis data corresponding thereto. Then, according to the fault information and the fault warning information included in the fault analysis data, the repair scheme corresponding to each information is respectively determined, and the repair operation is performed, thereby realizing the purpose of automatically detecting the database and repairing the fault.
  • the embodiment of the present invention does not rely on the expertise of the database engineer to perform troubleshooting on the database, but is based on the characteristics of the database itself to match the corresponding inspection algorithm, thereby passing the inspection.
  • the running state data obtained by the algorithm can better characterize whether the database contains fault conditions, and obtain the fault analysis data through the preset database fault analysis model. It can be seen that the above operations do not require the intervention of the database engineer, which reduces the dependence on the level of artificial professional technology. , thereby reducing the labor cost and the operating cost of the database, and the inspection algorithm is selected according to the characteristics of different databases, The accuracy of the test is also greatly improved.
  • the detection terminal of the database can also automatically repair the fault condition according to the matched repair scheme, thereby improving the efficiency of detection and the ambiguity of repair.
  • FIG. 2 is a flowchart showing a specific implementation of a database detection method S103 according to a second embodiment of the present invention.
  • a database detection method S103 provided by this embodiment further includes the following steps, which are detailed as follows:
  • the fault information and the fault warning information included in the fault analysis data are extracted, and each fault information and a repair scheme corresponding to the fault warning information are determined, including
  • the fault information and the fault type corresponding to the fault warning information are determined according to a preset fault type classification algorithm.
  • the terminal device determines the fault type of each fault information and the fault warning information according to a preset fault type classification algorithm.
  • the fault type corresponding to the fault information is taken as an example, the terminal device acquires the location of the fault and the affected function included in the fault information, locates the module category to which the fault information belongs, and then runs according to the fault included in the fault information.
  • the parameter determines the corresponding hardware component or program in the module to which the module belongs, thereby obtaining the fault type corresponding to the fault information.
  • the fault warning information can also be determined by the above steps.
  • the fault type may include: two major categories: software fault and hardware fault, wherein the software fault further includes: a system fault, a version conflict fault, a data conflict fault, a program fault fault, etc.; Also included: component short-circuit faults, module loss faults, module power-down faults, memory damage faults, etc.
  • the terminal device divides the multiple fault types into two categories according to the setting of the user, and respectively, one type of fault information and two types of fault information, wherein one type of fault information is specifically allocated Corresponding fault repair algorithm, the terminal device can repair faults of a type of fault information according to the fault repair algorithm without notification to the management personnel; and the second type of fault information is specifically that the terminal equipment can perform partial emergency repair, but requires manual intervention by the management personnel. repair. If the terminal device determines that the fault information or the fault warning information is a type of fault information, the related operations of S202 are performed; if the terminal device determines that the fault information or the fault warning is newly classified into the second type of fault information, the related operations of S203 are performed.
  • the terminal device may further divide the impact on the database according to the type of the fault. It is a type of fault information and a second type of fault information.
  • the fault information that requires a higher degree of authority is defined as the second type of fault information, and the administrator needs to be involved in the repair.
  • the fault information that is less affected by the database, that is, the repair authority is lower, is defined as A type of fault information.
  • the terminal device is provided with a fault repair algorithm library, which includes a fault repair algorithm corresponding to each type of fault information. Therefore, after determining that the fault information or the fault warning information is a type of fault information, the terminal device matches the fault information of the fault with the fault repair algorithm in the fault repair algorithm database, and then determines the fault repair algorithm corresponding thereto. And generating the above repair solution based on the fault repair algorithm and the fault information or the fault warning information.
  • one type of fault information can still be subdivided into multiple fault types, that is, one type of fault information does not correspond to one fault repair algorithm, and therefore, the fault information and the fault warning information need to be specifically failed.
  • the type is matched with each fault repair algorithm in the fault repair algorithm library to determine the corresponding fault repair algorithm.
  • the matching manner is: the terminal device queries a preset fault type and a fault repair algorithm correspondence list, and then determines the fault repair algorithm corresponding to the fault information or the fault warning information, and includes, according to the fault information or the fault warning information, The operating parameters and the location of the fault, adjust the corresponding parameter items in the fault repair algorithm, and output the repair scheme.
  • the terminal device determines that the corresponding fault processing user needs to be notified to perform the repair operation on the fault or the fault warning, and therefore, the query is performed.
  • the fault information or the fault handling user corresponding to the fault warning information For a database with a simple structure, the corresponding administrator generally has only one. Therefore, each type of fault information and fault warning information are repaired by the administrator. In this case, the administrator of the database is the fault handling user.
  • the terminal device queries the fault information and The burst interface person corresponding to the fault warning information is used as the fault handling user. Specifically, the terminal device queries the fault occurrence location included in the fault information or the fault warning information, determines a burst interface person or a responsible person corresponding to the location based on the fault occurrence location, and identifies the fault processing user as a fault processing user to notify the fault processing. The user performs the corresponding repair operation.
  • the terminal device may perform an emergency repair operation on the fault information or the fault abnormality information by using a preset repair algorithm to maintain the basic function of the database. response.
  • the terminal device can be switched to the standby database server by the primary database server until the failure processing user repairs the above failure information and the failure prediction information, and then switches to the primary database server.
  • the terminal device after determining the fault-handling user corresponding to the second-type fault information, the terminal device needs to notify the fault-handling user that the repaired user needs to perform repair, and thus generates two according to the fault information or the fault warning information.
  • the fault handling event includes: information about the fault detection period, the fault occurrence location, the fault repair time, the fault level, and the like, and the fault information processing user, and preferably the fault repair suggestion.
  • the terminal device extracts the fault repair algorithm corresponding to the fault information or the fault repair information according to the preset fault repair algorithm library, and obtains a corresponding fault repair suggestion, and the terminal device may also collect the fault information or the fault warning information through the network. Repair information, summarize and generate the bug fix suggestions.
  • the terminal device after generating the fault handling event, the terminal device submits the fault handling event to the fault handling user to start the fault repair process.
  • the fault handling user can obtain the fault handling event through the office system or mail, and perform the repair strategy by itself to repair the fault information or the fault warning information.
  • the database is repaired by two different means, thereby improving the flexibility of the database repair, and the simpler and lower authority.
  • the fault can be repaired by the terminal device itself. For the more complicated and high-conflict faults, it is recommended to manually intervene and repair, and provide fault handling events with repair suggestions. The user is faulty, which reduces the difficulty of repairing the faulty user.
  • FIG. 3 is a flowchart showing a specific implementation of S101 in a method for detecting a database according to a third embodiment of the present invention. As shown in FIG. 3, in the method for detecting a database provided by this embodiment, S101 includes the following steps, which are as follows:
  • the terminal device first obtains the version identifier of the database in order to determine the patrol algorithm corresponding to the database, and determines the type and version number of the database according to the version identifier. Because the database server can update the version of the database through the host server, the corresponding function is added and the vulnerability of the previous version is fixed. Therefore, the terminal device needs to obtain the version identifier of the database before performing the status data inspection of the database.
  • the patrol algorithm corresponding to the version identifier is determined based on a correspondence between a preset database version and a patrol algorithm.
  • the terminal device stores a preset relationship between the database version and the patrol algorithm. After the version identifier corresponding to the database is obtained, the corresponding relationship is queried, and the patrol corresponding to the version identifier is determined. The algorithm is checked, and the corresponding patrol algorithm is extracted from the patrol algorithm library. It should be noted that, if there is no version matching the version identifier of the current database in the above correspondence, the current version may be newer, so the terminal device may send a patrol algorithm acquisition request to the upper server, so that the upper server returns This version identifies the corresponding inspection algorithm.
  • the version identifier included in the corresponding relationship is selected to have the highest matching degree with the version identifier of the current database.
  • the version identifier which is the corresponding version identifier, that is, the patrol algorithm corresponding to the version identifier with the highest matching degree, is the patrol algorithm corresponding to the database.
  • the running state data of the database is acquired based on the patrol algorithm corresponding to the version information.
  • the implementation steps of the S303 are the same as the implementation steps of the S101.
  • the patrol algorithm corresponding to the database is determined, thereby improving the accuracy of the patrol algorithm, and then improving the accuracy of the detection.
  • FIG. 4 is a flowchart showing a specific implementation of a method for detecting a database according to a fourth embodiment of the present invention. As shown in FIG. 4, with respect to the embodiment shown in FIG. 1 to FIG. 3, the detection method of the database provided by this embodiment further includes S401 ⁇ S402, which are as follows:
  • each of the fault information and the processing result of the fault warning information are acquired, and a database detection report is generated according to the processing result.
  • the terminal device summarizes the processing results corresponding to the fault information and the fault warning information, where the processing result is the repair result obtained after the terminal device performs the repair operation corresponding to the repair scheme.
  • the processing result includes the processing result of the repair success to repair the failure, and the processing result of the fault determination error.
  • the management personnel of the terminal device or the database may judge the accuracy thereof, and if the fault information determines the fault information or the fault abnormality information, the related operations of S103 and S104 are performed; If the failure determination error information or the failure abnormality information is broken, the related operations of S103 and S104 can be skipped, and the processing result of the failure determination error can be generated.
  • the terminal device collects the parameter information and the program code input during the manual repair process, and after the repair is successful, generates the processed information by the collected information. , learning the content of the artificial repair, and generating a corresponding repair plan, added to the repair plan library.
  • the terminal device generates a database detection report according to the processing information corresponding to each fault information and the fault warning information, and the database detection report lists the fault information obtained by the current inspection and the corresponding processing result. And the failure warning information and the corresponding processing result thereof.
  • the failure rate of the database and the resource occupation situation are also updated, so that the user can accurately obtain the fault condition of the entire database according to the query of the database detection report.
  • the fault information and the processing result corresponding to the fault warning information are input into the database failure analysis model to perform training update on the database failure analysis model.
  • the terminal device inputs the fault information and the processing result corresponding to the fault warning information according to the foregoing acquisition to the database fault analysis model, because the database fault analysis model is used to detect the data.
  • the fault data is included in the running data of the library, and the fault information and the fault warning information also include the running state data corresponding to the occurrence or failure of the database, so the above processing result is input into the fault analysis model, and Training updates can improve the accuracy of the database's failure analysis model.
  • a database detection report is generated, which is convenient for the user to consult and learn the operation status of the database, so as to map the database. Use decision.
  • the training information of the fault information and the fault warning information is trained and updated on the database analysis model, which can further improve the sensitivity of the database fault analysis model to the fault, thereby improving the accuracy of the detection.
  • FIG. 5 is a flowchart showing a specific implementation of a method for detecting a database S101 according to a fifth embodiment of the present invention.
  • a database detection method S101 provided by this embodiment further includes the following steps, which are detailed as follows:
  • the patrol detection algorithm includes a patrol triggering condition; the patrol algorithm matching the characteristics of the database, acquiring the running state data of the database, further includes:
  • a patrol triggering condition is set in the patrol detection algorithm, where the patrol triggering condition is specifically a trigger node in each day.
  • Each inter-turn trigger node may conform to a diurnal node that is divided by a preset inter-turn interval. For example, every two small cymbals patrol the database, and the inter-trigger nodes are separated by two small ⁇ ; , each day trigger node can also be manually set according to user needs
  • the terminal device acquires the current timed information at a preset frequency, and performs matching operation between the time information and the patrol algorithm corresponding to the database, if the time information is satisfied. If the patrol triggering condition in the patrol algorithm is performed, the related operation of S502 is performed; otherwise, if the traversal information does not satisfy the patrol triggering condition in the patrol algorithm, the standby state is maintained, and the next acquisition epoch is awaited.
  • the implementation steps of S502 are completely the same as the implementation steps of S101. For details, refer to S101, and details are not described herein again.
  • the embodiment of the present invention by detecting whether the current daytime information meets the patrol triggering condition in the patrol algorithm, thereby achieving the purpose of patrolling the database, the intelligence of the database detection is improved. It also improves the flexibility of database inspection.
  • FIG. 6 is a block diagram showing the structure of a detection terminal of a database according to an embodiment of the present invention.
  • the units included in the detection terminal of the database are used to execute the steps in the embodiment corresponding to FIG. 1.
  • please refer to the related description in the embodiment corresponding to FIG. 1 and FIG. For the convenience of explanation, only the parts related to the present embodiment are shown.
  • the detection terminal of the database includes:
  • the running state data obtaining module 61 is configured to acquire running state data of the database based on a patrol algorithm that matches a feature of the database;
  • the fault analysis data generating module 62 is configured to import the operating state data into a preset database fault analysis model, and generate fault analysis data corresponding to the operating state data; wherein the fault analysis data includes fault information. And fault warning information;
  • the repairing scheme determining module 63 is configured to extract the fault information included in the fault analysis data and the fault warning information, and determine each of the fault information and a repairing scheme corresponding to the fault warning information;
  • the repairing scheme execution module 64 is configured to separately perform a repairing operation corresponding to the repairing scheme to repair a fault condition of the database.
  • the repairing solution determining module 63 specifically includes:
  • a fault type determining module configured to determine, according to a preset fault type classification algorithm, the fault information and a fault type corresponding to the fault warning information
  • a fault information execution module configured to: if the fault information or the fault warning information is a type of fault information, extract a fault repair algorithm that matches the fault information of the fault type from the fault repair algorithm database, And generating the repair solution according to the fault repair algorithm;
  • a fault handling user determining module configured to: if the fault information or the fault warning information is a second type fault And determining, by the fault information, the fault processing user corresponding to the fault information or the fault warning information;
  • the fault information execution module is configured to generate a fault processing event corresponding to the fault information of the second type, and submit the fault processing event to the fault processing user, where the fault processing event is used to indicate the fault.
  • the processing user repairs the second type of fault information.
  • the operating state data acquiring module 61 specifically includes:
  • a version identifier obtaining module configured to acquire a version identifier of the database
  • the patrol algorithm determining module is configured to determine the patrol algorithm corresponding to the version identifier based on a correspondence between a preset database version and a patrol algorithm;
  • the running state data extracting module is configured to acquire running state data of the database based on the patrol algorithm corresponding to the version information.
  • the detecting terminal of the database further includes:
  • a database detection report output module configured to acquire each of the fault information and the processing result of the fault warning information, and generate a database detection report according to the processing result
  • the database fault analysis model adjustment module is configured to input the fault information and the processing result corresponding to the fault early warning information into the database fault analysis model to perform training update on the database fault analysis model.
  • the database detection algorithm includes a patrol triggering condition; the operating state data acquiring module 61 further includes:
  • a time information acquiring module configured to acquire the current daytime information of the engraving
  • a patrol trigger triggering module configured to: if the traversal information meets the patrol triggering condition, perform the patrol algorithm matching the characteristics of the database, and acquire the running state data of the database Operation.
  • the detection terminal of the database provided by the embodiment of the present invention can also perform troubleshooting on the database without relying on the expertise of the database engineer, but is matched to the corresponding inspection algorithm based on the characteristics of the database itself, thereby
  • the running state data obtained by the patrol algorithm can better characterize whether the database contains the fault condition, and obtain the fault analysis data through the preset database fault analysis model. It can be seen that the above operation does not require the intervention of the database engineer, thereby reducing the manual expertise. Horizontal dependency, which reduces labor costs and operating costs of the database, and the inspection algorithm is based on different data The characteristics of the library are selected, and the accuracy of the detection is greatly improved.
  • the detection terminal of the database can also automatically repair the fault condition according to the matched repair scheme, thereby improving the efficiency of detection and the ambiguity of repair.
  • FIG. 7 is a schematic diagram of a terminal device according to another embodiment of the present invention.
  • the terminal device 7 of this embodiment comprises: a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and operable on the processor 70, such as a database detection program.
  • the processor 70 executes the computer program 72 to implement the steps in the foregoing method for detecting the respective databases, such as S101 to S104 shown in FIG.
  • the processor 70 executes the computer program 72 to implement the functions of the various units in the various apparatus embodiments described above, such as the functions of the modules 61 to 64 shown in FIG.
  • the computer program 72 may be divided into one or more units, the one or more units being stored in the memory 71 and executed by the processor 70 to complete the present invention.
  • the one or more units may be a series of computer program instructions that are capable of performing a particular function, and are used to describe the execution of the computer program 72 in the terminal device 7.
  • the computer program 72 can be divided into an operation state data acquisition module, a failure analysis data generation module, a repair solution determination module, and a repair solution execution module.
  • the specific functions of each unit are as follows:
  • an operation state data obtaining module configured to acquire running state data of the database based on a patrol algorithm matching a feature of the database
  • a fault analysis data generating module configured to import the operating state data into a preset database fault analysis model, and generate fault analysis data corresponding to the operating state data; wherein the fault analysis data includes fault information and Fault warning information;
  • a repairing solution determining module configured to extract the fault information and the fault warning information included in the fault analysis data, and determine each of the fault information and a repairing solution corresponding to the fault warning information
  • the repairing scheme execution module is configured to respectively perform a repair operation corresponding to the repairing scheme to repair a fault condition of the database.
  • the terminal device 7 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the terminal device may include, but is not limited to, a processor 70 and a memory 71. It will be understood by those skilled in the art that FIG. 7 is only an example of the terminal device 7, and does not constitute a limitation on the terminal device 7. To include more or less components than illustrated, or to combine certain components, or different components, for example, the terminal device may also include input and output devices, network access devices, buses, and the like.
  • the processor 70 may be a central processing unit (CPU), or may be another general-purpose processor, a digital signal processor (DSP), or an application specific integrated circuit (Application Specific Integrated).
  • CPU central processing unit
  • DSP digital signal processor
  • Application Specific Integrated Application Specific Integrated
  • the general purpose processor can be a microprocessor or the processor can be any conventional processor or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种数据库的检测方法及其终端,属于数据库技术领域,包括:基于与数据库的特征相匹配的巡检算法,获取数据库的运行状态数据(S101);将运行状态数据导入至预设的数据库故障分析模型,生成故障分析数据(S102);提取故障分析数据包含的故障信息以及故障预警信息,并确定各个故障信息以及故障预警信息对应的修复方案(S103);分别执行修复方案对应的修复操作,以修复数据库的故障情况(S104)。所述检测方法及其终端解决了现有的数据库的检查技术,依赖于数据库工程师的专业技术水平,并且不同工程师之间的检测标准不一致,从而导致异常判定存在较大的差异,检测的准确性较低,运营成本较大的问题。

Description

发明名称:一种数据库的检测方法及其终端 技术领域
[0001] 本发明属于数据库技术领域, 尤其涉及一种数据库的检测方法及其终端。
背景技术
[0002] 信息化的深入发展离不幵对数据的存储以及提取操作, 因而数据库的重要性也 愈来愈突出, 如何保证数据库系统能够持续高效工作已成为信息化进程发展的 重要一环。 而现有的数据库的检査技术, 主要通过数据库工程师定吋现场收集 信息并手动分析数据库的运行现状, 从而判别数据库是否存在异常情况, 但该 手段依赖于数据库工程师的专业技术水平, 并且不同工程师之间的检测标准不 一致, 从而导致异常判定存在较大的差异, 检测的准确性较低, 运营成本较大 。 并且需要人工到数据库现场进行故障排査, 检测效率较低, 常常无法及吋发 现异常情况。
技术问题
[0003] 有鉴于此, 本发明实施例提供了一种数据库的检测方法及其终端, 以解决现有 的数据库的检査技术, 主要通过数据库工程师定吋现场收集信息并手动分析数 据库的运行现状, 从而判别数据库是否存在异常情况, 但该手段依赖于数据库 工程师的专业技术水平, 并且不同工程师之间的检测标准不一致, 从而导致异 常判定存在较大的差异, 检测的准确性较低, 运营成本较大。 并且需要人工到 数据库现场进行故障排査, 检测效率较低, 常常无法及吋发现异常情况的问题
问题的解决方案
技术解决方案
[0004] 本发明实施例的第一方面提供了一种数据库的检测方法, 所述数据库的检测方 法包括:
[0005] 基于与数据库的特征相匹配的巡检算法, 获取所述数据库的运行状态数据; [0006] 将所述运行状态数据导入至预设的数据库故障分析模型, 生成所述运行状态数 据对应的故障分析数据; 其中, 所述故障分析数据包含故障信息以及故障预警 f π息;
[0007] 提取所述故障分析数据包含的所述故障信息以及所述故障预警信息, 并确定各 个所述故障信息以及所述故障预警信息对应的修复方案;
[0008] 分别执行所述修复方案对应的修复操作, 以修复所述数据库的故障情况。
[0009] 本发明实施例的第二方面提供了一种数据库的检测终端, 所述数据库的检测终 端包括:
[0010] 运行状态数据获取模块, 用于基于与数据库的特征相匹配的巡检算法, 获取所 述数据库的运行状态数据;
[0011] 故障分析数据生成模块, 用于将所述运行状态数据导入至预设的数据库故障分 析模型, 生成所述运行状态数据对应的故障分析数据; 其中, 所述故障分析数 据包含故障信息以及故障预警信息;
[0012] 修复方案确定模块, 用于提取所述故障分析数据包含的所述故障信息以及所述 故障预警信息, 并确定各个所述故障信息以及所述故障预警信息对应的修复方 案;
[0013] 修复方案执行模块, 用于分别执行所述修复方案对应的修复操作, 以修复所述 数据库的故障情况。
[0014] 本发明实施例的第三方面提供了一种终端设备, 包括存储器、 处理器以及存储 在所述存储器中并可在所述处理器上运行的计算机程序, 所述处理器执行所述 计算机程序吋实现以下步骤:
[0015] 基于与数据库的特征相匹配的巡检算法, 获取所述数据库的运行状态数据; [0016] 将所述运行状态数据导入至预设的数据库故障分析模型, 生成所述运行状态数 据对应的故障分析数据; 其中, 所述故障分析数据包含故障信息以及故障预警 f π息;
[0017] 提取所述故障分析数据包含的所述故障信息以及所述故障预警信息, 并确定各 个所述故障信息以及所述故障预警信息对应的修复方案;
[0018] 分别执行所述修复方案对应的修复操作, 以修复所述数据库的故障情况。
[0019] 本发明实施例的第四方面提供了一种计算机可读存储介质, 所述计算机可读存 储介质存储有计算机程序, 所述计算机程序被处理器执行吋实现以下步骤: [0020] 基于与数据库的特征相匹配的巡检算法, 获取所述数据库的运行状态数据;
[0021] 将所述运行状态数据导入至预设的数据库故障分析模型, 生成所述运行状态数 据对应的故障分析数据; 其中, 所述故障分析数据包含故障信息以及故障预警 f π息;
[0022] 提取所述故障分析数据包含的所述故障信息以及所述故障预警信息, 并确定各 个所述故障信息以及所述故障预警信息对应的修复方案;
[0023] 分别执行所述修复方案对应的修复操作, 以修复所述数据库的故障情况。
发明的有益效果
有益效果
[0024] 实施本发明实施例提供的一种数据库的检测方法及其终端具有以下有益效果: [0025] 本发明实施例不依赖数据库工程师的专业知识对数据库进行故障排査, 而是基 于数据库本身的特征匹配到与之对应的巡检算法, 从而通过该巡检算法获得的 运行状态数据能够较好的表征数据库是否包含故障情况, 并通过预设的数据库 故障分析模型得到故障分析数据, 可见, 上述操作无需数据库工程师进行介入
, 减少了对人工专业技术水平的依赖, 从而减少了人工成本以及数据库的运营 成本, 并且巡检算法是根据不同数据库的特性选取得到的, 其检测的准确性也 大大提高。 数据库的检测终端也可以根据匹配的修复方案自动对故障情况进行 修复, 提高了检测的效率以及修复的及吋性。
对附图的简要说明
附图说明
[0026] 为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例或现有技术描 述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是 本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性 的前提下, 还可以根据这些附图获得其他的附图。
[0027] 图 1是本发明第一实施例提供的一种数据库的检测方法的实现流程图;
[0028] 图 2是本发明第二实施例提供的一种数据库的检测方法 S103的具体实现流程图 [0029] 图 3是本发明第三实施例提供的一种数据库的检测方法 S101的具体实现流程图
[0030] 图 4是本发明第四实施例提供的一种数据库的检测方法的具体实现流程图; [0031] 图 5是本发明第五实施例提供的一种数据库的检测方法 S101的具体实现流程图
[0032] 图 6是本发明一实施例提供的一种数据库的检测终端的结构框图;
[0033] 图 7是本发明一实施例提供的一种终端设备的示意图。
本发明的实施方式
[0034] 为了使本发明的目的、 技术方案及优点更加清楚明白, 以下结合附图及实施例 , 对本发明进行进一步详细说明。 应当理解, 此处所描述的具体实施例仅仅用 以解释本发明, 并不用于限定本发明。
[0035] 本发明实施例解决了现有的数据库的检査技术, 主要通过数据库工程师定吋现 场收集信息并手动分析数据库的运行现状, 从而判别数据库是否存在异常情况 , 但该手段依赖于数据库工程师的专业技术水平, 并且不同工程师之间的检测 标准不一致, 从而导致异常判定存在较大的差异, 检测的准确性较低, 运营成 本较大。 并且需要人工到数据库现场进行故障排査, 检测效率较低, 常常无法 及吋发现异常情况的问题。
[0036] 在本发明实施例中, 流程的执行主体为安装有数据库的检测程序的终端设备, 终端设备包括服务器、 计算机设备、 平板电脑等终端, 用于检测各个数据库的 运行状态, 是否存在故障情况并进行修复。 特别地, 该终端设备为接入至数据 库系统内的一检测装置, 通过该数据库系统的内容网络获取各个数据库服务器 的运行状态, 继而对整个数据库系统包含的数据库进行检测以及维护。 图 1示出 了本发明第一实施例提供的数据库的检测方法的实现流程图, 详述如下:
[0037] 在 S101中, 基于与数据库的特征相匹配的巡检算法, 获取所述数据库的运行状 态数据。
[0038] 在本实施例中, 终端设备首先获取数据库的特征, 其中, 该特征包括但不限于 以下一种或至少两种的组合: 数据库的种类、 幵发商信息、 已存储的数据量以 及数据类型、 数据库的版本信息等, 根据上述数据库的特征, 可确定该数据库 的基本特性, 从而通过该基本特性, 从巡检算法库中匹配得到与之对应的巡检 方案。 特别地, 若该终端设备为同吋设有数据库程序以及数据库的检测程序的 终端设备, 即本实施例提供的数据库的检测方法为对本地的数据库进行检测, 即该终端设备可以只包含一个巡检算法, 即为本地数据库对应的巡检算法。 在 该情况下, 终端设备可以预设的吋间通过上位服务器更新该巡检算法, 以便本 地数据库的版本更新后也能适应性地变更巡检策略。
[0039] 在本实施例中, 终端设备除了通过上位服务器获取巡检算法外, 还可以通过数 据库的管理人员输入的方式获取该巡检算法, 在该情况下, 终端设备可接收管 理人员对应的终端设备发送编写完成的巡检算法, 终端设备在接收到该巡检算 法后, 将建立数据库与巡检算法的对应关系。 需要说明的是, 终端设备在存储 管理人员发送的巡检算法前, 需要对该管理人员进行鉴权操作, 获取管理人员 的账户权限信息, 并将该账户权限信息进行识别, 判断该账户权限信息是否与 该数据库的权限信息相匹配; 若两者匹配, 则存储该管理人员发送的巡检算法 ; 反之, 若两者权限不匹配, 则判定该巡检算法的设置操作为非法设置操作, 刪除该管理人员发送的巡检算法。
[0040] 可选地, 在本实施例中, 若终端设备用于检测多个数据库的故障情况, 则可基 于各个数据库的特征确定对应的巡检算法, 继而根据各个巡检算法得到多个数 据库对应的巡检方案, 从而终端设备可基于该巡检方案, 对由多个数据库组成 的数据库系统进行统一的故障检测。
[0041] 在本实施例中, 终端设备在确定了进行巡检的数据库对应的巡检算法后, 则通 过该巡检算法, 获取该数据库的运行状态数据。 其中, 该状态运行数据包括但 不限于: 数据库的数据冗余率、 数据库的平均读写速率、 数据库中各个分区的 数据存储情况、 各个分区的存储地址的分配情况、 数据库介质运行状态、 运算 溢出率等。 具体地, 终端设备可在数据库中运行巡检算法中包含的模拟运算程 序, 并监测数据库中相关的指标参数, 从而获取数据库的运行状态数据; 也可 以通过数据库服务器内置的运行数据统计模块, 直接提取巡检算法中预设的指 标参数, 得到数据库的运行状态数据。 [0042] 在 S102中, 将所述运行状态数据导入至预设的数据库故障分析模型, 生成所述 运行状态数据对应的故障分析数据; 其中, 所述故障分析数据包含故障信息以 及故障预警信息。
[0043] 在本实施例中, 终端设备存储有数据库故障分析模型, 用于根据输入的运行状 态数据, 判定该运行状态数据中是否包含故障风险情况, 该故障风险情况具体 为是否包含已经发生故障的故障信息, 以及可能发生故障的故障预警信息, 将 上述故障信息以及故障预警信息定义为多个风险点, 并生成与运行状态数据对 应的故障分析数据。 因此, 终端设备在获取到数据库的运行状态数据后, 则将 该运行状态数据导入到该数据库故障分析模型, 已得到巡检吋刻该数据库对应 的故障分析数据。
[0044] 可选地, 在本实施例中, 终端设备还可根据数据库的特征, 确定上述数据库故 障分析模型。 在该情况下, 终端设备存储有各个数据库对应的数据库故障分析 模型, 然后终端设备在 S101中已经获取了该数据库的特征, 在 S102中, 通过该 特征匹配对应的数据库故障分析模型, 继而执行 S102的操作。
[0045] 可选地, 在本实施例中, 该数据库故障分析模型还可以包含在巡检算法内。 在 该情况下, 在 S102之前, 终端设备提取巡检算法中包含的数据库分析模型。 因 此, 终端设备只需要将数据库的特征进行一次匹配操作, 即可得到巡检算法以 及数据库分析模型。
[0046] 在本实施例中, 数据库分析模型可通过训练学习的方式得到。 在该情况下, 数 据库的管理员可将其他数据库服务器中得到的故障分析数据以及本地数据库每 次巡检得到的故障分析数据输入至该数据库分析模型中, 用于训练更新该数据 库分析模型, 从而通过多次的迭代分析, 提高终端设备对于数据库故障分析的 准确性。
[0047] 在 S 103中, 提取所述故障分析数据包含的所述故障信息以及所述故障预警信息 , 并确定各个所述故障信息以及所述故障预警信息对应的修复方案。
[0048] 在本实施例中, 故障信息具体为: 在巡检过程中, 检测到数据库正处于故障状 态的相关信息, 包括故障发生的位置、 影响的功能以及故障运行参数等信息。 故障预警信息具体为: 在巡检过程中, 根据检测到的运行状态预判数据库某一 模块或功能可能将会发生异常, 或某一模块或功能的稳定性以及可靠性低于正 常水平, 此吋则汇总该功能或模块的相关信息作为故障预警信息。 因此, 终端 设备进行修复的并不限于已经发生故障的故障点, 还能将可能导致故障的风险 点也一并修复。
[0049] 在本实施例中, 终端设备根据数据库分析模型输出的故障分析数据, 确定该数 据中包含的各个故障信息以及故障预警信息, 并依次进行提取以及匹配修复方 案的操作。 具体地, 终端设备根据各个故障信息的故障内容, 如故障发生的位 置、 影响的功能模块以及故障运行参数等相关信息, 定位可能导致该故障产生 的多个成因, 并通过预设的故障成因确定算法一一进行排査, 继而确定导致本 次故障的异常信息, 根据该异常信息从修复方案资源库中提取与之对应的修复 方案。 需要说明的是, 故障预警信息匹配修复方案的过程与上述故障信息的过 程相似, 可参考上述故障信息确定修复方案的过程, 在此不再一一赘述。
[0050] 在本实施例中, 终端设备在确定了故障分析数据中所有故障信息以及故障预警 信息对应的修复方案后, 则执行 S104的相关操作。 进一步地, 若故障信息或故 障预警信息无法匹配到对应的修复方案, 可通过匹配度最高的一个或多个修复 方案进行组合, 对该故障信息或故障预警信息进行修复, 若修复不成功, 可通 知对应的数据库管理人员, 对其进行修复。
[0051] 在 S104中, 分别执行所述修复方案对应的修复操作, 以修复所述数据库的故障 情况。
[0052] 在本实施例中, 终端设备在确定了多个修复方案后, 将对数据库执行修复方案 对应的修复操作, 用以修复数据库中对应的故障情况, 该故障情况也包含故障 信息以及故障预警信息对应的故障情况。 可选地, 终端设备在确定某一故障信 息或故障预警信息对应的修复方案后, 则马上执行该修复方案对应的修复操作 , 以此类推, 根据不同故障信息以及故障预警信息对应的修复方案后, 即马上 进行修复流程, 从而提高修复的效率。
[0053] 可选地, 在本实施例中, 终端设备也可以对得到所有故障信息以及故障预警信 息对应的修复方案后进行汇总整理, 根据各个修复方案的优先级以及对应的修 复范围, 对修复方案进行合并以及确定对应的执行次序。 具体地, 对于修复操 作相同的修复操作, 统一执行, 并且对于优先级较高以及影响范围较广的修复 方案, 优先进行修复。 例如, 第一故障信息以及第二故障信息对应的故障修复 方案均是重启设备, 因此可将两个故障修复操作进行合并, 只执行一次重启操 作即可; 或者两者对应的修复区域不同, 但是对应修复操作相同, 如刪除缓存 区域的数据以及刪除高速存储模块的数据, 两者对应的修复操作均为刪除操作 , 只是对应的执行区域不相同, 因此可同吋对上述两个修复方案统一执行, 以 提高执行效率。
[0054] 可选地, 在本实施例中, 终端设备优先修复影响范围较广的修复方案。 第三故 障信息影响的为整个数据库的所有模块以及功能, 而第四故障信息可能只是影 响某一个功能模块, 在该情况下, 终端设备首先执行第三故障信息对应的修复 操作, 以消除影响整个数据库的故障信息。 由于即便修复了第四故障信息, 但 第三故障信息对于数据库的影响依然存在, 因此进行故障修复检测的过程中, 该功能模块可能依然无法正常运作, 从而可能判定为修复失败, 降低了终端设 备的准确率。 因此, 为了避免上述情况发生, 终端设备根据修复范围由大至少 , 依次执行各个修复方案。
[0055] 以上可以看出, 本发明实施例提供的一种数据库的检测方法首先获取数据的特 征, 确定与之匹配的巡检算法, 继而基于该巡检算法获取数据库的运行状态数 据; 数据库的检测终端在获取了运行状态数据后, 将其导入至预设的数据库故 障分析模型, 判断该运行状态数据中是否包含故障情况或可能发生故障的故障 预警情况, 并生成与之对应的故障分析数据, 然后根据该故障分析数据包含的 故障信息以及故障预警信息, 分别确定各个信息对应的修复方案, 并执行修复 操作, 从而实现了自动对数据库进行检测并修复故障的目的。 与现有的数据库 检测技术相比, 本发明实施例不依赖数据库工程师的专业知识对数据库进行故 障排査, 而是基于数据库本身的特征匹配到与之对应的巡检算法, 从而通过该 巡检算法获得的运行状态数据能够较好的表征数据库是否包含故障情况, 并通 过预设的数据库故障分析模型得到故障分析数据, 可见, 上述操作无需数据库 工程师进行介入, 减少了对人工专业技术水平的依赖, 从而减少了人工成本以 及数据库的运营成本, 并且巡检算法是根据不同数据库的特性选取得到的, 其 检测的准确性也大大提高。 数据库的检测终端也可以根据匹配的修复方案自动 对故障情况进行修复, 提高了检测的效率以及修复的及吋性。
[0056] 图 2示出了本发明第二实施例提供的一种数据库的检测方法 S103的具体实现流 程图。 参见图 2所示, 相对于图 1所述实施例, 本实施例提供的一种数据库的检 测方法 S103还包括以下步骤, 详述如下:
[0057] 进一步地, 所述提取所述故障分析数据包含的所述故障信息以及所述故障预警 信息, 并确定各个所述故障信息以及所述故障预警信息对应的修复方案, 包括
[0058] 在 S201中, 根据预设的故障类型分类算法, 确定所述故障信息以及所述故障预 警信息对应的故障类型。
[0059] 在本实施例中, 终端设备根据预设的故障类型分类算法, 分别判断各个故障信 息以及故障预警信息的故障类型。 具体地, 以确定故障信息对应的故障类型为 例, 终端设备获取故障信息中包含的故障发生的位置以及影响的功能, 定位该 故障信息所属的模块类别, 继而根据该故障信息中包含的故障运行参数, 确定 该所属模块中对应的硬件元件或程序, 从而得到该故障信息对应的故障类型。 相似地, 故障预警信息也可以通过上述步骤进行确定。
[0060] 在本实施例中, 该故障类型可包括: 软件故障以及硬件故障两大类别, 其中软 件故障中还包括: 系统故障、 版本冲突故障、 数据冲突故障、 程序损坏故障等 ; 硬件故障中还包括: 元件短路故障、 模块丢失故障、 模块掉电故障、 存储器 损坏故障等。
[0061] 在本实施例中, 终端设备根据用户的设置, 将上述的多个故障类型统一划分为 两个类别, 分别一类故障信息以及二类故障信息, 其中一类故障信息具体为分 配有对应的故障修复算法, 终端设备可自行根据故障修复算法对一类故障信息 进行故障修复, 无需通知管理人员; 而二类故障信息具体为终端设备可进行部 分应急修复, 但需要管理人员人工介入进行修复。 若终端设备确定该故障信息 或故障预警信息为一类故障信息, 则执行 S202的相关操作; 若终端设备确定该 故障信息或故障预警新为二类故障信息, 则执行 S203的相关操作。
[0062] 可选地, 在本实施例中, 终端设备还可根据故障类型的对于数据库影响程度分 为一类故障信息以及二类故障信息。 对于数据库影响程度较大的, 即需要较高 权限的故障信息, 定义为二类故障信息, 需要管理员介入进行修复; 而对于数 据库影响程度较低, 即修复权限较低的故障信息, 定义为一类故障信息。
[0063] 在 S202中, 若所述故障信息或所述故障预警信息为一类故障信息, 则从故障修 复算法库中提取与所述一类故障信息匹配的故障修复算法, 并根据所述故障修 复算法生成所述修复方案。
[0064] 在本实施例中, 终端设备设置有故障修复算法库, 其中包含各个一类故障信息 对应的故障修复算法。 因此, 终端设备在确定该故障信息或故障预警信息为一 类故障信息后, 则将该一类故障信息与故障修复算法库中的各个故障修复算法 进行匹配, 继而确定与之对应的故障修复算法, 并基于该故障修复算法以及故 障信息或故障预警信息, 生成上述修复方案。
[0065] 需要说明的是, 由于一类故障信息中仍可细分为多个故障类型, 即一类故障信 息并非对应于一个故障修复算法, 因此需要通过该故障信息以及故障预警信息 具体的故障类型与故障修复算法库中各个故障修复算法进行匹配, 确定对应的 故障修复算法。 具体地, 匹配的方式为: 终端设备査询预设的故障类型与故障 修复算法对应关系列表, 继而确定该故障信息或故障预警信息对应的故障修复 算法, 并根据该故障信息或故障预警信息包含的运行参数以及故障发生位置, 调整该故障修复算法中相应的参数项, 并输出该修复方案。
[0066] 在 S203中, 若所述故障信息或所述故障预警信息为二类故障信息, 则确定所述 故障信息或所述故障预警信息对应的故障处理用户。
[0067] 在本实施例中, 终端设备在确定故障信息或故障预警信息为二类故障信息后, 则判定需要通知对应的故障处理用户对该故障或故障预警进行修复操作, 因此 , 将査询该故障信息或故障预警信息对应的故障处理用户。 对于结构较为简单 的数据库, 对应的管理员一般只有一位, 因此, 各个类型的故障信息以及故障 预警信息均有该管理员进行修复, 在该情况下, 数据库的管理员即为故障处理 用户。
[0068] 在本实施例中, 对于结构较为复杂的数据库, 即数据库中包含的功能模块较多 , 且不同的模块对应一个幵发接口人, 因此, 终端设备则査询该故障信息以及 故障预警信息对应的幵发接口人, 作为故障处理用户。 具体地, 终端设备査询 该故障信息或故障预警信息包含的故障发生位置, 基于该故障发生位置确定该 位置对应的幵发接口人或责任人, 并识别为故障处理用户, 以通知该故障处理 用户执行相应的修复操作。
[0069] 可选地, 为了保持终端设备能够完成基本的服务响应操作, 终端设备可通过预 设的修复算法, 对上述故障信息或故障异常信息进行应急修复操作, 以保持数 据库能维持基本的功能响应。 特别地, 若数据库服务器设置有备用服务器, 在 该情况下, 终端设备可由主数据库服务器切换至备用数据库服务器, 直到故障 处理用户修复了上述故障信息以及故障预测信息, 再切换至主数据库服务器。
[0070] 在 S204中, 生成所述二类故障信息对应的故障处理事件, 并提交所述故障处理 事件至所述故障处理用户, 所述故障处理事件用于指示所述故障处理用户修复 所述二类故障信息。
[0071] 在本实施例中, 终端设备在确定了该二类故障信息对应的故障处理用户后, 需 要告知该故障处理用户需要及吋进行修复, 因而将根据该故障信息或故障预警 信息生成二类故障信息对应的故障处理事件。 其中, 该故障处理事件包括: 故 障检测吋间、 故障发生位置、 故障预计修复吋间、 故障等级等指示故障处理用 户进行修复的相关信息, 优选地, 还包含故障修复建议。 终端设备根据预设的 故障修复算法库中, 提取该故障信息或故障修复信息对应的故障修复算法, 并 得到对应的故障修复建议, 终端设备也可以通过网络采集与该故障信息或故障 预警信息相关的修复资讯, 汇总并生成该故障修复建议。
[0072] 在本实施例中, 终端设备在生成该故障处理事件后, 将提交该故障处理事件至 该故障处理用户, 以启动故障修复流程。 故障处理用户可通过办公系统或邮件 等方式获取到该故障处理事件, 并自行执行修复策略, 以便对该故障信息或故 障预警信息进行修复。
[0073] 在本发明实施例中, 通过获取故障信息或故障预警信息的故障类型, 采用两种 不同的手段对数据库进行修复, 提高了数据库的修复的灵活性, 对于较为简单 以及权限较低的故障, 可交由终端设备自行修复; 而对于较为复杂以及权限较 高的故障, 则建议人工介入修复, 并且提供包含修复建议的故障处理事件给到 故障处理用户, 从而降低了故障处理用户的修复难度。
[0074] 图 3示出了本发明第三实施例提供的一种数据库的检测方法中 S101的具体实现 流程图。 参见图 3所示, 相对于图 1所述实施例, 本实施例提供的一种数据库的 检测方法中 S101包括以下步骤, 详述如下:
[0075] 进一步地, 基于与数据库的特征相匹配的巡检算法, 获取所述数据库的运行状 态数据, 包括:
[0076] 在 S301中, 获取所述数据库的版本标识。
[0077] 在本实施例中, 终端设备为了确定该数据库对应的巡检算法, 首先获取该数据 库的版本标识, 并根据该版本标识确定该数据库的类型以及版本号。 由于数据 库服务器可通过上位服务器对数据库的版本进行更新, 增加对应的功能以及修 复上一版本的漏洞。 因此, 终端设备在进行数据库的状态数据巡检前, 需要获 取该数据库的版本标识。
[0078] 在 S302中, 基于预设的数据库版本与巡检算法的对应关系, 确定所述版本标识 对应的所述巡检算法。
[0079] 在本实施例中, 终端设备存储有预设的数据库版本与巡检算法的对应关系, 在 获取了数据库对应的版本标识后, 将査询该对应关系, 确定该版本标识对应的 巡检算法, 并从巡检算法库中提取与之对应的巡检算法。 需要说明的是, 若在 上述对应关系中不存在与当前数据库的版本标识匹配的版本, 则可能由于当前 版本较新, 因此终端设备可向上位服务器发送巡检算法获取请求, 以便上位服 务器返回与该版本标识对应的巡检算法。
[0080] 可选地, 在本实施例中, 若终端设备无法确定与所述版本标识对应的巡检算法 , 则从上述对应关系包含的版本标识中, 选取与当前数据库的版本标识匹配度 最高的版本标识, 作为其对应的版本标识, 即该匹配度最高的版本标识对应的 巡检算法, 则为该数据库对应的巡检算法。
[0081] 在 S303中, 基于所述版本信息对应的巡检算法, 获取所述数据库的运行状态数 据。
[0082] 在本实施例中, 由于 S303的实现步骤与 S101的实现步骤完全相同, 具体的阐述 可参见 S101, 在此不再赘述。 [0083] 在本发明实施例中, 通过获取数据库的版本标识, 确定该数据库对应的巡检算 法, 从而提高了巡检算法的准确性, 继而提高了检测的准确率。
[0084] 图 4示出了本发明第四实施例提供的一种数据库的检测方法的具体实现流程图 。 参见图 4所示, 相对于图 1至图 3所述实施例, 本实施例提供的一种数据库的检 测方法还包含 S401~S402, 详述如下:
[0085] 在 S401中, 获取各个所述故障信息以及所述故障预警信息的处理结果, 并根据 所述处理结果生成数据库检测报告。
[0086] 在本实施例中, 终端设备将汇总各个故障信息以及故障预警信息对应的处理结 果, 其中该处理结果为终端设备执行修复方案对应的修复操作后, 得到的修复 结果。 对应地, 该处理结果包含修复成功以修复失败的处理结果, 也包含故障 判定错误的处理结果。 终端设备或数据库的管理人员在获取到该故障信息或故 障预警信息后, 可对其准确性进行判断, 对于故障判定正确的故障信息或故障 异常信息, 则执行 S103以及 S104的相关操作; 而对于故障判定错误的故障信息 或故障异常信息, 则可跳过 S103以及 S104的相关操作, 生成故障判定错误的处 理结果。
[0087] 特别地, 若修复方案中需要数据库的故障处理用户手动进行修复, 终端设备将 采集该手动修复过程中输入的参数信息以及程序代码, 在修复成功后, 将采集 得到的信息生成处理结果, 对人工修复的内容进行学习, 并生成与之对应的修 复方案, 添加至修复方案库中。
[0088] 在本实施例中, 终端设备根据各个故障信息以及故障预警信息对应的处理结果 生成数据库检测报告, 该数据库检测报告列举了本次巡检检测得到的故障信息 及其对应的处理结果, 以及故障预警信息及其对应的处理结果, 优选地, 还更 新了数据库的故障率以及资源占用情况, 从而用户根据査询该数据库检测报告 , 可准确获取到数据库整体的故障情况。
[0089] 在 S402中, 将所述故障信息以及所述故障预警信息对应的处理结果输入所述数 据库故障分析模型, 以对所述数据库故障分析模型进行训练更新。
[0090] 在本实施例中, 终端设备根据上述获取得到故障信息以及故障预警信息对应的 处理结果输入至数据库故障分析模型, 由于数据库故障分析模型用于检测数据 库的运行数据中是否包含故障情况, 而故障信息以及故障预警信息中也包含了 数据库在故障发生或即将发生吋对应的运行状态数据, 因此将上述处理结果输 入至该故障分析模型中, 对其进行训练更新, 可以提高该数据库的故障分析模 型的准确率。
[0091] 在本发明实施例中, 通过汇总各个故障信息以及故障预警信息对应的处理结果 , 继而生成数据库检测报告, 便于用户进行査阅以及获知数据库实吋的运行情 况, 以便对数据库的制定对应的使用决策。 另一方面, 将故障信息以及故障预 警信息的处理结果对数据库分析模型进行训练更新, 可进一步提高数据库故障 分析模型对于故障的敏感度, 从而提高检测的准确率。
[0092] 图 5示出了本发明第五实施例提供的一种数据库的检测方法 S101的具体实现流 程图。 参见图 5所示, 相对于图 1所述实施例, 本实施例提供的一种数据库的检 测方法 S101还包括以下步骤, 详述如下:
[0093] 进一步地, 所述巡检算法包含巡检触发条件; 所述基于与数据库的特征相匹配 的巡检算法, 获取所述数据库的运行状态数据, 还包括:
[0094] 在 S501中, 获取当前吋刻的吋间信息。
[0095] 在本实施例中, 巡检算法中设置有巡检触发条件, 其中该巡检触发条件具体为 各个吋间触发节点。 各个吋间触发节点可以符合以预设的吋间间隔为划分规律 的吋间节点, 例如每隔两个小吋对该数据库进行巡检, 则各个吋间触发节点之 间相距两小吋; 当然, 各个吋间触发节点也可以根据用户的需求进行手动设置
[0096] 在本实施例中, 终端设备将以预设的频率获取当前吋刻的吋间信息, 并将该吋 间信息与该数据库对应的巡检算法进行匹配操作, 若该吋间信息满足巡检算法 中的巡检触发条件, 则执行 S502的相关操作; 反之, 若该吋间信息不满足巡检 算法中的巡检触发条件, 则保持待机状态, 等待下一次采集吋刻的到来。
[0097] 在 S502中, 若所述吋间信息满足所述巡检触发条件, 则执行基于与数据库的特 征相匹配的巡检算法, 获取所述数据库的运行状态数据的操作。
[0098] 在本实施例中, 由于 S502的实现步骤与 S101的实现步骤完全相同, 具体的阐述 可参见 S101, 在此不再赘述。 [0099] 在本发明实施例中, 通过检测当前的吋间信息是否符合巡检算法中的巡检触发 条件, 从而实现定吋对数据库进行巡检的目的, 提高了数据库的检测的智能化 , 也提高了数据库巡检的灵活性。
[0100] 应理解, 上述实施例中各步骤的序号的大小并不意味着执行顺序的先后, 各过 程的执行顺序应以其功能和内在逻辑确定, 而不应对本发明实施例的实施过程 构成任何限定。
[0101] 图 6示出了本发明一实施例提供的一种数据库的检测终端的结构框图, 该数据 库的检测终端包括的各单元用于执行图 1对应的实施例中的各步骤。 具体请参阅 图 1与图 1所对应的实施例中的相关描述。 为了便于说明, 仅示出了与本实施例 相关的部分。
[0102] 参见图 6, 所述数据库的检测终端包括:
[0103] 运行状态数据获取模块 61, 用于基于与数据库的特征相匹配的巡检算法, 获取 所述数据库的运行状态数据;
[0104] 故障分析数据生成模块 62, 用于将所述运行状态数据导入至预设的数据库故障 分析模型, 生成所述运行状态数据对应的故障分析数据; 其中, 所述故障分析 数据包含故障信息以及故障预警信息;
[0105] 修复方案确定模块 63, 用于提取所述故障分析数据包含的所述故障信息以及所 述故障预警信息, 并确定各个所述故障信息以及所述故障预警信息对应的修复 方案;
[0106] 修复方案执行模块 64, 用于分别执行所述修复方案对应的修复操作, 以修复所 述数据库的故障情况。
[0107] 可选地, 所述修复方案确定模块 63具体包括:
[0108] 故障类型确定模块, 用于根据预设的故障类型分类算法, 确定所述故障信息以 及所述故障预警信息对应的故障类型;
[0109] 一类故障信息执行模块, 用于若所述故障信息或所述故障预警信息为一类故障 信息, 则从故障修复算法库中提取与所述一类故障信息匹配的故障修复算法, 并根据所述故障修复算法生成所述修复方案;
[0110] 故障处理用户确定模块, 用于若所述故障信息或所述故障预警信息为二类故障 信息, 则确定所述故障信息或所述故障预警信息对应的故障处理用户;
[0111] 二类故障信息执行模块, 用于生成所述二类故障信息对应的故障处理事件, 并 提交所述故障处理事件至所述故障处理用户, 所述故障处理事件用于指示所述 故障处理用户修复所述二类故障信息。
[0112] 可选地, 所述运行状态数据获取模块 61具体包括:
[0113] 版本标识获取模块, 用于获取所述数据库的版本标识;
[0114] 巡检算法确定模块, 用于基于预设的数据库版本与巡检算法的对应关系, 确定 所述版本标识对应的所述巡检算法;
[0115] 运行状态数据提取模块, 用于基于所述版本信息对应的巡检算法, 获取所述数 据库的运行状态数据。
[0116] 可选地, 所述数据库的检测终端还包括:
[0117] 数据库检测报告输出模块, 用于获取各个所述故障信息以及所述故障预警信息 的处理结果, 并根据所述处理结果生成数据库检测报告;
[0118] 数据库故障分析模型调整模块, 用于将所述故障信息以及所述故障预警信息对 应的处理结果输入所述数据库故障分析模型, 以对所述数据库故障分析模型进 行训练更新。
[0119] 可选地, 所述数据库检测算法包含巡检触发条件; 所述运行状态数据获取模块 61, 还包括:
[0120] 吋间信息获取模块, 用于获取当前吋刻的吋间信息;
[0121] 巡检吋机触发模块, 用于若所述吋间信息满足所述巡检触发条件, 则执行所述 基于与数据库的特征相匹配的巡检算法, 获取所述数据库的运行状态数据的操 作。
[0122] 因此, 本发明实施例提供的数据库的检测终端同样可以不依赖数据库工程师的 专业知识对数据库进行故障排査, 而是基于数据库本身的特征匹配到与之对应 的巡检算法, 从而通过该巡检算法获得的运行状态数据能够较好的表征数据库 是否包含故障情况, 并通过预设的数据库故障分析模型得到故障分析数据, 可 见, 上述操作无需数据库工程师进行介入, 减少了对人工专业技术水平的依赖 , 从而减少了人工成本以及数据库的运营成本, 并且巡检算法是根据不同数据 库的特性选取得到的, 其检测的准确性也大大提高。 数据库的检测终端也可以 根据匹配的修复方案自动对故障情况进行修复, 提高了检测的效率以及修复的 及吋性。
[0123] 图 7是本发明另一实施例提供的一种终端设备的示意图。 如图 7所示, 该实施例 的终端设备 7包括: 处理器 70、 存储器 71以及存储在所述存储器 71中并可在所述 处理器 70上运行的计算机程序 72, 例如数据库的检测程序。 所述处理器 70执行 所述计算机程序 72吋实现上述各个数据库的检测方法实施例中的步骤, 例如图 1 所示的 S101至 S104。 或者, 所述处理器 70执行所述计算机程序 72吋实现上述各 装置实施例中各单元的功能, 例如图 6所示模块 61至 64功能。
[0124] 示例性的, 所述计算机程序 72可以被分割成一个或多个单元, 所述一个或者多 个单元被存储在所述存储器 71中, 并由所述处理器 70执行, 以完成本发明。 所 述一个或多个单元可以是能够完成特定功能的一系列计算机程序指令段, 该指 令段用于描述所述计算机程序 72在所述终端设备 7中的执行过程。 例如, 所述计 算机程序 72可以被分割成运行状态数据获取模块、 故障分析数据生成模块、 修 复方案确定模块以及修复方案执行模块, 各单元具体功能如下:
[0125] 运行状态数据获取模块, 用于基于与数据库的特征相匹配的巡检算法, 获取所 述数据库的运行状态数据;
[0126] 故障分析数据生成模块, 用于将所述运行状态数据导入至预设的数据库故障分 析模型, 生成所述运行状态数据对应的故障分析数据; 其中, 所述故障分析数 据包含故障信息以及故障预警信息;
[0127] 修复方案确定模块, 用于提取所述故障分析数据包含的所述故障信息以及所述 故障预警信息, 并确定各个所述故障信息以及所述故障预警信息对应的修复方 案;
[0128] 修复方案执行模块, 用于分别执行所述修复方案对应的修复操作, 以修复所述 数据库的故障情况。
[0129] 所述终端设备 7可以是桌上型计算机、 笔记本、 掌上电脑及云端服务器等计算 设备。 所述终端设备可包括, 但不仅限于, 处理器 70、 存储器 71。 本领域技术 人员可以理解, 图 7仅仅是终端设备 7的示例, 并不构成对终端设备 7的限定, 可 以包括比图示更多或更少的部件, 或者组合某些部件, 或者不同的部件, 例如 所述终端设备还可以包括输入输出设备、 网络接入设备、 总线等。
[0130] 所称处理器 70可以是中央处理单元 (Central Processing Unit, CPU) , 还可以是其 他通用处理器、 数字信号处理器(Digital Signal Processor, DSP)、 专用集成电路 (Application Specific Integrated
Circuit, ASIC)、 现成可编程门阵列 (Field-Programmable Gate Array, FPGA)或者 其他可编程逻辑器件、 分立门或者晶体管逻辑器件、 分立硬件组件等。 通用处 理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
[0131] 以上所述实施例仅用以说明本发明的技术方案, 而非对其限制; 尽管参照前述 实施例对本发明进行了详细的说明, 本领域的普通技术人员应当理解: 其依然 可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分技术特征进 行等同替换; 而这些修改或者替换, 并不使相应技术方案的本质脱离本发明各 实施例技术方案的精神和范围, 均应包含在本发明的保护范围之内。

Claims

权利要求书
[权利要求 1] 一种数据库的检测方法, 其特征在于, 包括:
基于与数据库的特征相匹配的巡检算法, 获取所述数据库的运行状态 数据;
将所述运行状态数据导入至预设的数据库故障分析模型, 生成所述运 行状态数据对应的故障分析数据; 其中, 所述故障分析数据包含故障 信息以及故障预警信息;
提取所述故障分析数据包含的所述故障信息以及所述故障预警信息, 并确定各个所述故障信息以及所述故障预警信息对应的修复方案; 分别执行所述修复方案对应的修复操作, 以修复所述数据库的故障情 况。
[权利要求 2] 根据权利要求 1所述的检测方法, 其特征在于, 所述提取所述故障分 析数据包含的所述故障信息以及所述故障预警信息, 并确定各个所述 故障信息以及所述故障预警信息对应的修复方案, 包括:
根据预设的故障类型分类算法, 确定所述故障信息以及所述故障预警 信息对应的故障类型;
若所述故障信息或所述故障预警信息为一类故障信息, 则从故障修复 算法库中提取与所述一类故障信息匹配的故障修复算法, 并根据所述 故障修复算法生成所述修复方案;
若所述故障信息或所述故障预警信息为二类故障信息, 则确定所述故 障信息或所述故障预警信息对应的故障处理用户; 生成所述二类故障信息对应的故障处理事件, 并提交所述故障处理事 件至所述故障处理用户, 所述故障处理事件用于指示所述故障处理用 户修复所述二类故障信息。
[权利要求 3] 根据权利要求 1所述的检测方法, 其特征在于, 所述基于与数据库的 特征相匹配的巡检算法, 获取所述数据库的运行状态数据, 包括: 获取所述数据库的版本标识;
基于预设的数据库版本与巡检算法的对应关系, 确定所述版本标识对 应的所述巡检算法;
基于所述版本信息对应的巡检算法, 获取所述数据库的运行状态数据
[权利要求 4] 根据权利要求 1-3任一项所述的检测方法, 其特征在于, 所述数据库 的检测方法还包括:
获取各个所述故障信息以及所述故障预警信息的处理结果, 并根据所 述处理结果生成数据库检测报告;
将所述故障信息以及所述故障预警信息对应的处理结果输入所述数据 库故障分析模型, 以对所述数据库故障分析模型进行训练更新。
[权利要求 5] 根据权利要求 1所述的检测方法, 其特征在于, 所述巡检算法包含巡 检触发条件; 所述基于与数据库的特征相匹配的巡检算法, 获取所述 数据库的运行状态数据, 还包括:
获取当前吋刻的吋间信息;
若所述吋间信息满足所述巡检触发条件, 则执行基于与数据库的特征 相匹配的巡检算法, 获取所述数据库的运行状态数据的操作。
[权利要求 6] —种数据库的检测终端, 其特征在于, 包括:
运行状态数据获取模块, 用于基于与数据库的特征相匹配的巡检算法 , 获取所述数据库的运行状态数据;
故障分析数据生成模块, 用于将所述运行状态数据导入至预设的数据 库故障分析模型, 生成所述运行状态数据对应的故障分析数据; 其中 , 所述故障分析数据包含故障信息以及故障预警信息;
修复方案确定模块, 用于提取所述故障分析数据包含的所述故障信息 以及所述故障预警信息, 并确定各个所述故障信息以及所述故障预警 信息对应的修复方案;
修复方案执行模块, 用于分别执行所述修复方案对应的修复操作, 以 修复所述数据库的故障情况。
[权利要求 7] 根据权利要求 6所述的检测终端, 其特征在于, 所述修复方案确定模 块具体包括: 故障类型确定模块, 用于根据预设的故障类型分类算法, 确定所述故 障信息以及所述故障预警信息对应的故障类型; 一类故障信息执行模块, 用于若所述故障信息或所述故障预警信息为 一类故障信息, 则从故障修复算法库中提取与所述一类故障信息匹配 的故障修复算法, 并根据所述故障修复算法生成所述修复方案; 故障处理用户确定模块, 用于若所述故障信息或所述故障预警信息为 二类故障信息, 则确定所述故障信息或所述故障预警信息对应的故障 处理用户;
二类故障信息执行模块, 用于生成所述二类故障信息对应的故障处理 事件, 并提交所述故障处理事件至所述故障处理用户, 所述故障处理 事件用于指示所述故障处理用户修复所述二类故障信息。
[权利要求 8] 根据权利要求 6所述的检测终端, 其特征在于, 所述运行状态数据获 取模块具体包括:
版本标识获取模块, 用于获取所述数据库的版本标识;
巡检算法确定模块, 用于基于预设的数据库版本与巡检算法的对应关 系, 确定所述版本标识对应的所述巡检算法;
运行状态数据提取模块, 用于基于所述版本信息对应的巡检算法, 获 取所述数据库的运行状态数据。
[权利要求 9] 根据权利要求 6-8任一项所述的检测方法, 其特征在于, 所述数据库 的检测终端还包括:
数据库检测报告输出模块, 用于获取各个所述故障信息以及所述故障 预警信息的处理结果, 并根据所述处理结果生成数据库检测报告; 数据库故障分析模型调整模块, 用于将所述故障信息以及所述故障预 警信息对应的处理结果输入所述数据库故障分析模型, 以对所述数据 库故障分析模型进行训练更新。
[权利要求 10] 根据权利要求 6所述的检测方法, 其特征在于, 所述数据库检测算法 包含巡检触发条件; 所述运行状态数据获取模块, 还包括: 吋间信息获取模块, 用于获取当前吋刻的吋间信息; 巡检吋机触发模块, 用于若所述吋间信息满足所述巡检触发条件, 则 执行所述基于与数据库的特征相匹配的巡检算法, 获取所述数据库的 运行状态数据的操作。
[权利要求 11] 一种终端设备, 包括存储器、 处理器以及存储在所述存储器中并可在 所述处理器上运行的计算机程序, 其特征在于, 所述处理器执行所述 计算机程序吋实现如权利要求 1至 5任一项所述方法的步骤。
[权利要求 12] 一种计算机可读存储介质, 所述计算机可读存储介质存储有计算机程 序, 其特征在于, 所述计算机程序被处理器执行吋实现如权利要求 1 至 5任一项所述方法的步骤。
PCT/CN2017/100753 2017-09-06 2017-09-06 一种数据库的检测方法及其终端 WO2019047072A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/100753 WO2019047072A1 (zh) 2017-09-06 2017-09-06 一种数据库的检测方法及其终端
CN201780000979.4A CN110178121B (zh) 2017-09-06 2017-09-06 一种数据库的检测方法及其终端

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/100753 WO2019047072A1 (zh) 2017-09-06 2017-09-06 一种数据库的检测方法及其终端

Publications (1)

Publication Number Publication Date
WO2019047072A1 true WO2019047072A1 (zh) 2019-03-14

Family

ID=65633310

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/100753 WO2019047072A1 (zh) 2017-09-06 2017-09-06 一种数据库的检测方法及其终端

Country Status (2)

Country Link
CN (1) CN110178121B (zh)
WO (1) WO2019047072A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502499A (zh) * 2019-06-26 2019-11-26 中电万维信息技术有限责任公司 基于贝叶斯算法的数据故障事件处理方法以及维护系统
CN111611131A (zh) * 2020-05-18 2020-09-01 中移(杭州)信息技术有限公司 基于Saltstack的运维方法、装置、系统及存储介质
CN112948459A (zh) * 2021-02-08 2021-06-11 中国铁道科学研究院集团有限公司 铁路基础设施巡检装置、方法及系统

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110955647A (zh) * 2019-12-04 2020-04-03 世纪龙信息网络有限责任公司 数据库辅助方法、装置、计算机设备和存储介质
CN111290930A (zh) * 2020-02-17 2020-06-16 京东数字科技控股有限公司 一种进程处理方法、装置、系统及存储介质
CN112231133B (zh) * 2020-10-16 2023-06-30 杭州中奥科技有限公司 一种数据修复处理方法、装置及电子设备
CN113886130A (zh) * 2021-10-21 2022-01-04 深信服科技股份有限公司 一种处理数据库故障的方法,装置及介质
CN113886132B (zh) * 2021-12-07 2022-04-08 深圳市明源云科技有限公司 web端错误智能修复方法、设备及计算机可读存储介质
CN115865751B (zh) * 2022-11-25 2024-05-14 南方电网数字平台科技(广东)有限公司 基于多态数据的故障检测方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6199069B1 (en) * 1997-08-25 2001-03-06 International Business Machines Corporation System and method for switching between databases without disruption to applications
CN101321207A (zh) * 2008-07-22 2008-12-10 中国移动通信集团江苏有限公司 一种电信客户服务系统数据库故障处理方法
US20090327519A1 (en) * 2008-06-26 2009-12-31 Microsoft Corporation Adding individual database failover/switchover to an existing storage component with limited impact
CN103902542A (zh) * 2012-12-25 2014-07-02 百度在线网络技术(北京)有限公司 一种测试环境中数据库的运维方法及系统
CN106021030A (zh) * 2016-05-30 2016-10-12 浪潮电子信息产业股份有限公司 一种数据库的系统、一种处理数据库故障的方法及装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102081623B (zh) * 2009-11-30 2012-10-03 中国移动通信集团浙江有限公司 一种数据库异常检测方法和系统
WO2015100577A1 (en) * 2013-12-31 2015-07-09 Siemens Aktiengesellschaft Devices and methods for arc fault detection
CN106161046B (zh) * 2015-03-18 2021-01-15 国家电网公司 一种面向电力光传输网的通信安全防御系统及其控制方法
CN106156202B (zh) * 2015-04-22 2019-11-19 中国移动通信集团广东有限公司 一种数据库故障的处理方法及装置
CN105337765B (zh) * 2015-10-10 2018-10-12 上海新炬网络信息技术股份有限公司 一种分布式hadoop集群故障自动诊断修复系统
CN105183614A (zh) * 2015-11-03 2015-12-23 华夏银行股份有限公司 一种数据库故障预测方法及装置
CN106126403B (zh) * 2016-06-16 2018-10-12 北京中亦安图科技股份有限公司 Oracle数据库故障分析方法和装置
CN106249690B (zh) * 2016-09-29 2019-05-14 黑龙江八一农垦大学 一种电气控制系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6199069B1 (en) * 1997-08-25 2001-03-06 International Business Machines Corporation System and method for switching between databases without disruption to applications
US20090327519A1 (en) * 2008-06-26 2009-12-31 Microsoft Corporation Adding individual database failover/switchover to an existing storage component with limited impact
CN101321207A (zh) * 2008-07-22 2008-12-10 中国移动通信集团江苏有限公司 一种电信客户服务系统数据库故障处理方法
CN103902542A (zh) * 2012-12-25 2014-07-02 百度在线网络技术(北京)有限公司 一种测试环境中数据库的运维方法及系统
CN106021030A (zh) * 2016-05-30 2016-10-12 浪潮电子信息产业股份有限公司 一种数据库的系统、一种处理数据库故障的方法及装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502499A (zh) * 2019-06-26 2019-11-26 中电万维信息技术有限责任公司 基于贝叶斯算法的数据故障事件处理方法以及维护系统
CN111611131A (zh) * 2020-05-18 2020-09-01 中移(杭州)信息技术有限公司 基于Saltstack的运维方法、装置、系统及存储介质
CN111611131B (zh) * 2020-05-18 2023-06-30 中移(杭州)信息技术有限公司 基于Saltstack的运维方法、装置、系统及存储介质
CN112948459A (zh) * 2021-02-08 2021-06-11 中国铁道科学研究院集团有限公司 铁路基础设施巡检装置、方法及系统
CN112948459B (zh) * 2021-02-08 2024-04-30 中国铁道科学研究院集团有限公司 铁路基础设施巡检装置、方法及系统

Also Published As

Publication number Publication date
CN110178121A (zh) 2019-08-27
CN110178121B (zh) 2023-04-21

Similar Documents

Publication Publication Date Title
WO2019047072A1 (zh) 一种数据库的检测方法及其终端
US20220206889A1 (en) Automatic correlation of dynamic system events within computing devices
US9690645B2 (en) Determining suspected root causes of anomalous network behavior
US9471594B1 (en) Defect remediation within a system
CN110088744B (zh) 一种数据库维护方法及其系统
JP2017509262A (ja) ネットワーク障害のトラブルシューティング・オプションの識別
JP2014112400A (ja) アソシエーションルールマイニングを使用してコンピュータ環境内の計算エンティティ向けコンフィギュレーションルールを生成するための方法及び装置
WO2007147327A1 (fr) Procédé, système et appareil de repérage de défaillance d'un appareil de communication
US20200073781A1 (en) Systems and methods of injecting fault tree analysis data into distributed tracing visualizations
US20200394127A1 (en) Fault detection using breakpoint value-based fingerprints of failing regression test cases
WO2019047071A1 (zh) 一种数据库故障的响应方法及其终端
CN110647318A (zh) 一种有状态应用的实例创建方法、装置、设备及介质
US20180227203A1 (en) Operation of data network
US10970197B2 (en) Breakpoint value-based version control
CN115604086A (zh) 监控报警故障自愈方法、装置、设备、介质和程序产品
US11860724B2 (en) Method and system for facilitating a self-healing network
CN111221320B (zh) 一种数据判读方法、装置、终端及计算机可读介质
WO2019056545A1 (zh) 测试机自动化管理方法、装置、设备及存储介质
US20230011129A1 (en) Log analyzer for fault detection
US11138512B2 (en) Management of building energy systems through quantification of reliability
CN113886130A (zh) 一种处理数据库故障的方法,装置及介质
CN115237641A (zh) 故障检测的方法、装置、电子设备和可读介质
WO2023061227A1 (zh) 数据库运维方法和装置
US20190121973A1 (en) System and method for detecting security risks in a computer system
CN115333923B (zh) 一种故障点溯源分析方法、装置、设备及介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17924281

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17924281

Country of ref document: EP

Kind code of ref document: A1