Method and device for detecting change of file system and corresponding electronic device

A file system and detection method technology, which is applied in the fields of electronic equipment, detection devices, and detection methods for file system changes, can solve the problems of file processing errors, inappropriate system platforms, inefficient thread monitoring models, etc., and achieve the effect of improving performance.

Active Publication Date: 2015-03-18
BANMA ZHIXING NETWORK HONGKONG CO LTD
View PDF4 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, because the scheme uses a certain periodic frequency to perform the collection of file information, the changes that occur during the polling interval may be ignored, which will lead to errors in file processing
[0003] The Linux kernel provides a file system change notification mechanism called Inotify. On the Andorid system, there is a system kernel monitoring implementation based on Inotify, which can detect file changes in real time. However, this imp

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
  • Method and device for detecting change of file system and corresponding electronic device
  • Method and device for detecting change of file system and corresponding electronic device
  • Method and device for detecting change of file system and corresponding electronic device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0071] Such as figure 1 As shown, the detection method of the file system change in this embodiment includes:

[0072] Step 110, based on the file system change notification mechanism of the current operating system kernel, listen to the notification sent by the kernel when monitoring the file operation event on the monitoring instance;

[0073] Take inotify, the file system change notification mechanism provided by the Linux2.6 kernel, as an example. The kernel monitors file operation events (referred to as "events") in units of inotify instances created by the kernel. The events to be monitored by the inotify instance can be added by adding Watch object to set, including the file to be monitored and the type of operation on the file, such as "create file", "write file", "delete file", "modify file timestamp", "rename" and so on. When the kernel monitors that an event occurs, it will encapsulate the file operation information of the event into the inotify_event structure and...

Embodiment 2

[0123] Compared with the first embodiment, this embodiment does not consider the filtering process of the event structure, and the detection method of the file system change is as follows: image 3 shown, including:

[0124] Step 210, based on the file system change notification mechanism of the current operating system kernel, listen to the notification sent by the kernel when monitoring the file operation event on the monitoring instance;

[0125] This step is the same as step 110;

[0126] Step 220, after listening to the notification from the kernel, read the first event structure cached by the kernel, and the file operation information of the file operation event is encapsulated in the first event structure;

[0127] This step is the same as step 120;

[0128] Step 230, according to the type of the current operating system, analyze the first event structure accordingly, and repackage the file operation information obtained by the analysis into a unified second event str...

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

Disclosed are a method and a device for detecting change of a file system and a corresponding electronic device. The method for detecting the change of the file system includes: intercepting a notification sent by an inner core of a current operation system when the inner core monitors a file operation event on a monitoring living example based on a file system change notification mechanism of the inner core of the current operation system; after intercepting the notification sent by the inner core, reading a first event structure cached by the inner core, and packing file operation information of the file operation event in the first event structure; filtering event structures to be selected according to configured filter conditions for the file operation information, and reporting the event structures to be selected, which conform to the filter conditions. The device for detecting the change of the file system comprises an interception module, a reading module and a filter module. The corresponding electronic device comprises the device for detecting the change of the file system. By adopting the technical scheme, precise event reporting suitable in granularity is provided to a high level system, and an existing detection processing thread model is optimized.

Description

technical field [0001] The present application relates to file management, and more specifically, to a detection method, detection device and corresponding electronic equipment for file system changes. Background technique [0002] In many system developments, it is often necessary to detect or perceive changes in files ("files" in this application refer to the physical unit that stores data in a computer system, including commonly referred to as files and directories). Changes in the log file (such as size, file name, and last modification time, etc.), which trigger further processing. The usual method is to use the polling method to detect file changes, such as scanning the metadata information of the file according to a certain frequency through a daemon thread, and then comparing the recorded last information with the information obtained this time to determine the file change . However, because the solution uses a certain periodic frequency to perform the collection o...

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
IPC IPC(8): G06F17/30G06F11/30
CPCG06F16/1734
Inventor 袁志俊禹扬帆
Owner BANMA ZHIXING NETWORK HONGKONG CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products