Network disk management method, device and system

By reading and updating the target storage path in the cloud drive operation log, the problem of low file retrieval efficiency is solved, and efficient file query is achieved.

CN116361260BActive Publication Date: 2025-11-18ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211510369.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2025-11-18
Estimated Expiration
2042-11-29

AI Technical Summary

Technical Problem

In existing technologies, file retrieval efficiency in file storage systems is low, and file paths cannot be queried efficiently, resulting in long waiting times.

Method used

By reading the pending log records of the files to be processed from the cloud drive's operation log, loading the target storage path, and updating the target file table, recursive queries are avoided.

Benefits of technology

It improves file retrieval efficiency and shortens file search waiting time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116361260B_ABST
    Figure CN116361260B_ABST
Patent Text Reader

Abstract

The embodiment of the present specification provides a network disk management method, device and system, wherein the network disk management method is applied to a network disk server, and includes: reading, in an operation log of a network disk, a to-be-processed log record of a to-be-operated file for file operation processing; loading, according to the to-be-processed log record, a target storage path of the to-be-operated file after file operation processing; and updating, based on the target storage path, a target file table corresponding to the network disk, wherein the target file table is used for querying a file stored in the network disk. The target file table is updated according to the loaded target storage path of the to-be-operated file after file operation, and then when the file stored in the network disk is queried, the file can be directly queried based on the target file table, avoiding recursive query of the network disk, thereby improving the file retrieval efficiency and shortening the waiting time for file query.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments in this specification relate to the field of computer technology, and in particular to cloud storage management methods, devices, and systems. Background Technology

[0002] With the development of internet technology, large-scale file storage systems such as cloud storage have emerged. Typically, a single file in such a system contains numerous subfiles. When searching for files in such a system, the file's storage path is required. However, since filenames do not contain path information, a recursive search is necessary. Furthermore, due to the unknown path information, when searching for files within a specific file, the search engine cannot pre-filter out subfiles. It can only retrieve the entire file, recursively retrieve the file path, and then filter based on that path. This method is inefficient and time-consuming. Therefore, a more efficient method is urgently needed to solve these problems. Summary of the Invention

[0003] In view of this, embodiments of this specification provide a cloud storage management method. One or more embodiments of this specification also relate to a cloud storage management device, a cloud storage management system, a computing device, a computer-readable storage medium, and a computer program, to address the technical deficiencies existing in the prior art.

[0004] According to a first aspect of the embodiments of this specification, a cloud storage management method is provided, comprising:

[0005] In the cloud drive's operation log, read the pending log records of the file to be operated on and perform file operation processing.

[0006] Load the target storage path after performing file operation processing on the file to be operated on, based on the log records to be processed;

[0007] The target file table corresponding to the cloud drive is updated based on the target storage path, wherein the target file table is used to query the files stored in the cloud drive.

[0008] According to a second aspect of the embodiments of this specification, a cloud storage management device is provided, comprising:

[0009] The read module is configured to read pending log records of files to be operated on from the operation log of the cloud drive and perform file operation processing.

[0010] The loading module is configured to load the target storage path after file operation processing of the file to be operated on, based on the log records to be processed;

[0011] The update module is configured to update the target file table corresponding to the cloud drive based on the target storage path, wherein the target file table is used to query the files stored in the cloud drive.

[0012] According to a third aspect of the embodiments of this specification, a cloud storage management system is provided, comprising:

[0013] The client is configured to identify the file to be operated on, perform file operation processing on the file to be operated on, and submit a file table update request to the cloud storage server based on the file operation processing result.

[0014] The cloud storage server is configured to, in response to the file table update request, read the pending log records of the file to be operated on from the operation log of the cloud storage, load the target storage path after the file operation is performed on the file to be operated on according to the pending log records, and update the target file table corresponding to the cloud storage based on the target storage path.

[0015] According to a fourth aspect of the embodiments of this specification, another cloud storage management system is provided, including:

[0016] Client and cloud storage server;

[0017] The client is used to submit executable instructions for updating the file table, and the cloud storage server is used to execute the executable instructions for updating the file table. When the executable instructions for updating the file table are executed by the cloud storage server, the steps of the cloud storage management method are implemented.

[0018] According to a fifth aspect of the embodiments of this specification, a computing device is provided, comprising:

[0019] Memory and processor;

[0020] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-described cloud storage management method are implemented.

[0021] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the steps of the above-described cloud storage management method.

[0022] According to a seventh aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described cloud storage management method.

[0023] One embodiment of this specification involves reading pending log records from the operation log of a file to be operated on in a cloud drive; loading the target storage path after the file operation on the file to be operated on according to the pending log records; and updating the target file table corresponding to the cloud drive based on the target storage path. The target file table is used to query files stored in the cloud drive. This achieves the goal of updating the target file table based on the loaded target storage path after the file operation on the file to be operated on. Therefore, when querying files stored in the cloud drive, file queries can be performed directly based on the target file table, avoiding recursive queries across the cloud drive, thereby improving file retrieval efficiency and shortening file query waiting time. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of a cloud storage management method provided in one embodiment of this specification;

[0025] Figure 2 This is a flowchart illustrating a cloud storage management method provided in one embodiment of this specification;

[0026] Figure 3 This is a schematic diagram of a cloud storage management method provided in one embodiment of this specification;

[0027] Figure 4 This is a flowchart illustrating the processing procedure of a cloud storage management method provided in one embodiment of this specification;

[0028] Figure 5 This is an application diagram of a cloud storage management method provided in one embodiment of this specification;

[0029] Figure 6 This is a schematic diagram of the structure of a cloud storage management device provided in one embodiment of this specification;

[0030] Figure 7 This is a structural diagram of a cloud storage management system provided in one embodiment of this specification;

[0031] Figure 8 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0032] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0033] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0034] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0035] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0036] Cloud storage: A network-based online storage service. Cloud storage provides users with file management functions such as file storage, sharing, access, and backup. Users can manage and edit files in cloud storage via the Internet.

[0037] fileidpath: The file storage path based on the file ID.

[0038] Serial number: The sequence number corresponding to the file operation. The serial number increments globally.

[0039] This specification provides a cloud storage management method, and also relates to a cloud storage management device, a computing device, a cloud storage management system, a computer-readable storage medium, and a computer program, which will be described in detail in the following embodiments.

