Task processing method and device based on file system filter, equipment and medium

Through the task processing method based on file system filters, kernel file operation events of the file system are intercepted and processed, and the performance bottlenecks and user operation complexity problems in the existing technology are solved, and efficient and simplified task processing is achieved. process.

CN119441161APending Publication Date: 2025-02-14NANJING HUADUN ELECTRIC POWER INFORMATION SAFETY EVALUATION CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411564316.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The prior art has performance bottlenecks when processing local files or volume files mounted to the system, especially when processing a large number of files, which will seriously affect the processing speed and increase the user's operation complexity.

Method used

Through the task processing method based on file system filter, the kernel file operation events of the file system are intercepted, delivered to the preset task pool, and the decision result is generated through the decision maker, and the task processing result is processed based on the decision result, and the task processing result is returned to the file system.

Benefits of technology

It improves the efficiency of task processing, reduces user operation complexity, improves user experience, and significantly improves system performance by increasing concurrency and avoiding users' manual participation in task processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441161A_ABST
    Figure CN119441161A_ABST
Patent Text Reader

Abstract

The invention discloses a task processing method and device based on a file system filter, equipment and a medium, and relates to the technical field of computers, and the method comprises the following steps: intercepting a current kernel file operation event of a file system to obtain a to-be-processed event task; reporting the to-be-processed event task to a task processing pool, and marking a suspended state; reporting the to-be-processed event task to a decision maker, so that the decision maker returns a decision result issued for the to-be-processed event task to the task processing pool; and processing the to-be-processed event task, and then returning a corresponding task processing result to the file system to complete the to-be-processed event task. Therefore, the file system in the application can mark the suspension state of the task without waiting for the processing result of the task corresponding to the operation event, and can process other operation events at the same time, so that the concurrency can be improved; and human participation in task processing is avoided, the task processing result is directly obtained, the task processing efficiency can be improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a task processing method, device, equipment and medium based on a file system filter. Background Art

[0002] When performing various operation events on local files or volume files mounted on the system, the commonly used Minifiter (a lightweight file filter driver) technology will not return the corresponding information until the event is processed after intercepting the event. In addition, the encryption and decryption of read and write events also require users to manually perform encryption and decryption operations, which undoubtedly increases the complexity of user operations. This method has performance bottlenecks, which will seriously affect the processing speed and reduce the user experience when processing a large number of files.

[0003] From the above, it can be seen that how to improve the efficiency of task processing and improve user experience is an urgent problem to be solved. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a task processing method, device, equipment and medium based on a file system filter, which can improve the efficiency of task processing and improve user experience. The specific scheme is as follows:

[0005] In a first aspect, the present application provides a task processing method based on a file system filter, comprising:

[0006] Based on the preset kernel file operation event type, the current kernel file operation event of the file system is intercepted to obtain the corresponding event task to be processed;

[0007] Reporting the pending event task to the task processing pool, and returning a status identifier for the pending event task to the file system, so that the file system marks the pending event task as a suspended state according to the status identifier;

[0008] Reporting the pending event task to the decision maker through the task processing pool, so that the decision maker returns the decision result issued for the pending event task to the task processing pool;

[0009] The pending event task is processed based on the preset kernel file operation event type and the decision result, and then the corresponding task processing result is returned to the file system by calling the IoCompleteRequest function to complete the pending event task.

[0010] Optionally, intercepting the current kernel file operation event of the file system based on a preset kernel file operation event type to obtain a corresponding event task to be processed includes:

[0011] Based on the preset kernel file operation event type, the current kernel file operation event of the file system is intercepted to obtain a number of events to be processed;

[0012] The context object corresponding to the event to be processed is saved, and the event to be processed is parsed to obtain a corresponding event task to be processed; the context object includes user information.

[0013] Optionally, the decision maker returns the decision result issued for the pending event task to the task processing pool, including:

[0014] The decision maker issues a decision result for the event task to be processed via kernel mode or user mode, and returns the decision result to the task processing pool.

[0015] Optionally, the processing of the to-be-processed event task based on a preset kernel file operation event type and the decision result includes:

[0016] The pending event tasks and the decision results are grouped according to the preset kernel file operation event type to obtain a plurality of groups of pending event tasks and corresponding decision results corresponding to different operation events;

