+

CN112346864A - Cloud space recovery method and recovery equipment - Google Patents

Cloud space recovery method and recovery equipment Download PDF

Info

Publication number
CN112346864A
CN112346864A CN202011172102.3A CN202011172102A CN112346864A CN 112346864 A CN112346864 A CN 112346864A CN 202011172102 A CN202011172102 A CN 202011172102A CN 112346864 A CN112346864 A CN 112346864A
Authority
CN
China
Prior art keywords
user
space
total available
available space
cloud
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.)
Pending
Application number
CN202011172102.3A
Other languages
Chinese (zh)
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.)
Colorlight Shenzhen Cloud Technology Co Ltd
Original Assignee
Colorlight Shenzhen Cloud Technology 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 Colorlight Shenzhen Cloud Technology Co Ltd filed Critical Colorlight Shenzhen Cloud Technology Co Ltd
Priority to CN202011172102.3A priority Critical patent/CN112346864A/en
Publication of CN112346864A publication Critical patent/CN112346864A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

本发明公开了一种云空间回收方法及回收设备,其中,云空间回收方法首先分别记录第一用户和第二用户的用户ID,通过用户ID确定第一用户和第二用户的总可用空间;之后确定第一用户和第二用户的总可用空间的大小,将第二用户的总可用空间的大小添加至第一用户的剩余空间中,同时将第二用户的总可用空间进行删除;其中,第一用户的权限高于第二用户的权限;第一用户和第二用户的总可用空间均由已用空间和剩余空间组成。本发明限定了高权限用户(第一用户)如何回收低权限用户(第二用户)的总可用空间,相较于传统的回收方法,本发明摒弃了已分配空间的概念,利用总可用空间的变化来代替已分配空间的变化,减少了每次操作修改数据的成本。

Figure 202011172102

The invention discloses a cloud space recovery method and a recovery device, wherein the cloud space recovery method first records the user IDs of the first user and the second user respectively, and determines the total available space of the first user and the second user by the user ID; Then determine the size of the total available space of the first user and the second user, add the size of the total available space of the second user to the remaining space of the first user, and delete the total available space of the second user; wherein, The authority of the first user is higher than the authority of the second user; the total available space of the first user and the second user is composed of the used space and the remaining space. The present invention defines how the high-authority user (the first user) can reclaim the total available space of the low-authority user (the second user). Compared with the traditional recycling method, the present invention abandons the concept of allocated space and utilizes the Changes in place of changes to allocated space reduce the cost of modifying data per operation.

Figure 202011172102

Description

