A method and system for handling read and write operations

By comparing the directory paths and contents of read and write operations in the synchronous queues of heterogeneous applications, the data security problem caused by hacker hijacking is solved, and effective protection of computer data is achieved.

CN114168944BActive Publication Date: 2025-10-21ZHENGZHOU ANGSHI INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111485660.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-07
Publication Date
2025-10-21
Estimated Expiration
2041-12-07

AI Technical Summary

Technical Problem

In the existing technology, hackers hijack the control flow of application programs through means such as buffer overflow, resulting in malicious reading and writing of computer data, and there is a lack of effective protection measures.

Method used

By reading target operations in the synchronous queues of heterogeneous applications and comparing the consistency of the operation directory path and content, inconsistent read or write operations are prevented to ensure data security.

Benefits of technology

Effectively intercept malicious read and write operations, protect computer data from being stolen or damaged, and improve data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114168944B_ABST
    Figure CN114168944B_ABST
Patent Text Reader

Abstract

The application provides a method and system for processing read-write operations, which comprises the following steps: reading target operations from each isomeric application program corresponding synchronization queue, the target operation being a to-be-processed operation stored at the head of the synchronization queue; comparing whether the operation directory paths of the target operations are consistent and comparing whether the operation contents of the target operations are consistent, so as to determine whether the target operations have differences, and preventing the read operation or the write operation corresponding to the target operation when there are differences. In the scheme, the to-be-processed operations stored at the head of each synchronization queue are compared to detect whether there are malicious read-write operations, and the malicious read-write operations are intercepted when they exist, so that the security of data in the computer is improved, and the data stored in the computer is protected from being stolen or damaged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software protection, and in particular to a method and system for processing read and write operations. Background Art

[0002] With the rapid development of information technology, more and more software systems have penetrated into our lives, and more and more data are stored in software systems, providing convenience for our lives.

[0003] In software systems, data is often stored in computers as electronic documents. While this convenience comes with numerous security risks, hackers can hijack the application's control flow through methods like buffer overflows, allowing them to maliciously read and write files. Therefore, protecting computer data from theft and corruption is a pressing issue. Summary of the Invention

[0004] In view of this, an embodiment of the present invention provides a method and system for processing read and write operations to achieve the purpose of protecting data stored in a computer from being stolen or damaged.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] A first aspect of an embodiment of the present invention discloses a method for processing a read and write operation, the method comprising:

[0007] When the synchronization queue corresponding to each heterogeneous application is not empty, read a target operation from each synchronization queue, where the target operation is a pending operation stored in the synchronization queue and located at the head of the queue. The target operation is a read operation or a write operation. The pending operation stored in the synchronization queue is sent by the heterogeneous application, and each heterogeneous application corresponds to one synchronization queue;

[0008] Comparing whether the operation directory path of each target operation is consistent, and comparing whether the operation content of each target operation is consistent;

[0009] If the operation directory path of any target operation is inconsistent with the operation directory path of other target operations, or if the operation content of any target operation is inconsistent with the operation content of other target operations, stop the target operation.

[0010] Preferably, the comparing whether the operation directory paths of each target operation are consistent, and comparing whether the operation contents of each target operation are consistent, includes:

[0011] When the target operation is a read operation, comparing whether the read directory paths of each target operation are consistent, and comparing whether the read contents of each target operation are consistent;

[0012] When the target operation is a write operation, the write directory paths of each target operation are compared to see whether they are consistent, and the write contents of each target operation are compared to see whether they are consistent.

[0013] Preferably, it also includes:

[0014] If the operation directory path of each target operation is consistent and the operation content of each target operation is consistent, the target operation is sent to the underlying file system, so that the underlying file system executes the target operation.

[0015] Preferably, before reading the target operation from each of the synchronization queues, the method further includes:

[0016] Receive the pending operations sent by each heterogeneous application, and store each of the pending operations in a synchronization queue corresponding to each of the heterogeneous applications.

[0017] Preferably, the synchronization queue stores the pending operations in a first-in-first-out manner.

[0018] A second aspect of an embodiment of the present invention discloses a system for processing read and write operations, the system comprising:

[0019] A read and write operation synchronization module, configured to read a target operation from each synchronization queue when the synchronization queue corresponding to each heterogeneous application is not empty, wherein the target operation is a pending operation stored in the synchronization queue and located at the head of the queue. The target operation is a read operation or a write operation. The pending operation stored in the synchronization queue is sent by the heterogeneous application, and each heterogeneous application corresponds to one synchronization queue;

