CN113778342B - Data storage method and related equipment thereof - Google Patents

Data storage method and related equipment thereof Download PDF

Info

Publication number
CN113778342B
CN113778342B CN202111091955.9A CN202111091955A CN113778342B CN 113778342 B CN113778342 B CN 113778342B CN 202111091955 A CN202111091955 A CN 202111091955A CN 113778342 B CN113778342 B CN 113778342B
Authority
CN
China
Prior art keywords
storage area
data
storage
target data
target
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
CN202111091955.9A
Other languages
Chinese (zh)
Other versions
CN113778342A (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.)
Tubatu Group Co Ltd
Original Assignee
Tubatu Group 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 Tubatu Group Co Ltd filed Critical Tubatu Group Co Ltd
Priority to CN202111091955.9A priority Critical patent/CN113778342B/en
Publication of CN113778342A publication Critical patent/CN113778342A/en
Application granted granted Critical
Publication of CN113778342B publication Critical patent/CN113778342B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on 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/0614Improving the reliability of 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/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 embodiment of the application discloses a data storage method, which comprises the following steps: dividing a target storage area to obtain a first storage area and a second storage area; storing the service data to a first storage area; judging whether the first storage area is in a full load state or not; if the first storage area is in a full load state, determining first target data in the service data; the first target data is copied to the second storage area. From the above technical solutions, the embodiments of the present application have the following advantages: judging whether the first storage area is in a full-load state or not; and if the first storage area is in the full state, copying the first target data to the second storage area. The target storage areas can be used in a layered mode, when one storage level reaches a full-load state, partial data in the target storage areas are extracted and transferred to the other storage area, so that the data are more organized in the actual use process, and the utilization efficiency of the storage space is improved.

Description

