CN113867643A - Data storage method, device, equipment and storage medium - Google Patents

Data storage method, device, equipment and storage medium Download PDF

Info

Publication number
CN113867643A
CN113867643A CN202111150771.5A CN202111150771A CN113867643A CN 113867643 A CN113867643 A CN 113867643A CN 202111150771 A CN202111150771 A CN 202111150771A CN 113867643 A CN113867643 A CN 113867643A
Authority
CN
China
Prior art keywords
capacity
data
storage space
space
management terminal
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
CN202111150771.5A
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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202111150771.5A priority Critical patent/CN113867643A/en
Publication of CN113867643A publication Critical patent/CN113867643A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides a data storage method, a data storage device and a storage medium. The data storage method comprises the following steps: receiving a write request, wherein the write request comprises data to be written and information of a user account; determining the capacity of the residual space in the first storage space bound with the user account based on the information of the user account; responding to the data volume of the data is larger than the capacity of the residual space, and allocating a second storage space for the user account; writing at least a portion of the data to the second storage space. According to the technical scheme provided by the embodiment of the disclosure, under the condition that the data volume of the data to be written is larger than the remaining space capacity of the first storage space bound with the user account, the user account allocates the second storage space for storing the data, and at least part of the data is stored in the second storage space, so that the problem that the data to be written cannot be stored due to insufficient capacity of the first storage space is avoided.

Description