[0020] A read-write content comparison module is used to compare whether the operation directory path of each target operation is consistent, and to compare whether the operation content of each target operation is consistent;

[0021] The stopping module is used to stop the target operation if the operation directory path of any target operation is inconsistent with the operation directory path of other target operations, or if the operation content of any target operation is inconsistent with the operation content of other target operations.

[0022] Preferably, the read-write content comparison module includes:

[0023] a read comparison unit, configured to, when the target operation is a read operation, compare whether the read directory paths of each target operation are consistent, and compare whether the read contents of each target operation are consistent;

[0024] The write comparison unit is used to compare whether the write directory paths of each target operation are consistent and whether the write contents of each target operation are consistent when the target operation is a write operation.

[0025] Preferably, it also includes:

[0026] The sending module is used to send the target operation to the underlying file system if the operation directory path of each target operation is consistent and the operation content of each target operation is consistent, so that the underlying file system executes the target operation.

[0027] Preferably, the read-write operation synchronization module is further configured to: receive pending operations sent by each heterogeneous application, and store each pending operation in a synchronization queue corresponding to each heterogeneous application.

[0028] Preferably, the synchronization queue in the read-write operation synchronization module stores the pending operations in a first-in-first-out manner.

[0029] Based on the above-mentioned embodiment of the present invention, a method and system for processing read and write operations are provided. The method is as follows: reading the target operation from the synchronization queue corresponding to each heterogeneous application, where the target operation is the pending operation stored at the head of the queue in the synchronization queue; comparing whether the operation directory path of the target operation is consistent, and comparing whether the operation content of the target operation is consistent, thereby determining whether there is a difference in the target operation, and blocking the read operation or write operation corresponding to the target operation when there is a difference. In this solution, by comparing the pending operations stored at the head of the queue in each synchronization queue, it is detected whether there are malicious read and write operations, and when there are malicious read and write operations, they are intercepted, thereby improving the security of the data in the computer and protecting the data stored in the computer from being stolen or damaged. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0031] Figure 1 A flowchart of a method for processing read and write operations provided by an embodiment of the present invention;

[0032] Figure 2 A schematic diagram illustrating the principles of a method for processing read and write operations provided by an embodiment of the present invention;

[0033] Figure 3 A structural block diagram of a system for processing read and write operations provided by an embodiment of the present invention;

[0034] Figure 4 Another structural block diagram of a system for processing read and write operations provided by an embodiment of the present invention;

[0035] Figure 5 Another structural block diagram of a system for processing read and write operations provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative efforts are within the scope of protection of the present invention.

[0037] In this application, the terms "comprises," "comprising," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0038] As we know from the background, in software systems, data is mostly stored in the form of electronic documents on computers. While this is convenient, it also brings many security issues. Hackers can hijack the control flow of applications through methods such as buffer overflows, and then conduct malicious file reading and writing. Therefore, protecting computer data from theft or damage is an urgent problem that needs to be solved.

[0039] Therefore, an embodiment of the present invention provides a method and system for processing read and write operations. The method comprises the following steps: when each synchronization queue corresponding to each heterogeneous application is not empty, the target operation is read from each synchronization queue; the operation directory paths of multiple target operations are compared to determine whether they are consistent, and the operation contents of multiple target operations are compared to determine whether the target operation contains malicious read or write operations based on the comparison results. If a malicious read or write operation is found, the target operation is stopped. This method prevents data from being destroyed, overwritten, or leaked, thereby improving the security of data in the computer.

[0040] It should be noted that the method for processing read and write operations provided by the embodiment of the present invention can be used to detect whether the pending operations (read operations or write operations) of heterogeneous applications are malicious read and write operations, and intercept malicious read and write operations. The data in the computer is protected from being stolen or damaged. Among them, the multiple heterogeneous applications mentioned in the embodiment of the present invention can be a group of applications generated by software technologies such as diversified compilation. This group of heterogeneous applications has the same functions and is structurally heterogeneous. When this group of heterogeneous applications runs normally, the same pending operations (such as read operations or write operations) will be generated. After repeated research and verification, the inventor found that when a hacker hijacks the control flow of any heterogeneous application, the pending operations of the hijacked heterogeneous application will be abnormal, and the pending operations of the hijacked heterogeneous application will be inconsistent with the pending operations of other heterogeneous applications. Based on this research result, the method for processing read and write operations provided by the embodiment of the present invention is proposed. The specific content of this method is detailed in the following embodiments.

