File monitoring system and method in local area network

Through the file monitoring system and methods in the local area network of the foundry factory, the file monitoring module and the task processing module work together, real-time monitoring and analysis of process files is achieved, and the server cannot install third-party software or connect to the Internet is solved, meeting security and IT control needs.

CN119917466AInactive Publication Date: 2025-05-02HANGZHOU GUANGLI TEST EQUIP CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510406573.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-05-02
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the local area network of the foundry factory, the server cannot install third-party software or connect to the Internet, making it difficult to effectively monitor process files.

Method used

Provide a file monitoring system and method in a local area network, obtain file attribute tables through the file monitoring module, traverse the target folder to obtain changes of files to be monitored, and send updated files to the task queue. The task processing module extracts files from the task queue for parsing and obtains change information.

Benefits of technology

Real-time monitoring and analysis of monitoring files is realized, and it can detect file changes in time, without installing third-party software or connecting to the Internet, meeting the security and IT control needs of wafer foundries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917466A_ABST
    Figure CN119917466A_ABST
Patent Text Reader

Abstract

The invention provides a file monitoring system and method in a local area network, and a file monitoring module is used for traversing a target folder containing a to-be-monitored file according to a file attribute table, obtaining the change information of the to-be-monitored file, determining an updated to-be-monitored file, and sending the updated to-be-monitored file to a task queue; wherein the file attribute table comprises first attribute information corresponding to each to-be-monitored file; the task processing module is used for extracting each updated to-be-monitored file from the task queue and analyzing the updated to-be-monitored file to obtain an analysis result; wherein the analysis result comprises the change information of the updated file to be monitored. According to the system, whether the to-be-monitored file is updated or not can be monitored in real time through the file monitoring module, if the to-be-monitored file is confirmed to be updated, the to-be-monitored file can be analyzed through the task processing module to obtain corresponding change information, and the server does not need to install third-party software or communicate with the Internet, so that the to-be-monitored file is effectively monitored.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of file processing, and in particular to a file monitoring system and method in a local area network. Background Art

[0002] WAT (Wafer Acceptance Test) is an important part of wafer foundry's chip quality and process monitoring. Its testing process requires the use of a large number of process files. In order to ensure the correctness of testing and monitoring, the process files used need to be controlled in real time so that they can be traced and resolved in time when test anomalies occur. In related technologies, due to the needs of production safety and IT control, all process files need to be transmitted and maintained within the wafer foundry's local area network, and all process files are stored in the wafer foundry's server, but the server cannot install third-party software or connect to the Internet, making it difficult to effectively monitor process files. Summary of the invention

[0003] The object of the present invention is to provide a file monitoring system and method in a local area network, so as to realize effective monitoring of files to be monitored.

[0004] The present invention provides a file monitoring system in a local area network, the system runs on a server, and the system includes: a file monitoring module and a task processing module; wherein the task processing module includes a task queue; the file monitoring module is used to obtain a file attribute table, and according to the file attribute table, traverse a target folder containing files to be monitored, obtain change information of the files to be monitored in the target folder, determine the updated files to be monitored based on the change information, and send the updated files to be monitored to the task queue; wherein the file attribute table includes first attribute information corresponding to each file to be monitored; the task processing module is used to extract each updated file to be monitored from the task queue, and parse each extracted updated file to be monitored respectively to obtain a parsing result; wherein the parsing result includes: change information of the updated files to be monitored.

[0005] Furthermore, the file monitoring module is also used to: determine whether there is a preset file record table, and if so, read the file record table; wherein the file record table contains second attribute information corresponding to multiple files to be monitored; extract the first attribute information from the second attribute information, and generate a file attribute table based on the first attribute information.

[0006] Furthermore, the file monitoring module is also used for: if there is no preset file record table, traversing the second attribute information corresponding to each file to be monitored; and generating a file record table based on the second attribute information.

[0007] Furthermore, the file monitoring module is also used to: traverse each file to be monitored in the target folder in a multi-threaded manner according to the file attribute table.

[0008] Furthermore, the system also includes: an exception handling module; the exception handling module is used to: monitor the processing process of the file monitoring module; if an exception is detected in the processing process of the file monitoring module, save the current file attribute table and record the first exception information; generate a first exception log based on the first exception information; and send the first exception log to a preset user terminal.