Data storage method, device, equipment and storage medium
Technical Field
The embodiments of the present disclosure relate to the field of data storage technologies, and in particular, to a data storage method, apparatus, device, and storage medium.
Background
Based on cost consideration, a user purchases the cloud storage space quantitatively. As the business data is gradually accumulated in the cloud storage space, the remaining space capacity in the cloud storage space is gradually reduced. If the data volume needing to be written is larger than the capacity of the residual space, the problem that the written data cannot be stored is caused, and the image user service is normally developed.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, embodiments of the present disclosure provide a data storage method, apparatus, device and storage medium.
In a first aspect, an embodiment of the present disclosure provides a data storage method, including:
receiving a write request, wherein the write request comprises data to be written and information of a user account;
determining the capacity of the residual space in the first storage space bound with the user account based on the information of the user account;
responding to the fact that the data volume of the data to be written is larger than the capacity of the residual space, and distributing a second storage space for the user account;
writing at least part of the data to be written into the second storage space.
Optionally, the allocating a second storage space to the user account includes:
determining the distribution capacity according to the data volume of the data to be written;
and allocating the second storage space for the user account according to the allocation capacity.
Optionally, the method further comprises:
and responding to the data volume of the data to be written being larger than the capacity of the residual space, and sending a first capacity expansion prompt to a management terminal, wherein the first capacity expansion prompt comprises information that the capacity of the first storage space is insufficient, so as to prompt the management terminal to expand the capacity of the first storage space.
Optionally, before sending the first capacity expansion prompt to the management terminal, the method further includes:
acquiring historical change data of the residual space capacity of the first storage space;
determining a recommended extended capacity based on the historical change data;
the sending of the first capacity expansion prompt to the management terminal includes: and adding the recommended expanded capacity into the first capacity expansion prompt and sending the first capacity expansion prompt to the management terminal.
Optionally, the sending the first capacity expansion prompt to the management terminal further includes:
and adding the historical change data into the first capacity expansion prompt and sending the first capacity expansion prompt to the management terminal.
Optionally, after the sending the first capacity expansion prompt to the management terminal, the method further includes:
receiving a capacity expansion instruction sent by the management terminal, wherein the capacity expansion instruction comprises information of expansion capacity allocated to the first storage space;
expanding the capacity of the first storage space based on the information of the expanded capacity;
and transferring the data written into the second storage space into the first storage space with expanded capacity.
Optionally, the method further includes, in response to that the capacity of the remaining space is smaller than a preset capacity threshold, sending a second capacity expansion prompt to the management terminal to prompt the management terminal to expand the capacity of the first storage space.
In a second aspect, the present disclosure provides a data storage device, including:
the device comprises a request receiving unit, a writing unit and a writing unit, wherein the request receiving unit is used for receiving a writing request which comprises data to be written and information of a user account;
the residual capacity calculation unit is used for determining the capacity of the residual space in the first storage space bound with the user account based on the information of the user account;
the space allocation unit is used for responding to the situation that the data volume of the data to be written is larger than the capacity of the residual space, and allocating a second storage space for the user account;
and the storage unit is used for writing at least part of the data to be written into the second storage space.
Optionally, the space allocation unit comprises:
a capacity determining subunit, configured to determine a distribution capacity according to the data amount of the data to be written;
and the component allocation subunit is used for allocating the second storage space to the user account according to the allocation capacity.
Optionally, the apparatus further comprises: and the first prompting unit is used for responding to the situation that the data volume of the data to be written is larger than the capacity of the residual space, and sending a first capacity expansion prompt to a management terminal, wherein the first capacity expansion prompt comprises information that the capacity of the first storage space is insufficient, so as to prompt the management terminal to expand the capacity of the first storage space.
Optionally, the apparatus further comprises: a history data acquisition unit configured to acquire history change data of a remaining space capacity of the first storage space;
a recommended capacity calculation unit for determining a recommended extended capacity based on the historical change data;
the first prompting unit is used for adding the recommended expanded capacity into the first capacity expansion prompt and sending the first capacity expansion prompt to the management terminal.
Optionally, the first prompting unit is further configured to add the historical change data to the first capacity expansion prompt and send the first capacity expansion prompt to the management terminal.
Optionally, the apparatus further comprises:
the instruction receiving unit is used for receiving a capacity expansion instruction sent by the management terminal, and the capacity expansion instruction comprises information of expansion capacity allocated to the first storage space;
a capacity expansion unit configured to expand a capacity of the first storage space based on the information of the expanded capacity;
optionally, the apparatus further comprises: and the second prompting unit is used for responding to the situation that the capacity of the residual space is smaller than a preset capacity threshold value, and sending a second capacity expansion prompt to the management terminal so as to prompt the management terminal to expand the capacity of the first storage space. .
In a third aspect, the present disclosure provides a computer device comprising:
a memory and a processor, wherein the memory has stored therein a computer program which, when executed by the processor, implements the method as previously described.
In a fourth aspect, the present disclosure provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method as described above.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
according to the technical scheme provided by the embodiment of the disclosure, after the write-in request is obtained, the capacity of the first storage space bound with the user account is determined according to the information of the user account in the write-in request, and under the condition that the data volume of the data to be written is larger than the remaining space capacity of the first storage space bound with the user account, the second storage space used for storing the data is allocated for the user account, and at least part of the data to be written is stored in the second storage space, so that the problem that the data to be written cannot be stored due to the fact that the capacity of the first storage space is insufficient is avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a flow chart of a data storage method provided by some embodiments of the present disclosure;
FIG. 2 is a flow chart of a data storage method provided by another embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of a data storage device provided in some embodiments of the present disclosure;
fig. 4 is a schematic structural diagram of a computer device provided in an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
Fig. 1 is a flowchart of a data storage method provided by some embodiments of the present disclosure. As shown in FIG. 1, in some embodiments of the present disclosure, a data storage method includes steps S101-S104. It should be noted that the data storage method is performed by a storage server capable of implementing a data storage function.
S101: and receiving a write request, wherein the write request comprises data to be written and information of a user account.
S102: based on the information of the user account, the capacity of the remaining space in the first storage space bound with the user account is determined.
The write request is a request for writing data into the storage server, which is transmitted from the user terminal having the write authority. The write request includes data to be written and information of the user account. The first storage space is a storage space purchased by a user and used for storing business data. The first storage space is bound to a user account.
In some embodiments of the present disclosure, the storage server may store information of the user account, a capacity of the first storage space bound to the user account, and a capacity of a used space in the first storage space in advance. After obtaining the information of the user account, the storage server inquires the capacity of the first storage space and the capacity of the used space based on the information of the user account, and determines the capacity of the remaining space according to the capacity of the first storage space and the capacity of the used space.
S103: and responding to the data volume of the data to be written being larger than the capacity of the residual space, and allocating a second storage space for the user account.
S104: at least part of the data to be written is written into the second storage space.
After obtaining the capacity of the remaining space in the first storage space, the storage server compares the data amount of the data to be written with the size of the capacity of the remaining space.
And if the data volume of the data to be written is larger than the capacity of the residual space, determining that the data to be written cannot be completely stored in the first storage space. In this case, the storage server allocates a second storage space for the user account, and writes at least part of the data to be written into the second storage space, so as to implement storage of the data to be written.
And if the data quantity of the data to be written is less than the capacity of the residual space, determining that the data to be written can still be stored in the first storage space. In this case, the entire data to be written is directly stored into the first storage space.
According to the data storage method provided by the embodiment of the disclosure, after the write-in request is obtained, the capacity of the first storage space bound with the user account is determined according to the information of the user account in the write-in request, and under the condition that the data volume of the data to be written in is larger than the remaining space capacity of the first storage space bound with the user account, the user account allocates the second storage space for storing the data, and at least part of the data is stored in the second storage space, so that the problem that the data to be written in cannot be stored due to the fact that the capacity of the first storage space is insufficient is avoided.
In some embodiments of the present disclosure, allocating the second storage space for the user account in step S103 may specifically include steps S1031 to S1032.
S1031: and determining the allocation capacity according to the data volume of the data to be written.
S1032: and allocating a second storage space for the user account according to the allocated capacity.
In a specific implementation, the step S1031 may determine the allocation capacity according to the data amount of the data in the following two cases.
In the first case, the storage server may use the amount of data to be written as the allocated capacity. In this case, the storage capacity of the second storage space is the same as the data amount of the data to be written. Correspondingly, the storage server may directly write all the data to be written into the second storage space when executing step S104.
In the second case, the storage server may calculate a difference between the data amount of the data to be written and the remaining space capacity, and take the difference as the allocated capacity. In this case, the storage capacity of the second storage space is smaller than the data amount of the data to be written, and the storage server writes only a part of the data to be written into the second storage space.
In the foregoing embodiment, the storage server allocates the second storage space to the user account according to the data volume of the data to be written. In some other disclosed embodiments, step S103 may further allocate a second storage space for the user account according to a preset capacity limit in the storage server.
Fig. 2 is a flowchart of a data storage method according to another embodiment of the present disclosure. As shown in FIG. 2, in some other embodiments of the present disclosure, a data storage method includes steps S201-S206.
S201: receiving a write request, wherein the write request comprises data to be written and information of a user account;
s202: determining the capacity of the residual space in the first storage space bound with the user account based on the information of the user account;
s203: judging whether the data volume of the data to be written is larger than the capacity of the residual space; if yes, executing steps S204 and S205; if not, go to S206.
S204: and allocating a second storage space for the user account, and writing at least part of the data to be written into the second storage space.
S205: and sending a first capacity expansion prompt to the management terminal, wherein the first capacity expansion prompt comprises information that the capacity of the first storage space is insufficient.
S206: and writing the data into the first storage space.
In the embodiment of the present disclosure, the specific implementation process of steps S201 to S204 may refer to the description of steps S101 to S104, and the following mainly analyzes steps S205 and S206.
In the embodiment of the present disclosure, the management terminal is a terminal for the capacity of the first storage space bound with the user account.
The storage server may determine that the first storage space capacity bound to the user account is insufficient if the data amount of the data to be written is greater than the capacity of the remaining space. At this time, the storage server generates a first capacity expansion prompt, adds the information that the capacity of the first storage space is insufficient to the first capacity expansion prompt, and sends the first capacity expansion prompt to the management terminal so as to prompt the management terminal to expand the capacity of the first storage space.
In some embodiments of the present disclosure, the second storage space may be a temporary storage space allocated for a user account. The second storage space has a preset life cycle (for example, it may be a week or a month), and after the storage duration of the second storage space reaches the preset life cycle, the second storage space will be recovered by the storage server, and the data stored in the second storage space will be deleted.
In order to prompt the user to expand the capacity of the first storage space as soon as possible, the first capacity expansion prompt sent to the user may further include information prompting the user that part of the data is only temporarily stored in the second storage space, so as to inform the user that there is a risk of losing the data when the first storage space is not expanded in time.
In the embodiment of the present disclosure, if the data amount of the data to be written is smaller than the capacity of the remaining space, it indicates that the first storage space can also store the data to be written, and the data to be written may be directly written into the first storage space.
In some embodiments of the present disclosure, the data storage method may further include steps S207-S208 before performing step S205, in addition to the aforementioned steps S201-S206.
S207: historical change data of the remaining space capacity of the first storage space is acquired.
S208: based on the historical change data, a recommended extended capacity is determined.
On the basis that the data storage method includes steps S207 and S208, step S205 may include step S2051: and adding the recommended expanded capacity into the first capacity expansion prompt and sending the first capacity expansion prompt to the management terminal.
By adopting the method provided by the embodiment of the disclosure, the storage server can calculate the recommended capacity expansion capacity based on the historical change data of the capacity of the residual space in the first storage space and send the recommended capacity expansion capacity to the management terminal, so that the management terminal can display and output the recommended capacity expansion capacity, and then a reference is provided for the user to expand the capacity of the first storage space.
In some embodiments of the present disclosure, step S205 may further include, in addition to the aforementioned step S2051, step S2052: and adding the historical change data into the first capacity expansion prompt and sending the first capacity expansion prompt to the management terminal.
The historical change data is added in the first capacity expansion prompt and sent to the management terminal, so that the management terminal can output the historical change data, a user can know the change trend of the residual capacity in the first storage space according to the historical change data, and the expansion capacity is determined according to the change trend of the residual capacity in the first storage space.
In some embodiments of the present disclosure, after the foregoing step S205 is performed, the data storage method may further include steps S209 to S211.
S209: and receiving a capacity expansion instruction sent by the management terminal, wherein the capacity expansion instruction comprises information of the expansion capacity allocated to the first storage space.
S210: based on the information for expanding the capacity, the capacity of the first storage space is expanded.
After receiving the capacity expansion instruction sent by the management terminal, the storage server extracts the capacity expansion information in the expansion instruction, and modifies the capacity of the first storage space bound with the user account based on the capacity expansion information, so as to realize the capacity expansion of the first storage space.
S211: and transferring the data written into the second storage space to the first storage space with the expanded capacity.
After the capacity of the first storage space is expanded, the first storage space has enough residual capacity, and the data written into the second storage space can be transferred to the first storage space of the expanded capacity Huohu at the moment, so that the long-term storage of the data can be realized.
In some embodiments of the present disclosure, the method of storing data may further include, in addition to the aforementioned steps S201 to S211, a step S212 after the step S202: and sending a second capacity expansion prompt to the management terminal in response to the capacity of the residual space being smaller than a preset capacity threshold value so as to prompt the management terminal to expand the capacity of the first storage space.
The preset capacity threshold is a capacity threshold for determining whether the remaining space capacity in the first storage space is excessively small. If the residual space capacity in the first storage space is smaller than the capacity threshold, the residual space capacity is smaller, and at the moment, the storage server generates a second capacity expansion prompt to prompt the management terminal to expand the capacity of the first storage space in time, so that the problem that the normal storage service is influenced due to insufficient capacity is avoided.
In some embodiments of the present disclosure, before sending the second capacity expansion prompt to the management terminal, the recommended expansion capacity may be further calculated based on historical change data of the remaining capacity in the first storage space, and the recommended expansion capacity is added in the second capacity expansion prompt and sent to the management terminal; in some embodiments of the present disclosure, the storage server may further add the change trend of the remaining capacity in a second capacity expansion prompt to be sent to the management terminal, so that the management terminal outputs the historical change data, and then the user can know the change trend of the capacity of the first storage space according to the historical change data.
In addition to providing the foregoing data storage method, some embodiments of the present disclosure also provide a data storage device. Fig. 3 is a schematic structural diagram of a data storage device according to some embodiments of the present disclosure. The data storage 300 shown in fig. 3 may be understood as a part of the functional blocks in the aforementioned computer device.
As shown in fig. 3, in some embodiments of the present disclosure, the data storage apparatus 300 includes a request receiving unit 301, a remaining capacity calculating unit 302, a space allocating unit 303, and a storage unit 304.
The request receiving unit 301 is configured to receive a write request, where the write request includes data to be written and information of a user account. The remaining capacity calculating unit 302 is configured to determine a capacity of a remaining space in the first storage space bound to the user account based on the information of the user account. The space allocation unit 303 is configured to allocate a second storage space to the user account in response to that the data amount of the data to be written is greater than the capacity of the remaining space. The storage unit 304 is used for writing at least part of the data to be written into the second storage space.
In some embodiments of the present disclosure, the space allocation unit 303 includes a capacity determination subunit and a component allocation subunit. The capacity determining subunit is configured to determine the allocation capacity according to the data amount of the data to be written. And the component allocation subunit is used for allocating a second storage space to the user account according to the allocation capacity.
In some embodiments of the present disclosure, the data storage device further comprises a first prompting unit. The first prompting unit is used for responding to the fact that the data volume of the data to be written is larger than the capacity of the remaining space, and sending a first capacity expansion prompt to the management terminal, wherein the first capacity expansion prompt comprises information that the capacity of the first storage space is insufficient, so that the management terminal is prompted to expand the capacity of the first storage space.
In some embodiments of the present disclosure, the data storage device further includes a history data acquisition unit and a recommended capacity calculation unit. The historical data acquisition unit is used for acquiring historical change data of the residual space capacity of the first storage space; the recommended capacity calculation unit is used for determining recommended extended capacity based on historical change data. Correspondingly, the first prompting unit is used for adding the recommended expanded capacity into the first capacity expansion prompt and sending the first capacity expansion prompt to the management terminal.
In some embodiments of the present disclosure, the first prompting unit is further configured to add the history change data to the first capacity expansion prompt and send the first capacity expansion prompt to the management terminal.
In some embodiments of the present disclosure, the data storage device further includes an instruction receiving unit and a capacity expansion unit. The instruction receiving unit is used for receiving a capacity expansion instruction sent by the management terminal, and the capacity expansion instruction comprises information of the expansion capacity allocated to the first storage space. The capacity expansion unit is used for expanding the capacity of the first storage space based on the information for expanding the capacity.
In some embodiments of the present disclosure, the data storage device further includes a second prompting unit, configured to send a second capacity expansion prompt to the management terminal in response to the capacity of the remaining space being less than a preset capacity threshold, so as to prompt the management terminal to expand the capacity of the first storage space.
The embodiment of the present disclosure further provides a computer device, which includes a processor and a memory, where the memory stores a computer program, and when the computer program is executed by the processor, the data synchronization method of any of the above embodiments can be implemented.
For example, fig. 4 is a schematic structural diagram of a computer device provided in an embodiment of the present disclosure. Referring now in particular to fig. 4, there is shown a schematic block diagram of a computer device 400 suitable for use in implementing embodiments of the present disclosure. The computer device shown in fig. 4 is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
As shown in fig. 4, the computer device 400 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a read only memory ROM402 or a program loaded from a storage means 408 into a random access memory RAM 403. In the RAM403, various programs and data necessary for the operation of the computer apparatus 400 are also stored. The processing device 401, the ROM402, and the RAM403 are connected to each other via a bus 404. An input/output I/O interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the computer device 400 to communicate with other devices, either wirelessly or by wire, to exchange data. While fig. 4 illustrates a computer device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the computer device; or may exist separately and not be incorporated into the computer device.
The computer readable medium carries one or more programs which, when executed by the computing device, cause the computing device to: receiving a write request, wherein the write request comprises data to be written and information of a user account; determining the capacity of the residual space in the first storage space bound with the user account based on the information of the user account; responding to the fact that the data volume of the data to be written is larger than the capacity of the residual space, and allocating a second storage space for the user account; at least part of the data to be written is written into the second storage space.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection according to one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The embodiments of the present disclosure also provide a computer-readable storage medium, where a computer program is stored in the storage medium, and when the computer program is executed by a processor, the method of any of the above method embodiments can be implemented, and the execution manner and the beneficial effect are similar, and are not described herein again.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (16)