[0041] See also Figure 1 , shows a flow chart of a method for processing read and write operations provided by an embodiment of the present invention, the method for processing read and write operations comprising:

[0042] Step S101: when the synchronization queues corresponding to the heterogeneous applications are not empty, read the target operation from each synchronization queue.

[0043] It is understandable that each heterogeneous application has a corresponding synchronization queue, that is, there are as many synchronization queues as there are heterogeneous applications. For example, if there are four heterogeneous applications, there will be four synchronization queues corresponding to the four heterogeneous applications.

[0044] As can be seen from the above content, each heterogeneous application generates pending operations during normal operation. Before being sent to the underlying file system, these pending operations are first stored in the synchronization queue corresponding to each heterogeneous application.

[0045] It should be noted that for each heterogeneous application, pending operations sent by the heterogeneous application are stored in the corresponding synchronization queue of the heterogeneous application. That is, the pending operations stored in a synchronization queue all come from the same heterogeneous application. When the pending operations sent by the heterogeneous applications are stored in the corresponding synchronization queue, the synchronization queue stores these pending operations on a first-in, first-out basis.

[0046] In the specific implementation of step S101 , when each synchronization queue stores pending operations sent by heterogeneous applications, the synchronizer can be used to retrieve the target operation from the synchronization queue corresponding to each heterogeneous application.

[0047] It should be noted that the target operation is the pending operation stored in the synchronization queue and located at the head of the queue. The target operation can be a read operation or a write operation.

[0048] In some specific embodiments, after the synchronizer is used to retrieve the target operation, if the target operation is a read operation, the read operation agent is used to obtain the target operation and intercept the actual read operation; if the target operation is a write operation, the write operation agent is used to obtain the target operation and intercept the actual write operation.

[0049] It is understandable that each heterogeneous application will generate the same read operation or write operation during normal operation. For example, assuming there are two heterogeneous applications, the synchronization queues corresponding to the two heterogeneous applications are synchronization queue 1 and synchronization queue 2. A synchronizer is used to take out a pending operation from the head of the synchronization queue 1 to obtain target operation 1; a synchronizer is used to take out a pending operation from the head of the synchronization queue 2 to obtain target operation 2. If target operation 1 is a read operation, target operation 2 is also a read operation. If target operation 1 is a write operation, target operation 2 is also a write operation. By comparing the target operations corresponding to each heterogeneous application, it can be determined whether the target operation is a malicious read operation or write operation. See the following steps for details.

[0050] Step S102: Compare the operation directory paths of each target operation to see if they are consistent. If the operation directory paths of each target operation are consistent, execute step S103; if the operation directory path of any target operation is inconsistent with the operation directory path of other target operations, execute step S104.

[0051] In the process of specifically implementing step S102, when the target operation is a read operation, the target operation is sent to the read operation comparator through the read operation agent, and the read operation comparator is used to compare whether the read directory path of each target operation is consistent. When the read directory path of each target operation is consistent, step S103 is executed; when the read directory path of any target operation is inconsistent with the read directory path of other target operations, step S104 is executed.

[0052] When the target operation is a write operation, the write operation agent sends the target operation to the write operation comparator, which compares the write directory paths of each target operation to see if they are consistent. If the write directory paths of each target operation are consistent, step S103 is executed; if the write directory path of any target operation is inconsistent with the write directory path of another target operation, step S104 is executed.

[0053] It can be understood that, for example, there are three target operations, namely target operation 1, target operation 2, and target operation 3. If the three target operations are all read operations, the read directory path of target operation 1 is path A; the read directory path of target operation 2 is path A; and the read directory path of target operation 3 is path A; in this case, the read directory paths of the three target operations are all path A, indicating that the read directory paths of each target operation are consistent. If the three target operations are all write operations, the write directory path of target operation 1 is path B; the write directory path of target operation 2 is path B; and the write directory path of target operation 3 is path B; in this case, the write directory paths of the three target operations are all path B, indicating that the write directory paths of each target operation are consistent.

[0054] Step S103: Compare the operation contents of each target operation to see if they are consistent. If the operation contents of each target operation are consistent, execute step S105; if the operation contents of any target operation are inconsistent with the operation contents of other target operations, execute step S104.