[0009] Furthermore, the exception handling module is also used to: monitor the processing process of the task processing module; if an exception is detected in the processing process of the task processing module, save the current task queue and record the second exception information; generate a second exception log based on the second exception information; and send the second exception log to the user terminal.

[0010] Furthermore, the file monitoring module is also used to: update the file attribute table after sending the updated monitored file to the task queue.

[0011] Furthermore, the file monitoring module is also used to: if the file attribute table contains designated attribute information corresponding to the designated file, but the designated file has not been traversed, determine that the designated file has been deleted; and generate a file deletion record according to the designated file.

[0012] Furthermore, the task processing module is also used to: determine whether the number of tasks in the task queue exceeds a preset threshold; if the number of tasks exceeds the preset threshold, use multi-threading to extract each updated file to be monitored from the task queue; if the number of tasks does not exceed the preset threshold, extract each updated file to be monitored from the task queue in the order of each updated file to be monitored in the task queue.

[0013] The present invention provides a file monitoring method in a local area network, which is applied to a server and comprises: a file monitoring module obtains a file attribute table, traverses a target folder containing files to be monitored according to the file attribute table, obtains change information of the files to be monitored in the target folder, determines updated files to be monitored based on the change information, and sends the updated files to be monitored to a task queue; wherein the file attribute table contains first attribute information corresponding to each file to be monitored; a task processing module extracts each updated file to be monitored from the task queue, and parses each extracted updated file to be monitored respectively to obtain a parsing result; wherein the parsing result includes: change information of the updated files to be monitored.

[0014] The file monitoring system and method in a local area network provided by the present invention, the file monitoring module is used to obtain a file attribute table, according to the file attribute table, traverse the target folder containing the files to be monitored, obtain the change information of the files to be monitored in the target folder, determine the updated files to be monitored based on the change information, and send the updated files to be monitored to the task queue; wherein the file attribute table contains the first attribute information corresponding to each file to be monitored; the task processing module is used to extract each updated file to be monitored from the task queue, and parse each updated file to be monitored extracted to obtain the parsing result; wherein the parsing result includes: the change information of the updated files to be monitored. The system can monitor whether the files to be monitored are updated in real time through the file monitoring module, and if it is confirmed to be updated, the files to be monitored can be parsed through the task processing module to obtain the corresponding change information, without the need for the server to install third-party software or connect to the Internet, thereby realizing effective monitoring of the files to be monitored. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 A schematic diagram of a file monitoring system in a local area network provided by an embodiment of the present invention; Figure 2 A schematic diagram of the operation process of a file monitoring system provided by an embodiment of the present invention; Figure 3 A schematic diagram of error reporting logic of a task processing module provided by an embodiment of the present invention; Figure 4 The present invention provides a flowchart of a method for monitoring files in a local area network. DETAILED DESCRIPTION

[0017] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than 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.

[0018] At present, due to the needs of production safety and IT control, all process files need to be transmitted and maintained within the wafer foundry LAN. All process files are stored in the wafer foundry's server. The server currently uses the Linux system. The commonly used tools are as follows: When the server is not connected to the Internet, the commonly used file monitoring software are: Inotify: requires third-party installation, and requires setting up scheduled file scans, and cannot obtain specific modified content. Audit: requires third-party installation, and the configuration is relatively complex. Subsequent maintenance requires certain IT knowledge. Production users of FAB (Fabrication, wafer foundry) production lines need to undergo a period of training before they can use it.

[0019] Other tools have low usage rates and require Internet connection, that is, they need to obtain Internet licenses, or are complex to operate, have high misoperation rates, and do not comply with FAB management rules. In summary, it is difficult for related technologies to effectively monitor process files. Based on this, an embodiment of the present invention provides a file monitoring system and method in a local area network, which can be applied to application scenarios where process files need to be monitored.