Data storage method and related equipment thereof
Technical Field
The application belongs to the field of data processing, and particularly relates to a data storage method and related equipment thereof.
Background
With the continuous development of science and technology, the network data volume is increasingly proliferated, and the exponential level explosion is increased, so that the computer is the basis of the internet, a large amount of computers are needed to calculate the internet, a large amount of data can be generated by the calculation, and a large amount of data needs space to be stored. The storage space of the computer is various, such as a disk, a memory, a network storage mode and the like, however, the current computer has limited storage space, so that the situation that data are too much and cannot be stored is easy to cause.
The existing data storage mode mainly comprises the step of storing mass data specially by arranging a large database, wherein the data storage mode can meet the requirement of high storage capacity of the mass data by the large database, but common service data and important data are still stored in the same space together, and the storage space is disordered to use.
Disclosure of Invention
The invention aims to provide a data processing method, which aims to solve the problem that the conventional general service data and important data are still stored in the same space together.
The data storage method provided by the application comprises the following steps:
dividing a target storage area to obtain a first storage area and a second storage area;
storing service data to the first storage area;
judging whether the first storage area is in a full load state or not;
if the first storage area is in a full-load state, determining first target data in the service data;
copying the first target data to the second storage area.
Based on the data storage method provided in the first aspect of the embodiment of the present application, optionally, the method further includes:
dividing the second storage area to obtain a first sub storage area and a second sub storage area;
the storing the first target data in the second storage area includes:
copying the first target data to the first sub-storage area;
judging whether the first sub storage area is in a full load state or not;
if the first sub storage area is in a full-load state, determining to obtain second target data from the first target data;
copying the second target data to the second sub storage area.
Based on the data storage method provided in the first aspect of the embodiment of the present application, optionally, the determining first target data in the service data includes:
and determining the data called by the current thread in the service data as the first target data.
Based on the data storage method provided in the first aspect of the embodiment of the present application, optionally, the determining, in the first target data, to obtain second target data includes:
and determining the data called by the current thread in the first target data as the second target data.
Based on the data storage method provided in the first aspect of the embodiment of the present application, optionally, the determining whether the first storage area is in a full state includes:
judging whether the data quantity stored in the first storage area reaches a first preset range or not;
and if the data quantity stored in the first storage area reaches a first preset range, determining that the first storage area is in a full-load state.
Based on the data storage method provided in the first aspect of the embodiment of the present application, optionally, the method further includes:
and emptying the first storage area.
A second aspect of embodiments of the present application provides a data storage device, including:
the dividing unit is used for dividing the target storage area to obtain a first storage area and a second storage area;
a storage unit, configured to store service data in the first storage area;
the judging unit is used for judging whether the first storage area is in a full-load state or not;
the determining unit is used for determining first target data in the service data if the first storage area is in a full state;
and the copying unit is used for copying the first target data to the second storage area.
Based on the data storage device provided in the second aspect of the embodiments of the present application, optionally,
the dividing unit is further configured to: dividing the second storage area to obtain a first sub storage area and a second sub storage area;
the copying unit is specifically used for: copying the first target data to the first sub-storage area;
judging whether the first sub storage area is in a full load state or not;
if the first sub storage area is in a full-load state, determining to obtain second target data from the first target data;
copying the second target data to the second sub storage area.
Based on the data storage device of the second aspect of the embodiments of the present application, optionally,
the determining unit is specifically configured to: and determining the data called by the current thread in the first target data as the second target data.
Based on the data storage device of the second aspect of the embodiments of the present application, optionally,
the judging unit is specifically configured to: judging whether the data quantity stored in the first storage area reaches a first preset range or not;
and if the data quantity stored in the first storage area reaches a first preset range, determining that the first storage area is in a full-load state.
Based on the data storage device of the second aspect of the embodiments of the present application, optionally,
the copy unit is further configured to: and emptying the first storage area.
According to a third aspect of embodiments of the present application, there is provided a data storage device comprising:
the device comprises a central processing unit, a memory, an input/output interface, a wired or wireless network interface and a power supply;
the memory is a short-term memory or a persistent memory;
the central processor is configured to communicate with the memory and to execute instruction operations in the memory on the data storage device to perform the method of any of the first aspects of the embodiments of the present application.
A fourth aspect of the embodiments provides a computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform a method according to any of the first aspects of the embodiments of the application.
A fifth aspect of the embodiments of the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method according to any one of the first aspects of the embodiments of the present application.
From the above technical solutions, the embodiments of the present application have the following advantages: according to the scheme, a first storage area and a second storage area are obtained by dividing a target storage area; storing service data to the first storage area; judging whether the first storage area is in a full load state or not; if the first storage area is in a full-load state, determining first target data in the service data; copying the first target data to the second storage area. The target storage areas can be used in a layered mode, when one storage level reaches a full-load state, partial data in the target storage areas are extracted and transferred to the other storage area, so that the data are more organized in the actual use process, and the utilization efficiency of the storage space is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
FIG. 1 is a schematic flow chart of an embodiment of a data storage method provided in the present application;
FIG. 2 is a schematic flow chart of another embodiment of a data storage method provided in the present application;
FIG. 3 is a schematic diagram of an embodiment of a data storage device according to the present application;
FIG. 4 is another schematic diagram of an embodiment of a data storage device provided herein.
Detailed Description
In order to better understand the embodiments of the present application, the following description will clearly and completely describe the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
With the continuous development of science and technology, the network data volume is increasingly proliferated, and the exponential level explosion is increased, so that the computer is the basis of the internet, a large amount of computers are needed to calculate the internet, a large amount of data can be generated by the calculation, and a large amount of data needs space to be stored. The storage space of the computer is various, such as a disk, a memory, a network storage mode and the like, however, the current computer has limited storage space, so that the situation that data are too much and cannot be stored is easy to cause. The existing data storage mode mainly comprises the step of storing mass data specially by arranging a large database, wherein the data storage mode can meet the requirement of high storage capacity of the mass data by the large database, but general service data and important data are still stored in the same space together, and the fundamental problem that the data storage needs a large space is not solved.
In order to solve the above-mentioned problems, the present application proposes a new data storage method, and referring to fig. 1, an embodiment of the data storage method provided in the present application includes: steps 101-105.
101. And dividing the target storage area.
Specifically, the target storage area is divided to obtain a first storage area and a second storage area, wherein the target storage area is an area for storing data normally, and can be storage spaces in the forms of a magnetic disk, a memory, network storage and the like according to different devices to which the target storage space belongs, and the form of the specific target storage area can be determined according to actual conditions and is not limited herein. The first storage area and then the second storage area are virtually divided, for example, the target storage area shares 12GB (Gigabyte) of data storage, and accordingly, the first storage area may be divided into a first storage area occupying 8GB of space and a second storage area occupying 4GB of space, it may be understood that the dividing rule adopted in the dividing process may depend on the actual situation, specifically, for example, the storage space occupied by the first storage area and the storage space occupied by the second storage area may be divided evenly, or the storage space occupied by the first storage area and the second storage area may be allocated according to a certain proportion, and meanwhile, in order to ensure the operation effect of the computer, the storage space occupied by the first storage area and the second storage area may be integrated to be smaller than the total storage space of the target storage area, for example, the target storage area shares 12GB of data, the first storage area may be divided into the first storage area occupying 8GB of space and the second storage area occupying 2GB of space, and the other 2GB of space may be used for coping with other possible use requirements, and the specific target storage area may be divided according to the actual situation herein.
102. And storing the service data in the first storage area.
Specifically, the service data is stored in the first storage area. The service data is data generated in the normal operation process of the device where the target storage space is located, the type of the device can be personal terminal devices such as a mobile phone and a tablet personal computer used by a user, or can be devices such as a server or a computer, and the service data can be specific according to actual conditions and is not limited herein. The type of the service data may depend on the actual situation, such as log data, user data, setting data, etc., and the specific type of the service data may depend on the actual situation, which is not limited herein. The service data is generated due to data operation to record related information generated during the operation of the device. The service data may be generated by an application running on the device for supporting the user's use requirements, such as loading data that is required when the audiovisual application loads the corresponding video or audio. Under normal conditions, the amount of service data generated by the application program is smaller, and accumulation of service data generated by running different application programs over time may cause that the data storage space of the first storage area cannot meet the storage requirement of the service data, so that the judgment needs to be performed, that is, step 103 is executed, to judge whether the first storage area is in a full-load state.
103. And judging whether the first storage area is in a full-load state or not.
Specifically, the judging criterion for judging whether the first storage area is in the full state or not may be determined according to the actual situation, in general, whether the data amount stored in the first storage area reaches the data amount of the storage space of the first storage area may be defined, however, this manner easily causes that some data generated in the critical state cannot be stored in the first storage space, resulting in a certain use problem, so that the judging may be performed by judging whether the data amount stored in the first storage area meets a certain condition, if the data amount stored in the first storage space reaches 90%, it is determined that the first storage area reaches the full state, so as to ensure a certain redundancy. The specific full load condition determination criteria may depend on the actual situation, and are not limited herein. If the first storage area is in the full state, it is indicated that the first storage area has reached the storage limit, and step 104 is executed to determine the first target data from the service data. If the first storage area does not reach the full-load state, the first storage area can be used continuously without executing other steps, or the step can be executed again, so that the state of the first storage area can be monitored in real time. Specifically, the present step may be performed at a certain time interval, which may be specific to the actual situation, and is not limited herein.
104. First target data is determined in the service data.
Specifically, the first target data is determined in the service data, where the first target data is the data with higher value and more important in the service data, and the determining rule of the first target data may be based on the actual situation, for example, the data type is used as the judging basis of the first target data, for example, the cache data generated by the application program is defined as non-first target data, the error record data generated by the recording of the operation failure of the application program is defined as first target data, and the first target data included in the service data is determined according to the rule.
It will be appreciated that in the actual implementation of the present embodiment, the rule for determining the first target data may be adjusted according to the actual situation, for example, determining the first target data according to the formation time of the service data, for example, determining the service data generated in eight to sixteen o' clock as the first target data, determining the service data generated in other time periods as the non-first target data, and the rule for determining the specific first target data may be determined according to the actual situation, which is not limited herein.
105. Copying the first target data to the second storage area.
Specifically, the first target data is copied to the second storage area, the first target data determined by the steps is copied and stored to the second storage area, so that the data stored in the second storage area is important data, and the feasibility of the scheme is further improved.
After the step is executed, the important first target data stored in the first storage area are backed up in the second storage space, so that the first storage space can be emptied, and service data can be written in the first storage space again, thereby enabling the storage space utilization rate to be higher.
From the above technical solutions, the embodiments of the present application have the following advantages: according to the scheme, a first storage area and a second storage area are obtained by dividing a target storage area; storing service data to the first storage area; judging whether the first storage area is in a full load state or not; if the first storage area is in a full-load state, determining first target data in the service data; copying the first target data to the second storage area. The target storage areas can be used in a layered mode, when one storage level reaches a full-load state, partial data in the target storage areas are extracted and transferred to the other storage area, so that the data are more ordered in the actual use process, the situation that useless data occupy a large storage space is avoided, and the utilization efficiency of the storage space is improved.
Based on the embodiment provided in fig. 1, the present application optionally further provides a more detailed embodiment of an alternative implementation, and in particular, referring to fig. 2, an embodiment of a data storage method provided in the present application includes: step 201-step 210.
201. And dividing the target storage area.
Specifically, the target storage area is divided to obtain the first storage area and the second storage area, and the implementation manner of this step is similar to that of step 101 in the foregoing embodiment corresponding to fig. 1, which is not described herein in detail.
202. And storing the service data in the first storage area.
Specifically, the method for storing the service data in the first storage area is similar to the method for executing step 102 in the corresponding embodiment of fig. 1, which is not described herein.
203. And judging whether the data quantity stored in the first storage area reaches a first preset range.
Specifically, it is determined whether the amount of data stored in the first storage area reaches a first preset range. The size of the first preset range can be determined according to practical situations, if 90% of the first storage area is set as a critical value, if the data amount stored in the first storage area reaches or exceeds 90% of the first storage area, the data amount stored in the first storage area is determined to reach the first preset range, a certain margin is reserved in the use of the first storage area through limiting the preset range of the first storage area, the feasibility of the scheme is further improved, the usability of the scheme is ensured, and it is understood that the value of the first preset range set in the practical implementation process of the scheme can be determined according to practical situations and is not limited.
204. And determining the data called by the current thread in the service data as the first target data.
Specifically, the data called by the current thread in the service data is determined to be the first target data, that is, the data called by the current thread in the service data indicates that the data supports the sign operation of the current application program or service, which has an important role, so that the data can be determined to be the first target data. It should be understood that the rule for determining the first target data may be determined according to the actual situation, for example, the data type is used as a criterion for determining the first target data, for example, the cache data generated by the application is defined as non-first target data, the error record data generated by the recording of the operation failure of the application is defined as first target data, and the first target data included in the service data is determined according to the rule.
205. And dividing the second storage area.
Specifically, the second storage area is divided to obtain a first sub storage area and a second sub storage area, and the dividing rule of the first sub storage area and the second sub storage area is similar to the dividing rule of the first storage area and the second storage area, which can be specifically described in step 101 in the corresponding embodiment of fig. 1 and will not be described herein.
207. And copying the first target data to the first sub storage area.
Specifically, the first target data is copied to the first sub-storage area. The data stored in the first sub-storage area in the second storage area is more important data, so that the feasibility of the scheme is improved. After the step is executed, the important first target data stored in the first storage area are backed up in the first sub-storage area in the second storage space, so that the first storage space can be emptied, and the writing service data can be written in the first storage space again, thereby enabling the storage space utilization rate to be higher.
205. And emptying the first storage area.
Specifically, the first storage area is emptied, so that the storage space of the first storage area is recycled, and because the first target data which is stored in the first storage area and is called by the current thread is backed up in the first sub-storage area in the second storage space, the first storage area is emptied, the current running thread cannot be influenced, the feasibility of the scheme is further ensured, after the first storage area is emptied, newly generated service data can be stored in the first storage area again, the normal storage of the newly generated service data is further ensured, and the utilization efficiency of the storage space is further improved.
208. And judging whether the first sub storage area is in a full state or not.
Specifically, it is determined whether the first sub storage area is in a full state. The criterion for determining whether the first sub-storage area is in the full-load state may be determined according to the actual situation, in general, whether the data amount stored in the first sub-storage area reaches the data amount of the storage space of the first sub-storage area may be defined, however, this manner may easily cause that some data generated in the critical state cannot be stored in the first sub-storage area, resulting in a certain use problem, so that the criterion may be used for determining whether the data amount stored in the first sub-storage area satisfies a certain condition, if the data amount stored in the first storage area reaches 90%, it is determined that the first sub-storage area reaches the full-load state, so as to ensure a certain redundancy. The specific full load condition determination criteria may depend on the actual situation, and are not limited herein. If the first sub storage area is in the full state, it is indicated that the first storage area has reached the storage limit, and step 209 is executed to determine the second target data from the first target data. If the judging result is that the first sub storage area does not reach the full state, the first sub storage area can be used continuously without executing other steps, or the step can be executed again, so that the state of the first sub storage area can be monitored in real time. Specifically, the present step may be performed at a certain time interval, which may be specific to the actual situation, and is not limited herein.
209. Second target data is determined in the first target data.
Specifically, second target data is determined in the first target data. The second target data is more important than the first target data, and the determination rule of the second target data may be determined according to the actual situation, for example, the data type is used as the judgment basis of the second target data. The specific rule for determining the second target data may depend on the actual situation, and is not limited herein.
210. And copying the second target data to the second sub storage area.
Specifically, the second target data is copied to the second sub-storage area, the second target data determined by the steps is copied and stored to the second sub-storage area, so that the data stored in the second sub-storage area is important data, and the feasibility of the scheme is further improved.
After the step is executed, the important second target data stored in the first sub-storage area are backed up in the second sub-storage space, so that the first sub-storage space can be emptied, and the data can be written in the first sub-storage space again, thereby enabling the storage space utilization rate to be higher.
It will be appreciated that the storage space may be further divided in the second sub-storage area, and the data may be stored in a classified manner according to the processing logic from step 205 to step 210, so as to improve the use efficiency of the storage space while storing important data.
From the above technical solutions, the embodiments of the present application have the following advantages: according to the scheme, a first storage area and a second storage area are obtained by dividing a target storage area; storing service data to the first storage area; judging whether the first storage area is in a full load state or not; if the first storage area is in a full-load state, determining first target data in the service data; copying the first target data to the second storage area. The target storage areas can be used in a layered mode, when one storage level reaches a full-load state, partial data in the target storage areas are extracted and transferred to the other storage area, so that the data are more ordered in the actual use process, the situation that useless data occupy a large storage space is avoided, and the utilization efficiency of the storage space is improved.
The foregoing embodiment describes a data storage method provided by the present application, and the following describes a data storage device provided by the present application, referring to fig. 3, one embodiment of the data storage method provided by the present application includes:
a dividing unit 301, configured to divide a target storage area to obtain a first storage area and a second storage area;
a storage unit 302, configured to store service data in the first storage area;
a judging unit 303, configured to judge whether the first storage area is in a full state;
a determining unit 304, configured to determine first target data in the service data if the first storage area is already in a full state;
and a copying unit 305, configured to copy the first target data to the second storage area.
Optionally, the dividing unit 301 is further configured to: dividing the second storage area to obtain a first sub storage area and a second sub storage area;
the copying unit is specifically used for: copying the first target data to the first sub-storage area;
judging whether the first sub storage area is in a full load state or not;
if the first sub storage area is in a full-load state, determining to obtain second target data from the first target data;
copying the second target data to the second sub storage area.
Optionally, the determining unit 304 is specifically configured to: and determining the data called by the current thread in the first target data as the second target data.
Optionally, the determining unit 303 is specifically configured to: judging whether the data quantity stored in the first storage area reaches a first preset range or not;
and if the data quantity stored in the first storage area reaches a first preset range, determining that the first storage area is in a full-load state.
Optionally, the replication unit 305 is further configured to: and emptying the first storage area.
In this embodiment, the flow executed by each unit in the data storage device is similar to the flow of the method described in the embodiment corresponding to fig. 1 or fig. 2, and will not be repeated here.
Fig. 4 is a schematic structural diagram of a data storage device according to an embodiment of the present application, where the data storage device 400 may include one or more central processing units (central processing units, CPU) 401 and a memory 405, and one or more application programs or data are stored in the memory 405.
In this embodiment, the specific function module division in the cpu 401 may be similar to the function module division of each unit described in fig. 3, and will not be repeated here.
Wherein the memory 405 may be volatile storage or persistent storage. The program stored in memory 405 may include one or more modules, each of which may include a series of instruction operations on a server. Still further, the central processor 401 may be arranged to communicate with the memory 405, and execute a series of instruction operations in the memory 405 on the server 400.
The data storage device 400 may also include one or more power supplies 402, one or more wired or wireless network interfaces 403, one or more input/output interfaces 404, and/or one or more operating systems, such as Windows ServerTM, mac OS XTM, unixTM, linuxTM, freeBSDTM, etc.
The cpu 401 may perform the operations performed by the data storage method in the embodiment shown in fig. 1, and will not be described herein.
The embodiments of the present application also provide a computer storage medium for storing computer software instructions for use with the above-described data storage method, including a program for executing the program designed for the data storage method.
The data storage method may be as described in the foregoing fig. 1.
Embodiments of the present application also provide a computer program product comprising computer software instructions that can be loaded by a processor to implement the flow of the data storage method of any of the above-described fig. 1-2.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., equivalent transformations of circuitry, partitioning of elements is merely one logical functional partitioning, and there may be additional partitioning aspects in actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not implemented. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, or alternatives falling within the spirit and principles of the invention.