[0055] In the process of specifically implementing step S103, after determining that the operation directory paths of each target operation are consistent through the above-mentioned step S102, when the target operation is a read operation, a read operation comparator is used to compare whether the read content of each target operation is consistent. When the read content of each target operation is consistent, step S105 is executed; when the read content of any target operation is inconsistent with the read content of other target operations, step S104 is executed.

[0056] It can be understood that, for example, there are four target operations, target operation 1, target operation 2, target operation 3, and target operation 4, and the operation directory paths of the four target operations are determined to be consistent. If the four target operations are all read operations, wherein the read content of target operation 1 is content A; the read content of target operation 2 is content A; the read content of target operation 3 is content A; and the read content of target operation 4 is content B; at this time, among the read contents of the four target operations, the read content of target operation 4 is inconsistent with the read contents of the other target operations, indicating that there is an abnormal read operation, and there may be a malicious read operation (such as a malicious read operation). If the four target operations are all write operations, wherein the write content of target operation 1 is content B; the write content of target operation 2 is content B; the write content of target operation 3 is content B; and the write content of target operation 4 is content C; at this time, among the write contents of the four target operations, the write content of target operation 4 is inconsistent with the write contents of the other target operations, indicating that there is an abnormal write operation (such as a malicious write operation).

[0057] After determining that the operation directory paths of each target operation are consistent through the above-mentioned step S102, when the target operation is a write operation, a write operation comparator is used to compare whether the write contents of each target operation are consistent. When the write contents of each target operation are consistent, step S105 is executed; when the write contents of any target operation are inconsistent with the write contents of other target operations, step S104 is executed.

[0058] It should be noted that the execution order of step S102 and step S103 can be as described above: first execute step S102, then execute step S103; or first execute step S103, then execute step S102. In the embodiment of the present invention, the execution order of step S102 and step S103 is only for illustration.

[0059] Specifically, step S103 is executed first: compare whether the operation content of each target operation is consistent; when the operation content of any target operation is inconsistent with the operation content of other target operations, execute step S104; when the operation content of each target operation is consistent, execute step S102. At this time, the specific content of step S102 is: compare whether the operation directory path of each target operation is consistent; when the operation directory path of each target operation is consistent, execute step S105; when the operation directory path of any target operation is inconsistent with the operation directory path of other target operations, execute step S104.

[0060] That is, sending the target operation to the underlying file system requires that two conditions are met at the same time. The first condition is that the operation directory path of each target operation is consistent, and the second condition is that the operation content of each target operation is consistent.

[0061] Step S104: Stop the target operation.

[0062] In the process of implementing step S104, when the operation directory path of any target operation is inconsistent with the operation directory path of other target operations, or when the operation content of any target operation is inconsistent with the operation content of other target operations, it indicates that there are malicious operations (such as malicious read operations or malicious write operations) in multiple target operations, and all target operations are stopped, that is, the read operation or write operation of this heterogeneous application is terminated.

[0063] Step S105: If the operation directory path of each target operation is consistent and the operation content of each target operation is consistent, the target operation is sent to the underlying file system.

[0064] It can be understood that when the operation directory path of each target operation is consistent and the operation content of each target operation is consistent, it indicates that there is no malicious operation in multiple target operations, that is, there is no malicious data damage. At this time, each target operation can be sent to the underlying file system to enable the underlying file system to execute the target operation.

[0065] From the above content, it can be seen that the target operation is the pending operation stored in the synchronization queue at the head of the queue. After taking the target operation out of the synchronization queue and processing the target operation through the above steps (stopping the target operation or sending the target operation to the underlying file system), return to step S101 until the processing of each pending operation stored in the synchronization queue is completed.

[0066] In an embodiment of the present invention, each target operation is compared to see whether there is any inconsistent target operation. When an inconsistent target operation exists, the inconsistent target operation can be stopped in time, effectively protecting the data in the computer from being maliciously read or maliciously written, thereby improving the security of the data.

[0067] In the above-mentioned embodiment of the present invention Figure 1 In the disclosed content, the target operation is processed by a synchronizer, a read operation agent, a write operation agent, a read operation comparator and a write operation comparator. In order to better explain the process of processing the target operation, Figure 2 The schematic diagram of the principle of the method for processing read and write operations is shown for illustration.

