Data management method and device, electronic equipment and readable storage medium
By using preset behavior recognition units and security rules databases and behavior recognition models in edge devices, identifying and rejecting suspicious data operation instructions, the data security risks caused by the lack of security measures in edge gateways are solved, and the security guarantee of database data is achieved .
Patent Information
- Application Number
- CN202410937255.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-15
AI Technical Summary
The lack of security measures at the edge gateways leads to high security risks in the data transmitted through them.
The preset behavior recognition unit is introduced in the edge device. By comparing with the security rule base and the behavior recognition model, the security risk status of the data operation instructions is determined, and the instructions are rejected when there are suspicious behaviors are present, the subsequent operation instructions are stopped, and the training is generated. Sample update model parameters to ensure data security.
Effectively reduce the data security risks transmitted through edge devices, ensure the security of data in the database, and prevent potential attacks and abnormal behaviors.
Smart Images

Figure CN118965419A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and in particular to a data management method, device, electronic device and readable storage medium. Background Art
[0002] As a new production factor, data has been rapidly integrated into various social links such as production, distribution, circulation, consumption and services, profoundly changing the mode of production and social governance. Data centers have the ability to centrally store, manage, process and distribute large amounts of data, and are an important information infrastructure in the digital age.
[0003] The edge gateway is a device that connects terminal devices and cloud servers and is an important part of the data center. The edge gateway is responsible for collecting, processing and storing data from terminal devices, and sending processed and packaged data to the cloud server. Through the connection method, the edge gateway can achieve real-time monitoring and control of terminal devices, real-time analysis and decision-making of data, and communication coordination between terminal devices. However, most edge gateways currently lack corresponding security measures. Therefore, data passing through the edge gateway will inevitably have a higher security risk. Summary of the invention
[0004] The main purpose of this application is to provide a data management method, device, electronic device and readable storage medium, aiming to solve the technical problem that the current edge gateway lacks security measures and the data passing through the edge gateway has a high security risk.
[0005] To achieve the above object, the present application provides a data management method, which is applied to an edge device, wherein the edge device is communicatively connected to a database, and the data management method includes:
[0006] receiving a data operation instruction for operating the database;
[0007] Determining the security risk status of the data operation instruction based on a preset behavior recognition unit;
[0008] When the security risk status indicates that there is suspicious behavior, the data operation instruction is rejected, and subsequent operation instructions sent by the sender of the data operation instruction are stopped from being received.
[0009] Optionally, the preset behavior recognition unit includes a security rule library, and the step of determining the security risk status of the data operation instruction based on the preset behavior recognition unit includes:
[0010] Compare and match the data operation instruction with the risk instruction feature information in the rule base;
[0011] If the data operation instruction matches the risk instruction characteristic information, the security risk status is determined to be the presence of suspicious behavior.
[0012] Optionally, the preset behavior recognition unit further includes a behavior recognition model. After the step of comparing and matching the data operation instruction with the risk instruction feature information in the rule base, the method includes:
[0013] If the data operation instruction does not match the risk instruction feature information, the data operation instruction is input into a behavior recognition model to obtain the risk level of the data operation instruction;
[0014] When the risk level is greater than or equal to a preset threshold, determining that the security risk state is suspicious behavior;
[0015] When the risk level is less than the preset threshold, the security risk status is determined as no suspicious behavior exists.
[0016] Optionally, the data management method further includes:
[0017] Generate training samples in a training sample set;
[0018] For any training sample in the training sample set, inputting the sample feature of the training sample into the behavior recognition model to obtain the recognition result of the training sample;
[0019] The difference between the recognition result and the sample label of the training sample is determined, and the parameters of the behavior recognition model are updated based on the difference.
[0020] Optionally, the step of generating training samples in the training sample set includes at least one of the following:
[0021] Generate training samples in the training sample set according to the access history records of the database; or
[0022] When the security risk status of the data operation instruction is that there is a suspicious behavior, the data operation instruction is output, and a training sample in the training sample set is obtained after the data operation instruction is marked.
[0023] Optionally, after the step of determining the security risk status of the data operation instruction based on a preset behavior recognition unit, the method includes:
[0024] When the security risk status is that there is no suspicious behavior, sending the data operation instruction to the database so that the database executes the data operation instruction;
[0025] receiving a feedback result of the database executing the data operation instruction;
[0026] The feedback result is sent to the sender of the data operation instruction.
[0027] Optionally, after the step of sending the data operation instruction to the database, the method includes:
[0028] Recording the data operation steps performed by the database based on the data operation instruction and the operation results obtained by each operation step;
[0029] Metadata is constructed based on each data operation step and the operation result obtained by each operation step, and the metadata is saved.
[0030] In addition, to achieve the above purpose, the present application also provides a data management device, which is applied to an edge device, wherein the edge device is communicatively connected to a database, and the data management device includes:
[0031] A receiving module, used for receiving a data operation instruction for operating the database;
[0032] A determination module, which determines the security risk status of the data operation instruction based on a preset behavior recognition unit;
[0033] The rejection module rejects the data operation instruction when the security risk status indicates that there is suspicious behavior, and stops receiving subsequent operation instructions sent by the sender of the data operation instruction.
[0034] In addition, to achieve the above-mentioned purpose, the present application also provides an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the computer program is executed by the processor, the data management method as described above is implemented.
[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the data management method as described above is implemented.
[0036] The embodiments of the present application provide a data management method, device, electronic device and readable storage medium. In the embodiments of the present application, the edge device receives a data operation instruction for operating the database; determines the security risk status of the data operation instruction based on a preset behavior recognition unit; and, if the security risk status indicates that there is suspicious behavior, rejects the data operation instruction, and stops receiving subsequent operation instructions sent by the sender of the data operation instruction. That is, in the present application, for instructions involving operations on data in a data bureau, the edge device will not directly send them to the database, but will first judge the security of the data operation instruction, that is, to determine whether the data operation instruction has a possible behavior, and if it is determined that there is suspicious behavior, the data operation instruction can be rejected, and it stops receiving subsequent operation instructions, reducing the security risk of the data passing through the edge device, thereby ensuring the security of the data in the database. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a structural diagram of an electronic device of a hardware operating environment involved in an embodiment of the present application;
[0038] Figure 2 This is a flow chart of the first embodiment of the data management method of this application;
[0039] Figure 3 This is a flow chart of the second embodiment of the data management method of this application;
[0040] Figure 4 This is a flow chart of the third embodiment of the data management method of this application;
[0041] Figure 5 A schematic diagram of the framework of the data management method in the data management method of this application;
[0042] Figure 6 This is a schematic diagram of the overall process of the data management method for this application;
[0043] Figure 7 This is a time series diagram for manually collected data;
[0044] Figure 8 A timing diagram for automatically collecting data in the data management method of this application;
[0045] Fig. 9 This is a schematic diagram of the device structure involved in the data management method of this application.
[0046] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0048] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of an electronic device of the hardware operating environment involved in the embodiment of the present application. The electronic device may be an edge device, such as a server, a computer, etc.
[0049] like Figure 1 As shown, the electronic device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Disp l ay), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fi de l ity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volume ile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0050] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0051] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module and a computer program.
[0052] exist Figure 1 In the electronic device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the electronic device of the present application can be set in the electronic device, and the electronic device calls the computer program stored in the memory 1005 through the processor 1001 and performs the following operations:
[0053] The edge device is communicatively connected with a database;
[0054] receiving a data operation instruction for operating the database;
[0055] Determining the security risk status of the data operation instruction based on a preset behavior recognition unit;
[0056] When the security risk status indicates that there is suspicious behavior, the data operation instruction is rejected, and subsequent operation instructions sent by the sender of the data operation instruction are stopped from being received.
[0057] Further, the processor 1001 may call the computer program stored in the memory 1005 and perform the following operations:
[0058] The preset behavior recognition unit includes a security rule library, and the step of determining the security risk status of the data operation instruction based on the preset behavior recognition unit includes:
[0059] Compare and match the data operation instruction with the risk instruction feature information in the rule base;
[0060] If the data operation instruction matches the risk instruction characteristic information, the security risk status is determined to be the presence of suspicious behavior.
[0061] Further, the processor 1001 may call the computer program stored in the memory 1005 and perform the following operations:
[0062] The preset behavior recognition unit also includes a behavior recognition model. After the step of comparing and matching the data operation instruction with the risk instruction feature information in the rule base, the method includes:
[0063] If the data operation instruction does not match the risk instruction feature information, the data operation instruction is input into a behavior recognition model to obtain the risk level of the data operation instruction;
[0064] When the risk level is greater than or equal to a preset threshold, determining that the security risk state is suspicious behavior;
[0065] When the risk level is less than the preset threshold, the security risk status is determined as no suspicious behavior exists.
[0066] Further, the processor 1001 may call the computer program stored in the memory 1005 and perform the following operations:
[0067] The data management method further comprises:
[0068] Generate training samples in a training sample set;
[0069] For any training sample in the training sample set, inputting the sample feature of the training sample into the behavior recognition model to obtain the recognition result of the training sample;
[0070] The difference between the recognition result and the sample label of the training sample is determined, and the parameters of the behavior recognition model are updated based on the difference.
[0071] Further, the processor 1001 may call the computer program stored in the memory 1005 and perform the following operations:
[0072] The step of generating training samples in the training sample set includes at least one of the following:
[0073] Generate training samples in the training sample set according to the access history records of the database; or
[0074] When the security risk status of the data operation instruction is that there is a suspicious behavior, the data operation instruction is output, and a training sample in the training sample set is obtained after the data operation instruction is marked.
[0075] Further, the processor 1001 may call the computer program stored in the memory 1005 and perform the following operations:
[0076] After the step of determining the security risk status of the data operation instruction based on the preset behavior recognition unit, the method includes:
[0077] When the security risk status is that there is no suspicious behavior, sending the data operation instruction to the database so that the database executes the data operation instruction;
[0078] receiving a feedback result of the database executing the data operation instruction;
[0079] The feedback result is sent to the sender of the data operation instruction.
[0080] Further, the processor 1001 may call the computer program stored in the memory 1005 and perform the following operations:
[0081] After the step of sending the data operation instruction to the database, the method includes:
[0082] Recording the data operation steps performed by the database based on the data operation instruction and the operation results obtained by each operation step;
[0083] Metadata is constructed based on each data operation step and the operation result obtained by each operation step, and the metadata is saved.
[0084] The present application embodiment provides a data management method, referring to Figure 2 , Figure 2 This is a flowchart of the first embodiment of the data management method of this application.
[0085] In this embodiment, the data management method can be applied to an edge device, the edge device is communicatively connected to a database, and the data management method includes the following steps:
[0086] Step S10, receiving a data operation instruction for operating the database;
[0087] It should be noted that, in this embodiment, the data management method can be applied to edge devices, such as gateway devices, edge servers, routers, switches, and edge computing devices. The edge device can be connected to the database. The data stored in the database can be data collected by the edge device from the terminal device, wherein the terminal device can be a sensor, an actuator, a wearable device, and other smart devices. It should be noted that the data stored in the database includes but is not limited to the collection results of the edge device. In this embodiment, the edge device is also used to manage the database, for example, to limit access to and operations on the data in the database, etc., to ensure the security of the data in the database.
[0088] Exemplarily, the edge device will also be connected to the application system, such as the edge device can be connected to the application system through ODBC (Open Database Connectivity) / JDBC (Java Database Connectivity) and other methods. Among them, the application system can be a web interactive interface or a dedicated software client. Users can operate on the application system to generate data operation instructions for operating the database. However, it is worth noting that the data operation instructions are not sent directly to the database. Usually, the data operation instructions are first sent to the edge device, and the edge device then identifies the security of the data operation instructions. Among them, the data operation instructions can be SQL (Structured Query Language) commands. Accordingly, the data operation instructions can realize data definition: create, modify and delete database structures, such as tables, views, indexes, etc.; data manipulation: insert, update, delete and query data in the database; data control: manage the permissions and security of database users; transaction management: control database transactions to ensure data consistency and integrity; database management: perform database-level operations, such as create database, backup and restore; data query: perform complex data retrieval and aggregation operations; data constraints: define data integrity rules, such as primary keys, foreign keys, uniqueness, etc., which are not repeated here.
[0089] Step S20, determining the security risk status of the data operation instruction based on a preset behavior recognition unit;
[0090] Exemplarily, an identification unit may be built into the edge device, and the identification unit may include a pre-built security rule library in which unsafe SQL feature information may be set, and the security risk status of the data operation instruction may be determined by the unsafe SQL feature information, wherein the security risk status may be divided into the presence of suspicious behavior and the absence of safe behavior. If the data operation instruction satisfies (or matches) the unsafe SQL feature information, it may be determined that the security risk status of the data operation instruction is the presence of suspicious behavior, and vice versa, if there is no match, it may be determined that the data operation instruction does not have safe behavior.
[0091] Step S30: when the security risk status indicates that there is suspicious behavior, reject the data operation instruction, and stop receiving subsequent operation instructions sent by the sender of the data operation instruction.
[0092] Exemplarily, when the security risk status is that there is suspicious behavior, the edge device may reject the data operation instruction, for example, refuse to send the data operation instruction to the database. To further ensure the security of the data in the database, the subsequent operation instructions sent by the sender of the data operation instruction may be stopped. It should be noted that in addition to rejecting the data operation instruction and stopping receiving subsequent operation instructions. It is also possible to generate an alarm message or an alarm log and send it to the relevant maintenance system to notify the operation and maintenance personnel that the current database may have security risks.
[0093] In an embodiment of the present application, the edge device receives a data operation instruction for operating the database; determines the security risk status of the data operation instruction based on a preset behavior identification unit; and, if the security risk status indicates that there is suspicious behavior, rejects the data operation instruction, and stops receiving subsequent operation instructions sent by the sender of the data operation instruction. That is, in the present application, for instructions involving operations on data in the data bureau, the edge device will not directly send them to the database, but will first judge the security of the data operation instruction, that is, to determine whether the data operation instruction has a possible behavior, and if it is determined that there is suspicious behavior, the data operation instruction can be rejected, and it stops receiving subsequent operation instructions, reducing the security risk of the data passing through the edge device, thereby ensuring the security of the data in the database.
[0094] In a feasible implementation manner, the preset behavior recognition unit includes a security rule library, and the step of determining the security risk status of the data operation instruction based on the preset behavior recognition unit includes:
[0095] Step S211, comparing and matching the data operation instruction with the risk instruction feature information in the rule base;
[0096] Step S212: If the data operation instruction matches the risk instruction characteristic information, it is determined that the security risk status is that there is suspicious behavior.
[0097] Exemplarily, the preset behavior identification unit may include a security rule library, which may contain unsafe SQL feature information set through expert experience. For example, unsafe SQL feature information may be injection attack features including: single quotes ('), double quotes ("), semicolons (;), and other components used to close SQL statements, as well as comment symbols (–, / ** / ), etc. It may also be a denial of service attack feature including large joint queries, recursive queries, etc. It may also be a logical vulnerability feature, including SQL statements that exploit application logic defects, such as bypassing authentication, permission checks, etc. Here, it will not be repeated. If it is determined that the data operation instruction matches the risk instruction feature information (that is, the data operation instruction contains the same features as the risk instruction feature information), then the security risk status can be determined as the presence of suspicious behavior. Conversely, if there is a mismatch, the security risk status can be determined as the absence of suspicious behavior, and the data operation instruction can be further subjected to a security check.
[0098] In a feasible implementation manner, the preset behavior recognition unit further includes a behavior recognition model. After the step of comparing and matching the data operation instruction with the risk instruction feature information in the rule base, the method includes:
[0099] Step S221, if the data operation instruction does not match the risk instruction feature information, input the data operation instruction into a behavior recognition model to obtain the risk level of the data operation instruction;
[0100] Step S222, when the risk level is greater than or equal to a preset threshold, determining that the security risk state is that there is a suspicious behavior;
[0101] Step S223: When the risk level is less than the preset threshold, determining that the security risk status is that there is no suspicious behavior.
[0102] Exemplarily, the preset behavior recognition unit may also include a behavior recognition model. Accordingly, after comparing and matching the data operation instruction with the risk instruction feature information in the rule base, if the data operation instruction does not match, its security may be further checked. For example, the data operation instruction is input into the behavior recognition model, and the risk level of the data operation instruction is identified by the recognition model. The risk level may be the probability that the data operation instruction contains attack behavior. Accordingly, if the risk level is greater than or equal to the preset threshold, the security risk status may be determined as the presence of suspicious behavior, wherein the preset threshold may be set by the technician according to the actual security protection requirements, and will not be repeated here. Conversely, when the risk level is less than the preset threshold, the security risk status is determined as the absence of suspicious behavior.
[0103] It should also be noted that the above-mentioned behavior recognition model can be a traditional decision tree or random forest. It can also be an artificial neural network or a convolutional neural network model. Among them, the behavior recognition model is pre-trained using training samples to enable it to have the ability to recognize suspicious behaviors. It can be understood that in this embodiment, suspicious behaviors can be identified through the security rule base and the behavior recognition model, thereby ensuring the security of the data.
[0104] Reference Figure 3 , is a second embodiment of the present application proposed based on the first embodiment of the data management method of the present application, and the parts in this embodiment that are the same as the above embodiment can refer to the above content and will not be repeated here. The method also includes:
[0105] Step A10, generating training samples in a training sample set;
[0106] Step A20, for any training sample in the training sample set, inputting the sample feature of the training sample into the behavior recognition model to obtain the recognition result of the training sample;
[0107] Step A30, determining the difference between the recognition result and the sample label of the training sample, and updating the parameters of the behavior recognition model based on the difference.
[0108] Exemplarily, in this embodiment, training samples for behavior recognition model training will also be generated. For example, training samples in the corresponding training sample set can be generated through historical access records of the database. After marking the historical data operation instructions in the historical access record (suspicious or not suspicious), the training sample can be obtained. Since the training process of each training sample is the same, for any training sample in the training sample set, the sample features of the training sample are input into the behavior recognition model to obtain the recognition result. It should be noted that the preset threshold used to determine whether there is suspicious behavior in the training stage can be set in the output layer of the behavior recognition model. Correspondingly, the recognition result of the behavior recognition model in the training stage can be the presence of suspicious behavior or the absence of suspicious behavior. Then determine the difference between the recognition result and the sample label of the training sample, that is, the model loss of the recognition model, and update the model parameters through the model loss. The specific update method can be determined according to the model type of the behavior recognition model, which will not be repeated here.
[0109] In a feasible implementation manner, the step of generating training samples in the training sample set includes at least one of the following:
[0110] Step A11, generating training samples in the training sample set according to the access history records of the database; or
[0111] Step A12: when the security risk status of the data operation instruction is that there is a suspicious behavior, output the data operation instruction, and obtain a training sample in the training sample set after the data operation instruction is marked.
[0112] Exemplarily, there are multiple sources for generating training samples in the training sample set. For example, before the implementation of the data management method of the present application, the training samples in the training sample set can be generated according to the access history records of the database for training the behavior model. For example, the historical data operation instructions in the historical access records can be marked (the marking content can be suspicious and non-suspicious) to obtain training samples. Among them, for any historical data operation instruction, it may include the client IP address, client host name, client tool name, database type, database user name, operating system user name, operation type, asset IP address, etc. Among them, the client can be located in the application system, can interact with the user, and is the sender of the data operation instruction. In addition, the data operation instruction determined to have suspicious behavior can be used as a training sample. For example, in order to ensure the accuracy of the training sample, the data operation instruction and the identification result of the data operation instruction being determined as having suspicious behavior can be sent to the relevant operation and maintenance personnel, and the operation and maintenance personnel further judge the data operation instruction and mark the data operation instruction. The same marking result can be suspicious and non-suspicious. After the data operation instruction is marked, the training sample in the training sample set can be obtained.
[0113] Reference Figure 4 , based on the first embodiment and the second embodiment of the data management method of the present application, the third embodiment of the present application is proposed. The parts in this embodiment that are the same as the above embodiments can refer to the above content and will not be repeated here. After the step of determining the security risk status of the data operation instruction based on the preset behavior recognition unit, the method includes:
[0114] Step S41, when the security risk status is that there is no suspicious behavior, sending the data operation instruction to the database so that the database executes the data operation instruction;
[0115] Step S42, receiving a feedback result of the database executing the data operation instruction;
[0116] Step S43: Send the feedback result to the sender of the data operation instruction.
[0117] Exemplarily, when the security risk status is that there is no suspicious behavior, the edge device can send a data operation instruction to the database so that the database executes the data operation instruction, such as data query, data addition, data modification, data deletion, etc. The edge device receives the feedback result of the database executing the data operation instruction. The feedback result can be the result of the data query, or the result of whether the data addition, modification or deletion is successful. The edge device then sends the feedback result to the sender of the data operation instruction, such as the above-mentioned application system.
[0118] In a feasible implementation manner, after the step of sending the data operation instruction to the database, the method includes:
[0119] Step S44, recording the data operation steps executed by the database based on the data operation instruction and the operation results obtained by each operation step;
[0120] Step S45: construct metadata based on each data operation step and each operation result obtained in the operation step, and save the metadata.
[0121] Exemplarily, the gateway device can record the data operation steps performed by the database based on the data operation instructions, and the operation results obtained by each operation step. At the same time, metadata is constructed according to each data operation step and the operation results obtained by each operation step, and the metadata is saved to the operation and maintenance (or monitoring) system. Thereby, automatic collection of metadata is realized.
[0122] Reference Figure 5, which is a schematic diagram of the framework of the data management method in this application. An edge data acquisition device A can be built into the edge device. It mainly includes: a data acquisition module A1, which is used to read SQL command information, obtain database-related operations, and realize automatic forwarding of database W operation information; a security audit module A2, which is used to perform security audits on SQL commands according to the security rule library A2a, and use the behavior model A2b to warn of unfamiliar audit records; a metadata management module A3, which is a system for storing, classifying, grading, and analyzing the metadata obtained by parsing the database W operation-related traffic information.
[0123] Combination Figure 2 and Figure 6 As shown, the above data management method is explained:
[0124] Step 1: Connect the data acquisition module A1 of device A to the application system E through ODBC / JDBC or other methods.
[0125] Step 2: Connect the security audit module A2 of device A to the database W to generate a behavior model A2b.
[0126] Step 3: Configure the startup parameters of the behavior model according to the actual usage scenario and complete the initial learning of the behavior model.
[0127] In step 3, the parameters include:
[0128] P1: IP address of application system E;
[0129] P2: Database access history (including client IP address, client host name, client tool name, database type, database user name, operating system user name, operation type, asset IP address);
[0130] P3: The deadline for the last learning of the behavior model;
[0131] P4-Pn: other parameters necessary for behavior model learning. (It should be noted that steps 1 to 3 are the preparation stage, and steps 4 to 6 are the application stage).
[0132] Step 4: Start device A normally, receive the operation command (data operation instruction) issued by the application system, detect the statement, generate an audit record, execute the database operation request, and update the behavior model parameters.
[0133] In step 4, the audit records include: access logs and alarm logs.
[0134] The contents of the access log include: SQL message, command execution time, execution result set, client tool information, client IP, client host name, server port, database user name, execution status, and database type.
[0135] The contents of the alarm log include: SQL message, security rule type, client tool information, client IP, client host name, database user name, and database type.
[0136] The step 4 specifically includes the following steps:
[0137] Step 4.1: Identify whether the SQL statement of the operation command contains suspicious behavior based on the unsafe SQL feature information in the security rule library A2a. If so, stop receiving subsequent operation commands issued by the application system E and proceed to step 4.3; if not, proceed to the next step.
[0138] Step 4.2, behavior model A2b determines whether the operation command is suspicious based on the command information (user name, time, statement, etc.), if so, proceed to the next step; if not, proceed to step 4.4-step 4.9.
[0139] Step 4.3: The security audit module A2 updates the parameters of the behavior model A2b, generates and stores the alarm log, and sends it to the metadata management module A3.
[0140] Step 4.4: The security audit module A2 forwards the operation command to the database W.
[0141] Step 4.5: After executing the operation, database W returns the execution result to security audit module A2.
[0142] Step 4.6: The security audit module updates the parameters of the behavior model A2b, generates and stores access logs based on the execution results, and sends them to the metadata management module A3.
[0143] Step 4.7: The security audit module A2 forwards the execution result to the data acquisition module A1.
[0144] Step 4.8: Data acquisition module A1 forwards the execution result to application system E.
[0145] Step 4.9, the security audit module A2 collects the traffic information related to the current operation of the database W (including the addition, deletion, modification and query of the library instance, table, field, data, view, stored procedure, etc.), and sends it to the metadata management module A3, where T is the period of sending the traffic information to the metadata management module A3 each time. Take the following database as an example for explanation:
[0146] Table V of database W stores information about industrial and commercial enterprises in a certain region. As shown in Table 1 below, in the initial state, Table V stores "Enterprise Name", "Registered Address", "Date of Establishment", "Enterprise Legal Person", "Registered Capital", "Staff Size", "Contact Information", and "English Name", totaling 8 fields and m pieces of information.
[0147]
[0148] Table 1
[0149] Application system E sends an operation command, and the database executes the command and returns the result within time period T. The operations performed by the database are as follows:
[0150] At time t1, add the field "Business Scope" to table V;
[0151] At time t2, the relevant information of a newly registered company a is entered into Table V;
[0152] At time t3, delete the relevant information of the deregistered companies b, c, and d in Table V;
[0153] At time t4, change the field name "Contact Information" in Table V to "Contact Method";
[0154] At time t5, query all field information corresponding to company e in table V.
[0155] Step 5, metadata management module A3 arranges the database operation information by time and analyzes it, and summarizes the final metadata as {"Company Name", "Registered Address", "Date of Establishment", "Corporate Legal Person", "Registered Capital", "Staff Size", "Contact Information", "English Name", "Business Scope"}, a total of 9 fields, m-2 pieces of information, and stores them.
[0156] Step 6: The metadata management module A3 processes the audit records and metadata information in a formulaic and logical manner to form report data, which is then sent to the operation monitoring system M.
[0157] In addition, refer to Figure 7 and Figure 8 As shown in the comparison, Figure 8 The device A in the figure is the abbreviation of the edge data collection device A, which corresponds to the edge device or the data management device built into the edge device. Compared with the existing manual collection method, the present invention can accurately and timely collect metadata information of the database in the database and send it to the operation detection system M, thereby realizing automatic collection of metadata and real-time monitoring of operation dynamics while ensuring database security.
[0158] In addition, refer to Fig. 9The present invention also provides a data management device, which is applied to an edge device, wherein the edge device is communicatively connected to a database, and the data management device comprises:
[0159] A receiving module 10, configured to receive a data operation instruction for operating the database;
[0160] A determination module 20, which determines the security risk status of the data operation instruction based on a preset behavior recognition unit;
[0161] The rejection module 30 rejects the data operation instruction when the security risk status indicates that there is a suspicious behavior, and stops receiving subsequent operation instructions sent by the sender of the data operation instruction.
[0162] The data management device provided by the present invention adopts the data management method in the above embodiment to solve the technical problem that the current edge gateway lacks security measures and the data passing through the edge gateway has a high security risk. Compared with the prior art, the beneficial effects of the data management device provided by the embodiment of the present invention are the same as the beneficial effects of the screen projection method provided by the above embodiment, and the other technical features in the data management device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0163] In addition, an embodiment of the present application further proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data management method described above.
[0164] The specific implementation of the computer program running on the electronic device of the present application is basically the same as the various embodiments of the above-mentioned data management method, and will not be repeated here.
[0165] In addition, an embodiment of the present application further proposes a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data management method described above are implemented.
[0166] The specific implementation of the computer program in the storage medium of the present application is basically the same as the various embodiments of the above-mentioned data management method, and will not be repeated here.
[0167] In addition, an embodiment of the present application also proposes a computer program product, including a computer program, which implements the steps of the data management method described above when executed by a processor.
[0168] The specific implementation methods of the computer program product of the present application are basically the same as the above-mentioned data management method embodiments, and will not be repeated here.
[0169] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system 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 system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0170] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0171] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0172] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A data management method, characterized in that: Applied to an edge device, the edge device is communicatively connected to a database, and the data management method includes: receiving a data operation instruction for operating the database; Determining the security risk status of the data operation instruction based on a preset behavior recognition unit; When the security risk status indicates that there is suspicious behavior, the data operation instruction is rejected, and subsequent operation instructions sent by the sender of the data operation instruction are stopped from being received.
2. The data management method according to claim 1, characterized in that: The preset behavior recognition unit includes a security rule library, and the step of determining the security risk status of the data operation instruction based on the preset behavior recognition unit includes: Compare and match the data operation instruction with the risk instruction feature information in the rule base; If the data operation instruction matches the risk instruction characteristic information, the security risk status is determined to be the presence of suspicious behavior.
3. The data management method according to claim 2, characterized in that: The preset behavior recognition unit also includes a behavior recognition model. After the step of comparing and matching the data operation instruction with the risk instruction feature information in the rule base, the method includes: If the data operation instruction does not match the risk instruction feature information, the data operation instruction is input into a behavior recognition model to obtain the risk level of the data operation instruction; When the risk level is greater than or equal to a preset threshold, determining that the security risk state is suspicious behavior; When the risk level is less than the preset threshold, the security risk status is determined as no suspicious behavior exists.
4. The data management method according to claim 3, characterized in that: The data management method further comprises: Generate training samples in a training sample set; For any training sample in the training sample set, inputting the sample feature of the training sample into the behavior recognition model to obtain the recognition result of the training sample; The difference between the recognition result and the sample label of the training sample is determined, and the parameters of the behavior recognition model are updated based on the difference.
5. The data management method according to claim 4, characterized in that: The step of generating training samples in the training sample set includes at least one of the following: Generating training samples in the training sample set according to the access history records of the database; or When the security risk status of the data operation instruction is that there is a suspicious behavior, the data operation instruction is output, and a training sample in the training sample set is obtained after the data operation instruction is marked.
6. The data management method according to claim 1, characterized in that: After the step of determining the security risk status of the data operation instruction based on the preset behavior recognition unit, the method includes: When the security risk status is that there is no suspicious behavior, sending the data operation instruction to the database so that the database executes the data operation instruction; receiving a feedback result of the database executing the data operation instruction; The feedback result is sent to the sender of the data operation instruction.
7. The data management method according to claim 6, characterized in that: After the step of sending the data operation instruction to the database, the method includes: Recording the data operation steps performed by the database based on the data operation instruction and the operation results obtained by each operation step; Metadata is constructed based on each data operation step and the operation result obtained by each operation step, and the metadata is saved.
8. A data management device, characterized in that: Applied to an edge device, the edge device is connected to a database for communication, and the data management device comprises: A receiving module, used for receiving a data operation instruction for operating the database; A determination module, which determines the security risk status of the data operation instruction based on a preset behavior recognition unit; The rejection module rejects the data operation instruction when the security risk status indicates that there is suspicious behavior, and stops receiving subsequent operation instructions sent by the sender of the data operation instruction.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the data management method according to any one of claims 1 to 7 when executed by the processor.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data management method according to any one of claims 1 to 7 is implemented.
