Database auditing method and device, equipment and storage medium

By screening and auditing database audit messages, the network congestion and efficiency reduction of database audits under high concurrency conditions under cloud architecture is solved, and a more efficient database audit process is achieved.

CN118972268APending Publication Date: 2024-11-15CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410996962.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

Under the cloud architecture, database audits are prone to network congestion, delay and packet loss during peak network concurrency periods, and server data processing performance declines, resulting in reduced efficiency.

Method used

By filtering messages that meet the preset database audit conditions based on the data characteristics of the message, the target audit messages are obtained, and audited based on the database audit services to generate a database audit report .

Benefits of technology

It reduces the amount of data collected by database audits, reduces network congestion and server data processing burden, and improves the efficiency of database audits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972268A_ABST
    Figure CN118972268A_ABST
Patent Text Reader

Abstract

The invention relates to a database auditing method and device, equipment and a storage medium. The method comprises the following steps: screening messages meeting a preset database auditing condition in network messages based on data characteristics of each message in the network messages by aiming at the network messages which are received by a target network card and are used for accessing a database to obtain a target auditing message; and auditing the target auditing message based on the database auditing service to obtain a database auditing report corresponding to the database. According to the method and the device, the network messages used for accessing the database in the target network card can be screened according to the preset database auditing condition, the messages meeting the preset database auditing condition in the network messages serve as the target auditing messages, and then database auditing is performed on the target auditing messages; according to the method, the messages which do not need database auditing can be filtered, the data volume collected by database auditing is greatly reduced, and the database auditing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of database auditing, and in particular to a database auditing method, apparatus, device and storage medium. Background Art

[0002] Database auditing is centered on security events, records database activities in real time, conducts fine-grained audit compliance management on database operations, and issues real-time alerts on risky behaviors encountered by the database. It generates database audit reports by recording, analyzing, and reporting user access to the database, so as to query and locate the cause of the event, monitor and audit the database network behavior, and improve data security.

[0003] In the field of database auditing, it is usually necessary to monitor, collect and analyze the network traffic accessing the database, so as to monitor, record and analyze the database activities and obtain the audit results of the database.

[0004] Under the cloud architecture, databases in the cloud environment are usually distributed in multiple geographical locations or regions. It is necessary to collect data required for database auditing across regions and clusters, which places high demands on network resources. In addition, when a large number of different user-end devices share the same database resources, the database will be frequently operated, and the amount of audit log data generated will be huge. Using the current database auditing method, when network congestion occurs during the peak period of network concurrency, the audit data collection of the database will be delayed and packet lost. In addition, when monitoring, collecting, and processing large amounts of data, the data processing performance of the server is required to be high, which increases the duration of database auditing and reduces efficiency. Summary of the invention

[0005] In order to solve the above technical problems, the present disclosure provides a database audit method, device, equipment and storage medium.

[0006] A first aspect of the present disclosure provides a database audit method, comprising:

[0007] For the network messages received by the target network card for accessing the database, based on the data characteristics of each message in the network message, the messages in the network message that meet the preset database audit conditions are screened to obtain the target audit message;

[0008] Based on the database audit service, the target audit message is audited to obtain the database audit report corresponding to the database.

[0009] A second aspect of the present disclosure provides a database auditing device, comprising:

[0010] A screening module is used to screen the network messages received by the target network card for accessing the database based on the data characteristics of each message in the network message, and obtain the target audit message;

[0011] The audit module is used to audit the target audit message based on the database audit service and obtain the database audit report corresponding to the database

[0012] A third aspect of the present disclosure provides a computer device, comprising:

[0013] A memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the database audit method of the first aspect mentioned above can be implemented.

[0014] A fourth aspect of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the database audit method of the first aspect can be implemented.

[0015] Compared with the prior art, the technical solution provided by the present invention has the following advantages:

[0016] The present disclosure obtains a target audit message by screening the network messages for accessing a database received by a target network card based on the data features of each message in the network message, and auditing the target audit message based on the database audit service to obtain a database audit report corresponding to the database. The present disclosure can screen the network messages for accessing a database in a target network card according to the preset database audit conditions, and use the messages in the network messages that meet the preset database audit conditions as the target audit messages, and then perform a database audit on the target audit messages, and can filter the messages that do not need to be audited by the database, which can greatly reduce the amount of data collected by the database audit, reduce the impact of network congestion, excessive audit data, and reduced data processing performance of the server on the database audit, and improve the efficiency of the database audit. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0019] Figure 1 is a flow chart of a database audit method provided by an embodiment of the present disclosure;