[0068] Figure 2 There are two heterogeneous applications, namely heterogeneous application a1 and heterogeneous application a2; the read and write operations generated by heterogeneous application a1 are stored in the synchronization queue a1 corresponding to the heterogeneous application a1, and the read and write operations generated by the heterogeneous application a2 are stored in the synchronization queue a2 corresponding to the heterogeneous application a2.

[0069] A synchronizer is used to take out a target operation from the head of the synchronization queue a1, and a synchronizer is used to take out a target operation from the head of the synchronization queue a2.

[0070] When the two target operations retrieved are read operations, the two target operations are sent to the read operation comparator through the read operation agent. The read operation comparator compares whether the read directory paths (that is, the operation directory paths) of the two target operations are consistent, and compares whether the read contents (that is, the operation contents) of the two target operations are consistent.

[0071] When the two target operations retrieved are write operations, the two target operations are sent to the write operation comparator through the write operation agent. The write operation comparator compares whether the write directory paths (that is, the operation directory paths) of the two target operations are consistent, and compares whether the write contents (that is, the operation contents) of the two target operations are consistent.

[0072] When the operation directory paths of the two target operations are consistent and the operation contents of the two target operations are consistent, the two target operations are sent to the underlying file system, so that the underlying file system executes the two target operations.

[0073] When the operation directory path of any target operation is inconsistent with the operation directory path of another target operation, or when the operation content of any target operation is inconsistent with the operation content of another target operation, all target operations are stopped, that is, the read operation or write operation of this heterogeneous application is terminated.

[0074] Corresponding to the method for processing read and write operations provided by the above embodiment of the present invention, see Figure 3 The embodiment of the present invention further provides a structural block diagram of a system for processing read and write operations, the system for processing read and write operations includes: a read and write operation synchronization module 301, a read and write content comparison module 302 and a stop module 303:

[0075] The read and write operation synchronization module 301 is used to read the target operation from each synchronization queue when the synchronization queue corresponding to each heterogeneous application is not empty. The target operation is the pending operation stored in the synchronization queue at the head of the queue. The target operation is a read operation or a write operation. The pending operations stored in the synchronization queue are sent by the heterogeneous application. Each heterogeneous application corresponds to a synchronization queue.

[0076] Preferably, the read-write operation synchronization module 301 is further configured to receive pending operations sent by each heterogeneous application, and store each pending operation in a synchronization queue corresponding to each heterogeneous application.

[0077] It should be noted that the synchronization queue in the read-write operation synchronization module 301 stores pending operations in a first-in-first-out manner.

[0078] The read-write content comparison module 302 is used to compare whether the operation directory path of each target operation is consistent, and to compare whether the operation content of each target operation is consistent.

[0079] The stopping module 303 is configured to stop the target operation if the operation directory path of any target operation is inconsistent with the operation directory paths of other target operations, or if the operation content of any target operation is inconsistent with the operation content of other target operations.

[0080] In an embodiment of the present invention, inconsistent pending operations in heterogeneous applications can be discovered in a timely manner, and a rapid termination response can be made to the inconsistent pending operations, preventing data in the computer from being destroyed, changed or leaked, thereby ensuring the availability and integrity of the data in the computer.

[0081] Preferably, combined Figure 3 For the contents shown, see Figure 4 , shows another structural block diagram of a system for processing read and write operations provided by an embodiment of the present invention. The read and write content comparison module 302 includes: a read comparison unit 3021 and a write comparison unit 3022. The execution principle of each unit is as follows:

[0082] The read comparison unit 3021 is used to compare whether the read directory paths of each target operation are consistent and whether the read contents of each target operation are consistent when the target operation is a read operation.

[0083] The write comparison unit 3022 is used to compare whether the write directory paths of each target operation are consistent and whether the write contents of each target operation are consistent when the target operation is a write operation.

[0084] Preferably, combined Figure 3 For the contents shown, see Figure 5 , shows another structural block diagram of a system for processing read and write operations provided by an embodiment of the present invention, the system for processing read and write operations further comprising:

[0085] The sending module 304 is configured to send the target operation to the underlying file system if the operation directory path of each target operation is consistent and the operation content of each target operation is consistent, so that the underlying file system executes the target operation.

[0086] In an embodiment of the present invention, for pending operations generated by heterogeneous applications, target operations at the head of a queue in a group of synchronous queues are read for comparison. Based on the comparison results, it is promptly checked whether the data reading operation or writing operation is normal, ensuring that the data is not tampered with without authorization or that tampering can be quickly discovered.

