Cloud storage information management method and device, computer equipment, readable storage medium and program product
By dynamically matching storage replica groups and leases, combined with a small heap management mechanism, the slow response speed and resource waste caused by the static replica allocation strategy in traditional cloud storage systems are solved, achieving efficient lease management and data reliability.
Patent Information
- Application Number
- CN202511760193.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-02-24
AI Technical Summary
In traditional cloud storage systems, the replica allocation strategy lacks dynamic correlation, which causes the system to frequently scan the global lease table, affecting response speed and resulting in high risks of resource waste or data corruption.
By dynamically determining the storage replica group, matching and binding the first lease, determining the expiration time based on the establishment time, and storing the lease in a min-heap with the location positively correlated with the expiration time, a priority-driven lease management mechanism is constructed.
It improves the efficiency of cloud storage information management, reduces resource waste and data failure risks, optimizes the lease management process, and improves system response speed.
Smart Images

Figure CN121567719A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud storage technology, and in particular to a cloud storage information management method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology
[0002] With the rapid development of cloud computing and distributed storage technologies, cloud storage services have become a crucial infrastructure for data management for enterprises and individual users. Their core characteristics lie in achieving elastic scaling, high availability, and cross-regional access to data through virtualized resource pools. However, in cloud storage systems, efficiently managing storage replicas of massive amounts of data (i.e., redundant storage of the same data on different nodes) to ensure data reliability and access performance has become a key technical challenge.
[0003] Traditional methods typically employ static replica allocation strategies, which deploy replicas to specific storage nodes based on preset rules (such as data popularity and node load). However, traditional lease management methods have significant drawbacks. The setting of lease expiration time lacks dynamic correlation with storage location, causing the system to frequently scan the global lease table to detect expired items. Especially when the number of replicas is large, the time complexity of this linear search will severely slow down the system response speed. Therefore, traditional cloud storage information management methods suffer from poor information management effectiveness. Summary of the Invention
[0004] Therefore, it is necessary to provide a cloud storage information management method, device, computer equipment, computer-readable storage medium, and computer program product that can improve the effectiveness of information management in response to the above-mentioned technical problems.
[0005] Firstly, this application provides a cloud storage information management method, including:
[0006] Obtain an information cloud storage request, and determine a storage replica group for storing the cloud storage information based on the information type of the cloud storage information carried in the information cloud storage request;
[0007] Match the storage replica group with a corresponding first lease, and bind the storage replica group to the first lease;
[0008] Based on the establishment time of the first lease, the expiration time of the first lease is determined;
[0009] The first lease is stored in a min-heap according to a storage location that matches the expiration time; the distance between the storage location and the top port of the min-heap is positively correlated with the expiration time.
[0010] In one embodiment, the method further includes:
[0011] Obtain the second lease from the top port of the min-heap;
[0012] If the expiration time of the second lease indicates that the second lease has expired, lease traversal is performed in the direction from the top port to the bottom port of the min-heap until an unexpired lease is found.
[0013] Each lease traversed before deleting the unexpired lease from the min-heap is released, and the storage replica group bound to the deleted lease is released.
[0014] In one embodiment, the information type includes information capacity and information characteristics; determining the storage replica group for storing the cloud storage information based on the information type carried by the cloud storage request includes:
[0015] Based on the information capacity of the cloud storage information carried in the information cloud storage request, candidate storage replica groups that meet the information storage conditions of the information capacity are determined from each initial storage replica group;
[0016] When there are multiple candidate storage replica groups, based on the information features, a storage replica group that matches the information features of the cloud storage information is determined from each of the candidate storage replica groups.
[0017] In one embodiment, determining the storage replica group that matches the information features of the cloud storage information from each of the candidate storage replica groups based on the information features includes:
[0018] Obtain the performance parameters of each of the candidate storage replica groups;
[0019] Based on the information characteristics, determine the preference weight of the cloud storage information for the performance parameters;
[0020] Based on the preference weights and the performance parameters of each candidate storage replica group, the matching degree between each candidate storage replica group and the cloud storage information is determined.
[0021] The candidate storage replica group with the highest matching degree is determined as the storage replica group that matches the information characteristics of the cloud storage information.
[0022] In one embodiment, each lease is matched with multiple storage replica groups; the method further includes:
[0023] Upon receiving a lease renewal request, identify multiple storage replica groups that match the lease in the lease renewal request;
[0024] Detect the usage status of each of the aforementioned storage replica groups;
[0025] The expiration time of the lease is updated based on the current renewal time to obtain the updated expiration time;
[0026] The update expiration time and each usage status are fed back to the storage agent.
[0027] In one embodiment, the method further includes:
[0028] In response to a received storage replica group update request;
[0029] If the storage replica group update request includes a new request, obtain the new replica group corresponding to the new request;
[0030] Bind the newly added copy group to the first lease;
[0031] If the storage replica group update request includes a deletion request, obtain the deletion replica group corresponding to the deletion request;
[0032] Delete the binding relationship between the deleted copy group and the first lease.
[0033] Secondly, this application also provides a cloud storage information management device, comprising:
[0034] The storage replica group determination module is used to obtain information cloud storage requests and determine the storage replica group used to store the cloud storage information based on the information type of the cloud storage information carried in the information cloud storage request.
[0035] The lease binding module is used to match the storage replica group with a corresponding first lease and bind the storage replica group to the first lease;
[0036] The expiration time determination module is used to determine the expiration time of the first lease based on the establishment time of the first lease;
[0037] The lease storage module is used to store the first lease in a min-heap according to a storage location that matches the expiration time; the distance between the storage location and the top port of the min-heap is positively correlated with the expiration time.
[0038] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method described above.
[0039] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the method described above.
[0040] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the method described above.
[0041] The aforementioned cloud storage information management methods, devices, computer equipment, computer-readable storage media, and computer program products dynamically determine storage replica groups based on information type, achieving precise matching between replica allocation and data characteristics. Furthermore, matching and binding a first lease to a replica group clarifies the lifecycle management permissions of the replicas, laying the foundation for automated management of subsequent leases. By determining the expiration time based on the establishment time, the lease validity period dynamically adapts to the system's operating status, reducing resource waste or data failure risks caused by fixed lease durations. Storing the first lease in a min-heap according to its expiration time, and making the distance between the storage location and the top port of the min-heap positively correlated with the expiration time, constructs a priority-driven lease management mechanism. That is, leases about to expire automatically move closer to the top of the heap, and the system only needs to check the top element to quickly locate the leases to be processed, significantly improving the effectiveness of cloud storage information management. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is an application environment diagram of a cloud storage information management method in one embodiment;
[0044] Figure 2 This is a flowchart illustrating a cloud storage information management method in one embodiment;
[0045] Figure 3 This is a flowchart illustrating the lease management and inspection steps in one embodiment;
[0046] Figure 4 This is a flowchart illustrating the lease renewal management steps in one embodiment;
[0047] Figure 5 This is a flowchart illustrating the steps of removing or adding a storage copy group within a lease in one embodiment;
[0048] Figure 6 This is a flowchart illustrating a cloud storage information management method in another embodiment;
[0049] Figure 7 This is a structural block diagram of a cloud storage information management device in one embodiment;
[0050] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0052] The cloud storage information management method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, the storage agent 102 communicates with the storage center 104 via a network. The storage center 104 can be a standalone physical storage center, a cluster of multiple physical storage centers, a distributed system, or a cloud storage center providing cloud computing services. The storage agent 102 is a client component in the distributed storage system, responsible for initiating storage resource requests to the storage center on behalf of users or applications and managing the binding relationship between leases and storage resources. The storage center 104 is the core management module of the distributed storage system, responsible for the allocation, scheduling, and lease management of global storage resources. Specifically, during the process of managing cloud storage information, the storage center 104 obtains information cloud storage requests from the storage agent 102, determines the storage replica group for storing the cloud storage information based on the information type of the cloud storage information carried in the information cloud storage request, matches the corresponding first lease for the storage replica group, and binds the storage replica group to the first lease, determines the expiration time of the first lease based on the establishment time of the first lease, and stores the first lease in a min-heap according to the storage location that matches the expiration time; the distance between the storage location and the top port of the min-heap is positively correlated with the expiration time.
[0053] In one exemplary embodiment, such as Figure 2 As shown, a cloud storage information management method is provided, which can be applied to... Figure 1 Taking the storage center terminal 104 as an example, the explanation includes the following steps S202 to S208. Wherein:
[0054] Step S202: Obtain the information cloud storage request, and determine the storage replica group used to store the cloud storage information based on the information type of the cloud storage information carried in the information cloud storage request.
[0055] Information cloud storage requests are data storage requests initiated by users or applications to the cloud storage system. These requests typically include metadata such as the data content to be stored, data type, and access permissions. The information type in cloud storage refers to the data's classification attributes, such as text, images, videos, and database files. Different data types may have different requirements for storage performance (e.g., read / write speed, persistence). A storage replica group (chunkGroup, CG) is a storage unit composed of a set of storage replicas. For example, a three-replica chunkGroup stores three identical copies of the data across the various storage replicas within the storage unit. An EC (eclectic) chunkGroup, on the other hand, stores data shards and verification data across the various storage replicas. Storage replicas are distributed across different disks.
[0056] Specifically, when a user initiates a cloud storage request, the storage center first parses the information type (such as information characteristics and capacity) carried in the request. Based on a preset replica allocation strategy, it selects a group of nodes (i.e., a storage replica group) from the available storage node pool to store multiple replicas of the cloud storage information. For example, if the information type is "critical business database," the storage center can select storage nodes from three different regions to form a replica group, ensuring that even if a region fails, the cloud storage information can still be accessed through other replicas. Furthermore, the storage center can allocate cloud storage information with high reliability requirements to multiple replica groups across different regions, and cloud storage information with low latency requirements to multiple replica groups within the same region.
[0057] Optionally, the storage center can determine candidate storage replica groups that meet the information storage conditions of the information capacity from each initial storage replica group based on the information capacity of the cloud storage information carried in the information cloud storage request. If there are multiple candidate storage replica groups, the storage replica group that matches the information characteristics of the cloud storage information can be determined from each candidate storage replica group based on the information characteristics.
[0058] Optionally, the storage center can also pre-establish the association between information types and storage replica groups, and directly determine the storage replica groups used to store cloud storage information based on the association.
[0059] Step S204: Match the corresponding first lease to the storage replica group and bind the storage replica group to the first lease.
[0060] A lease is a time-bound permission credential used to manage the lifecycle of a storage replica group. A lease specifies the validity period of the storage replica group; the holder of the lease can provide data services within the validity period, after which it must be renewed or revoked. The first lease refers to the lease that matches the current storage replica group. Binding establishes an association between the lease and the storage replica group, ensuring that the lease's permissions only apply to that specific storage replica group, and that the storage replica group's continued existence is constrained by the lease.
[0061] Specifically, the storage center assigns a first lease to the storage replica group based on its attributes (such as data type, number of replicas, and storage node location). The lease includes parameters such as initial validity period and renewal conditions. The binding operation associates the lease's unique identifier with the storage replica group's metadata and stores it in the system database. For example, the storage center can assign a lease to the storage replica group of a "critical business database" and record "Lease ID=Lease001, storage replica group nodes=NodeA, NodeB, NodeC, validity period=24 hours". Subsequent access to and renewal operations of the storage replica group must verify permissions through this lease.
[0062] Step S206: Determine the expiration time of the first lease based on the establishment time of the first lease.
[0063] The creation time is the specific point in time when the lease is created and bound to the storage replica group. For example, the creation time could be 2025-10-01, 14:00:00. The expiration time is the point in time when the lease expires, calculated by adding the preset validity period to the creation time. For example, creation time + 24 hours = expiration time.
[0064] After recording the lease creation time, the storage center calculates the expiration time based on the validity period defined in the lease template. For example, if a lease is created on October 1, 2025, at 14:00:00, and its validity period is 24 hours, then the expiration time is October 2, 2025, at 14:00:00. The storage center stores the expiration time in the lease's metadata and uses it as the basis for subsequent lease management.
[0065] Step S208: Store the first lease in a min-heap according to the storage location that matches the expiration time.
[0066] A min-heap is a data structure where the top element has the smallest value or the highest priority. It is often used to efficiently manage tasks with priority or time constraints. The storage location is where the lease is placed in the min-heap, determined by its expiration time. The distance between the storage location and the top of the min-heap is positively correlated with the expiration time; that is, the earlier the lease's expiration time, or the closer it is to the current time, the closer its storage location is to the top of the min-heap, meaning higher priority; the later the expiration time, the closer its location is to the bottom of the heap, meaning lower priority.
[0067] Specifically, the storage center prioritizes lease expiration times, inserting all active leases into a min-heap. During insertion, the storage center compares the new lease's expiration time with the expiration times of existing leases in the heap: if the new lease's expiration time is earlier, it's placed closer to the top of the heap; otherwise, it's placed at the bottom. For example, if the current top-of-the-heap lease expires on 2025-10-02 at 14:00:00, and a newly inserted lease expires on 2025-10-02 at 13:00:00, the new lease will become the new top-of-the-heap element. This mechanism ensures that each lease retrieved from the top of the heap is one about to expire, prioritizing high-urgency leases and reducing the risk of data corruption.
[0068] The aforementioned cloud storage information management method dynamically determines storage replica groups based on information type, achieving precise matching between replica allocation and data characteristics. Furthermore, by matching and binding the first lease to each replica group, the lifecycle management permissions of the replicas are clarified, laying the foundation for automated management of subsequent leases. By determining the expiration time based on the establishment time, the lease validity period dynamically adapts to the system's operating status, reducing resource waste or data failure risks caused by fixed lease durations. Storing the first lease in a min-heap according to its expiration time, and making the distance between the storage location and the top port of the min-heap positively correlated with the expiration time, constructs a priority-driven lease management mechanism. That is, leases about to expire automatically move closer to the top of the heap, and the system only needs to check the top element to quickly locate the leases to be processed, significantly improving the effectiveness of cloud storage information management.
[0069] In an exemplary embodiment, the cloud storage information management method further includes: obtaining a second lease from the top port of a min-heap; if the expiration time of the second lease indicates that the second lease has expired, performing lease traversal along the direction from the top port to the bottom port of the min-heap until an unexpired lease is found; deleting each lease traversed before the unexpired lease from the min-heap, and releasing the storage replica group bound to the deleted lease.
[0070] The second lease is a currently pending lease obtained from the small top heap, which may be expired or not.
[0071] Specifically, the storage center can retrieve the second highest priority lease (i.e., the earliest expiration time) from the top port of the min-heap and check if its expiration time is earlier than the current time. If it has expired, the storage center traverses the subsequent leases sequentially from the bottom of the min-heap until it finds the first unexpired lease. During the traversal, the storage center records all expired leases, and after finding an unexpired lease, it removes these expired leases from the min-heap, releases the storage replica group bound to these leases from its occupancy status, and marks them as "allocable" for subsequent use.
[0072] In this embodiment, storage resources occupied by expired leases are released in a timely manner to avoid resource waste. At the same time, the priority sorting of the min-heap is used to optimize traversal efficiency and reduce invalid checks.
[0073] In an exemplary embodiment, the information type includes information capacity and information characteristics; determining a storage replica group for storing cloud storage information based on the information type of the cloud storage information carried in the information cloud storage request includes: determining candidate storage replica groups that meet the information storage conditions of the information capacity from each initial storage replica group based on the information capacity of the cloud storage information carried in the information cloud storage request; and, if there are multiple candidate storage replica groups, determining a storage replica group that matches the information characteristics of the cloud storage information from each candidate storage replica group based on the information characteristics.
[0074] Information capacity refers to the size of the data stored in the cloud, which directly affects the selection of storage replica groups. Information characteristics are the attributes of the cloud stored information, used to match the performance parameters of the storage replica groups. For example, information characteristics may include read / write frequency, data type, access mode, etc. The initial storage replica group is a pre-configured storage replica group that has not yet undergone screening and processing for storing data information.
[0075] Specifically, the storage center can select candidate storage replica groups from all initial storage replica groups based on the information capacity of the cloud storage information carried in the information cloud storage request. If there are multiple candidate storage replica groups, the storage center will further analyze the information characteristics of the cloud storage information and calculate the matching degree for each candidate storage replica group based on these characteristics. Finally, the storage replica group with the highest matching degree will be selected as the storage target.
[0076] In this embodiment, by combining both capacity and characteristics, the storage replica group is ensured to meet both data storage needs and business performance requirements, thereby improving storage efficiency.
[0077] In an exemplary embodiment, determining the storage replica group that matches the information features of cloud storage information from each candidate storage replica group based on information features includes: obtaining the performance parameters of each candidate storage replica group; determining the preference weight of cloud storage information for the performance parameters based on the information features; determining the matching degree between each candidate storage replica group and cloud storage information according to the preference weight and the performance parameters of each candidate storage replica group; and determining the candidate storage replica group with the highest matching degree as the storage replica group that matches the information features of cloud storage information.
[0078] The performance parameters are hardware or software metrics of the storage replica group, such as throughput, latency, and availability, used to assess the match between the candidate storage replica group and the cloud storage information. The preference weight is the priority ranking of the cloud storage information based on the performance parameters; for example, the preference weight could be 0.6 for read / write frequency and 0.4 for latency. The matching degree is the overall suitability between the candidate storage replica group and the cloud storage information, calculated from the preference weight and the performance parameters.
[0079] Specifically, the storage center can obtain the performance parameters of each candidate storage replica group and determine the preference weight of each performance parameter based on the information characteristics of the cloud storage information. Subsequently, the storage center calculates the comprehensive matching degree of each candidate storage replica group based on the weights and performance parameters, and finally determines the candidate storage replica group with the highest matching degree as the storage location that matches the cloud storage information.
[0080] In this embodiment, quantitative calculations are used to avoid subjective selection, ensuring accurate matching between storage replica groups and business needs, and improving system performance.
[0081] In one exemplary embodiment, each lease is matched with multiple storage replica groups. In this embodiment, the cloud storage information management method further includes: upon receiving a lease renewal request, determining multiple storage replica groups that match the lease in the lease renewal request; detecting the usage status of each storage replica group; updating the lease expiration time based on the current renewal time to obtain an updated expiration time; and feeding back the updated expiration time and each usage status to the storage agent.
[0082] A lease renewal request is a request initiated by the replica group or client to extend the lease validity period, including the lease name and renewal time. Usage status refers to the current operating status of the storage replica group, which may include, for example, normal, faulty, or overloaded. The storage agent is the middleware responsible for managing the binding of storage replica groups and leases, receiving system feedback and executing operations.
[0083] Specifically, upon receiving a lease renewal request, the storage center can extract the lease name and renewal time from the request and locate all storage replica groups bound to that lease. Subsequently, the storage center checks the current usage status of each storage replica group and updates the lease expiration time based on the renewal time. Finally, the storage center feeds back the updated expiration time and the usage status of each storage replica group to the storage agent, which then performs the renewal operation or adjusts the replica group allocation.
[0084] In this embodiment, automated lease renewal and status synchronization are achieved, reducing manual intervention, while status feedback improves the system's fault tolerance and resource utilization.
[0085] In an exemplary embodiment, the cloud storage information management method further includes: responding to a received storage replica group update request; if the storage replica group update request includes an add request, obtaining the add replica group corresponding to the add request; binding the add replica group to a first lease; if the storage replica group update request includes a delete request, obtaining the delete replica group corresponding to the delete request; and deleting the binding relationship between the delete replica group and the first lease.
[0086] Among them, a storage replica group update request is a request to modify an existing storage replica group, including adding or deleting a replica group.
[0087] Specifically, upon receiving a storage replica group update request, the storage center can first determine the request type and make corresponding adjustments. For example, if it's a new request, the storage center will extract the information of the new replica group and bind it to the first lease; if it's a deletion request, the storage center will extract the name of the replica group to be deleted, unbind it from the first lease, and update the internal storage replica group list. After the update is complete, the storage center will synchronously notify relevant modules to adjust resource allocation.
[0088] In this embodiment, elastic scaling up and down of storage replica groups is supported to adapt to business changes, while automatic unbinding avoids resource isolation and improves system flexibility.
[0089] In one specific embodiment, a cloud storage information management method for a practical application scenario is also provided. When a storage agent requests a storage replica group (cg) from a storage center, the storage center does not directly allocate a batch of cgs to the storage agent. Instead, it generates a lease for the requested cg. All cgs to be allocated are bound to this lease, and cgs already bound to a lease will not be bound to another lease. The storage agent returns the lease ID and the associated bound cgs to the storage agent.
[0090] After obtaining the lease name and the corresponding bound data collection group (CG), the storage agent can use the CG for data writing. When the storage capacity corresponding to the CG is full, it can initiate the unbinding of the corresponding CG to the storage center to remove it from the corresponding lease. At the same time, it can also apply for a new CG to be bound and added to the corresponding lease. In other words, the CGs managed under a lease can be changed; some old CGs can be removed, and new CGs can be added.
[0091] After obtaining the lease name, the storage agent periodically initiates renewal requests to the storage center. Each lease has a specific TTL (Time To Live) period, and renewal must be performed within this timeframe; otherwise, the lease will expire, and the corresponding data cells (CGs) under that lease will be released. The storage center will then return these CGs to the free allocation area. The storage agent may manage lease renewals. If it detects that a lease cannot be renewed within its TTL period, it should abandon the lease and promptly initiate a new lease and CG request to the storage center. Once the new lease and CG request is successful, the old CGs are immediately abandoned and the new CGs are used instead. However, before the new lease and CG request are successful, the CGs bound to the old lease can continue to be used. But during this process, because the original lease has been abandoned, no new CGs can be added for that lease. Therefore, once the capacity of the CGs in the old lease is exhausted, no new CGs are available.
[0092] The process of renewing a lease with the storage center is not just for keeping the lease alive. The storage center will inform the storage agent in the lease renewal response which cells in the current lease are unavailable (for example, a problem with a disk affects a copy in the corresponding cell, causing the cell to become unavailable). Upon receiving the response, the storage agent will remove the cell from the cell bound to the lease as soon as possible to avoid using an unavailable cell to initiate a data write request and affect write efficiency.
[0093] In the storage center, leases are managed using a min-heap. A min-heap is built based on the lease expiration time, with the lease at the top of the heap having the shortest expiration time. The advantage of using a min-heap is that it can find which leases have expired with minimal traversal. Traversing from the top of the heap, if the top element is an expired lease, it continues to traverse to find expired leases. If the lease at the top of the heap has not expired, then the subsequent leases are also non-expired, achieving efficient management of multiple leases.
[0094] Furthermore, the method may include the following specific embodiments:
[0095] Optionally, when applying for a lease and CG, the storage agent first initiates a CG application, the storage center selects the CG, the storage center then generates a lease and binds the selected CG to the generated lease. Finally, the lease is added to a small top-level heap for periodic management and checks, and the lease information and corresponding CG information are returned to the storage agent.
[0096] Optionally, such as Figure 3 As shown, during lease management and inspection, lease checks are triggered periodically, traversing the leases in the min-heap to check if any lease has expired. If the currently checked lease is not expired, then all subsequent leases are also not expired, and the current check can end. If the current lease has expired, the cg bound to it is released back to the free allocation area, the lease is removed from the min-heap, and the traversal and check continue.
[0097] Optionally, such as Figure 4 As shown, during lease renewal management, the storage agent can initiate a lease renewal request. If the storage center does not receive the request, the storage agent will retry within the TTL (Time To Live) period. If the retry fails after the TTL period, the current lease is abandoned and a new lease and CG (Category Group) application is initiated until the application is successful. Upon receiving the renewal request, the storage center updates the expiration time of the corresponding lease and checks if any CGs bound to the corresponding lease are unavailable. It then returns the renewal result and a list of unavailable CGs to the storage agent. Finally, the storage agent checks for any unavailable CGs; if any are found, they are removed; otherwise, normal use continues.
[0098] Optionally, such as Figure 5 As shown, when a CG is removed / added within a lease, the storage agent initiates a request to remove / add a CG within a certain lease. If it is a removal request, the corresponding CG is unbound from the lease; if it is an addition request, a new CG is selected and bound to the lease, and the relevant information of the added CG is returned.
[0099] In a specific embodiment, such as Figure 6 As shown, a cloud storage information management method is also provided, including:
[0100] Step S601: Obtain the information cloud storage request; based on the information capacity of the cloud storage information carried in the information cloud storage request, determine the candidate storage replica group that meets the information capacity storage conditions from each initial storage replica group.
[0101] Step S602: When there are multiple candidate storage replica groups, obtain the performance parameters of each candidate storage replica group.
[0102] Step S603: Based on information characteristics, determine the preference weights of cloud storage information for performance parameters;
[0103] Step S604: Determine the matching degree between each candidate storage replica group and the cloud storage information based on the preference weight and the performance parameters of each candidate storage replica group.
[0104] Step S605: The candidate storage replica group with the highest matching degree is determined as the storage replica group that matches the information features of the cloud storage information;
[0105] Step S606: Match the corresponding first lease to the storage replica group and bind the storage replica group to the first lease;
[0106] Step S607: Determine the expiration time of the first lease based on the establishment time of the first lease;
[0107] Step S608: Store the first lease in a min-heap according to the storage location that matches the expiration time;
[0108] Among them, the distance between the storage location and the top port of the min-heap is positively correlated with the expiration time;
[0109] Step S609: Obtain the second lease from the top port of the small top heap;
[0110] Step S610: If the expiration time of the second lease indicates that the second lease has expired, perform lease traversal along the direction from the top port to the bottom port of the min-heap until an unexpired lease is found.
[0111] Step S611: Delete all leases that were not expired from the min-heap before traversing them, and release the storage replica group bound to the deleted leases;
[0112] Step S612: If a lease renewal request is obtained, determine multiple storage replica groups that match the lease in the lease renewal request;
[0113] Step S613: Detect the usage status of each storage replica group;
[0114] Step S614: Update the expiration time of the lease based on the current renewal time to obtain the updated expiration time;
[0115] Step S615: Update the expiration time and each usage status and send the feedback to the storage agent.
[0116] Step S616, in response to the received storage replica group update request;
[0117] Step S617: If the storage replica group update request includes a new request, obtain the new replica group corresponding to the new request;
[0118] Step S618: Bind the newly added copy group to the first lease;
[0119] Step S619: If the storage replica group update request includes a deletion request, obtain the deletion replica group corresponding to the deletion request;
[0120] Step S620: Delete the binding relationship between the copy group and the first lease.
[0121] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0122] Based on the same inventive concept, this application also provides a cloud storage information management device for implementing the cloud storage information management method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more cloud storage information management device embodiments provided below can be found in the limitations of the cloud storage information management method described above, and will not be repeated here.
[0123] In one exemplary embodiment, such as Figure 7 As shown, a cloud storage information management device 700 is provided, including: a storage replica group determination module 702, a lease binding module 704, an expiration time determination module 706, and a lease storage module 708, wherein:
[0124] The storage replica group determination module 702 is used to obtain the information cloud storage request and determine the storage replica group used to store the cloud storage information based on the information type of the cloud storage information carried in the information cloud storage request.
[0125] The lease binding module 704 is used to match the corresponding first lease for the storage replica group and bind the storage replica group to the first lease;
[0126] The expiration time determination module 706 is used to determine the expiration time of the first lease based on the establishment time of the first lease.
[0127] The lease storage module 708 is used to store the first lease in a min-heap according to the storage location matched with the expiration time; the distance between the storage location and the top port of the min-heap is positively correlated with the expiration time.
[0128] In one exemplary embodiment, the cloud storage information management device 700 further includes a lease traversal module, specifically used for:
[0129] Obtain the second lease from the top port of the min-heap;
[0130] If the expiration time of the second lease indicates that the second lease has expired, lease traversal is performed in the direction from the top port to the bottom port of the min-heap until an unexpired lease is found.
[0131] Remove all leases that have not expired from the min-heap before traversing them, and release the storage copy group bound to the deleted leases.
[0132] In one exemplary embodiment, the information type includes information capacity and information characteristics. In this embodiment, the storage replica group determination module 702 includes:
[0133] The candidate storage replica group determination unit is used to determine, based on the information capacity of the cloud storage information carried in the information cloud storage request, a candidate storage replica group that meets the information capacity storage conditions from each initial storage replica group;
[0134] The storage replica group determination unit is used to determine, based on information characteristics, the storage replica group that matches the information characteristics of the cloud storage information from among the candidate storage replica groups when there are multiple candidate storage replica groups.
[0135] In one exemplary embodiment, the storage replica group determination unit is specifically used for:
[0136] Obtain the performance parameters of each candidate storage replica group;
[0137] Based on information characteristics, determine the preference weights of cloud storage information for performance parameters;
[0138] Based on the preference weights and the performance parameters of each candidate storage replica group, the matching degree between each candidate storage replica group and the cloud storage information is determined.
[0139] The candidate storage replica group with the highest matching degree is determined as the storage replica group that matches the information characteristics of the cloud storage information.
[0140] In one exemplary embodiment, each lease is matched with multiple storage replica groups. In this embodiment, the cloud storage information management device 700 further includes an expiration time update module, specifically used for:
[0141] Upon receiving a lease renewal request, identify multiple storage replica groups that match the lease in the lease renewal request;
[0142] Detect the usage status of each storage replica group;
[0143] The lease expiration date is updated based on the current renewal date to obtain the updated expiration date;
[0144] The expiration time and usage status will be updated and fed back to the storage agent.
[0145] In one exemplary embodiment, the cloud storage information management device 700 further includes a storage replica group update module, specifically used for:
[0146] In response to a received storage replica group update request;
[0147] If a storage replica group update request includes a new request, retrieve the new replica group corresponding to the new request;
[0148] Bind the new instance group to the first lease;
[0149] If a storage replica group update request includes a delete request, retrieve the delete replica group corresponding to the delete request;
[0150] Remove the binding relationship between the copy group and the first lease.
[0151] Each module in the aforementioned cloud storage information management device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0152] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a cloud storage information management method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0153] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0154] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.
[0155] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0156] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method described above.
[0157] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0158] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0159] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0160] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A cloud storage information management method, characterized in that, The method includes: Obtain an information cloud storage request, and determine a storage replica group for storing the cloud storage information based on the information type of the cloud storage information carried in the information cloud storage request; Match the storage replica group with a corresponding first lease, and bind the storage replica group to the first lease; Based on the establishment time of the first lease, the expiration time of the first lease is determined; The first lease is stored in a min-heap according to a storage location that matches the expiration time; the distance between the storage location and the top port of the min-heap is positively correlated with the expiration time.
2. The method according to claim 1, characterized in that, The method further includes: Obtain the second lease from the top port of the min-heap; If the expiration time of the second lease indicates that the second lease has expired, lease traversal is performed in the direction from the top port to the bottom port of the min-heap until an unexpired lease is found. Each lease traversed before deleting the unexpired lease from the min-heap is released, and the storage replica group bound to the deleted lease is released.
3. The method according to claim 1, characterized in that, The information type includes information capacity and information characteristics; determining the storage replica group for storing the cloud storage information based on the information type carried by the cloud storage request includes: Based on the information capacity of the cloud storage information carried in the information cloud storage request, candidate storage replica groups that meet the information storage conditions of the information capacity are determined from each initial storage replica group; When there are multiple candidate storage replica groups, based on the information features, a storage replica group that matches the information features of the cloud storage information is determined from each of the candidate storage replica groups.
4. The method according to claim 3, characterized in that, The step of determining, based on the information features, the storage replica group that matches the information features of the cloud storage information from each of the candidate storage replica groups includes: Obtain the performance parameters of each of the candidate storage replica groups; Based on the information characteristics, determine the preference weight of the cloud storage information for the performance parameters; Based on the preference weights and the performance parameters of each candidate storage replica group, the matching degree between each candidate storage replica group and the cloud storage information is determined. The candidate storage replica group with the highest matching degree is determined as the storage replica group that matches the information characteristics of the cloud storage information.
5. The method according to claim 1, characterized in that, Each lease is matched with multiple storage replica groups; the method further includes: Upon receiving a lease renewal request, identify multiple storage replica groups that match the lease in the lease renewal request; Detect the usage status of each of the aforementioned storage replica groups; The expiration time of the lease is updated based on the current renewal time to obtain the updated expiration time; The update expiration time and each usage status are fed back to the storage agent.
6. The method according to claim 1, characterized in that, The method further includes: In response to a received storage replica group update request; If the storage replica group update request includes a new request, obtain the new replica group corresponding to the new request; Bind the newly added copy group to the first lease; If the storage replica group update request includes a deletion request, obtain the deletion replica group corresponding to the deletion request; Delete the binding relationship between the deleted copy group and the first lease.
7. A cloud storage information management device, characterized in that, The device includes: The storage replica group determination module is used to obtain information cloud storage requests and determine the storage replica group used to store the cloud storage information based on the information type of the cloud storage information carried in the information cloud storage request. The lease binding module is used to match the storage replica group with a corresponding first lease and bind the storage replica group to the first lease; The expiration time determination module is used to determine the expiration time of the first lease based on the establishment time of the first lease; The lease storage module is used to store the first lease in a min-heap according to a storage location that matches the expiration time; the distance between the storage location and the top port of the min-heap is positively correlated with the expiration time.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.