CN106570066A - File monitoring method and system - Google Patents
File monitoring method and system Download PDFInfo
- Publication number
- CN106570066A CN106570066A CN201610887461.4A CN201610887461A CN106570066A CN 106570066 A CN106570066 A CN 106570066A CN 201610887461 A CN201610887461 A CN 201610887461A CN 106570066 A CN106570066 A CN 106570066A
- Authority
- CN
- China
- Prior art keywords
- file
- data synchronous
- status
- monitoring
- interface
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/1734—Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a file monitoring method and system. The method comprises the following steps: scanning a file directory that meets the requirement; adding scanned files to the file monitoring system which is used for monitoring file changes in real time; in response to that the file monitoring system monitors one or more files change, informing a data synchronization system of the changed file status in real time; broadcasting the changed file status by the data synchronization system; and providing a data synchronization system interface, and enabling an upper application to acquire the file status by calling the interface. The file monitoring method provided by the invention enables various applications of the system to synchronously acquire change statuses of magnetic disk files more efficiently and flexibly, so as to avoid the program exception due to unsynchronized data.
Description
Technical field
The application is related to the transmission field of digital information, more particularly to a kind of file monitoring method and system.
Background technology
In different operating system, all there is the scene that multiple applications are operated to identical file.In this case, if
One application operating certain file (for example, deleting), and another application cannot obtain the deleted state of this document, and continue
Operation this document, then can cause program crashing.Therefore, how efficiently to monitor file status and be synchronized to each application just seem
It is particularly important.
At present open source projects tracker provides disk monitoring system, but tracker not for application program provide for
The interface of change file status, can only obtain the change of file status, so as to upper by passively listening system inotify event
Layer application directly cannot will update to database and notify other application to the operation of file.
The content of the invention
An object of the application is to provide a kind of each application that is more efficient, making system for greater flexibility synchronous acquisition disk text
Part changes the method and system of state.
An object of the application realizes that the method includes by a kind of file monitoring method:
Satisfactory file directory is scanned;
The file for scanning is added to into the file monitoring system for the change of real-time monitoring file;
One or more files are listened in response to the file monitoring system to change, by the file shape for changing
State real-time informing data synchronous system;
The data synchronous system is broadcasted the file status for changing;
There is provided data synchronous system interface so that upper layer application can obtain the file status by calling the interface.
According to the one side of the application method, the data synchronous system interface also causes upper layer application by the tune to it
Other application is notified with renewal file status and by the data synchronous system.
According to the one side of the application method, the method also includes that the file to scanning sets up database.
According to the one side of the application method, the method also includes extracting the information and synchronized update of the file to described
Database.
An object of the application is also realized that the system includes by a kind of file monitoring system:
Scan module, for being scanned to satisfactory file directory;
Monitoring file add module, for the file for scanning to be added to the file prison for the change of real-time monitoring file
Examining system;
Notification module, changes for listening to one or more files in response to the file monitoring system, will send out
The file status real-time informing data synchronous system of changing;
Broadcast module, for making the data synchronous system be broadcasted the file status for changing;
Interface provides module, for providing data synchronous system interface so that upper layer application can be by calling the interface
Obtain the file status.
The present invention disk file is scanned first, then by monitoring system file change is monitored in real time into
And the change state of each file can be in real time got, data synchronous system provides data and upper layer application is carried to upper layer application
Interface for operating disk file state, the interface real time modifying that upper layer application can be provided by data synchronous system (actively leads to
Know) file status and other application is notified by data synchronous system, so as to it is more efficient, make each application synchronous for greater flexibility
Obtain disk file change state, it is to avoid application causes program exception to be collapsed and data entanglement because data are asynchronous.
The present invention also sets up the database of file by data synchronous system, and convenient inquiry improves inquiry velocity.
Description of the drawings
The present invention will more completely be illustrated below with reference to accompanying drawing and with reference to preferred embodiment.
Fig. 1 is the flow chart of the embodiment according to the inventive method.
Fig. 2 is the flow chart of another embodiment according to the inventive method.
Fig. 3 is the structural representation of the embodiment according to present system.
For clarity, these accompanying drawings are figure that is schematic and simplifying, and they are only gived for understanding institute of the present invention
Necessary details, and omit other details.
Specific embodiment
By detailed description given below, the scope of application of the present invention will be evident that.It will be appreciated, however, that detailed
While thin description and specific example show the preferred embodiment of the present invention, they are given only for illustration purpose.
Fig. 1 shows an embodiment of file monitoring method of the invention, and the method includes, in step S10, passes through
Addition filtering rule, the catalogue to meeting filtering rule requirement carries out recursive scanning.Foregoing filtration rule for example include to
The catalogue of home/user and/or/data beginnings carries out recursive scanning, or does not scan certain catalogue at a first brush.In step S20,
The file for scanning is added to into file monitoring system, this document monitoring system is for the change of real-time monitoring file.In step
S30, the change that the real-time monitoring file of file monitoring system may occur.In step S40, listen in response to file monitoring system
One or more files change (deletion, renewal, establishment etc.), and the file status for changing (are increased, change or deleted
Except) real-time informing data synchronous system.Data synchronous system can be synchronous service, there is provided synchronization mechanism is ensureing all applications
Timely synchronous documents information.In step S50, data synchronous system increases file, change or deletion state are broadcasted.In step
Rapid S60, there is provided data synchronous system interface so that upper layer application can monitor aforementioned broadcast and obtain in time by calling the interface
Take increase, change or the deletion state of file.Data synchronous system interface also causes upper layer application by calling master to it
It is dynamic to update file status and other application is notified by data synchronous system.The offer of data synchronous system interface is caused without the need for Jing
Kernel is broadcasted, and improves synchronous efficiency.The method of the embodiment is to file real-time monitoring and then gets each file in real time
Change state, while the interface of proactive notification data synchronous system file status is also provided application, therefore can be more efficient, cleverer
The synchronous disk file that obtains of each application is set to change state livingly, so as to avoid causing program exception because data are asynchronous.
Fig. 2 shows another embodiment of file monitoring method of the invention.Except including the step shown in Fig. 1 it
Outward, the method for the embodiment also included step S42 before step S50, and data synchronous system is built to monitored All Files
Vertical database, to facilitate inquiry, improves inquiry velocity, and the value of database respective field such as flag bit is for example it is determined that corresponding document
It is deleted or modifies when changing, reflects the last state of file;And step S44, data synchronous system call extraction system
System carries out information extraction to file and synchronized update is to database.The information of extraction is the information for describing file attributes, is stored in
File itself, it includes document base information and metamessage.Information for example includes following field:Title, artist, comment on, retouch
State, school, creation time, keyword, language, publisher, copyright, file name, file path, file address, finally change
Time, file size, file type, duration, music bit rate, music encoding, sound channel number, sample rate, album name, special edition
Music number, song writer, width, height, frame per second, ratio in artist, composer, conductor, the lyrics, special edition music sequence number, special edition
Special rate, Video coding, collection number, season or portion, director, protagonist, camera manufacturer, camera model, direction, time for exposure, aperture
Numerical value, speed, exposure compensating, creation time, metering mode, light source, flash of light lamp switch, focal length, white balance, latitude,
Longitude, height above sea level, gps orientation, author, address etc..The extraction of information contributes to the file to monitoring and sorts out.In other enforcements
In example, step S42 and S44 also can be before steps S40.
Fig. 3 shows the structural representation of an embodiment of file monitoring system of the invention, and it includes:Scanning mould
Block 10, for being scanned to satisfactory file directory;Monitoring file add module 20, for the file for scanning to be added
It is added to the file monitoring system for the change of real-time monitoring file;Database module 30, for building to the file for scanning
Vertical database;Notification module 40, changes for listening to one or more files in response to the file monitoring system, will
The file for changing increases, changes or deletes state real-time informing data synchronous system;Broadcast module 50, for making the number
The file status for changing are broadcasted according to synchronization system;Interface provides module 60, connects for providing data synchronous system
Mouthful so that upper layer application can obtain the file status by calling the interface, and the data synchronous system interface is also caused
Upper layer application is by calling renewal file status and notifying other application by the data synchronous system to it.
Unless explicitly stated otherwise, singulative as used herein " ", " being somebody's turn to do " include plural reference (i.e. with " at least one "
The meaning).It will be further understood that terminology used herein " having ", " including " and/or "comprising" show that presence is described
Feature, step, operation, element and/or part, but do not preclude the presence or addition of one or more other features, step, behaviour
Work, element, part and/or its combination.As used in this term "and/or" is including one or more relevant items enumerated
Any and all combination.Unless explicitly stated otherwise, the step of any method disclosed herein need not accurately according to disclosed order
Perform.
Some preferred embodiments in explanation made above, it should be emphasized, however, that the present invention is not limited to this
A little embodiments, and can be the alternate manner realization in the range of present subject matter.
Claims (10)
1. a kind of file monitoring method, it is characterised in that methods described includes:
Satisfactory file directory is scanned;
The file for scanning is added to into the file monitoring system for the change of real-time monitoring file;
One or more files are listened in response to the file monitoring system to change, by the file status reality for changing
Shi Tongzhi data synchronous systems;
The data synchronous system is broadcasted the file status for changing;
There is provided data synchronous system interface so that upper layer application can obtain the file status by calling the interface.
2. method according to claim 1, it is characterised in that the data synchronous system interface also causes upper layer application to lead to
Cross calling renewal file status and other application is notified by the data synchronous system to it.
3. method according to claim 1 and 2, it is characterised in that the satisfactory file directory is according to file mesh
The beginning of record determines.
4. method according to claim 1 and 2, it is characterised in that the file status include increasing, change and delete.
5. method according to claim 1 and 2, it is characterised in that methods described also includes:
File to scanning sets up database.
6. method according to claim 5, it is characterised in that methods described also includes:
The information and synchronized update of the file are extracted to the database.
7. a kind of file monitoring system, it is characterised in that the system includes:
Scan module, for being scanned to satisfactory file directory;
Monitoring file add module, for the file for scanning to be added to the file monitoring system for the change of real-time monitoring file
System;
Notification module, changes for listening to one or more files in response to the file monitoring system, will become
The file status real-time informing data synchronous system of change;
Broadcast module, for making the data synchronous system be broadcasted the file status for changing;
Interface provides module, for providing data synchronous system interface so that upper layer application can be obtained by calling the interface
The file status.
8. system according to claim 7, it is characterised in that the data synchronous system interface also causes upper layer application to lead to
Cross calling renewal file status and other application is notified by the data synchronous system to it.
9. the system according to claim 7 or 8, it is characterised in that the file status include increasing, change and delete.
10. the system according to claim 7 or 8, it is characterised in that the system also includes:
Database module, for setting up database to the file for scanning.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610887461.4A CN106570066B (en) | 2016-10-11 | 2016-10-11 | File monitoring method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610887461.4A CN106570066B (en) | 2016-10-11 | 2016-10-11 | File monitoring method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106570066A true CN106570066A (en) | 2017-04-19 |
CN106570066B CN106570066B (en) | 2020-07-17 |
Family
ID=58532732
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610887461.4A Active CN106570066B (en) | 2016-10-11 | 2016-10-11 | File monitoring method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106570066B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109298871A (en) * | 2018-09-25 | 2019-02-01 | 东方电子股份有限公司 | A kind of electric network intelligent scheduling system software release monitoring dispositions method |
CN110929002A (en) * | 2018-09-03 | 2020-03-27 | 广州神马移动信息科技有限公司 | Similar article duplicate removal method, device, terminal and computer readable storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1650674A1 (en) * | 2004-10-22 | 2006-04-26 | Research In Motion Limited | System and method for integrating continous synchronization on a host handheld device |
CN103580944A (en) * | 2012-08-02 | 2014-02-12 | 北京千橡网景科技发展有限公司 | Method and system for acquiring user data in real time |
CN103685340A (en) * | 2012-08-31 | 2014-03-26 | 百度在线网络技术(北京)有限公司 | Method and system for notifying change of application data on cloud storage and cloud server |
CN103902389A (en) * | 2014-03-06 | 2014-07-02 | 厦门雅迅网络股份有限公司 | Equipment management method supporting bidirectional communication based on android platform |
CN105204949A (en) * | 2015-08-27 | 2015-12-30 | 威盛电子股份有限公司 | Method and device for actively triggering system broadcast |
CN105306556A (en) * | 2015-09-30 | 2016-02-03 | 深圳市先河系统技术有限公司 | File management method, server and network auxiliary storage equipment |
-
2016
- 2016-10-11 CN CN201610887461.4A patent/CN106570066B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1650674A1 (en) * | 2004-10-22 | 2006-04-26 | Research In Motion Limited | System and method for integrating continous synchronization on a host handheld device |
CN103580944A (en) * | 2012-08-02 | 2014-02-12 | 北京千橡网景科技发展有限公司 | Method and system for acquiring user data in real time |
CN103685340A (en) * | 2012-08-31 | 2014-03-26 | 百度在线网络技术(北京)有限公司 | Method and system for notifying change of application data on cloud storage and cloud server |
CN103902389A (en) * | 2014-03-06 | 2014-07-02 | 厦门雅迅网络股份有限公司 | Equipment management method supporting bidirectional communication based on android platform |
CN105204949A (en) * | 2015-08-27 | 2015-12-30 | 威盛电子股份有限公司 | Method and device for actively triggering system broadcast |
CN105306556A (en) * | 2015-09-30 | 2016-02-03 | 深圳市先河系统技术有限公司 | File management method, server and network auxiliary storage equipment |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110929002A (en) * | 2018-09-03 | 2020-03-27 | 广州神马移动信息科技有限公司 | Similar article duplicate removal method, device, terminal and computer readable storage medium |
CN109298871A (en) * | 2018-09-25 | 2019-02-01 | 东方电子股份有限公司 | A kind of electric network intelligent scheduling system software release monitoring dispositions method |
CN109298871B (en) * | 2018-09-25 | 2021-09-28 | 东方电子股份有限公司 | Software version monitoring and deploying method for intelligent scheduling system of power grid |
Also Published As
Publication number | Publication date |
---|---|
CN106570066B (en) | 2020-07-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1642470B1 (en) | Content publishing over mobile networks | |
CN1297930C (en) | Apparatus and method for authoring multimedia document | |
US20160321783A1 (en) | System and Methods for Generating an Interactive Mosaic Comprising User Visual Content Data on a Portable Terminal and an Image Sharing Platform | |
CN104516892B (en) | It is associated with dissemination method, system and the terminal of the user-generated content of rich media information | |
US20060129917A1 (en) | Syndicating multiple media objects with RSS | |
US20060136556A1 (en) | Systems and methods for personalizing audio data | |
CN101584001B (en) | Automated production of multiple output products | |
US20090083326A1 (en) | Experience bookmark for dynamically generated multimedia content playlist | |
CN101755303A (en) | Automatic story creation using semantic classifiers | |
US20050234875A1 (en) | Methods and systems for processing media files | |
WO2005002123A2 (en) | Network media channels | |
US20180075067A1 (en) | Method of Facilitating Browsing and Management of Multimedia Files with Data Structure thereof | |
CN103246710A (en) | Method and device for automatically generating multimedia travel notes | |
CN103217171B (en) | A kind of navigator of user's edit map data and method | |
CN102970281B (en) | A kind of method, user terminal and server processing multimedia record | |
JP2011055169A (en) | Electronic apparatus and image processing method | |
CN111083396A (en) | Video synthesis method and device, electronic equipment and computer-readable storage medium | |
CN106570066A (en) | File monitoring method and system | |
CN102117273B (en) | Browse, manage and the method for storing multimedia file and electronic installation | |
CN111428077A (en) | Information processing method and terminal thereof | |
CN102685560B (en) | Content delivery system, content delivery server and content delivery method | |
Hendrickx et al. | Dissecting Social Media Journalism: A Comparative Study Across Platforms, Outlets and Countries | |
US8134592B2 (en) | Associating device | |
CN109769027B (en) | Message pushing method, device and equipment | |
CN111949619A (en) | Dynamic directory generation method, system, electronic device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210517 Address after: 100080 401-06, 4th floor, 2 Haidian East 3rd Street, Haidian District, Beijing Patentee after: BEIJING YUANXIN SCIENCE & TECHNOLOGY Co.,Ltd. Address before: 101121 building 01, 66 Yangzhuang Nanli, Tongzhou District, Beijing Patentee before: BEIJING WANGNUO XINGYUN TECHNOLOGY Co.,Ltd. |
|
TR01 | Transfer of patent right |