Claims (9)

1. A method of data storage, comprising:
dividing a target storage area to obtain a first storage area and a second storage area;
storing service data to the first storage area;
judging whether the first storage area is in a full load state or not;
if the first storage area is in a full-load state, determining first target data in the service data;
copying the first target data to the second storage area;
dividing the second storage area to obtain a first sub storage area and a second sub storage area;
the copying the first target data to the second storage area includes:
copying the first target data to the first sub-storage area;
judging whether the first sub storage area is in a full load state or not;
if the first sub storage area is in a full-load state, determining to obtain second target data from the first target data;
copying the second target data to the second sub storage area.
2. The data storage method according to claim 1, wherein said determining first target data in said service data comprises:
and determining the data called by the current thread in the service data as the first target data.
3. The data storage method according to claim 1, wherein determining the second target data from the first target data comprises:
and determining the data called by the current thread in the first target data as the second target data.
4. The data storage method of claim 1, wherein the determining whether the first storage area is in a full state comprises:
judging whether the data quantity stored in the first storage area reaches a first preset range or not;
and if the data quantity stored in the first storage area reaches a first preset range, determining that the first storage area is in a full-load state.
5. The data storage method of claim 1, wherein the method further comprises:
and emptying the first storage area.
6. A data storage device, comprising:
the dividing unit is used for dividing the target storage area to obtain a first storage area and a second storage area;
a storage unit, configured to store service data in the first storage area;
the judging unit is used for judging whether the first storage area is in a full-load state or not;
the determining unit is used for determining first target data in the service data if the first storage area is in a full state;
a copying unit configured to copy the first target data to the second storage area;
the sub storage unit is used for dividing the second storage area to obtain a first sub storage area and a second sub storage area;
the copying the first target data to the second storage area includes:
copying the first target data to the first sub-storage area;
judging whether the first sub storage area is in a full load state or not;
if the first sub storage area is in a full-load state, determining to obtain second target data from the first target data;
copying the second target data to the second sub storage area.
7. A data storage device, comprising:
the device comprises a central processing unit, a memory, an input/output interface, a wired or wireless network interface and a power supply;
the memory is a short-term memory or a persistent memory;
the central processor is configured to communicate with the memory, to execute instruction operations in the memory on the data store to perform the method of any of claims 1 to 5.
8. A computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 5.
9. A computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any of claims 1 to 5.
CN202111091955.9A 2021-09-17 2021-09-17 Data storage method and related equipment thereof Active CN113778342B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111091955.9A CN113778342B (en) 2021-09-17 2021-09-17 Data storage method and related equipment thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111091955.9A CN113778342B (en) 2021-09-17 2021-09-17 Data storage method and related equipment thereof