[0040] Figure 1 This is a schematic diagram illustrating the structure of a cloud storage management method provided in one embodiment of this specification. For example... Figure 1As shown, the cloud storage server stores the corresponding operation logs and target file table. After receiving a file operation request from a client, the cloud storage server generates and stores an operation log record in response. When the cloud storage server subsequently updates the target file table, it can read pending log record n ​​from the operation log and generate a path refresh task based on the read pending log record. Each time a pending log record is read and consumed, a path refresh task is generated. If the cloud storage server stores path refresh tasks 1 through m, it can concurrently load path refresh tasks 1 through m, thereby loading the corresponding target storage paths 1 through m. Based on the loaded target storage paths, the target file table in the cloud storage is updated, enabling real-time updates of file path information after users perform operations such as deleting, moving, or copying files.

[0041] In practical applications, upon receiving client commands to create, delete, move, or copy files, an operation log is generated based on these commands. Each log entry has a unique global sequence number, which increments sequentially according to the order in which the log entries were written. The server reads each log entry sequentially, generating a path update task corresponding to that log entry. This task is concurrently scheduled and executed by the cloud storage server, updating the corresponding file table. The file table stores information such as filenames, parent files, and file paths. The file table is updated based on the results of the path update tasks. Subsequent file searches can then directly look up the file's path information based on the file table, improving search efficiency.

[0042] See Figure 2 , Figure 2 A flowchart of a cloud storage management method according to an embodiment of this specification is shown, which specifically includes the following steps.

[0043] Step S202: Read the pending log records of the file to be operated on from the operation log of the cloud drive.

[0044] Specifically, a cloud drive is a file storage system that provides users with online storage services such as file storage, sharing, access, and backup. It also has document management functions, allowing users to manage and edit files in the cloud drive via the internet. Log records refer to textual records generated when users modify, move, delete, or upload files stored in the cloud drive, describing the actual file operations performed. The corresponding operation log is the file storing these log records. When log records are stored in the operation log, each record is assigned a global sequence number based on its order of storage, and these sequence numbers increment globally. Pending log records are those selected from the operation log based on their sequence numbers, used for subsequent updates to the target file table based on these pending log records. Pending operation files are the files corresponding to the pending log records; they are the objects of the operations performed on those log records. For example, uploading file D to directory A in the cloud drive means that file D is the pending operation file, and uploading file D to directory A is the file operation corresponding to that log record.

[0045] Therefore, when using cloud storage for file storage, backup, sharing, and other file management tasks, the cloud storage server updates the target file table in the cloud storage based on the log records stored in the operation log. This involves determining the cloud storage's operation log, selecting the file to be processed from the log, and generating pending log records. It should be noted that because file operations in the cloud storage have an order, the selection of pending log records must also follow the storage order of the log records.

[0046] In practical applications, the cloud storage management system generates and stores log records based on file operation requests submitted by clients only after receiving such requests. These log records include information such as the log identifier, file operation type, operation time, operation object, and log record status. When reading pending log records from the cloud storage operation log, it's necessary to consider not only the log record status but also the log identifier. Log records with an "unprocessed" status and the earliest corresponding timestamp are selected as pending log records. This ensures that log records are read sequentially according to their storage order, and the corresponding file operations are executed.

[0047] Furthermore, before reading the log records to be processed from the cloud drive's operation log, considering the different order in which log records are stored in the operation log, a log identifier can be assigned to each log record to distinguish the storage order of the log records. The specific implementation is as follows:

[0048] In response to file operation instructions for the cloud drive, a log record is generated; the log identifier of the log record is determined, and the log record and the log identifier of the log record are stored in the operation log.

[0049] Specifically, operation instructions can be computer commands submitted by the client to the cloud storage server for manipulating files in the cloud storage. These instructions include, but are not limited to, file upload, move, delete, modify, and copy / paste commands. A log identifier is a globally unique sequence number corresponding to each log record, used to indicate the chronological order in which log records are stored in the operation log. When a log record is written to the operation log, the log record and its corresponding log identifier are written together.

[0050] Based on this, upon receiving a file operation instruction for the cloud drive, a log record corresponding to the file operation is generated in response to the file operation instruction. The log record includes, but is not limited to, information such as log identifier, file operation type, file operation time, file name (operation object), and log status. When reading the log record from the cloud drive's operation log, a log identifier is assigned to the log record according to the log identifier stored in the operation log, and the log record and the log identifier of the log record are stored in the operation log.

[0051] For example, in a scenario where files are managed in a cloud drive, operations such as deleting, modifying, and moving files can be performed. Figure 3 As shown, first move file A1 from file A in the root directory of the cloud drive to file B in the root directory, then move file A1 from file B in the root directory to file C in the root directory. Based on "moving A1 to directory B, moving B to directory C", generate log records log1 and log2 respectively. Log1 includes: (log identifier: 1, file name: file A1, file operation: move A1 to directory B, status: incomplete), and log2 includes: (log identifier: 2, file name: file B, file operation: move B to directory C, status: incomplete).

[0052] In summary, when generating log records based on file operations on cloud storage, a globally unique log identifier is assigned to each log record. This identifier is then used to read the log records, thus avoiding file operation errors caused by missing log records.

[0053] Furthermore, considering that the operation log stores at least one log record, to avoid missed reads and duplicate reads when reading log records, the processing status of the log record can be recorded, and the log record can be read according to rules. The specific implementation is as follows:

[0054] Based on the status information of the log records in the operation log of the cloud drive, the initial log records with unprocessed status information are selected as pending log records for file operation processing.

[0055] Specifically, the status information is used to indicate the processing status of log records, including but not limited to processing completed, unprocessed, and undoing. Accordingly, processing completed means that the file table update operation corresponding to the log record has been completed and the next log record can be read. Unprocessed means that the log record has been stored in the operation log, but the file table update operation corresponding to the log record has not been executed. Undoing means that the file table update operation corresponding to the log record does not need to be executed.

[0056] Based on this, when reading log records to be processed from the cloud drive's operation log, the status information of the log records in the cloud drive's operation log is determined, and log records with the status information of "unprocessed" are filtered out from the cloud drive's operation log as initial log records. Log records to be processed are then selected from the initial log records according to the log identifier of the log records.

[0057] Using the previous example, if the operation log stores log1: (log identifier: 1, file name: file A1, file operation: move A1 to directory B, status: completed) and log2: (log identifier: 2, file name: file B, file operation: move B to directory C, status: incomplete), then the log record log2 with the status of incomplete in the operation log is determined as the log record to be processed.

[0058] Furthermore, when selecting log records to be processed in the operation log, the log record's log identifier can also be used as the selection criterion. When writing log records to the operation log, a log identifier is assigned to each log record according to the writing order, with the log identifiers incrementing sequentially. Therefore, when selecting log records to be processed in the operation log, the log record with the smaller log identifier can be chosen. For example, if the operation log stores log records log1, log2, and log3, then log1 can be selected as the log record to be processed.