[0020] To facilitate understanding of this embodiment, firstly, a file monitoring system in a local area network disclosed in an embodiment of the present invention is introduced. The system runs on a server, such as Figure 1 As shown, the system includes: a file monitoring module and a task processing module; wherein the task processing module includes a task queue; The file monitoring module is used to obtain a file attribute table, traverse a target folder containing files to be monitored according to the file attribute table, obtain change information of the files to be monitored in the target folder, determine the updated files to be monitored based on the change information, and send the updated files to be monitored to the task queue; wherein the file attribute table contains first attribute information corresponding to each file to be monitored; The above-mentioned file attribute table usually contains the first attribute information corresponding to each file to be monitored, for example, the first attribute information may include file name, file path, file size, creation time, modification time and other information; the above-mentioned target folder usually contains multiple files to be monitored, and the files to be monitored may be process files, etc.; the above-mentioned change information may include: the files to be monitored are deleted, modified, etc.; in actual implementation, the file monitoring module can traverse each file to be monitored in the target folder according to the file attribute table, for example, it can traverse at a preset time interval (such as 1s), etc., and obtain the change information of each file to be monitored in the target folder through traversal to determine the updated files to be monitored. For example, through traversal, it is confirmed that the modification time recorded in the file attribute table when the file A to be monitored was last modified is different, so it can be confirmed that the file A to be monitored has changed; each updated file to be monitored obtained through traversal can be sent to the task queue in the task processing module.

[0021] The task processing module is used to extract each updated file to be monitored from the task queue, and parse each extracted updated file to be monitored to obtain a parsing result; wherein the parsing result includes: change information of the updated file to be monitored.

[0022] If the file monitoring module confirms that there is an updated file to be monitored, considering that if the parsing task is processed immediately in this thread, the files to be monitored behind it will not be traversed in time. In addition, considering that the files to be monitored are usually large, the speed of parsing files will be slow. In order to ensure the execution speed of the system, the operation of parsing files is run in the task processing module, which is separated from the file monitoring module. Usually, a task queue is defined in the task processing module. The size of the task queue can be set according to actual needs. When the task queue needs to be used, the initial file corresponding to the task queue can be read first. If the initial file is not read or the initial file is empty, it means that there is no task to be processed before. If the initial file is read, it can be read into the task queue. Then add a task processing thread, which is specifically used to process the newly added parsing task of the task processing module. This thread is responsible for calling the parsing script to parse the updated files to be monitored in the task queue, and generate the parsed content of the directory that can be captured on the remote server.

[0023] Specifically, when the file monitoring module detects the updated file to be monitored, it can be added to the task queue first; the task processing module can extract each updated file to be monitored from the task queue in turn, and parse each updated file to be monitored extracted separately by calling the parsing script to parse out the specific change information in each updated file to be monitored, such as specific new information, deletion and modification, modification information, permission modification, etc.

[0024] The file monitoring system in the above-mentioned local area network can monitor in real time whether the monitored file is updated through the file monitoring module. If it is confirmed to be updated, the monitored file can be parsed through the task processing module to obtain the corresponding change information. There is no need to install third-party software on the server or connect to the Internet, thereby realizing effective monitoring of the monitored file.

[0025] Furthermore, the file monitoring module is also used to: determine whether there is a preset file record table, and if so, read the file record table; wherein the file record table contains second attribute information corresponding to multiple files to be monitored; extract the first attribute information from the second attribute information, and generate a file attribute table based on the first attribute information.

[0026] The above-mentioned second attribute information usually contains more attribute features than the first attribute information. For example, the second attribute information may also include: file type, file format, creator, etc. In actual implementation, after the file monitoring module starts running the script, it is usually necessary to first read in the file record table recording the second attribute information to form a file attribute table. Therefore, it is usually necessary to first determine whether there is a preset file record table. If it is determined that the file record table exists, the file record table can be directly read, and the required key information, that is, the first attribute information, can be extracted from the second attribute information corresponding to each file to be monitored recorded in the file record table, and a file attribute table is generated based on the extracted first attribute information.

[0027] Furthermore, the file monitoring module is also used to: if there is no preset file record table, traverse the second attribute information corresponding to each file to be monitored; and generate a file record table based on the second attribute information.