[0017] For a single group of pending event tasks and corresponding decision results, the pending event tasks are processed based on the decision results and in combination with the context objects of the pending events corresponding to the pending event tasks to obtain corresponding task processing results.

[0018] Optionally, the processing of the to-be-processed event task based on a preset kernel file operation event type and the decision result includes:

[0019] For the first event task of the open operation event, based on the user authority corresponding to the user information in the corresponding context object and the decision result of the first event task, the file corresponding to the first event task is buffered in plain text or in cipher text to obtain the corresponding first task processing result;

[0020] For the second event task of the read / write operation event, trigger an asynchronous process for the second event task, and encrypt or decrypt the file corresponding to the second event task based on the corresponding decision result through the asynchronous process to obtain a corresponding second task processing result;

[0021] For the third event task of the deletion or renaming operation event, the file corresponding to the third event task is deleted or renamed based on the corresponding decision result to obtain the corresponding third task processing result.

[0022] Optionally, deleting or renaming the file corresponding to the third event task based on the corresponding decision result to obtain the corresponding third task processing result includes:

[0023] Deleting or renaming the file corresponding to the third event task based on the decision result of the third event task to obtain a corresponding initial processing result;

[0024] The initial processing result is made effective by calling the FltSetCallbackDataDirty function, and the corresponding third task processing result is obtained.

[0025] Optionally, the decision maker returns the decision result issued for the pending event task to the task processing pool, including:

[0026] The decision maker returns the decision result issued for the pending event task to the task processing pool by calling the IoQueueWorkItem function.

[0027] In a second aspect, the present application provides a task processing device based on a file system filter, comprising:

[0028] An event task acquisition module is used to intercept the current kernel file operation event of the file system based on a preset kernel file operation event type to obtain a corresponding event task to be processed;

[0029] An event task reporting module, used for reporting the pending event task to the task processing pool, and returning a status identifier for the pending event task to the file system, so that the file system marks the pending event task as a suspended state according to the status identifier;

[0030] A decision result generating module, used for reporting the pending event task to the decision maker through the task processing pool, so that the decision maker returns the decision result issued for the pending event task to the task processing pool;

[0031] The event task processing module is used to process the pending event task based on the preset kernel file operation event type and the decision result, and then return the corresponding task processing result to the file system by calling the IoCompleteRequest function to complete the pending event task.

[0032] In a third aspect, the present application provides an electronic device, including:

[0033] Memory, used to store computer programs;

[0034] The processor is used to execute the computer program to implement the aforementioned task processing method based on the file system filter.

[0035] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned task processing method based on a file system filter.

[0036] The present application provides a task processing method based on a file system filter. The method comprises the following steps: firstly, intercepting the current kernel file operation event of the file system based on a preset kernel file operation event type to obtain a corresponding event task to be processed; reporting the event task to be processed to a task processing pool, and returning a status identifier for the event task to be processed to the file system, so that the file system marks the event task to be processed as a suspended state according to the status identifier; reporting the event task to be processed to a decision maker through the task processing pool, so that the decision maker returns the decision result issued for the event task to the task processing pool; processing the event task to be processed based on the preset kernel file operation event type and the decision result, and then returning the corresponding task processing result to the file system by calling the IoCompleteRequest function to complete the event task to be processed.

[0037] As can be seen from the above, the present application delivers the target task to the preset task pool, and the status can be returned without waiting for processing. The file system marks the suspended status of the task, and the file system can handle other operation events, which can improve the concurrency; and the present application can process related tasks based on the decision results to obtain the final task processing results, thereby avoiding users' manual participation in task processing, reducing the user's operation complexity, improving task processing efficiency, and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0039] Figure 1 A flowchart of a task processing method based on a file system filter disclosed in this application;

[0040] Figure 2 This is a flowchart of the first specific task processing method based on file system filter disclosed in this application;

[0041] Figure 3 A flowchart of a second specific task processing method based on a file system filter disclosed in this application;

[0042] Figure 4 This is a flowchart of a third specific task processing method based on a file system filter disclosed in this application;

