CN109857720B - Database table monitoring method, device, computer device and readable storage medium - Google Patents

Database table monitoring method, device, computer device and readable storage medium Download PDF

Info

Publication number
CN109857720B
CN109857720B CN201811564997.8A CN201811564997A CN109857720B CN 109857720 B CN109857720 B CN 109857720B CN 201811564997 A CN201811564997 A CN 201811564997A CN 109857720 B CN109857720 B CN 109857720B
Authority
CN
China
Prior art keywords
database table
notification
appointed
preset
specified
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.)
Active
Application number
CN201811564997.8A
Other languages
Chinese (zh)
Other versions
CN109857720A (en
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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201811564997.8A priority Critical patent/CN109857720B/en
Publication of CN109857720A publication Critical patent/CN109857720A/en
Application granted granted Critical
Publication of CN109857720B publication Critical patent/CN109857720B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a database table monitoring method, which comprises the following steps: monitoring a preset operation, wherein the preset operation is an operation executed on a specified database table; when the preset operation is monitored, determining whether to send out a notification according to the preset operation; when the notification is determined to be sent, a preset communication interface is called to send the notification; wherein said determining whether to issue a notification comprises: and when the content of the appointed database table is inconsistent with the content of the corresponding backup table, determining to send out a notification, determining the changed row and/or column in the appointed database table, and performing screenshot on the changed row and/or column. The invention also provides a device for realizing the database table monitoring method and a readable storage medium. The method and the device solve the technical problem that the change of the database table cannot be monitored.

Description

Database table monitoring method, device, computer device and readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a database table monitoring method, a database table monitoring device, a database table monitoring computer device, and a readable storage medium.
Background
Database table creation may be implemented under the Django framework. Typically, one database table is also typically associated with multiple database tables. Thus, if one of the database tables is modified, the other associated database tables are often affected. Furthermore, different database tables are often created by different creators. At present, no good management mechanism can effectively manage the change of the database table, so that each related creator can know the change of the database table in time.
Disclosure of Invention
In view of the foregoing, there is a need for a database table monitoring method, a database table monitoring device, a database table monitoring computer device and a database table readable storage medium, which are used for solving the technical problem that the database table change cannot be monitored.
A first aspect of the present invention provides a database table monitoring method, the method comprising:
monitoring a preset operation, wherein the preset operation refers to an operation executed on a specified database table, and the preset operation comprises an operation of executing storage on the specified database table;
when the preset operation is monitored, determining whether to send out a notification according to the preset operation; and
When the notification is determined to be sent, a preset communication interface is called to send the notification;
wherein when the monitored preset operation refers to an operation of performing saving on the specified database table, the determining whether to issue a notification includes:
comparing the designated database table with a corresponding backup table;
when the content of the appointed database table is consistent with the content of the corresponding backup table, determining that no notification is sent; and
And when the content of the appointed database table is inconsistent with the content of the corresponding backup table, determining to send out a notification, determining the changed row and/or column in the appointed database table, and performing screenshot on the changed row and/or column.
Preferably, the preset operation further includes an operation of adding, modifying, and/or deleting the specified database table.
Preferably, when the monitored preset operation refers to an operation of adding, modifying, or deleting the specified database table, the determining whether to issue a notification includes:
directly determining that a notification needs to be sent; and
Comparing the appointed database table with the corresponding backup table, determining the changed row and/or column in the appointed database table, and screenshot the changed row and/or column in the appointed database table.
Preferably, when determining to send out the notification, the calling the preset communication interface to send out the notification includes:
notifying the relevant personnel of the changed rows and/or columns in the designated database table.
Preferably, said notifying the relevant person of the changed row and/or column in said specified database table comprises:
pre-establishing a notification template, wherein the notification template comprises a notification subject;
taking the name of the appointed database table as a notification subject, and taking a screenshot corresponding to a changed row and/or column in the appointed database table as an attachment of the notification template; and
And sending the notification template filled with the notification subject matter to the related personnel in a specified sending mode by the attachment of the notification template.
Preferably, the method further comprises:
adding 1 to the number of times N of the change of the appointed database table to count the number of times of the change of the appointed database table, wherein N is an integer greater than or equal to 0;
recording the time of the change of the appointed database table, and calculating the frequency P of the change of the appointed database table according to the number of the change of the appointed database table in a preset time period; and
When the calculated frequency P of the change of the appointed database table is larger than a preset frequency threshold value, limiting the operation authority of the appointed database table; and when the calculated frequency P of the change of the appointed database table is smaller than or equal to the preset frequency threshold value, maintaining the current operation authority of the appointed database table.
Preferably, the limiting the operation authority of the specified database table means that the specified database table is not allowed to be added, modified and/or deleted.
A second aspect of the present invention provides a computer apparatus comprising a processor and a memory, the memory for storing at least one instruction, the processor for executing the at least one instruction to implement the database table monitoring method.
A third aspect of the invention provides a computer readable storage medium storing at least one instruction that when executed by a processor implements the database table monitoring method.
A fourth aspect of the present invention provides a database table monitoring apparatus, the apparatus comprising:
the monitoring module is used for monitoring preset operation, wherein the preset operation is an operation executed on a specified database table, and the preset operation comprises an operation of executing storage on the specified database table;
the judging module is used for determining whether to send out a notification according to the preset operation when the preset operation is monitored; and
The execution module is used for calling a preset communication interface to send out a notification when the notification is determined to be sent out;
wherein when the monitored preset operation refers to an operation of performing saving on the specified database table, the determining whether to issue a notification includes:
comparing the designated database table with a corresponding backup table;
when the content of the appointed database table is consistent with the content of the corresponding backup table, determining that no notification is sent; and
And when the content of the appointed database table is inconsistent with the content of the corresponding backup table, determining to send out a notification, determining the changed row and/or column in the appointed database table, and performing screenshot on the changed row and/or column.
The database table monitoring method, the device, the computer device and the readable storage medium provided by the embodiment of the invention monitor preset operation, wherein the preset operation is performed on a specified database table; when the preset operation is monitored, determining whether to send out a notification according to the preset operation; when the notification is determined to be sent, a preset communication interface is called to send the notification; wherein said determining whether to issue a notification comprises: when the content of the appointed database table is inconsistent with the content of the corresponding backup table, a notification is determined to be sent, a changed row and/or column in the appointed database table is determined, screenshot is carried out on the changed row and/or column, the change of table data in the database can be automatically monitored, a notification is sent to related personnel according to the corresponding change, and the related personnel can know whether attention or operation on the database table is needed or not at the first time according to the sent notification.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a database table monitoring method according to an embodiment of the present invention.
Fig. 2 is a block diagram of a database table monitoring device according to a second embodiment of the present invention.
Fig. 3 is a schematic diagram of a computer device according to a third embodiment of the present invention.
The invention will be further described in the following detailed description in conjunction with the above-described figures.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will be more clearly understood, a more particular description of the invention will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. It should be noted that, without conflict, the embodiments of the present invention and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, and the described embodiments are merely some, rather than all, embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
Example 1
Fig. 1 is a flowchart of a database table monitoring method according to an embodiment of the present invention.
In this embodiment, the database table monitoring method may be applied to a computer device, and for a computer device that needs to perform database table monitoring, the function for database table monitoring provided by the method of the present invention may be directly integrated on the computer device, or may be run on the computer device in the form of a software development kit (Software Development Kit, SDK).
As shown in fig. 1, the database table monitoring method specifically includes the following steps, the order of the steps in the flowchart may be changed according to different requirements, and some steps may be omitted.
Step S1, the computer device monitors preset operation, wherein the preset operation refers to operation executed on a specified database table. And executing step S2 when the preset operation is monitored.
In this embodiment, the computer device may be a personal computer, a server, an intelligent television, a portable electronic device such as a mobile phone, a tablet computer, or the like.
In one embodiment, the specified database table may refer to one of a plurality of database tables that are associated with each other and are independent of each other. In one embodiment, the specified database table may be stored in the computer device. In other embodiments, the specified database table may be stored in a device other than the computer apparatus.
For example, for a "teaching management system" it relates to three database tables each containing a specific topic: "teacher" table, "course" table, "class" table. The three database tables are used for managing information of teachers, classes, courses and the like in the teaching process. The three independent database tables can be cross-referenced by establishing an association. The specified database table may be any one of the three database tables.
In one embodiment, each database table corresponds to at least one associated person. The at least one related person includes a creator that creates the database table, and a creator of other database tables associated with the database table. In one embodiment, the relevant information of the at least one relevant person is recorded in a corresponding database table, respectively. The related information can refer to contact modes such as mailbox addresses, mobile phone numbers and the like.
For example, the "teacher" table and "class" table described above are created by creator "a", and the "class" table is created by creator "B". In one embodiment, the mailbox address and/or the mobile phone number of creator "a" may be recorded in the "teacher" table and the "course" table, respectively. The mailbox address and/or the mobile phone number of creator "B" may be recorded in the "class" table.
In a first embodiment, the preset operation includes an operation of performing Save (Save) on the specified database table.
In other embodiments, the preset operations further include performing an add, modify, and/or delete operation on the specified database table.
Step S2, when the preset operation is monitored, the computer device determines whether to send out a notification according to the preset operation.
In a first embodiment, when the monitored preset operation refers to an operation of performing Save (Save) on the specified database table, the determining whether to issue a notification includes:
(a1) And comparing the appointed database table with a corresponding backup table.
(a2) And when the content of the designated database table is consistent with the content of the corresponding backup table, determining that no notification is sent. And when the content of the appointed database table is inconsistent with the content of the corresponding backup table, determining to send out a notification.
(a3) And when the content of the appointed database table is inconsistent with the content of the corresponding backup table, determining the changed row and/or column in the appointed database table, and capturing the changed row and/or column.
It should be noted that, when steps (a 1) and (a 2) are performed, it is possible to avoid a false notification when a save operation is performed without adding, modifying, and/or deleting a database table.
In one embodiment, the backup table refers to a data backup made to the specified database table. In one embodiment, the backup table may be stored in the same device as the specified database table, such as the computer device or a server communicatively coupled to the computer device. In other embodiments, the backup table may also be stored in a different device than the database table.
In a second embodiment, when the monitored preset operation refers to performing an add, modify, and/or delete operation on the specified database, the determining whether to issue a notification includes:
(b1) The notification is directly determined to be sent.
(b2) Comparing the appointed database table with the corresponding backup table, determining the changed row and/or column in the appointed database table, and screenshot the changed row and/or column in the appointed database table.
In a preferred implementation manner of this embodiment, in either the first embodiment or the second embodiment, after determining the row and/or column in which the change occurs in the specified database table, the following steps (ab 1) - (ab 3) may be further included:
(ab 1) adding 1 to the number of times N the specified database table is changed, wherein N is an integer greater than or equal to 0, to count the number of times the specified database table is changed;
(ab 2) recording the time when the specified database table changes, and calculating the frequency P of the change of the specified database table according to the number of times of the change of the specified database table in a preset time period; and
(ab 3) limiting the operation authority to the designated database table when the calculated frequency P of the change of the designated database table is greater than a preset frequency threshold. When the calculated frequency P of the change of the appointed database table is smaller than or equal to the preset frequency threshold value, maintaining the current operation authority of the appointed database table, namely not limiting the operation authority of the appointed database table.
In one embodiment, the restricting the operation authority to the specified database table may mean that the specified database table is not allowed to be added, modified, and/or deleted.
In this embodiment, whether to limit the operation authority to the specified database table is determined according to the frequency P of the change of the specified database table, which can effectively prevent the influence on the database table under the conditions of virus infection and the like.
And step S3, when the notification is determined to be sent, the computer device calls a preset communication interface to send the notification. For example, the relevant person corresponding to the database table is notified.
In one embodiment, the relevant person includes a creator of the specified database table, and a creator of other database tables that are interrelated with the specified database table.
For example, assume that the specified database table is referred to as a "teacher" table. In one embodiment, when the contents of the "teacher" table change, the computer device may obtain the contact address of creator "A" of the "teacher" table from the "teacher" table and call a corresponding communication interface (e.g., mail interface or telephone interface) to notify the creator "A" based on the obtained contact address of creator "A".
In other embodiments, the computer device may also obtain the contact of creator "A" and the contact of creator "B" for the "course" table from other database tables associated with the "teacher" table, such as the "course" table and the "class" table. The computer device further performs deduplication processing on the acquired contact. For example, the repeatedly acquired contact information of the creator "a" is subjected to the deduplication processing, and the creator "a" and "B" are notified by calling a corresponding communication interface (e.g., a mail interface or a telephone interface) according to the contact information after the deduplication processing.
In one embodiment, when determining to send out the notification, calling a preset communication interface to send out the notification includes: notifying the relevant person of the changed rows and/or columns in the specified database table.
In one embodiment, said notifying the relevant person of the changed row and/or column in the specified database table comprises:
(c1) A notification template is previously established, the notification template including a notification gist.
(c2) And taking the name of the appointed database table as a notification subject, and taking the screenshot corresponding to the changed row and/or column in the appointed database table as an attachment of the notification template.
(c3) And transmitting the notification template filled with the notification subject matter to the relevant person in a specified transmission mode (such as mail transmission or information transmission). In other embodiments, the method may further include the steps of:
step S4, the computer device further inquires whether the related personnel update the backup table corresponding to the appointed database table, and updates or does not update the backup table according to the feedback signal of the user.
In one embodiment, when a signal is received that a user confirms to update the backup table, an update operation is performed on the backup table. Otherwise, when a signal confirming that the backup table is updated by the user is not received or the backup table is not confirmed to be updated by the user, the updating operation is not performed on the backup table.
In summary, in the database table monitoring method according to the embodiment of the present invention, the preset operation is an operation performed on the specified database table by monitoring the preset operation; when the preset operation is monitored, determining whether to send out a notification according to the preset operation; when the notification is determined to be sent, a preset communication interface is called to send the notification; wherein said determining whether to issue a notification comprises: when the content of the appointed database table is inconsistent with the content of the corresponding backup table, a notification is determined to be sent, a changed row and/or column in the appointed database table is determined, screenshot is carried out on the changed row and/or column, the change of table data in the database can be automatically monitored, a notification is sent to related personnel according to the corresponding change, and the related personnel can know whether attention or operation on the database table is needed or not at the first time according to the sent notification.
The foregoing fig. 1 describes the database table monitoring method of the present invention in detail, and the following describes, with reference to fig. 2 to 3, a functional module of a software device implementing the database table monitoring method and a hardware device architecture implementing the database table monitoring method.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
Example two
Referring to fig. 2, a block diagram of a database table monitoring device according to a second embodiment of the present invention is shown.
In some embodiments, the database table monitoring device 30 is run in a computer device. The database table monitoring apparatus 30 may comprise a plurality of functional modules consisting of program code segments. Program code for each program segment in the database table monitoring apparatus 30 may be stored in a memory of a computer apparatus and executed by at least one processor of the computer apparatus to perform (see fig. 1 for details) database table monitoring functions.
In this embodiment, the database table monitoring apparatus 30 may be divided into a plurality of functional modules according to the functions performed by the database table monitoring apparatus. The functional module may include: a monitoring module 301, a judging module 302, and an executing module 303. The module referred to in the present invention refers to a series of computer program segments capable of being executed by at least one processor and of performing a fixed function, stored in a memory. In the present embodiment, the functions of the respective modules will be described in detail in the following embodiments.
The monitoring module 301 monitors a preset operation, which is an operation performed on a specified database table.
In this embodiment, the computer device may be a personal computer, a server, an intelligent television, a portable electronic device such as a mobile phone, a tablet computer, or the like.
In one embodiment, the specified database table may refer to one of a plurality of database tables that are associated with each other and are independent of each other. In one embodiment, the specified database table may be stored in the computer device. In other embodiments, the specified database table may be stored in a device other than the computer apparatus.
For example, for a "teaching management system" it relates to three database tables each containing a specific topic: "teacher" table, "course" table, "class" table. The three database tables are used for managing information of teachers, classes, courses and the like in the teaching process. The three independent database tables can be cross-referenced by establishing an association. The specified database table may be any one of the three database tables.
In one embodiment, each database table corresponds to at least one associated person. The at least one related person includes a creator that creates the database table, and a creator of other database tables associated with the database table. In one embodiment, the relevant information of the at least one relevant person is recorded in a corresponding database table, respectively. The related information can refer to contact modes such as mailbox addresses, mobile phone numbers and the like.
For example, the "teacher" table and "class" table described above are created by creator "a", and the "class" table is created by creator "B". In one embodiment, the mailbox address and/or the mobile phone number of creator "a" may be recorded in the "teacher" table and the "course" table, respectively. The mailbox address and/or the mobile phone number of creator "B" may be recorded in the "class" table.
In one embodiment, the preset operation includes performing a Save (Save) operation on the specified database table.
In other embodiments, the preset operations further include performing an add, modify, and/or delete operation on the specified database table.
When the preset operation is monitored, the judgment module 302 determines whether to issue a notification according to the preset operation.
In a first embodiment, when the monitored preset operation refers to an operation of performing Save (Save) on the specified database table, the determining whether to issue a notification includes:
(a1) And comparing the appointed database table with a corresponding backup table.
(a2) And when the content of the designated database table is consistent with the content of the corresponding backup table, determining that no notification is sent. And when the content of the appointed database table is inconsistent with the content of the corresponding backup table, determining to send out a notification.
(a3) And when the content of the appointed database table is inconsistent with the content of the corresponding backup table, determining the changed row and/or column in the appointed database table, and capturing the changed row and/or column.
It should be noted that, when steps (a 1) and (a 2) are performed, it is possible to avoid a false notification when a save operation is performed without adding, modifying, and/or deleting a database table.
In one embodiment, the backup table refers to a data backup made to the specified database table. In one embodiment, the backup table may be stored in the same device as the specified database table, such as the computer device or a server communicatively coupled to the computer device. In other embodiments, the backup table may also be stored in a different device than the database table.
In a second embodiment, when the monitored preset operation refers to performing an add, modify, and/or delete operation on the specified database, the determining whether to issue a notification includes:
(b1) The notification is directly determined to be sent.
(b2) Comparing the appointed database table with the corresponding backup table, determining the changed row and/or column in the appointed database table, and screenshot the changed row and/or column in the appointed database table.
In a preferred implementation manner of this embodiment, in either the first embodiment or the second embodiment, after determining the row and/or column in which the change occurs in the specified database table, the following steps (ab 1) - (ab 3) may be further included:
(ab 1) adding 1 to the number of times N the specified database table is changed, wherein N is an integer greater than or equal to 0, to count the number of times the specified database table is changed;
(ab 2) recording the time when the specified database table changes, and calculating the frequency P of the change of the specified database table according to the number of times of the change of the specified database table in a preset time period; and
(ab 3) limiting the operation authority to the designated database table when the calculated frequency P of the change of the designated database table is greater than a preset frequency threshold. When the calculated frequency P of the change of the appointed database table is smaller than or equal to the preset frequency threshold value, maintaining the current operation authority of the appointed database table, namely not limiting the operation authority of the appointed database table.
In one embodiment, the restricting the operation authority to the specified database table may mean that the specified database table is not allowed to be added, modified, and/or deleted.
In this embodiment, whether to limit the operation authority to the specified database table is determined according to the frequency P of the change of the specified database table, which can effectively prevent the influence on the database table under the conditions of virus infection and the like.
When it is determined that the notification is to be sent, the execution module 303 invokes a preset communication interface to send the notification. For example, the relevant person corresponding to the database table is notified.
In one embodiment, the relevant person includes a creator of the specified database table, and a creator of other database tables that are interrelated with the specified database table.
For example, assume that the specified database table is referred to as a "teacher" table. In one embodiment, when the contents of the "teacher" table change, the execution module 303 may obtain the contact information of the creator "a" of the "teacher" table from the "teacher" table, and call a corresponding communication interface (e.g., a mail interface or a telephone interface) to notify the creator "a" according to the obtained contact information of the creator "a".
In other embodiments, execution module 303 may also obtain the contact of creator "A" and the contact of creator "B" for the "course" table from other database tables associated with the "teacher" table, such as the "course" table and the "class" table. The execution module 303 further performs deduplication processing on the acquired contact. For example, the repeatedly acquired contact information of the creator "a" is subjected to the deduplication processing, and the creator "a" and "B" are notified by calling a corresponding communication interface (e.g., a mail interface or a telephone interface) according to the contact information after the deduplication processing.
In one embodiment, when determining to send out the notification, calling a preset communication interface to send out the notification includes: notifying the relevant person of the changed rows and/or columns in the specified database table.
In one embodiment, said notifying the relevant person of the changed row and/or column in the specified database table comprises:
(c1) A notification template is previously established, the notification template including a notification gist.
(c2) And taking the name of the appointed database table as a notification subject, and taking the screenshot corresponding to the changed row and/or column in the appointed database table as an attachment of the notification template.
(c3) And transmitting the notification template filled with the notification subject matter to the relevant person in a specified transmission mode (such as mail transmission or information transmission).
In other embodiments, the execution module 303 further queries the relevant person whether to update the backup table corresponding to the specified database table, and updates or does not update the backup table according to the feedback signal from the user.
In one embodiment, when a signal is received that a user confirms to update the backup table, an update operation is performed on the backup table. Otherwise, when a signal confirming that the backup table is updated by the user is not received or the backup table is not confirmed to be updated by the user, the updating operation is not performed on the backup table.
In summary, in the database table monitoring device according to the embodiment of the present invention, the preset operation is an operation performed on the specified database table by monitoring the preset operation; when the preset operation is monitored, determining whether to send out a notification according to the preset operation; when the notification is determined to be sent, a preset communication interface is called to send the notification; wherein said determining whether to issue a notification comprises: when the content of the appointed database table is inconsistent with the content of the corresponding backup table, a notification is determined to be sent, a changed row and/or column in the appointed database table is determined, screenshot is carried out on the changed row and/or column, the change of table data in the database can be automatically monitored, a notification is sent to related personnel according to the corresponding change, and the related personnel can know whether attention or operation on the database table is needed or not at the first time according to the sent notification.
Example III
Fig. 3 is a schematic structural diagram of a computer device according to a third embodiment of the present invention. In the preferred embodiment of the invention, the computer device 3 includes a memory 31, at least one processor 32, at least one communication bus 33. It will be appreciated by those skilled in the art that the configuration of the computer device shown in fig. 3 is not limiting of the embodiments of the present invention, and that either a bus-type configuration or a star-type configuration is possible, and that the computer device 3 may also include more or less other hardware or software than that shown, or a different arrangement of components.
In some embodiments, the computer device 3 includes a terminal capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit, a programmable gate array, a digital processor, an embedded device, and the like.
It should be noted that the computer device 3 is only used as an example, and other electronic products that may be present in the present invention or may be present in the future are also included in the scope of the present invention by way of reference.
In some embodiments, the memory 31 is used to store program code and various data, such as a database table monitor 30 installed in the computer device 3, and to enable high-speed, automatic access to programs or data during operation of the computer device 3. The Memory 31 includes Read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read-Only Memory (EPROM), one-time programmable Read-Only Memory (OTPROM), electrically erasable rewritable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM) or other optical disc Memory, magnetic disk Memory, magnetic tape Memory, or any other medium that can be used for carrying or storing data.
In some embodiments, the at least one processor 32 may be comprised of an integrated circuit, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, combinations of various control chips, and the like. The at least one processor 32 is a Control Unit (Control Unit) of the computer apparatus 3, connects the respective components of the entire computer apparatus 3 using various interfaces and lines, and executes various functions of the computer apparatus 3 and processes data, such as a database table monitoring function, by running or executing programs or modules stored in the memory 31, and calling data stored in the memory 31.
In some embodiments, the at least one communication bus 33 is arranged to enable connected communication between the memory 31 and the at least one processor 32 or the like.
Although not shown, the computer device 3 may further include a power source (such as a battery) for powering the various components, and preferably the power source may be logically connected to the at least one processor 32 via a power management device, such that functions of managing charging, discharging, and power consumption are performed by the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The computer device 3 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described in detail herein.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The integrated units implemented in the form of software functional modules described above may be stored in a computer readable storage medium. The software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a server, a personal computer, etc.) or a processor (processor) to perform portions of the methods described in the various embodiments of the invention.
In a further embodiment, in connection with fig. 2, the at least one processor 32 may execute the operating means of the computer device 3 as well as various installed applications (such as the database table monitoring device 30), program code, etc., e.g., the various modules described above.
The memory 31 has program code stored therein, and the at least one processor 32 can invoke the program code stored in the memory 31 to perform related functions. For example, each of the modules depicted in fig. 2 is a program code stored in the memory 31 and executed by the at least one processor 32 to perform the functions of the respective modules for database table monitoring purposes.
In one embodiment of the invention, the memory 31 stores a plurality of instructions that are executed by the at least one processor 32 for the purpose of monitoring database tables.
Specifically, the specific implementation method of the above instruction by the at least one processor 32 may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it will be obvious that the term "comprising" does not exclude other elements or that the singular does not exclude a plurality. A plurality of units or means recited in the apparatus claims can also be implemented by means of one unit or means in software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (10)