1. A method of storing data, comprising:
receiving a write request, wherein the write request comprises data to be written and information of a user account;
determining the capacity of the residual space in the first storage space bound with the user account based on the information of the user account;
responding to the fact that the data volume of the data to be written is larger than the capacity of the residual space, and distributing a second storage space for the user account;
writing at least part of the data to be written into the second storage space.
2. The method of claim 1, wherein the allocating the second storage space for the user account comprises:
determining the distribution capacity according to the data volume of the data to be written;
and allocating the second storage space for the user account according to the allocation capacity.
3. The method of claim 1, further comprising:
and responding to the data volume of the data to be written being larger than the capacity of the residual space, and sending a first capacity expansion prompt to a management terminal, wherein the first capacity expansion prompt comprises information that the capacity of the first storage space is insufficient, so as to prompt the management terminal to expand the capacity of the first storage space.
4. The method of claim 3, wherein before sending the first capacity augmentation cue to the management terminal, the method further comprises:
acquiring historical change data of the residual space capacity of the first storage space;
determining a recommended extended capacity based on the historical change data;
the sending of the first capacity expansion prompt to the management terminal includes: and adding the recommended expanded capacity into the first capacity expansion prompt and sending the first capacity expansion prompt to the management terminal.
5. The method of claim 4, wherein sending the first capacity augmentation prompt to the management terminal further comprises:
and adding the historical change data into the first capacity expansion prompt and sending the first capacity expansion prompt to the management terminal.
6. The method according to any one of claims 3-5, wherein after sending the first capacity expansion hint to the management terminal, further comprising:
receiving a capacity expansion instruction sent by the management terminal, wherein the capacity expansion instruction comprises information of expansion capacity allocated to the first storage space;
expanding the capacity of the first storage space based on the information of the expanded capacity;
and transferring the data written into the second storage space into the first storage space with expanded capacity.
7. The method of claim 1, further comprising,
and responding to the situation that the capacity of the residual space is smaller than a preset capacity threshold value, and sending a second capacity expansion prompt to the management terminal to prompt the management terminal to expand the capacity of the first storage space.
8. A data storage device, comprising:
the device comprises a request receiving unit, a writing unit and a writing unit, wherein the request receiving unit is used for receiving a writing request which comprises data to be written and information of a user account;
the residual capacity calculation unit is used for determining the capacity of the residual space in the first storage space bound with the user account based on the information of the user account;
the space allocation unit is used for responding to the situation that the data volume of the data to be written is larger than the capacity of the residual space, and allocating a second storage space for the user account;
and the storage unit is used for writing at least part of the data to be written into the second storage space.
9. The apparatus of claim 8, wherein the space allocation unit comprises:
a capacity determining subunit, configured to determine a distribution capacity according to the data amount of the data to be written;
and the component allocation subunit is used for allocating the second storage space to the user account according to the allocation capacity.
10. The apparatus of claim 8, further comprising:
and the first prompting unit is used for responding to the situation that the data volume of the data to be written is larger than the capacity of the residual space, and sending a first capacity expansion prompt to a management terminal, wherein the first capacity expansion prompt comprises information that the capacity of the first storage space is insufficient, so as to prompt the management terminal to expand the capacity of the first storage space.
11. The apparatus of claim 10, further comprising:
a history data acquisition unit configured to acquire history change data of a remaining space capacity of the first storage space;
a recommended capacity calculation unit for determining a recommended extended capacity based on the historical change data;
the first prompting unit is used for adding the recommended expanded capacity into the first capacity expansion prompt and sending the first capacity expansion prompt to the management terminal.
12. The apparatus of claim 10,
the first prompting unit is further configured to add the historical change data to the first capacity expansion prompt and send the first capacity expansion prompt to the management terminal.
13. The apparatus of any one of claims 10-12, further comprising:
the instruction receiving unit is used for receiving a capacity expansion instruction sent by the management terminal, and the capacity expansion instruction comprises information of expansion capacity allocated to the first storage space;
and the capacity expansion unit is used for expanding the capacity of the first storage space based on the information of the expanded capacity.
14. The apparatus of claim 8, further comprising:
and the second prompting unit is used for responding to the situation that the capacity of the residual space is smaller than a preset capacity threshold value, and sending a second capacity expansion prompt to the management terminal so as to prompt the management terminal to expand the capacity of the first storage space.
15. A computer device, comprising:
memory and a processor, wherein the memory has stored therein a computer program which, when executed by the processor, implements the method of any of claims 1-7.
16. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202111150771.5A 2021-09-29 2021-09-29 Data storage method, device, equipment and storage medium Pending CN113867643A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111150771.5A CN113867643A (en) 2021-09-29 2021-09-29 Data storage method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111150771.5A CN113867643A (en) 2021-09-29 2021-09-29 Data storage method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113867643A true CN113867643A (en) 2021-12-31

