CN111078501A - ORM-based database monitoring method, system, server and storage medium - Google Patents

ORM-based database monitoring method, system, server and storage medium Download PDF

Info

Publication number
CN111078501A
CN111078501A CN201911293629.9A CN201911293629A CN111078501A CN 111078501 A CN111078501 A CN 111078501A CN 201911293629 A CN201911293629 A CN 201911293629A CN 111078501 A CN111078501 A CN 111078501A
Authority
CN
China
Prior art keywords
monitoring
database
threshold
operation request
request instruction
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201911293629.9A
Other languages
Chinese (zh)
Inventor
张维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Mingshu Information Co., Ltd
Original Assignee
Shenzhen Readily Technology Co ltd
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 Shenzhen Readily Technology Co ltd filed Critical Shenzhen Readily Technology Co ltd
Priority to CN201911293629.9A priority Critical patent/CN111078501A/en
Publication of CN111078501A publication Critical patent/CN111078501A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents

Abstract

The embodiment of the invention discloses a database monitoring method, a system, a server and a storage medium based on ORM, wherein the method comprises the following steps: acquiring an operation request instruction of a client; acquiring a database monitoring parameter of an operation request instruction through an ORM-based interception module, and acquiring a first monitoring threshold or a second monitoring threshold of a monitoring configuration module corresponding to the operation request instruction; and judging whether early warning is needed or not according to the relation between the first monitoring threshold or the second monitoring threshold and the database monitoring parameters. According to the invention, the monitoring parameters in the operation request instruction are obtained through the interception module based on the ORM framework, and the monitoring parameters are monitored and early warned in real time by combining the customizable first monitoring threshold and the preset second monitoring threshold, so that the technical problem that the monitoring and early warning cannot be customized flexibly according to the requirements at low cost is solved, and the technical effect of adopting the individually configured monitoring and early warning function aiming at different database operation methods at low cost and high speed is achieved.

Description

ORM-based database monitoring method, system, server and storage medium
Technical Field
The embodiment of the invention relates to a monitoring and early warning technology of data access, in particular to a database monitoring method, a database monitoring system, a database monitoring server and a storage medium based on an ORM (object relational mapping).
Background
In a software system, the writing of an SQL statement is not standard, or the untightness of database access codes may cause abnormal conditions such as slow SQL, full-table scan, and the like, so that the performance and stability of the software system are directly affected.
Two monitoring and early warning methods aiming at data access are commonly adopted at present, one is to realize the monitoring and early warning functions through a series of links such as log collection, report, storage and analysis; still another approach is to intercept commands to accomplish the collection, reporting and analysis. However, the methods have the technical problems that the access cost is high, and the monitoring method cannot be customized according to the self requirement.
Disclosure of Invention
The invention provides a database monitoring method, a database monitoring system, a server and a storage medium based on an ORM (object relational mapping), which are used for realizing rapid and low-cost database monitoring and early warning.
In a first aspect, an embodiment of the present invention provides an ORM-based database monitoring method, including:
acquiring an operation request instruction of a client;
acquiring a database monitoring parameter of an operation request instruction according to the operation request instruction through an ORM-based interception module, and acquiring a first monitoring threshold or a second monitoring threshold of a monitoring configuration module corresponding to the operation request instruction;
and judging whether early warning is needed or not according to the relation between the first monitoring threshold or the second monitoring threshold and the database monitoring parameters.
Further, the acquiring, by the ORM-based interception module, the database monitoring parameter of the operation request instruction, and the first monitoring threshold or the second monitoring threshold corresponding to the operation request instruction of the monitoring configuration module includes:
judging whether an operation request instruction is received or not;
if an operation request instruction is received, judging whether a first monitoring threshold value is obtained or not;
if the first monitoring threshold value is obtained, obtaining a database monitoring parameter of the operation request instruction;
and if the first monitoring threshold is not obtained, obtaining a second monitoring threshold of the monitoring configuration module and the database monitoring parameters of the operation request instruction.
Further, the second monitoring threshold comprises a preset configuration parameter threshold based on JAVA.
Further, the early warning according to the relationship between the first monitoring threshold or the second monitoring threshold and the database monitoring parameter includes:
judging whether an early warning monitoring switch is turned on or not;
if yes, early warning is carried out according to the relation between the first monitoring threshold or the second monitoring threshold and the database monitoring parameters;
if not, the early warning monitoring switch is turned on again to ensure that the early warning function works normally.
Further, the performing early warning according to the relationship between the first monitoring threshold or the second monitoring threshold and the database monitoring parameter further includes:
and when the database monitoring parameter is larger than the first monitoring threshold or the second monitoring threshold, early warning is carried out on the database monitoring parameter.
Further, the early warning comprises mail early warning and short message early warning.
Further, the database monitoring parameters include database information, input parameters, query results, abnormal number and time consumption.
In a second aspect, an embodiment of the present invention further provides an ORM-based database monitoring system, including:
the first acquisition module is used for acquiring an operation request instruction of the client;
the second acquisition module is used for acquiring the database monitoring parameters of the operation request instruction through the ORM-based interception module and acquiring a first monitoring threshold or a second monitoring threshold of the monitoring configuration module corresponding to the operation request instruction;
and the early warning module is used for judging whether early warning is needed or not according to the relation between the first monitoring threshold or the second monitoring threshold and the database monitoring parameters.
In a third aspect, an embodiment of the present invention further provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the method for monitoring an ORM-based database when executing the computer program.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements an ORM-based database monitoring method in any one of the above embodiments.
According to the invention, the monitoring parameters in the operation request instruction are obtained through the interception module based on the ORM framework, and the monitoring parameters are monitored and early warned in real time by combining the first monitoring threshold capable of being customized and the preset second monitoring threshold, so that the technical problem that the monitoring and early warning cannot be customized and warned flexibly according to the requirements at low cost in the prior art is solved, and the technical effect of adopting the individually configured monitoring and early warning function aiming at different database operation methods at low cost and high speed is achieved.
Drawings
Fig. 1 is a flowchart of a method for monitoring an ORM-based database according to an embodiment of the present invention;
fig. 2 is a flowchart of an ORM-based database monitoring method according to a second embodiment of the present invention;
fig. 3 is a flowchart of an ORM-based database monitoring method according to an alternative embodiment of the second embodiment of the present invention;
fig. 4 is a schematic structural diagram of an ORM-based database monitoring system according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a server according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. A process may be terminated when its operations are completed, but may have additional steps not included in the figure. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
Furthermore, the terms "first," "second," and the like may be used herein to describe various orientations, actions, steps, elements, or the like, but the orientations, actions, steps, or elements are not limited by these terms. These terms are only used to distinguish one direction, action, step or element from another direction, action, step or element. For example, a first acquisition module may be referred to as a second acquisition module, and similarly, a second acquisition module may be referred to as a first acquisition module, without departing from the scope of the present application. The first acquisition module and the second acquisition module are both acquisition modules, but they are not the same acquisition module. The terms "first", "second", etc. are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
Object Relational Mapping (ORM) is a programming technique for implementing transformations between data of different types of systems in an Object-oriented programming language. In effect, it creates a "virtual object database" that can be used in a programming language. The object-oriented method is developed on the basis of basic principles of software engineering (such as coupling, aggregation and packaging), and the relational database is developed from mathematical theories, so that the two theories are obviously different. To resolve this mismatch, object relational mapping techniques are in progress. Object relational mapping provides a conceptual, easy-to-understand way to model data. The ORM methodology is based on three core principles: 1) the method is simple: modeling data in a most basic form; 2) transmissibility: the database structure is documented in a language that anyone can understand; 3) the accuracy is as follows: a correctly standardized structure is created based on the data model. Typically, modelers develop information models by collecting information from those who are familiar with the application but not the skilled data modeler. Modelers must be able to communicate with data structures at a conceptual level using terms that are not understandable to technical enterprise experts. Modelers must also be able to process sample data by analyzing the information in simple units. ORMs are specifically designed to improve this connection. In brief, the ORM corresponds to relay data. The ORM framework refers to a framework of a data access layer, such as MyBatis and hibernate. MyBatis is an excellent persistent layer framework that supports customized SQL, stored procedures, and advanced mapping. MyBatis avoids almost all JDBC code and manual setting of parameters and acquisition of result sets. MyBatis can use simple XML or annotations to configure and map native information, mapping interfaces and Java's POJOs (Plain Ordinary Java Object) into records in the database. hibernate is an object relation mapping framework of open source code, which encapsulates JDBC with very light weight objects, establishes a mapping relation between POJO and a database table, is a fully automatic ORM framework, can automatically generate SQL statements and automatically execute, so that Java programmers can use object programming thinking to manipulate the database at will. Hibernate can be applied to any occasions using JDBC, can be used in Java client programs and can also be used in Servlet/JSP Web applications, and has the revolutionary significance that Hibernate can replace CMP in a JaveEE architecture applying EJB to complete the important role of data persistence.
Example one
Fig. 1 is a flowchart of a method for monitoring a database based on an ORM according to an embodiment of the present invention, which is applicable to a medium-sized and small-sized enterprise requiring database monitoring and early warning, and the method can be executed by a processor. As shown in fig. 1, a method for monitoring a database based on ORM specifically includes the following steps:
step S110, obtaining an operation request instruction of a client;
specifically, in this embodiment, the operation request instruction refers to an operation permission instruction issued by the client to the monitoring terminal or the monitoring device, and when the monitoring terminal or the monitoring device receives the operation request instruction, the client may perform data access and other operations (such as modification, insertion, and copying) on the monitoring terminal or the monitoring device. For example, when the client needs to access the database of the monitoring terminal or the monitoring device, such as query or insertion operation of data in the database, the parameter included in the operation request instruction may be intercepted by the interception module based on the ORM framework, so as to obtain the operation request instruction sent by the client. The operation request instruction may include various parameters, such as instruction time consumption, instruction execution result, and exception number.
Step S120, acquiring a database monitoring parameter of the operation request instruction through an ORM-based interception module, and acquiring a first monitoring threshold or a second monitoring threshold of a monitoring configuration module corresponding to the operation request instruction;
specifically, after the client sends an access request to the monitoring end or the monitoring device for the database of the monitoring end or the monitoring device, the interception module based on the ORM in the monitoring end or the monitoring device intercepts various parameters in the operation request instruction to obtain the monitoring parameters in the operation request instruction (in this embodiment, the operation request instruction may be an access request to the database), and the parameters are database monitoring parameters, for example, an SQL statement (structured query Language (SQL) is a database query and programming Language for accessing data and querying, updating, and managing a relational database system, and is also an extension of a database script file), configuration parameters, execution results, time consumption, and the like. The ORM-based interception module in this embodiment is a module that can intercept data such as access SQL statements, configuration parameters, execution results, and the like in a database based on an ORM framework, and can intercept interface layers such as Java database connectivity (JDBC), APIs, and the like, and also can intercept specified operation types, such as query, update, insertion, and the like of the database. In this embodiment, after the ORM-based interception module obtains the database monitoring parameters of the operation request instruction, the ORM-based interception module may simultaneously obtain a first monitoring threshold of a monitoring configuration module in the database, where the monitoring configuration module may be a module for modifying monitoring conditions according to its own requirements, that is, the monitoring configuration module may annotate in an operation layer of the database, and when a default monitoring threshold of the interception module cannot meet a service requirement, a customizable monitoring threshold needs to be input to the operation layer of the database through the monitoring configuration module (the monitoring configuration module is associated with the operation layer of the database in advance) to ensure that different monitoring conditions (that is, different monitoring thresholds) can be adapted to different operation request instructions. The first monitoring threshold is a data set having a corresponding parameter threshold corresponding to each database monitoring parameter, and is used for determining whether each database monitoring parameter meets a preset requirement. The second monitoring threshold is a group of monitoring thresholds configured by the monitoring configuration module in advance, and when the interception module does not acquire the first monitoring threshold, the interception module acquires a default monitoring threshold (i.e. a second monitoring threshold) of the monitoring configuration module and judges a relationship between the database monitoring parameters and the second monitoring threshold.
And S130, judging whether early warning is needed or not according to the relation between the first monitoring threshold or the second monitoring threshold and the database monitoring parameters.
Specifically, in this embodiment, the first monitoring threshold and the second monitoring threshold may be annotations to the database monitoring parameters in JAVA language, and such annotations may be parameter thresholds set differently for each database monitoring parameter, for example, when the database monitoring parameter is time-consuming, the first monitoring threshold may be 200-. The specific value of the first monitoring threshold may be adjusted according to the service requirement (such as feedback speed, monitoring cost, etc.), and is not limited herein. And when the interception module acquires the first monitoring threshold or the second monitoring threshold, judging the relation between the first monitoring threshold or the second monitoring threshold and the database monitoring parameters. When the database monitoring parameter is less than or equal to the first monitoring threshold or the second monitoring threshold, early warning processing is not needed; when the database monitoring parameter is greater than the first monitoring threshold or the second monitoring threshold, the early warning information or the early warning mail can be sent to the terminal corresponding to the mobile phone number or the mailbox address according to the mobile phone number or the mailbox address which are associated in advance.
The first embodiment of the invention has the beneficial effects that the monitoring parameters in the operation request instruction are obtained through the ORM frame-based interception module, and the monitoring parameters are monitored and early warned in real time by combining the first monitoring threshold which can be customized, so that the technical problem that the monitoring and early warning cannot be customized flexibly according to the requirements at low cost in the prior art is solved, and the technical effect of adopting the individually configured monitoring and early warning function aiming at different database operation methods at low cost and high speed is achieved.
Example two
The second embodiment of the invention is further improved on the basis of the first embodiment. Fig. 2 is a flowchart of an ORM-based database monitoring method according to a second embodiment of the present invention, and as shown in fig. 2, the ORM-based database monitoring method according to the second embodiment of the present invention includes:
step S210, obtaining an operation request instruction of a client;
specifically, the operation request instruction refers to an operation permission instruction sent by the client to the monitoring terminal or the monitoring device, and after the monitoring terminal or the monitoring device receives the operation request instruction sent by the client, the monitoring terminal or the monitoring device intercepts various parameters of the operation request instruction through an interception module based on an ORM frame, so as to obtain parameter information corresponding to the operation request instruction of the client. In this embodiment, the operation request command may include various monitoring parameters, such as time consumption, SQL statements, execution results, and the number of exceptions.
Step S220, judging whether an operation request instruction is received or not;
step S230, if an operation request instruction is received, determining whether to acquire a first monitoring threshold;
step S241, if the first monitoring threshold value is obtained, obtaining a database monitoring parameter of the operation request instruction;
step S242, if the first monitoring threshold is not obtained, obtaining a second monitoring threshold of the monitoring configuration module and a database monitoring parameter of the operation request instruction;
specifically, before proceeding to the next step, it is required to confirm whether the ORM-based interception module really receives the operation request instruction. After the interception module based on the ORM really receives the operation request instruction, it is further required to determine whether the interception module obtains the first monitoring threshold stored in the monitoring configuration module. In this embodiment, the first monitoring threshold may be based on codes under Java, and the first monitoring threshold may also be input into an operation layer of the database through a monitoring configuration module of the monitoring terminal or the monitoring device, where the monitoring terminal or the monitoring device may obtain relevant parameters (i.e., database monitoring parameters) in the operation request instruction through an interception module based on the ORM framework, such as time consumption of the instruction, execution result of the instruction, whether an exception occurs, number of exceptions, and the like. In this embodiment, the second monitoring threshold refers to a default configuration parameter configured by the monitoring configuration module itself (that is, when the interception module does not obtain the first monitoring threshold, the interception module obtains the default configuration parameter of the monitoring configuration module, that is, the second monitoring threshold). The interception module based on the ORM framework can be replaced by AOP. In the software industry, the Aspect Oriented Programming (AOP) refers to a technology for implementing unified maintenance of program functions through a pre-compiling mode and a running-time dynamic proxy. The AOP is a continuation of Object Oriented Programming (OOP), is a hot spot in software development, is also an important content in a Spring framework, and is a derived normal form of functional programming. By utilizing the AOP, all parts of the business logic can be isolated, so that the coupling degree between all parts of the business logic is reduced, the reusability of a program is improved, and the development efficiency is improved.
And step S250, judging whether early warning is needed or not according to the relation between the first monitoring threshold or the second monitoring threshold and the database monitoring parameters.
Specifically, the first monitoring threshold is generally used for requests that need to be configured individually, and if some request commands do not need to be monitored due to service requirements, such as database insertion, and some request commands need to be fed back quickly, such as query of a database, parameters corresponding to the requests may be monitored through the first monitoring threshold, and when the parameters exceed the first monitoring threshold. And the early warning report can be carried out through a prestored mobile phone number or a prestored mailbox. The second monitoring threshold is generally used when the interception module does not obtain the first monitoring threshold. Because some operation instructions do not have specific requirements, if feedback is not needed in time, only the instructions are needed to complete execution, at this time, a default configuration parameter (i.e., a second monitoring parameter) preset by the monitoring configuration module can be adopted to judge whether early warning is needed for the database monitoring parameters corresponding to the operation request instructions. When the database monitoring parameter is larger than the first monitoring threshold or the second monitoring threshold, the early warning short message can be sent to a terminal corresponding to a preset mobile phone number or an early warning mail can be sent to a corresponding mailbox address.
In this embodiment, the second monitoring threshold comprises a preset configuration parameter threshold based on JAVA.
Fig. 3 is a flowchart of an ORM-based database monitoring method according to an alternative embodiment of the second embodiment of the present invention. As shown in fig. 3, in the present embodiment, step S250 may include:
step S251, judging whether the early warning monitoring switch is turned on or not;
step S252, if yes, early warning is carried out according to the relation between the first monitoring threshold or the second monitoring threshold and the database monitoring parameters;
and step S253, if not, the early warning monitoring switch is turned on again to ensure that the early warning function works normally.
Specifically, after the interception module based on the ORM acquires the database monitoring parameter of the operation request instruction, the state of the early warning monitoring switch may be determined first, and if the early warning monitoring switch is in an on state, whether early warning is required may be determined according to a magnitude relationship between a first monitoring threshold or a second monitoring threshold (where the first monitoring threshold or the second monitoring threshold depends on whether the interception module acquires the first monitoring threshold, and when the first monitoring threshold is not acquired, the second monitoring threshold is adopted) and the database monitoring parameter. If the early warning monitoring switch is in a closed state, the early warning monitoring switch can be firstly opened, and then the relation between the database monitoring parameters and the first monitoring threshold or the second monitoring threshold is judged, so that the normal use of the early warning function is ensured.
In this embodiment, step S250 may further include:
and step S254, when the database monitoring parameter is larger than the first monitoring threshold or the second monitoring threshold, early warning is carried out on the database monitoring parameter.
Specifically, when the database monitoring parameter corresponding to the operation request instruction is greater than the first monitoring threshold or the second monitoring threshold (where the first monitoring threshold and the second monitoring threshold depend on the same method), an early warning short message or an early warning mail may be sent to the corresponding responsible person through a preset mobile phone number or an email address, and then the responsible person checks the hardware or program code corresponding to the early warning database monitoring parameter and repairs the problem.
In this embodiment, the warning includes an email warning and a short message warning.
In this embodiment, the database monitoring parameters include database information, input parameters, query results, number of exceptions, and time consumption.
The second embodiment of the invention has the beneficial effects that the monitoring parameters in the operation request instruction are obtained through the interception module based on the ORM framework, and the monitoring parameters are monitored and early warned in real time by combining the first monitoring threshold which can be customized and the second monitoring threshold which is preset, so that the technical problem that the monitoring and early warning cannot be customized and warned flexibly according to the requirements at low cost in the prior art is solved, and the technical effect of adopting the individually configured monitoring and early warning function aiming at different database operation methods at low cost and high speed is achieved.
EXAMPLE III
Fig. 4 is a schematic structural diagram of an ORM-based database monitoring system according to a third embodiment of the present invention. As shown in fig. 4, the ORM-based database monitoring system 300 includes:
a first obtaining module 310, configured to obtain an operation request instruction of a client;
a second obtaining module 320, configured to obtain, through an ORM-based interception module, a database monitoring parameter of the operation request instruction, and obtain a first monitoring threshold or a second monitoring threshold of the monitoring configuration module, where the first monitoring threshold corresponds to the operation request instruction;
the early warning module 330 is configured to determine whether an early warning is needed according to a relationship between the first monitoring threshold or the second monitoring threshold and the database monitoring parameter.
In this embodiment, the second obtaining module 320 includes:
the first judgment unit is used for judging whether an operation request instruction is received or not;
the second judgment unit is used for judging whether to acquire the first monitoring threshold value or not if the operation request instruction is received;
the first obtaining unit is used for obtaining the database monitoring parameters of the operation request instruction if the first monitoring threshold value is obtained;
and the second obtaining unit is used for obtaining a second monitoring threshold value of the monitoring configuration module and the database monitoring parameters of the operation request instruction if the first monitoring threshold value is not obtained.
In this embodiment, the second monitoring threshold comprises a preset configuration parameter threshold based on JAVA.
In this embodiment, the early warning module 330 includes:
the third judging unit is used for judging whether the early warning monitoring switch is turned on or not;
the first early warning unit is used for early warning according to the relation between the first monitoring threshold or the second monitoring threshold and the database monitoring parameters if the first monitoring threshold or the second monitoring threshold is the same as the database monitoring parameters;
and the re-opening unit is used for re-opening the early warning monitoring switch to ensure that the early warning function works normally if the pre-warning monitoring switch is not opened.
In this embodiment, the early warning module 330 further includes:
and the second early warning unit is used for early warning the database monitoring parameters when the database monitoring parameters are greater than the first monitoring threshold or the second monitoring threshold.
In this embodiment, the warning includes an email warning and a short message warning.
In this embodiment, the database monitoring parameters include database information, input parameters, query results, number of exceptions, and time consumption.
The ORM-based database monitoring system provided by the embodiment of the invention can execute the ORM-based database monitoring method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 5 is a schematic structural diagram of a server according to a fourth embodiment of the present invention, as shown in fig. 5, the server includes a processor 410, a memory 420, an input device 430, and an output device 440; the number of the processors 410 in the server may be one or more, and one processor 410 is taken as an example in fig. 5; the processor 410, the memory 420, the input device 430 and the output device 440 in the server may be connected by a bus or other means, and the bus connection is exemplified in fig. 5.
The memory 410 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the ORM-based database monitoring method in the embodiment of the present invention (for example, a first obtaining module, a second obtaining module, and an early warning module in the ORM-based database monitoring system). The processor 410 executes various functional applications of the server and data processing by executing software programs, instructions, and modules stored in the memory 420, that is, implements the above-described ORM-based database monitoring method.
Acquiring an operation request instruction of a client;
acquiring a database monitoring parameter of an operation request instruction through an ORM-based interception module, and acquiring a first monitoring threshold or a second monitoring threshold of a monitoring configuration module corresponding to the operation request instruction;
and judging whether early warning is needed or not according to the relation between the first monitoring threshold or the second monitoring threshold and the database monitoring parameters.
The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 420 may further include memory located remotely from processor 410, which may be connected to a server over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 430 may be used to receive input numeric or character information and generate key signal inputs related to client settings and function control of the server. The output device 440 may include a display device such as a display screen.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for monitoring an ORM-based database, the method including:
acquiring an operation request instruction of a client;
acquiring a database monitoring parameter of an operation request instruction through an ORM-based interception module, and acquiring a first monitoring threshold or a second monitoring threshold of a monitoring configuration module corresponding to the operation request instruction;
and judging whether early warning is needed or not according to the relation between the first monitoring threshold or the second monitoring threshold and the database monitoring parameters.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the above method operations, and may also perform related operations in the ORM-based database monitoring method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the above ORM-based database monitoring system, the included units and modules are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments illustrated herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. An ORM-based database monitoring method is characterized by comprising the following steps:
acquiring an operation request instruction of a client;
acquiring a database monitoring parameter of the operation request instruction through an ORM-based interception module, and acquiring a first monitoring threshold or a second monitoring threshold of a monitoring configuration module, which corresponds to the operation request instruction;
and judging whether early warning is needed or not according to the relation between the first monitoring threshold or the second monitoring threshold and the database monitoring parameter.
2. The method according to claim 1, wherein the obtaining, by an ORM-based interception module, the database monitoring parameters of the operation request instruction, and obtaining a first monitoring threshold or a second monitoring threshold of a monitoring configuration module corresponding to the operation request instruction comprises:
judging whether an operation request instruction is received or not;
if the operation request instruction is received, judging whether the first monitoring threshold value is obtained or not;
if the first monitoring threshold value is obtained, obtaining a database monitoring parameter of the operation request instruction;
and if the first monitoring threshold is not obtained, obtaining a second monitoring threshold of the monitoring configuration module and the database monitoring parameters of the operation request instruction.
3. The method of claim 1, wherein the second monitoring threshold comprises a JAVA-based preset configuration parameter threshold.
4. The method of claim 1, wherein the pre-warning according to the relationship between the first monitoring threshold or the second monitoring threshold and the database monitoring parameter comprises:
judging whether an early warning monitoring switch is turned on or not;
if yes, early warning is carried out according to the relation between the first monitoring threshold or the second monitoring threshold and the database monitoring parameters;
if not, the early warning monitoring switch is turned on again to ensure that the early warning function works normally.
5. The method of claim 1, wherein the pre-warning according to the relationship between the first monitoring threshold or the second monitoring threshold and the database monitoring parameter further comprises:
and when the database monitoring parameter is larger than the first monitoring threshold or the second monitoring threshold, early warning is carried out on the database monitoring parameter.
6. The method of claim 1, wherein the alerts comprise email alerts and text alerts.
7. The method of claim 1, wherein the database monitoring parameters include database information, input parameters, query results, number of exceptions, and elapsed time.
8. An ORM-based database monitoring system, comprising:
the first acquisition module is used for acquiring an operation request instruction of the client;
the second acquisition module is used for acquiring the database monitoring parameters of the operation request instruction through an ORM-based interception module and acquiring a first monitoring threshold or a second monitoring threshold of the monitoring configuration module, which corresponds to the operation request instruction;
and the early warning module is used for judging whether early warning is needed or not according to the relation between the first monitoring threshold or the second monitoring threshold and the database monitoring parameters.
9. A server comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements a method of ORM-based database monitoring according to any one of claims 1-7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out an ORM-based database monitoring method according to any one of claims 1 to 7.
CN201911293629.9A 2019-12-16 2019-12-16 ORM-based database monitoring method, system, server and storage medium Pending CN111078501A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911293629.9A CN111078501A (en) 2019-12-16 2019-12-16 ORM-based database monitoring method, system, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911293629.9A CN111078501A (en) 2019-12-16 2019-12-16 ORM-based database monitoring method, system, server and storage medium

Publications (1)

Publication Number Publication Date
CN111078501A true CN111078501A (en) 2020-04-28

Family

ID=70314771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911293629.9A Pending CN111078501A (en) 2019-12-16 2019-12-16 ORM-based database monitoring method, system, server and storage medium

Country Status (1)

Country Link
CN (1) CN111078501A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732763A (en) * 2021-01-20 2021-04-30 北京千方科技股份有限公司 Data aggregation method and device, electronic equipment and medium
CN113127505A (en) * 2021-05-17 2021-07-16 北京奇艺世纪科技有限公司 Monitoring method and device for Structured Query Language (SQL) system and electronic equipment
CN114237699A (en) * 2022-02-24 2022-03-25 四川信用通数字科技股份有限公司 Configuration script exporting method and device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120054227A1 (en) * 2010-08-31 2012-03-01 International Business Machines Corporation Use-case based configuration of an object-relational mapping framework
CN103678630A (en) * 2013-12-19 2014-03-26 北京用友政务软件有限公司 Database monitoring method and system
CN108509313A (en) * 2018-03-23 2018-09-07 深圳乐信软件技术有限公司 A kind of business monitoring method, platform and storage medium
CN109669835A (en) * 2018-09-18 2019-04-23 平安科技(深圳)有限公司 MySQL database monitoring method, device, equipment and readable storage medium storing program for executing
CN110297814A (en) * 2019-05-22 2019-10-01 中国平安人寿保险股份有限公司 Method for monitoring performance, device, equipment and the storage medium of database manipulation
CN110309123A (en) * 2019-05-22 2019-10-08 中国平安人寿保险股份有限公司 Processing method, device, computer equipment and the storage medium of database manipulation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120054227A1 (en) * 2010-08-31 2012-03-01 International Business Machines Corporation Use-case based configuration of an object-relational mapping framework
CN103678630A (en) * 2013-12-19 2014-03-26 北京用友政务软件有限公司 Database monitoring method and system
CN108509313A (en) * 2018-03-23 2018-09-07 深圳乐信软件技术有限公司 A kind of business monitoring method, platform and storage medium
CN109669835A (en) * 2018-09-18 2019-04-23 平安科技(深圳)有限公司 MySQL database monitoring method, device, equipment and readable storage medium storing program for executing
CN110297814A (en) * 2019-05-22 2019-10-01 中国平安人寿保险股份有限公司 Method for monitoring performance, device, equipment and the storage medium of database manipulation
CN110309123A (en) * 2019-05-22 2019-10-08 中国平安人寿保险股份有限公司 Processing method, device, computer equipment and the storage medium of database manipulation

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732763A (en) * 2021-01-20 2021-04-30 北京千方科技股份有限公司 Data aggregation method and device, electronic equipment and medium
CN113127505A (en) * 2021-05-17 2021-07-16 北京奇艺世纪科技有限公司 Monitoring method and device for Structured Query Language (SQL) system and electronic equipment
CN113127505B (en) * 2021-05-17 2024-04-23 北京奇艺世纪科技有限公司 Monitoring method and device of Structured Query Language (SQL) system and electronic equipment
CN114237699A (en) * 2022-02-24 2022-03-25 四川信用通数字科技股份有限公司 Configuration script exporting method and device and storage medium
CN114237699B (en) * 2022-02-24 2022-05-03 四川信用通数字科技股份有限公司 Configuration script exporting method and device and storage medium

Similar Documents

Publication Publication Date Title
US11868944B2 (en) Container image management system for distributed clusters
US20230025917A1 (en) Task scheduling method and apparatus
CN111078501A (en) ORM-based database monitoring method, system, server and storage medium
US20100057780A1 (en) Action execution management facility for service configuration items
US11372635B2 (en) In-memory software package installation and testing
CN111416821A (en) Internet of things equipment information acquisition method, system and device
JP2004334869A (en) Diagnosis and solution of computer problem by program, and automatic report and updating thereof
WO2023125852A1 (en) Remote diagnosis method and apparatus, and electronic device and storage medium
CN113726566B (en) Service gateway device
WO2023125851A1 (en) Remote diagnostics method and apparatus, electronic device and storage medium
CN110399107B (en) Log printing method, device, storage medium and equipment
CN110063042B (en) Database fault response method and terminal thereof
CN115167831A (en) Software integration method and device based on AUTOSAR and use method
CN115469629A (en) Remote diagnosis method, device, system, electronic equipment and storage medium
CN115578051A (en) Vehicle asset management method and device
CN108701057B (en) Computer-readable storage media, systems, and methods for provisioning a deployment conduit
CN113157411B (en) Celery-based reliable configurable task system and device
CN114417413A (en) File processing method, device, equipment and medium of block chain file system
CN113961570A (en) Real-time acquisition method applied to MYSQL BINLog change data
CN107844395B (en) Reboot test control method and system
CN113031964B (en) Big data application management method, device, equipment and storage medium
JP4399740B2 (en) Policy type management apparatus, method, and program
CN113986462A (en) K8S-based operation and maintenance system, application method and storage medium
CN115454851A (en) Interface regression testing method and device, storage medium and electronic device
US7716637B2 (en) Embedded macros

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200629

Address after: 518000 Guangdong city of Shenzhen province Qianhai Shenzhen Hong Kong cooperation zone before Bay Road No. 1 building 201 room A (located in Shenzhen Qianhai business secretary Co. Ltd.)

Applicant after: Shenzhen Mingshu Information Co., Ltd

Address before: 518000 8th floors Nan Zuo801 chambers, science and technology Nan Shi bis-B, JinDie Software garden, road, Southern Hi-Tech Zone, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: SHENZHEN READILY TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right