[0059] In summary, by identifying the status information and log identifiers recorded in the cloud drive's operation logs, the log records to be processed can be determined, thereby avoiding file operation errors caused by issues such as missed or skipped log entries.

[0060] Step S204: Load the target storage path after performing file operation processing on the file to be operated on, based on the log records to be processed.

[0061] Specifically, in the aforementioned operation log of the cloud drive, after reading the pending log record for file operations on the file to be operated on, the target storage path after the file operation can be loaded based on the pending log record. This facilitates subsequent updates to the target file table of the cloud drive. The target storage path refers to the storage path of the file to be operated on after the file operation is performed. After operations such as moving, deleting, or modifying the file to be operated on are performed, the storage path of the file to be operated on needs to be updated to the storage path obtained after the operation.

[0062] Based on this, in the operation log of the cloud drive, after reading the pending log record of the file to be operated on and performing file operation processing, the pending log record records the target storage path of the file to be operated on after the file operation is executed. Based on the pending log record, the target storage path of the file to be operated on after the file operation is performed is loaded, so that the target file table of the cloud drive can be updated subsequently based on the target storage path.

[0063] In practical applications, when loading the target storage path after file operations on the files to be operated on, multiple target storage paths obtained after file operations on multiple files to be operated on can be loaded simultaneously as needed. This allows for simultaneous updates to the target file table in the cloud drive based on multiple target storage paths, thereby improving the update efficiency of the target file table.

[0064] Furthermore, considering that the cloud drive's operation logs store a large number of log records, it is also necessary to record the file operation results to facilitate subsequent data updates. The specific implementation is as follows:

[0065] Based on the results of file operation processing on the files to be operated, a path refresh record is generated for each file to be operated and stored in the path refresh record table of the cloud drive; correspondingly, loading the target storage path after file operation processing on the files to be operated according to the log records to be processed includes: reading at least two path refresh records in parallel from the path refresh record table, and determining the target storage path after file operation processing on each file to be operated according to each path refresh record.

[0066] Specifically, the operation result refers to the result obtained after performing file operations on the file to be operated on. File operations include, but are not limited to, file upload, file deletion, and file movement. The path refresh record refers to the path change information of the file to be operated on after performing file operations on it. For example, if file A is moved from directory B to directory C, the operation result is that file A has been moved to directory C. The path refresh record is the movement of file A from directory B to directory C. Correspondingly, the path refresh record table is a table or document used to store path refresh records. After the log refresh record is generated, a record identifier is assigned to it and stored in the path refresh record table.

[0067] Based on this, after file operations are performed on the files to be operated on, path refresh records corresponding to the operation results are generated for each file. These path refresh records are then stored sequentially in the cloud drive's path refresh record table according to the execution order of the file operations. When loading the target storage path of a file after file operations, at least two path refresh records are read in parallel from the path refresh record table. The target storage path of each file after file operations is determined based on each path refresh record, facilitating subsequent updates to the cloud drive's target file table based on these at least two read target storage paths.

[0068] Continuing with the previous example, after moving file A1 from its current location to directory B, the operation on file A1 is recorded, and a path refresh record is generated and stored in the task table of the cloud drive. The path refresh record corresponding to log1 can be: (Record ID: record 1, Log ID: log1, Record: Change the parent file of file A1 to file B), and path refresh record 1 is stored in the cloud drive. Subsequently, path refresh records can be read in parallel, and corresponding operations can be performed according to the execution strategy.

[0069] In summary, by reading at least two path refresh records in parallel from the path refresh record table, the target storage path after file operations on each file to be operated on can be determined. This facilitates subsequent updates to the target file table of the cloud drive based on the obtained target storage paths, thereby improving both the efficiency of reading target storage paths and the efficiency of updating the target file table.

[0070] Furthermore, after file operations are performed on the file to be operated on, the directory tree stored in the cloud drive will be updated in real time as the file operations are performed. Considering that the path refresh record generation needs to ensure its accuracy, the path refresh record can be generated based on the update status of the directory tree. The specific implementation is as follows:

[0071] Based on the results of file operations on the files to be operated on, the initial directory tree before the file operations on the files to be operated on is updated to the target directory tree after the file operations on the files to be operated on. The initial directory tree and the target directory tree are used to represent the storage paths of files in the cloud drive. Based on the initial directory tree and the target directory tree, a path refresh record corresponding to each file to be operated on is generated and stored in the path refresh record table of the cloud drive.

[0072] Specifically, a directory tree is a tree-like structure that represents the relationships between files. The root node of the directory tree is the root directory of the cloud drive, and the child nodes under the root directory represent the files stored in the root directory. The directory tree can clearly show the storage structure of files, and it will be updated when files are moved, deleted, or otherwise operated on. Correspondingly, the initial directory tree refers to the directory tree before file operations are performed on the file to be operated on, and the target directory tree refers to the directory tree after file operations are performed on the file to be operated on.

[0073] Based on this, after performing file operations on the file to be operated on and obtaining the operation result, the initial directory tree before the file operation on the file to be operated on is updated to the target directory tree after the file operation on the file to be operated on, according to the operation result. Both the initial directory tree and the target directory tree are used to represent the storage path of the file in the cloud drive. Based on the difference between the initial directory tree and the target directory tree, the operation status of the file is determined, and then the path refresh record corresponding to each file to be operated on is generated and stored in the path refresh record table of the cloud drive.

[0074] Continuing with the previous example, such as Figure 3 As shown, moving file A1 from the root directory to file B, directory tree 1 is the directory tree before moving file A1, and directory tree 2 is the directory tree after moving file A1. Based on directory tree 1 and directory tree 2, a path refresh record corresponding to log1 can be generated: (Record ID: record 1, Log ID: log1, Record: Change the parent file of file A1 to file B). This path refresh record is stored in the path refresh record table of the cloud drive. Moving file A1 from file B in the root directory to file C in the root directory. Directory tree 2 is the directory tree before moving file A1, and directory tree 3 is the directory tree after moving file A1. Based on directory tree 2 and directory tree 3, a path refresh record corresponding to log2 can be generated and stored in the path refresh record table.

[0075] In summary, by generating path refresh records for each file to be operated on based on the initial directory tree and the target directory tree, and storing them in the path refresh record table of the cloud drive, the accuracy of the path refresh records is improved, thereby improving the accuracy of updating the target file table in the cloud drive.