[0020] Figure 2 is a flow chart of another database audit method provided by an embodiment of the present disclosure;

[0021] Figure 3 is a flowchart of another database audit method provided by an embodiment of the present disclosure;

[0022] Figure 4 It is a structural diagram of a database auditing device provided by an embodiment of the present disclosure;

[0023] Figure 5 It is a structural diagram of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0025] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0026] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0027] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0028] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0029] The database audit method provided by the embodiment of the present disclosure may be executed by a computer device, which may be understood as any device with processing and computing capabilities, and may include but is not limited to electronic devices such as database servers.

[0030] In order to better understand the inventive concept of the embodiments of the present disclosure, the technical solutions of the embodiments of the present disclosure are described below in conjunction with exemplary embodiments.

[0031] Figure 1 is a flowchart of a database audit method provided by an embodiment of the present disclosure, such as Figure 1 As shown, the database audit method provided in this embodiment includes the following steps:

[0032] Step 110: For the network messages received by the target network card for accessing the database, based on the data characteristics of each message in the network message, the messages in the network message that meet the preset database audit conditions are screened to obtain the target audit message.

[0033] In the disclosed embodiment, the computer device includes at least one database and at least one network card. Each network card can be connected to at least one database. The network card can receive network messages from a user terminal device to access the database and send network messages to the user terminal device.

[0034] The computer device is provided with an agent program, which can screen the network messages received by the target network card for accessing the database based on the data characteristics of each message in the network message, and obtain the target audit message.

[0035] The data characteristics of the message may include the content, format, type and other characteristics of the message.

[0036] The target network card is at least one network card in the computer device, which can be determined as needed and is not limited here.

[0037] The preset database audit conditions can be understood as conditions that messages that need to be audited by the database must meet. The preset database audit conditions can be set as needed and are not limited here.

[0038] The preset database audit condition may include at least one of the following three items:

[0039] 1. The five-tuple information of the message matches the preset five-tuple information, and the preset five-tuple information is the five-tuple information of the message sent by the preset audit-required user terminal device to the preset audit-required database.

[0040] 2. The protocol version field in the application layer message body of the message matches the protocol version field corresponding to the preset database type, and the preset database type is the preset database type of the database to be audited.

[0041] 3. The command field in the application layer message body of the message matches the preset operation command, and the preset operation command is the preset operation command that needs to be audited.

[0042] The five-tuple information includes the source IP address (Internet Protocol Address), the source port number, the destination IP address, the destination port number and the transport layer protocol.

[0043] The source IP address can be understood as the IP address of the device that sends the message;

[0044] The source port number can be understood as the port number of the device sending the message.

[0045] The destination IP address can be understood as the IP address of the target receiving device of the message;

[0046] The destination port number can be understood as the port number of the target receiving device of the message that receives the message;

[0047] The transport layer protocol can be understood as the communication protocol used for message transmission.

[0048] In the embodiment of the present disclosure, the source IP address in the preset five-tuple information is the IP address of the preset user terminal device that needs to be audited; the source port number in the preset five-tuple information is the port number for sending messages from the preset user terminal device that needs to be audited to the preset database that needs to be audited; the destination IP address in the preset five-tuple information is the IP address of the device where the preset database that needs to be audited is located; the destination port number in the preset five-tuple information is the port number for receiving messages in the device where the preset database that needs to be audited is located; the transport layer protocol in the preset five-tuple information is the transport layer protocol used by the preset user terminal device that needs to be audited to send messages to the preset database that needs to be audited.

[0049] The protocol version field can be understood as the field corresponding to the communication protocol version. Each database type corresponds to a different protocol version field, and the database type corresponds to the protocol version field one by one. Database types can include hierarchical, network, relational, and non-relational types.

[0050] The user terminal device to be audited can be understood as a user terminal device that needs to be audited by the database. The preset user terminal device to be audited can be set as needed and is not limited here.

[0051] The database to be audited can be understood as a database that needs to be audited. The preset database to be audited can be set as needed and is not limited here.

[0052] The operation command to be audited can be understood as the operation command to be audited by the database. The preset operation command to be audited can be set as needed and is not limited here.

[0053] The above-mentioned preset five-tuple information, preset database type and preset operation command can be set as needed and are not limited here.

[0054] The application layer message body can be understood as the application layer field in the message.

[0055] The above matches can be understood as the same.

[0056] Accordingly, the five-tuple information of the target audit message matches the preset five-tuple information;

