Unlock instant, AI-driven research and patent intelligence for your innovation.

SQL detection method and system based on neural network model and Hash matching

A neural network model and detection method technology, applied in the field of SQL detection method and system based on neural network model and hash matching, to achieve the effect of accurate abnormal SQL detection effect

Pending Publication Date: 2021-06-15
GLOBAL ENERGY INTERCONNECTION RES INST CO LTD +2
View PDF0 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Therefore, in order to overcome the defect that the existing SQL statement anomaly detection method cannot guarantee high efficiency and accuracy when the amount of data is large and small at the same time, the present invention provides a SQL detection method and system based on neural network model and hash matching, which can simultaneously Efficient and accurate abnormal SQL detection effect is guaranteed in the context of data volume and small data volume

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • SQL detection method and system based on neural network model and Hash matching
  • SQL detection method and system based on neural network model and Hash matching
  • SQL detection method and system based on neural network model and Hash matching

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0032] Embodiments of the present invention provide a SQL detection method based on a neural network model and hash match, such as figure 1 As shown, including:

[0033] Step S1: Transform the acquired SQL statement into the SQL statement template, extract the feature vector with the preset feature to extract the characteristic vector, which is used to characterize the SQL template statement normally or abnormally, input the feature vector into the nerve. Training it in the network model will be used as a SQL detection model to identify whether the SQL statement is abnormal. The label can be 0 or 1, which can be used to represent normal, 1 means an abnormality, and the preset feature extraction model can be a phrase model (Bag of Words, BOW), only as an example, not limited, or For other feature extraction model, the embodiment of the present invention is illustrated as a phrase model.

[0034] The process of converting the SQL statement into a statement template, for example:

[...

Embodiment 2

[0074] Embodiments of the present invention provide a SQL detection system based on neural network model and haveh matches, such as Figure 5 As shown, including:

[0075] Model Training Module 1, for converting the acquired SQL statement into a SQL statement template, extracting a feature vector with a set of marked SQL statement template collections by preset feature, which is used to characterize normal or abnormalities of SQL template statements. Vector input to the neural network model, which will be trained, and the training good neural network model is used as the SQL detection model for identifying whether the SQL statement is abnormal; this module performs the method described in Example 1, Take it again.

[0076] Hash Table Building Module 2, used to build a hash table with a set of marking SQL statement template set, the key value in the hash table is used to characterize the SQL statement template is normal or exception; the module performs the steps in Example 1 The me...

Embodiment 3

[0080] The embodiment of the present invention provides a computer device, such as Figure 6 As shown,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, The communication bus 402 is used to implement connection communication between these components. The communication interface 403 can include a display, a keyboard (Keyboard), and optional communication interface 403 can also include a standard wired interface, a wireless interface. Memory 404 can be a high speed RAM memory (Ramdom Access Memory, volatile random access memory), or a non-Volatile Memory, such as at least one disk memory. Memory 404 may also be at least one storage device located away from the processor 401. The processor 401 can perform the SQL detection method based on the neural network model and the hash matched SQL detection. The memory 404 stores a set of program code, and the processor 401 calls the program code stored in the memory 404 for performing the SQL detection method ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an SQL detection method and system based on a neural network model and Hash matching, an obtained SQL statement is converted into an SQL statement template, feature vectors of an SQL statement template set with marks are extracted and input into the neural network model to train the neural network model, and the trained model identifies whether the SQL statement is abnormal or not; constructing a hash table with a marked SQL statement template set; obtaining an SQL statement used by a user for accessing the database, converting the SQL statement into an SQL statement template, searching a mark corresponding to the SQL statement template in the hash table, and if the search is successful, outputting a mark result; when searching fails, acquiring the feature vectors of the SQL statement templates and inputting thefeature vectors into the neural network model, when an output result is normal, updating the SQL statement templates and corresponding marks to a hash table and detecting the next SQL statement is detected, and when the SQL statements are abnormal, sending the abnormal information to a manager to give an alarm. According to the method, the efficient and accurate abnormal SQL detection effect can be ensured in the situations of large data volume and small data volume at the same time.

Description

Technical field [0001] The present invention relates to the field of abnormal detection techniques, and more particularly to a neural network model and hash matched SQL detection method and system. Background technique [0002] In recent years, the network security situation has become increasingly severe, and database security is a key issue in people's concern. Abnormal SQL execution can cause information disclosure, server crash, etc., in order to protect the server from abnormal SQL attacks, ensure that the server's stable operation, exception SQL detection becomes a popular problem that people have recently studied. Abnormal SQL detection refers to whether it should be executed by the current database for a SQL statement. [0003] At present, SQL abnormal detection is mainly divided into traditional detection methods and methods of detection based on machine learning. The traditional detection method is primarily based on the matching idea, matching a SQL statement and exist...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F21/56G06F16/22G06F16/242G06N3/08
CPCG06F21/563G06F16/2255G06F16/2433G06N3/08
Inventor 周诚李伟伟汪晨何金栋
Owner GLOBAL ENERGY INTERCONNECTION RES INST CO LTD