[0043] Figure 5 A schematic diagram of another specific task processing method based on a file system filter disclosed in this application;

[0044] Figure 6 A schematic diagram of a task processing device based on a file system filter disclosed in this application;

[0045] Figure 7 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.

[0047] When performing various operation events on local files or volume files attached to the system, the currently commonly used Minifiter technology will not return the corresponding information until the event is processed after intercepting the event, and the encryption and decryption method at the software level is usually used for encryption and decryption of read and write events, but this method usually has performance bottlenecks, especially when processing a large number of files, the speed of encryption and decryption will be significantly reduced, and the user is required to manually perform encryption and decryption operations, which undoubtedly increases the complexity of the user's operation. To this end, the present application provides a task processing solution, which delivers the target task to a preset task pool and returns the corresponding status identifier. The file system does not need to wait for the processing result of the task corresponding to the operation event to mark the suspended state of the task, and can process other operation events at the same time, which can increase the concurrency; and it can avoid human participation in task processing, directly output the task processing results, and can improve task processing efficiency and user experience.

[0048] See also Figure 1 As shown, the embodiment of the present application discloses a task processing method based on a file system filter, including:

[0049] Step S11: intercept the current kernel file operation event of the file system based on the preset kernel file operation event type to obtain the corresponding event task to be processed.

[0050] In this embodiment, it is necessary to pre-register the filter driver, set the kernel file operation event type that needs to be intercepted in the filter, and when various operation events are performed on local files or volume files mounted to the system, the current kernel file operation event of the file system is intercepted based on the preset kernel file operation event type to obtain the corresponding event task to be processed. The kernel file operation event type includes but is not limited to open event, read and write event, delete event and rename event. Correspondingly, the event task to be processed includes but is not limited to open event task, read and write event task, delete event task and rename event task.

[0051] It should be noted that after intercepting the current kernel file operation event of the file system based on the preset kernel file operation event type, the context objects corresponding to the intercepted kernel file operation events are saved so as to process the kernel file operation events. The context objects include but are not limited to user information, key information, file data, etc. corresponding to the kernel file operation events. Specifically, the current kernel file operation event of the file system is intercepted based on the preset kernel file operation event type to obtain corresponding event tasks to be processed, including: intercepting the current kernel file operation event of the file system based on the preset kernel file operation event type to obtain several events to be processed; saving the context objects such as user information, key information, file data, etc. corresponding to the events to be processed, and parsing the events to be processed to obtain corresponding event tasks to be processed.

[0052] Step S12: reporting the pending event task to the task processing pool, and returning a status identifier for the pending event task to the file system, so that the file system marks the pending event task as suspended according to the status identifier.

[0053] In this embodiment, the pending event task is reported to the task processing pool through a filter, and a status identifier for the pending event task is returned to the file system so that the file system marks the pending event task as a suspended state according to the status identifier. Among them, the task processing pool contains several pending event tasks, and the several pending event tasks are marked as suspended by the file system. After receiving the decision result for the pending event task, the corresponding pending event task is processed based on the decision result. It can be understood that by returning the status identifier for the pending event task so that the file system marks the pending event task as a suspended state according to the status identifier, after intercepting the pending event, the status can be returned without waiting for the processing to be completed. The file system marks the suspended state of the task, and the file system can process other operation events, which can increase the concurrency and improve the task processing efficiency.

[0054] Step S13: reporting the pending event task to the decision maker through the task processing pool, so that the decision maker returns the decision result issued for the pending event task to the task processing pool.

[0055] In this embodiment, the task of the pending event is reported to the decision maker through the task processing pool, so that the decision maker generates a decision result for the task of the pending event according to the context object corresponding to the pending event, and returns the decision result to the task processing pool. Specifically, the decision maker returns the decision result issued for the task of the pending event to the task processing pool, including: the decision maker issues the decision result for the task of the pending event through the kernel state or the user state according to the context object corresponding to the pending event, and returns the decision result to the task processing pool. That is, the decision maker can choose to issue the decision result for the task of the pending event through the kernel state or the user state according to the actual application situation. It can be understood that the decision maker can generate the decision result for the task of the pending event according to the context object corresponding to the pending event, and can select a corresponding processing method according to the type of event task, including but not limited to authentication, key acquisition and policy processing, etc., which can be determined according to the actual situation.