[0057] and / or, the protocol version field in the application layer message body of the target audit message matches the protocol version field corresponding to the preset database type;

[0058] And / or, the command field in the application layer message body of the target audit message matches the preset operation command.

[0059] Step 120: Based on the database audit service, audit the target audit message to obtain a database audit report corresponding to the database.

[0060] In some embodiments, a database audit service is provided in the computer device. After obtaining the target audit message, the computer device may send the target audit message to the database audit service, and the database audit service may audit the target audit message to obtain a database audit report corresponding to the database.

[0061] Database audit service can be understood as an application used for database auditing.

[0062] In other embodiments, a database audit service is provided in the database audit server. After obtaining the target audit message, the computer device can send the target audit message to the database audit server, and the database audit server can audit the target audit message through the database audit service to obtain a database audit report corresponding to the database.

[0063] The disclosed embodiment, by targeting the network messages received by the target network card for accessing the database, based on the data features of each message in the network message, the messages in the network message that meet the preset database audit conditions are screened to obtain the target audit message; based on the database audit service, the target audit message is audited to obtain the database audit report corresponding to the database. The disclosed embodiment can screen the network messages in the target network card for accessing the database according to the preset database audit conditions, use the messages in the network message that meet the preset database audit conditions as the target audit messages, and then perform a database audit on the target audit messages, and can filter the messages that do not need to be audited by the database, which can greatly reduce the amount of data collected by the database audit, reduce the impact of network congestion, excessive audit data volume, and reduced data processing performance of the server on the database audit, and improve the efficiency of the database audit.

[0064] In some embodiments of the present disclosure, when the preset database audit condition is that the five-tuple information of the message matches the preset five-tuple information, the above-mentioned filtering of the messages in the network messages that meet the preset database audit condition based on the data features of each message in the network message to obtain the target audit message may include S11-S13:

[0065] S11. Acquire quintuple information of each message in the network message.

[0066] S12. Match the quintuple information with the preset quintuple information to obtain target quintuple information that matches the preset quintuple information.

[0067] S13. Determine the message corresponding to the target quintuple information as the target audit message.

[0068] The user terminal device can be understood as any device with processing and computing capabilities, which may include but is not limited to mobile terminals such as smart phones, laptops, personal digital assistants (PDAs), tablet computers (PADs), etc., as well as fixed electronic devices such as digital TVs and desktop computers.

[0069] Therefore, the messages of the user-end devices that do not need to be audited can be filtered and processed, and only the messages of the user-end devices that need to be audited need to be audited. This can reduce the amount of data collected by the database audit and improve the efficiency of the database audit.

[0070] In some other embodiments of the present disclosure, when the preset database audit condition is that the protocol version field in the application layer message body of the message matches the protocol version field corresponding to the preset database type, the above-mentioned filtering of the messages in the network messages that meet the preset database audit condition based on the data features of each message in the network message to obtain the target audit message may include S21-S23:

[0071] S21. For each message in the network message, obtain a protocol version field from the application layer message body of the message.

[0072] S22. Match the protocol version field with the protocol version field corresponding to the preset database type to obtain a target protocol version field that matches the protocol version field corresponding to the preset database type.

[0073] S23. Determine the message corresponding to the target protocol version field as the target audit message.

[0074] In this way, the messages with protocol version fields corresponding to database types that do not need to be audited can be filtered and processed, and database auditing only needs to be performed on the messages with protocol version fields corresponding to database types that need to be audited. This can reduce the amount of data collected by database auditing and improve the efficiency of database auditing.

[0075] In some other embodiments of the present disclosure, when the preset database audit condition is that the command field in the application layer message body of the message matches the preset operation command, the above-mentioned filtering of the messages in the network messages that meet the preset database audit condition based on the data characteristics of each message in the network message to obtain the target audit message may include S31-S33:

[0076] S31. For each message in the network message, obtain a command field from the application layer message body of the message.

[0077] S32: Match the command field with a preset operation command to obtain a target command field that matches the preset operation command.

[0078] S33. Determine the message corresponding to the target command field as the target audit message.

[0079] Therefore, the messages corresponding to the operation commands that do not need to be audited can be filtered and processed, and only the messages corresponding to the operation commands that need to be audited need to be audited. This can reduce the amount of data collected by the database audit and improve the efficiency of the database audit.