Cloud space recovery method and recovery equipment
Technical Field
The invention belongs to the technical field of space recovery, and particularly relates to a cloud space recovery method and cloud space recovery equipment.
Background
The cloud space is wide in application field, data can be conveniently stored in the cloud space, and in the field of LED display, a user can also store video, picture data and the like required to be displayed by using the cloud space, so that the user can display the video and the picture data in an LED display screen through the cloud space.
The cloud space is composed of user spaces where a plurality of authority users are located, wherein each user space can be divided into a total available space, an used space, a residual available space and an allocated space, and the size of the total available space is the sum of the used space, the allocated space and the residual available space; the authority users can include a first-level manager, a second-level manager and the like, the authority of the first-level manager can be set to be larger than that of the second-level manager, when the user space where the second-level manager is located is recovered by the first-level manager, for example, when an account number of the second-level manager is deleted by the first-level manager, in order to ensure that the total amount of the user space is consistent, the total available space of the second-level manager needs to be transferred to the first-level manager, and the operation of modifying data includes two items: the first item is to subtract the allocated space of the primary administrator from the total available space of the secondary administrator, and the second item is to add the remaining available space of the primary administrator to the total available space of the secondary administrator, wherein each of the above items is divided into three steps: querying the corresponding spatial data of the two users, calculating the modified spatial data and updating the spatial data.
Therefore, the current method has the problem of excessive modification of spatial data, and indirectly causes certain influence on the user space allocation rate.
Disclosure of Invention
In order to solve the above problems, the present invention provides a cloud space recovery method, which abandons the concept of allocated space in the traditional cloud space recovery, and solves the problem of low allocation rate caused by excessive data in the existing recovery method.
Another object of the present invention is to provide a cloud space recycling apparatus.
The technical scheme adopted by the invention is as follows:
a cloud space recovery method specifically comprises the following steps:
s1, recording user IDs of the first user and the second user respectively;
s2, determining the total available space of the first user and the second user through the user ID;
s3, determining the size of the total available space of the first user and the second user;
s4, adding the size of the total available space of the second user into the residual space of the first user, and deleting the total available space of the second user;
wherein the authority of the first user is higher than the authority of the second user;
the total available space of the first user and the second user is composed of used space and residual space.
As a further improvement of the cloud space recycling method of the present invention, in S4, the total available space of the second user is deleted, specifically:
deleting the total available space of the second user into the recycle bin, and the recycle bin has a revocable function.
As a further improvement of the cloud space recovery method of the present invention, the cloud space recovery method further includes: determining whether the total available space of the user is recycled by judging whether the total available space of the user is accessed within a fixed time, specifically:
judging whether the time when the total available space of the user is not accessed reaches the preset time or not, deleting the total available space of the user to a recycle bin when the time reaches the preset time, and otherwise, reserving the total available space of the user;
wherein the user is a first user or a second user.
As a further improvement of the cloud space recovery method of the present invention, the cloud space recovery method further includes: judging whether the total available space of the user reaches saturation in real time, and if so, increasing the total available space of the user;
wherein the user is a first user or a second user.
As a further improvement of the cloud space recovery method of the present invention, the increase of the total available space is specifically:
adding the total available space of the third user to the total available space of the users whose total available space has reached saturation;
and the third user is the user with the total available space not accessed for the preset time.
As a further improvement of the cloud space recovery method of the present invention, the increase of the total available space is specifically:
adding a reclaimed portion of the total available space reclaimed to the first user to the total available space of the users whose total available space has reached saturation.
As a further improvement of the cloud space recovery method of the present invention, the increase of the total available space is specifically:
the remaining space of the first user is added to the total available space of the users whose total available space has reached saturation.
A cloud space recycling device applying the cloud space recycling method comprises a memory and a processor;
the memory for storing a computer program;
the processor is configured to implement the steps of the cloud space recovery method when executing the computer program.
Compared with the prior art, when the method is implemented, the user IDs of the first user and the second user are respectively recorded, and the total available space of the first user and the total available space of the second user are determined through the user IDs; then determining the size of the total available space of the first user and the second user, adding the size of the total available space of the second user into the residual space of the first user, and deleting the total available space of the second user; wherein the authority of the first user is higher than the authority of the second user; the total available space of the first user and the second user consists of used space and residual space;
the invention limits how the high-authority user recovers the total available space of the low-authority user, and compared with the traditional recovery method, the invention abandons the concept of allocated space, utilizes the change of the total available space to replace the change of the allocated space, and reduces the cost of modifying data in each operation.
Drawings
Fig. 1 is a flowchart of a cloud space recovery method according to embodiment 1 of the present invention;
fig. 2 is a block diagram of a cloud space recycling apparatus according to embodiment 2 of the present invention.
Wherein: 1. cloud space recovery equipment, 11, a memory, 12, a processor.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the description of the present invention, it is to be understood that the terms "vertical", "lateral", "longitudinal", "front", "rear", "left", "right", "upper", "lower", "horizontal", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description of the present invention, and do not mean that the device or member to which the present invention is directed must have a specific orientation or position, and thus, cannot be construed as limiting the present invention.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; may be directly connected or indirectly connected through an intermediate. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Example 1
Embodiment 1 of the present invention provides a cloud space recovery method, as shown in fig. 1, which specifically includes the following steps:
s1, recording user IDs of the first user and the second user respectively;
specifically, the user IDs have uniqueness, and each user ID corresponds to one user;
s2, determining the total available space of the first user and the second user through the user ID;
specifically, determining a total available space corresponding to each user ID;
s3, determining the size of the total available space of the first user and the second user;
specifically, the space size of the total available space of the first user and the second user is determined by querying the mysql database store, for example:
select meta_value from user_meta where meta_key=‘total_size’and user_id=XXX;
s4, adding the size of the total available space of the second user into the residual space of the first user, and deleting the total available space of the second user;
wherein the authority of the first user is higher than the authority of the second user;
the total available space of the first user and the second user is composed of used space and residual space.
It is worth mentioning that: in the present embodiment, the total available space is changeable for each user, the change of the allocated space is replaced with the change of the total available space, and the remaining available space can be calculated by the difference between the total available space and the used space, thereby reducing the cost of modifying data per operation, compared with the conventional technique.
Specifically, the size of the total available space of the second user is added to the remaining space of the first user through the scripting language, such as:
update user_meta set meta_value=XXX where meta_key='total_size'and user_id=XXX。
specifically, the total available space of the second user is deleted by the scripting language, such as:
delete from user_meta where meta_key=‘total_size’and user_id=XXX。
more specifically, when a high-authority user (a first user) recovers a low-authority user (a second user), in order to ensure the consistency of the total amount of user space, the total available space of the high-authority user only needs to be increased, the increase is the total available space of the low-authority user, and at this time, the identity of the low-authority user is also recovered and can be recorded in the total available space with high authority.
In a specific embodiment, no matter how many levels of permissions a user is in, once the total available space of the user is reclaimed by a high-permission user, only the total available space of a low-permission user is added to the total available space or the remaining space of the high-permission user who issued the reclaim command.
In S4, deleting the total available space of the second user, specifically:
deleting the total available space of the deleted second user into a recycle bin, and the recycle bin has a revocable function;
in this way, deletion errors can be prevented from failing to recover by the revocable function of the recycle bin.
The cloud space recovery method further comprises the following steps: determining whether the total available space of the user is recycled by judging whether the total available space of the user is accessed within a fixed time, specifically:
judging whether the time when the total available space of the user is not accessed reaches the preset time or not, deleting the total available space of the user to a recycle bin when the time reaches the preset time, and otherwise, reserving the total available space of the user;
wherein the user is a first user or a second user;
in a specific embodiment, the preset time is 5-30 days;
for example, when the preset time is 5 days, and when the total available space of the user is not accessed for 6 days, the total available space of the user is deleted to the recycle bin.
Therefore, when the data in the total available space of the low-authority user is not used for a long time, the data in the total available space can be released after the data in the total available space is deleted through the script language, so that the total available space of the user can be recycled;
the deleted data can be stored in the recycle bin, and the user can be prevented from mistakenly deleting the data through the withdrawal of the recycle bin;
in another embodiment, when the low-authority user is recycled, only the unused space can be recycled, the used space can not be recycled, and the data in the used space continues to be used by the low-authority user.
The method further comprises the following steps: when the first user allocates the total available space of the first user, the total available space of the first user is reduced, the reduced space size is allocated to the created new user by using the script language, and the space size is used as the total available space of the new user.
The method further comprises the following steps: refreshing the total available space of the first user and the second user when the total available space of the first user and the second user changes;
therefore, the data before the change can be prevented from being displayed because the system is not read again after the data change through timely refreshing.
In another embodiment, the cloud space reclamation method further includes: judging whether the total available space of the user reaches saturation in real time, and if so, increasing the total available space of the user; the user is a first user or a second user;
there are three real-time scenarios for increasing the total available space:
a first scheme of adding the total available space of the third user to the total available space of the users whose total available space has reached saturation; the third user is a user with the total available space not accessed for a preset time;
therefore, the space increase of users with insufficient space can be met, and the space of users who do not use the cloud space for a long time can be recycled, so that resources are fully utilized;
a second scheme of adding a reclamation portion reclaimed to the total available space of the first user to the total available space of the users whose total available space has reached saturation;
therefore, the space increase of users with insufficient space can be met, and the problem of space distribution of recovered low-authority users is solved;
according to the third scheme, the residual space of the first user is added into the total available space of the users of which the total available space is saturated;
therefore, the residual space of the first user is directly allocated, the use of the first user for the space is not influenced, and the space of the user with insufficient space can be increased.
In the embodiment, the total available space of each user in the cloud space is limited and managed, so that the problem that the modified space data is excessive at present is solved, and the allocation rate of allocating the total available space to the new user is indirectly increased.
Example 2
Embodiment 2 of the present invention provides a cloud space recycling apparatus 1, as shown in fig. 2, to which the cloud space recycling method described in embodiment 1 is applied, including a memory 11 and a processor 12;
the memory 11 is used for storing a computer program;
the processor 12 is configured to implement the steps of the cloud space recycling method according to embodiment 1 when executing the computer program.
In addition, a computer program may also be stored on a computer-readable storage medium, which when executed by a processor implements the cloud space reclamation method described in embodiment 1.
The computer-readable access medium includes, but is not limited to, volatile memory and/or non-volatile memory, for example. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc.
It will be understood by those skilled in the art that all or part of the steps of the above methods may be implemented by instructing the relevant hardware through a program, and the program may be stored in a computer readable medium, such as a read only memory, a magnetic or optical disk, and the like. Alternatively, all or part of the steps of the above embodiments may be implemented using one or more integrated circuits. Accordingly, each module/unit in the above embodiments may be implemented in the form of hardware, and may also be implemented in the form of a software functional module. The present disclosure is not limited to any specific form of combination of hardware and software.
The foregoing is illustrative of the present disclosure and is not to be construed as limiting thereof. Although a few exemplary embodiments of this disclosure have been described, those skilled in the art will readily appreciate that many modifications are possible in the exemplary embodiments without materially departing from the novel teachings and advantages of this disclosure. Accordingly, all such modifications are intended to be included within the scope of this disclosure as defined in the claims. It is to be understood that the foregoing is illustrative of the present disclosure and is not to be construed as limited to the specific embodiments disclosed, and that modifications to the disclosed embodiments, as well as other embodiments, are intended to be included within the scope of the appended claims. The present disclosure is defined by the claims and their equivalents.

