File management method and system
By assigning attribute parameters to files and using the metadata module to manage file status, the problem of insufficient flexibility of block device WORM attributes is solved, enabling flexible management of file status and efficient data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ANCHAO CLOUD SOFTWARE CO LTD
- Filing Date
- 2023-01-10
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, the WORM attribute of block devices is not flexible enough. Each time, attribute data information must be read from the block device medium to determine whether it can be read and written, resulting in low efficiency.
A file management method and system are provided, which assigns attribute parameters to files based on the file's storage directory or user instructions, manages the file status through a metadata module, directly determines file operation permissions, and avoids directly reading attribute data from the block device medium.
It enables flexible management of file status, improves the security and efficiency of data transmission, reduces the impact of data loss caused by device malfunctions, automatically maintains backup protection, and improves reading efficiency.
Smart Images

Figure CN115994383B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of document management methods, specifically relating to a document management method and system. Background Technology
[0002] WORM (Write Once Read Many) technology refers to writing data to a storage device once and allowing it to be read multiple times, but not modified or deleted, providing relatively secure protection for important data. Currently used WORM technologies include optical disc technology, magnetic tape technology, and hard disk technology. The first two are traditional backup and archiving media, but with the increasing prevalence of WORM technology in recent years, the demand for large-scale data and flexible WORM functionality has become increasingly urgent.
[0003] For disk technology, the current strategy is to comply with worm regulations. Through disk array management software, worm storage volumes are created. Once data is stored in a worm storage volume, it is under the control of the disk array software. Within a specified period, even the file creator or system administrator cannot change, delete, or even rename the archived data. Only intentional damage to the disk can lead to the deletion or alteration of data, or the use of special techniques to modify the stored data. Moreover, the modified data cannot be identified, and it is impossible to detect which data has been tampered with. Therefore, worm attributes are not flexible enough and can bring unpredictable losses to worm storage users.
[0004] Furthermore, in monitored block storage applications, disk attribute control involves an upper-layer command aimed at writing to the underlying disk. This command first queries the storage resource, which then sends a request to the disk or other storage media. This layer then checks the target file to determine if data can be written, and the result is returned layer by layer to the upper-layer command to set a flag, thus preventing writes to the block storage. This approach requires reading attribute data from the block device media each time to determine read / write permissions, resulting in low efficiency. Summary of the Invention
[0005] The purpose of this application is to provide a file management method and system that solves the technical problem in the prior art where the block device worm attributes are not flexible enough and attribute data information must be read from the block device medium each time to determine whether it can be read or written, resulting in low efficiency.
[0006] To achieve the above objectives, one technical solution adopted in this application is:
[0007] A file management method is provided, including file status management, wherein the file status management includes:
[0008] Assign attribute parameters to files based on their storage directory or user instructions;
[0009] The status of the file is managed based on the attribute parameters.
[0010] In one or more embodiments, file metadata management is also included, the file metadata management comprising:
[0011] Create a metadata module, which stores file metadata, and the file metadata is used to determine whether a user has permission to perform file operation requests.
[0012] After the file's state changes, an update instruction is sent to cause the metadata module to update the file's metadata.
[0013] In one or more embodiments, the attribute parameters include file protection level, waiting time for protection, and protection duration.
[0014] In one or more embodiments, the file protection level includes a first protection level, and the file includes a first file having the first protection level;
[0015] The steps for managing the status of the file based on the attribute parameters specifically include:
[0016] When the duration during which the first file is in an unprotected state reaches the waiting period for protection, or in response to a user's protection request, the first file is transferred to a protected state;
[0017] When the duration of the first file being in the protected state reaches the protection duration, the first file is transferred to an expired state that can only be deleted and read.
[0018] In one or more embodiments, the step of managing the state of the file based on the attribute parameters further includes:
[0019] In response to the user's request for unprotection, the first file, which is in the expired state, is transferred to the unprotected state;
[0020] In response to the user's request to continue writing, the first file, which is in the expired state, is transferred to a write-only and read-only state.
[0021] In response to a user's instruction, the first file in the continued writing state is transferred to the unprotected state, protected state, or expired state.
[0022] In one or more embodiments, the file protection level includes a second protection level, and the file includes a second file having the second protection level;
[0023] The steps for managing the status of the file based on the attribute parameters specifically include:
[0024] When the duration during which the second file remains unprotected reaches the specified protection waiting time, a protection start request is sent. This causes the metadata module to update the file metadata and check if it is currently within the user response time. If it is, the metadata module sends an inquiry request to the user to provide feedback on the next protection instruction. If it is not currently within the user response time...
[0025] Move the second file to a temporary protected state.
[0026] In one or more embodiments, the file protection level includes a second protection level, and the file includes a second file having the second protection level;
[0027] The steps for managing the status of the file based on the attribute parameters specifically include:
[0028] When the second file protection ends, a protection end request is sent to cause the metadata module to update the file metadata and check if it is currently a user response time. If it is, the metadata module sends an inquiry request to the user to provide feedback on the next protection instruction; if it is not, the request is sent to the user.
[0029] Move the second file to a temporary protected state.
[0030] In one or more implementations, the temporary protection state persists until the next user response time;
[0031] The step of managing the status of the file based on the attribute parameters further includes:
[0032] After the temporary protection state of the second file ends, a temporary protection end request is sent so that the metadata module updates the file metadata and sends an inquiry request to the user.
[0033] Receive processing instructions from the user in response to the sent inquiry request, and manage the second file based on the processing instructions; or, when the time elapsed after the temporary protection end request is sent reaches the waiting protection time, transfer the file that has passed the temporary protection state to the protection state.
[0034] In one or more embodiments, data disaster recovery is also included, the data disaster recovery comprising:
[0035] Perform a full backup of the files in the database to create a full data backup library, and perform backup protection on the files under the full data backup library;
[0036] The backup protection time is calculated based on the time point of merging the difference data;
[0037] After the backup protection is completed or in response to the user's instruction, the files under the full data volume backup library are moved to an unprotected state, and a differential backup request is sent so that the database can perform a differential file backup task to merge the differential files into the full data volume backup library;
[0038] After the differential file backup task is completed, the files under the full data backup library are backed up and protected.
[0039] In one or more embodiments, state monitoring is also included, the state monitoring comprising:
[0040] In response to a supervisory protection instruction for an expired unprotected file, the expired unprotected file is protected. The supervisory protection instruction is sent by the database server after it discovers the expired unprotected file by traversing the file metadata in the metadata module.
[0041] To achieve the above objectives, another technical solution adopted in this application is:
[0042] A file management system is provided, characterized in that it includes:
[0043] The file management module is used to assign attribute parameters to files based on their storage directory or user instructions, and to manage the status of files based on these attribute parameters.
[0044] In one or more embodiments, a metadata module is also included, which stores file metadata used to determine whether a user has permission to perform a file operation request.
[0045] The file management module is also used to send update instructions after the state of a file changes;
[0046] The metadata module is used to update the file metadata in response to update instructions sent by the file management module.
[0047] In one or more embodiments, the file management module is further configured to perform a full backup of the files in the database and to perform backup protection on the backed-up files; to calculate the backup protection time based on the time point of merging the difference data; to transfer the backed-up files to an unprotected state after the backup protection is completed or in response to a user's instruction, and to send a difference backup request so that the database performs a difference file backup task; and to perform backup protection on the backed-up files after the difference file backup task is completed.
[0048] In one or more embodiments, a server is also included, which is configured to traverse the file metadata in the metadata module and analyze the status of the files, and to send a supervisory protection instruction after a timeout is found to be an unprotected file;
[0049] The file management module is used to protect files that have not been protected after the timeout period in response to the monitoring and protection command.
[0050] The advantages of this application, which differ from existing technologies, are:
[0051] This application enables flexible management of file status for files with different attribute parameters, thereby improving the security and efficiency of data transmission;
[0052] This application can maintain a set of full data backup databases that are under long-term backup protection, and automatically maintain and update the data, reducing the impact of data loss due to equipment failure;
[0053] This application creates a metadata module, which allows the upper layer to directly read file attribute data information, thereby improving reading efficiency. Attached Figure Description
[0054] Figure 1 This is a flowchart illustrating one implementation method of document status management in the document management method of this application;
[0055] Figure 2 This is a flowchart illustrating one implementation method of file metadata management in the document management method of this application;
[0056] Figure 3 yes Figure 1 A flowchart of one embodiment corresponding to step S20a;
[0057] Figure 4 yes Figure 1 A flowchart illustrating another embodiment corresponding to step S200;
[0058] Figure 5 This is a flowchart illustrating one implementation method of data disaster recovery in the document management method of this application.
[0059] Figure 6 This is a flowchart illustrating one implementation method of status monitoring in the document management method of this application.
[0060] Figure 7 This is a structural block diagram of one embodiment of the document management system of this application. Detailed Implementation
[0061] The present application will now be described in detail with reference to the embodiments shown in the accompanying drawings. However, these embodiments do not limit the present application, and any structural, methodological, or functional modifications made by those skilled in the art based on these embodiments are included within the protection scope of the present application.
[0062] Currently, disk technology employs a worm compliance model for file worm management. This means that once a target file is protected, no user can modify it; it can only be read-only. This results in data, once stored in a worm storage volume, being under the control of the disk enclosure software, being unchangeable, deleted, or even renamed by the file creator or system administrator within a specified period. Only intentional disk damage or special techniques can lead to data deletion or alteration, and the modified data is undetectable and cannot be identified. Therefore, worm attributes are inflexible and can cause unpredictable losses for worm storage users.
[0063] Furthermore, in current block storage applications under monitoring, write commands sent from the upper layer to the underlying disk all require direct querying of the storage resource. The storage resource then sends a request to the storage medium, such as the disk, which determines whether data can be written by comparing it with the target file. The result is then returned layer by layer to the upper layer to set a flag, thereby preventing writes to the block storage. This approach requires reading attribute data from the block device medium each time to determine read / write permissions, resulting in low efficiency.
[0064] To address the aforementioned issues, this application provides a file management method primarily targeting industries such as finance, healthcare, and security, which have high requirements for the protection of file data. Specifically, this method can be used to protect read-only files, such as user data for fixed deposits, medical videos, and videos recorded by street surveillance cameras, thereby ensuring the security of file data.
[0065] Specifically, file management methods include file status management; please refer to [link / reference]. Figure 1 , Figure 1 This is a flowchart illustrating one implementation method of document status management in the document management method of this application.
[0066] File status management includes:
[0067] S10a: Assign attribute parameters to files based on their storage directory or user instructions.
[0068] Specifically, each directory in the database can be configured with corresponding file attributes. Placing a file in this directory will be considered to have the corresponding file attributes. The file attributes of this directory can be set by the user, or they can be automatically generated by the system. For example, when a user requests a new backup file or a new backup directory, the newly generated file and directory can use the file attributes of its parent directory. Alternatively, they can be system default parameters, all of which can achieve the effect of this implementation method.
[0069] Based on the file's storage directory in the database, file attributes can be obtained, and attribute parameters can be assigned to the file.
[0070] In some application scenarios, when the protection requirements of files in a certain directory differ from the file attributes of files in that directory, users can manually modify their file attributes, or users can specify the file attributes of a file or directory in a certain storage path as the file attributes of that file, that is, assign attribute parameters to the file based on user instructions.
[0071] Specifically, the attribute parameters may include the file's protection level, the waiting time for protection, and the protection duration. The file's protection level represents the importance of the file. In one application scenario, the file's protection level may include a first protection level with low importance and a second protection level with high importance. In other application scenarios, the file's protection level may also include multiple levels of different importance, all of which can achieve the effect of this implementation method.
[0072] The protection waiting time is the time a file waits in an unprotected state. The file is open for a period of time after it is created, during which time it can be read and written by users until the protection waiting time is reached, after which the file can be protected.
[0073] The protection duration is the length of time a file remains in a protected state. Once the protection duration is reached, the file can proceed to the next state transition.
[0074] It is worth noting that the time in all embodiments of this application is based on the legal clock, which can only be initialized once and cannot be modified after initialization. The waiting protection time, protection duration, etc. in the system must be set in advance. If not set, the default duration will be used to replace the duration required in the file management process.
[0075] S20a, Manage file status based on attribute parameters.
[0076] Once the file's attribute parameters are determined, the file's status can be managed based on these parameters.
[0077] To improve the efficiency of file management and the processing efficiency of upper-level commands, the file management method also includes file metadata management. For details, please refer to [link to relevant documentation]. Figure 2 , Figure 2 This is a flowchart illustrating one implementation method of file metadata management in the document management method of this application.
[0078] S10b, Create the metadata module.
[0079] Specifically, the metadata module stores file metadata, which includes information describing data attributes to support functions such as indicating storage location, historical data, resource lookup, and file records.
[0080] Specifically, in one implementation, file metadata may include important parameters such as the last modification time, the file start protection time, and the protection duration. Based on the file metadata, the current state of the file can be determined, which helps to determine whether the user has permission to perform operations on the file. This allows upper-layer instructions to be determined directly by the metadata module without having to be passed to the storage layer for judgment.
[0081] In other embodiments, the file metadata stored in the metadata module may also include other parameters, such as the file's last access time, occupied space, directory, creation time, etc., all of which can achieve the effect of this embodiment.
[0082] Understandably, in specific application scenarios, the file parameters included in the metadata module can be set based on the user's specific needs, and are not limited to the parameters mentioned above.
[0083] To ensure that the file metadata within the metadata module remains consistent with the file status managed by the system, the following is also included:
[0084] S20b: After the state of a file changes, an update instruction is sent to cause the metadata module to update the file metadata.
[0085] Understandably, whenever the state of a file managed by the system changes, an update command can be sent to the metadata module to update the file metadata accordingly, thereby ensuring consistency between the two and guaranteeing the accuracy of the metadata module's judgment on the permissions of the upper-level commands.
[0086] The following section provides a more detailed explanation of the management methods for files with different attribute parameters.
[0087] In one implementation, please refer to Figure 3 , Figure 3 yes Figure 1 A flowchart of one embodiment corresponding to step S20a.
[0088] When the file to be managed is a first-level file with low importance and the first level of protection, the methods for managing the file's status based on attribute parameters include:
[0089] S201. When the duration during which the first file is in an unprotected state reaches the waiting period for protection, or in response to a user's protection request, the first file is transferred to a protected state.
[0090] For a low-importance first file, the status of the first file can be automatically transferred to the protected status when the time in the unprotected state reaches the waiting time for protection; alternatively, the status of the first file can be transferred to the protected status based on the user's active request.
[0091] In one application scenario, this protection state can be the Worm Enterprise Compliance Mode, where ordinary users cannot write or delete files; the file is read-only, and only the super administrator can read, write, and delete the file. In other application scenarios, this protection state can also adopt other levels of protection based on user settings, such as ordinary users only being able to write to or read-only the file, or any user being unable to write or delete the file, all of which can achieve the effect of this implementation method.
[0092] S202. When the duration of the protection period for the first file reaches the protection period, the first file is transferred to an expired state where it can only be deleted and read.
[0093] When the first file has been protected for the preset duration, the system can automatically transfer the first file to the expired state.
[0094] When the file is expired, it can only be deleted and read, but cannot be written to, thus preventing the file from being tampered with, while still allowing the deletion of the first file.
[0095] Based on the above steps S201 and S202, automatic protection and automatic deprotection of low-importance first files can be achieved.
[0096] In one application scenario, when a user needs to write to the first file that is in an expired state, it may also include:
[0097] S203. In response to the user's request for unprotection, the first file, which is in an expired state, is moved to an unprotected state.
[0098] Based on the user's request for unprotection, the first file, which is in an expired state, is moved to an unprotected state where write operations can be performed.
[0099] Understandably, after the first file is rewritten, it will be transferred back to the protected state for protection after the protection period has elapsed.
[0100] In one application scenario, when a user needs to rewrite the first file that has expired, it may also include:
[0101] S204. In response to the user's rewrite request, the first file that is in an expired state is transferred to a rewrite state that allows only writing and reading.
[0102] In continuation mode, files can only be read or appended to the end, but cannot be modified or deleted, thus preventing the file's original content from being tampered with or deleted.
[0103] S205. In response to the user's instruction, the first file in the write-continuation state is transferred to an unprotected state, a protected state, or an expired state.
[0104] After the first file is completed, the user can actively send a command to transfer the first file to any other state.
[0105] Understandably, after the first file is transferred to the unprotected state after the continuation is completed, it will be transferred back to the protected state for protection after the protection period has elapsed; after the first file is transferred to the protected state after the continuation is completed, it will be transferred back to the protected state for protection after the protection period has elapsed.
[0106] Therefore, the above method enables automatic management of the status of the first file, which has low importance. Furthermore, it is understandable that during the management process, whenever the status of the first file changes, the system can send an update command to the metadata module, allowing the file metadata in the metadata module to be updated accordingly, thus ensuring consistency between the two.
[0107] In one implementation, please refer to Figure 4 , Figure 4 yes Figure 1 A flowchart illustrating another embodiment corresponding to step S20a.
[0108] When the file to be managed is a high-importance, second-level protection file, the methods for managing the file status based on attribute parameters include:
[0109] S201' When the duration of the second file being in an unprotected state reaches the waiting protection duration, a start protection request is sent so that the metadata module updates the file metadata and queries whether the current time is the user response time.
[0110] Understandably, given the high importance of the second file, users need to set specific protection duration and other parameters based on their actual needs. Therefore, when the second file reaches the start protection time, a start protection request is sent.
[0111] After receiving the protection start request, the metadata module can update the file metadata corresponding to the second file and determine whether the current time is the user's response time. Specifically, the determination method can be based on information such as the last modification time in the statistical metadata, or it can be based on a responsive time period manually stored by the user in the metadata module; both methods can achieve the effect of this implementation.
[0112] S202a' If the current period is the user response time, the metadata module sends an inquiry request to the user to obtain feedback on the next protection instruction.
[0113] If the current time is the user's response time, the metadata module can directly send an inquiry request to the user. After receiving the inquiry request, the user can provide a specific protection strategy for the second file, i.e., the next protection instruction, thereby ensuring the flexibility of the entire file management method.
[0114] In one application scenario, the steps synchronized with step S202a' also include:
[0115] S202b' If the current time is not a user response time, move the second file to a temporary protection state.
[0116] If the current time is not within the user's response time, the system can automatically move the second file to a temporary protection state, thereby effectively ensuring the security of the file.
[0117] Understandably, providing further protection instructions based on user feedback, or automatically transferring the second file to a temporary protection state, can effectively protect the second file and ensure its security.
[0118] In one application scenario, after the metadata module sends an inquiry request to the user, the second file can also be moved to a temporary protection state simultaneously, thereby avoiding the impact on file security due to situations such as the user's failure to provide timely feedback.
[0119] S203': When the second file protection ends, a protection end request is sent so that the metadata module updates the file metadata and queries whether the current time is the user response time.
[0120] Understandably, for the second file, given its high importance, the user can choose its subsequent protection strategy based on actual needs when the protection ends, thereby ensuring the security and flexibility of file protection, i.e., sending a protection end request.
[0121] The protection can end when the second file is in the protected state for the time specified by the user, or when the temporary protection state of the second file ends.
[0122] After receiving the protection termination request, the metadata module can update the file metadata corresponding to the second file and determine whether the current time is the user's response time. Specifically, the determination method can be based on information such as the last modification time in the statistical metadata, or it can be based on a responsive time period manually stored by the user in the metadata module; both methods can achieve the effect of this implementation.
[0123] S204a' If the current period is the user response time, the metadata module sends an inquiry request to the user to obtain feedback on the next protection instruction.
[0124] If the current time is the user's response time, the metadata module can directly send an inquiry request to the user. After receiving the inquiry request, the user can provide specific protection strategies for the second file, i.e., the next protection instructions, thereby ensuring the flexibility of the entire file management method.
[0125] In one application scenario, the steps synchronized with step S204a' also include:
[0126] S204b' If the current time is not a user response time, move the second file to a temporary protection state.
[0127] If the current time is not within the user's response time, the system can automatically move the second file to a temporary protection state, thereby effectively ensuring the security of the file.
[0128] In one implementation, the temporary protection state in the above steps can be the Worm regulatory compliance mode, which means that once the target file is protected, no user can modify it and it can only be read; or it can be the Worm enterprise compliance mode, which means that ordinary users cannot write or delete the file; the file is read-only, and only the super administrator can read, write, delete and other operations on the file; or it can be other protection methods manually set by the user, all of which can achieve the effect of this implementation.
[0129] The temporary protection state can persist until the next user response time, allowing the user to provide further protection instructions for the second file. Specifically, after the second file is automatically transferred to the temporary protection state by the system, the following steps may also be included:
[0130] After the temporary protection state of the second file ends, a temporary protection end request is sent so that the metadata module updates the file metadata and sends an inquiry request to the user.
[0131] Receive processing instructions from users in response to sent inquiry requests, and manage the second file based on the processing instructions.
[0132] When the temporary protection status of the second file ends, the system can send a temporary protection end request. After receiving the temporary protection end request, the metadata module can update the file metadata corresponding to the second file and send an inquiry request to the user.
[0133] After receiving an inquiry request, the user can provide specific processing instructions based on actual needs, so that the system can manage the second file based on the user's processing instructions.
[0134] If the waiting period for protection expires after the user sends a temporary protection termination request, the second file can be transferred back to the protected state, thereby protecting the file's security. This protection state can be Worm regulatory compliance mode, Worm enterprise compliance mode, or other system default protection methods, all of which can achieve the effect of this implementation method.
[0135] To further enhance the security of files in the database, file management methods also include data disaster recovery; please refer to [link / reference needed]. Figure 5 , Figure 5 This is a flowchart illustrating one implementation method of data disaster recovery in the document management method of this application.
[0136] Specifically, data disaster recovery includes:
[0137] S10c: Perform a full backup of the files in the database to create a full data backup library, and perform backup protection on the files in the full data backup library.
[0138] Specifically, the system can perform a full backup of files in the database, thereby creating a full backup library. This library contains all the data from the database backup and can be stored remotely to ensure file security.
[0139] The backup protection can be either a worm regulatory compliance mode that cannot be modified by any user, or a protection method manually set by other users, both of which can achieve the effect of this implementation method.
[0140] To enable updates to the full database backup repository, it may also include:
[0141] S20c: Calculate the backup protection time based on the time point of merging the difference data.
[0142] Specifically, the time point for merging the difference data can be manually set by the user or a default time can be used. Based on the time point for merging the difference data, the system can calculate the backup protection time. The specific calculation can be the next time point for merging the difference data minus the backup completion time.
[0143] S30c: After backup protection is completed or in response to user instructions, the files under the full data backup library are moved to an unprotected state, and a differential backup request is sent so that the database can perform a differential file backup task to merge the differential files into the full data backup library.
[0144] S40c: After the differential file backup task is completed, perform backup protection on the files under the full data backup library.
[0145] When the time for merging the differential data is reached, the backup protection is complete. At this point, the system can unlock the files under the full data backup library, that is, move them to an unprotected state, and send a differential backup request.
[0146] After receiving a differential backup request, the database can merge the differential files into the full data backup database, thereby updating the full data backup database.
[0147] After the differential file backup task is completed, the system can re-back up and protect the files under the full data backup library.
[0148] Understandably, based on the above steps, the system and the database can jointly maintain a full-database backup database that includes all data in the database, is updated regularly, and is stored separately on a remote device, thereby ensuring file security and achieving data disaster recovery.
[0149] To further ensure the accuracy of the system's file status management, the file management method may also include status monitoring. For details, please refer to [link to relevant documentation]. Figure 6 , Figure 6 This is a flowchart illustrating one implementation method of status monitoring in the document management method of this application.
[0150] State monitoring methods include:
[0151] S10d: In response to the supervisory protection instruction for timed-out unprotected files, the timed-out unprotected files are protected. The supervisory protection instruction is sent by the database server after iterating through the file metadata in the metadata module and finding the timed-out unprotected files.
[0152] Specifically, the database server can periodically traverse the file metadata in the metadata module to send out timed-out unprotected files, that is, files that have been in an unprotected state for longer than their waiting protection time.
[0153] The specific traversal strategy can be as follows: First, determine whether the file is in a protected state by querying the file's protection start time and protection duration. Then, for files in an unprotected state, query the last modification time and the waiting protection duration to determine whether they are timed-out unprotected files.
[0154] When the database server detects an expired unprotected file, it can send a monitoring and protection command to the system. The system can then protect the expired unprotected file, thereby ensuring the accuracy of file management and file security.
[0155] Understandably, during the aforementioned state monitoring process, the database server does not need to directly access the storage layer; it can directly monitor the data by querying the metadata module, which effectively improves efficiency.
[0156] This application also provides a file management system; for details, please refer to [link to relevant documentation]. Figure 7 , Figure 7 This is a structural block diagram of one embodiment of the document management system of this application.
[0157] This file management system includes a file management module 21 and a metadata module 22.
[0158] The file management module 21 is used to assign attribute parameters to files based on the file's storage directory or user instructions, and to manage the file's status based on the attribute parameters.
[0159] The metadata module 22 stores file metadata, which is used to determine whether a user has permission to perform file operation requests.
[0160] The file management module 21 is also used to send update commands after the state of a file changes.
[0161] The metadata module 22 is used to update file metadata in response to update instructions sent by the file management module.
[0162] To achieve data disaster recovery, the file management module 21 is also used to perform full backups of files in the database and to protect the backup files; to calculate the backup protection time based on the time point of merging the difference data; to transfer the backup files to an unprotected state after the backup protection is completed or in response to user instructions, and to send a difference backup request so that the database can perform the difference file backup task; and to protect the backup files after the difference file backup task is completed.
[0163] To enable supervision of file management, the system also includes server 23, which is used to traverse the file metadata in the metadata module and analyze the file status, as well as to send a supervision protection instruction after a timeout is found to be an unprotected file.
[0164] The file management module 21 is used to protect files that have not been protected after the timeout period in response to the monitoring and protection command.
[0165] In this application, the file management module 21, metadata module 22, and server 23 can be three independent devices or integrated into the same system; no limitation is made here. Specifically, the file management module, metadata module, and server can include, but are not limited to: personal computers, server computers, workstations, desktop computers, laptop computers, notebook computers, mobile electronic devices, smartphones, tablet computers, cellular phones, personal digital assistants (PDAs), handheld devices, messaging devices, wearable electronic devices, consumer electronic devices, etc.
[0166] Metadata module 22 may include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tapes, non-volatile memory cards, and ROMs. Optionally, program code may be downloaded from a server computer or the cloud via a communication network.
[0167] Those skilled in the art will understand that the various embodiments disclosed above can be modified and varied without departing from the spirit of the invention. Therefore, the scope of protection of this specification should be defined by the appended claims.
[0168] It should be noted that not all steps and units in the above process and system structure diagrams are mandatory; some steps or units can be omitted according to actual needs. The execution order of each step is not fixed and can be determined as needed. The device structure described in the above embodiments can be a physical structure or a logical structure. That is, some units may be implemented by the same physical client, or some units may be implemented by multiple physical clients, or they may be jointly implemented by certain components in multiple independent devices.
[0169] In the above embodiments, the hardware units or modules can be implemented mechanically or electrically. For example, a hardware unit, module, or processor may include permanent dedicated circuitry or logic (such as a dedicated processor, FPGA, or ASIC) to perform the corresponding operation. The hardware unit or processor may also include programmable logic or circuitry (such as a general-purpose processor or other programmable processor), which can be temporarily configured by software to perform the corresponding operation. The specific implementation method (mechanical, dedicated permanent circuitry, or temporarily configured circuitry) can be determined based on cost and time considerations.
[0170] The specific embodiments described above with reference to the accompanying drawings are exemplary embodiments, but do not represent all embodiments that can be implemented or fall within the scope of the claims. The term "exemplary" as used throughout this specification means "serving as an example, instance, or illustration" and does not imply that it is "preferred" or "advantageous" compared to other embodiments. Specific details are included to provide an understanding of the described techniques. However, these techniques can be practiced without these specific details. In some instances, well-known structures and apparatuses are shown in block diagram form to avoid obscuring the concepts of the described embodiments.
[0171] The foregoing description of this disclosure is provided to enable any person skilled in the art to implement or use this disclosure. Various modifications to this disclosure will be apparent to those skilled in the art, and the general principles applicable herein can be applied to other variations without departing from the scope of this disclosure. Therefore, this disclosure is not limited to the examples and designs described herein, but is consistent with the widest scope of the principles and novel features disclosed herein.
Claims
1. A file management method, characterized in that, This includes file status management and file metadata management, wherein the file status management includes: Assign attribute parameters to files based on their storage directory or user instructions; The status of the file is managed based on the aforementioned attribute parameters; The file metadata management includes: Create a metadata module, which stores file metadata, and the file metadata is used to determine whether a user has permission to perform file operation requests. After the file's state changes, an update instruction is sent to cause the metadata module to update the file's metadata; The attribute parameters include file protection level, protection wait time, and protection duration. The file protection level includes a second protection level with high importance, and the file includes a second file with the second protection level. The steps for managing the status of the file based on the attribute parameters specifically include: When the duration during which the second file remains unprotected reaches the specified protection waiting time, a protection start request is sent. This causes the metadata module to update the file metadata and check if it is currently within the user response time. If it is, the metadata module sends an inquiry request to the user to provide feedback on the next protection instruction. If it is not currently within the user response time... Move the second file to a temporary protected state.
2. The file management method according to claim 1, characterized in that, The file protection level includes a first protection level of low importance, and the file includes a first file having the first protection level; The steps for managing the status of the file based on the attribute parameters specifically include: When the duration during which the first file is in an unprotected state reaches the waiting period for protection, or in response to a user's protection request, the first file is transferred to a protected state; When the duration of the first file being in the protected state reaches the protection duration, the first file is transferred to an expired state that can only be deleted and read.
3. The file management method according to claim 2, characterized in that, The step of managing the status of the file based on the attribute parameters further includes: In response to the user's request for unprotection, the first file, which is in the expired state, is transferred to the unprotected state; In response to the user's request to continue writing, the first file, which is in the expired state, is transferred to a write-only and read-only state. In response to a user's instruction, the first file in the continued writing state is transferred to the unprotected state, protected state, or expired state.
4. The file management method according to claim 1, characterized in that, The steps for managing the status of the file based on the attribute parameters specifically include: When the second file protection ends, a protection end request is sent to cause the metadata module to update the file metadata and check if it is currently a user response time. If it is, the metadata module sends an inquiry request to the user to provide feedback on the next protection instruction; if it is not, the request is sent to the user. Move the second file to a temporary protected state.
5. The file management method according to claim 1 or 4, characterized in that, The temporary protection status lasts until the next user response time; The step of managing the status of the file based on the attribute parameters further includes: After the temporary protection state of the second file ends, a temporary protection end request is sent so that the metadata module updates the file metadata and sends an inquiry request to the user. The system receives a processing instruction from the user in response to the inquiry request, and manages the second file based on the processing instruction; or, when the time elapsed after the temporary protection end request is sent reaches the waiting protection time, the file that has passed the temporary protection state is transferred to the protection state.
6. The file management method according to claim 1, characterized in that, It also includes data disaster recovery, which includes: Perform a full backup of the files in the database to create a full data backup library, and protect the files under the full data backup library by backup. The backup protection time is calculated based on the time point of merging the difference data; After the backup protection is completed or in response to the user's instruction, the files under the full data volume backup library are moved to an unprotected state, and a differential backup request is sent so that the database can perform a differential file backup task to merge the differential files into the full data volume backup library; After the differential file backup task is completed, the files under the full data backup library are backed up and protected.
7. The file management method according to claim 1, characterized in that, It also includes state monitoring, which includes: In response to a supervisory protection instruction for an expired unprotected file, the expired unprotected file is protected. The supervisory protection instruction is sent by the database server after it discovers the expired unprotected file by traversing the file metadata in the metadata module.
8. A document management system, characterized in that, include: The file management module is used to assign attribute parameters to files based on the file's storage directory or user instructions, manage the file's status based on the attribute parameters, and send update instructions after the file's status changes. The metadata module stores file metadata, which is used to determine whether a user has permission to perform file operations. The metadata module is used to update the file metadata in response to update instructions sent by the file management module. The attribute parameters include file protection level, protection wait time, and protection duration. The file protection level includes a second protection level with high importance, and the file includes a second file with the second protection level. The steps for managing the status of the file based on the attribute parameters specifically include: When the duration during which the second file remains unprotected reaches the specified protection waiting time, a protection start request is sent. This causes the metadata module to update the file metadata and check if it is currently within the user response time. If it is, the metadata module sends an inquiry request to the user to provide feedback on the next protection instruction. If it is not currently within the user response time... Move the second file to a temporary protected state.
9. The document management system according to claim 8, characterized in that, The file management module is also used to perform full backups of files in the database and to protect the backup files; and to calculate the backup protection time based on the time point of merging the difference data. And for transferring the backed-up files to an unprotected state after the backup protection is completed or in response to a user instruction, and sending a differential backup request so that the database can perform a differential file backup task; And for backing up and protecting the files after the difference file backup task is completed.
10. The document management system according to claim 8, characterized in that, It also includes a server, which is used to traverse the file metadata in the metadata module and analyze the status of the file, and to send a supervisory protection instruction after a timeout is found to be an unprotected file; The file management module is used to protect files that have not been protected after the timeout period in response to the monitoring and protection command.
Citation Information
Patent Citations
WORM attribute updating method, device, device and medium for file
CN109542850A