Family

ID=78992673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111150771.5A Pending CN113867643A (en) 2021-09-29 2021-09-29 Data storage method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113867643A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114968945A (en) * 2022-06-30 2022-08-30 重庆紫光华山智安科技有限公司 Data retention management method and device, storage medium and equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101201783A (en) * 2006-12-14 2008-06-18 英业达股份有限公司 Method for early warning insufficiency of memory space of network memory system
CN105653467A (en) * 2015-05-21 2016-06-08 宇龙计算机通信科技(深圳)有限公司 Storage space distribution method and apparatus
CN106790581A (en) * 2016-12-28 2017-05-31 深圳天珑无线科技有限公司 Application data processing method, device and terminal
CN107632791A (en) * 2017-10-10 2018-01-26 郑州云海信息技术有限公司 The distribution method and system of a kind of memory space
CN109407976A (en) * 2018-09-21 2019-03-01 联想(北京)有限公司 A kind of distributed storage method and distributed storage devices
US20190171384A1 (en) * 2017-12-06 2019-06-06 Western Digital Technologies, Inc. Data storage arrangement partitionable memory and method to accomplish partition
CN110134332A (en) * 2019-04-28 2019-08-16 平安科技(深圳)有限公司 A kind of date storage method and relevant apparatus
CN110300134A (en) * 2018-03-22 2019-10-01 杭州海康威视系统技术有限公司 Memory space method of adjustment, device and the cloud storage system of cloud storage resource pool
CN112565356A (en) * 2020-11-24 2021-03-26 北京百度网讯科技有限公司 Data storage method and device and electronic equipment
CN113127438A (en) * 2019-12-30 2021-07-16 北京百度网讯科技有限公司 Method, apparatus, server and medium for storing data

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101201783A (en) * 2006-12-14 2008-06-18 英业达股份有限公司 Method for early warning insufficiency of memory space of network memory system
CN105653467A (en) * 2015-05-21 2016-06-08 宇龙计算机通信科技(深圳)有限公司 Storage space distribution method and apparatus
CN106790581A (en) * 2016-12-28 2017-05-31 深圳天珑无线科技有限公司 Application data processing method, device and terminal
CN107632791A (en) * 2017-10-10 2018-01-26 郑州云海信息技术有限公司 The distribution method and system of a kind of memory space
US20190171384A1 (en) * 2017-12-06 2019-06-06 Western Digital Technologies, Inc. Data storage arrangement partitionable memory and method to accomplish partition
CN110300134A (en) * 2018-03-22 2019-10-01 杭州海康威视系统技术有限公司 Memory space method of adjustment, device and the cloud storage system of cloud storage resource pool
CN109407976A (en) * 2018-09-21 2019-03-01 联想(北京)有限公司 A kind of distributed storage method and distributed storage devices
CN110134332A (en) * 2019-04-28 2019-08-16 平安科技(深圳)有限公司 A kind of date storage method and relevant apparatus
CN113127438A (en) * 2019-12-30 2021-07-16 北京百度网讯科技有限公司 Method, apparatus, server and medium for storing data
CN112565356A (en) * 2020-11-24 2021-03-26 北京百度网讯科技有限公司 Data storage method and device and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114968945A (en) * 2022-06-30 2022-08-30 重庆紫光华山智安科技有限公司 Data retention management method and device, storage medium and equipment