Claims (10)

1. A cloud space recovery method is characterized by specifically comprising the following steps:
s1, recording user IDs of the first user and the second user respectively;
s2, determining the total available space of the first user and the second user through the user ID;
s3, determining the size of the total available space of the first user and the second user;
s4, adding the size of the total available space of the second user into the residual space of the first user, and deleting the total available space of the second user;
wherein the authority of the first user is higher than the authority of the second user;
the total available space of the first user and the second user is composed of used space and residual space.
2. The cloud space recovery method according to claim 1, wherein in S4, deleting the total available space of the second user specifically includes:
deleting the total available space of the second user into the recycle bin, and the recycle bin has a revocable function.
3. The cloud space recovery method according to claim 2, wherein the cloud space recovery method further comprises: determining whether the total available space of the user is recycled by judging whether the total available space of the user is accessed within a fixed time, specifically:
judging whether the time when the total available space of the user is not accessed reaches the preset time or not, deleting the total available space of the user to a recycle bin when the time reaches the preset time, and otherwise, reserving the total available space of the user;
wherein the user is a first user or a second user.
4. The cloud space recovery method according to any one of claims 1 to 3, wherein the cloud space recovery method further comprises: judging whether the total available space of the user reaches saturation in real time, and if so, increasing the total available space of the user;
wherein the user is a first user or a second user.
5. The cloud space recovery method according to claim 4, wherein the increasing of the total available space is specifically:
adding the total available space of the third user to the total available space of the users whose total available space has reached saturation;
and the third user is the user with the total available space not accessed for the preset time.
6. The cloud space recovery method according to claim 4, wherein the increasing of the total available space is specifically:
adding a reclaimed portion of the total available space reclaimed to the first user to the total available space of the users whose total available space has reached saturation.
7. The cloud space recovery method according to claim 4, wherein the increasing of the total available space is specifically:
the remaining space of the first user is added to the total available space of the users whose total available space has reached saturation.
8. The cloud space recycling method according to claim 1, further comprising: when the first user allocates the total available space of the first user, the total available space of the first user is reduced, the reduced space size is allocated to the created new user by using the script language, and the space size is used as the total available space of the new user.
9. The cloud space recovery method according to claim 8, wherein the method further comprises: and refreshing the total available space of the first user and the second user when the total available space of the first user and the second user changes.
10. A cloud space recycling apparatus, which applies the cloud space recycling method according to any one of claims 1 to 9, comprising a memory (11) and a processor (12);
the memory (11) for storing a computer program;
the processor (12) configured to implement the steps of the cloud space reclamation method according to any one of claims 1 to 7 when executing the computer program.
CN202011172102.3A 2020-10-28 2020-10-28 Cloud space recovery method and recovery equipment Pending CN112346864A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011172102.3A CN112346864A (en) 2020-10-28 2020-10-28 Cloud space recovery method and recovery equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011172102.3A CN112346864A (en) 2020-10-28 2020-10-28 Cloud space recovery method and recovery equipment

