Data processing method and device
By introducing queue event processing and change mark update mechanisms in file synchronization technology, the problems of inefficient synchronization and low accuracy in the existing technology are solved, and a more efficient and accurate file synchronization process is achieved.
Patent Information
- Application Number
- CN202411602588.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-25
AI Technical Summary
The existing file synchronization technology has problems such as inefficient synchronization and low accuracy, especially when there are many local files.
By obtaining the first to be analyzed event in the queue for storing the events to be analyzed, it is determined whether there is a second to be analyzed event that meets the preset conditions, and update the file execution list according to the change mark, and finally perform file synchronization processing based on the updated list.
Improve the accuracy and efficiency of file synchronization, effectively filter out events to be analyzed for intermediate files, avoid invalid synchronization processes, and reduce resource consumption.
Smart Images

Figure CN119690932A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of file synchronization, and specifically relates to a data processing method and device. Background Art
[0002] At present, the related technology for file synchronization is implemented by traversing local files to find file changes, but this method is inefficient when there are many local files, and there is a problem of low synchronization efficiency. In order to solve the above problems, the related technology introduces a file monitoring mechanism to monitor the file changes in the specified directory. However, the events obtained by the related technology only through the file monitoring mechanism are relatively confusing, and cannot be clearly corresponding to events such as the creation or modification of files, resulting in low synchronization efficiency and low accuracy.
[0003] In other words, the related technologies of file synchronization have the problems of low synchronization efficiency and low accuracy. Summary of the invention
[0004] The embodiments of the present application provide a data processing method and device, which can solve the problems of low synchronization efficiency and low accuracy in related technologies of file synchronization.
[0005] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising: obtaining a first event to be analyzed in a queue for storing events to be analyzed; the first event to be analyzed includes a file change mark, the change mark being used to identify an event corresponding to the file; for the first event to be analyzed in the queue, determining whether there is a second event to be analyzed in the queue that meets preset conditions; the file corresponding to the second event to be analyzed is the same as the file corresponding to the first event to be analyzed; if the second event to be analyzed exists in the queue, updating a file execution list according to the change mark of the first event to be analyzed; and performing file synchronization processing on the file corresponding to the first event to be analyzed based on the updated file execution list.
[0006] In a second aspect, an embodiment of the present application provides a data processing device, comprising: an acquisition module, used to acquire a first event to be analyzed in a queue for storing events to be analyzed; the first event to be analyzed includes a file change mark, and the change mark is used to identify the event corresponding to the file; a judgment module, used to judge whether there is a second event to be analyzed in the queue that meets preset conditions with respect to the first event to be analyzed in the queue; the file corresponding to the second event to be analyzed is the same as the file corresponding to the first event to be analyzed; an update module, used to update a file execution list according to the change mark of the first event to be analyzed if the second event to be analyzed exists in the queue; and a file synchronization processing module, used to perform file synchronization processing on the file corresponding to the first event to be analyzed based on the updated file execution list.
[0007] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, wherein the executable instructions are configured to be executed by the processor, and the executable instructions include instructions for executing the data processing method as described in the first aspect.
[0008] In a fourth aspect, an embodiment of the present application provides a storage medium, wherein the storage medium is used to store computer-executable instructions, wherein the computer-executable instructions enable a computer to execute the data processing method as described in the first aspect.
[0009] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the data processing method as described in the first aspect.
[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the data processing method as described in the first aspect.
[0011] In an embodiment of the present application, a first event to be analyzed in a queue for storing events to be analyzed is obtained, wherein the first event to be analyzed includes a change mark of a file, and the change mark is used to identify an event corresponding to the file; then, for the first event to be analyzed in the queue, it is determined whether there is a second event to be analyzed in the queue that meets preset conditions, and the file corresponding to the second event to be analyzed is the same as the file corresponding to the first event to be analyzed; if there is a second event to be analyzed in the queue, the file execution list is updated according to the change mark of the first event to be analyzed; based on the updated file execution list, file synchronization processing is performed on the file corresponding to the first event to be analyzed. This solution sets a change mark (identifies the event that occurs corresponding to the file) for the events to be analyzed that are to be synchronized to the cloud, so that the synchronized events to be analyzed can clearly correspond to executable events such as the creation or modification of the file, thereby improving the accuracy of synchronization; and, when there are events to be analyzed for the same file, the file execution list is updated according to the change mark of the event to be analyzed, and then based on the updated file execution list, the file corresponding to the first event to be analyzed is synchronized, which can effectively filter out the events to be analyzed for the intermediate files in the file execution list, avoid invalid synchronization process, and thereby reduce resource consumption while improving the efficiency of synchronization, solving the problems of low synchronization efficiency and low accuracy existing in related file synchronization technologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a flowchart of a data processing method provided in an embodiment of the present application; Figure 2 is a schematic diagram of a process of updating a file execution list provided in an embodiment of the present application; Figure 3 It is a schematic diagram of a process of performing file synchronization processing provided by an embodiment of the present application; Figure 4 It is a flowchart of another data processing method provided in an embodiment of the present application; Figure 5 is a schematic diagram of a data processing system provided in an embodiment of the present application; Figure 6 is a structural schematic diagram of a data processing device provided in an embodiment of the present application; Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0013] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0014] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0015] The data processing method and device provided in the embodiments of the present application are described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0016] Figure 1 A data processing method provided by an embodiment of the present invention is shown, and the method can be executed by an electronic device, and the electronic device may include: a server and / or a terminal device, wherein the terminal device may be, for example, a vehicle-mounted terminal or a mobile phone terminal. In other words, the method can be executed by software or hardware installed in the electronic device, and the method includes the following steps: S102: Acquire a first event to be analyzed in a queue for storing events to be analyzed.
[0017] The first event to be analyzed includes a change mark of the file, and the change mark is used to identify an event corresponding to the file.
[0018] The event to be analyzed can be an event that occurs in a certain file, such as a new event, a modification event, a move event, a rename event, a delete event, etc.
[0019] Optionally, the first event to be analyzed in the queue can be obtained through the application programming interface (API) of the operating system Windows, or it can be obtained through Windows API monitoring and then processed. Specifically, Windows API provides a ReadDirectoryChangesW function for monitoring file changes, which can be used to implement file monitoring. The ReadDirectoryChangesW function is one of the functions in Windows API for implementing file monitoring. It is based on the asynchronous I / O (input / output) mechanism and monitors file changes in a specified directory through the underlying mechanism provided by the operating system.
[0020] The above-mentioned change marks may include but are not limited to new addition marks, modification marks, removal marks and rename marks, etc. Among them, the new addition mark is used to mark the new event of the file (marking that the file is created); the modification mark is used to mark the modification event of the file (marking that the file is modified); the deletion mark is used to mark the deletion event of the file (marking that the file is deleted).
[0021] S104: For the first event to be analyzed in the queue, determine whether there is a second event to be analyzed in the queue that meets a preset condition.
[0022] The file corresponding to the second event to be analyzed is the same as the file corresponding to the first event to be analyzed.
[0023] In actual applications, there may be one or more first events to be analyzed in the above queue.
[0024] Specifically, the first event to be analyzed may also include the absolute path of the file. The absolute path of the file of the first event to be analyzed (hereinafter referred to as key) and the change mark of the above file (hereinafter referred to as action) can be stored in the form of a map data structure or a list, and the storage structure can be (key, action). Among them, the Map data structure is a data structure for storing key-value pairs, in which each key is unique and is associated with a value. The Map data structure allows for fast search, storage and retrieval of related values by key. Accordingly, the preset condition can be the same as the key of the first event to be analyzed, that is, the second event to be analyzed can be the first event to be analyzed with the same key as the first event to be analyzed.
[0025] S106: If there is a second event to be analyzed in the queue, the file execution list is updated according to the change mark of the first event to be analyzed.
[0026] S108: Based on the updated file execution list, perform file synchronization processing on the file corresponding to the first event to be analyzed.
[0027] Specifically, the file execution list is used to store the events to be analyzed. According to the different change marks of the first event to be analyzed, the events to be analyzed in the file execution list that meet the preset conditions can be deleted, and / or the first event to be analyzed can be inserted into the file execution list. Thus, filtering of the events to be analyzed for the first intermediate file is achieved, wherein the first intermediate file is, for example, an intermediate file generated during the processing of the file by WPS.
[0028] In actual applications, if the second event to be analyzed does not exist in the queue, the first event to be analyzed may be directly inserted into the file execution list without considering the change mark of the first event to be analyzed.
[0029] After that, an updated file execution list is obtained, and the events to be analyzed stored in the updated file execution list are the events to be analyzed that are to be synchronized to the cloud and the local. Optionally, the events to be analyzed in the updated file execution list can be synchronized to the cloud, or the files corresponding to the events to be analyzed in the local cache can be processed accordingly according to the change marks corresponding to the events to be analyzed to obtain the processed files, and then the processed files can be synchronized to the cloud.
[0030] The data processing method provided by the embodiment of the present invention obtains a first event to be analyzed in a queue for storing events to be analyzed, wherein the first event to be analyzed includes a change mark of a file, and the change mark is used to identify an event corresponding to the file; then, for the first event to be analyzed in the queue, it is determined whether there is a second event to be analyzed in the queue that meets a preset condition, and the file corresponding to the second event to be analyzed is the same as the file corresponding to the first event to be analyzed; if there is a second event to be analyzed in the queue, the file execution list is updated according to the change mark of the first event to be analyzed; and then, based on the updated file execution list, the file corresponding to the first event to be analyzed is subjected to file synchronization processing. This solution sets a change mark (identifies the event that occurs corresponding to the file) for the events to be analyzed that are to be synchronized to the cloud, so that the synchronized events to be analyzed can clearly correspond to executable events such as the creation or modification of the file, thereby improving the accuracy of synchronization; and, when there are events to be analyzed for the same file, the file execution list is updated according to the change mark of the event to be analyzed, and then based on the updated file execution list, the file corresponding to the first event to be analyzed is synchronized, which can effectively filter out the events to be analyzed for the intermediate files in the file execution list, avoid invalid synchronization process, and thereby reduce resource consumption while improving the efficiency of synchronization, solving the problems of low synchronization efficiency and low accuracy existing in related file synchronization technologies.
[0031] In one implementation, the change mark includes a new addition mark, a modification mark, a deletion mark, and a rename mark. According to the change mark of the first event to be analyzed, the file execution list is updated (ie, S106), which can be specifically performed as follows: Steps A1 to A3: Step A1: if the change mark of the first event to be analyzed is a new addition mark or a modification mark, insert the first event to be analyzed into the file execution list.
[0032] Step A2: if the change mark of the first event to be analyzed is a deletion mark, then deleting the event to be analyzed corresponding to the file in the file execution list.
[0033] Step A3: if the change mark of the first event to be analyzed is a rename mark, delete the event to be analyzed in the file execution list corresponding to the file of the first event to be analyzed and whose change mark is a rename mark, and insert the first event to be analyzed into the file execution list.
[0034] Specifically, the first event to be analyzed may be inserted into the file execution list in the above-mentioned (key, action) format.
[0035] In actual applications, there may be one or more first events to be analyzed in the queue, such as Figure 2 As shown, the first event to be analyzed in the queue can be traversed, and matched in the order of the added mark, the modified mark, the deleted mark and the renamed mark to determine how to update the file execution list.
[0036] In this embodiment, for events to be analyzed with different change marks, the events to be analyzed in the file execution list that meet the preset conditions are deleted, and / or the first event to be analyzed is inserted into the file execution list, which can effectively filter out the events to be analyzed for the intermediate files in the file execution list.
[0037] In the above embodiment, the to-be-analyzed events that are ultimately intended to be synchronized to the cloud (i.e., the to-be-analyzed events in the above file execution list) are obtained. On this basis, this embodiment also takes into account some abnormal scenarios, so further analysis is performed on the to-be-analyzed events in the file execution list, and the corresponding files are processed to perform file synchronization. In one implementation, the above-mentioned file synchronization processing (i.e., S108) of the files corresponding to the first to-be-analyzed events based on the updated file execution list can be specifically performed as the following step B1: Step B1: Based on the storage records in the local cache, the updated file execution list and the preset synchronization rules, file synchronization processing is performed on the file corresponding to the first event to be analyzed.
[0038] The preset synchronization rule may be a rule for determining whether to process a file corresponding to an event to be analyzed, and a rule for processing files corresponding to events to be analyzed with different change marks.
[0039] Specifically, the storage records in the local cache include but are not limited to the storage records in the database.
[0040] In this embodiment, by introducing preset synchronization rules, file synchronization processing is performed on the files corresponding to the first event to be analyzed based on the storage records in the local cache and the updated file execution list, thereby avoiding file synchronization anomalies or failures, thereby improving the reliability of file synchronization.
[0041] In one implementation, based on the storage records in the local cache, the updated file execution list and the preset synchronization rules, the file corresponding to the first event to be analyzed is synchronized (ie, step B1), which can be specifically performed as follows: step a1: Step a1, for the first event to be analyzed in the updated file execution list, if the file corresponding to the first event to be analyzed is not a hidden file, file synchronization processing is performed on the file corresponding to the first event to be analyzed according to the change mark corresponding to the first event to be analyzed and the storage record in the local cache.
[0042] Specifically, it can be determined whether the file corresponding to the first event to be analyzed is a hidden file; if the file corresponding to the first event to be analyzed is a hidden file, the file corresponding to the first event to be analyzed is not processed; if the file corresponding to the first event to be analyzed is not a hidden file, the file corresponding to the first event to be analyzed is synchronized according to the change mark corresponding to the first event to be analyzed and the storage record in the local cache; In this embodiment, by not processing the to-be-analyzed events for hidden files, synchronization of files that are not required to be synchronized by the user is avoided, thereby improving the reliability of file synchronization.
[0043] In one implementation, the change mark includes a new addition mark, a modification mark, a deletion mark, and a rename mark. According to the change mark corresponding to the first event to be analyzed and the storage record in the local cache, the file corresponding to the first event to be analyzed is synchronized (i.e., step a1), which can be specifically performed as follows: steps b1 to b7: Step b1: If the change mark corresponding to the first event to be analyzed is a modification mark, determine whether the file corresponding to the first event to be analyzed exists in the storage record in the local cache.
[0044] Step b2: if it exists, modify the files corresponding to the first event to be analyzed in the local cache and the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud.
[0045] After synchronization (making the file corresponding to the first event to be analyzed in the local cache the same as the file corresponding to the first event to be analyzed in the cloud), a storage record corresponding to the modified file will exist in the storage record in the local cache.
[0046] Step b3: If it does not exist, the modified file corresponding to the first event to be analyzed is transferred to the local cache and the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud.
[0047] Of course, the file corresponding to the first event to be analyzed may also be uploaded to the cloud and, at the same time, transferred to the local cache, and then the modified file corresponding to the first event to be analyzed may be synchronized, thereby ensuring the consistency of the files stored in the cloud and the local cache.
[0048] Step b4: if the change mark corresponding to the first event to be analyzed is a deletion mark, determine whether the file corresponding to the first event to be analyzed exists in the storage record in the local cache.
[0049] Step b5: If it exists, the files corresponding to the first event to be analyzed in the local cache and in the cloud are deleted so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud.
[0050] If it does not exist, no processing will be performed.
[0051] Step b6: If the change mark corresponding to the first event to be analyzed is a rename mark, determine whether the historical name of the file corresponding to the first event to be analyzed exists in the database storage record.
[0052] Step b7: if it exists, rename the files corresponding to the first event to be analyzed in the local cache and in the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud.
[0053] Step b8: If it does not exist, the renamed file corresponding to the first event to be analyzed is transferred to the local cache and the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud.
[0054] When there are continuous operations, such as a newly created file that has not been recorded in the local cache but is renamed immediately, the change mark of the corresponding event to be analyzed is a rename mark. For this situation, it can be processed through steps b6 and b8.
[0055] In addition, if the change mark corresponding to the first event to be analyzed is a new mark, the file corresponding to the first event to be analyzed in the local cache is transferred to the local cache, and the file is synchronized to the cloud.
[0056] In actual applications, there may be one or more first events to be analyzed in the file execution list, such as Figure 3 As shown, the first event to be analyzed in the updated file execution list can be traversed to determine whether the file corresponding to the first event to be analyzed is a hidden file. If the file corresponding to the first event to be analyzed is not a hidden file, the modification mark, deletion mark, rename mark and new mark are matched in sequence to update the file corresponding to the first event to be analyzed.
[0057] In this embodiment, by performing file synchronization processing on the file corresponding to the first event to be analyzed based on the change mark corresponding to the first event to be analyzed and whether the file corresponding to the first event to be analyzed exists in the local cache storage record, erroneous updates in abnormal scenarios are avoided, thereby improving the reliability of file synchronization.
[0058] In one implementation, obtaining the first event to be analyzed in the queue (ie, S102) may be specifically performed as follows: Steps C1 to C5: Step C1, obtaining original monitoring events for file changes.
[0059] Step C2: filtering the original monitoring event based on a preset filtering condition to obtain a first monitoring event.
[0060] Specifically, the preset filtering condition may be one or more of the following: The file format of the original monitoring event corresponding file is download, tmp or wbk format; The file corresponding to the original monitoring event does not exist, and the original monitoring event is not a deletion event; Among them, the file format of the file is download, which means that the file has not been downloaded yet or is an incomplete temporary file; the file format of tmp is a temporary file generated by various software or systems; the file format of wbk (abbreviation of word back) is the backup file of word software, which is used to prevent data from being restored after user operation errors.
[0061] By filtering the original monitoring events corresponding to the second intermediate file (the temporary file and backup file) in step C2, combined with filtering the events to be analyzed corresponding to the first intermediate file in S104 to S106, multiple temporary files of multiple software can be filtered, thereby improving the compatibility and effectiveness of filtering.
[0062] Step C3, based on the first monitoring event, obtain the cache information of the file that has been synchronized with the cloud and corresponds to the first monitoring event, and modify the change mark of the cache information to obtain the target cache information.
[0063] Specifically, the cache information of the file that has been synchronized with the cloud corresponding to the first monitoring event can be obtained according to the file path corresponding to the first monitoring event. The cache information includes but is not limited to the creation time, modification time, file size, file path, and cloud-associated files. Afterwards, the cache content in the cache information can be modified, and the change mark of the cache information can be modified, wherein the cache content is modified, for example, the file name is modified for the rename event, and the parent folder name and path are modified for the move event; specifically, the change mark of the cache information can be modified, which can include modifying the change mark of the cache information, and correspondingly identifying a corresponding modification time for each change mark, wherein the modification time can be used for conflict handling and file change tracing, etc. There can be only one change mark of the same type, and the new change mark overwrites the old change mark to filter duplicate tasks. When the task mark of the file in the cache information changes, the change mark will be checked and processed according to the preset conflict rule, that is, the following step C4 is executed.
[0064] Step C4: based on the preset conflict rule, the change mark of the target cache information is cleaned up accordingly to obtain the first event to be analyzed, and the first event to be analyzed is put into the queue.
[0065] The preset conflict rule may be a rule for determining whether to process the change mark of the target cache information, and a rule for processing the target cache information with different change marks.
[0066] Step C5, obtaining the first event to be analyzed in the queue.
[0067] In this embodiment, the original monitoring events are filtered by preset filtering conditions, thereby reducing invalid synchronized events; and, change marks are set so that events can be clearly corresponded to new or modified events, thereby improving the accuracy of synchronized events; in addition, preset conflict rules are also set to ensure the rationality of the change mark setting of the event to be analyzed, thereby further improving the accuracy of the synchronized events.
[0068] In one implementation, based on the first monitoring event, obtaining cache information of the file that has been synchronized with the cloud corresponding to the first monitoring event (ie, step C3) can be specifically performed as follows: step c3.1 to step c3.2: Step c3.1, according to the file path corresponding to the first monitoring event, associate with the cache node in the local cache, and based on the cache node, obtain the cache information of the file synchronized with the cloud; and copy the cache information to the created temporary cache node.
[0069] Step c3.2, obtaining cache information from the temporary cache node.
[0070] The above-mentioned local cache stores the successfully synchronized data, but the local cache cannot reflect the real-time changes of the data. Therefore, in this embodiment, a temporary cache node is introduced to reflect the changes that have occurred locally but have not yet been synchronized to the cloud.
[0071] In one implementation, based on the preset conflict rule, the corresponding clearing process (ie, step C4) of the change mark of the target cache information can be specifically performed as follows: Steps c4.1 to c4.3: Step c4.1: If the change mark corresponding to the file is a deletion mark, check whether the file has a change mark that is a new addition mark.
[0072] If there is a change mark for a new mark, no processing is required, thereby reducing the occurrence of accidental deletion of files and further reducing the waste of resources in re-uploading a file after the cloud accidentally deletes the file.
[0073] Step c4.2: If not, delete the change mark corresponding to the file and keep the deletion mark.
[0074] Step c4.3: If the change mark corresponding to the file is a new addition mark, delete the change mark corresponding to the file and keep the deletion mark.
[0075] You can keep the deletion mark corresponding to the file and delete other change marks corresponding to the file except the deletion mark.
[0076] The above-mentioned change marks include added marks, modified marks, deleted marks, renamed marks and moved marks; the move mark is used to mark the move event that occurs to the file (marking that the location of the file has changed).
[0077] If the change mark corresponding to the file is a modification mark, a rename mark or a move mark, it can be omitted from checking and processing.
[0078] In this embodiment, by checking and clearing the change marks corresponding to the files, the rationality of the change mark settings is improved, thereby improving the accuracy of the synchronized events.
[0079] In one implementation, obtaining the original monitoring event for the file change (ie, step C1) can be specifically performed as follows: step c1.1: Step c1.1, obtaining original monitoring events of a preset duration.
[0080] The original monitoring event can be obtained, and the data is not processed immediately, but saved for a preset time and then returned together. The preset time is, for example, 3 seconds.
[0081] In this embodiment, by acquiring original monitoring events of a preset duration, it is possible to avoid frequent acquisition of data, which would cause data discontinuity.
[0082] In one implementation, obtaining the original monitoring event for the file change (ie, step C1) can be specifically performed as follows: step c1.3: Step c1.3, obtain the original monitoring events through Windows API monitoring.
[0083] In this embodiment, the Windows API is used to monitor folders and the like in real time, thereby improving the ability of the client of the data processing method to respond to file changes.
[0084] Figure 4 is a flow chart of a data processing method provided in an embodiment of the present application. Figure 4 As shown, the method includes: Step 402: Acquire original monitoring events of file changes of a preset duration through Windows API monitoring.
[0085] Step 404: Filter the original monitoring event based on the preset filtering condition to obtain the first monitoring event.
[0086] Step 406, according to the file path corresponding to the first monitoring event, associate with the cache node in the local cache, and based on the cache node, obtain the cache information of the file synchronized with the cloud; and copy the cache information to the created temporary cache node.
[0087] Step 408, obtaining cache information from the temporary cache node, and modifying the change mark of the cache information to obtain target cache information.
[0088] Step 410: Based on the preset conflict rule, the change mark of the target cache information is cleaned up accordingly to obtain the first event to be analyzed, and the first event to be analyzed is put into the queue.
[0089] If the change mark corresponding to the file is a deletion mark, check whether the file has a change mark that is a new addition mark; if not, delete the change mark corresponding to the file and keep the deletion mark; If the change mark corresponding to the file is a new addition mark, the change mark corresponding to the file is deleted and the deletion mark is retained.
[0090] Step 412: Obtain the first event to be analyzed in the queue, where the first event to be analyzed includes a file change mark.
[0091] The change mark is used to identify the event that occurs in the file.
[0092] Step 414: for the first event to be analyzed in the queue, determine whether there is a second event to be analyzed in the queue that meets a preset condition.
[0093] The file corresponding to the second event to be analyzed is the same as the file corresponding to the first event to be analyzed.
[0094] Step 416: If there is a second event to be analyzed in the queue, the file execution list is updated according to the change mark of the first event to be analyzed.
[0095] If the change mark of the first event to be analyzed is a new addition mark or a modification mark, the first event to be analyzed is inserted into the file execution list; if the change mark of the first event to be analyzed is a deletion mark, the event to be analyzed in the file execution list corresponding to the first event to be analyzed is deleted; if the change mark of the first event to be analyzed is a rename mark, the event to be analyzed in the file execution list corresponding to the first event to be analyzed and whose change mark is a rename mark is deleted, and the first event to be analyzed is inserted into the file execution list.
[0096] Step 418: Based on the storage records in the local cache, the updated file execution list and the preset synchronization rules, file synchronization processing is performed on the file corresponding to the first event to be analyzed.
[0097] For the first event to be analyzed in the updated file execution list, if the file corresponding to the first event to be analyzed is not a hidden file, perform the following steps: If the change mark corresponding to the first event to be analyzed is a modification mark, determining whether the file corresponding to the first event to be analyzed exists in the storage record in the local cache; If it exists, modify the files corresponding to the first event to be analyzed in the local cache and the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud; If it does not exist, the modified file corresponding to the first event to be analyzed is transferred to the local cache and the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud; If the change mark corresponding to the first event to be analyzed is a deletion mark, determining whether the file corresponding to the first event to be analyzed exists in the storage record in the local cache; If it exists, deleting the files corresponding to the first event to be analyzed in the local cache and in the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud; If the change mark corresponding to the first event to be analyzed is a rename mark, determining whether the historical name of the file corresponding to the first event to be analyzed exists in the database storage record; If so, rename the files corresponding to the first event to be analyzed in the local cache and in the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud; If it does not exist, the renamed file corresponding to the first event to be analyzed is transferred to the local cache and the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud.
[0098] In this embodiment, a first event to be analyzed in a queue for storing events to be analyzed is obtained, wherein the first event to be analyzed includes a change mark of a file, and the change mark is used to identify an event corresponding to the file; then, for the first event to be analyzed in the queue, it is determined whether there is a second event to be analyzed in the queue that meets a preset condition, and the file corresponding to the second event to be analyzed is the same as the file corresponding to the first event to be analyzed; if there is a second event to be analyzed in the queue, a file execution list is updated according to the change mark of the first event to be analyzed; and based on the updated file execution list, file synchronization processing is performed on the file corresponding to the first event to be analyzed. This solution sets a change mark (identifies the event that occurs corresponding to the file) for the events to be analyzed that are to be synchronized to the cloud, so that the synchronized events to be analyzed can clearly correspond to executable events such as the creation or modification of the file, thereby improving the accuracy of synchronization; and, when there are events to be analyzed for the same file, the file execution list is updated according to the change mark of the event to be analyzed, and then based on the updated file execution list, the file corresponding to the first event to be analyzed is synchronized, which can effectively filter out the events to be analyzed for the intermediate files in the file execution list, avoid invalid synchronization process, and thereby reduce resource consumption while improving the efficiency of synchronization, solving the problems of low synchronization efficiency and low accuracy existing in related file synchronization technologies.
[0099] Corresponding to the data processing method provided in the above embodiment, based on the same technical concept, the embodiment of the present invention also provides a data processing system. Figure 5 is a schematic diagram of the structure of a data processing system according to an embodiment of the present invention, the data processing system is used to execute Figures 1 to 4 The data processing method described Figures 1 to 4 The described data processing method is not limited to application in this data processing system. Figure 5 Schematic diagram of a data processing system provided in an embodiment of the present application. Figure 5 As shown, the data processing system includes a windows file system 510, a windows file monitoring thread 520 and a monitoring processing thread 530; wherein: Windows file system 510, used to store and process files; The windows file monitoring thread 520 is used to obtain original monitoring events for file changes by real-time monitoring the windows file system 510, and put the original monitoring events into a storage queue after processing; The monitoring processing thread 530 is used to send a request for obtaining queue data to the windows file monitoring thread 520, so as to receive the queue data sent by the windows file monitoring thread 520, and perform event filtering (such as the process of updating the file execution list mentioned above, which will not be repeated here) and event analysis (such as the process of performing file synchronization processing on the files corresponding to the analyzed events based on the preset synchronization rules mentioned above, which will not be repeated here). The processing process of the monitoring processing thread 530 can occur in the temporary cache node.
[0100] Corresponding to the data processing method provided in the above embodiment, based on the same technical concept, the embodiment of the present invention also provides a data processing device, Figure 6 is a schematic diagram of the structure of a data processing device according to an embodiment of the present invention, the data processing device is used to execute Figures 1 to 4 The data processing methods described, such as Figure 6 As shown, the data processing device includes: an acquisition module 610, a judgment module 620, an update module 630 and a file synchronization processing module 640.
[0101] The acquisition module 610 is used to acquire a first event to be analyzed in a queue for storing events to be analyzed; the first event to be analyzed includes a change mark of a file, and the change mark is used to identify an event corresponding to the file; The judgment module 620 is used to judge whether there is a second event to be analyzed in the queue that meets the preset condition for the first event to be analyzed in the queue; the file corresponding to the second event to be analyzed is the same as the file corresponding to the first event to be analyzed; An updating module 630, configured to update the file execution list according to the change mark of the first event to be analyzed if there is a second event to be analyzed in the queue; The file synchronization processing module 640 is used to perform file synchronization processing on the file corresponding to the first event to be analyzed based on the updated file execution list.
[0102] In one implementation, the change mark includes a new addition mark, a modification mark, a deletion mark, and a rename mark. The first insertion processing module 630 is specifically configured to: If the change mark of the first event to be analyzed is a new addition mark or a modification mark, inserting the first event to be analyzed into the file execution list; If the change mark of the first event to be analyzed is a deletion mark, deleting the event to be analyzed for the file corresponding to the first event to be analyzed in the file execution list; If the change mark of the first event to be analyzed is a rename mark, the event to be analyzed in the file execution list corresponding to the first event to be analyzed and whose change mark is a rename mark is deleted, and the first event to be analyzed is inserted into the file execution list.
[0103] In one implementation, the file synchronization module 640 includes a file updating unit 6401. The file updating unit 650 is used to: Based on the storage records in the local cache, the updated file execution list and the preset synchronization rules, file synchronization processing is performed on the file corresponding to the first event to be analyzed.
[0104] In one implementation, the file updating unit 6401 includes: The updating sub-unit 64011 is used to execute the first event to be analyzed in the list for the updated file. When the file corresponding to the first event to be analyzed is not a hidden file, the file corresponding to the first event to be analyzed is synchronized according to the change mark corresponding to the first event to be analyzed and the storage record in the local cache.
[0105] In one implementation, the updating subunit 64011 is specifically used for: If the change mark corresponding to the first event to be analyzed is a modification mark, determining whether the file corresponding to the first event to be analyzed exists in the storage record in the local cache; If it exists, modify the files corresponding to the first event to be analyzed in the local cache and the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud; If it does not exist, the modified file corresponding to the first event to be analyzed is transferred to the local cache and the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud; If the change mark corresponding to the first event to be analyzed is a deletion mark, determining whether the file corresponding to the first event to be analyzed exists in the storage record in the local cache; If it exists, deleting the files corresponding to the first event to be analyzed in the local cache and in the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud; If the change mark corresponding to the first event to be analyzed is a rename mark, determining whether the historical name of the file corresponding to the first event to be analyzed exists in the database storage record; If so, rename the files corresponding to the first event to be analyzed in the local cache and in the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud; If it does not exist, the renamed file corresponding to the first event to be analyzed is transferred to the local cache and the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud.
[0106] In one implementation, the acquisition module 610 includes: The first acquisition unit 6101 is used to acquire the original monitoring event for the file change; A filtering unit 6102, configured to filter the original monitoring event based on a preset filtering condition to obtain a first monitoring event; The second acquisition unit 6103 is used to acquire, based on the first monitoring event, cache information of the file that has been synchronized with the cloud corresponding to the first monitoring event, and modify the change mark of the cache information to obtain target cache information; The processing unit 6104 is used to perform corresponding cleaning processing on the change mark of the target cache information based on the preset conflict rule, obtain the first event to be analyzed, and put the first event to be analyzed into the queue; The third acquisition unit 6105 is used to acquire the first event to be analyzed in the queue.
[0107] In one implementation, the second obtaining unit 6103 is specifically configured to: According to the file path corresponding to the first monitoring event, the cache node is associated in the local cache, and based on the cache node, the cache information of the file that has been synchronized with the cloud is obtained; and the cache information is copied to the created temporary cache node; Get cache information from the temporary cache node.
[0108] In one implementation, the processing unit 6104 is specifically configured to: If the change mark corresponding to the file is a deletion mark, check whether the file has a change mark that is a new addition mark; If not, delete the change mark corresponding to the file and keep the deletion mark; If the change mark corresponding to the file is a new addition mark, the change mark corresponding to the file is deleted and the deletion mark is retained.
[0109] In one implementation, the first acquisition unit 6101 is specifically configured to: Get the raw monitoring events of the preset duration.
[0110] In one implementation, the first acquisition unit 6101 is specifically configured to: Obtain raw monitoring events through Windows API monitoring.
[0111] In this embodiment, a first event to be analyzed in a queue for storing events to be analyzed is obtained, wherein the first event to be analyzed includes a change mark of a file, and the change mark is used to identify an event corresponding to the file; then, for the first event to be analyzed in the queue, it is determined whether there is a second event to be analyzed in the queue that meets a preset condition, and the file corresponding to the second event to be analyzed is the same as the file corresponding to the first event to be analyzed; if there is a second event to be analyzed in the queue, a file execution list is updated according to the change mark of the first event to be analyzed; and based on the updated file execution list, file synchronization processing is performed on the file corresponding to the first event to be analyzed. This solution sets a change mark (identifies the event that occurs corresponding to the file) for the events to be analyzed that are to be synchronized to the cloud, so that the synchronized events to be analyzed can clearly correspond to executable events such as the creation or modification of the file, thereby improving the accuracy of synchronization; and, when there are events to be analyzed for the same file, the file execution list is updated according to the change mark of the event to be analyzed, and then based on the updated file execution list, the file corresponding to the first event to be analyzed is synchronized, which can effectively filter out the events to be analyzed for the intermediate files in the file execution list, avoid invalid synchronization process, and thereby reduce resource consumption while improving the efficiency of synchronization, solving the problems of low synchronization efficiency and low accuracy existing in related file synchronization technologies.
[0112] Those skilled in the art should understand that the above-mentioned data processing device can be used to implement the data processing method mentioned above, and the detailed description thereof should be similar to the description of the method part mentioned above, and will not be repeated here to avoid repetition.
[0113] Based on the same technical concept, an embodiment of the present application further provides an electronic device, which is used to execute the above data processing method. Figure 7 A schematic diagram of the structure of an electronic device for implementing various embodiments of the present application. The electronic device may have relatively large differences due to different configurations or performances, and may include a processor (processor) 710, a communication interface (Communications Interface) 720, a memory (memory) 730 and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call a computer program stored in the memory 730 and executable on the processor 710 to perform the following steps: Acquire a first event to be analyzed in a queue for storing events to be analyzed; the first event to be analyzed includes a change mark of a file, and the change mark is used to identify an event corresponding to the file; For a first event to be analyzed in the queue, determining whether there is a second event to be analyzed in the queue that meets a preset condition; the file corresponding to the second event to be analyzed is the same as the file corresponding to the first event to be analyzed; If there is a second event to be analyzed in the queue, the file execution list is updated according to the change mark of the first event to be analyzed; Based on the updated file execution list, file synchronization processing is performed on the file corresponding to the first event to be analyzed.
[0114] In this embodiment, a first event to be analyzed in a queue for storing events to be analyzed is obtained, wherein the first event to be analyzed includes a change mark of a file, and the change mark is used to identify an event corresponding to the file; then, for the first event to be analyzed in the queue, it is determined whether there is a second event to be analyzed in the queue that meets a preset condition, and the file corresponding to the second event to be analyzed is the same as the file corresponding to the first event to be analyzed; if there is a second event to be analyzed in the queue, a file execution list is updated according to the change mark of the first event to be analyzed; and based on the updated file execution list, file synchronization processing is performed on the file corresponding to the first event to be analyzed. This solution sets a change mark (identifies the event that occurs corresponding to the file) for the events to be analyzed that are to be synchronized to the cloud, so that the synchronized events to be analyzed can clearly correspond to executable events such as the creation or modification of the file, thereby improving the accuracy of synchronization; and, when there are events to be analyzed for the same file, the file execution list is updated according to the change mark of the event to be analyzed, and then based on the updated file execution list, the file corresponding to the first event to be analyzed is synchronized, which can effectively filter out the events to be analyzed for the intermediate files in the file execution list, avoid invalid synchronization process, and thereby reduce resource consumption while improving the efficiency of synchronization, solving the problems of low synchronization efficiency and low accuracy existing in related file synchronization technologies.
[0115] The specific execution steps can refer to the various steps of the above-mentioned data processing method embodiment, and can achieve the same technical effect. To avoid repetition, they will not be repeated here.
[0116] It should be noted that the electronic devices in the embodiments of the present application include: servers, terminals, or other devices except terminals.
[0117] The above electronic device structure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the input unit may include a graphics processing unit (GPU) and a microphone, and the display unit may be configured with a display panel in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit includes a touch panel and at least one of other input devices. The touch panel is also called a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0118] The memory can be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM).
[0119] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor.
[0120] An embodiment of the present application also provides a storage medium having computer executable instructions stored thereon. When the computer executable instructions are executed by a processor, the various processes of the above-mentioned data processing method embodiment can be implemented, and the same technical effect can be achieved. To avoid repetition, they will not be repeated here.
[0121] The processor is the processor in the electronic device in the above embodiment. The storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0122] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned data processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0123] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0124] The embodiment of the present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the various processes of the above-mentioned data processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0125] It should be noted that, in this article, the terms "comprise", "include" 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 includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include multitasking and parallel processing according to the functions involved, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0126] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0127] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A data processing method, characterized in that: The method comprises: Acquire a first event to be analyzed in the queue; the first event to be analyzed includes a change mark of a file, and the change mark is used to identify an event corresponding to the file; For the first event to be analyzed in the queue, determining whether there is a second event to be analyzed in the queue that meets a preset condition; the file corresponding to the second event to be analyzed is the same as the file corresponding to the first event to be analyzed; If the second event to be analyzed exists in the queue, updating the file execution list according to the change mark of the first event to be analyzed; Based on the updated file execution list, file synchronization processing is performed on the file corresponding to the first event to be analyzed.
2. The method according to claim 1, characterized in that: The change mark includes a new addition mark, a modification mark, a deletion mark and a rename mark; The updating of the file execution list according to the change mark of the first event to be analyzed includes: If the change mark of the first event to be analyzed is a new addition mark or a modification mark, inserting the first event to be analyzed into the file execution list; If the change mark of the first event to be analyzed is a deletion mark, deleting the event to be analyzed for the file corresponding to the first event to be analyzed in the file execution list; If the change mark of the first event to be analyzed is a rename mark, the event to be analyzed in the file execution list corresponding to the file of the first event to be analyzed and whose change mark is a rename mark is deleted, and the first event to be analyzed is inserted into the file execution list.
3. The method according to claim 1, characterized in that The performing file synchronization processing on the file corresponding to the first event to be analyzed based on the updated file execution list includes: Based on the storage records in the local cache, the updated file execution list and the preset synchronization rules, file synchronization processing is performed on the file corresponding to the first event to be analyzed.
4. The method according to claim 3, characterized in that The performing file synchronization processing on the file corresponding to the first event to be analyzed based on the storage record in the local cache, the updated file execution list and the preset synchronization rule includes: For the first event to be analyzed in the updated file execution list, when the file corresponding to the first event to be analyzed is not a hidden file, file synchronization processing is performed on the file corresponding to the first event to be analyzed according to the change mark corresponding to the first event to be analyzed and the storage record in the local cache.
5. The method according to claim 4, characterized in that The change mark includes a new addition mark, a modification mark, a deletion mark and a rename mark; The performing file synchronization processing on the file corresponding to the first event to be analyzed according to the change mark corresponding to the first event to be analyzed and the storage record in the local cache includes: If the change mark corresponding to the first event to be analyzed is a modification mark, determining whether the file corresponding to the first event to be analyzed exists in the storage record in the local cache; If it exists, modifying the files corresponding to the first event to be analyzed in the local cache and the cloud so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud; If not, transferring the modified file corresponding to the first event to be analyzed to the local cache and the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud; If the change mark corresponding to the first event to be analyzed is a deletion mark, determining whether the file corresponding to the first event to be analyzed exists in the storage record in the local cache; If so, deleting the files corresponding to the first event to be analyzed in the local cache and in the cloud, so that the files corresponding to the first event to be analyzed in the local cache and in the cloud are the same; If the change mark corresponding to the first event to be analyzed is a rename mark, determining whether the historical name of the file corresponding to the first event to be analyzed exists in the database storage record; If so, renaming the files corresponding to the first event to be analyzed in the local cache and in the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud; If not, the renamed file corresponding to the first event to be analyzed is transferred to the local cache and the cloud, so that the file corresponding to the first event to be analyzed in the local cache is the same as the file corresponding to the first event to be analyzed in the cloud.
6. The method according to claim 1, characterized in that The obtaining of the first event to be analyzed in the queue includes: Get raw monitoring events for file changes; Filtering the original monitoring event based on a preset filtering condition to obtain a first monitoring event; Based on the first monitoring event, obtaining cache information of the file that has been synchronized with the cloud corresponding to the first monitoring event, and modifying the change mark of the cache information to obtain target cache information; Based on a preset conflict rule, a corresponding cleanup process is performed on the change mark of the target cache information to obtain the first event to be analyzed, and the first event to be analyzed is placed in the queue; The first event to be analyzed in the queue is obtained.
7. The method according to claim 6, characterized in that The acquiring, based on the first monitoring event, cache information of the file that has been synchronized with the cloud and corresponds to the first monitoring event includes: According to the file path corresponding to the first monitoring event, associate it with a cache node in the local cache, and obtain cache information of the file synchronized with the cloud based on the cache node; and copy the cache information to the created temporary cache node; The cache information is obtained from the temporary cache node.
8. The method according to claim 6, characterized in that The clearing process of the change mark of the target cache information based on the preset conflict rule includes: If the change mark corresponding to the file is a deletion mark, then checking whether the file has a change mark that is a new addition mark; If not, deleting the change mark corresponding to the file and retaining the deletion mark; If the change mark corresponding to the file is a new addition mark, the change mark corresponding to the file is deleted and the deletion mark is retained.
9. The method according to claim 6, characterized in that The obtaining of the original monitoring event for the file change includes: The original monitoring event of a preset duration is obtained.
10. The method according to claim 6 or 9, characterized in that: The obtaining of the original monitoring event for the file change includes: The original monitoring event is obtained by monitoring through the operating system application programming interface Windows Api.