[0076] Step S206: Update the target file table corresponding to the cloud drive based on the target storage path, wherein the target file table is used to query the files stored in the cloud drive.

[0077] Specifically, after loading the target storage path of the file to be operated on, the target file table in the cloud drive can be updated based on the loaded target storage path. The target file table is a file table used to store information corresponding to the file to be operated on. The information corresponding to the file to be operated on includes, but is not limited to, the file name, the parent file name, the storage path, and the log identifier corresponding to the file.

[0078] Based on this, after loading the target storage path of the file to be operated on, the target file table corresponding to the cloud drive is updated according to the target storage path, and the path corresponding to the file to be operated on in the target file table is updated to the target storage path. The target file table corresponding to the cloud drive can also be used to query files stored in the cloud drive.

[0079] In practical applications, when updating the target file table of a cloud drive based on the target storage path, it's also necessary to consider the sub-files contained within the file to be operated on. When updating the storage path of the file to be operated on in the target file table to the target storage path, the storage paths of the sub-files contained within the file to be operated on also need to be updated. For example, if file F1 in file F under the root directory is moved to file G under the root directory, the storage path of file F1 before the move is root directory / F / F1, and the storage path after the move is root directory / G / F1. If file F2 is contained within F1, the storage path of file F2 also needs to be updated. The storage path of file F2 before the update is root directory / F / F2, and the storage path after the update is root directory / G / F2. When querying a file in the cloud drive, the filename to be queried is determined, and a table record corresponding to the filename is retrieved from the target file. Then, the storage path corresponding to that file is read from the table record.

[0080] Furthermore, considering that the path refresh records stored in the path refresh record table can be read in parallel, a corresponding execution strategy needs to be formulated when performing the update operation corresponding to the path refresh record to avoid update errors. The specific implementation is as follows:

[0081] The record identifier of each path refresh record is determined according to the path refresh record table, and a first path refresh record and a first record identifier of the first path refresh record are determined from at least two path refresh records; it is determined whether there is a second record identifier greater than the first record identifier among the record identifiers; if so, at least one second path refresh record corresponding to the second record identifier is determined, and the target file table corresponding to the cloud drive is updated based on the first storage path of the first path refresh record and the second storage path of each second path refresh record; if not, the target file table corresponding to the cloud drive is updated based on the first storage path of the first path refresh record, wherein the update operation corresponding to the second path refresh record is not performed.

[0082] Specifically, the record identifier refers to the identification information corresponding to the path refresh record. The record identifier can be a globally unique sequence number of the path refresh record, which has global uniqueness. The record identifier indicates the order in which the path refresh record is stored in the path refresh record table. The first path refresh record refers to any path refresh record in the path refresh record table. Correspondingly, the first record identifier refers to the record identifier corresponding to the first path refresh record. The second record identifier refers to the record identifier that is greater than the first record identifier.

[0083] Based on this, path refresh records are read in parallel from the path refresh record table. The record identifier of each path refresh record is determined according to the path refresh record table. One path refresh record is selected as the first path refresh record from at least two path refresh records. The first record identifier of the first path refresh record is determined according to the path refresh record table. The system determines whether a second record identifier greater than the first record identifier exists in the path refresh record table. If a second record identifier greater than the first record identifier exists, it indicates that a record identifier greater than the first record identifier exists in the path refresh record table. In this case, at least one second path refresh record corresponding to the second record identifier is determined, and the target file table corresponding to the cloud drive is updated based on the first storage path of the first path refresh record and the second storage path of each second path refresh record. If no second record identifier greater than the first record identifier exists in the path refresh record table, it indicates that no record identifier greater than the first record identifier exists in the path refresh record table. The target file table corresponding to the cloud drive is updated based on the first storage path of the first path refresh record. It should be noted that even if no second record identifier greater than the first record identifier exists in the path refresh record table, the second path refresh record still needs to be read and the corresponding update operation needs to be performed. However, the update operation cannot be executed successfully, and the target file table will not be updated after the update operation corresponding to the second path refresh record is executed.

[0084] Using the previous example, if the path refresh record table contains three path refresh records: record 1, record 2, and record 3, record 2 is selected as the first path refresh record. At this time, there is a record 3 in the first path refresh record table with a record identifier greater than record 2. Therefore, the path update operation corresponding to record 2 is executed first, followed by the path update operation corresponding to record 3. If record 3 is selected as the first path refresh record, there is no record with a record identifier greater than record 3 in the first path refresh record table. Therefore, the data update operation corresponding to record 3 is executed. When the data update operation corresponding to record 2 is executed, the storage path corresponding to the file of the path refresh record in the cloud drive is not updated.

[0085] In summary, when performing update operations corresponding to path refresh records in the path refresh record table, the execution strategy is determined based on the record identifier of the path refresh record, thereby improving the execution efficiency of update operations corresponding to path refresh records and reducing the update error rate.

[0086] Furthermore, considering that the record identifiers of the first path refresh record and the second path refresh record are different, and the order in which they are stored in the path refresh record table is also different, there is also an operation order when performing the operations corresponding to the path refresh record. The specific implementation is as follows:

[0087] Based on the first storage path of the first path refresh record, the initial path information of the file to be operated corresponding to the first path refresh record in the target file table corresponding to the cloud drive is updated to the target path information; at least one second path refresh record is sorted according to the second record identifier, and the target path information is updated sequentially according to the second storage path corresponding to the sorted second path refresh record.

[0088] Specifically, the initial path information refers to the storage path information of the file to be operated on before the file operation is performed, and the corresponding target path information is the storage path information of the file to be operated on after the file operation is performed.

[0089] Based on this, the first storage path corresponding to the first path refresh record is determined. The initial path information of the file to be operated on corresponding to the first path refresh record is determined in the target file table of the cloud drive. The initial path information is then updated to the target path information based on the first path refresh record. At least one second path refresh record is sorted according to its identifier in ascending or descending order. Based on the second storage path corresponding to the sorted second path refresh records, the target path information in the target file table is updated sequentially.

[0090] Using the previous example, if the path refresh record table contains three path refresh records: record 1, record 2 (moving file A1 from file A in the root directory to file B in the root directory), and record 3 (moving file A1 from file B in the root directory to file C in the root directory), then record 2 is selected as the first path refresh record. At this time, there is a record 3 in the first path refresh record table with a record identifier greater than record 2. Therefore, the path update operation corresponding to record 2 is executed first, and then the path update operation corresponding to record 3 is executed.