[0028] If it is determined that the file record table does not exist, it can be considered that this is the first time the file monitoring system is running. In this case, it is usually necessary to traverse the second attribute information of each file to be monitored in the target folder in advance and form a file record table based on the second attribute information obtained through the traversal.

[0029] Furthermore, the file monitoring module is also used to: traverse each file to be monitored in the target folder in a multi-threaded manner according to the file attribute table.

[0030] Multithreading refers to the technology of implementing concurrent execution of multiple threads from software or hardware. By executing more than one thread at the same time, the overall processing performance can be improved. In actual implementation, the file monitoring module can traverse each monitored file in the target folder at a preset time interval (such as 1s). In order to speed up the traversal speed and the immediate processing of monitoring files to be monitored, the traversal process uses a thread pool. In order not to affect the performance of the server, the size of the thread pool used for the traversal operation is 5, that is, 5 different monitored files can be traversed at the same time.

[0031] Furthermore, the system also includes: an exception handling module; the exception handling module is used to: monitor the processing process of the file monitoring module; if an exception is detected in the processing process of the file monitoring module, save the current file attribute table and record the first exception information; generate a first exception log based on the first exception information; and send the first exception log to a preset user terminal.

[0032] In actual implementation, the exception handling module can monitor the running process of the sub-thread run by the file monitoring module and record the log information during the runtime. If it is monitored that the processing process of the file monitoring module is abnormal, such as frequent creation and termination of sub-threads, etc., the current file attribute table can be saved, and the first exception information that appears can be recorded. Then, based on the first exception information, the exception is tracked to analyze the possible causes and types of exceptions. The specific settings can be based on actual needs and are not limited here. Then, the first exception log is generated and sent to the preset user terminal through the local area network's mail forwarding server, etc., to inform relevant personnel that an error has occurred in the operation of the file monitoring module.

[0033] Furthermore, the exception handling module is also used to: monitor the processing process of the task processing module; if an exception is detected in the processing process of the task processing module, save the current task queue and record the second exception information; generate a second exception log based on the second exception information; and send the second exception log to the user terminal.

[0034] In actual implementation, the exception handling module can also monitor the running process of the sub-thread run by the task processing module and record the log information during the runtime. If it is monitored that the processing process of the task processing module is abnormal, such as frequent creation and termination of sub-threads, etc., the current task queue can be saved and the second exception information that occurs can be recorded. Then, based on the second exception information, the exception is tracked to analyze the possible causes and types of exceptions. The specific settings can be based on actual needs and are not limited here. Then, a second exception log is generated and sent to a preset user terminal via a local area network mail forwarding server, etc., to inform relevant personnel that an error has occurred in the operation of the task processing module.

[0035] Furthermore, the file monitoring module is also used to: update the file attribute table after sending the updated monitored file to the task queue.

[0036] In actual implementation, the file monitoring module can determine whether to update the file attribute table according to the situation that the updated file to be monitored enters the task queue. Specifically, if the task queue is not full and the updated file to be monitored enters the task queue successfully, the file attribute table can be updated. For example, the file attribute table can be updated according to the attribute difference between the updated file to be monitored and the updated file to be monitored recorded in the file attribute table; if the task queue is full, the information of the updated file to be monitored in the file attribute table is usually not modified first, so that the attribute difference of the updated file to be monitored can be detected in the next monitoring cycle (such as the monitoring cycle is 1s, etc.), to prevent the updated file to be monitored from being modified without corresponding parsing and modification records. After execution, enter the cycle of the next monitoring task.

[0037] Furthermore, the file monitoring module is also used to: if the file attribute table contains designated attribute information corresponding to the designated file, but the designated file has not been traversed, determine that the designated file has been deleted; and generate a file deletion record according to the designated file.

[0038] The above-mentioned specified file can be any one or more of multiple files to be monitored; in actual implementation, after traversing each file to be monitored in the target folder, if the file attribute table contains specified attribute information corresponding to the specified file, but the specified file is not traversed during the traversal process, it can be considered that the specified file has been deleted. In this case, a file deletion record corresponding to the specified file can be generated, and the specified file will not be added to the task queue in this case.