Similar Documents

Publication Publication Date Title
CN110032447B (en) Method and apparatus for allocating resources
CN110391938B (en) Method and apparatus for deploying services
CN111459364B (en) Icon updating method and device and electronic equipment
CN110430142B (en) Method and device for controlling flow
CN110851139A (en) Method and device for checking codes and electronic equipment
CN111209306A (en) Business logic judgment method and device, electronic equipment and storage medium
CN111246228A (en) Method, device, medium and electronic equipment for updating gift resources of live broadcast room
CN110768861B (en) Method, device, medium and electronic equipment for obtaining overtime threshold
CN111580974A (en) GPU instance distribution method and device, electronic equipment and computer readable medium
CN115237589A (en) SR-IOV-based virtualization method, device and equipment
CN111597107A (en) Information output method and device and electronic equipment
CN110865846A (en) Application management method, device, terminal, system and storage medium
CN113867643A (en) Data storage method, device, equipment and storage medium
CN111163336A (en) Video resource pushing method and device, electronic equipment and computer readable medium
CN108205559B (en) Data management method and equipment thereof
CN110545313B (en) Message push control method and device and electronic equipment
CN111225255B (en) Target video push playing method and device, electronic equipment and storage medium
CN113127438B (en) Method, apparatus, server and medium for storing data
CN111857518A (en) Method and device for canceling image editing operation, electronic equipment and medium
CN115329179B (en) Data acquisition resource amount control method, device, equipment and storage medium
CN113660699A (en) Intelligent cluster networking method and device and electronic equipment
CN110619079B (en) Method and device for pushing information
CN113391882A (en) Virtual machine memory management method and device, storage medium and electronic equipment
CN112860439A (en) Application starting method and device, terminal and storage medium
CN112163176A (en) Data storage method and device, electronic equipment and computer readable medium

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