[0091] In summary, after updating the initial path information of the file to be operated on corresponding to the first path refresh record in the target file table to the target path information, the second path refresh records are sorted according to the second record identifier, and then the target path information is updated sequentially according to the sorting, thereby ensuring the update order of the path information and providing the accuracy of the path information update.

[0092] Furthermore, when updating the target file table of the cloud drive based on path refresh records in the path refresh record table, the target file table can be updated simultaneously based on at least two path refresh records. The record identifiers in the path refresh records are used as optimistic locks to ensure that the update to the target file table is successful only if the record identifier is larger. For example, in the scenario of modifying the file name in the cloud drive, the path refresh record table contains path refresh record 1: changing file name 1 to 2, and path refresh record 2: changing file name to 3. However, in a concurrent scenario, the operation corresponding to path refresh record 2 might be executed first, and the file name might have already changed from 1 to 3. Therefore, when executing the operation corresponding to path refresh record 1, a condition is added: if the current file name is 1, the operation corresponding to path refresh record 1 is executed; otherwise, the update fails.

[0093] Furthermore, when updating the target file table in the cloud drive based on the target storage path, considering the diversity of updates, the target file table can be updated in multiple ways, as follows:

[0094] Obtain the target file table corresponding to the cloud drive; delete the initial storage path of the file to be operated on in the target file table, and write the target storage path at the deletion position; or, write the target storage path in the target file table, and update the path status of the initial storage path of the file to be operated on in the target file table to unavailable.

[0095] Specifically, the initial storage path refers to the storage path of the file to be operated on in the target file table after the target file table is obtained. Under certain conditions, the target storage path refers to the storage path of the file to be operated on after the file operation is performed on the file to be operated on.

[0096] Based on this, a target file table corresponding to the cloud drive is determined, and a table record corresponding to the file to be operated on is determined in the target file table. Based on this table record and the initial storage path of the file to be operated on, the initial storage path of the target file table is deleted, and the target storage path is written at the deletion position. Alternatively, the target storage path can be directly written into the target file table, and the path status of the initial storage path corresponding to the file to be operated on in the target file table is updated to unavailable, indicating that the record cannot be read.

[0097] Continuing with the previous example, before moving file A1 from file A in the root directory to file B, since file A3 is contained within file A1, the storage path for file A1 in the target file table of the cloud drive is: root directory / A / A1, and the storage path for file A3 is: root directory / A / A1 / A3. After moving file A1 from file A in the root directory to file B, the storage path for file A1 in the target file table of the cloud drive is: root directory / B / A1, and the storage path for file A3 is: root directory / B / A1 / A3. Having determined the target storage paths for file A1 (root directory / B / A1) and file A3 (root directory / B / A1 / A3) after the file move, they can be directly stored in the target file table of the cloud drive, and the path status of file A1 (root directory / A / A1) and file A3 (root directory / A / A1 / A3) can be updated to unavailable. It also allows updating the storage paths of file A1 (root directory / A / A1) and file A3 (root directory / A / A1 / A3) based on their target storage paths after the file movement, replacing the original paths with the target storage paths. Figure 3 Correspondingly, after updating the target file table based on log1 and log2, the target file table is shown in Table 1 below.

[0098]

[0099] Table 1

[0100] In summary, the target file table can be updated in multiple ways, such as deleting the initial storage path of the file to be operated on in the target file table and writing the target storage path at the deletion location, or directly writing the target storage path sequentially in the target file and setting the initial storage path to unavailable. This improves the diversity of target file table update methods.

[0101] Furthermore, after updating the target file table of the cloud drive, considering the response time for file retrieval, file retrieval can be performed based on the updated target file table, reading the storage path corresponding to the file in the target file table, thereby improving the response speed. The specific implementation is as follows:

[0102] Receive a search request submitted by the client for the cloud storage; search for the target file path in the target file table based on the search request; determine the target file in the cloud storage based on the target file path and send the result back to the client.

[0103] Specifically, a search request refers to a computer instruction submitted by the client for file retrieval. The search request carries file information, which indicates the file to be searched. The target file path refers to the storage path of the file corresponding to the file information carried in the search request in the cloud drive. Correspondingly, the target file refers to the file to be searched that corresponds to the search request.

[0104] Based on this, upon receiving a search request from the client for the cloud drive, the system responds by performing a file search. It searches the target file table for the path corresponding to the file information carried in the search request, locates the target file in the cloud drive based on the target file path, and then sends the result back to the client.

[0105] Using the previous example, when a file retrieval request for file A3 is received from the client, the target file table of the cloud drive is searched based on the file retrieval information "file A3" carried in the file retrieval request to determine the record corresponding to file A3, and the path in the record is read: root directory / A / A1 / A3. Based on this path, file A3 is determined and fed back to the client.

[0106] In summary, one embodiment of this specification reads pending log records from the operation log of a cloud drive; determines the file to be operated on corresponding to the pending log record; performs file operations corresponding to the pending log record on the file to be operated on; loads the target storage path after the file operations on the file to be operated on; and updates the target file table corresponding to the cloud drive based on the target storage path. The target file table is used to query files stored in the cloud drive. This achieves the goal of updating the target file table based on the loaded target storage path after the file operations on the pending file, thus enabling direct file queries based on the target file table when querying files stored in the cloud drive. This avoids recursive queries on the cloud drive, thereby improving file retrieval efficiency and shortening file query waiting time.

[0107] The following is in conjunction with the appendix Figure 4 Taking the application of the cloud storage management method provided in this manual in file deletion as an example, the cloud storage management method will be further explained. Among other things, Figure 4 The present specification shows a flowchart of a cloud storage management method according to an embodiment, which includes the following steps.

[0108] Step S402: Receive file operation instructions submitted by the client for operating on the target file.

[0109] In scenarios where cloud storage is used to store and manage files, users can perform operations such as deleting, moving, modifying, and copying files in the cloud storage through the client. They can also upload files to the cloud storage for storage and update the file ID path of the target file after performing operations on it. In practical applications, users submit a deletion command to the cloud storage system for file A1 within file A in the root directory, and then submit a deletion command for file A in the root directory.

[0110] Step S404: Generate log records based on file operation instructions and store them in the log record table of the cloud drive.

[0111] After the cloud storage system receives a deletion command for file A1 in file A under the root directory, it generates a log record "log1, delete file A1 in file A under the root directory" and stores it in the cloud storage's log record table; after receiving a deletion command for file A under the root directory, it generates a log record "log2, delete file A under the root directory".

[0112] Step S406: When updating the path table of the cloud drive based on log records, read the log record to be operated on from the log record table.