[0056] In this embodiment, after generating a decision result for the pending event task, the decision maker returns the decision result to the task processing pool. The decision maker returns the decision result issued for the pending event task to the task processing pool, which may include: the decision maker returns the decision result issued for the pending event task to the task processing pool by calling the IoQueueWorkItem function. Specifically, the decision result can be returned to the task processing pool by calling a function, which can ensure that the decision result is returned to the task processing pool, and prevent the pending event task from being unable to perform processing operations due to the loss of the decision result.

[0057] Step S14: Process the pending event task based on the preset kernel file operation event type and the decision result, and then return the corresponding task processing result to the file system by calling the IoCompleteRequest function to complete the pending event task.

[0058] In this embodiment, the pending event tasks are processed by different processing methods based on the preset kernel file operation event type, and the related tasks are processed based on the decision result to obtain the task processing result. Specifically, the processing of the pending event tasks based on the preset kernel file operation event type and the decision result includes: grouping the pending event tasks and the decision results according to the preset kernel file operation event type to obtain several groups of pending event tasks and corresponding decision results corresponding to different operation events; for a single group of pending event tasks and corresponding decision results, based on the decision result and in combination with the context object of the pending event corresponding to the pending event task, the pending event task is processed to obtain the corresponding task processing result. That is, the pending event tasks and the decision results in the task processing pool are grouped based on the preset kernel file operation event type, different task processing methods are selected for different groups, and the corresponding task processing results are obtained based on the decision result.

[0059] It should be noted that the embodiment of the present application generates a corresponding task processing result, returns the task processing result to the file system, marks the pending event task status as a terminated state, and completes the pending event task. Specifically, the corresponding task processing result is returned to the file system by calling the IoCompleteRequest function to complete the pending event task.

[0060] As can be seen from the above, the present application needs to pre-register the filter driver, set the kernel file operation event type that needs to be intercepted in the filter, and parse the intercepted kernel file operation event to obtain the corresponding event task to be processed. By delivering the target task to the preset task pool, the status can be returned without waiting for processing. The file system marks the suspended status of the task, and the file system can process other operation events, which can improve the concurrency; and the present application reports the event task to be processed to the decision maker through the task processing pool, so that the decision maker generates a decision result for the event task to be processed according to the context object corresponding to the event to be processed, and returns the decision result to the task processing pool, thereby avoiding the user's manual participation in task processing, reducing the user's operation complexity, improving the task processing efficiency, and improving the user experience.

[0061] For further information, see Figure 2 As shown, for an open operation event, the present application provides a task processing method based on a file system filter, including:

[0062] Step S21: intercept the current kernel file operation event of the file system based on the open event type to obtain the corresponding event task to be processed.

[0063] Step S22: reporting the pending event task to the task processing pool, and returning a status identifier for the pending event task to the file system, so that the file system marks the pending event task as suspended according to the status identifier.

[0064] Step S23: reporting the pending event task to the decision maker through the task processing pool, so that the decision maker returns the decision result issued for the pending event task to the task processing pool.

[0065] Step S24: Process the pending event task based on the open event type and the decision result, and then return the corresponding task processing result to the file system by calling the IoCompleteRequest function to complete the pending event task.

[0066] In this embodiment, for the event task of the open operation event, the file corresponding to the event task is plaintext buffered or ciphertext buffered based on the user rights corresponding to the user information in the corresponding context object and the decision result of the event task, and the corresponding task processing result is obtained. Specifically, the processing of the event task to be processed based on the open event type and the decision result includes: for the first event task of the open operation event, the file corresponding to the first event task is plaintext buffered or ciphertext buffered based on the user rights corresponding to the user information in the corresponding context object and the decision result of the first event task, and the corresponding first task processing result is obtained. That is, according to the user rights corresponding to the user information in the context object, it is judged whether the user has the authority to open the kernel file corresponding to the open operation event. If the user is an authorized user, it means that the user has the authority to open the kernel file, and when performing the opening operation, plain text buffering is performed, and the file data content of the kernel file is displayed to the user in plain text, so that the file data content is readable; if the user is an unauthorized user, it means that the user does not have the authority to open the kernel file, and when performing the opening operation, cipher text buffering is performed, and the file data content of the kernel file is displayed to the user in cipher text, so that the file data content is unreadable and the file data is not allowed to be modified. Correspondingly, the decision result of the event task is the decision result generated by the decision maker for the opening event, which can specifically be to allow or prohibit the user from performing the opening operation on the kernel file by identifying the authority of the user.