[0039] Furthermore, the task processing module is also used to: determine whether the number of tasks in the task queue exceeds a preset threshold; if the number of tasks exceeds the preset threshold, use multi-threading to extract each updated file to be monitored from the task queue; if the number of tasks does not exceed the preset threshold, extract each updated file to be monitored from the task queue in the order of each updated file to be monitored in the task queue.

[0040] The above-mentioned number of tasks can be understood as the number of updated files to be monitored that are added to the task queue; the above-mentioned preset threshold can be set according to actual needs, such as 100, etc.; in actual implementation, if there are updated files to be monitored added to the task queue, the task processing thread is awakened and the scale of task processing is estimated. Specifically, if the number of updated files to be monitored in the task queue exceeds 100, in order to speed up the task processing, a thread pool (capacity of 5) can be used, and multiple updated files to be monitored can be processed simultaneously by multi-threading, thereby improving the processing speed of the task processing model.

[0041] If the number of updated files to be monitored in the task queue does not exceed 100, then for the sake of server performance, there is no need to apply for a new thread to speed up the processing of tasks. Just process them in the order of the updated files to be monitored in the task queue. In addition, if the number of updated files to be monitored that needs to be executed exceeds the size of the task queue, the subsequent operation of adding tasks will inform that the queue addition has failed.

[0042] If every updated monitored file in the task queue is processed, then for the sake of server performance and because clients are usually unlikely to update monitored files frequently, the thread corresponding to the task processing module will usually go into sleep mode and wait to be woken up when the next task arrives.

[0043] In addition, the processing logic of the task processing module can be customized. The current function is only to call the parsing script for the updated monitored file to inform that the monitored file has been modified and record the modified content. In the future, email notifications, automatic backups, and expandable functions such as comparison of added items can be added according to production needs.

[0044] In practical applications, taking the Linux system as an example, when deploying the file monitoring system, an installation script for deploying the system can be developed. After the installation is completed according to the installation script, it will be automatically added as a Linux service process, and will not be automatically shut down as the operating system is always turned on, and will start automatically when the server is turned on. There is no need to manually start the script. When an exception occurs in the server, the automatic start can be manually turned off, and the error can be notified through the exception handling module, and usually the relevant personnel need to manually handle the error before the automatic start. The system deployment script can be implemented by a shell script. The shell script will read the configuration file in the current directory of the shell script. The configuration file needs to configure the monitoring directory, log generation directory, and the email account and recipient for sending abnormal information. After the configuration file is confirmed to be correct, the shell script needs to be started with an administrator account. The script automatically decompresses the python script required for running, limits the write permission of the script, prevents accidental modification of the script, and puts it in the appropriate location of the server, and then automatically encapsulates the python script into a service of the Linux system, and sets the startup mode to start automatically at startup, and does not try to restart after abnormal exit, so as to manage it.

[0045] For easier understanding, see Figure 2 The schematic diagram of the operation process of a file monitoring system shown in the figure, after the system is turned on, it needs to be initialized first, specifically: 1) Initialize other content that needs to be initialized, such as thread file locks, check the legitimacy of the directory where the log is generated, the legitimacy of the monitored file path, and the legitimacy of the parsing script to be called.

[0046] 2) Initialize the file attribute table: first read in the file record table that records the second attribute information corresponding to multiple files to be monitored to form a file attribute table. If there is no file record table, pre-traverse the second attribute information of all files to be monitored in the target folder to be monitored to form an initial file record table.

[0047] 3) Initialize the task queue: read the initial file of the task queue. If there is no initial file or the initial file is empty, it means that there are no tasks to be processed before. If the initial file is read, it can be read into the task queue.

[0048] If the initialization fails, the script will fail to execute by default and enter the exception handling process corresponding to the exception handling process.

[0049] After initialization, the file monitoring module will traverse the target folder periodically (the default interval is 1s). In order to speed up the traversal and the immediate processing of file monitoring, the traversal process uses a thread pool. If there are updated files to be monitored, the updated files to be monitored can be sent to the task queue.