Publications (2)

Publication Number Publication Date
CN113778342A CN113778342A (en) 2021-12-10
CN113778342B true CN113778342B (en) 2024-03-29

Family

ID=78851975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111091955.9A Active CN113778342B (en) 2021-09-17 2021-09-17 Data storage method and related equipment thereof

Country Status (1)

Country Link
CN (1) CN113778342B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108268211A (en) * 2017-01-03 2018-07-10 中国移动通信有限公司研究院 A kind of data processing method and device
CN111897487A (en) * 2020-06-15 2020-11-06 北京瀚诺半导体科技有限公司 Method, apparatus, electronic device and medium for managing data
CN112817520A (en) * 2020-12-31 2021-05-18 杭州宏杉科技股份有限公司 Data disk refreshing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009205333A (en) * 2008-02-27 2009-09-10 Hitachi Ltd Computer system, storage device, and data management method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108268211A (en) * 2017-01-03 2018-07-10 中国移动通信有限公司研究院 A kind of data processing method and device
CN111897487A (en) * 2020-06-15 2020-11-06 北京瀚诺半导体科技有限公司 Method, apparatus, electronic device and medium for managing data
CN112817520A (en) * 2020-12-31 2021-05-18 杭州宏杉科技股份有限公司 Data disk refreshing method and device