[0067] It should be noted that when multiple users access the kernel file at the same time, the kernel file can be buffered in plain text and cipher text at the same time through double buffering, and different contents can be displayed according to the user rights of different users.

[0068] Among them, the specific implementation process of the above steps S21, S22 and S23 can refer to the corresponding content in the previous embodiment, and will not be repeated here.

[0069] As can be seen from the above, this embodiment, for the open event type, through the double buffering method, can seamlessly switch between the plaintext buffer and the ciphertext buffer when authorized and unauthorized users access at the same time, which not only improves the performance, but also improves the security of local data.

[0070] For further information, see Figure 3 As shown, for read and write operation events, the present application provides a task processing method based on a file system filter, including:

[0071] Step S31: intercept the current kernel file operation event of the file system based on the read / write event type to obtain the corresponding event task to be processed.

[0072] Step S32: reporting the pending event task to the task processing pool, and returning a status identifier for the pending event task to the file system, so that the file system marks the pending event task as suspended according to the status identifier.

[0073] Step S33: reporting the pending event task to the decision maker through the task processing pool, so that the decision maker returns the decision result issued for the pending event task to the task processing pool.

[0074] Step S34: Process the pending event task based on the read / write event type and the decision result, and then return the corresponding task processing result to the file system by calling the IoCompleteRequest function to complete the pending event task.

[0075] In this embodiment, for the event task of the read-write operation event, an asynchronous process for the event task is triggered, and the file corresponding to the event task is encrypted or decrypted based on the corresponding decision result through the asynchronous process to obtain the corresponding second task processing result. Specifically, the processing of the event task to be processed based on the read-write event type and the decision result includes: for the second event task of the read-write operation event, an asynchronous process for the second event task is triggered, and the file corresponding to the second event task is encrypted or decrypted based on the corresponding decision result through the asynchronous process to obtain the corresponding second task processing result. That is, when the kernel file is read or written, the file system triggers the asynchronous process for the event task, and decrypts the kernel file data read or encrypts the kernel file data written through the asynchronous process. Correspondingly, the decision result of the event task is the decision result generated by the decision maker for the read-write event, which can be specifically obtained by obtaining the key information corresponding to the read-write event and selecting the corresponding encryption and decryption method to encrypt or decrypt the kernel file.

[0076] Among them, the specific implementation process of the above steps S31, S32 and S33 can refer to the corresponding content in the previous embodiment, and will not be repeated here.

[0077] As can be seen from the above, in this embodiment, for the read and write event types, when performing read or write operations on the kernel file through asynchronous processing, the system will trigger an asynchronous encryption or decryption operation. This operation will be performed in the background and will not affect the foreground read and write operations. It can realize concurrent reading and writing and encryption and decryption operations of files, realize transparent encryption and decryption of files, and greatly improve the read and write performance and encryption and decryption performance of files.

[0078] For further information, see Figure 4As shown, for deletion operation events and rename operation events, the present application provides a task processing method based on a file system filter, including:

[0079] Step S41: intercept the current kernel file operation event of the file system based on the deletion event type or the rename event type to obtain the corresponding event task to be processed.

[0080] Step S42: reporting the pending event task to the task processing pool, and returning a status identifier for the pending event task to the file system, so that the file system marks the pending event task as suspended according to the status identifier.

[0081] Step S43: reporting the pending event task to the decision maker through the task processing pool, so that the decision maker returns the decision result issued for the pending event task to the task processing pool.

[0082] Step S44, processing the pending event task based on the deletion event type or the renaming event type and the decision result, and then returning the corresponding task processing result to the file system by calling the IoCompleteRequest function to complete the pending event task.