Publications (1)

Publication Number Publication Date
CN112346864A true CN112346864A (en) 2021-02-09

Family

ID=74358993

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011172102.3A Pending CN112346864A (en) 2020-10-28 2020-10-28 Cloud space recovery method and recovery equipment

Country Status (1)

Country Link
CN (1) CN112346864A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130219069A1 (en) * 2012-02-22 2013-08-22 Computer Associates Think, Inc. System and method for managing virtual hard disks in cloud environments
US20140297733A1 (en) * 2011-12-29 2014-10-02 Huawei Technologies Co., Ltd. Cloud Computing System and Method for Managing Storage Resources Therein
US9317820B1 (en) * 2010-03-31 2016-04-19 Emc Corporation System and method for configuring a cloud computing space
CN105531696A (en) * 2013-10-09 2016-04-27 英特尔公司 Technologies used to manage cloud storage
CN108268605A (en) * 2017-12-27 2018-07-10 北京洪泰同创信息技术有限公司 A kind of communal space method for managing resource and system
CN109450965A (en) * 2018-09-07 2019-03-08 海信集团有限公司 Session Resources recovery and treatment method, device, cloud platform and Internet of things system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9317820B1 (en) * 2010-03-31 2016-04-19 Emc Corporation System and method for configuring a cloud computing space
US20140297733A1 (en) * 2011-12-29 2014-10-02 Huawei Technologies Co., Ltd. Cloud Computing System and Method for Managing Storage Resources Therein
US20130219069A1 (en) * 2012-02-22 2013-08-22 Computer Associates Think, Inc. System and method for managing virtual hard disks in cloud environments
CN105531696A (en) * 2013-10-09 2016-04-27 英特尔公司 Technologies used to manage cloud storage
CN108268605A (en) * 2017-12-27 2018-07-10 北京洪泰同创信息技术有限公司 A kind of communal space method for managing resource and system
CN109450965A (en) * 2018-09-07 2019-03-08 海信集团有限公司 Session Resources recovery and treatment method, device, cloud platform and Internet of things system