1. A method for monitoring a database table, the method comprising:
monitoring a preset operation, wherein the preset operation refers to an operation executed on a specified database table, and the preset operation comprises an operation of executing storage on the specified database table;
when the preset operation is monitored, determining whether to send out a notification according to the preset operation; and
When the notification is determined to be sent, a preset communication interface is called to send the notification;
wherein when the monitored preset operation refers to an operation of performing saving on the specified database table, the determining whether to issue a notification includes:
comparing the designated database table with a corresponding backup table;
when the content of the appointed database table is consistent with the content of the corresponding backup table, determining that no notification is sent;
when the content of the appointed database table is inconsistent with the content of the corresponding backup table, determining to send out a notification, determining a changed row and/or column in the appointed database table, and capturing a screenshot of the changed row and/or column;
adding 1 to the number of times N of the change of the appointed database table to count the number of times of the change of the appointed database table, wherein N is an integer greater than or equal to 0;
recording the time of the change of the appointed database table, and calculating the frequency P of the change of the appointed database table according to the times of the change of the appointed database table in a preset time period; and
When the calculated frequency P of the change of the appointed database table is larger than a preset frequency threshold value, limiting the operation authority of the appointed database table; and when the calculated frequency P of the change of the appointed database table is smaller than or equal to the preset frequency threshold value, maintaining the current operation authority of the appointed database table.
2. The database table monitoring method of claim 1, wherein the preset operations further comprise performing an addition, modification, and/or deletion operation on the specified database table.
3. The database table monitoring method of claim 2, wherein when the monitored preset operation is an operation of adding, modifying, or deleting the specified database table, the determining whether to issue a notification includes:
directly determining that a notification needs to be sent; and
Comparing the appointed database table with the corresponding backup table, determining the changed row and/or column in the appointed database table, and screenshot the changed row and/or column in the appointed database table.
4. The method for monitoring a database table according to claim 3, wherein when it is determined that the notification is to be sent, the step of calling a preset communication interface to send the notification includes:
notifying the relevant personnel of the changed rows and/or columns in the designated database table.
5. The database table monitoring method of claim 4, wherein notifying the relevant personnel of the changed rows and/or columns in the specified database table comprises:
pre-establishing a notification template, wherein the notification template comprises a notification subject;
taking the name of the appointed database table as a notification subject, and taking a screenshot corresponding to a changed row and/or column in the appointed database table as an attachment of the notification template; and
And sending the notification template filled with the notification subject matter to the related personnel in a specified sending mode by the attachment of the notification template.
6. The method for monitoring a database table of claim 1,
the specified database table refers to one of a plurality of database tables which are mutually related and independent.
7. The method of claim 1, wherein restricting the operation authority of the specified database table means that the specified database table is not allowed to be added, modified, and/or deleted.
8. A computer device comprising a processor and a memory, the memory for storing at least one instruction, the processor for executing the at least one instruction to implement a database table monitoring method according to any one of claims 1 to 7.
9. A computer readable storage medium storing at least one instruction which when executed by a processor implements a database table monitoring method according to any one of claims 1 to 7.
10. A database table monitoring apparatus, the apparatus comprising:
the monitoring module is used for monitoring preset operation, wherein the preset operation is an operation executed on a specified database table, and the preset operation comprises an operation of executing storage on the specified database table;
the judging module is used for determining whether to send out a notification according to the preset operation when the preset operation is monitored; and
The execution module is used for calling a preset communication interface to send out a notification when the notification is determined to be sent out;
wherein when the monitored preset operation refers to an operation of performing saving on the specified database table, the determining whether to issue a notification includes:
comparing the designated database table with a corresponding backup table;
when the content of the appointed database table is consistent with the content of the corresponding backup table, determining that no notification is sent;
when the content of the appointed database table is inconsistent with the content of the corresponding backup table, determining to send out a notification, determining a changed row and/or column in the appointed database table, and capturing a screenshot of the changed row and/or column;
adding 1 to the number of times N of the change of the appointed database table to count the number of times of the change of the appointed database table, wherein N is an integer greater than or equal to 0;
recording the time of the change of the appointed database table, and calculating the frequency P of the change of the appointed database table according to the times of the change of the appointed database table in a preset time period; and
When the calculated frequency P of the change of the appointed database table is larger than a preset frequency threshold value, limiting the operation authority of the appointed database table; and when the calculated frequency P of the change of the appointed database table is smaller than or equal to the preset frequency threshold value, maintaining the current operation authority of the appointed database table.
CN201811564997.8A 2018-12-20 2018-12-20 Database table monitoring method, device, computer device and readable storage medium Active CN109857720B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811564997.8A CN109857720B (en) 2018-12-20 2018-12-20 Database table monitoring method, device, computer device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811564997.8A CN109857720B (en) 2018-12-20 2018-12-20 Database table monitoring method, device, computer device and readable storage medium

