Data maintenance method, electronic equipment and computer readable medium
By building a hybrid cloud storage cluster and using the collaborative work of cloud virtual devices and edge storage devices, the problems of insufficient computing power and poor reliability of NAS devices are solved, and efficient and reliable user data storage and dynamic expansion are achieved to meet the needs of large-scale computing applications.
Patent Information
- Application Number
- CN202510840066.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-06-23
AI Technical Summary
Existing user data storage methods such as NAS devices have problems such as poor computing power, limited storage capacity and poor reliability, which are difficult to meet the needs of large-scale computing applications and data security.
Build a hybrid cloud storage cluster, receive and cache file metadata reporting messages through cloud virtual devices and multiple edge storage devices, verify whether there are any exceptions in the edge storage device, and update the file metadata table when necessary, process file access requests, and realize dynamic expansion and reliable data storage.
It improves the computing power and reliability of storage devices, supports large-scale computing applications, ensures data reliability and security, realizes elastic capacity expansion and reduction of storage pools, and improves data maintenance efficiency and reliability.
Smart Images

Figure CN120353408A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage technologies, and specifically, to a data maintenance method, an electronic device, and a computer-readable medium. Background Art
[0002] A common way to store user data is to save user data to the cloud, such as directly using a network disk service for storage, or building a custom cloud disk based on a cloud host for storage. Due to considerations such as data privacy and security, some users then choose to save data to a Network Attached Storage (NAS) device. However, NAS devices still have problems such as poor computing power, limited storage capacity, and poor reliability.
[0003] Therefore, there is an urgent need for a better way to store user data. Summary of the Invention
[0004] This application aims to solve one of the technical problems in the related technologies to a certain extent. For this purpose, this application provides a data maintenance method, an electronic device, and a computer-readable medium.
[0005] As a first aspect of this application, there is provided a data maintenance method for a cloud virtual device, where the cloud virtual device and multiple edge storage devices belong to a storage cluster, and the method includes: Receiving and caching a file metadata reporting message sent by a first edge storage device; where the first edge storage device is one of the multiple edge storage devices, and the file metadata reporting message is cached and sent by the first edge storage device after storing a file uploaded by a user device; Verifying whether there is an abnormal file metadata reporting for the first edge storage device according to the current message unique identifier carried in the file metadata reporting message; In the case where it is verified that there is no abnormal file metadata reporting for the first edge storage device, updating a locally maintained file metadata table according to the file metadata carried in the file metadata reporting message; In the case where it is verified that the first edge storage device has an abnormal file metadata reporting, re-obtaining a file metadata reporting message from the first edge storage device, and updating a locally maintained file metadata table according to the file metadata carried in the re-obtained file metadata reporting message; Processing a file access request message sent by the user device according to the file metadata table.
[0006] Optionally, verifying whether there is an abnormal report of file metadata in the current message unique identifier carried in the report message according to the file metadata includes: Comparing the current message unique identifier with the historical message unique identifier carried in the file metadata report message last sent by the first edge storage device; When the current message unique identifier is consecutive with the historical message unique identifier, it is verified that there is no abnormal report of file metadata in the first edge storage device; When the current message unique identifier is not consecutive with the historical message unique identifier, it is verified that there is an abnormal report of file metadata in the first edge storage device.
[0007] Optionally, when it is verified that there is an abnormal report of file metadata in the first edge storage device, re-obtaining a file metadata report message from the first edge storage device includes: When it is verified that there is an abnormal report of file metadata in the first edge storage device, sending a re-report indication message carrying the historical message unique identifier to the first edge storage device; Receiving the file metadata report message re-sent by the first edge storage device according to the re-report indication message; wherein, the first edge storage device also deletes the file metadata report message whose message unique identifier is before the historical message unique identifier according to the re-report indication message.
[0008] Optionally, after receiving and caching the file metadata report message sent by the first edge storage device and before processing the file interaction request sent by the user device according to the file metadata table, the method further includes: When a preset verification period arrives, sending a report anomaly query message carrying the current message unique identifier to the first edge storage device; Receiving the file metadata report message supplementarily sent by the first edge storage device according to the report anomaly query message; wherein, the first edge storage device also deletes the file metadata report message whose message unique identifier is before the current message unique identifier according to the report anomaly query message; Updating the locally maintained file metadata table according to the file metadata carried in the supplementarily sent file metadata report message.
[0009] Optionally, the file metadata table includes the correspondence between the edge storage device and the file metadata of the files it stores, and the method further includes: Receive the file backup request message sent by the user equipment, and obtain the file identifier of the file to be backed up carried therein; Query the file metadata table according to the file identifier, and determine a second edge storage device storing the file to be backed up; Determine a third edge storage device for backup from the storage cluster; Back up the file to be backed up stored in the second edge storage device to the third edge storage device; Record the file backup relationship between the second edge storage device and the third edge storage device regarding the file to be backed up.
[0010] Optionally, the second edge storage device includes a to-be-migrated edge storage device, the to-be-migrated edge storage device is determined from the multiple edge storage devices based on a preset migration condition, and the file to be backed up includes all files stored in the to-be-migrated edge storage device.
[0011] Optionally, the file metadata table includes the device identifier of the edge storage device, file access information, file permissions, and file metadata, the file metadata includes file tags, and processing the file access request message sent by the user equipment according to the file metadata table includes: Receive the file access request message sent by the user equipment, and obtain the file tag carried therein; Query the file metadata table according to the file tag, and determine a list of files to be accessed; Send the list of files to be accessed to the user equipment, so that the user equipment can select a target file to be accessed according to the list of files to be accessed, parse the target file access information, and download the target file to be accessed from the corresponding edge storage device according to the target file access information.
[0012] As a second aspect of the present application, there is provided a data maintenance method for a user equipment, wherein the method includes: Upload the file to the first edge storage device; wherein, the cloud virtual device and multiple edge storage devices belong to a storage cluster, and the first edge storage device is one of the multiple edge storage devices; after storing the file, the first edge storage device caches and sends a file metadata reporting message to the cloud virtual device, and the cloud virtual device verifies whether there is an abnormal file metadata reporting of the first edge storage device according to the current message unique identifier carried in the file metadata reporting message. When it is verified that there is no abnormal file metadata reporting of the first edge storage device, the file metadata table maintained locally is updated according to the file metadata carried in the file metadata reporting message. When it is verified that there is an abnormal file metadata reporting of the first edge storage device, the cloud virtual device re-obtains the file metadata reporting message from the first edge storage device and updates the file metadata table maintained locally according to the file metadata carried in the re-obtained file metadata reporting message; Send a file access request to the cloud virtual device for the cloud virtual device to process the file access request message according to the file metadata table.
[0013] As a third aspect of the present application, an electronic device is provided, wherein the electronic device includes: One or more processors; A memory storing one or more computer programs, and when the one or more computer programs are executed by the one or more processors, the one or more processors are caused to implement any of the following: The data maintenance method for the cloud virtual device provided in the first aspect of the present application; The data maintenance method for the user device provided in the second aspect of the present application.
[0014] As a fourth aspect of the present application, a computer-readable medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, it implements any of the following: The data maintenance method for the cloud virtual device provided in the first aspect of the present application; The data maintenance method for the user device provided in the second aspect of the present application.
[0015] Through the data maintenance method for cloud virtual devices provided by the embodiments of the present application, a storage cluster including cloud virtual devices and multiple edge storage devices is constructed to maintain user data, which can significantly improve the computing power of storage devices and is beneficial to the maintenance of user data. The dynamic expansion ability can be obtained by adding and deleting edge storage devices, realizing the elastic expansion and reduction of the storage pool, which is beneficial to reasonably setting the storage capacity. After the first edge storage device stores the files uploaded by the user device, it caches and sends a file metadata reporting message to the cloud virtual device. The cloud virtual device verifies whether there is an abnormal file metadata report of the first edge storage device according to the current message unique identifier carried in the file metadata reporting message, and then updates the locally maintained file metadata table according to the verification result to ensure the reliable storage of the file metadata of all edge storage devices in the storage cluster and the reliable processing of the file access request messages sent by the user device. Moreover, in the case of logical damage scenarios such as abnormal power-off or abnormal crash of the edge storage device, the file metadata of the cloud virtual device can be used to recover the file metadata of the edge storage device, which can further improve the reliability of user data. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The present application will be further described below with reference to the accompanying drawings: Figure 1 It is a flowchart of an implementation manner of the data maintenance method for cloud virtual devices provided by the embodiments of the present application; Figure 2 It is a flowchart of an implementation manner of verifying whether there is an abnormal file metadata report of the first edge storage device provided by the embodiments of the present application; Figure 3 It is a flowchart of an implementation manner of re-obtaining the file metadata reporting message from the first edge storage device provided by the embodiments of the present application; Figure 4 It is a flowchart of another implementation manner of the data maintenance method for cloud virtual devices provided by the embodiments of the present application; Figure 5 It is a flowchart of yet another implementation manner of the data maintenance method for cloud virtual devices provided by the embodiments of the present application; Figure 6 It is a flowchart of another implementation manner of the data maintenance method for cloud virtual devices provided by the embodiments of the present application; Figure 7 It is a flowchart of an implementation manner of the data maintenance method for cloud virtual devices provided by the embodiments of the present application; Figure 8 It is a flowchart of an implementation manner of processing the file access request message sent by the user device provided by the embodiments of the present application; Figure 9 It is a module diagram of an implementation manner of the electronic device provided by an embodiment of the present application; Figure 10 It is a schematic diagram of the computer-readable medium provided by an embodiment of the present application.
[0017] Description of the reference numerals in the drawings 101: Processor 102: Memory 103: I / O interface 104: Bus Detailed implementation manners The embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. Based on the embodiments in the implementation manners, it is intended to explain the present application and should not be construed as a limitation to the present application.
[0018] As used in this specification, the phrase "in one embodiment" or "example" or "instance" means that a particular feature, structure, or characteristic described in connection with the embodiment itself can be included in at least one embodiment disclosed in the present application. The appearances of the phrase "in one embodiment" in various places in the specification do not necessarily all refer to the same embodiment.
[0019] A common way to store user data is to save the user data to the cloud, for example, directly using a network disk service for storage, or building a custom cloud disk based on a cloud host and then storing the data. Considering aspects such as data privacy and security, some users then choose to save the data to a NAS device. However, the NAS device still has at least the following three problems: Poor computing power. As an embedded device designed for network storage and data sharing, the NAS has poor computing power and is difficult to handle applications with large computing amounts such as large language models (LLMs), which is not conducive to the maintenance of user data; limited storage capacity. The NAS device does not have the ability to dynamically expand the capacity. When the storage capacity is insufficient, the data can only be exported to a large-capacity hard disk, or a new NAS needs to be redeployed and the data manually copied over; poor reliability. Generally, the reliability of the NAS device is not high and it does not have the ability to perform cross-device data backup. Once the NAS device is damaged, the data will also be lost. In view of this, the applicant of the present application proposes a method for maintaining user data based on a hybrid cloud storage cluster.
[0020] As the first aspect of the embodiments of the present application, a method for maintaining data of a cloud virtual device is provided. The cloud virtual device and multiple edge storage devices belong to a storage cluster, as Figure 1 shown, the method may include: Step S110: Receive and cache the file metadata reporting message sent by the first edge storage device; wherein, the first edge storage device is one of the multiple edge storage devices, and the file metadata reporting message is cached and sent by the first edge storage device after storing the file uploaded by the user device. Step S120: Verify whether there is an abnormal file metadata reporting for the first edge storage device according to the current message unique identifier carried in the file metadata reporting message. Step S130: When it is verified that there is no abnormal file metadata reporting for the first edge storage device, update the locally maintained file metadata table according to the file metadata carried in the file metadata reporting message. Step S140: When it is verified that there is an abnormal file metadata reporting for the first edge storage device, re-obtain the file metadata reporting message from the first edge storage device, and update the locally maintained file metadata table according to the file metadata carried in the re-obtained file metadata reporting message. Step S150: Process the file access request message sent by the user device according to the file metadata table.
[0021] In the embodiment of the present application, a storage cluster is pre-constructed. Specifically, first, a cloud virtual device is created in the cloud as the master device of the storage cluster, and then the user device binds to the edge storage device, and then the user device adds the edge storage device to the storage cluster. The cloud virtual device and the edge storage device both belong to the storage cluster, and this storage cluster can also be called a hybrid cloud storage cluster.
[0022] In the embodiment of the present application, it can be understood that for each edge storage device in the storage cluster, the data maintenance method provided in the embodiment of the present application can be executed. The embodiment of the present application takes the first edge storage device (any edge storage device in the storage cluster) as an example to exemplarily illustrate this data maintenance method. It can be understood that data maintenance includes multiple operations during the data life cycle, such as data storage, update, deletion, backup, recovery, etc.
[0023] After the user device binds to the first edge storage device and adds the first edge storage device to the storage cluster, the user device uploads a file (i.e., user data) to the first edge storage device. After the first edge storage device stores the file uploaded by the user device and its file metadata, it sends and caches the file metadata reporting message to the cloud virtual device.
[0024] After receiving the file metadata reporting message, the cloud virtual device first verifies whether there is an abnormality in the file metadata reporting of the first edge storage device according to the current message unique identifier carried in the file metadata reporting message, and then updates the file metadata table maintained locally according to the verification result to ensure reliable storage of the file metadata of all edge storage devices in the cluster and reliable processing of the file access request messages sent by user devices. Moreover, in the case of logical damage scenarios such as abnormal power-off or abnormal crash of the edge storage device, the file metadata of the cloud virtual device can be used to restore the file metadata of the edge storage device, which can further improve the reliability of user data.
[0025] Moreover, since the computing power of the hybrid cloud storage cluster serves complex distributed scenarios of "storage + computing", and the computing power of NAS devices only serves basic storage functions, the computing power of the cloud virtual device and the edge storage device is significantly higher than that of NAS devices, which can withstand applications with large computing amounts such as large language models, facilitating the maintenance of user data. The distributed architecture of the hybrid cloud storage cluster supports horizontal expansion, and dynamic expansion capabilities can be obtained by adding and deleting edge storage devices, realizing elastic expansion and reduction of the storage pool, which is conducive to reasonable setting of storage capacity.
[0026] Through the data maintenance method for cloud virtual devices provided by the embodiments of this application, a storage cluster including a cloud virtual device and multiple edge storage devices is constructed to maintain user data, which can significantly improve the computing power of storage devices and facilitate the maintenance of user data. Dynamic expansion capabilities can be obtained by adding and deleting edge storage devices, realizing elastic expansion and reduction of the storage pool, which is conducive to reasonable setting of storage capacity. After the first edge storage device stores the file uploaded by the user device, it caches and sends a file metadata reporting message to the cloud virtual device. The cloud virtual device verifies whether there is an abnormality in the file metadata reporting of the first edge storage device according to the current message unique identifier carried in the file metadata reporting message, and then updates the file metadata table maintained locally according to the verification result to ensure reliable storage of the file metadata of all edge storage devices in the cluster and reliable processing of the file access request messages sent by user devices. Moreover, in the case of logical damage scenarios such as abnormal power-off or abnormal crash of the edge storage device, the file metadata of the cloud virtual device can be used to restore the file metadata of the edge storage device, which can further improve the reliability of user data.
[0027] The applicant of the present application further proposes to set a message unique identifier in the file metadata reporting message, and the message unique identifier is incremented sequentially when the edge storage device sends the file metadata reporting message. Whenever a file metadata reporting message is received, the cloud virtual device determines whether the message unique identifier is continuous, so as to identify whether there is an abnormality in the file metadata reporting of the edge storage device. Correspondingly, in some embodiments, as Figure 2 shown, verifying whether there is an abnormality in the file metadata reporting of the first edge storage device according to the current message unique identifier carried in the file metadata reporting message (i.e., involved in step S120) may include: Step S210, comparing the current message unique identifier with the historical message unique identifier carried in the file metadata reporting message sent by the first edge storage device last time; Step S220, when the current message unique identifier is continuous with the historical message unique identifier, it is verified that there is no abnormality in the file metadata reporting of the first edge storage device; Step S230, when the current message unique identifier is not continuous with the historical message unique identifier, it is verified that there is an abnormality in the file metadata reporting of the first edge storage device.
[0028] In the embodiment of the present application, each file metadata reporting message carries a message unique identifier. When a network abnormality or the like occurs, it will cause the message unique identifier to jump. The cloud virtual device will determine that the current message unique identifier is not continuous with the historical message unique identifier. At this time, the cloud virtual device requests the first edge storage device to re-obtain the file metadata reporting message to ensure reliable storage of all file metadata of the first edge storage device.
[0029] In the embodiment of the present application, there is no special limitation on the data structure of the file metadata reporting message. For example, the following code and its annotation content can define an implementation manner of the data structure of the file metadata reporting message: / / Define the MetadataPayload structure for representing the payload of the metadata type MetadataPayload struct{ Opstring `json:"op"` / / Operation type, the corresponding key name during JSON serialization is "op" Metadata []byte `json:"metadata"` / / Metadata content, stored as a byte slice, the corresponding key name during JSON serialization is "metadata" } / / Define the MetadataMsg structure to represent a message containing a metadata payload type MetadataMsg struct{ MsgID uint64 `json:"msg_id"` / / The unique message identifier, an unsigned 64-bit integer type, and the corresponding key name in JSON serialization is "msg_id" Payload MetadataPayload `json:"payload"` / / The metadata payload carried by the message, of type MetadataPayload, and the corresponding key name in JSON serialization is "payload" }。
[0030] In some embodiments, as Figure 3 shown, in the case where it is verified that there is an abnormal file metadata report in the first edge storage device, re-obtaining the file metadata report message from the first edge storage device (i.e., involved in step S140) includes: Step S310, in the case where it is verified that there is an abnormal file metadata report in the first edge storage device, send a re-report instruction message carrying the historical message unique identifier to the first edge storage device; Step S320, receive the file metadata report message re-sent by the first edge storage device according to the re-report instruction message; wherein, the first edge storage device also deletes the file metadata report messages whose message unique identifiers are before the historical message unique identifier according to the re-report instruction message.
[0031] In the embodiments of the present application, it can be understood that when the edge storage device sends a file metadata report message, the message unique identifiers are incremented in sequence. One message unique identifier being before another means that the file metadata report message carrying the former was generated earlier.
[0032] In the embodiments of the present application, after receiving the re-report instruction message carrying the historical message unique identifier, the first edge storage device deletes the file metadata report messages whose cached message unique identifiers are before the historical message unique identifier (because these messages have been continuously received by the cloud virtual device), and then starts from the file metadata report message carrying this historical message unique identifier and re-sends the file metadata report message to the cloud virtual device.
[0033] The applicant of the present application further proposes that, in addition to identifying whether there is an abnormal report of file metadata when receiving the file metadata report message sent by the edge storage device, the cloud virtual device can also periodically poll all edge storage devices in the storage cluster to identify whether there is an abnormal report of file metadata by the edge storage device. Correspondingly, in some embodiments, after receiving and caching the file metadata report message sent by the first edge storage device (i.e., involved in step S110) and before processing the file interaction request sent by the user device according to the file metadata table (i.e., involved in step S150), as Figure 4 shown, the method may further include: Step S410, when the preset verification period arrives, send a report anomaly query message carrying the current message unique identifier to the first edge storage device; Step S420, receive the file metadata report message supplemented and sent by the first edge storage device according to the report anomaly query message; wherein, the first edge storage device also deletes the file metadata report message whose message unique identifier is before the current message unique identifier according to the report anomaly query message; Step S430, update the locally maintained file metadata table according to the file metadata carried in the supplemented and sent file metadata report message.
[0034] In the embodiment of the present application, if the preset verification period arrives, the current message unique identifier carried in the most recently received file metadata report message is the latest message unique identifier, and the cloud virtual device instructs the first edge storage device to query whether there is still unreported file metadata after that. After receiving the report anomaly query message, the first edge storage device deletes the file metadata report message whose cached message unique identifier is before the current message unique identifier (because these messages have been continuously received by the cloud virtual device), and then starts from the file metadata report message carrying the current message unique identifier and supplements and sends the file metadata report message to the cloud virtual device.
[0035] The applicant of the present application further proposes that the storage cluster can also perform multiple backups on the files uploaded by the user device to further improve the reliability of user data. Correspondingly, in some embodiments, the file metadata table includes the correspondence between the edge storage device and the file metadata of the stored files, as Figure 5 shown, the method may further include: Step S510, receive the file backup request message sent by the user device and obtain the file identifier of the file to be backed up carried therein; Step S520: Query the file metadata table according to the file identifier to determine a second edge storage device storing the file to be backed up; Step S530: Determine a third edge storage device for backup from the storage cluster; Step S540: Back up the file to be backed up stored in the second edge storage device to the third edge storage device; Step S550: Record the file backup relationship between the second edge storage device and the third edge storage device regarding the file to be backed up.
[0036] In the embodiments of the present application, there is no special limitation on the number of backups. That is, there is no special limitation on the number of the determined third edge storage devices, which can be one or more, and can be specified by the user device or preset in advance, as long as it does not exceed the total number of edge storage devices in the storage cluster.
[0037] In the embodiments of the present application, "first", "second", and "third" only distinguish different roles played by the edge storage devices, and do not mean that the second edge storage device and the third edge storage device must be different from the above-mentioned first edge storage device. That is, the second edge storage device can be the same as the first edge storage device. In this case, the file to be backed up on the first edge storage device is backed up to the third edge storage device; or, the third edge storage device can be the same as the first edge storage device. In this case, the file to be backed up on the second edge storage device is backed up to the first edge storage device.
[0038] In addition, the applicant of the present application also found that after an edge storage device works for a period of time, situations such as the actual storage capacity being about to reach the capacity limit, the service life being insufficient, or the health of the storage medium being insufficient may occur. At this time, how to migrate the data on this edge storage device to other edge storage devices is a very important issue, especially a most difficult problem to solve for traditional NAS devices. For traditional NAS devices, the data on this edge storage device can only be exported to the PC side first, and then imported from the PC side to other edge storage devices. This migration method not only has a high complexity, but also has extremely low efficiency and is not friendly to ensuring the integrity and security of data. In response to this, the applicant of the present application further proposes that based on the above backup mechanism, this problem can be solved skillfully and effectively.
[0039] Correspondingly, in some embodiments, the second edge storage device includes a to-be-migrated edge storage device, the to-be-migrated edge storage device is determined from the multiple edge storage devices based on a preset migration condition, and the file to be backed up includes all files stored in the to-be-migrated edge storage device.
[0040] Among them, the embodiments of the present application do not make any specific limitations on the preset migration conditions. For example, it may include that the available storage capacity of the edge storage device is lower than the preset capacity threshold, or the usage time of the edge storage device exceeds the preset time threshold, or the health of the edge storage device is lower than the preset health threshold, etc.
[0041] Among them, the user device can determine the edge storage device to be migrated from multiple edge storage devices in the storage cluster based on preset migration conditions, and then the user device can mark all files stored in the determined edge storage device to be migrated as files to be backed up, and initiate the backup of these files to be backed up to the cloud virtual device to actually complete the migration of these files.
[0042] Among them, it can be understood that in the case of insufficient service life or insufficient health of the storage medium, after the backup is completed, that is, the migration is completed, the user device can unbind the edge storage device to be migrated from the cloud virtual device, thereby releasing the relationship between the edge storage device to be migrated and the storage cluster.
[0043] As described above, after the user device is bound to the edge storage device, the edge storage device is then added to the storage cluster. Accordingly, in some embodiments, before receiving and caching the file metadata reporting message sent by the first edge storage device (i.e., step S110), Figure 6 As shown, the method may also include: Step S610, receiving an edge storage device record message sent by the user device; wherein the edge device add message is sent after the user device is bound to the first edge storage device, and the edge device add message carries a device certificate and a device serial number of the first edge storage device; Step S620, receiving a two-way authentication request message and a device status notification message sent by the first edge storage device after receiving the reliability verification indication message sent by the user device; wherein the device status notification message includes a device serial number and a device serial number signature of the first edge storage device; Step S630, verifying the reliability of the first edge storage device according to the edge storage device record message, the two-way authentication request message, and the device status notification message; Step S640: if the reliability verification passes, reversely call the first edge storage device to join the storage cluster, and record the affiliation relationship between the first edge storage device and the storage cluster.
[0044] In the embodiments of the present application, the user equipment requests to bind to the first edge storage device through the local area network; after the first edge storage device completes the binding initialization, it notifies the user equipment that the local area network binding is completed; the user equipment obtains the device certificate from the first edge storage device, sends an edge device addition message carrying the device certificate and device serial number of the first edge storage device to the cloud virtual device, and sends a reliability verification indication message to the first edge storage device to trigger the first edge storage device to join the storage cluster; the first edge storage device also sends a two-way authentication request message and a device status notification message carrying the device certificate and device serial number of the first edge storage device to the cloud virtual device; the cloud virtual device performs reliability verification on the first edge storage device. After the reliability verification passes, the cloud virtual device reversely invokes the first edge storage device to join the storage cluster and records the attribution relationship between the first edge storage device and the storage cluster.
[0045] In the embodiments of the present application, there is no special limitation on how to perform two-way authentication specifically between the edge storage device and the cloud virtual device. For example, two-way authentication based on the Lightweight Message Queuing Telemetry Transport (MQTT) and the Transport Layer Security (TLS) can be established. Subsequently, the edge storage device can send a file metadata reporting message to the cloud virtual device through the MQTT channel.
[0046] The applicant of the present application further proposes that the user equipment can access all files stored in the storage cluster through the cloud virtual device (provided that it has the access permission), and only when it is necessary to download a specified file, it accesses the edge storage device. Correspondingly, in some embodiments, the file metadata table includes the device identifier of the edge storage device, file access information, file permissions, and file metadata, and the file metadata includes file tags, such as Figure 7 As shown, processing the file access request message sent by the user equipment according to the file metadata table (i.e., involved in step S150) may include: Step S710, receiving the file access request message sent by the user equipment and obtaining the file tag carried therein; Step S720, querying the file metadata table according to the file tag to determine the list of files to be accessed; Step S730, sending the list of files to be accessed to the user equipment for the user equipment to select the target file to be accessed according to the list of files to be accessed, parse the target file access information, and download the target file to be accessed from the corresponding edge storage device according to the target file access information.
[0047] In an embodiment of the present application, the file metadata table includes the device identifier of the edge storage device (indicating which cloud virtual device or edge storage device the corresponding file metadata belongs to), file access information (through which the corresponding file can be accessed), file permissions (indicating which user devices can access the corresponding file), and file metadata. It can be understood that there is a corresponding relationship between the file metadata and the device identifier of the corresponding edge storage device, file access information, and file permissions.
[0048] As the second aspect of the embodiment of the present application, a data maintenance method for user equipment is provided. As Figure 8 shown, the method may include: Step S810, uploading a file to a first edge storage device; wherein, the cloud virtual device and multiple edge storage devices belong to a storage cluster, and the first edge storage device is one of the multiple edge storage devices; after storing the file, the first edge storage device caches and sends a file metadata reporting message to the cloud virtual device, and the cloud virtual device verifies whether there is an abnormal file metadata reporting of the first edge storage device according to the current message unique identifier carried in the file metadata reporting message. When it is verified that there is no abnormal file metadata reporting of the first edge storage device, the file metadata table maintained locally is updated according to the file metadata carried in the file metadata reporting message. When it is verified that the first edge storage device has an abnormal file metadata reporting, a file metadata reporting message is re-obtained from the first edge storage device, and the file metadata table maintained locally is updated according to the file metadata carried in the re-obtained file metadata reporting message; Step S820, sending a file access request to the cloud virtual device for the cloud virtual device to process the file access request message according to the file metadata table.
[0049] When the data maintenance method executed on the cloud virtual device side was described above, the data maintenance methods executed on the user equipment side and the edge storage device side were also described together, so they will not be elaborated here.
[0050] Through the data maintenance method for cloud virtual devices provided by the embodiments of the present application, a storage cluster including cloud virtual devices and multiple edge storage devices is constructed to maintain user data, which can significantly improve the computing power of storage devices and is beneficial to the maintenance of user data. The dynamic expansion ability can be obtained by adding and deleting edge storage devices, realizing the elastic expansion and reduction of the storage pool, which is beneficial to reasonably setting the storage capacity. The user device uploads a file to the first edge storage device. After storing the file, the first edge storage device caches and sends a file metadata reporting message to the cloud virtual device. The cloud virtual device verifies whether there is an abnormal file metadata report of the first edge storage device according to the current message unique identifier carried in the file metadata reporting message, and then updates the locally maintained file metadata table according to the verification result to ensure the reliable storage of the file metadata of all edge storage devices in the storage cluster and the reliable processing of the file access request messages sent by the user device. Moreover, in the case of logical damage scenarios such as abnormal power-off or abnormal crash of the edge storage device, the file metadata of the cloud virtual device can be used to recover the file metadata of the edge storage device, which can further improve the reliability of user data.
[0051] As the third aspect of the embodiments of the present application, an electronic device is provided. As Figure 9 shown, the electronic device includes: One or more processors 101; A memory 102, on which one or more computer programs are stored. When the one or more computer programs are executed by the one or more processors 101, the one or more processors 101 are caused to implement any of the following: The data maintenance method for cloud virtual devices provided by the first aspect of the embodiments of the present application; The data maintenance method for user devices provided by the second aspect of the embodiments of the present application.
[0052] The electronic device may further include one or more I / O interfaces 103, connected between the processor 101 and the memory 102, configured to implement the information interaction between the processor 101 and the memory 102.
[0053] Among them, the processor 101 is a device with data processing capabilities, which includes but is not limited to a central processing unit (CPU), etc.; the memory 102 is a device with data storage capabilities, which includes but is not limited to a random access memory (RAM, more specifically such as SDRAM, DDR, etc.), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory (FLASH); the I / O interface (read-write interface) is connected between the processor and the memory and can realize the information interaction between the processor and the memory, which includes but is not limited to a data bus (Bus), etc.
[0054] In some embodiments, the processor 101, the memory 102, and the I / O interface 103 are interconnected via a bus 104 and further connected to other components of the computing device.
[0055] As a fourth aspect of the embodiments of the present application, as Figure 10 shown, a computer-readable medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, any of the following is implemented: The data maintenance method for cloud virtual devices provided in the first aspect of the embodiments of the present application; The data maintenance method for user devices provided in the second aspect of the embodiments of the present application.
[0056] Those of ordinary skill in the art can understand that to implement all or part of the processes in the above-described embodiment methods, it can be completed by instructing relevant hardware through a computer program. Accordingly, the computer program can be stored in a non-volatile computer-readable storage medium, and when the computer program is executed, it can implement the methods of any of the above embodiments. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided by the embodiments of the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0057] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Those skilled in the art should understand that the present application includes but is not limited to the content described in the drawings and the above specific implementation manner. Any modification that does not deviate from the functional and structural principles of the present application will be included in the scope of the claims.
Claims
1. A data maintenance method for cloud virtual devices, characterized in that The cloud virtual device and multiple edge storage devices belong to a storage cluster, and the method includes: Receiving and caching a file metadata reporting message sent by a first edge storage device; wherein, the first edge storage device is one of the multiple edge storage devices, and the file metadata reporting message is cached and sent by the first edge storage device after storing a file uploaded by a user device; Verifying whether there is an abnormal file metadata reporting for the first edge storage device according to the current message unique identifier carried in the file metadata reporting message; When it is verified that there is no abnormal file metadata reporting for the first edge storage device, updating the locally maintained file metadata table according to the file metadata carried in the file metadata reporting message; When it is verified that there is an abnormal file metadata reporting for the first edge storage device, re-obtaining a file metadata reporting message from the first edge storage device, and updating the locally maintained file metadata table according to the file metadata carried in the re-obtained file metadata reporting message; Processing a file access request message sent by the user device according to the file metadata table; 2. The method according to claim 1, characterized in that The verifying whether there is an abnormal file metadata reporting for the first edge storage device according to the current message unique identifier carried in the file metadata reporting message includes: Comparing the current message unique identifier with the historical message unique identifier carried in the file metadata reporting message sent by the first edge storage device last time; When the current message unique identifier is consecutive with the historical message unique identifier, it is verified that there is no abnormal file metadata reporting for the first edge storage device; When the current message unique identifier is not consecutive with the historical message unique identifier, it is verified that there is an abnormal file metadata reporting for the first edge storage device; 3. The method according to claim 2, characterized in that, The re-obtaining a file metadata reporting message from the first edge storage device when it is verified that there is an abnormal file metadata reporting for the first edge storage device includes: When it is verified that there is an abnormal file metadata reporting for the first edge storage device, sending a re-reporting indication message carrying the historical message unique identifier to the first edge storage device; Receiving the file metadata reporting message re-sent by the first edge storage device according to the re-reporting indication message; wherein, the first edge storage device also deletes the file metadata reporting message whose message unique identifier is before the historical message unique identifier according to the re-reporting indication message; 4. The method according to claim 1, characterized in that, After receiving and caching the file metadata reporting message sent by the first edge storage device and before processing the file interaction request sent by the user device according to the file metadata table, the method further includes: When a preset verification period arrives, sending a reporting anomaly query message carrying the current message unique identifier to the first edge storage device; Receive the file metadata reporting message additionally sent by the first edge storage device according to the reported exception query message; wherein, the first edge storage device also deletes the file metadata reporting messages whose message unique identifiers are before the current message unique identifier according to the reported exception query message; Update the locally maintained file metadata table according to the file metadata carried in the additionally sent file metadata reporting message.
5. The method according to claim 1, characterized in that, The file metadata table includes the correspondence between the edge storage device and the file metadata of the files it stores. The method further includes: Receive the file backup request message sent by the user device and obtain the file identifier of the file to be backed up carried therein; Query the file metadata table according to the file identifier to determine the second edge storage device storing the file to be backed up; Determine a third edge storage device for backup from the storage cluster; Back up the file to be backed up stored in the second edge storage device to the third edge storage device; Record the file backup relationship between the second edge storage device and the third edge storage device regarding the file to be backed up.
6. The method according to claim 5, characterized in that The second edge storage device includes a to-be-migrated edge storage device, which is determined from the multiple edge storage devices based on a preset migration condition, and the file to be backed up includes all the files stored in the to-be-migrated edge storage device.
7. The method according to any one of claims 1-6, characterized in that, The file metadata table includes the device identifier, file access information, file permissions, and file metadata of the edge storage device. The file metadata includes file tags. Processing the file access request message sent by the user device according to the file metadata table includes: Receive the file access request message sent by the user device and obtain the file tag carried therein; Query the file metadata table according to the file tag to determine a list of files to be accessed; Send the list of files to be accessed to the user device for the user device to select a target file to be accessed according to the list of files to be accessed, parse the target file access information, and download the target file to be accessed from the corresponding edge storage device according to the target file access information.
8. A data maintenance method for a user equipment, characterized in that, The method includes: Upload the file to the first edge storage device; wherein, the cloud virtual device and multiple edge storage devices belong to a storage cluster, and the first edge storage device is one of the multiple edge storage devices; after storing the file, the first edge storage device caches and sends a file metadata reporting message to the cloud virtual device, and the cloud virtual device verifies whether there is an abnormality in the file metadata reporting of the first edge storage device according to the current message unique identifier carried in the file metadata reporting message. When it is verified that there is no abnormality in the file metadata reporting of the first edge storage device, the file metadata table maintained locally is updated according to the file metadata carried in the file metadata reporting message. When it is verified that there is an abnormality in the file metadata reporting of the first edge storage device, a file metadata reporting message is re-obtained from the first edge storage device, and the file metadata table maintained locally is updated according to the file metadata carried in the re-obtained file metadata reporting message; Send a file access request to the cloud virtual device for the cloud virtual device to process the file access request message according to the file metadata table.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; A memory storing one or more computer programs, which when executed by the one or more processors cause the one or more processors to implement any of the following: The data maintenance method for a cloud virtual device according to any one of claims 1-7; The data maintenance method for a user device according to any one of claims 8; 10. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements any of the following: The data maintenance method for a cloud virtual device according to any one of claims 1-7; The data maintenance method for a user device according to any one of claims 8;
Citation Information
Patent Citations
Image processing apparatus, image processing system and filter setting method
CN101098468A
Computer system accessing object storage system
CN106168884A
Method, system, and program for storing and using metadata in multiple storage locations
US20060106898A1
Data and metadata consistency in object storage systems
US20160026672A1
Method and device for dynamic failure mode effect analysis and recovery process recommendation for cloud computing applications
US20230315954A1