A file depth inspection method, device, electronic device and storage medium

By aggregating data blocks on disk sectors and performing sensitivity prediction before inspection, the problem of slow deep file inspection speed in the existing technology is solved, and the effect of fast deep inspection is achieved.

CN114218620BActive Publication Date: 2024-09-13BEIJING TIP TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111537225.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-15
Publication Date
2024-09-13
Estimated Expiration
2041-12-15

AI Technical Summary

Technical Problem

Existing deep file inspection technology needs to scan all sectors on the disk, resulting in extremely slow speed, which affects the usability and popularity of deep inspection. Especially on large-capacity disks, it takes several hours to complete the scan.

Method used

By aggregating sectors in units of data blocks, and pre-judging the sensitivity of the first 16 bytes of the data block before inspection, non-sensitive data blocks are skipped to achieve fast and in-depth inspection.

Benefits of technology

Significantly improves the speed of deep file inspection, reduces inspection time, and enhances the usability and popularity of deep inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114218620B
    Figure CN114218620B
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device and storage medium for deep file inspection. The method first reads the super block in the target file system to obtain the size of the target data block in the target file system; wherein the super block is used to represent the first data block in the target file system; then the sectors of the target disk are aggregated to obtain all the data blocks to be inspected; all the data blocks to be inspected are inspected in units of the size of the target data block, wherein before inspecting each data block to be inspected, the front-end data of the current data block to be inspected is read first, and when the front-end data includes sensitive data, the current data block to be inspected is inspected. It can be seen that the present application can greatly improve the speed of deep file inspection by aggregating sectors and performing sensitivity prediction technology on data blocks while skipping non-sensitive data blocks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software security protection, and in particular to a file depth inspection method, device, electronic equipment and storage medium. Background Art

[0002] With the popularization of computer applications, a large amount of data is stored in the computer disk in the form of electronic files. These files also include many important business secrets or state secrets. How to ensure that these data are not illegally obtained by competitors or hostile forces has become an important topic. Among them, data classification storage (important data is stored on a special computer) is an effective management method. In order to ensure that data is effectively classified and stored, electronic file data inspection is the most effective technical means.

[0003] The electronic file data inspection system is divided into two modes: regular file inspection and deep file inspection. Regular file inspection refers to checking existing files in the system by traversing all files under the file system. Regular file inspection can only check files that have not been deleted; deep file inspection checks all sectors on the disk in turn by scanning all sectors on the disk. Deep file inspection requires access to all sectors on the disk.

[0004] Currently, this technical solution is very slow because it needs to scan all sectors on the disk, especially since most disks nowadays are several TB or more than ten TB. It takes several hours to scan a disk, which greatly affects the availability and popularity of deep inspection. Summary of the invention

[0005] Based on this, the embodiments of the present application provide a file deep inspection method, device, electronic device and storage medium, which can aggregate sectors in units of data blocks, and predict whether sensitive data will exist in data blocks, thereby realizing rapid deep inspection.

[0006] In a first aspect, a method for deep file inspection is provided, the method comprising:

[0007] Reading a super block in the target file system to obtain the size of a target data block in the target file system; the super block is used to represent the first data block in the target file system;

[0008] Aggregating sectors of a target disk to obtain all data blocks to be checked, wherein the target disk includes at least a target file system;

[0009] All data blocks to be checked are checked in units of the size of the target data block, wherein before checking each data block to be checked, the front-end data of the current data block to be checked is read first, and when the front-end data includes sensitive data, the current data block to be checked is checked.

[0010] Optionally, before checking each data block to be checked, when it is found that the front-end data of the current data block to be checked does not include sensitive data, the current data block to be checked is skipped.

[0011] Optionally, the front-end data includes the first 16 bytes of data in the data block to be checked.

[0012] Optionally, the sensitive data includes text data.

[0013] In a second aspect, a file depth inspection device is provided, the device comprising:

[0014] An acquisition module is used to read a super block in a target file system to acquire the size of a target data block in the target file system; the super block is used to represent the first data block in the target file system;

[0015] An aggregation module, used for aggregating sectors of a target disk to obtain all data blocks to be checked, wherein the target disk at least includes a target file system;

[0016] The checking module is used to check all the data blocks to be checked based on the size of the target data block. Before checking each data block to be checked, the front-end data of the current data block to be checked is read first. When the front-end data includes sensitive data, the current data block to be checked is checked.

[0017] In a third aspect, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the file depth inspection method described in any one of the first aspects is implemented.

[0018] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the file depth inspection method described in any one of the first aspects is implemented.

[0019] In the technical solution provided by the embodiment of the present application, the super block in the target file system is first read to obtain the size of the target data block in the target file system; wherein the super block is used to represent the first data block in the target file system; then the sectors of the target disk are aggregated to obtain all the data blocks to be checked; all the data blocks to be checked are checked in units of the size of the target data block, wherein before checking each data block to be checked, the front-end data of the current data block to be checked is read first, and when the front-end data includes sensitive data, the current data block to be checked is checked. It can be seen that the present application can greatly improve the speed of file depth inspection by aggregating sectors and performing sensitivity prediction technology on data blocks at the same time to skip and improve non-sensitive data blocks. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.

[0021] Figure 1 A flowchart of a method for deep file inspection provided by an embodiment of the present application;

[0022] Figure 2 A block diagram of a file depth inspection device provided in an embodiment of the present application;

[0023] Figure 3 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] Currently, deep file content inspection is performed by scanning all sectors of the disk, reading the data of all sectors, and then comparing the sector data with sensitive information. This technical solution is very slow because it needs to scan all sectors on the disk, especially since most disks nowadays are several TB or more than 10 TB. It takes several hours to scan a disk, which greatly affects the availability and popularity of deep inspection.