[0113] Read log records log1 and log2 sequentially.

[0114] Step S408: Generate a path refresh task based on the file operation results and store it in the task table.

[0115] Based on the execution results of the file deletion operation corresponding to log1 and log2 respectively, path refresh task 1 and path refresh task 2 are generated and stored in the task table of the cloud drive.

[0116] Step S410: Read at least two path refresh tasks and determine the first path refresh task and the first task identifier corresponding to the first path refresh task.

[0117] Schedule path refresh tasks in the cloud drive's task list. When at least two path refresh tasks are executed simultaneously, determine the update method for the path table in the cloud drive based on the task identifiers. Select one task from the at least two path refresh tasks as the first path refresh task and determine its identifier.

[0118] Step S412: Determine whether there is a second task identifier greater than the first task identifier among the task identifiers of at least two path refresh tasks; if not, proceed to step S414; if yes, proceed to step S416.

[0119] If at least two paths refresh tasks include Task 1 and Task 2, and the first path refresh task is Task 2, determine whether there is a task identifier with a greater identifier than Task 2 among the at least two path refresh tasks.

[0120] Step S414: Update the path table of the cloud drive based on the first storage path of the first path refresh record.

[0121] When at least two path refresh tasks include Task 1 and Task 2, and the first path refresh task is Task 2, there is no task identifier with a larger identifier than Task 2 among the at least two path refresh tasks. Therefore, the path update operation corresponding to Task 2 is executed.

[0122] Step S416: Determine at least one second path refresh record corresponding to the second record identifier, and update the path table corresponding to the cloud drive based on the first storage path of the first path refresh record and the second storage path of each second path refresh record.

[0123] When at least two path refresh tasks include Task 1 and Task 2, and the first path refresh task is Task 1, there is a Task ID 2 among the at least two path refresh tasks that has a larger ID than Task 1. Therefore, the path update operation corresponding to Task 1 is executed first, and then the path update operation corresponding to Task 2 is executed.

[0124] In other words, when executing a path refresh task, if the task with the smaller task identifier runs first, it will also execute successfully. If the task with the larger task identifier runs first, it will also execute successfully. Conversely, if the task with the larger task identifier runs first, it will execute successfully first, and if the task with the smaller task identifier runs, it will be unable to update the storage path.

[0125] In addition, when executing a path refresh task, the task identifier can be used as an optimistic lock to ensure that the file storage path will only be updated successfully when a task with a larger task identifier is executed.

[0126] Step S418: In response to the client's search request for the cloud drive, search for the target file path in the path table, and determine the target file in the cloud drive based on the target file path and send it back to the client.

[0127] When a file retrieval request for file A1 is received from a client, the file retrieval information for "file A1" carried in the file retrieval request is searched in the path table of the cloud drive to determine the record corresponding to file A1, and the path in the record is read. Based on the path, file A1 is determined and fed back to the client.

[0128] In summary, by updating the path table based on the storage path after file operations on the target file, file queries can be performed directly based on the path table when searching for files stored in the cloud drive, avoiding recursive queries on the cloud drive, thereby improving file retrieval efficiency and shortening file query waiting time.

[0129] Figure 5 This is an application diagram illustrating a cloud storage management method provided in one embodiment of this specification, such as... Figure 5 As shown, users perform file operations such as uploading, deleting, moving, and copying on the client side. The foreground service in the cloud storage system executes the corresponding file operations and stores the changes to the file records in the cloud storage system's database. When updating the file path based on the logs recorded in the database, the system reads the logs from the database's operation logs and performs corresponding log consumption services to generate a refresh path task corresponding to the logs. The task scheduling system in the cloud storage system schedules the refresh path task, updates the file path, and stores the update result in the database.

[0130] Corresponding to the above method embodiments, this specification also provides embodiments of a cloud storage management device. Figure 6 A schematic diagram of a cloud storage management device according to one embodiment of this specification is shown. Figure 6 As shown, the device includes:

[0131] The reading module 602 is configured to read log records to be processed from the operation log of the cloud drive.

[0132] Loading module 604 is configured to load the target storage path after file operations are performed on the file to be operated on.

[0133] The update module 606 is configured to update the target file table corresponding to the cloud drive based on the target storage path, wherein the target file table is used to query the files stored in the cloud drive.

[0134] In an optional embodiment, the loading module 604 is further configured to:

[0135] Based on the results of file operation processing on the files to be operated, a path refresh record is generated for each file to be operated and stored in the path refresh record table of the cloud drive; correspondingly, loading the target storage path after file operation processing on the files to be operated according to the log records to be processed includes: reading at least two path refresh records in parallel from the path refresh record table, and determining the target storage path after file operation processing on each file to be operated according to each path refresh record.

[0136] In an optional embodiment, the loading module 604 is further configured to:

[0137] Based on the results of file operations on the files to be operated on, the initial directory tree before the file operations on the files to be operated on is updated to the target directory tree after the file operations on the files to be operated on. The initial directory tree and the target directory tree are used to represent the storage paths of files in the cloud drive. Based on the initial directory tree and the target directory tree, a path refresh record corresponding to each file to be operated on is generated and stored in the path refresh record table of the cloud drive.

[0138] In an optional embodiment, the loading module 604 is further configured to:

[0139] The record identifier of each path refresh record is determined according to the path refresh record table, and a first path refresh record and a first record identifier of the first path refresh record are determined from at least two path refresh records; it is determined whether there is a second record identifier greater than the first record identifier among the record identifiers; if so, at least one second path refresh record corresponding to the second record identifier is determined, and the target file table corresponding to the cloud drive is updated based on the first storage path of the first path refresh record and the second storage path of each second path refresh record; if not, the target file table corresponding to the cloud drive is updated based on the first storage path of the first path refresh record, wherein the update operation corresponding to the second path refresh record is not performed.

[0140] In an optional embodiment, the loading module 604 is further configured to:

[0141] Based on the first storage path of the first path refresh record, the initial path information of the file to be operated corresponding to the first path refresh record in the target file table corresponding to the cloud drive is updated to the target path information; at least one second path refresh record is sorted according to the second record identifier, and the target path information is updated sequentially according to the second storage path corresponding to the sorted second path refresh record.

[0142] In an optional embodiment, the loading module 604 is further configured to:

[0143] Obtain the target file table corresponding to the cloud drive; delete the initial storage path of the file to be operated on in the target file table, and write the target storage path at the deletion position; or, write the target storage path in the target file table, and update the path status of the initial storage path of the file to be operated on in the target file table to unavailable.

[0144] In an optional embodiment, the reading module 602 is further configured to:

[0145] In response to file operation instructions for the cloud drive, a log record is generated; the log identifier of the log record is determined, and the log record and the log identifier of the log record are stored in the operation log.

[0146] In an optional embodiment, the reading module 602 is further configured to:

[0147] Based on the status information of the log records in the operation log of the cloud drive, the initial log records with unprocessed status information are selected as pending log records for file operation processing.

[0148] In an optional embodiment, the update module 606 is further configured to:

[0149] Receive a search request submitted by the client for the cloud storage; search for the target file path in the target file table based on the search request; determine the target file in the cloud storage based on the target file path and send the result back to the client.

[0150] In summary, one embodiment of this specification involves reading pending log records from the operation log of the file to be operated on in the cloud drive; loading the target storage path after the file operation on the file to be operated on according to the pending log records; and updating the target file table corresponding to the cloud drive based on the target storage path. The target file table is used to query files stored in the cloud drive. This achieves the goal of updating the target file table based on the loaded target storage path after the file operation on the file to be operated on. Consequently, when querying files stored in the cloud drive, file queries can be performed directly based on the target file table, avoiding recursive queries across the cloud drive, thus improving file retrieval efficiency and shortening file query waiting time.

[0151] The above is an illustrative scheme of a cloud storage management device according to this embodiment. It should be noted that the technical solution of this cloud storage management device and the technical solution of the cloud storage management method described above belong to the same concept. For details not described in detail in the technical solution of the cloud storage management device, please refer to the description of the technical solution of the cloud storage management method described above.

[0152] Corresponding to the above method embodiments, this specification also provides embodiments of a cloud storage management system. Figure 7 A schematic diagram of a cloud storage management system according to one embodiment of this specification is shown. Figure 7 As shown, the cloud storage management system includes a client 710 and a cloud storage server 720.

[0153] The client 710 is configured to determine the file to be operated on, perform file operation processing on the file to be operated on, and submit a file table update request to the cloud storage server based on the file operation processing result.

[0154] The cloud storage server 720 is configured to, in response to the file table update request, read the pending log records of the file to be operated on from the operation log of the cloud storage server, load the target storage path after the file operation is performed on the file to be operated on according to the pending log records, and update the target file table corresponding to the cloud storage server based on the target storage path.

[0155] In practical applications, when using cloud storage for file storage and management, users can modify, delete, move, and copy files, and also upload files. When moving file H in the cloud storage, a file move request is submitted. Upon receiving the request, the cloud storage server generates a log entry (Log 1) and moves file H to file K in the same directory. When updating the path of file H in the cloud storage based on the log entry, Log 1 is read to determine the new path of file H: / K / H. When updating the path table in the cloud storage, the storage path of file H is updated according to the path / K / H.

[0156] Furthermore, in scenarios where files are uploaded to a cloud drive for storage, the user determines the file L to be uploaded and its storage location. The user uploads file L to the cloud drive via a client, submitting an upload command to the cloud drive system. This upload command includes the storage location information for file L (stored in file A under the root directory). Upon receiving the upload command, the cloud drive server generates a log record "log5, store file L in file A" and stores this log record in the cloud drive's log table. If the user then submits a file move command to move file L to file B under the root directory, the cloud drive server generates a log record "log6, move file L to file B". When executing the file operation corresponding to the log record, logs log5 and log6 are read sequentially. Based on the user's execution result, path refresh tasks 5 and 6 are generated, and the corresponding directory tree of the cloud drive is updated accordingly based on the file operation performed on file L. Execute path refresh tasks 5 and 6. When path refresh task 6 is executed first, the path corresponding to file L, `root directory / A / L`, is updated to `root directory / B / L`. If path refresh task 5 is executed first and then path refresh task 6, after path refresh task 5 completes, the storage path of file L, `root directory / A / L`, is added to the cloud drive's path table. After path refresh task 6 completes, the path corresponding to file L, `root directory / A / L`, is updated to `root directory / B / L`. Therefore, when searching for file L subsequently, the path table can be directly read to determine the storage path of file L.

[0157] In summary, the client performs file operations on the file to be operated on and submits a file table update request to the cloud storage server based on the results. The cloud storage server responds to the file table update request by reading the pending log records of the file operations performed on the file to be operated on from the cloud storage's operation log; loading the target storage path after the file operations on the file to be operated on; and updating the corresponding target file table in the cloud storage based on the target storage path. This achieves the goal of updating the target file table based on the loaded target storage path after the file operations on the file to be operated on. Therefore, when querying files stored in the cloud storage, file queries can be performed directly based on the target file table, avoiding recursive queries across the cloud storage, thus improving file retrieval efficiency and shortening file query waiting time.

[0158] The above is an illustrative scheme of a cloud storage management system according to this embodiment. It should be noted that the technical solution of this cloud storage management system and the technical solution of the cloud storage management method described above belong to the same concept. For details not described in detail in the technical solution of the cloud storage management system, please refer to the description of the technical solution of the cloud storage management method described above.

[0159] This specification also provides an embodiment of another cloud storage management system, including: a client and a cloud storage server;

[0160] The client is used to submit executable instructions for updating the file table, and the cloud storage server is used to execute the executable instructions for updating the file table. When the executable instructions for updating the file table are executed by the cloud storage server, the steps of the cloud storage management method are implemented.

[0161] Figure 8 A structural block diagram of a computing device 800 according to one embodiment of this specification is shown. The components of the computing device 800 include, but are not limited to, a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and a database 850 is used to store data.

[0162] The computing device 800 also includes an access device 840, which enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 840 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0163] In one embodiment of this application, the aforementioned components of the computing device 800 and Figure 8 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 8 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.

[0164] The computing device 800 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 800 can also be a mobile or stationary server. The processor 820 is configured to execute computer-executable instructions, which, when executed by the processor, implement the steps of the aforementioned cloud storage management method.

[0165] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the above-described cloud storage management method belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the above-described cloud storage management method.

[0166] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the above-described cloud storage management method.

[0167] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the above-described cloud storage management method belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the above-described cloud storage management method.

[0168] An embodiment of this specification also provides a computer program, wherein when the computer program is executed on a computer, it causes the computer to perform the steps of the above-described cloud storage management method.

[0169] The above is an illustrative example of a computer program according to this embodiment. It should be noted that the technical solution of this computer program and the technical solution of the aforementioned cloud storage management method belong to the same concept. Details not described in detail in the computer program's technical solution can be found in the description of the technical solution of the aforementioned cloud storage management method.

[0170] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0171] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0172] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.

