CN115914236B - Storage space allocation adjustment method and device, electronic equipment and storage medium - Google Patents

Storage space allocation adjustment method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115914236B
CN115914236B CN202310010268.2A CN202310010268A CN115914236B CN 115914236 B CN115914236 B CN 115914236B CN 202310010268 A CN202310010268 A CN 202310010268A CN 115914236 B CN115914236 B CN 115914236B
Authority
CN
China
Prior art keywords
storage space
storage
space
target
variation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310010268.2A
Other languages
Chinese (zh)
Other versions
CN115914236A (en
Inventor
陈海锋
李朝霞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Unicom Digital Technology Co Ltd
Unicom Cloud Data Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Unicom Digital Technology Co Ltd
Unicom Cloud Data Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd, Unicom Digital Technology Co Ltd, Unicom Cloud Data Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202310010268.2A priority Critical patent/CN115914236B/en
Publication of CN115914236A publication Critical patent/CN115914236A/en
Application granted granted Critical
Publication of CN115914236B publication Critical patent/CN115914236B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a storage space allocation adjustment method and device, electronic equipment and a storage medium. The method comprises the following steps: determining a storage node, and a first storage space and a second storage space of the storage node, wherein the first storage space is a storage space for a user to store data, and the second storage space is a storage space for the user to share backup data for other users; responding to the deleting operation of a user on the data in the first storage space, and acquiring the storage variation of the used storage space in the first storage space; and according to the storage variation, carrying out allocation adjustment on the storage space of the first storage space and the second storage space to obtain a first target storage space and a second target storage space after the allocation adjustment. The method improves the utilization rate of the storage space in the storage node.

Description

Storage space allocation adjustment method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for adjusting allocation of a storage space, an electronic device, and a storage medium.
Background
Cloud storage is a model of online storage (Cloud storage), that is, storing data on multiple virtual servers, typically hosted by third parties, rather than on dedicated servers. Hosting companies operate large data centers and require data storage to be hosted by people who purchase or rent storage space to them to meet the data storage requirements.
Currently, when cloud storage is used, a data center operator can prepare a storage virtualized resource at the back end according to the requirement of a client, and provide the storage virtualized resource in a storage resource pool (storage pool), so that the client can store a file or an object by using the storage resource pool.
However, in the existing cloud storage process, there is a problem that the utilization rate of the storage space in the storage node is not high.
Disclosure of Invention
The application provides a storage space allocation adjustment method, a storage space allocation adjustment device, electronic equipment and a storage medium, which are used for solving the problem that the utilization rate of storage space in a storage node is not high.
In a first aspect, the present application provides a method for adjusting allocation of a storage space, where the method includes:
determining a storage node, and a first storage space and a second storage space of the storage node, wherein the first storage space is a storage space for a user to store data, and the second storage space is a storage space for the user to share backup data for other users;
Responding to the deleting operation of a user on the data in the first storage space, and acquiring the storage variation of the used storage space in the first storage space;
and according to the storage variation, carrying out allocation adjustment on the storage space of the first storage space and the second storage space to obtain a first target storage space and a second target storage space after the allocation adjustment.
In this application, determining a storage node, and a first storage space and a second storage space of the storage node includes:
determining a storage node;
and responding to an allocation instruction of a user, dividing the storage space of the storage node to obtain a first storage space and a second storage space.
In this application, after dividing the storage space of the storage node in response to the allocation instruction of the user, to obtain the first storage space and the second storage space, the method further includes:
and performing slicing processing on the second storage space to obtain more than two slicing storage spaces, wherein each slicing storage space is a storage space for other users to store backup data.
In the application, responding to the deleting operation of the user on the data in the first storage space, the method for acquiring the storage variation of the used storage space in the first storage space comprises the following steps:
Acquiring the storage amount of an initial used storage space in a first storage space;
responding to the deleting operation of a user on the data in the first storage space, and acquiring the storage amount of the currently used storage space in the first storage space;
and determining the storage variation of the used storage space according to the storage quantity of the initial used storage space and the storage quantity of the current used storage space.
In this application, the method further comprises:
the second storage space is in a locked state when responding to a user deleting operation for data in the first storage space.
In the application, when the deleting operation is to delete the stored data in the first storage space, the storage variation represents the increment of the reserved storage space in the first storage space;
according to the storage variation, carrying out allocation adjustment on the storage space of the first storage space and the second storage space to obtain a first target storage space and a second target storage space after allocation adjustment, wherein the method comprises the following steps:
deleting the storage space of the first storage space according to the storage variation to obtain a deleted first target storage space;
and performing increasing processing on the storage space of the second storage space according to the storage variation, and obtaining a second target storage space after the increasing processing.
In the present application, when the delete operation is to store data into the first storage space, the storage variation characterizes an increase in the used storage space in the first storage space;
according to the storage variation, carrying out allocation adjustment on the storage space of the first storage space and the second storage space to obtain a first target storage space and a second target storage space after allocation adjustment, wherein the method comprises the following steps:
deleting the storage space of the second storage space according to the storage variation to obtain a second target storage space after deleting;
and performing increasing processing on the storage space of the first storage space according to the storage variation to obtain a first target storage space after the increasing processing.
In the application, the second storage space comprises a plurality of partitioned storage spaces, wherein each partitioned storage space stores backup data of other users;
and deleting the storage space of the second storage space according to the storage variation to obtain a deleted second target storage space, wherein the deleting comprises the following steps:
determining the priority of each partitioned storage space;
determining a target fragment storage space according to the priority and the storage variation;
and deleting the target partitioned storage space in the second storage space to obtain a deleted second target storage space.
In this application, after determining the storage node, and the first storage space and the second storage space of the storage node, the method further includes:
receiving a read request of other users for backup data in a second storage space, wherein the read request is generated according to the network bandwidth, the network quality and the online state of the storage node;
and sending reading feedback to other users according to the reading request, so that the other users can read the backup data in the second storage space according to the reading feedback.
In a second aspect, the present application provides an allocation adjustment device of a storage space, the device including:
the system comprises a determining module, a storage node, a first storage space and a second storage space, wherein the determining module is used for determining the storage node, the first storage space and the second storage space of the storage node, the first storage space is a storage space used for data storage by a user, and the second storage space is a storage space shared by the user for backup data storage by other users;
the acquisition module is used for responding to the deleting operation of the user on the data in the first storage space and acquiring the storage variation of the used storage space in the first storage space;
the obtaining module is used for carrying out distribution adjustment on the storage space of the first storage space and the second storage space according to the storage variation, and obtaining a first target storage space and a second target storage space after distribution adjustment.
In a third aspect, the present application provides an electronic device, comprising: a processor, a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes the computer-executable instructions stored in the memory to implement the memory allocation adjustment method of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions for implementing a method for adjusting allocation of storage space of the present application when the computer-executable instructions are executed by a processor.
According to the storage space allocation adjustment method, the storage space allocation adjustment device, the electronic equipment and the storage medium, the storage nodes, the first storage space and the second storage space of the storage nodes are determined, wherein the first storage space is a storage space for a user to store data, and the second storage space is a storage space for the user to share other users to store backup data; responding to the deleting operation of a user on the data in the first storage space, and acquiring the storage variation of the used storage space in the first storage space; and according to the storage variation, the first storage space and the second storage space are allocated and adjusted to obtain means for allocating the adjusted first target storage space and second target storage space, so that a user can share the idle storage space for other users, and the effect of improving the utilization rate of the storage space in the storage node is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a flow chart of a method for adjusting allocation of storage space according to an embodiment of the present application;
fig. 2 is a flowchart of another method for adjusting allocation of storage space according to an embodiment of the present application;
fig. 3 is a schematic view of a scenario of another apparatus for adjusting allocation of storage space according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a storage space allocation adjustment device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
In the prior art, when a private storage space owned by a user in cloud storage is used, a large amount of free storage space is often existed, and because the free storage space is not high in use ratio and huge in quantity, the storage capacity of the cloud storage is possibly reduced, a certain resource waste is caused, and if a service provider of the cloud storage collects the residual storage space due to use requirement, when the user needs to store a large file, the use of the user is influenced, so that the experience of the user is reduced.
In order to solve the above problems, in the embodiments of the present application, a user determines a first storage space used for storing data in a storage node and a second storage space shared to other users for storing backup data; responding to the deleting operation of a user on the data in the first storage space, and acquiring the storage variation of the used storage space in the first storage space; according to the storage variation, the first storage space and the second storage space are allocated and adjusted to obtain the first target storage space and the second target storage space after allocation and adjustment, so that the sizes of the first storage space and the second storage space can be dynamically adjusted, the problems that the utilization rate of the storage space is low, and the use of a user is influenced are avoided, and further the user experience is improved.
The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
The execution subject of the storage space allocation adjustment method provided in the embodiment of the present application may be a server. The server can be a mobile phone, a tablet, a computer and other devices. The implementation manner of the execution body is not particularly limited in this embodiment, as long as the execution body can determine a storage node, and a first storage space and a second storage space of the storage node, where the first storage space is a storage space used for data storage by a user, and the second storage space is a storage space shared by the user for backup data storage by other users; responding to the deleting operation of a user on the data in the first storage space, and acquiring the storage variation of the used storage space in the first storage space; and according to the storage variation, carrying out allocation adjustment on the storage space of the first storage space and the second storage space, and obtaining the first target storage space and the second target storage space after the allocation adjustment.
The storage node may include, among other things, a processor, memory, transceiver, etc. The processor may be a CPU (central processing unit ) or the like, and may be configured to perform storage service data processing, read service data processing, or the like. The memory may be RAM (Random Access Memory ), flash, etc., and may be used to store received data, data required for processing, data generated during processing, etc., such as business data, etc. The transceiver may be used for data transmission with a traffic server.
Fig. 1 is a flowchart illustrating a method for adjusting allocation of storage space according to an embodiment of the present application. The implementation body of the method may be a server or other servers, and the embodiment is not particularly limited herein, as shown in fig. 1, and the method may include:
s101, determining a storage node, and a first storage space and a second storage space of the storage node, wherein the first storage space is a storage space used for data storage by a user, and the second storage space is a storage space shared by the user for backup data storage by other users.
The first storage space may be a storage space used for data storage by a cloud storage user.
The second storage space may be a storage space used for a user for cloud storage to share part of the storage space in the storage node to other users for backup data storage. The second storage space may be a storage space shared to other users based on user intention.
The user may be a user having a first storage space and a second storage space usage right, wherein the user may include an organization, business, group, or individual, and the other user may be a user capable of using the second storage space, wherein the other user may be a different organization, business, group, or individual than the user. In the embodiment of the application, the user can divide the storage space represented by the storage node into the first storage space and the second storage space according to the requirement of the user, wherein the first storage space can be used by the user, the second storage space can be shared by the user for other users, and the benefit can be obtained according to the use condition of other users.
The backup data may represent the copy data of the other users when the other users store the data in the second storage space, and in some embodiments, in order to avoid the problem that the data stored in the second storage space is lost and thus the data of the other users are lost, the data stored in the second storage space by the other users may be the backup data. In the embodiment of the application, the data required to be stored by other users can be stored in a plurality of different second storage spaces, so that when the second storage spaces are required to be adjusted by the users in use, the other users cannot be influenced when the data stored in the second storage spaces are deleted, and the use effect of the users on the storage nodes is ensured on the premise that the other users are not influenced. Meanwhile, when other users use the storage node, the access request can be responded timely and quickly according to the access request, the network bandwidth, the network quality and the online state of the storage node corresponding to each second storage space, and therefore the use effect of the other users on the second storage space is improved.
In an embodiment of the present application, a method for determining a storage node, and a first storage space and a second storage space of the storage node may include:
determining a storage node;
and responding to an allocation instruction of a user, dividing the storage space of the storage node to obtain a first storage space and a second storage space.
Wherein, determining the storage node can be a process of detecting the total disk space and the actual occupation condition.
The allocation instruction may characterize an operation of dividing the storage space according to a requirement, for example, when the storage space size in the storage node is 100G, the allocation instruction may be to divide the storage space size of 60G in 100G into a first storage space and the storage space size of 40G into a second storage space. Or when the storage space size in the storage node is 100G, the used storage space is 15G, and the unused storage space is 85G, the allocation instruction may be 45G of the unused storage space as a reserved storage space, and 40G of the unused storage space as a shared storage space, wherein the unused storage space and the used storage space form a first storage space, and the shared storage space is a second storage space. By distributing the instruction, the storage space of the storage node can be divided, so that a first storage space and a second storage space are obtained.
In this embodiment of the present application, after the storage node is divided into the storage spaces in response to the allocation instruction of the user, the method for obtaining the first storage space and the second storage space may further include:
and performing slicing processing on the second storage space to obtain more than two slicing storage spaces, wherein each slicing storage space is a storage space for other users to store backup data.
The slicing process may refer to a process of dividing the second storage space into a plurality of sliced storage spaces, where each sliced storage space may be a sub-storage space of the second storage space. In some embodiments, the number of the sliced storage spaces obtained after the slicing process may be set according to the requirement of the user, for example, when the storage space size of the second storage space is 40G, the server side may divide the storage space into 40 sliced storage spaces with a storage space size of 1G according to the requirement of the user, or may divide the storage space into 1 sliced storage space with a storage space size of 10G and 1 sliced storage space with a storage space size of 30G. In this embodiment of the present application, each of the partitioned storage spaces may store different data independently, for example, when there are 3 partitioned storage spaces, the first partitioned storage space may store a data of other users a, the second partitioned storage space may store B data of other users a, and the third partitioned storage space may store c data of other users B.
S102, responding to the deleting operation of the user on the data in the first storage space, and acquiring the storage variation of the used storage space in the first storage space.
The deletion operation may refer to a user operation of storing and deleting data in the first storage space.
The used storage space may refer to a space within the first storage space that has been used.
The storage variable may refer to a variable of the used storage space after the deletion operation is performed, and in some embodiments, the storage variable may be determined according to a variable of the used storage space before and after the deletion operation is performed, or may be determined according to a variable of the reserved storage space in the first storage space.
In this embodiment of the present application, in response to a user deleting operation for data in a first storage space, a method for obtaining a storage variation of a used storage space in the first storage space may include:
acquiring the storage amount of an initial used storage space in a first storage space;
responding to the deleting operation of a user on the data in the first storage space, and acquiring the storage amount of the currently used storage space in the first storage space;
and determining the storage variation of the used storage space according to the storage quantity of the initial used storage space and the storage quantity of the current used storage space.
The amount of memory of the initial used memory space may be the amount of memory of the used memory space before the deletion operation. The currently used storage space may be an amount of storage of the used storage space after the deletion operation is performed. The amount of change in the storage of the used storage space can be determined based on the amount of storage of the initial used storage space and the amount of storage of the current used storage space. For example, when the amount of memory of the used memory space before the deletion operation is 15G and the amount of memory of the used memory space after the deletion operation is 20G, the amount of memory change of the used memory space is 5G.
In this embodiment of the present application, when responding to the user deleting operation for the data in the first storage space, the second storage space is in a locked state. Thus, when in use, the access experience of the user can be prevented from being influenced by the network bandwidth occupied by other user accesses.
And S103, according to the storage variation, carrying out storage space allocation adjustment on the first storage space and the second storage space to obtain a first target storage space and a second target storage space after the allocation adjustment.
The allocation adjustment may be a process of readjusting the storage space size of the first storage space and the storage space size of the second storage space, so as to obtain a first target storage space and a second target storage space. For example, when the storage space size of the first storage space is 45G and the storage space size of the second storage space is 55G, the allocation adjustment of the storage spaces is performed on the first storage space and the second storage space according to the storage variation of 5G, so as to obtain the storage space size of the first target storage space of 50G and the storage space size of the second target storage space of 50G.
After the first target storage space and the second target storage space are obtained, when the user performs the next deletion operation again, the first target storage space may be used as the first storage space, the second target storage space may be used as the second storage space, and steps S102 and S103 may be performed. In some embodiments, the delete operation may include deleting stored data of the first storage space and storing data into the first storage space.
In this embodiment of the present application, when the delete operation is to delete the stored data in the first storage space, the storage variation represents an increase of the reserved storage space in the first storage space;
the method for obtaining the first target storage space and the second target storage space after the allocation adjustment can comprise the following steps of:
deleting the storage space of the first storage space according to the storage variation to obtain a deleted first target storage space;
and performing increasing processing on the storage space of the second storage space according to the storage variation, and obtaining a second target storage space after the increasing processing.
In this embodiment, when the delete operation is to store data into the first storage space, the storage variation characterizes an increase of the used storage space in the first storage space.
The method for obtaining the first target storage space and the second target storage space after the allocation adjustment can comprise the following steps of:
deleting the storage space of the second storage space according to the storage variation to obtain a second target storage space after deleting;
and performing increasing processing on the storage space of the first storage space according to the storage variation to obtain a first target storage space after the increasing processing.
Wherein the pruning process and the adding process may be an adjustment process for the size of the storage space.
In this embodiment of the present application, the second storage space includes a plurality of partitioned storage spaces, where each partitioned storage space stores backup data of other users;
the deleting processing is performed on the storage space of the second storage space according to the storage variation, and the method for obtaining the second target storage space after the deleting processing can comprise the following steps:
Determining the priority of each partitioned storage space;
determining a target fragment storage space according to the priority and the storage variation;
and deleting the target partitioned storage space in the second storage space to obtain a deleted second target storage space.
The priority may represent the priority of the user, or may represent the priority of the importance of the backup data, or the priority of whether the backup data is stored in the partitioned storage space. In some embodiments, backup data may be stored in the partitioned storage space, and when deleting, the backup data may be selectively deleted according to the priority characterized by the backup data, so as to retain important data. In the embodiment of the application, the priority may be determined according to the level of other users, or may be determined according to the importance level of data defined by other users when the backup data is stored. In the embodiment of the present application, when the deletion of the partitioned storage space is performed, the partitioned storage space that does not store the backup data may be preferentially deleted, and when the partitioned storage space that does not store the backup data is insufficient to meet the requirement of the storage variation, the target partitioned storage space in the partitioned storage space may be deleted according to the priority of storing the backup data or other users.
The target sharded memory space may refer to a lower priority sharded memory space.
In this embodiment of the present application, after determining the storage node, and the first storage space and the second storage space of the storage node, the method may further include:
receiving a read request of other users for backup data in a second storage space, wherein the read request is generated according to the network bandwidth, the network quality and the online state of the storage node;
and sending reading feedback to other users according to the reading request, so that the other users can read the backup data in the second storage space according to the reading feedback.
The read request may be an access request of other users to a second storage space in the storage node, where when determining the storage node, since the backup data is stored in a plurality of different storage nodes, the network bandwidth, the network quality and the online status of the storage node may be selected to best meet the requirements, and thus the read request is generated, so that the user may conveniently read the backup data.
The allocation adjustment method for the storage space can be implemented by determining the storage node, and the first storage space and the second storage space of the storage node, wherein the first storage space is a storage space for a user to store data, and the second storage space is a storage space for the user to share backup data to other users; responding to the deleting operation of a user on the data in the first storage space, and acquiring the storage variation of the used storage space in the first storage space; and according to the storage variation, carrying out storage space allocation adjustment on the first storage space and the second storage space to obtain a first target storage space and a second target storage space after the allocation adjustment, thereby fully sharing and using the idle storage space of the user and further realizing the effect of improving the utilization rate of the storage space in the storage node.
Fig. 2 is a flowchart of another method for adjusting allocation of storage space according to an embodiment of the present application, as shown in fig. 2, the method may include:
s201, a private user installs a client of a cloud storage service provider on a storage node to be shared;
s202, the client is automatically started after being electrified, the total disk space and the actual occupation situation are detected, and the reserved storage space for private use and the shared storage space for other people are determined.
The storage space for private use is used by private users, and the shared storage space for other people can be shared by the private users for other people to use, so that benefits can be obtained.
S203, reporting the shared storage space for others and the network bandwidth, network quality and online state of the storage node to be shared to the main storage node, so that the main storage node stores the fragments of the data to be stored into the shared storage space for others through the corresponding client side until the space is full;
s204, detecting the access state of the private user of the storage node to be shared in real time by the client of the storage node to be shared;
and S205, when the private user is detected to access the storage node to be shared, sending notification information to the main storage node so that the main storage node does not temporarily receive the access of other users to the storage node to be shared.
After receiving the notification information, the main storage node can save the shared storage space for others, and temporarily does not receive access of other users to the storage node to be shared.
And S206, when detecting that the private user stores data or releases space of the storage space for private use, sending adjustment information to the main storage node so that the main storage node adjusts the size of the shared storage space for other people according to the change amount of the data storage or the space release.
The method and the device can ensure that the use experience of the storage node to be shared is ensured, and the highest priority of private users is ensured no matter network resources or storage resources. And the benefits are obtained through the shared storage space for other people to use, so that the user experience is improved.
Fig. 3 is a schematic view of a scenario of another apparatus for adjusting allocation of storage space according to an embodiment of the present application, where, as shown in fig. 3, the structure includes a cloud storage service provider, a main storage node, a storage space for private use, and a shared storage space for use by others.
Fig. 4 is a schematic structural diagram of a memory space allocation adjustment device according to an embodiment of the present application. As shown in fig. 4, the memory space allocation adjustment device 40 includes: a determining module 401, an acquiring module 402 and an obtaining module 403. Wherein:
The determining module 401 is configured to determine a storage node, and a first storage space and a second storage space of the storage node, where the first storage space is a storage space used for storing data by a user, and the second storage space is a storage space shared by the user for storing backup data for other users;
an obtaining module 402, configured to obtain a storage variation of a used storage space in the first storage space in response to a deletion operation of data in the first storage space by a user;
the obtaining module 403 is configured to perform allocation adjustment of the storage space to the first storage space and the second storage space according to the storage variation, and obtain a first target storage space and a second target storage space after the allocation adjustment.
In the embodiment of the present application, the determining module 401 may be further specifically configured to:
determining a storage node;
and responding to an allocation instruction of a user, dividing the storage space of the storage node to obtain a first storage space and a second storage space.
In the embodiment of the present application, the determining module 401 may be further specifically configured to:
and performing slicing processing on the second storage space to obtain more than two slicing storage spaces, wherein each slicing storage space is a storage space for other users to store backup data.
In the embodiment of the present application, the obtaining module 402 may be further specifically configured to:
responding to the deleting operation of the user for the data in the first storage space, obtaining the storage variation of the used storage space in the first storage space, comprising the following steps:
acquiring the storage amount of an initial used storage space in a first storage space;
responding to the deleting operation of a user on the data in the first storage space, and acquiring the storage amount of the currently used storage space in the first storage space;
and determining the storage variation of the used storage space according to the storage quantity of the initial used storage space and the storage quantity of the current used storage space.
In the embodiment of the present application, the obtaining module 402 may be further specifically configured to:
the second storage space is in a locked state when responding to a user deleting operation for data in the first storage space.
In the embodiment of the present application, the obtaining module 403 may be further specifically configured to:
deleting the storage space of the first storage space according to the storage variation to obtain a deleted first target storage space;
and performing increasing processing on the storage space of the second storage space according to the storage variation, and obtaining a second target storage space after the increasing processing.
In the embodiment of the present application, the obtaining module 403 may be further specifically configured to:
deleting the storage space of the second storage space according to the storage variation to obtain a second target storage space after deleting;
and performing increasing processing on the storage space of the first storage space according to the storage variation to obtain a first target storage space after the increasing processing.
In the embodiment of the present application, the obtaining module 403 may be further specifically configured to:
determining the priority of each partitioned storage space;
determining a target fragment storage space according to the priority and the storage variation;
and deleting the target partitioned storage space in the second storage space to obtain a deleted second target storage space.
In the embodiment of the present application, the obtaining module 403 may be further specifically configured to:
receiving a read request of other users for backup data in a second storage space, wherein the read request is generated according to the network bandwidth, the network quality and the online state of the storage node;
and sending reading feedback to other users according to the reading request, so that the other users can read the backup data in the second storage space according to the reading feedback.
As can be seen from the above, the allocation adjustment device of the storage space in the embodiment of the present application is configured to determine the storage node, and a first storage space and a second storage space of the storage node, where the first storage space is a storage space used for storing data by a user, and the second storage space is a storage space shared by the user for storing backup data to other users; an obtaining module 402, configured to obtain a storage variation of a used storage space in the first storage space in response to a deletion operation of data in the first storage space by a user; the obtaining module 403 is configured to perform allocation adjustment of the storage space to the first storage space and the second storage space according to the storage variation, and obtain a first target storage space and a second target storage space after the allocation adjustment. Thereby, the effect of improving the utilization rate of the storage space in the storage node is achieved.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 5, the electronic device 50 includes:
the electronic device 50 may include one or more processing cores 'processors 501, one or more computer-readable storage media's memory 502, communication components 503, and the like. The processor 501, the memory 502, and the communication unit 503 are connected via a bus 504.
In a specific implementation, at least one processor 501 executes computer-executable instructions stored in a memory 502, so that at least one processor 501 performs the allocation adjustment method of storage space as described above.
The specific implementation process of the processor 501 may refer to the above-mentioned method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
In the embodiment shown in fig. 5, it should be understood that the processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, digital signal processors (english: digital Signal Processor, abbreviated as DSP), application specific integrated circuits (english: application Specific Integrated Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The Memory may comprise high-speed Memory (Random Access Memory, RAM) or may further comprise Non-volatile Memory (NVM), such as at least one disk Memory.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or one type of bus.
In some embodiments, a computer program product is also proposed, comprising a computer program or instructions which, when executed by a processor, implement the steps of any of the above-mentioned allocation adjustment methods of storage space.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer readable storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform steps in any of the allocation adjustment methods of storage space provided in the embodiments of the present application.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium.
The steps in any of the methods for adjusting the allocation of the storage space provided in the embodiments of the present application may be executed due to the instructions stored in the storage medium, so that the beneficial effects that any of the methods for adjusting the allocation of the storage space provided in the embodiments of the present application may be achieved are detailed in the previous embodiments, and are not described herein.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (7)

1. A method for adjusting allocation of storage space, the method comprising:
determining a storage node, and a first storage space and a second storage space of the storage node, wherein the first storage space is a storage space used for data storage by a user, and the second storage space is a storage space shared by the user for backup data storage by other users;
responding to the deleting operation of the user on the data in the first storage space, and acquiring the storage variation of the used storage space in the first storage space;
according to the storage variation, carrying out distribution adjustment on the storage space of the first storage space and the second storage space to obtain a first target storage space and a second target storage space after distribution adjustment;
after said determining the storage node, and the first storage space and the second storage space of the storage node, the method further comprises:
Performing slicing processing on the second storage space to obtain more than two slicing storage spaces, wherein each slicing storage space is a storage space for storing backup data of other users, and each slicing storage space independently stores different data;
responding to the deleting operation of the user on the data in the first storage space, wherein the second storage space is in a locking state;
when the delete operation is to store data into the first storage space, the storage variation characterizes an increase in used storage space in the first storage space;
and performing allocation adjustment on the storage space of the first storage space and the second storage space according to the storage variation to obtain a first target storage space and a second target storage space after allocation adjustment, wherein the allocation adjustment comprises the following steps:
according to the storage variation, deleting the storage space of the second storage space to obtain the second target storage space after deleting;
according to the storage variation, increasing the storage space of the first storage space to obtain the first target storage space after the increasing;
And performing pruning processing on the storage space of the second storage space according to the storage variation to obtain the pruned second target storage space, where the pruning processing includes:
determining the priority of each partitioned storage space, wherein the priority comprises the priority of a user, the priority of the importance of backup data and the priority of whether the backup data is stored in the partitioned storage space;
determining a target fragment storage space according to the priority and the storage variation;
performing pruning processing on the target partitioned storage space in the second storage space to obtain a pruned second target storage space;
after said determining the storage node, and the first storage space and the second storage space of the storage node, the method further comprises:
receiving a read request of other users for backup data in the second storage space, wherein the read request is generated according to the network bandwidth, the network quality and the online state of the storage node;
and sending reading feedback to the other users according to the reading request, so that the other users can read the backup data in the second storage space according to the reading feedback.
2. The method of claim 1, wherein the determining the storage node, and the first storage space and the second storage space of the storage node, comprises:
determining a storage node;
and responding to an allocation instruction of a user, dividing the storage space of the storage node to obtain the first storage space and the second storage space.
3. The method of claim 1, wherein the obtaining, in response to the user's deletion operation of the data in the first storage space, the storage variation of the used storage space in the first storage space includes:
acquiring the storage amount of an initial used storage space in the first storage space;
responding to the deleting operation of the user on the data in the first storage space, and acquiring the storage amount of the currently used storage space in the first storage space;
and determining the storage change amount of the used storage space according to the storage amount of the initial used storage space and the storage amount of the current used storage space.
4. The method of claim 1, wherein the amount of storage change characterizes an increase in reserved storage space in the first storage space when the delete operation is to delete stored data in the first storage space;
And performing allocation adjustment on the storage space of the first storage space and the second storage space according to the storage variation to obtain a first target storage space and a second target storage space after allocation adjustment, wherein the allocation adjustment comprises the following steps:
according to the storage variation, deleting the storage space of the first storage space to obtain the deleted first target storage space;
and performing increasing processing on the storage space of the second storage space according to the storage variation, so as to obtain the second target storage space after the increasing processing.
5. An allocation adjustment device for a storage space, the device comprising:
the system comprises a determining module, a storage node, a first storage space and a second storage space, wherein the determining module is used for determining the storage node, the first storage space and the second storage space of the storage node, the first storage space is a storage space used for data storage by a user, and the second storage space is a storage space shared by the user for backup data storage by other users;
the acquisition module is used for responding to the deleting operation of the user on the data in the first storage space and acquiring the storage variation of the used storage space in the first storage space;
The obtaining module is used for carrying out distribution adjustment on the storage space of the first storage space and the second storage space according to the storage variation, and obtaining a first target storage space and a second target storage space after distribution adjustment;
the determining module is further configured to: performing slicing processing on the second storage space to obtain more than two slicing storage spaces, wherein each slicing storage space is a storage space used for backup data storage of other users, and each slicing storage space independently stores different data;
the acquisition module is further configured to: responding to the deleting operation of a user on the data in the first storage space, wherein the second storage space is in a locking state;
when the deletion operation is to store data into the first storage space, the storage variation represents an increase of the used storage space in the first storage space, and the obtaining module is specifically configured to perform deletion processing on the storage space of the second storage space according to the storage variation to obtain the second target storage space after deletion processing;
according to the storage variation, increasing the storage space of the first storage space to obtain the first target storage space after the increasing;
The obtaining module is further specifically configured to determine a priority of each of the partitioned storage spaces, where the priority includes a priority of a user, a priority of importance of backup data, and a priority of whether backup data is stored in the partitioned storage space;
determining a target fragment storage space according to the priority and the storage variation;
performing pruning processing on the target partitioned storage space in the second storage space to obtain a pruned second target storage space;
the obtaining module is further configured to receive a read request of other users for backup data in the second storage space, where the read request is a request generated according to a network bandwidth, a network quality and an online state of the storage node;
and sending reading feedback to the other users according to the reading request, so that the other users can read the backup data in the second storage space according to the reading feedback.
6. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes the computer-executable instructions stored in the memory to implement the allocation adjustment method of the storage space according to any one of claims 1 to 4.
7. A computer-readable storage medium, wherein computer-executable instructions are stored in the computer-readable storage medium, and the computer-executable instructions are executed by a processor to implement the allocation adjustment method of storage space according to any one of claims 1 to 4.
CN202310010268.2A 2023-01-05 2023-01-05 Storage space allocation adjustment method and device, electronic equipment and storage medium Active CN115914236B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310010268.2A CN115914236B (en) 2023-01-05 2023-01-05 Storage space allocation adjustment method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310010268.2A CN115914236B (en) 2023-01-05 2023-01-05 Storage space allocation adjustment method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115914236A CN115914236A (en) 2023-04-04
CN115914236B true CN115914236B (en) 2023-07-25

Family

ID=86494007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310010268.2A Active CN115914236B (en) 2023-01-05 2023-01-05 Storage space allocation adjustment method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115914236B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107992270A (en) * 2017-12-15 2018-05-04 杭州宏杉科技股份有限公司 A kind of method and device of the globally shared caching of more controlled storage systems
CN108009240A (en) * 2017-11-29 2018-05-08 金色家园网络科技有限公司 Shared storage method, device and electronic equipment
CN112925478A (en) * 2021-01-29 2021-06-08 惠州Tcl移动通信有限公司 Camera storage space control method, intelligent terminal and computer readable storage medium
CN113296700A (en) * 2021-04-20 2021-08-24 新华三信息技术有限公司 Storage space management method and device and server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8930507B2 (en) * 2012-06-12 2015-01-06 International Business Machines Corporation Physical memory shared among logical partitions in a VLAN

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009240A (en) * 2017-11-29 2018-05-08 金色家园网络科技有限公司 Shared storage method, device and electronic equipment
CN107992270A (en) * 2017-12-15 2018-05-04 杭州宏杉科技股份有限公司 A kind of method and device of the globally shared caching of more controlled storage systems
CN112925478A (en) * 2021-01-29 2021-06-08 惠州Tcl移动通信有限公司 Camera storage space control method, intelligent terminal and computer readable storage medium
CN113296700A (en) * 2021-04-20 2021-08-24 新华三信息技术有限公司 Storage space management method and device and server

Also Published As

Publication number Publication date
CN115914236A (en) 2023-04-04

Similar Documents

Publication Publication Date Title
JP5510556B2 (en) Method and system for managing virtual machine storage space and physical hosts
US11157457B2 (en) File management in thin provisioning storage environments
CN107241281B (en) Data processing method and device
CN109981702B (en) File storage method and system
CN111522636A (en) Application container adjusting method, application container adjusting system, computer readable medium and terminal device
EP3958122A1 (en) Memory management method, apparatus, and system
CN111104219A (en) Binding method, device, equipment and storage medium of virtual core and physical core
CN112214313A (en) Memory allocation method and related equipment
CN115348264A (en) Multi-tenant cloud service management method, device, equipment and storage medium
CN112860387A (en) Distributed task scheduling method and device, computer equipment and storage medium
CN111404828B (en) Method and device for realizing global flow control
CN115914236B (en) Storage space allocation adjustment method and device, electronic equipment and storage medium
US20220206836A1 (en) Method and Apparatus for Processing Virtual Machine Migration, Method and Apparatus for Generating Virtual Machine Migration Strategy, Device and Storage Medium
CN111400241B (en) Data reconstruction method and device
CN115794396A (en) Resource allocation method, system and electronic equipment
CN113239059B (en) Switching method and device of distributed lock, server and storage medium
CN114327862A (en) Memory allocation method and device, electronic equipment and storage medium
CN112884382A (en) Resource quota management method, device, equipment and storage medium of cloud platform
CN110866066A (en) Service processing method and device
CN116431327B (en) Task current limiting processing method and fort machine
CN114465958B (en) Input and output control method, device and medium
CN111857548A (en) Data reading method, device and system
CN110955522A (en) Resource management method and system for coordination performance isolation and data recovery optimization
CN115328640B (en) Task scheduling method, device and system and computer readable storage medium
CN115586957B (en) Task scheduling system, method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant