Database table monitoring method and device, medium and electronic equipment
By automatically monitoring the operations of database tables and generating and sending monitoring texts, the high cost and high risk problems caused by manual sorting in the existing technology are solved, efficient and accurate splitting of database tables is achieved, and the implementation of microservice architecture is supported.
Patent Information
- Application Number
- CN202311597753.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-27
- Publication Date
- 2025-05-27
AI Technical Summary
Under the single service architecture, during the splitting process of database tables, the existing technology relies on manual sorting, resulting in high costs, long time and easy to miss, affecting the efficiency and quality of microservice splitting.
Provide a monitoring method for database tables, by obtaining monitoring parameters corresponding to database tables, monitoring the operations of database tables, and generating monitoring text corresponding to the operation object, automatically notifying relevant users, and actively identifying and perceiving the operating database tables.
No manual participation is required, which saves labor costs and time, avoids the missed database table operations, reduces the intrusion of business code, and provides an automated and intelligent database table monitoring mechanism to support the splitting of single services to microservices.
Smart Images

Figure CN120045402A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the field of computer technology, and particularly relates to a method for monitoring a database table, a device for monitoring a database table, a computer-readable storage medium, and an electronic device. Background Art
[0002] Under the monolithic service architecture of the after-sales system, multi-domain modules are coupled with each other, the business logics are closely related, and the databases are shared. Under this mode, the code management of each domain is chaotic and the requirement boundaries are difficult to identify. Therefore, it is imperative to develop the monolithic service towards the microservice architecture. Whether the monolithic service can be correctly split into microservices, the splitting of the underlying database is the key point. Therefore, how to quickly, cleanly, and accurately identify the underlying database tables to be split has also become an important preliminary sorting work for the rapid implementation of microservice splitting.
[0003] For a large number of database tables, the method of manual sorting is usually adopted to query one by one whether the system uses them and where the system uses them. However, this method not only consumes huge labor costs and time costs, but also is very likely to cause omissions, resulting in an extended entire cycle of migrating microservices and is also likely to bring major online accidents. Summary of the Invention
[0004] To overcome the problems existing in the related art, the present disclosure provides a method for monitoring a database table, a device for monitoring a database table, a computer-readable storage medium, and an electronic device.
[0005] According to the first aspect of the embodiments of the present disclosure, a method for monitoring a database table is provided. The method includes:
[0006] Obtaining monitoring parameters corresponding to the database table;
[0007] Monitoring the database table according to the monitoring parameters;
[0008] When it is monitored that the database table performs an operation, obtaining an operation object corresponding to the monitoring parameters;
[0009] Generating a monitoring text according to the operation object and sending the monitoring text.
[0010] Optionally, the monitoring parameters include: monitoring annotations and monitoring aspects.
[0011] Optionally, the operation object includes: an operation package, an operation class, and / or an operation method.
[0012] Optionally, the obtaining of the monitoring parameters corresponding to the database table includes:
[0013] Defining the monitoring aspect to determine a target operation package for monitoring in the operation package;
[0014] Define the monitoring annotation to determine the target operation class to be monitored in the operation class, and / or
[0015] Define the monitoring annotation to determine the target operation method to be monitored in the operation method.
[0016] Optionally, determining the target operation class to be monitored in the operation class includes:[[]]
[0017] Obtain the operation class and the target operation class, and match the operation class with the target operation class to obtain a first matching result;
[0018] When the first matching result meets the first preset condition, determine the target operation class in the operation class as the target operation class to be monitored.
[0019] Optionally, determining the target operation method to be monitored in the operation method includes:[[]]
[0020] Obtain the operation method and the target operation method, and match the operation method with the target operation method to obtain a second matching result;
[0021] When the second matching result meets the second preset condition, determine the target operation method in the operation method as the target operation method to be monitored.
[0022] Optionally, generating the monitoring text according to the operation object includes:[[]]
[0023] Obtain a preset text format, which includes a first preset text, an object operation relationship, and a second preset text;
[0024] Perform copywriting splicing processing on the target operation package, the target operation class, and / or the target operation method according to the text format to obtain the monitoring text.
[0025] Optionally, performing copywriting splicing processing on the target operation package, the target operation class, and / or the target operation method according to the text format to obtain the monitoring text includes:[[]]
[0026] Splice the target operation package after the first preset text to obtain a first content text;
[0027] Splice the object operation relationship after the first content text to obtain a second content text;
[0028] Splice the target operation class and / or the target operation method after the second content text to obtain a third content text;
[0029] Concatenate the second preset text after the third content text to obtain a monitoring text.
[0030] Optionally, the obtaining of the operation object corresponding to the monitoring parameter includes:
[0031] Obtain the operation object corresponding to the monitoring parameter by reflection.
[0032] Optionally, the operation package includes: Java package; the operation class includes: Java class; the operation method includes: Java method.
[0033] Optionally, the obtaining of the operation object corresponding to the monitoring parameter by reflection includes:
[0034] Obtain the operation object corresponding to the monitoring parameter through a Class object; and / or
[0035] Obtain the operation object corresponding to the monitoring parameter through an object; and / or
[0036] Obtain the operation object corresponding to the monitoring parameter through a class name.
[0037] Optionally, the sending of the monitoring text includes:
[0038] Asynchronously send the monitoring text using an email.
[0039] Optionally, the asynchronously sending the monitoring text using an email includes:
[0040] Create an ExchangeService object to connect to the email server;
[0041] Configure the ExchangeService object and create an EmailMessage object;
[0042] Use the EmailMessage object to set the email content as the monitoring text;
[0043] On the email server, use the sendEmail method of the ExchangeService object to send the monitoring text.
[0044] According to the second aspect of the embodiments of the present disclosure, there is provided a monitoring device for a database table, including:
[0045] A parameter acquisition module configured to acquire monitoring parameters corresponding to a database table;
[0046] A library table monitoring module configured to monitor the database table according to the monitoring parameters;
[0047] An object acquisition module, configured to acquire an operation object corresponding to the monitoring parameter when it is monitored that an operation is performed on the database table;
[0048] A text sending module, configured to generate a monitoring text according to the operation object and send the monitoring text.
[0049] According to a third aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, on which computer program instructions are stored, and when the program instructions are executed by a processor, the steps of the monitoring method of the database table provided in any one of the first aspects of the present disclosure are implemented.
[0050] According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
[0051] A processor;
[0052] A memory for storing processor-executable instructions;
[0053] Wherein, the processor is configured to: execute the executable instructions to implement the steps of the monitoring method of the database table provided in any one of the first aspects of the present disclosure.
[0054] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
[0055] In the method and device provided by the exemplary embodiments of the present disclosure, the operation of the database table is monitored through the set monitoring parameters, providing a function entry for actively monitoring the operation of the database table, formulating the monitoring strategy flexibly and with rich dimensions, without manual participation and sorting, saving labor costs and time costs, and also avoiding the occurrence of missing the operation of the database table. Further, a monitoring text corresponding to the operation object is generated and sent, automatically and intelligently notifying relevant users, actively identifying and perceiving the operated database table and the operation initiated on the database table, effectively reducing the intrusion of adding and outputting logs and other contents into the business code, laying a solid data foundation and support for splitting the monolithic service into microservices, and ensuring the effect and quality of the complete splitting of the database table from the monolithic service.
[0056] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure and, together with the specification, are used to explain the principles of the present disclosure.
[0058] Figure 1 Schematically shows a flowchart of a monitoring method of a database table in an exemplary embodiment of the present disclosure;
[0059] Figure 2 Schematically shows a flowchart of a method for obtaining monitoring parameters in an exemplary embodiment of the present disclosure;
[0060] Figure 3 Schematically shows a flowchart of a process for determining a target operation class in an exemplary embodiment of the present disclosure;
[0061] Figure 4 Schematically shows a flowchart of a process for determining a target operation method in an exemplary embodiment of the present disclosure;
[0062] Figure 5 Schematically shows a flowchart of a method for obtaining an operation object by reflection in an exemplary embodiment of the present disclosure;
[0063] Figure 6 Schematically shows a flowchart of a method for generating monitoring text in an exemplary embodiment of the present disclosure;
[0064] Figure 7 Schematically shows a flowchart of a method for text splicing processing in an exemplary embodiment of the present disclosure;
[0065] Figure 8 Schematically shows a flowchart of a method for asynchronously sending monitoring text in an exemplary embodiment of the present disclosure;
[0066] Figure 9 Schematically shows a flowchart of a method for monitoring a database table in an application scenario in an exemplary embodiment of the present disclosure;
[0067] Figure 10 Schematically shows a flowchart of a cross - cutting annotation monitoring module in an application scenario in an exemplary embodiment of the present disclosure;
[0068] Figure 11 Schematically shows a structural diagram of a monitoring device for a database table in an exemplary embodiment of the present disclosure;
[0069] Figure 12 Schematically shows a structural diagram of another monitoring device for a database table in an exemplary embodiment of the present disclosure;
[0070] Figure 13 Schematically shows a structural diagram of yet another monitoring device for a database table in an exemplary embodiment of the present disclosure. Detailed implementation manners
[0071] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0072] It should be noted that all actions of obtaining signals, information, or data in the present disclosure are carried out on the premise of complying with the corresponding data protection regulations and policies of the country where the location is located and obtaining authorization from the corresponding device owner.
[0073] Under the single-service architecture of the after-sales system, multi-domain modules are mutually coupled, the business logic is closely related, and the database is shared. In this mode, the code management of each domain is chaotic, and it is difficult to identify the requirement boundaries. Therefore, the development from a single service to a microservices architecture is imperative. And whether a single service can be correctly split into microservices, the splitting of the underlying database is the key point. Therefore, how to quickly, cleanly, and accurately identify the underlying database tables to be split has also become an important preliminary sorting work for the rapid implementation of microservices splitting. Correspondingly, whether the relevant database tables of a sub-domain module can be completely separated from the single service is also a criterion for identifying whether a microservice is split thoroughly enough.
[0074] For a large number of database tables, the method of manual sorting is adopted to query one by one whether the system uses them and where the system uses them. However, this method not only consumes huge labor costs and time costs, but also is very easy to cause omissions, resulting in an extended entire cycle of migrating microservices and is also prone to major online accidents.
[0075] Specifically, in the related art, two schemes are usually adopted to monitor database tables.
[0076] In the first scheme, the method of enabling SQL (Structured Query Language serverdatabase) execution logs at the database layer is adopted.
[0077] Specifically, when the after-sales single service is successfully released, the connected database enables the SQL script execution log recording function; when the application server has a business, relevant SQL statements are executed; the database obtains the original SQL statements according to the executed SQL records to obtain logs and outputs the logs to the application server; when it is necessary to observe which SQL statements the migrated database tables have executed and what operations have been performed, the user can log in to the application server terminal to view the printed SQL logs.
[0078] In this solution, it is necessary to enable database SQL execution logging without discrimination, and it is very easy to record SQLs that are not relevant to the currently split database tables. As a result, the business side can only clearly know that the database tables used in this SQL operation are in business use, but cannot know what upstream operations used this SQL. Moreover, the output of the full volume of online SQL logs is also a great test for the disk capacity of the server. The server may crash due to disk capacity, resulting in business unavailability. In addition, when the business side needs to view the usage of database tables, it needs to log in to the server to view, and the business side cannot automatically perceive the database tables operated at the bottom layer, which is not only time-consuming and laborious, but also the readability of the server logs is extremely poor.
[0079] In the second solution, business logs are printed before and after the SQL statement is called.
[0080] Specifically, before and after the execution position of the SQL statement that needs to be sorted out and confirmed, business operation logs are added, and the recorded SQL statements are marked; when the after-sales monomer service is successfully released and business occurs in the application server, the relevant SQL statements are executed; the business logs are output to the application server; when the user needs to observe which SQL statements are executed by the migrated database tables and what operations are performed, the user can log in to the application server terminal to view the printed business logs.
[0081] In this solution, it is necessary to manually sort out the locations and scenarios where the database tables are used, and it is also necessary to manually add business logs at the places where they are used. The initial sorting period is too long, and the workload of printing relevant call logs is huge, which is an unacceptable method under the premise of tight demand scheduling; moreover, additional coding is required, so the intrusion into the business is too large and the efficiency is very low.
[0082] In view of the problems existing in the related technologies, the present disclosure provides a method for monitoring database tables. Figure 1 It is a flowchart of a method for monitoring database tables shown according to an exemplary embodiment, as Figure 1 shown. This method may at least include the following steps:
[0083] Step S110. Obtain monitoring parameters corresponding to the database table.
[0084] Step S120. Monitor the database table according to the monitoring parameters.
[0085] Step S130. When it is monitored that the database table performs an operation, obtain an operation object corresponding to the monitoring parameters.
[0086] Step S140. Generate a monitoring text according to the operation object and send the monitoring text.
[0087] In an exemplary embodiment of the present disclosure, the operations of the database table are monitored by the set monitoring parameters, which provides a functional entry for actively monitoring the operations of the database table, formulates monitoring strategies flexibly and with rich dimensions, without manual participation and sorting, saving labor costs and time costs, and also avoiding the occurrence of missing database table operations. Further, a monitoring text corresponding to the operation object is generated and sent to automatically and intelligently notify relevant users, actively identify and perceive the database table being operated and the operations initiated on the database table, effectively reducing the intrusion of adding and outputting logs and other content into the business code, laying a solid data foundation and support for splitting the monolithic service into microservices, and ensuring the effect and quality of the complete splitting of the database table from the monolithic service.
[0088] The following details each step of the method for monitoring the database table.
[0089] In step S110, monitoring parameters corresponding to the database table are obtained.
[0090] In an exemplary embodiment of the present disclosure, the database table is an object used to store data in the database, a collection of structured data, and the foundation of the entire database system.
[0091] In an alternative embodiment, the monitoring parameters include: monitoring annotations and monitoring aspects.
[0092] For example, the monitoring annotation can be @Monitor; the monitoring aspect can be @Aspect. In addition, it can also be other parameters, and this exemplary embodiment does not make special limitations on this.
[0093] Among them, @Monitor is a function used to achieve the monitoring purpose in the Java (object-oriented programming language) language environment. @Monitor can monitor methods and classes, and the monitoring metrics include the number of calls, the number of successes, the number of failures, the average response time, and the failure rate. Among them, the criterion for determining failure is that an exception is thrown during the execution of the method. The usage method of @Monitor is to specify the class name or method name.
[0094] The @Aspect annotation is one of the supports of AOP (Aspect Oriented Programming), which allows developers to define aspects and connect them to various parts of the application. AOP is a programming paradigm that allows developers to improve the modularity and maintainability of the code by separating cross-cutting concerns from the core logic of the application. In AOP, an aspect is a module that defines a pointcut. Among them, the pointcut defines which code blocks in the application are intercepted and additional logic is executed. The pointcut can be defined using expressions or annotations.
[0095] In an alternative embodiment, Figure 2 a flowchart showing a method for obtaining monitoring parameters is illustrated, as Figure 2 shown, the above step S110 may at least include the following steps:
[0096] In step S210, a monitoring aspect is defined to determine a target operation package to be monitored in the operation package.
[0097] Define the monitoring aspect @Aspect, configure the entry point to be monitored, so as to cut into the path of the operation package to be monitored.
[0098] The operation package may be a Java package. A Java package is a namespace, which is a collection of classes and interfaces with similar functions in a loose manner. In Java, packages exist in the form of directories and are an effective mechanism for managing classes and interfaces in Java. Classes in the same package can access each other by default, which is called package accessibility.
[0099] In step S220, a monitoring annotation is defined to determine a target operation class to be monitored in the operation class.
[0100] Define the monitoring annotation @Monitor, and the operation class to be monitored can be annotated.
[0101] In an alternative embodiment, Figure 3 a flowchart showing the determination of the target operation class is illustrated, as Figure 3 shown, the method may at least include the following steps: obtain the operation class and the target operation class, and match the operation class with the target operation class to obtain a first matching result.
[0102] Among them, the operation class may be a Java class, and this exemplary embodiment does not make special limitations on this.
[0103] Among them, a Java class is a model for defining methods of variables and objects, defining the class characteristics and behaviors of object attributes and methods. A class is defined and can be used to create instances (objects) of the class.
[0104] The target operation class may be an operation class that the user wants to monitor. For example, the target operation class may be the Object class or other classes, and this exemplary embodiment does not make special limitations on this.
[0105] Furthermore, all involved operation classes, that is, Java classes, can be compared with the target operation class to be monitored to obtain a first matching result.
[0106] Among them, the first matching result can be that the operation class is the same as the target operation class, or the operation class is different from the target operation class.
[0107] In step S320, when the first matching result meets the first preset condition, the target operation class in the operation class is determined as the target operation class to be monitored.
[0108] When the first matching result is that the operation class is the same as the target operation class, it can be considered that the first matching result meets the first preset condition. Therefore, it can be determined that the operation class includes the target operation class that the user wants to monitor.
[0109] In this exemplary embodiment, a method for determining the target operation class to be monitored in the operation class is provided. The determination method is simple and accurate, and can avoid the situation where the target operation class to be monitored is omitted, ensuring the accuracy of the monitoring effect.
[0110] In step S230, a monitoring annotation is defined to determine the target operation method to be monitored in the operation method.
[0111] Define the monitoring annotation @Monitor, and the operation methods that need to be monitored can also be annotated.
[0112] In an alternative embodiment, Figure 4 shows a flow diagram for determining the target operation method, as Figure 4 shown, the method may at least include the following steps: In step S410, obtain the operation method and the target operation method, and match the operation method with the target operation method to obtain a second matching result.
[0113] Among them, the operation method can be a Java method, and this exemplary embodiment does not make special limitations on this.
[0114] A Java method, also known as a function, represents a section of independent and reusable "function" code.
[0115] The target operation method can be the operation method that the user wants to monitor. For example, the target operation method can be the operate method, or it can be other methods, and this exemplary embodiment does not make special limitations on this.
[0116] Furthermore, all the involved operation methods, that is, the Java methods, can be compared with the target operation method to be monitored to obtain a second matching result.
[0117] Among them, the second matching result can be that the operation method is the same as the target operation method, or the operation method is different from the target operation method.
[0118] In step S420, when the second matching result meets the second preset condition, the target operation method in the operation method is determined as the target operation method to be monitored.
[0119] When the second matching result is that the operation method is the same as the target operation method, it can be considered that the second matching result meets the second preset condition. Therefore, it can be determined that the operation method includes the target operation method that the user wants to monitor.
[0120] In this exemplary embodiment, a method for determining the target operation method to be monitored in the operation method is provided. The determination method is simple and accurate, and can avoid the situation where the target operation method to be monitored is omitted, ensuring the accuracy of the monitoring effect.
[0121] Based on this, it can be found that the monitoring parameters, such as the monitoring aspect and the definition purpose of the monitoring aspect, are used to monitor the operation package, operation class, and / or operation method correspondingly, and the operation package, operation class, and / or operation method correspondingly include the target operation package, target operation class, and / or target operation method. Therefore, the corresponding target operation package, target operation class, and / or target operation method can be monitored through the defined monitoring parameters.
[0122] In step S120, the database table is monitored according to the monitoring parameters.
[0123] In the exemplary embodiment of the present disclosure, when defining a monitoring annotation to monitor an operation method, it can be:
[0124]
[0125] Among them, the defined monitoring annotation @Monitor is used to monitor whether an operation is performed on the inventory table. Specifically, "@Monitor" is the monitoring annotation;
[0126] "@Monitor
[0127] operate storage_table" is the step of defining the monitoring annotation, and this definition is executed during the running of this Java statement.
[0128] When defining a monitoring aspect to cut into the operation package path that needs to be monitored, it can be:
[0129]
[0130] At this time, the package path of "com.xxxxxx.xms.storage.dao.mapper.*.*(..)" is determined by defining the monitoring aspect. Among them, "@Aspect" is the monitoring aspect;
[0131] "execution(*com.xxxxxx.xms.storage.dao.mapper.*.*(..))" is an expression of the path of the target operation package determined by defining the monitoring aspect, and this definition is executed during the running of this Java statement. The remaining parameters represent the content related to the return value. For example, public indicates that the type of the return value is public, ".*(..) represents any method name, the parentheses represent parameters, and the two dots represent any parameter type", etc.
[0132] In this exemplary embodiment, setting the monitoring parameters provides a function entry for actively monitoring the operations of the database table, facilitating the flexible formulation of monitoring strategies and enriching the monitoring dimensions and application scenarios.
[0133] In step S130, when it is monitored that the database table executes an operation, the operation object corresponding to the monitoring parameter is obtained.
[0134] In the exemplary embodiment of the present disclosure, when the terminal or the server sends an instruction to the database table to make the database table execute an operation, the corresponding operation of the database table can be monitored through the set monitoring parameters. At this time, the operation object monitored by the monitoring parameter can be obtained.
[0135] In an alternative embodiment, the operation object includes: an operation package, an operation class, and / or an operation method.
[0136] It should be noted that when defining the monitoring annotation, the operation class or the operation method can be annotated, and this exemplary embodiment does not make special limitations on this.
[0137] In an alternative embodiment, the operation object corresponding to the monitoring parameter is obtained by reflection.
[0138] Obtaining by reflection is a way to dynamically obtain information and dynamically call object methods. Java itself is a static language, and after reflection, Java has a certain degree of dynamicity and becomes a "quasi-dynamic language".
[0139] In an alternative embodiment, the operation package includes: a Java package; the operation class includes: a Java class; the operation method includes: a Java method.
[0140] Therefore, in the reflection mechanism of Java, this mechanism can reload the class by modifying the configuration file without modifying the source code.
[0141] In an alternative embodiment, Figure 5 shows a flowchart of the method for obtaining the operation object by reflection, as Figure 5As shown, the method may at least include the following steps: In step S510, an operation object corresponding to the monitoring parameter is obtained through the Class object.
[0142] Specifically, when implementing reflection through the Class object to obtain the operation object, the Class object of the class can be obtained first using the Class.forName() method; then, information such as Constructor, Field, and Method can be obtained using the Class object of the class.
[0143] In step S520, an operation object corresponding to the monitoring parameter is obtained through the object.
[0144] Specifically, when obtaining the operation object through the object, the Class object of the class can be obtained first using the getClass() method of the object; then, information such as Constructor, Field, and Method can be obtained using the Class object of the class.
[0145] In step S530, an operation object corresponding to the monitoring parameter is obtained through the class name.
[0146] Specifically, when obtaining the operation object through the class name, first, the Class object of the class can be directly obtained using the fully qualified name of the class; then, information such as Constructor, Field, and Method can be obtained using the Class object of the class.
[0147] In step S140, a monitoring text is generated based on the operation object, and the monitoring text is sent.
[0148] In an exemplary embodiment of the present disclosure, after determining the operation object, a corresponding monitoring file can be generated based on the operation object to actively notify the user.
[0149] In an optional embodiment, Figure 6 shows a flowchart of the method for generating the monitoring text, as Figure 6 shown, the method may at least include the following steps: In step S610, a preset text format is obtained, and the text format includes a first preset text, an object operation relationship, and a second preset text.
[0150] Among them, the preset text format can be "under the package path... is called", or other formats, and this exemplary embodiment does not make special limitations on this.
[0151] When the preset text format is "under the package path... is called", the first preset text can be "package path", the object operation relationship can be "under", and the second preset text can be "is called".
[0152] In step S620, the target operation package, the target operation class, and / or the target operation method are spliced according to the text format to obtain the monitoring text.
[0153] In an alternative embodiment, Figure 7 The flowchart of the method for text splicing processing is shown, as Figure 7 shown. The method may at least include the following steps: In step S710, the target operation package is spliced after the first preset text to obtain the first content text.
[0154] When the first preset text is "package path" and the target operation package is "com.xxxxxx.xms.storage.dao.mapper.TransferMapper", the first content text obtained by splicing the first preset text and the target operation package is "package path com.xxxxxx.xms.storage.dao.mapper.TransferMapper".
[0155] In step S720, the object operation relationship is spliced after the first content text to obtain the second content text.
[0156] When the first content text is "package path com.xxxxxx.xms.storage.dao.mapper.TransferMapper" and the object operation relationship can be "below", the second content text obtained by splicing the first content text and the object operation relationship is "package path com.xxxxxx.xms.storage.dao.mapper.TransferMapper below".
[0157] In step S730, the target operation class and / or the target operation method are spliced after the second content text to obtain the third content text.
[0158] When the second content text is "package path com.xxxxxx.xms.storage.dao.mapper.TransferMapper below" and the target operation method is "create_transfer()", the third content text obtained by splicing the second content text and the target operation method is "package path com.xxxxxx.xms.storage.dao.mapper.TransferMapper below create_transfer()".
[0159] In step S740, the second preset text is spliced after the third content text to obtain the monitoring text.
[0160] For example, the monitored content may be:
[0161]
[0162] Then, when the third content text is "create_transfer() under package path com.xxxxxx.xms.storage.dao.mapper.TransferMapper", and the second preset text is "called", the monitoring text obtained after splicing the third content text and the second preset text is "create_transfer() under package path com.xxxxxx.xms.storage.dao.mapper.TransferMapper is called".
[0163] In this exemplary embodiment, the corresponding monitoring text can be obtained by splicing the pre-set text format with the monitored operation object, which provides a data basis and theoretical support for actively notifying users of the monitoring results of the database table, saves manpower and time costs, and improves the degree of automation and intelligence of database table monitoring from the perspective of text generation.
[0164] Furthermore, after the monitoring text is generated, the monitoring text may be sent to the user.
[0165] In an optional embodiment, the monitoring text is sent asynchronously via email.
[0166] The opposite of "asynchronous" is "synchronous". Synchronous means that when an interface calls a method, if the method takes some time to return information, then the interface will wait until the method returns information before processing the following logic.
[0167] If it is asynchronous, you don't need to wait for the method to return information and can continue to process the logic under the interface.
[0168] In an alternative embodiment, Figure 8 A flow chart of a method for asynchronously sending monitoring text is shown, as Figure 8 As shown, the method may at least include the following steps: In step S810, create an ExchangeService object to connect to a mail server.
[0169] First, create an ExchangeService object to connect to the Exchange Server (mail server).
[0170] Specifically, it can be: ExchangeService exchangeService = new ExchangeService(ExchangeVersion.Exchange2010_SP2).
[0171] In step S820, configure the ExchangeService object and create an EmailMessage object.
[0172] Then, the ExchangeService object can be configured, including setting the username, password, server address, etc.
[0173] Furthermore, before sending the email, an EmailMessage object can be created and information such as the sender, recipient, and subject can be set.
[0174] Specifically, it can be:
[0175] EmailMessage email = new EmailMessage(exchangeService);
[0176] email.setSubject("Hello");
[0177] email.setBody(MessageBody.getMessageBodyFromText("This is a test email."));
[0178] email.getToRecipients().add(new EmailAddress("recipient@example.com"));
[0179] Among them, recipient@example.com can be replaced with the recipient address of the email to be sent.
[0180] In step S830, use the EmailMessage object to set the email content as the monitored text.
[0181] Furthermore, some other properties of the email can be set, such as the name of the sender, attachments, etc.
[0182] Specifically, it can be email.setFrom(new EmailAddress("sender@example.com", "Sender Name"));
[0183] email.getAttachments().addFileAttachment("path / to / attachment.pdf");
[0184] Among them, "path / to / attachment.pdf" can be replaced with the path of the attachment, and this attachment can be set as the monitored text.
[0185] In step S840, use the sendEmail method of the ExchangeService object to send the monitored text on the mail server.
[0186] Finally, use the sendEmail method of the ExchangeService object to send the email.
[0187] Specifically, it can be: email.send()
[0188] So far, it is possible to achieve the effect of accessing the mail server and asynchronously sending the monitored text to the user.
[0189] Therefore, when using the email to asynchronously send the monitored text, it is possible to notify the user more timely and effectively, so that the user can perceive the situation of the database table operation as soon as possible.
[0190] Next, a detailed description will be given to the monitoring method of the database table in the embodiments of the present disclosure in combination with an application scenario.
[0191] Figure 9 The flowchart of the monitoring method of the database table in the application scenario is shown. As Figure 9 shown, in step S910, execute the business logic.
[0192] In step S920, execute SQL to operate on the database for addition, deletion, modification, and query.
[0193] During the operation of the business logic of the after-sales monomer service, the corresponding database will perform addition, deletion, modification, and query operations through SQL statements.
[0194] In step S930, the aspect annotation monitoring module.
[0195] This aspect annotation monitoring module monitors the operations of the database table during the operation of the business logic in real time.
[0196] Figure 10 The flowchart of the aspect annotation monitoring module in the application scenario is shown. As Figure 10 shown, in step S1010, define the monitoring @Monitor annotation.
[0197] Among them, the monitoring annotation can be @Monitor or other parameters, and this exemplary embodiment does not make special limitations on this.
[0198] Define the monitoring annotation @Monitor, which can annotate the operation class and / or operation method that needs to be monitored. Among them, the operation class can be a Java class, and the operation method can be a Java method. This exemplary embodiment does not make special limitations on this.
[0199] For example, when the inventory is sufficient, binding the inventory table with the business order number can generate a corresponding transfer order for inventory transfer. Therefore, the inventory table can be monitored in the inventory transfer scenario by defining the monitoring annotation method, for example:
[0200]
[0201]
[0202] Among them, the defined monitoring annotation @Monitor is used to monitor whether an operation is performed on the inventory table. Specifically, "@Monitor" is the monitoring annotation;
[0203] "@Monitor
[0204] operate storage_table" is the step of defining the monitoring annotation, and this definition is executed during the running of this Java statement.
[0205] In step S1020, define the aspect @Aspect.
[0206] Among them, the monitoring aspect can be @Aspect or other parameters, and this exemplary embodiment does not make special limitations on this.
[0207] Define the monitoring aspect to determine the operation package to be monitored.
[0208] Define the monitoring aspect @Aspect, configure the cut-in point to be monitored, so as to cut into the operation package path to be monitored. This operation package can be a Java package.
[0209] For example, the method of defining the monitoring aspect can be:
[0210]
[0211] At this time, the package path of "com.xxxxxx.xms.storage.dao.mapper.*.*(..)" is determined by defining the monitoring slice. Among them, "@Aspect" is the monitoring aspect;
[0212] "execution(*com.xxxxxx.xms.storage.dao.mapper.*.*(..))" is an expression for the path of the target operation package determined by defining the monitoring aspect, which is executed during the running of this Java statement. The remaining parameters represent content related to the return value. For example, public indicates that the return value type is public, ".*(..) represents any method name, the parentheses represent parameters, and the two dots represent any parameter type", etc.
[0213] In step S1030, specify the packages, classes, and methods to be intercepted in the aspect.
[0214] After defining the monitoring annotation and the monitoring aspect, the corresponding operation class and operation method can be specified through this monitoring annotation, and the operation package to be monitored can be specified through the monitoring aspect.
[0215] That is, when the terminal or the server sends an instruction to the database table to make the database table execute an operation, the corresponding operation of the database table can be monitored through the set monitoring parameters.
[0216] It should be noted that when defining the monitoring annotation, either the operation class or the operation method can be annotated, and this exemplary embodiment does not make special limitations on this.
[0217] In step S1040, through the position where the annotation is intercepted, reflectively obtain the called Java package path and Java method.
[0218] Furthermore, the operation object monitored by the monitoring parameters can be obtained.
[0219] Specifically, reflectively obtain the Java package path and Java method corresponding to the monitoring parameters. This reflection mechanism can reload the class by modifying the configuration file without modifying the source code.
[0220] In step S1050, package the called Java package path, Java method, and the data layer SQL execution method into text content.
[0221] Specifically, obtain the preset text format.
[0222] Among them, the preset text format can be "under the package path... is called", or other formats, and this exemplary embodiment does not make special limitations on this.
[0223] Perform copywriting splicing processing on the operation package, operation class, and / or operation method according to the text format to obtain the monitoring text.
[0224] After obtaining the preset text format, the monitored operation packets, operation classes, and / or operation methods can be concatenated with the text format to obtain the corresponding monitored text.
[0225] For example, the monitored content can be:
[0226]
[0227] Then, the monitored text obtained after concatenating with the text format can be "The create_transfer() under the package path com.xxxxxx.xms.storage.dao.mapper.TransferMapper is called".
[0228] In step S1060, access the mail server and send an email to the user.
[0229] Furthermore, after generating the monitored text, use asynchronous email to send the monitored text.
[0230] When using asynchronous email to send the monitored text, it can notify the user more timely and effectively, so that the user can perceive the situation of operations on the database table as soon as possible.
[0231] In the exemplary embodiment of the present disclosure, by setting monitoring parameters to monitor the operations of the database table, a function entry is provided for actively monitoring the operations of the database table, and the monitoring strategy is formulated flexibly and with rich dimensions, without manual participation and sorting, saving labor costs and time costs, and also avoiding the occurrence of missing operations on the database table. Furthermore, generate and send the monitored text corresponding to the operation object, and automatically and intelligently notify the relevant users, actively identify and perceive the operated database table and the operations initiated on the database table, effectively reducing the intrusion of adding and outputting logs and other content into the business code, laying a solid data foundation and support for splitting the monolithic service into microservices, and ensuring the effect and quality of the complete splitting of the database table from the monolithic service.
[0232] In addition, in the exemplary embodiment of the present disclosure, a monitoring device for the database table is also provided. Figure 11 The structural schematic diagram of the monitoring device for the database table is shown. As Figure 11 shown, the monitoring device 1100 for the database table may include: a parameter acquisition module 1110, a library table monitoring module 1120, an object acquisition module 1130, and a text sending module 1140. Among them:
[0233] The parameter acquisition module 1110 is configured to acquire the monitoring parameters corresponding to the database table;
[0234] The database table monitoring module 1120 is configured to monitor the database table according to the monitoring parameters;
[0235] The object obtaining module 1130 is configured to obtain an operation object corresponding to the monitoring parameters when it is monitored that the database table performs an operation;
[0236] The text sending module 1140 is configured to generate a monitoring text according to the operation object and send the monitoring text.
[0237] In some embodiments of the present disclosure, the monitoring parameters include: monitoring annotations and monitoring aspects.
[0238] In some embodiments of the present disclosure, the operation object includes: an operation package, an operation class, and / or an operation method.
[0239] In some embodiments of the present disclosure, the parameter obtaining module 1110 includes:
[0240] The aspect definition sub-module is configured to define the monitoring aspect to determine a target operation package to be monitored in the operation package;
[0241] The first annotation sub-module is configured to define the monitoring annotation to determine a target operation class to be monitored in the operation class, or
[0242] The second annotation sub-module is configured to define the monitoring annotation to determine a target operation method to be monitored in the operation method.
[0243] In some embodiments of the present disclosure, the first annotation sub-module includes:
[0244] The first matching unit is configured to obtain the operation class and the target operation class, and match the operation class with the target operation class to obtain a first matching result;
[0245] The first condition unit is configured to determine the target operation class in the operation class as the target operation class to be monitored when the first matching result meets a first preset condition.
[0246] In some embodiments of the present disclosure, the second annotation sub-module includes:
[0247] The second matching unit is configured to obtain the operation method and the target operation method, and match the operation method with the target operation method to obtain a second matching result;
[0248] The second condition unit is configured to determine the target operation method in the operation method as the target operation method to be monitored when the second matching result meets a second preset condition.
[0249] In some embodiments of the present disclosure, the text sending module 1140 includes:
[0250] A format acquisition sub-module, configured to acquire a preset text format, where the text format includes a first preset text, an object operation relationship, and a second preset text;
[0251] A copywriting splicing sub-module, configured to perform copywriting splicing processing on the target operation package, the target operation class, and / or the target operation method according to the text format to obtain a monitoring text.
[0252] In some embodiments of the present disclosure, the copywriting splicing sub-module includes:
[0253] A first splicing unit, configured to splice the target operation package after the first preset text to obtain a first content text;
[0254] A second splicing unit, configured to splice the object operation relationship after the first content text to obtain a second content text;
[0255] A third splicing unit, configured to splice the target operation class and / or the target operation method after the second content text to obtain a third content text;
[0256] A fourth splicing unit, configured to splice the second preset text after the third content text to obtain a monitoring text.
[0257] In some embodiments of the present disclosure, the object acquisition module 1130 includes:
[0258] A reflection acquisition sub-module, configured to reflectively acquire an operation object corresponding to the monitoring parameter.
[0259] In some embodiments of the present disclosure, the operation package includes: a Java package; the operation class includes: a Java class; the operation method includes: a Java method.
[0260] In some embodiments of the present disclosure, the reflection acquisition sub-module includes:
[0261] A first acquisition unit, configured to acquire an operation object corresponding to the monitoring parameter through a Class object;
[0262] A second acquisition unit, configured to acquire an operation object corresponding to the monitoring parameter through an object;
[0263] A third acquisition unit, configured to acquire an operation object corresponding to the monitoring parameter through a class name.
[0264] In some embodiments of the present disclosure, the text sending module 1140 includes:
[0265] An asynchronous sending sub-module, configured to asynchronously send the monitored text by using an email.
[0266] In some embodiments of the present disclosure, the asynchronous sending sub-module includes:
[0267] An object creation unit, configured to create an ExchangeService object to connect to a mail server;
[0268] An object configuration unit, configured to configure the ExchangeService object and create an EmailMessage object;
[0269] A content setting unit, configured to use the EmailMessage object to set the mail content as the monitored text;
[0270] A mail sending unit, configured to use the sendEmail method of the ExchangeService object on the mail server to send the monitored text.
[0271] Regarding the device in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.
[0272] The present disclosure also provides a computer-readable storage medium, on which computer program instructions are stored, and when the program instructions are executed by a processor, the steps of the monitoring method of the database table provided by the present disclosure are implemented.
[0273] Figure 12 It is a block diagram of another monitoring device 1200 for a database table shown according to an exemplary embodiment. For example, the device 1200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0274] Referring to Figure 12 , the device 1200 may include one or more of the following components: a processing component 1202, a memory 1204, a power supply component 1206, a multimedia component 1208, an audio component 1210, an input / output interface 1212, a sensor component 1214, and a communication component 1216.
[0275] The processing component 1202 generally controls the overall operation of the device 1200, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 1202 may include one or more processors 1220 to execute instructions to complete all or part of the steps of the above methods. In addition, the processing component 1202 may include one or more modules to facilitate the interaction between the processing component 1202 and other components. For example, the processing component 1202 may include a multimedia module to facilitate the interaction between the multimedia component 1208 and the processing component 1202.
[0276] The memory 1204 is configured to store various types of data to support the operation of the device 1200. Examples of such data include instructions for any application or method operating on the device 1200, contact data, phone book data, messages, pictures, videos, etc. The memory 1204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disks, or optical disks.
[0277] The power component 1206 provides power to the various components of the device 1200. The power component 1206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 1200.
[0278] The multimedia component 1208 includes a screen that provides an output interface between the device 1200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can not only sense the boundaries of the touch or swipe actions, but also detect the duration and pressure associated with the touch or swipe operations. In some embodiments, the multimedia component 1208 includes a front camera and / or a rear camera. When the device 1200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
[0279] The audio component 1210 is configured to output and / or input audio signals. For example, the audio component 1210 includes a microphone (MIC) that is configured to receive external audio signals when the device 1200 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 1204 or transmitted via the communication component 1216. In some embodiments, the audio component 1210 further includes a speaker for outputting audio signals.
[0280] The input / output interface 1212 provides an interface between the processing component 1202 and a peripheral interface module, and the peripheral interface module may be a keyboard, a click wheel, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
[0281] The sensor component 1214 includes one or more sensors for providing an assessment of various aspects of the state of the device 1200. For example, the sensor component 1214 can detect the open / closed state of the device 1200, the relative positioning of components, such as the display and keypad of the device 1200, the sensor component 1214 can also detect a change in the position of the device 1200 or a component of the device 1200, the presence or absence of user contact with the device 1200, the orientation or acceleration / deceleration of the device 1200, and the temperature change of the device 1200. The sensor component 1214 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 1214 may further include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 1214 may further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0282] The communication component 1216 is configured to facilitate communication between the device 1200 and other devices in a wired or wireless manner. The device 1200 can access a wireless network based on communication standards, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1216 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0283] In an exemplary embodiment, the apparatus 1200 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.
[0284] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1204 including instructions, and the above instructions can be executed by a processor 1220 of the apparatus 1200 to complete the above method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0285] In addition to being an independent electronic device, the above apparatus may also be a part of an independent electronic device. For example, in one embodiment, the apparatus may be an integrated circuit (IC) or a chip. The integrated circuit may be a single IC or a collection of multiple ICs; the chip may include, but is not limited to, the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip), etc. The above integrated circuit or chip may be used to execute executable instructions (or code) to implement the above method for monitoring a database table. The executable instructions may be stored in the integrated circuit or chip, or may be obtained from other devices or apparatuses. For example, the integrated circuit or chip includes a processor, a memory, and an interface for communicating with other devices. The executable instructions may be stored in the memory, and when the executable instructions are executed by the processor, the above method for monitoring a database table is implemented; or, the integrated circuit or chip may receive the executable instructions through the interface and transmit them to the processor for execution to implement the above method.
[0286] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for performing the above-described monitoring method of the database table when executed by the programmable device.
[0287] Figure 13 FIG. 4 is a block diagram of yet another monitoring device 1300 for a database table shown according to an exemplary embodiment. For example, the device 1300 may be provided as a server. Referring to Figure 13 FIG. 4, the device 1300 includes a processing component 1322, which further includes one or more processors, and memory resources represented by a memory 1332 for storing instructions executable by the processing component 1322, such as application programs. The application programs stored in the memory 1332 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1322 is configured to execute instructions to perform the above-described monitoring method of the database table.
[0288] The device 1300 may further include a power component 1326 configured to perform power management of the device 1300, a wired or wireless network interface 1350 configured to connect the device 1300 to a network, and an input / output interface 1358. The device 1300 may operate based on an operating system stored in the memory 1332, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM or the like.
[0289] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and embodiments are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0290] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A method for monitoring a database table, It is characterized in that include: Get the monitoring parameters corresponding to the database table; monitoring the database table according to the monitoring parameters; When the database table is monitored to perform an operation, an operation object corresponding to the monitoring parameter is obtained; A monitoring text is generated according to the operation object, and the monitoring text is sent.
2. The method for monitoring a database table according to claim 1, It is characterized in that The monitoring parameters include: monitoring annotations and monitoring aspects.
3. The method for monitoring a database table according to claim 2, It is characterized in that The operation object includes: an operation package, an operation class and / or an operation method.
4. The method for monitoring a database table according to claim 3, It is characterized in that The obtaining of monitoring parameters corresponding to the database table includes: Defining the monitoring aspect to determine a target operation package to be monitored in the operation package; defining the monitoring annotation to determine the target operation class to be monitored in the operation class, and / or The monitoring annotation is defined to determine a target operation method to be monitored in the operation method.
5. The method for monitoring a database table according to claim 4, It is characterized in that The step of determining a target operation class to be monitored in the operation class includes: Acquire the operation class and the target operation class, and match the operation class with the target operation class to obtain a first matching result; When the first matching result satisfies a first preset condition, the target operation class in the operation classes is determined as the target operation class to be monitored.
6. The method for monitoring a database table according to claim 4, It is characterized in that Determining the target operation method to be monitored in the operation method includes: Acquire the operation method and the target operation method, and match the operation method with the target operation method to obtain a second matching result; When the second matching result satisfies a second preset condition, the target operation method in the operation methods is determined as a target operation method to be monitored.
7. The method for monitoring a database table according to claim 4, It is characterized in that The generating of monitoring text according to the operation object comprises: Acquire a preset text format, wherein the text format includes a first preset text, an object operation relationship, and a second preset text; The target operation package, the target operation class and / or the target operation method are processed by copywriting splicing according to the text format to obtain a monitoring text.
8. The method for monitoring a database table according to claim 7, It is characterized in that The step of performing text splicing processing on the target operation package, the target operation class and / or the target operation method according to the text format to obtain the monitoring text includes: splicing the target operation package after the first preset text to obtain a first content text; Adding the object operation relationship after the first content text to obtain a second content text; Adding the target operation class and / or the target operation method after the second content text to obtain a third content text; The second preset text is spliced after the third content text to obtain a monitoring text.
9. The method for monitoring a database table according to claim 1, It is characterized in that The acquiring the operation object corresponding to the monitoring parameter includes: Reflectively obtain the operation object corresponding to the monitoring parameter.
10. The method for monitoring a database table according to claim 9, It is characterized in that The operation package includes: a Java package; the operation class includes: a Java class; the operation method includes: a Java method.
11. The method for monitoring a database table according to claim 10, It is characterized in that The reflection obtaining the operation object corresponding to the monitoring parameter includes: Acquire the operation object corresponding to the monitoring parameter through the Class object; and / or Acquire an operation object corresponding to the monitoring parameter through an object; and / or The operation object corresponding to the monitoring parameter is obtained by class name.
12. The method for monitoring a database table according to claim 10, It is characterized in that The sending of the monitoring text comprises: The monitoring text is sent asynchronously via email.
13. The method for monitoring a database table according to claim 12, It is characterized in that The step of asynchronously sending the monitoring text by email includes: Create an ExchangeService object to connect to the mail server; Configure the ExchangeService object and create an EmailMessage object; Using the EmailMessage object, set the email content to the monitoring text; The monitoring text is sent on the mail server using the sendEmail method of the ExchangeService object.
14. A monitoring device for a database table, It is characterized in that include: A parameter acquisition module is configured to acquire monitoring parameters corresponding to the database table; A database table monitoring module, configured to monitor the database table according to the monitoring parameters; An object acquisition module is configured to acquire an operation object corresponding to the monitoring parameter when the database table is monitored to perform an operation; The text sending module is configured to generate a monitoring text according to the operation object and send the monitoring text.
15. A computer readable storage medium having computer program instructions stored thereon, It is characterized in that When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 13 are implemented.
16. An electronic device, It is characterized in that include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 13.