Publications (2)

Publication Number Publication Date
CN109857720A CN109857720A (en) 2019-06-07
CN109857720B true CN109857720B (en) 2024-02-02

Family

ID=66891559

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811564997.8A Active CN109857720B (en) 2018-12-20 2018-12-20 Database table monitoring method, device, computer device and readable storage medium

Country Status (1)

Country Link
CN (1) CN109857720B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110515807B (en) * 2019-09-02 2023-07-14 北京启迪区块链科技发展有限公司 Database table monitoring method, device, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1673972A (en) * 2004-08-04 2005-09-28 上海宝信软件股份有限公司 Dynamic monitoring system and method for data base list update
CN102855319A (en) * 2012-09-05 2013-01-02 国家电网公司 ORACLE database operation monitoring system
CN105095056A (en) * 2015-08-14 2015-11-25 焦点科技股份有限公司 Method for monitoring data in data warehouse
CN105335527A (en) * 2015-12-04 2016-02-17 浪潮(北京)电子信息产业有限公司 Method and system for monitoring database operation
CN105451223A (en) * 2014-08-07 2016-03-30 阿里巴巴集团控股有限公司 Information monitoring method and device, and mobile terminal
CN105740418A (en) * 2016-01-29 2016-07-06 杭州亿方云网络科技有限公司 File monitoring and message pushing based real-time synchronization system
CN108804267A (en) * 2018-05-30 2018-11-13 平安普惠企业管理有限公司 Database polling method, device, computer equipment and storage medium
CN108959468A (en) * 2018-06-20 2018-12-07 平安科技(深圳)有限公司 A kind of monitoring method of data base directory, storage medium and server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8190579B2 (en) * 2008-06-06 2012-05-29 Bmc Software, Inc. IMS change mapper

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1673972A (en) * 2004-08-04 2005-09-28 上海宝信软件股份有限公司 Dynamic monitoring system and method for data base list update
CN102855319A (en) * 2012-09-05 2013-01-02 国家电网公司 ORACLE database operation monitoring system
CN105451223A (en) * 2014-08-07 2016-03-30 阿里巴巴集团控股有限公司 Information monitoring method and device, and mobile terminal
CN105095056A (en) * 2015-08-14 2015-11-25 焦点科技股份有限公司 Method for monitoring data in data warehouse
CN105335527A (en) * 2015-12-04 2016-02-17 浪潮(北京)电子信息产业有限公司 Method and system for monitoring database operation
CN105740418A (en) * 2016-01-29 2016-07-06 杭州亿方云网络科技有限公司 File monitoring and message pushing based real-time synchronization system
CN108804267A (en) * 2018-05-30 2018-11-13 平安普惠企业管理有限公司 Database polling method, device, computer equipment and storage medium
CN108959468A (en) * 2018-06-20 2018-12-07 平安科技(深圳)有限公司 A kind of monitoring method of data base directory, storage medium and server