[0173] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0174] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A cloud storage management method, applied to a cloud storage server, comprising: In the cloud drive's operation log, read the pending log records of the file to be operated on and perform file operation processing. Load the target storage path after performing file operation processing on the file to be operated on, based on the log records to be processed; The target file table corresponding to the cloud drive is updated based on the target storage path, wherein the target file table is used to query the files stored in the cloud drive; When the number of pending log records corresponds to the number of target storage paths, updating the target file table corresponding to the cloud drive based on the target storage paths includes: determining the record identifier of each path refresh record according to the path refresh record table, and determining a first path refresh record and a first record identifier of the first path refresh record among at least two path refresh records; if there is a second record identifier greater than the first record identifier among the record identifiers, determining at least one second path refresh record corresponding to the second record identifier, and updating the target file table corresponding to the cloud drive based on the first storage path of the first path refresh record and the second storage path of each second path refresh record, wherein the path refresh record table is used to store path refresh records obtained by performing file operation processing on the file to be operated on.

2. The method according to claim 1, characterized in that, When there are at least two files to be operated on, before the step of reading the pending log record of the files to be operated on in the cloud drive's operation log is executed, the method further includes: Based on the results of file operations on the files to be operated on, a path refresh record is generated for each file to be operated on and stored in the path refresh record table of the cloud drive. Accordingly, loading the target storage path after performing file operation processing on the file to be operated on based on the log records to be processed includes: At least two path refresh records are read in parallel from the path refresh record table, and the target storage path after file operation processing is determined based on each path refresh record.

3. The method according to claim 2, characterized in that, The step of generating a path refresh record for each file to be operated on based on the operation results of the file operation processing, and storing it in the path refresh record table of the cloud drive, includes: Based on the result of the file operation on the file to be operated, the initial directory tree before the file operation on the file to be operated is updated to the target directory tree after the file operation on the file to be operated, wherein the initial directory tree and the target directory tree are used to represent the storage path of the file in the cloud drive; Based on the initial directory tree and the target directory tree, a path refresh record is generated for each file to be operated on, and stored in the path refresh record table of the cloud drive.

4. The method according to claim 1, further comprising: If there is no second record identifier greater than the first record identifier in the record identifier, the target file table corresponding to the cloud drive is updated based on the first storage path of the first path refresh record, wherein the update operation corresponding to the second path refresh record is not executed.

5. The method according to claim 4, wherein updating the target file table corresponding to the cloud drive based on the first storage path of the first path refresh record and the second storage path of each second path refresh record includes: Based on the first storage path of the first path refresh record, update the initial path information of the file to be operated corresponding to the first path refresh record in the target file table of the cloud disk to the target path information; At least one second path refresh record is sorted according to the second record identifier, and the target path information is updated sequentially according to the second storage path corresponding to the sorted second path refresh record.

6. The method according to claim 1, characterized in that, The step of updating the target file table corresponding to the cloud drive based on the target storage path includes: Obtain the target file table corresponding to the cloud drive; Delete the initial storage path of the file to be operated on in the target file table, and write the target storage path at the deletion location; or, write the target storage path in the target file table, and update the path status of the initial storage path of the file to be operated on in the target file table to unavailable.

7. The method according to claim 1, characterized in that, Before the step of reading the pending log record for file operation processing of the file to be operated on in the cloud storage operation log is executed, the following steps are also included: Logs are generated in response to file operation commands on the cloud drive. The log identifier of the log record is determined, and the log record and the log identifier of the log record are stored in the operation log.

8. The method according to claim 1, characterized in that, The process of reading the file to be operated on from the cloud drive's operation log includes pending log records, such as: Based on the status information of the log records in the operation log of the cloud drive, the initial log records with unprocessed status information are selected as pending log records for file operation processing.

9. The method according to claim 1, after the step of updating the target file table corresponding to the cloud drive based on the target storage path is performed, it further includes: Receive search requests submitted by clients for the cloud storage service; Based on the search request, the target file path is located in the target file table; The target file is determined in the cloud drive based on the target file path and then sent back to the client.

10. A cloud storage management device, comprising: The read module is configured to read pending log records of files to be operated on from the operation log of the cloud drive and perform file operation processing. The loading module is configured to load the target storage path after file operation processing of the file to be operated on, based on the log records to be processed; The update module is configured to update the target file table corresponding to the cloud drive based on the target storage path, wherein the target file table is used to query the files stored in the cloud drive; When the number of pending log records corresponds to the number of target storage paths, the loading module is further configured to determine the record identifier of each path refresh record according to the path refresh record table, and determine a first path refresh record and a first record identifier of the first path refresh record among at least two path refresh records; if there is a second record identifier greater than the first record identifier among the record identifiers, determine at least one second path refresh record corresponding to the second record identifier, and update the target file table corresponding to the cloud drive based on the first storage path of the first path refresh record and the second storage path of each second path refresh record, wherein the path refresh record table is used to store path refresh records obtained by performing file operation processing on the file to be operated on.

11. A cloud storage management system, comprising a client and a cloud storage server; The client is configured to determine the file to be operated on and perform file operation processing on the file to be operated on. Based on the file operation processing results, a file table update request is submitted to the cloud storage server; The cloud storage server is configured to, in response to the file table update request, read the pending log records of the file to be operated on from the operation log of the cloud storage, and load the target storage path after the file operation is performed on the file to be operated on according to the pending log records; Update the target file table corresponding to the cloud drive based on the target storage path; When the number of pending log records corresponds to the number of target storage paths, updating the target file table corresponding to the cloud drive based on the target storage paths includes: determining the record identifier of each path refresh record according to the path refresh record table, and determining a first path refresh record and a first record identifier of the first path refresh record among at least two path refresh records; if there is a second record identifier greater than the first record identifier among the record identifiers, determining at least one second path refresh record corresponding to the second record identifier, and updating the target file table corresponding to the cloud drive based on the first storage path of the first path refresh record and the second storage path of each second path refresh record, wherein the path refresh record table is used to store path refresh records obtained by performing file operation processing on the file to be operated on.

12. A cloud storage management system, comprising: Client and cloud storage server; The client is used to submit a file table update executable instruction, and the cloud storage server is used to execute the file table update executable instruction. When the file table update executable instruction is executed by the cloud storage server, it implements the steps of the method according to any one of claims 1 to 9.

13. A computing device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the cloud storage management method according to any one of claims 1 to 9.

14. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the cloud storage management method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • System and method for power management of memory devices

    CN103777725A

  • Data processing method and device and electronic equipment

    CN110795318A