[0087] In summary, an embodiment of the present invention provides a method and system for processing read and write operations, which is as follows: receiving pending operations sent by each heterogeneous application, and storing these pending operations in a first-in-first-out manner in a synchronization queue corresponding to each heterogeneous application; when each synchronization queue is not empty, using a synchronizer to read a pending operation from the queue head of each synchronization queue once to obtain a target operation; wherein the target operation can be a read operation or a write operation; comparing whether the directory path of the operation in the target operation is consistent, and comparing whether the operation content in the target operation is consistent; when the comparison results are consistent, sending the target operation to the underlying file system; when any of the comparison results is inconsistent, stopping the target operation. According to the comparison results, whether there is an abnormal read operation or an abnormal write operation is promptly discovered. When an abnormality exists, the abnormal read operation or write operation is blocked, thereby achieving the purpose of protecting the data stored in the computer from being maliciously stolen or maliciously damaged.

[0088] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple. For relevant parts, refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.

[0089] 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 above description has generally described the components and steps of each example according to their functions. 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 beyond the scope of the present invention.

[0090] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for processing read and write operations, characterized in that The method comprises: When the synchronization queue corresponding to each heterogeneous application is not empty, receiving the pending operations sent by each heterogeneous application, and storing each of the pending operations in the synchronization queue corresponding to each heterogeneous application respectively, and using a synchronizer to read the target operation from each synchronization queue, the target operation being the pending operation stored in the synchronization queue at the head of the queue, the target operation being a read operation or a write operation, and each heterogeneous application corresponds to one synchronization queue; Comparing whether the operation directory paths of each target operation are consistent, and comparing whether the operation contents of each target operation are consistent, including: when the target operation is a read operation, using a read operation comparator to compare whether the read directory paths of each target operation are consistent, and comparing whether the read contents of each target operation are consistent; when the target operation is a write operation, using a write operation comparator to compare whether the write directory paths of each target operation are consistent, and comparing whether the write contents of each target operation are consistent; If the operation directory path of any target operation is inconsistent with the operation directory path of other target operations, or if the operation content of any target operation is inconsistent with the operation content of other target operations, stop the target operation.

2. The method according to claim 1, characterized in that Also includes: If the operation directory path of each target operation is consistent and the operation content of each target operation is consistent, the target operation is sent to the underlying file system, so that the underlying file system executes the target operation.

3. The method according to any one of claims 1-2, characterized in that The synchronization queue stores the pending operations in a first-in-first-out manner.

4. A system for processing read and write operations, characterized in that The system comprises: A read-write operation synchronization module is configured to receive pending operations sent by each heterogeneous application when the synchronization queue corresponding to each heterogeneous application is not empty, and store each pending operation in the synchronization queue corresponding to each heterogeneous application, and use a synchronizer to read a target operation from each synchronization queue, where the target operation is the pending operation stored at the head of the synchronization queue, and the target operation is a read operation or a write operation. Each heterogeneous application corresponds to one synchronization queue; A read-write content comparison module is used to compare whether the operation directory path of each target operation is consistent, and to compare whether the operation content of each target operation is consistent; The read / write content comparison module includes: a read comparison unit and a write comparison unit; The read comparison unit is configured to, when the target operation is a read operation, use a read operation comparator to compare whether the read directory paths of each target operation are consistent, and to compare whether the read contents of each target operation are consistent; The write comparison unit is configured to, when the target operation is a write operation, compare using a write operation comparator whether the write directory paths of each target operation are consistent, and compare whether the write contents of each target operation are consistent; The stopping module is used to stop the target operation if the operation directory path of any target operation is inconsistent with the operation directory path of other target operations, or if the operation content of any target operation is inconsistent with the operation content of other target operations.

5. The system according to claim 4, characterized in that Also includes: The sending module is used to send the target operation to the underlying file system if the operation directory path of each target operation is consistent and the operation content of each target operation is consistent, so that the underlying file system executes the target operation.

6. The system according to any one of claims 4-5, characterized in that: The synchronization queue in the read-write operation synchronization module stores the pending operations in a first-in-first-out manner.

Citation Information

Patent Citations

  • Method, device and system for detecting intrusive script files

    CN106709334A

  • Abnormal operation interception method, network security device and computer readable memory medium

    CN108306857A

  • Queue-based data processing method, device, apparatus and medium

    CN109271242A