[0080] In some other embodiments of the present disclosure, when the preset database audit condition includes that the five-tuple information of the message matches the preset five-tuple information, the protocol version field in the application layer message body of the message matches the protocol version field corresponding to the preset database type, and the command field in the application layer message body of the message matches the preset operation command, the computer device can execute Figure 2 A flowchart of a database audit method is provided, such as Figure 2 As shown, the database audit method provided in this embodiment includes the following steps:

[0081] Step 210: For the network message received by the target network card for accessing the database, obtain the five-tuple information of each message in the network message.

[0082] Step 220: Match the quintuple information with the preset quintuple information to obtain target quintuple information that matches the preset quintuple information, and determine the message corresponding to the target quintuple information as the first message.

[0083] Step 230: For each first message, obtain a protocol version field from the application layer message body of the first message.

[0084] Step 240: Match the protocol version field with the protocol version field corresponding to the preset database type to obtain a target protocol version field that matches the protocol version field corresponding to the preset database type, and determine the first message corresponding to the target protocol version field as the second message.

[0085] Step 250: For each second message, obtain a command field from the application layer message body of the second message.

[0086] Step 260: Match the command field with the preset operation command to obtain a target command field that matches the preset operation command, and determine the second message corresponding to the target command field as the target audit message.

[0087] Step 270: Based on the database audit service, audit the target audit message to obtain a database audit report corresponding to the database.

[0088] In this way, the messages of user-end devices that do not need to be audited, the messages of protocol version fields corresponding to database types that do not need to be audited, and the messages corresponding to operation commands that do not need to be audited can be filtered and processed at the same time. Only the messages of user-end devices that need to be audited, the messages of protocol version fields corresponding to database types that need to be audited, and the messages corresponding to operation commands that need to be audited need to be audited. This can greatly reduce the amount of data collected by database auditing, reduce the impact of network congestion, excessive audit data volume, and decreased data processing performance of the server on database auditing, and improve the efficiency of database auditing.

[0089] In some embodiments of the present disclosure, the network messages received by the target network card for accessing the database are screened based on the data characteristics of each message in the network messages, and before obtaining the target audit message, the user can set the database audit conditions according to the actual database audit needs, such as selecting and clicking on the database audit conditions. The computer device can generate the preset database audit conditions in response to the user's setting operation on the database audit conditions.

[0090] For example, it may be a setting operation for at least one of preset five-tuple information, preset database type, and preset operation command.

[0091] In some embodiments of the present disclosure, when a user finds that the current preset database audit conditions can no longer meet the needs of an actual database audit, the user may adjust the current preset database audit conditions according to the needs of the actual database audit, such as by selecting, clicking, switching, and other operations on the database audit conditions. The computer device may generate adjusted preset database audit conditions in response to the user's adjustment operation on the preset database audit conditions.

[0092] For example, it may be an adjustment operation on at least one of preset five-tuple information, preset database type, and preset operation command.

[0093] In this way, the preset database audit conditions can meet the actual database audit needs in a timely manner, thereby improving the applicability of the database audit conditions.

[0094] Figure 3 is a flowchart of a database audit method provided by an embodiment of the present disclosure, such as Figure 3 As shown, the database audit method provided in this embodiment includes the following steps:

[0095] Step 310: For the network messages received by the target network card for accessing the database, based on the data characteristics of each message in the network message, the messages in the network message that meet the preset database audit conditions are screened to obtain the target audit message.

[0096] Step 320: Based on the database audit service, audit the target audit message to obtain a database audit report corresponding to the database.

[0097] Step 330: According to the chronological order of the generation time of the database audit reports, statistics are collected on the database audit reports corresponding to the multiple databases to generate audit logs for the multiple databases.

[0098] Step 340: In response to receiving an audit viewing instruction of a database from a user terminal device, obtain a target database identifier and a target time period requested to be viewed from the audit viewing instruction.

[0099] In the embodiment of the present disclosure, when a user wants to view the audit log of a target database within a target time period, the user can send an audit viewing instruction for the database to a computer device through a user terminal device, and the computer device can respond to receiving the audit viewing instruction for the database from the user terminal device and obtain the target database identifier and target time period requested to be viewed from the audit viewing instruction.

[0100] The database identifier can be understood as identification information that can uniquely identify a database, such as a database number, a database name, etc. There is a one-to-one correspondence between a database and a database identifier.

[0101] Step 350: Determine the target database corresponding to the target database identifier.

[0102] Step 360: Search the target audit log corresponding to the target time period from the audit log of the target database.

[0103] Step 370: Send the target audit log to the user terminal device so that the user terminal device displays the target audit log.

