Distributed data storage method, device, equipment and storage medium
By selecting reusable nodes in large enterprise branch offices and storing them with hash signatures, and combining this with the PoAD algorithm to measure node availability and persistence, the problem of low availability and data persistence in edge distributed object storage devices is solved, achieving high availability and persistent storage of data nodes.
Patent Information
- Application Number
- CN202311072366.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-23
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-08-23
AI Technical Summary
Edge distributed object storage devices in large enterprise branch offices have low availability and data persistence, especially when devices are incomplete or data reads are slow or incomplete, leading to reduced availability.
Reusable nodes are selected based on the reuse metric of data nodes, hash signatures are performed and data is stored, and the PoAD algorithm is used to measure node availability and data persistence, prioritizing the use of highly available nodes for data storage and retrieval.
It improves the availability and persistence of data nodes in distributed storage systems, ensuring that data is stored completely and retrieved quickly on available devices.
Smart Images

Figure CN117130550B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data storage technology, and in particular to a distributed data storage method, apparatus, device, and storage medium. Background Technology
[0002] For large enterprises with numerous branch offices, while edge distributed object storage, which distributes data across geographical regions, can improve the ease of local access for branch offices, these offices are generally smaller in scale and unlike long-running data centers, their equipment is not online 24 / 7. Furthermore, even when equipment is online, availability may not be high. The availability of edge distributed object storage depends on a variety of factors. If data reads are slow, data is incomplete, or even deleted on online edge devices, then the availability of the edge storage device will be low, even if it is online.
[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this invention is to provide a distributed data storage method, apparatus, device, and storage medium, aiming to solve the technical problem of how to improve the availability of distributed data storage.
[0005] To achieve the above objectives, the present invention provides a distributed data storage method, which includes the following steps:
[0006] Reusable nodes are selected from the data nodes based on their reuse metrics.
[0007] When uploading the data to be processed through the reusable node, the data to be processed is hash-signed to obtain the target data;
[0008] The target data and the hash signature value are stored.
[0009] Optionally, after the step of storing the target data and the hash signature value, the method further includes:
[0010] When the reuse metric value of each data node is positive, the data to be read is verified.
[0011] When the verification passes, the data to be read is hash-signed to obtain the target data to be read;
[0012] Return the target read data and update the reuse metric corresponding to the read data.
[0013] Optionally, the step of performing a hash signature on the data to be read to obtain the target data to be read when the verification passes includes:
[0014] When the verification passes, the data to be read is hashed for the first time to obtain the data to be processed.
[0015] When the data to be read is finished, a second hash signature is performed on the data to be processed to obtain the target data to be read.
[0016] Optionally, after the step of verifying the data to be read when the multiplexing metric value of each data node is positive, the method further includes:
[0017] When the reuse metric value of each data node is negative, the data node corresponding to the negative reuse metric value is marked as invalid.
[0018] Optionally, after the step of performing a hash signature on the data to be read to obtain the target data to be read when the verification passes, the method further includes:
[0019] If the verification fails, update the reuse metric corresponding to the data to be read.
[0020] Optionally, the step of selecting reusable nodes from the data nodes based on the reuse metric of each data node includes:
[0021] Compare the reuse metrics of each data node, and select the maximum reuse metric from the reuse metrics;
[0022] The data node corresponding to the maximum reuse metric is designated as a reusable node.
[0023] Optionally, the step of performing a hash signature on the data to be processed to obtain the target data when uploading the data to be processed through the reusable node includes:
[0024] When uploading the data to be processed through the reusable node, the data to be processed is first hashed and signed.
[0025] When the data to be processed is uploaded, a second hash signature is performed on the data to be processed that was hashed in the first hash signature to obtain the target data.
[0026] In addition, to achieve the above objectives, the present invention also proposes a distributed data storage device, which includes: a selection module, a signature module, and a storage module;
[0027] The selection module is used to select reusable nodes from the data nodes based on the reuse metric of each data node.
[0028] The signature module is used to perform a hash signature on the data to be processed when the data to be processed is uploaded through the reusable node to obtain the target data;
[0029] The storage module is used to store the target data and the hash signature value.
[0030] Furthermore, to achieve the above objectives, the present invention also proposes a distributed data storage device, which includes a memory, a processor, and a distributed data storage program stored on the memory and capable of running on the processor. The distributed data storage program is configured to implement the distributed data storage method described above.
[0031] Furthermore, to achieve the above objectives, the present invention also proposes a storage medium storing a distributed data storage program, which, when executed by a processor, implements the distributed data storage method as described above.
[0032] This invention discloses a distributed data storage method, apparatus, device, and storage medium. The method includes: selecting reusable nodes from among the data nodes based on their reuse metrics; performing a hash signature on the data to be processed when uploading it through a reusable node to obtain target data; and storing the target data and the hash signature value. This invention determines reusable nodes based on their reuse metrics, and when uploading data to be processed through a reusable node, performs a hash signature on the data to be processed to obtain target data, storing the target data and the hash signature value. This allows for the selection of usable data nodes based on reuse metrics, ensuring the availability of data nodes for data storage and improving the availability of each data node in the distributed storage. Attached Figure Description
[0033] Figure 1 This is a schematic diagram of the structure of a distributed data storage device in the hardware operating environment involved in the embodiments of the present invention;
[0034] Figure 2 This is a flowchart illustrating the first embodiment of the distributed data storage method of the present invention;
[0035] Figure 3 This is a flowchart illustrating the second embodiment of the distributed data storage method of the present invention;
[0036] Figure 4 This is a flowchart illustrating the third embodiment of the distributed data storage method of the present invention;
[0037] Figure 5This is a flowchart illustrating the edge distributed object storage cluster storage process of an embodiment of the distributed data storage method of the present invention.
[0038] Figure 6 This is a flowchart illustrating the edge distributed object storage cluster reading process of an embodiment of the distributed data storage method of the present invention.
[0039] Figure 7 This is a structural block diagram of the first embodiment of the distributed data storage device of the present invention.
[0040] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0041] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0042] Reference Figure 1 , Figure 1 This is a schematic diagram of the distributed data storage device structure of the hardware operating environment involved in the embodiments of the present invention.
[0043] like Figure 1 As shown, the distributed data storage device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen, and optionally, it may also include a standard wired interface or a wireless interface. In this invention, the wired interface of the user interface 1003 may be a USB interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0044] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on distributed data storage devices and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0045] like Figure 1As shown, the memory 1005, which is identified as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a distributed data storage program.
[0046] exist Figure 1 In the distributed data storage device shown, the network interface 1004 is mainly used to connect to the backend server and communicate with the backend server; the user interface 1003 is mainly used to connect to the user equipment; the distributed data storage device calls the distributed data storage program stored in the memory 1005 through the processor 1001 and executes the distributed data storage method provided in this embodiment of the invention.
[0047] Based on the above hardware structure, an embodiment of the distributed data storage method of the present invention is proposed.
[0048] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the distributed data storage method of the present invention, which presents the first embodiment of the distributed data storage method of the present invention.
[0049] Step S10: Select reusable nodes from the data nodes based on the reuse metric of each data node.
[0050] It should be noted that the execution subject of this embodiment may be a computer software service device with data processing, network communication and program running functions, such as a distributed object storage device, or other electronic devices that can achieve the same or similar functions. This embodiment does not limit this.
[0051] It should be understood that large enterprises with numerous branch offices are beginning to deploy multiple data nodes, originally centralized in data centers, to branch offices in different regions. They store data as objects, distributing each object across edge devices in different regions using redundancy methods such as sharding or multiple replicas. This improves the ease of local access for branch offices and achieves cross-regional data protection. While edge distributed object storage improves the ease of local access for large enterprises with many branches, branch offices are generally smaller and, unlike long-running data centers, their devices are not online 24 / 7. Furthermore, even when devices are online, availability may not be high. The availability of edge distributed object storage depends on various factors. If data reads are slow, data is incomplete, or even deleted on online edge devices, then even if the edge storage device is online, its availability is low. This presents a dilemma: while storing data on edge devices in branch offices for convenient local access, the availability of edge distributed object storage remains a concern.
[0052] To overcome the aforementioned shortcomings and address the common issues of low availability and data durability on edge storage devices during data access, a Proof of Availability & Durability (PoAD) algorithm is proposed as a mechanism for discovering and incentivizing highly available edge devices. During data reading, the PoAD algorithm measures node availability and data durability. During data writing, highly available nodes identified by the PoAD algorithm are prioritized for data storage.
[0053] It is understandable that each data node can be an edge distributed storage device, and the edge distributed storage device with the highest reuse metric value is selected from among the edge distributed storage devices based on the reuse metric value of each edge distributed storage device.
[0054] Step S20: When uploading the data to be processed through the reusable node, perform a hash signature on the data to be processed to obtain the target data.
[0055] Understandably, when uploading data, the data shards will generate a unique signature for the data to be processed based on the hash function, and after the data upload is complete, the hash function will be used again to generate the final signature from this set of signatures.
[0056] Furthermore, in order to improve the availability of distributed storage data, step S20 of this embodiment may include:
[0057] When uploading the data to be processed through the reusable node, the data to be processed is first hashed and signed.
[0058] When the data to be processed is uploaded, a second hash signature is performed on the data to be processed that was hashed in the first hash signature to obtain the target data.
[0059] Understandably, a unique set of signatures, such as Sig1, Sig2, Sig3, ..., SigN, is generated based on the hash function. After the data upload is complete, the hash function is used again to generate the final signature SignatureUP = Hash(Sig1, Sig2, Sig3, ..., SigN).
[0060] Step S30: Store the target data and the value of the hash signature.
[0061] It should be understood that edge distributed object storage devices will save the SignatureUP value as metadata along with the target data.
[0062] For ease of understanding, please refer to Figure 5 To explain, Figure 5 This is a flowchart of the edge distributed object storage cluster storage process. In the diagram, the application initiates a data upload request, the edge distributed object storage queries available devices, prioritizes the use of the POAD algorithm to determine the highly available nodes, uploads the data to the available edge storage device, and finally the edge storage device returns a success or failure to the application.
[0063] This embodiment selects reusable nodes from among the data nodes based on their reuse metrics. When uploading data to be processed through a reusable node, a hash signature is performed on the data to be processed to obtain the target data. The target data and the hash signature value are then stored. This embodiment determines reusable nodes based on their reuse metrics, and when uploading data to be processed through a reusable node, a hash signature is performed on the data to be processed to obtain the target data. The target data and the hash signature value are then stored. This process filters out usable data nodes based on reuse metrics, ensuring the availability of data nodes for data storage and improving the availability of each data node in the distributed storage.
[0064] Reference Figure 3 , Figure 3 This is a flowchart illustrating the second embodiment of the distributed data storage method of the present invention, based on the above. Figure 2 The first embodiment shown presents a second embodiment of the distributed data storage method of the present invention.
[0065] In the second embodiment, after step S30, the method further includes:
[0066] Step S40: When the reuse metric value of each data node is positive, the data to be read is verified;
[0067] Step S50: When the verification passes, perform a hash signature on the data to be read to obtain the target data to be read;
[0068] Step S60: Return the target read data and update the reuse measurement value corresponding to the data to be read.
[0069] Understandably, each time a data node is validated, its reuse metric is updated. A successful validation increments the reuse metric by one, while a failed validation decrements it by one. For example, the persistence metric of edge distributed object storage device A is denoted as DuraA, with an initial value of T (T is a positive integer, such as 100, representing the number of allowed failures). Each successful read and PoA validation increments DuraA by one, and vice versa. Similarly, the persistence metric of edge distributed object storage device B is denoted as DuraB, with an initial value of T. Each successful read and PoA validation increments DuraB by one, and vice versa.
[0070] It is understandable that when reading data, Hu signs the data to be read according to the hash function, and after the data is read, he will sign the signed data again according to the hash function.
[0071] It should be understood that after the data reading is complete, the target data will be returned to the application based on the storage interface.
[0072] Furthermore, in order to improve the persistence of distributed data storage, step S50 of this embodiment may include:
[0073] When the verification passes, the data to be read is hashed for the first time to obtain the data to be processed.
[0074] When the data to be read is finished, a second hash signature is performed on the data to be processed to obtain the target data to be read.
[0075] In the specific implementation, when reading data, each data fragment uses a hash function (Hash) to generate a unique signature (e.g., Sig1, Sig2, Sig3, ..., SigN) based on its content. After the data is read, the hash function is used again to generate the final signature SignatureDown = Hash(Sig1, Sig2, Sig3, ..., SigN).
[0076] It should be noted that if the SignatureDown is consistent with the SignatureUP stored in the edge distributed object storage, the data is considered available.
[0077] Furthermore, to improve the persistence of distributed data storage, this embodiment may further include the following after step S40:
[0078] When the reuse metric value of each data node is negative, the data node corresponding to the negative reuse metric value is marked as invalid.
[0079] It should be noted that there is a limit to the number of times a data node can be verified. For example, the number of failures allowed can be 100. After 100 consecutive verification failures, the reuse metric of the data node will be reduced to an amplitude value, and the data node will be marked as invalid.
[0080] Understandably, when a data node is marked as invalid, it will be skipped when selecting an edge distributed object storage device and will no longer participate in PoA and PoD calculations.
[0081] Furthermore, to improve the persistence of distributed data storage, this embodiment may further include the following after step S50:
[0082] If the verification fails, update the reuse metric corresponding to the data to be read.
[0083] It should be understood that when the verification fails, the reuse metric of the data node corresponding to the data to be read that failed the verification will be reduced.
[0084] For ease of understanding, please refer to Figure 6 To explain, Figure 6 The flowchart illustrates the data reading process of an edge distributed object storage cluster. In the diagram, the application initiates a data read request, the edge distributed object storage cluster queries the devices storing the relevant data, and upon completion of the read, it measures and updates the availability of the nodes using the PoAD algorithm. The storage interface module then returns the data to the application.
[0085] In this embodiment, when the reuse metric value of each data node is positive, the data to be read is verified; when the verification passes, the data to be read is hash-signed to obtain the target data to be read; the target data to be read is returned, and the reuse metric value corresponding to the data to be read is updated. This embodiment reads data to be read when the reuse metric value of each data node is positive, verifies the data to be read, hash-signs the data to be read when the verification passes, and updates the reuse metric value of the corresponding data node. This allows for real-time updates of the reuse metric values of each data node during data reading, facilitating the selection of appropriate data nodes based on the reuse metric values when storing data, thereby improving the persistence of data storage.
[0086] Reference Figure 4 , Figure 4 This is a flowchart illustrating the third embodiment of the distributed data storage method of the present invention, based on the above. Figure 2 The first embodiment shown is followed by a third embodiment of the distributed data storage method of the present invention.
[0087] In the third embodiment, step S10 further includes:
[0088] Step S101: Compare the reuse metrics of each data node and select the maximum reuse metric from the reuse metrics;
[0089] Step S102: Designate the data node corresponding to the maximum reuse metric as a reusable node.
[0090] Understandably, if DuraA > DuraB when comparing DuraA and DuraB, then the next time data is uploaded, if both edge distributed object storage device A and edge distributed object storage device B are idle, edge distributed object storage device A will be selected for storage first.
[0091] This embodiment compares the reuse metrics of each data node and selects the maximum reuse metric from the reuse metrics; the data node corresponding to the maximum reuse metric is then designated as a reusable node. This embodiment selects the largest reuse metric from the compared reuse metrics and designates the data node with the largest reuse metric as a reusable node, thereby improving the availability of data storage through this reusable node.
[0092] Furthermore, this embodiment of the invention also proposes a storage medium storing a distributed data storage program, which, when executed by a processor, implements the distributed data storage method described above.
[0093] In addition, refer to Figure 7 The present invention also proposes a distributed data storage device, which includes: a selection module 10, a signature module 20, and a storage module 30.
[0094] The selection module 10 is used to select reusable nodes from the data nodes based on the reuse metric of each data node.
[0095] The signature module 20 is used to perform a hash signature on the data to be processed when the data to be processed is uploaded through the reusable node to obtain the target data;
[0096] The storage module 30 is used to store the target data and the hash signature value.
[0097] This embodiment selects reusable nodes from among the data nodes based on their reuse metrics. When uploading data to be processed through a reusable node, a hash signature is performed on the data to be processed to obtain the target data. The target data and the hash signature value are then stored. This embodiment determines reusable nodes based on their reuse metrics, and when uploading data to be processed through a reusable node, a hash signature is performed on the data to be processed to obtain the target data. The target data and the hash signature value are then stored. This process filters out usable data nodes based on reuse metrics, ensuring the availability of data nodes for data storage and improving the availability of each data node in the distributed storage.
[0098] Based on the first embodiment of the distributed data storage device of the present invention described above, a second embodiment of the distributed data storage device of the present invention is proposed.
[0099] In this embodiment, the storage module 30 is used to verify the data to be read when the reuse metric value of each data node is positive.
[0100] Furthermore, the storage module 30 is also used to perform a hash signature on the data to be read when the verification passes, so as to obtain the target data to be read.
[0101] Furthermore, the storage module 30 is also used to return the target read data and update the reuse measurement value corresponding to the data to be read.
[0102] Furthermore, the storage module 30 is also used to perform a first hash signature on the data to be read when the verification passes, so as to obtain the data to be processed.
[0103] Furthermore, the storage module 30 is also used to perform a second hash signature on the data to be processed after the data to be read has been read, so as to obtain the target data to be read.
[0104] Furthermore, the storage module 30 is also used to mark the data node corresponding to the negative reuse metric value as invalid when the reuse metric value of each data node is negative.
[0105] Furthermore, the storage module 30 is also used to update the reuse measurement value corresponding to the data to be read when the verification fails.
[0106] Furthermore, the selection module 10 is also used to compare the reuse metrics of each data node and filter out the maximum reuse metric from the reuse metrics.
[0107] Furthermore, the selection module 10 is also used to select the data node corresponding to the maximum reuse metric as a reusable node.
[0108] Furthermore, the signature module 20 is also used to perform a first hash signature on the data to be processed when the data to be processed is uploaded through the reusable node.
[0109] Furthermore, the signature module 20 is also used to perform a second hash signature on the data to be processed after the data to be processed has been uploaded, so as to obtain the target data.
[0110] Other embodiments or specific implementations of the distributed data storage device described in this invention can be found in the above-described method embodiments, and will not be repeated here.
[0111] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0112] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0113] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a read-only memory image (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0114] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A distributed data storage method, characterized in that, The distributed data storage method includes the following steps: Reusable nodes are selected from the data nodes based on their reuse metrics; the reuse metrics are obtained through availability and data persistence measurement algorithms. When uploading the data to be processed through the reusable node, the data to be processed is first hashed and signed. When the data to be processed is uploaded, a second hash signature is performed on the data to be processed that was hashed in the first hash signature to obtain the target data; The target data and the hash signature value are stored.
2. The distributed data storage method as described in claim 1, characterized in that, After the step of storing the target data and the hash signature value, the method further includes: When the reuse metric value of each data node is positive, the data to be read is verified. When the verification passes, the data to be read is hash-signed to obtain the target data to be read; Return the target read data and update the reuse metric corresponding to the read data.
3. The distributed data storage method as described in claim 2, characterized in that, The step of performing a hash signature on the data to be read to obtain the target data to be read when the verification passes includes: When the verification passes, the data to be read is hashed for the first time to obtain the data to be processed. When the data to be read is finished, a second hash signature is performed on the data to be processed to obtain the target data to be read.
4. The distributed data storage method as described in claim 2, characterized in that, After the step of verifying the data to be read when the reuse metric value of each data node is positive, the method further includes: When the reuse metric value of each data node is negative, the data node corresponding to the negative reuse metric value is marked as invalid.
5. The distributed data storage method as described in claim 2, characterized in that, After the step of performing a hash signature on the data to be read to obtain the target data to be read when the verification passes, the method further includes: If the verification fails, update the reuse metric corresponding to the data to be read.
6. The distributed data storage method as described in claim 1, characterized in that, The step of selecting reusable nodes from the data nodes based on the reuse metric of each data node includes: Compare the reuse metrics of each data node, and select the maximum reuse metric from the reuse metrics; The data node corresponding to the maximum reuse metric is designated as a reusable node.
7. A distributed data storage device, characterized in that, The distributed data storage device includes: a selection module, a signature module, and a storage module; The selection module is used to select reusable nodes from the data nodes based on the reuse metric of each data node; the reuse metric is obtained through an availability and data persistence metric algorithm. The signature module is used to perform a first hash signature on the data to be processed when the data to be processed is uploaded through the reusable node; and to perform a second hash signature on the data to be processed with the first hash signature when the data to be processed is uploaded, so as to obtain the target data. The storage module is used to store the target data and the hash signature value.
8. A distributed data storage device, characterized in that, The distributed data storage device includes: a memory, a processor, and a distributed data storage program stored on the memory and executable on the processor. When the distributed data storage program is executed by the processor, it implements the steps of the distributed data storage method as described in any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium stores a distributed data storage program, which, when executed by a processor, implements the steps of the distributed data storage method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Data distributed storage method and system
CN103731505A
Associated evidence storage method and system based on double hashing
CN111553693A