[0026] In this application, sectors are aggregated in units of data blocks, and a technique for predicting whether sensitive data exists in the data blocks is used to achieve rapid depth inspection. To facilitate understanding of the embodiments of this application, a file depth inspection method disclosed in the embodiments of this application is first introduced in detail.

[0027] Please refer to Figure 1 , which shows a flowchart of a file depth inspection method provided by an embodiment of the present application, the method may include the following steps:

[0028] Step 101, read the super block in the target file system to obtain the size of the target data block in the target file system.

[0029] The super block is used to represent the first data block in the target file system. The super block can also represent the first certain bytes of data blocks in the target file system.

[0030] In the embodiment of the present application, before step 101, sectors are first aggregated based on the data block size of the file system being checked.

[0031] After the check is started, the super block of the file system being checked is first read to obtain the size of the super block, and then the entire disk is checked in units of the super block size.

[0032] Step 102: Aggregate the sectors of the target disk to obtain all the data blocks to be checked.

[0033] The target disk at least includes a target file system.

[0034] In an embodiment of the present application, the sectors of the target disk including the target file system are aggregated, and the aggregated sectors are divided into data blocks to be checked based on the super block size obtained in step 101. It can be considered that the size of each data block to be checked is equal to the size of the super block.

[0035] Step 103, all the data blocks to be checked are checked in units of the size of the target data block. Before checking each data block to be checked, the front-end data of the current data block to be checked is read first. When the front-end data includes sensitive data, the current data block to be checked is checked.

[0036] In an optional embodiment of the present application, before checking each data block to be checked, when it is found that the front-end data of the current data block to be checked does not include sensitive data, the current data to be checked is skipped.

[0037] Among them, in step 103, the front-end data includes the first 16 bytes of data in the data block to be checked, and the sensitive data includes text data. This is because when checking the content of the sector, the text content is checked, so before checking a data block, the first 16 bytes of data of the data block are read first. If there is non-text data in these 16 bytes, the data block is skipped, and then all the data blocks to be checked are traversed to finally complete the file depth check. Since there will be a large number of unused or non-text data blocks on the disk, this technology can greatly improve the performance of the depth check.

[0038] In an optional embodiment of the present application, when it is detected that a data block has not been checked, the sector content check is rechecked.

[0039] From the above, it can be seen that the embodiment of the present application aggregates sectors in blocks, and uses the data in the block header as a basis to determine whether sensitive data exists in the data block, and skips the check of non-sensitive data blocks to achieve fast and deep inspection of file content.

[0040] Please refer to Figure 2 , which shows a block diagram of a file depth inspection device 200 provided in an embodiment of the present application. The device 200 may include: an acquisition module 201, an aggregation module 202, and an inspection module 203.

[0041] The acquisition module 201 is used to read the super block in the target file system and obtain the size of the target data block in the target file system; the super block is used to represent the first data block in the target file system;

[0042] Aggregation module 202, used for aggregating sectors of a target disk to obtain all data blocks to be checked, the target disk at least including a target file system;

[0043] The checking module 203 is used to check all the data blocks to be checked in units of the size of the target data block. Before checking each data block to be checked, the front-end data of the current data block to be checked will be read first. When the front-end data includes sensitive data, the current data block to be checked will be checked.

[0044] For the specific definition of the file depth inspection device, please refer to the definition of the file depth inspection method above, which will not be repeated here. Each module in the above-mentioned file depth inspection device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0045] In one embodiment, an electronic device is provided. The electronic device may be a computer, and its internal structure diagram may be as follows: Figure 3 As shown. The electronic device includes a processor, a memory and a network interface connected via a system bus. The processor of the device is used to provide computing and control capabilities. The memory of the device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used for file depth inspection data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a file depth inspection method is implemented.

[0046] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0047] In one embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned file depth inspection method are implemented.

[0048] The computer-readable storage medium provided in this embodiment has similar implementation principles and technical effects to those of the above method embodiments, and will not be described in detail here.

[0049] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in M ​​forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SyMchliMk) DRAM (SLDRAM), memory bus (RaMbus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0050] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0051] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent application shall be subject to the attached claims.

Claims

1. A file depth inspection method, characterized in that: The method comprises: Reading a super block in the target file system to obtain the size of a target data block in the target file system; the super block is used to represent the first data block in the target file system; Aggregating sectors of a target disk to obtain all data blocks to be checked, wherein the target disk includes at least a target file system; All data blocks to be checked are checked in units of the size of the target data block, wherein before checking each data block to be checked, the front-end data of the current data block to be checked is read first, and when the front-end data includes sensitive data, the current data block to be checked is checked.

2. The method according to claim 1, characterized in that Before checking each data block to be checked, if the front-end data of the current data block to be checked is read and does not include sensitive data, the current data to be checked is skipped.

3. The method according to claim 1 or 2, characterized in that: The front-end data includes the first 16 bytes of data in the data block to be checked.

4. The method according to claim 1 or 2, characterized in that: The sensitive data includes text data.

5. A file depth inspection device, characterized in that: The device comprises: An acquisition module is used to read a super block in a target file system to acquire the size of a target data block in the target file system; the super block is used to represent the first data block in the target file system; An aggregation module, used for aggregating sectors of a target disk to obtain all data blocks to be checked, wherein the target disk at least includes a target file system; The checking module is used to check all the data blocks to be checked based on the size of the target data block. Before checking each data block to be checked, the front-end data of the current data block to be checked is read first. When the front-end data includes sensitive data, the current data block to be checked is checked.

6. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the file depth inspection method according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the file depth inspection method as described in any one of claims 1 to 4 is implemented.