[0050] The task processing module is used to process tasks after determining that there are tasks in the task queue. Specifically, each updated file to be monitored can be extracted from the task queue, and each updated file to be monitored can be parsed and processed separately to obtain the parsing result; if each updated file to be monitored in the task queue has been processed, the task processing thread can sleep for 100 milliseconds and then determine whether there is a task in the task queue. The file monitoring module and the task processing module are respectively run in two sub-threads of the main thread. These two sub-threads can be monitored by the exception monitoring module. When an exception is detected, a corresponding exception log can be generated and relevant personnel can be informed in a timely manner.

[0051] See also Figure 3 The error reporting logic diagram of a task processing module shown in the figure shows that after the task processing module is awakened, it enters the automatic operation mode by running the corresponding script, and executes the tasks in the task queue at a scheduled time through the script, that is, the updated monitored files are parsed. If an error occurs during the execution process, the script is stopped, the automatic operation is canceled, a log is generated, and the relevant personnel can be informed in time by sending emails. After handling the exception, the relevant personnel can manually perform related operations to make the task processing model enter the automatic operation mode again by running the corresponding script.

[0052] The file monitoring system in the above-mentioned LAN can monitor the files to be monitored in real time. If the files to be monitored are detected to be modified, a file modification log file can be generated. The system is easy to deploy in a closed LAN, without the need to connect to the Internet or install new software on the server. The system is convenient for production line personnel to use in a closed LAN, and can promptly discover and track modification records, reducing personnel training costs. When the files to be monitored are modified, the system can call the file parsing script, notify the background database file of the modification, read the parsed files to be monitored, and update the database content, so that relevant personnel can view the latest contents of the files to be monitored. The system has a certain error recovery mechanism. When the monitoring system encounters problems in operation, the system can automatically report errors to relevant personnel. And if the monitoring system runs wrong, there can be key logs to record operation information to help troubleshoot the problem.

[0053] In summary, the system has the following beneficial effects: 1) Real-time monitoring and response: Real-time detection of changes in files to be monitored, including addition, modification and deletion, etc., and timely adoption of appropriate measures. Operators can confirm the most recent time when the files to be monitored were modified by observing changes in the background database content.

[0054] 2) Automated processing: The script itself is implemented in Python, which is convenient and has good application scalability. The status and content changes of the monitored files can be automatically processed through scripts or programs, thereby customizing the operation tasks of the monitored files, such as automatic backup, automatic processing, automatic notification and other subsequent expansion functions.

[0055] 3) Reduce manual intervention: It can reduce the workload of manual monitoring and processing of file changes and improve work efficiency.

[0056] 4) Real-time logging: Detailed log records can be generated to record the changes of each monitored file for auditing and tracking.

[0057] 5) Avoid data loss: The deletion and modification of monitored files can be discovered in time to avoid accidental data loss or anomalies caused by misoperation.

[0058] 6) Improved security: No need to install third-party software or connect to the Internet, it complies with FAB security management rules, and can detect whether files with different permission levels have been accessed or modified. It can also detect unauthorized file access or modification, thereby strengthening the security protection of files.

[0059] 7) Monitor specific types of files: Based on the production needs of the production line, you can monitor only files of a specific type or a specific naming pattern, while ignoring some other types of files in the target directory.

[0060] 8) Applicable to various scenarios: It can be used in backup systems, security monitoring systems, data processing processes and other scenarios.

[0061] 9) Quick response to problems: When the monitored files change or problems occur, relevant personnel can be notified immediately and take corresponding measures to reduce potential losses and ensure the stability of mass production.

[0062] 10) Flexibility and scalability: Monitoring rules can be customized as needed to adapt to different business needs; error recovery mechanisms and new task processing can also be customized as needed. For example, the system's built-in task module is used to parse the updated files to be monitored; new operation modules can be added, such as a file return mechanism, etc.

[0063] The present invention provides a file monitoring method in a local area network, the method is applied to a server, such as Figure 4 As shown, the method comprises the following steps: Step S402, the file monitoring module obtains a file attribute table, and according to the file attribute table, traverses the target folder containing the files to be monitored, obtains change information of the files to be monitored in the target folder, determines the updated files to be monitored based on the change information, and sends the updated files to be monitored to the task queue; wherein the file attribute table contains the first attribute information corresponding to each file to be monitored; Step S404, the task processing module extracts each updated file to be monitored from the task queue, and parses each extracted updated file to be monitored to obtain a parsing result; wherein the parsing result includes: change information of the updated file to be monitored.