Similar Documents

Publication Publication Date Title
US7827375B2 (en) Defensive heap memory management
US8069326B2 (en) Relocation system and a relocation method
CN107608773B (en) Task concurrent processing method and device and computing equipment
US7418546B2 (en) Storage resource management method for storage system
US10013312B2 (en) Method and system for a safe archiving of data
US20120259863A1 (en) Low Level Object Version Tracking Using Non-Volatile Memory Write Generations
US8015164B2 (en) Information processing apparatus and information processing method
US20160364407A1 (en) Method and Device for Responding to Request, and Distributed File System
JP4916892B2 (en) Log information management system and method for transaction processing
CN109669622B (en) File management method, file management device, electronic equipment and storage medium
WO2016014368A1 (en) High throughput data modifications using blind update operations
CN110399333B (en) Method, apparatus and computer program product for deleting snapshots
US10509767B2 (en) Systems and methods for managing snapshots of a file system volume
CN109669621B (en) File management method, file management system, electronic device and storage medium
CN109086141B (en) Memory management method and device and computer readable storage medium
CN108984295B (en) Memory recovery method, computer device and computer readable storage medium
CN112328549A (en) Small file storage method, electronic device and storage medium
KR20080104815A (en) Apparatus and method for processing data in nonvolatile memory
CN107172152B (en) Statistical quota system and method based on CEPH cluster CAP mechanism
CN111399753A (en) Method and device for writing pictures
CN114238162B (en) Garbage recycling method and device, readable storage medium and electronic equipment
US20120185451A1 (en) Data processing method and system for database management system
CN112346864A (en) Cloud space recovery method and recovery equipment
CN113836051B (en) A metadata space recovery method, device, device and storage medium
CN115344539B (en) Log space recovery method and device for distributed database

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 518000 room 3801, block a, block 8, block C, Wanke Yuncheng phase III, Liuxin 4th Street, Xili community, Xili street, Nanshan District, Shenzhen City, Guangdong Province (37-39 floors)

Applicant after: Carlette cloud Technology Co.,Ltd.

Address before: 518000 room 3801, block a, block 8, block C, Wanke Yuncheng phase III, Liuxin 4th Street, Xili community, Xili street, Nanshan District, Shenzhen City, Guangdong Province (37-39 floors)

Applicant before: COLORLIGHT (SHENZHEN) CLOUD TECHNOLOGY Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210209

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载