[0083] In this embodiment, for the event task of the delete or rename operation event, the file corresponding to the event task is deleted or renamed based on the corresponding decision result, the corresponding task processing result is obtained, and the task processing result is made effective by calling the relevant function. Specifically, the processing of the event task to be processed based on the delete or rename event type and the decision result includes: for the third event task of the delete or rename operation event, the file corresponding to the third event task is deleted or renamed based on the decision result of the third event task, and the corresponding initial processing result is obtained; the initial processing result is made effective by calling the FltSetCallbackDataDirty function, and the corresponding third task processing result is obtained. That is, when the kernel file is deleted or renamed, it is necessary to call the FltSetCallbackDataDirty function to make the operation result of deleting the kernel file data or renaming the kernel file effective, which can prevent file data from being wrong or lost.

[0084] Among them, the specific implementation process of the above steps S41, S42 and S43 can refer to the corresponding content in the previous embodiment, and will not be repeated here.

[0085] As can be seen from the above, this embodiment targets the deletion or renaming event task. By delivering the target task to the preset task pool, the status can be returned without waiting for processing. The file system marks the suspended status of the task, and the file system can process other operation events, thereby improving the concurrency. In addition, the present application can process related tasks based on the decision results to obtain the final task processing results, thereby avoiding manual participation of users in task processing, reducing the complexity of user operations, improving task processing efficiency, and improving user experience.

[0086] For further information, see Figure 5 As shown, the present application provides a task processing method based on a file system filter, comprising:

[0087] In an embodiment of the present application, the IO (input output) manager of the file system is connected to the file filter driver, and before the filter intercepts the kernel file operation event, it is necessary to pre-register the file filter driver and set the kernel file operation event type to be intercepted through the filter. The file filter intercepts the kernel file operation event from the file system based on the preset kernel file operation event type, performs a parsing operation on several intercepted kernel file operation events, saves the context object corresponding to the kernel file operation event, and generates a pending event task corresponding to the kernel file operation event. After the pending event task is delivered to the task processing pool, it immediately returns to the suspended state. Specifically, after the file filter driver performs the task delivery operation, it immediately returns to the MORE_REQUESTING state to the Filter Manager (filter management framework).

[0088] The task processing pool reports the pending event task to the decision maker so that the decision maker can generate a decision result corresponding to the pending event task; wherein, the decision maker can perform decision processing on the pending event task in kernel state or user state to obtain the decision result. Specifically, the decision maker generates a decision result corresponding to the pending event task by authentication, key acquisition, policy processing and encryption according to the kernel file operation event type. The thread that issues the decision result delivers the decision result to the work queue for IO processing by calling the IoQueueWorkItem function. Figure 5 in the active processing), so as to perform data processing on the to-be-processed event task in the work queue based on the decision result.

[0089] For the opening event, authentication is performed based on the user information performing the opening operation to determine whether the user is an authorized user. If the user is an authorized user, a plaintext buffering method is adopted during the opening operation to make the file content readable; if the user is an unauthorized user, a ciphertext buffering method is adopted during the opening operation to hide the file content, and the user is not allowed to modify the file content, thereby improving the security of the file.

[0090] For read and write events, the kernel file is encrypted and decrypted by obtaining the corresponding key, wherein the encryption and decryption operation is performed through an asynchronous thread, that is, when a file is read or written, the file system triggers an asynchronous encryption or decryption operation, which is performed in the background and does not affect the foreground read and write operations. In this way, concurrent read and write and encryption and decryption operations of files can be achieved, thereby greatly improving the read and write performance and encryption and decryption performance of files.

[0091] For deletion and renaming events, after the kernel file is deleted or renamed, the result of the change needs to be returned to the file system, and the FltSetCallbackDataDirty function is called to make the result of the change effective.

[0092] As can be seen from the above, the present application intercepts the current kernel file operation event of the file system based on the preset kernel file operation event type, obtains the corresponding pending event task, delivers the target task to the preset task pool through the filter driver, and returns the state without waiting for processing. The suspended state of the task is marked by the file system, and the file system can process other operation events, which can improve the concurrency; and the present application reports the pending event task to the decision maker through the task processing pool, so that the decision maker returns the decision result issued by authentication, key acquisition and policy processing for the pending event task to the task processing pool, and processes the related open event task, read event task, write event task, close event task, delete event task and rename event task based on the decision result, obtains the final task processing result, and then returns the corresponding task processing result to the file system by calling the IoCompleteRequest function to complete the pending event task. Avoiding the user's manual participation in task processing reduces the user's operation complexity, improves the task processing efficiency, and can improve the user experience.

[0093] See also Figure 6 As shown, the embodiment of the present application also provides a task processing device based on a file system filter, including:

[0094] An event task acquisition module 11 is used to intercept the current kernel file operation event of the file system based on a preset kernel file operation event type to obtain a corresponding event task to be processed;

[0095] An event task reporting module 12 is used to report the pending event task to the task processing pool, and return a status identifier for the pending event task to the file system, so that the file system marks the pending event task as a suspended state according to the status identifier;

[0096] A decision result generating module 13, used for reporting the pending event task to the decision maker through the task processing pool, so that the decision maker returns the decision result issued for the pending event task to the task processing pool;

[0097] The event task processing module 14 is used to process the pending event task based on the preset kernel file operation event type and the decision result, and then return the corresponding task processing result to the file system by calling the IoCompleteRequest function to complete the pending event task.

[0098] As can be seen from the above, this embodiment delivers the target task to the preset task pool, and the status can be returned without waiting for processing. The file system marks the suspended status of the task, and the file system can handle other operation events, which can improve the concurrency; and the present application can process related tasks based on the decision results to obtain the final task processing results, thereby avoiding users' manual participation in task processing, reducing the user's operation complexity, improving task processing efficiency, and improving user experience.

[0099] In some specific implementations, the event task acquisition module 11 may specifically include:

[0100] An event interception unit, used for intercepting the current kernel file operation event of the file system based on a preset kernel file operation event type, and obtaining a number of events to be processed;

[0101] The event task generating unit is used to save the context object corresponding to the event to be processed, and perform a parsing operation on the event to be processed to obtain a corresponding event task to be processed; the context object includes user information.

[0102] In some specific implementations, the decision result generating module 13 may specifically include:

[0103] A decision result generating unit, used for reporting the pending event task to the decision maker through the task processing pool, so that the decision maker issues the decision result for the pending event task through kernel mode or user mode;

[0104] The decision result returning unit is used to return the decision result issued for the pending event task to the task processing pool by calling the IoQueueWorkItem function.

[0105] In some specific implementations, the event task processing module 14 may specifically include:

[0106] An event task grouping submodule, used for grouping the event tasks to be processed and the decision results according to the preset kernel file operation event type, to obtain a plurality of groups of event tasks to be processed and corresponding decision results corresponding to different operation events;

[0107] The processing result returning submodule is used to return the corresponding task processing result to the file system by calling the IoCompleteRequest function to complete the pending event task;

[0108] The event task processing submodule is used to process a single group of pending event tasks and corresponding decision results based on the decision results and in combination with the context object of the pending event task corresponding to the pending event task to obtain the corresponding task processing result;

[0109] Accordingly, the event task processing submodule may specifically include:

[0110] A first task processing unit is used to perform plaintext buffering or ciphertext buffering on a file corresponding to the first event task of the opening operation event based on the user authority corresponding to the user information in the corresponding context object and the decision result of the first event task, so as to obtain a corresponding first task processing result;

[0111] A second task processing unit is used to trigger an asynchronous process for the second event task of the read / write operation event, and encrypt or decrypt the file corresponding to the second event task based on the corresponding decision result through the asynchronous process to obtain a corresponding second task processing result;

[0112] A third task processing unit, for a third event task of a delete or rename operation event, performs a delete process or a rename process on a file corresponding to the third event task based on a decision result of the third event task, and obtains a corresponding initial processing result;

[0113] The task validation unit is used to validate the initial processing result by calling the FltSetCallbackDataDirty function to obtain the corresponding third task processing result.

[0114] Furthermore, the present application also discloses an electronic device. Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the task processing method based on the file system filter disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0115] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0116] In addition, the memory 22 as a carrier for storing resources may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be temporary storage or permanent storage.

[0117] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, which may be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the task processing method based on the file system filter performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks.

[0118] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the task processing method based on the file system filter disclosed above is implemented. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the above embodiments, and no further description will be given here.