Also Published As

Publication number Publication date
CN109857720A (en) 2019-06-07

Similar Documents

Publication Publication Date Title
CN104360878B (en) A kind of method and device of application software deployment
CN103176789A (en) Method and system used for realizing function extension of open platform
CN101317381A (en) Ability management object maintenance, ability management method, system and terminal
CN109788068B (en) Heartbeat state information reporting method, device and equipment and computer storage medium
CN111800462A (en) Micro-service instance processing method and device, computer equipment and storage medium
CN107797859A (en) A kind of dispatching method of timed task and a kind of dispatch server
CN105847446B (en) Method, device and system for acquiring network data
CN112069266A (en) Data synchronization method and service node
CN106603125B (en) Method and device for data interaction with Bluetooth equipment
CN109857720B (en) Database table monitoring method, device, computer device and readable storage medium
CN112860504A (en) Monitoring method and device, computer storage medium and electronic equipment
CN114090207A (en) Asynchronous task execution method
CN113419921B (en) Task monitoring method, device, equipment and storage medium
CN109040491A (en) On-hook behavior processing method, device, computer equipment and storage medium
CN113112217B (en) Business process configuration method, device, electronic equipment and computer readable medium
CN115291891A (en) Cluster management method and device and electronic equipment
CN109460251B (en) Component integration framework management method and device
CN112153215A (en) Call processing method and device, related equipment and storage medium
CN112764729A (en) Application software development method and device, computer equipment and readable storage medium
CN112860449A (en) Method, system, equipment and medium for preventing restart caused by message overtime
CN112181702A (en) Thread monitoring method and device
CN110837290A (en) Management method of kernel lock and terminal equipment
CN112732568B (en) System log acquisition method and device, storage medium and terminal
CN111026048B (en) Data processing method, device and storage medium
CN110347584B (en) Method and device for testing and adjusting credit card policy package, electronic equipment and medium

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
GR01 Patent grant
GR01 Patent grant