[0104] In the embodiment of the present disclosure, the computer device may send the target audit log to the user terminal device so that the user terminal device displays the target audit log. For example, the user terminal device may display the target audit log on a display interface.

[0105] In this way, messages that do not require database auditing can be filtered, which can greatly reduce the amount of data collected by database auditing and improve the efficiency of database auditing. In addition, database audit logs that meet user needs can be extracted and displayed according to user needs, which can improve user experience.

[0106] Figure 4 Schematic diagram of the structure of a database audit device provided by an embodiment of the present disclosure, which can be understood as the above-mentioned computer device or some functional modules in the above-mentioned computer device. Figure 4 As shown, the database auditing device 400 includes:

[0107] The screening module 410 is used to screen the network messages for accessing the database received by the target network card based on the data characteristics of each message in the network message, and obtain the target audit message;

[0108] The audit module 420 is used to audit the target audit message based on the database audit service to obtain a database audit report corresponding to the database.

[0109] Optionally, the preset database audit condition includes at least one of the following:

[0110] The five-tuple information of the message matches the preset five-tuple information, and the preset five-tuple information is the five-tuple information of the message sent by the preset audit-required user terminal device to the preset audit-required database;

[0111] The protocol version field in the application layer message body of the message matches the protocol version field corresponding to the preset database type, and the preset database type is the preset database type of the database to be audited;

[0112] The command field in the application layer message body of the message matches the preset operation command, and the preset operation command is the preset operation command that needs to be audited.

[0113] Optionally, the five-tuple information of the target audit message matches the preset five-tuple information;

[0114] and / or, the protocol version field in the application layer message body of the target audit message matches the protocol version field corresponding to the preset database type;

[0115] And / or, the command field in the application layer message body of the target audit message matches the preset operation command.

[0116] Optionally, when the preset database audit condition includes that the five-tuple information of the message matches the preset five-tuple information, the protocol version field in the application layer message body of the message matches the protocol version field corresponding to the preset database type, and the command field in the application layer message body of the message matches the preset operation command, the above-mentioned screening module includes:

[0117] The first acquisition submodule is used to obtain the five-tuple information of each message in the network message;

[0118] A first matching submodule, used for matching the quintuple information with the preset quintuple information, obtaining target quintuple information matching the preset quintuple information, and determining a message corresponding to the target quintuple information as a first message;

[0119] A second acquisition submodule is used to obtain a protocol version field from an application layer message body of the first message for each first message;

[0120] A second matching submodule, used to match the protocol version field with the protocol version field corresponding to the preset database type, obtain a target protocol version field that matches the protocol version field corresponding to the preset database type, and determine the first message corresponding to the target protocol version field as the second message;

[0121] A third acquisition submodule is used to acquire a command field from an application layer message body of the second message for each second message;

[0122] The third matching submodule is used to match the command field with the preset operation command, obtain a target command field that matches the preset operation command, and determine the second message corresponding to the target command field as the target audit message.

[0123] Optionally, the above database auditing device includes:

[0124] The first generating module is used to generate preset database audit conditions in response to a user's setting operation on the database audit conditions.

[0125] Optionally, the above database auditing device includes:

[0126] The second generating module is used to generate adjusted preset database audit conditions in response to a user's adjustment operation on the preset database audit conditions.

[0127] Optionally, the above database auditing device includes:

[0128] A statistics module is used to collect statistics on database audit reports corresponding to multiple databases in the order of the generation time of the database audit reports, and generate audit logs for multiple databases;

[0129] An acquisition module, configured to, in response to receiving an audit viewing instruction of a database from a user terminal device, acquire a target database identifier and a target time period requested to be viewed from the audit viewing instruction;

[0130] A determination module, used to determine a target database corresponding to a target database identifier;

[0131] A search module is used to search the target audit log corresponding to the target period from the audit log of the target database;

[0132] The sending module is used to send the target audit log to the user terminal device so that the user terminal device displays the target audit log.

[0133] The database auditing device provided in the embodiments of the present disclosure can implement the method of any of the above embodiments, and its execution method and beneficial effects are similar, which will not be repeated here.

[0134] The embodiments of the present disclosure also provide a computer device, which includes a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method of any of the above embodiments can be implemented, and its execution method and beneficial effects are similar and will not be repeated here.

[0135] Figure 5 is a schematic diagram of the structure of a computer device provided by an embodiment of the present disclosure, such as Figure 5 As shown, the computer device 500 may include a processor 510 and a memory 520, wherein the memory 520 stores a computer program 521, and when the computer program 521 is executed by the processor 510, the method provided by any of the above embodiments can be implemented, and its execution method and beneficial effects are similar, which will not be repeated here.