[0119] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0120] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0121] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0122] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0123] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A task processing method based on a file system filter, characterized in that: include: Based on the preset kernel file operation event type, the current kernel file operation event of the file system is intercepted to obtain the corresponding event task to be processed; Reporting the pending event task to the task processing pool, and returning a status identifier for the pending event task to the file system, so that the file system marks the pending event task as a suspended state according to the status identifier; Reporting the pending event task to the decision maker through the task processing pool, so that the decision maker returns the decision result issued for the pending event task to the task processing pool; The pending event task is processed based on the preset kernel file operation event type and the decision result, and then the corresponding task processing result is returned to the file system by calling the IoCompleteRequest function to complete the pending event task.

2. The task processing method based on file system filter according to claim 1, characterized in that: The method of intercepting the current kernel file operation event of the file system based on the preset kernel file operation event type to obtain the corresponding event task to be processed includes: Based on the preset kernel file operation event type, the current kernel file operation event of the file system is intercepted to obtain a number of events to be processed; The context object corresponding to the event to be processed is saved, and the event to be processed is parsed to obtain a corresponding event task to be processed; the context object includes user information.

3. The task processing method based on file system filter according to claim 1, characterized in that: The decision maker returns the decision result issued for the pending event task to the task processing pool, including: The decision maker issues a decision result for the event task to be processed via kernel mode or user mode, and returns the decision result to the task processing pool.

4. The task processing method based on file system filter according to claim 2, characterized in that: The processing of the event task to be processed based on the preset kernel file operation event type and the decision result includes: The event tasks to be processed and the decision results are grouped according to the preset kernel file operation event type to obtain a plurality of groups of event tasks to be processed and corresponding decision results corresponding to different operation events; For a single group of pending event tasks and corresponding decision results, the pending event tasks are processed based on the decision results and in combination with the context objects of the pending events corresponding to the pending event tasks to obtain corresponding task processing results.

5. The task processing method based on file system filter according to claim 4 is characterized in that: The processing of the event task to be processed based on the preset kernel file operation event type and the decision result includes: For the first event task of the open operation event, based on the user authority corresponding to the user information in the corresponding context object and the decision result of the first event task, the file corresponding to the first event task is buffered in plain text or in cipher text to obtain the corresponding first task processing result; For the second event task of the read / write operation event, trigger an asynchronous process for the second event task, and encrypt or decrypt the file corresponding to the second event task based on the corresponding decision result through the asynchronous process to obtain a corresponding second task processing result; For the third event task of the deletion or renaming operation event, the file corresponding to the third event task is deleted or renamed based on the corresponding decision result to obtain the corresponding third task processing result.

6. The task processing method based on file system filter according to claim 5, characterized in that: The deleting or renaming the file corresponding to the third event task based on the corresponding decision result to obtain the corresponding third task processing result includes: Deleting or renaming the file corresponding to the third event task based on the decision result of the third event task to obtain a corresponding initial processing result; The initial processing result is made effective by calling the FltSetCallbackDataDirty function, and the corresponding third task processing result is obtained.

7. The task processing method based on file system filter according to any one of claims 1 to 6, characterized in that: The decision maker returns the decision result issued for the pending event task to the task processing pool, including: The decision maker returns the decision result issued for the pending event task to the task processing pool by calling the IoQueueWorkItem function.

8. A task processing device based on a file system filter, characterized in that: include: An event task acquisition module is used to intercept the current kernel file operation event of the file system based on a preset kernel file operation event type to obtain a corresponding event task to be processed; An event task reporting module, used for reporting the pending event task to the task processing pool, and returning a status identifier for the pending event task to the file system, so that the file system marks the pending event task as a suspended state according to the status identifier; A decision result generating module, used for reporting the pending event task to the decision maker through the task processing pool, so that the decision maker returns the decision result issued for the pending event task to the task processing pool; The event task processing module is used to process the pending event task based on the preset kernel file operation event type and the decision result, and then return the corresponding task processing result to the file system by calling the IoCompleteRequest function to complete the pending event task.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the task processing method based on the file system filter as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the task processing method based on the file system filter according to any one of claims 1 to 7 is implemented.