[0064] The above-mentioned file monitoring method within the local area network can monitor in real time whether the monitored file is updated through the file monitoring module. If it is confirmed to be updated, the monitored file can be parsed through the task processing module to obtain corresponding change information. There is no need to install third-party software on the server or connect to the Internet, thereby realizing effective monitoring of the monitored file.

[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A file monitoring system in a local area network, characterized in that: The system runs on a server, and includes: a file monitoring module and a task processing module; wherein the task processing module includes a task queue; The file monitoring module is used to obtain a file attribute table, traverse a target folder containing files to be monitored according to the file attribute table, obtain change information of the files to be monitored in the target folder, determine updated files to be monitored based on the change information, and send the updated files to be monitored to the task queue; wherein the file attribute table contains first attribute information corresponding to each file to be monitored; The task processing module is used to extract each updated file to be monitored from the task queue, and parse each extracted updated file to be monitored to obtain a parsing result; wherein the parsing result includes: change information of the updated file to be monitored.

2. The system according to claim 1, characterized in that The file monitoring module is also used for: Determine whether there is a preset file record table, and if there is a preset file record table, read the file record table; wherein the file record table contains second attribute information corresponding to a plurality of files to be monitored; The first attribute information is extracted from the second attribute information, and a file attribute table is generated according to the first attribute information.

3. The system according to claim 1, characterized in that The file monitoring module is also used for: If there is no preset file record table, traverse the second attribute information corresponding to each of the files to be monitored; The file record table is generated based on the second attribute information.

4. The system according to claim 1, characterized in that The file monitoring module is also used for: According to the file attribute table, each file to be monitored in the target folder is traversed by multiple threads.

5. The system according to claim 1, characterized in that The system further includes: an exception handling module; the exception handling module is used to: Monitoring the processing process of the file monitoring module; If it is monitored that an exception occurs in the processing of the file monitoring module, save the current file attribute table and record the first exception information; Generate a first exception log according to the first exception information; The first abnormality log is sent to a preset user terminal.

6. The system according to claim 5, characterized in that The exception handling module is also used for: Monitoring the processing process of the task processing module; If it is monitored that an exception occurs in the processing process of the task processing module, the current task queue is saved and second exception information is recorded; Generate a second exception log according to the second exception information; The second abnormality log is sent to the user terminal.

7. The system according to claim 1, characterized in that The file monitoring module is also used for: After the updated file to be monitored is sent to the task queue, the file attribute table is updated.

8. The system according to claim 1, characterized in that The file monitoring module is also used for: If the specified attribute information corresponding to the specified file exists in the file attribute table, but the specified file is not traversed, it is determined that the specified file has been deleted; A file deletion record is generated according to the specified file.

9. The system according to claim 1, characterized in that The task processing module is also used for: Determine whether the number of tasks in the task queue exceeds a preset threshold; If the number of tasks exceeds the preset threshold, extract each updated file to be monitored from the task queue using multiple threads; If the number of tasks does not exceed the preset threshold, each updated file to be monitored is extracted from the task queue according to the order of each updated file to be monitored in the task queue.

10. A file monitoring method in a local area network, characterized in that: The method is applied to a server, and the method comprises: The file monitoring module obtains a file attribute table, and according to the file attribute table, traverses a target folder containing files to be monitored, obtains change information of files to be monitored in the target folder, determines updated files to be monitored based on the change information, and sends the updated files to be monitored to the task queue; wherein the file attribute table contains first attribute information corresponding to each file to be monitored; The task processing module extracts each updated file to be monitored from the task queue, and parses each extracted updated file to be monitored to obtain a parsing result; wherein the parsing result includes: change information of the updated file to be monitored.

Citation Information

Patent Citations

  • Monitoring method and device

    CN104063301A

  • Monitoring method and device of events

    CN108255663A

  • Distributed method, system and equipment for monitoring JS file tampering and storage medium

    CN108319866A

  • File change processing method and device, storage medium and electronic equipment

    CN111881095A

  • Heterogeneous data synchronous processing method and system

    CN111984715A