[0136] Of course, to simplify, Figure 5Only some of the components related to the present invention in the computer device 500 are shown, and components such as a bus, an input / output interface, an input device, and an output device are omitted. In addition, according to specific application conditions, the computer device 500 may also include any other appropriate components.

[0137] An embodiment of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of any of the above embodiments can be implemented. The execution method and beneficial effects are similar and will not be repeated here.

[0138] The above-mentioned computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0139] The computer program may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the disclosed embodiments, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer device, partially on the user's device, as a separate software package, partially on the user's computer device and partially on a remote computer device, or entirely on a remote computer device or server.

[0140] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0141] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0142] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A database audit method, characterized in that: include: For the network messages received by the target network card for accessing the database, based on the data characteristics of each message in the network messages, the messages in the network messages that meet the preset database audit conditions are screened to obtain the target audit message; Based on the database audit service, the target audit message is audited to obtain a database audit report corresponding to the database.

2. The method according to claim 1, characterized in that The preset database audit condition includes at least one of the following: The five-tuple information of the message matches the preset five-tuple information, and the preset five-tuple information is the five-tuple information of the message sent by the preset audit-required user terminal device to the preset audit-required database; The protocol version field in the application layer message body of the message matches the protocol version field corresponding to the preset database type, and the preset database type is the preset database type of the database to be audited; The command field in the application layer message body of the message matches the preset operation command, and the preset operation command is a preset operation command that needs to be audited.

3. The method according to claim 2, characterized in that The five-tuple information of the target audit message matches the preset five-tuple information; and / or, the protocol version field in the application layer message body of the target audit message matches the protocol version field corresponding to the preset database type; And / or, the command field in the application layer message body of the target audit message matches a preset operation command.

4. The method according to claim 2, characterized in that: When the preset database audit condition includes that the five-tuple information of the message matches the preset five-tuple information, the protocol version field in the application layer message body of the message matches the protocol version field corresponding to the preset database type, and the command field in the application layer message body of the message matches the preset operation command, the network messages that meet the preset database audit condition are screened based on the data features of each message in the network message to obtain the target audit message, including: Obtaining five-tuple information of each message in the network message; Matching the quintuple information with preset quintuple information to obtain target quintuple information matching the preset quintuple information, and determining a message corresponding to the target quintuple information as a first message; For each of the first messages, obtaining a protocol version field from an application layer message body of the first message; Matching the protocol version field with the protocol version field corresponding to the preset database type to obtain a target protocol version field that matches the protocol version field corresponding to the preset database type, and determining the first message corresponding to the target protocol version field as the second message; For each of the second messages, obtaining a command field from an application layer message body of the second message; The command field is matched with a preset operation command to obtain a target command field that matches the preset operation command, and a second message corresponding to the target command field is determined as a target audit message.

5. The method according to claim 1, characterized in that The method further comprises, for the network message received by the target network card for accessing the database, screening the messages that meet the preset database audit conditions in the network messages based on the data characteristics of each message in the network messages, and obtaining the target audit message: In response to the user's setting operation on the database audit condition, a preset database audit condition is generated.

6. The method according to claim 1, characterized in that The method further comprises: In response to a user's adjustment operation on the preset database audit condition, an adjusted preset database audit condition is generated.

7. The method according to claim 1, characterized in that After auditing the target audit message based on the database audit service and obtaining a database audit report corresponding to the database, the method further includes: According to the order of the generation time of the database audit reports, the database audit reports corresponding to the multiple databases are counted to generate audit logs of the multiple databases; In response to receiving an audit viewing instruction of a database from a user terminal device, obtaining a target database identifier and a target time period requested to be viewed from the audit viewing instruction; Determine a target database corresponding to the target database identifier; Searching the target audit log corresponding to the target period from the audit log of the target database; The target audit log is sent to the user terminal device so that the user terminal device displays the target audit log.

8. A database auditing device, characterized in that: include: A screening module, for screening network messages received by a target network card for accessing a database, based on data features of each message in the network messages, messages in the network messages that meet preset database audit conditions, to obtain target audit messages; The audit module is used to audit the target audit message based on the database audit service to obtain a database audit report corresponding to the database.

9. A computer device, characterized in that: include: A memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the database audit method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the database audit method according to any one of claims 1 to 7 is implemented.