Also Published As

Publication number Publication date
CN113778342A (en) 2021-12-10

Similar Documents

Publication Publication Date Title
US10346079B2 (en) System and method for managing storage system snapshots
US10019183B2 (en) On-demand snapshot and prune in a data storage system
US20220137849A1 (en) Fragment Management Method and Fragment Management Apparatus
CN107807794B (en) Data storage method and device
CN100541411C (en) Redundant Array of Independent Disks system with high power and low-power disc driver
US8533417B2 (en) Method and apparatus for controlling data volume creation in data storage system with dynamic chunk allocation capability
CN105637470B (en) Method and computing device for dirty data management
CN107908571B (en) Data writing method, flash memory device and storage equipment
CN104885034A (en) Reducing power consumption of volatile memory via use of non-volatile memory
US8589647B2 (en) Apparatus and method for synchronizing a snapshot image
US7849264B2 (en) Storage area management method for a storage system
CN100517305C (en) Shadow paging
CN110688256A (en) Metadata power-on recovery method and device, electronic equipment and storage medium
US10996876B2 (en) Systems and methods for dynamically modifying memory namespace allocation based on memory attributes and application requirements
CN102576294B (en) Storage system and method comprising a plurality of storage devices
CN103631535A (en) Method and device for achieving space distribution in storage pool
CN113778342B (en) Data storage method and related equipment thereof
CN103677661A (en) Information processing apparatus and copy control method
US11966637B1 (en) Method and system for storing data in portable storage devices
CN109508140B (en) Storage resource management method and device, electronic equipment and system
CN113934360B (en) Multi-storage device lifecycle management system
US11983578B2 (en) Provisioning a computing subsystem including disaggregated hardware resources that comply with a power domain requirement for a workload
CN103685359A (en) Data processing method and device
CN107368315A (en) A kind of startup method and device of double hard disk dual systems
US11435796B2 (en) Power backup device charging system

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