CN111475114A - Data downloading and refreshing system and method and computer readable storage medium - Google Patents

Data downloading and refreshing system and method and computer readable storage medium Download PDF

Info

Publication number
CN111475114A
CN111475114A CN202010259403.3A CN202010259403A CN111475114A CN 111475114 A CN111475114 A CN 111475114A CN 202010259403 A CN202010259403 A CN 202010259403A CN 111475114 A CN111475114 A CN 111475114A
Authority
CN
China
Prior art keywords
data
flushing
controller
memory
control command
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
CN202010259403.3A
Other languages
Chinese (zh)
Inventor
刘文志
李俭
侯红生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010259403.3A priority Critical patent/CN111475114A/en
Publication of CN111475114A publication Critical patent/CN111475114A/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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • 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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0658Controller construction arrangements
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • 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/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device

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)
  • Computer Security & Cryptography (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention discloses a data downloading and brushing system, which comprises: when detecting that the equipment is powered off, the processor sends a power supply instruction to the controller; sending a first data brushing control command to a controller; when the power supply reply of the equipment is detected, sending a second data flashing control command to the controller; the controller controls a preset standby battery to supply power to the equipment; generating and sending a first data downloading and brushing instruction to an equipment memory; generating and sending a second data flushing instruction to the persistent memory; the device memory flushes the data to the persistent memory according to the first data flushing instruction; the persistent memory flushes the data to a disk according to the second data flushing instruction; the persistent memory is disposed between the device memory and the disk. The invention fully utilizes the non-volatility and high efficiency of the persistent memory, greatly improves the efficiency of data refreshing, ensures that the data is not lost, and improves the reliability of the data. The invention also discloses a data brushing device, equipment and a storage medium, and has corresponding technical effects.

Description

Data downloading and refreshing system and method and computer readable storage medium
Technical Field
The present invention relates to the field of storage technologies, and in particular, to a data flushing system, a data flushing method, and a computer-readable storage medium.
Background
When a user uses a storage device, in both single-controller and multi-controller situations, the power-off situation needs special attention, and if sudden power-off causes loss of device data, the device data may be greatly lost to the user, so the power-off protection mechanism is particularly important. For the current unified storage device, using a backup battery unit is a more common scheme for handling a power failure protection scenario. Specifically, when the unified storage device encounters a sudden power failure scenario, due to the existence of the backup battery unit, the device is not immediately shut down due to power failure, so that data in the memory is not immediately lost. Thereby achieving the power-down protection function.
In the prior art, in order to improve the read-write efficiency of the storage device, the current unified storage device usually uses a memory space as a cache, when data is written, the data can be returned to the host after being written into the cache, and the storage end can write the data into a rear-end disk (HDD, SSD, etc.) by completing the disk-flushing operation of the data in the cache by using a corresponding mechanism. When the power-off scene of the equipment occurs, the equipment is powered by the standby battery unit, and meanwhile, the data in the cache is written into a rear-end disk through a down-flushing process. The power supply time of the backup battery unit is particularly important, and if the data in the buffer memory is not completely written, the power is exhausted, and the serious result of data loss is also caused.
In summary, how to effectively solve the problem that data is lost due to the fact that data in a cache is not written over when the electric quantity of a standby battery is exhausted is an urgent need to be solved by a person skilled in the art at present.
Disclosure of Invention
The invention aims to provide a data brushing system, which greatly improves the data brushing efficiency, ensures that data is not lost and improves the reliability of the data; another object of the present invention is to provide a data brushing method and a computer readable storage medium.
In order to solve the technical problems, the invention provides the following technical scheme:
a data swipe system, comprising:
the processor is used for sending a power supply instruction to the controller when the power failure of the equipment is detected; sending a first data brushing control command to the controller; when the power supply reply of the equipment is detected, sending a second data brushing control command to the controller;
the controller is used for controlling a preset standby battery to supply power to the equipment; generating a first data downloading command according to the first data downloading control command, and sending the first data downloading command to an equipment memory; generating a second data downloading command according to the second data downloading control command, and sending the second data downloading command to a persistent memory;
the device memory is used for flushing data to the persistent memory according to the first data flushing instruction;
the persistent memory is used for flushing the data to a disk according to the second data flushing instruction;
wherein the persistent memory is disposed between the device memory and the disk.
In a specific embodiment of the present invention, the processor is specifically configured to send the first data flushing control command to the controller when detecting that a data amount in the device memory exceeds a preset value; when detecting that the data volume in the equipment memory does not exceed the preset value, sending a third data refreshing control command to the controller;
the controller is further configured to generate a third data brushing instruction according to the third data brushing control command;
the device memory is further configured to flush the data to the disk according to the third data flushing instruction.
In a specific embodiment of the present invention, the processor is specifically configured to send the second data flushing control command to the controller and record a data flushing progress when it is detected that the device memory flushes the data to the persistent memory; when the power supply reply of the equipment is detected, generating a fourth data brushing control command according to the data brushing progress, and sending the fourth data brushing control command to the controller;
the controller is specifically configured to generate a fourth data flushing instruction according to the fourth data flushing control command;
and the persistent memory is specifically configured to flush the remaining data to the disk according to the data flushing progress according to the fourth data flushing instruction.
In one embodiment of the present invention, the persistent memory is an intel' ao memory.
In a specific embodiment of the present invention, the processor is specifically configured to perform cold-hot partitioning on data in the device memory according to a preset rule, so as to obtain a cold data group and a hot data group; sending a first data brushing control command for performing data brushing control according to a sequence of first heating and then cooling to the controller;
the controller is specifically configured to generate a first data flushing instruction for flushing data according to a sequence of first heating and then cooling according to the first data flushing control command;
and the device memory is used for flushing the cold data group and the hot data group to the persistent memory according to the first data flushing instruction and the sequence of first hot and then cold.
In an embodiment of the present invention, the processor is specifically configured to generate a second data flushing control command for flushing the hot data set back to the device memory and writing the cold data set into the disk when a device power supply reply is detected;
the controller is specifically configured to generate a second data flushing instruction for flushing the hot data group back to the device memory, writing the cold data group into the disk, and sending the second data flushing instruction to the persistent memory according to the second data flushing control command;
the persistent memory is specifically configured to flush the hot data set back to the device memory according to the second data flushing instruction, and write the cold data set to the disk.
A data brushing method, comprising:
when the power failure of the equipment is detected, a power supply instruction is sent to a controller, so that the controller controls a preset standby battery to supply power to the equipment;
sending a first data flushing control command to the controller to enable the controller to control the device memory to flush data to the persistent memory;
and when the power supply reply of the equipment is detected, sending a second data flushing control command to the controller so that the controller controls the persistent memory to write the data into a disk.
In a specific embodiment of the present invention, sending a first data flushing control command to the controller to enable the controller to control a device memory to flush data to a persistent memory includes:
when detecting that the data volume in the equipment memory exceeds a preset value, sending a first data refreshing control command to the controller;
and when detecting that the data volume in the equipment memory does not exceed the preset value, sending a third data flushing control command to the controller, so that the controller controls the equipment memory to directly flush the data to the disk.
In a specific embodiment of the present invention, when detecting that the device is powered back, sending a second data flushing control command to the controller, so that the controller controls the persistent memory to write the data to the disk, includes:
when the fact that the data are flushed to the persistent memory by the equipment memory is detected to be completed, sending a second data flushing control command to the controller, and recording data flushing progress;
when the power supply reply of the equipment is detected, generating a fourth data flushing control command according to the data flushing progress, and sending the fourth data flushing control command to the controller, so that the controller controls the persistent memory to flush the residual data to the disk according to the data flushing progress.
A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the data flushing method as set forth above.
The system provided by the embodiment of the invention comprises the following components: the processor is used for sending a power supply instruction to the controller when the power failure of the equipment is detected; sending a first data brushing control command to a controller; when the power supply reply of the equipment is detected, sending a second data flashing control command to the controller; the controller is used for controlling a preset standby battery to supply power to the equipment; generating a first data downloading command according to the first data downloading control command, and sending the first data downloading command to the equipment memory; generating a second data downloading command according to the second data downloading control command, and sending the second data downloading command to the persistent memory; the device memory is used for flushing data to the persistent memory according to the first data flushing instruction; the persistent memory is used for flushing the data to the disk according to the second data flushing instruction; the persistent memory is arranged between the equipment memory and the magnetic disk. By arranging the persistent memory between the memory space and the disk in advance, when the equipment is powered off, data is firstly flushed to the persistent memory, and the data is written into the disk after power supply recovery.
Accordingly, embodiments of the present invention further provide a data flushing method and a computer-readable storage medium corresponding to the data flushing system, which have the above technical effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a block diagram of a data flushing system according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating an implementation of a data flushing method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a block diagram of a data flushing system according to an embodiment of the present invention, where the system may include:
the processor is used for sending a power supply instruction to the controller when the power failure of the equipment is detected; sending a first data brushing control command to a controller; when the power supply reply of the equipment is detected, sending a second data flashing control command to the controller;
the controller is used for controlling a preset standby battery to supply power to the equipment; generating a first data downloading command according to the first data downloading control command, and sending the first data downloading command to the equipment memory; generating a second data downloading command according to the second data downloading control command, and sending the second data downloading command to the persistent memory;
the device memory is used for flushing data to the persistent memory according to the first data flushing instruction;
the persistent memory is used for flushing the data to the disk according to the second data flushing instruction;
the persistent memory is arranged between the equipment memory and the magnetic disk.
The data downloading and refreshing system provided by the embodiment of the invention comprises a processor, a controller, a standby battery, an equipment memory, a magnetic disk and a persistent memory arranged between the equipment memory and the magnetic disk. Whether the power supply of the equipment is normal can be detected in real time in the running process of the equipment, and when the power failure of the equipment is detected, a preset standby battery is controlled to supply power to the equipment.
Before the device is powered off, data generated by data running is cached in a device memory, but data loss can be caused after the device memory is powered off, so that after a preset backup battery is controlled to supply power to the device continuously, a processor sends a first data flushing control command to a controller, the controller generates a first data flushing instruction according to the first data flushing control command and sends the first data flushing instruction to the device memory, the device memory flushes data in the device memory to a persistent memory, the persistent memory can be an intel Optane memory (intel Optane DC), and of course, the persistent memory can also be other persistent memories, so that a nonvolatile and efficient flushing effect can be achieved, and the embodiment of the invention is not limited by comparison. The persistent Memory is different from a commonly used Memory, such as a Dynamic Random Access Memory (DRAM), and has a nonvolatile characteristic that data in the Memory can be continuously retained in a power-off situation. Meanwhile, compared with a common memory, the persistent memory capacity is larger. Compared with a commonly used back-end disk (such as an HDD, an SSD, etc.), the persistent memory is used in the memory bus, which has a significant efficiency advantage that the efficiency of reading and writing data by using the persistent memory is much higher than that of the back-end disk, and thus, the data in the memory space is written into the persistent memory with higher efficiency.
After data in the memory of the device is flushed to the persistent memory, when the processor detects that the power supply of the device is returned, a second data flushing control command is sent to the controller, a second data flushing instruction is generated according to the second data flushing control command, the second data flushing instruction is sent to the persistent memory, and the persistent memory flushes the data to a disk according to the second data flushing instruction. By using the persistent memory as the intermediate cache, the nonvolatile property and the data flashing efficiency of the persistent memory are fully utilized, so that when the equipment is powered off, the limited electric quantity of the standby battery is utilized to cache the data in the memory space into the persistent memory, and when the equipment is powered on and returns, the data cached in the persistent memory in advance is written into a disk, the probability of data loss is greatly reduced, and the reliability of the data is improved.
The system provided by the embodiment of the invention comprises the following components: the processor is used for sending a power supply instruction to the controller when the power failure of the equipment is detected; sending a first data brushing control command to a controller; when the power supply reply of the equipment is detected, sending a second data flashing control command to the controller; the controller is used for controlling a preset standby battery to supply power to the equipment; generating a first data downloading command according to the first data downloading control command, and sending the first data downloading command to the equipment memory; generating a second data downloading command according to the second data downloading control command, and sending the second data downloading command to the persistent memory; the device memory is used for flushing data to the persistent memory according to the first data flushing instruction; the persistent memory is used for flushing the data to the disk according to the second data flushing instruction; the persistent memory is arranged between the equipment memory and the magnetic disk. By arranging the persistent memory between the memory space and the disk in advance, when the equipment is powered off, data is firstly flushed to the persistent memory, and the data is written into the disk after power supply recovery.
In a specific embodiment of the present invention, the processor is specifically configured to send a first data flushing control command to the controller when detecting that a data amount in the device memory exceeds a preset value; when detecting that the data volume in the equipment memory does not exceed a preset value, sending a third data refreshing control command to the controller;
the controller is also used for generating a third data brushing instruction according to the third data brushing control command;
and the equipment memory is also used for flushing the data to the magnetic disk according to the third data flushing instruction.
The method includes the steps that the condition whether the persistent memory is enabled or not in the process that data are flushed from the front-end device memory to the rear end when the device is powered off can be preset, namely, a data volume is preset, when the data volume in the device memory is detected to exceed the preset value, the data volume in the device memory is large, the persistent memory needs to be enabled, under the condition that a child can do so, the processor sends a first data flushing control command to the controller, and the controller controls the device memory to flush the data to the persistent memory. And when detecting that the data volume in the equipment memory does not exceed the preset value, sending a third data flushing control command to the controller, generating a third data flushing instruction by the controller according to the third data flushing control command, and flushing the data to the magnetic disk by the equipment memory according to the third data flushing instruction. Therefore, when the data volume in the equipment memory is small, the data is directly printed to the disk, and the data printing step is simplified.
In a specific embodiment of the present invention, the processor is specifically configured to send a second data flushing control command to the controller and record a data flushing progress when it is detected that the device memory flushes data to the persistent memory; when the power supply reply of the equipment is detected, generating a fourth data brushing control command according to the data brushing progress, and sending the fourth data brushing control command to the controller;
the controller is specifically used for generating a fourth data brushing instruction according to the fourth data brushing control command;
and the persistent memory is specifically used for flushing the residual data to the disk according to the fourth data flushing instruction and the data flushing progress.
When the processor detects that the data are flushed to the persistent memory by the device memory, if the spare battery still has residual electric quantity, a second data flushing control command is sent to the controller, the controller controls the persistent memory to flush the data to the disk, and the processor records the data flushing progress. When the processor detects that the power supply of the equipment is replied, a fourth data brushing control command is generated according to the data brushing progress, the fourth data brushing control command is sent to the controller, a fourth data brushing instruction is generated according to the fourth data brushing control command, and the persistent memory brushes the residual data to the disk according to the fourth data brushing instruction and the data brushing progress. Thereby make backup battery's electric quantity obtain make full use of, further promote the efficiency of brushing under the data.
In one embodiment of the present invention, the persistent memory is an Intel Aolang memory.
The persistent memory may be an intel' ao memory. The Intel Itanium memory is compatible with a nonvolatile memory (NVMe) storage protocol and is formed by a 3D XPoint memory medium, an Intel memory and storage controller, an Intel interconnection IP and Intel software, so that the Inel Itanium memory not only can provide higher performance and response capability for the traditional mechanical hard disk, but also can realize low-cost high-capacity high-speed storage.
In a specific embodiment of the present invention, the processor is specifically configured to perform cold-hot partitioning on data in the device memory according to a preset rule to obtain a cold data group and a hot data group; sending a first data brushing control command for performing data brushing control according to a sequence of first heating and then cooling to a controller;
the controller is specifically used for generating a first data brushing instruction for brushing data according to a sequence of first heating and then cooling according to the first data brushing control command;
and the device memory is used for flushing the cold data group and the hot data group to the persistent memory according to the first data flushing instruction and the sequence of first hot and then cold.
The processor may perform a cold-hot partitioning rule on data in the device memory in advance, for example, the data may be cold-hot partitioned according to an access frequency of the data, and certainly, the data may also be partitioned according to other rules, so as to perform accurate cold-hot partitioning on the data, which is not limited in the embodiment of the present invention. After the processor detects that the equipment is powered off and controls the standby battery to supply power to the equipment, cold and hot division can be performed on data in the memory space of the equipment according to preset rules, so that a cold data set and a hot data set are obtained. Of course, the number of stages for dividing the data into hot data and cold data may also be determined according to the size of the data amount in the memory space, and when the data amount in the memory space is large, the data in the memory space may be divided into the hot data, the general data, and the cold data according to the hot and cold data.
After a cold data group and a hot data group are obtained by cold and hot division of data in the equipment memory by the processor, a first data flushing control command for performing data flushing control according to a sequence of first hot and then cold is sent to the controller, the controller generates a first data flushing command for performing data flushing according to the sequence of first hot and then cold according to the first data flushing control command, and the equipment memory flushes the cold data group and the hot data group to the persistent memory according to the sequence of first hot and then cold according to the first data flushing command. The hot data set is preferably flushed to the persistent memory, and the cold data set is flushed to the persistent memory again when the electric energy of the backup battery allows. In this case, when the amount of data in the memory space is large, it is ensured that data in the hot data set which is frequently accessed is reliably stored in the persistent memory, and the reliability of the data is further improved.
In an embodiment of the present invention, the processor is specifically configured to, when detecting that the device is powered back, generate a second data flushing control command for flushing the hot data set back to the device memory and writing the cold data set to the disk;
the controller is specifically used for generating a second data flushing instruction for flushing the hot data group back to the equipment memory, writing the cold data group into the disk, and sending the second data flushing instruction to the persistent memory according to the second data flushing control command;
and the persistent memory is specifically used for flushing the hot data group back to the equipment memory according to the second data flushing instruction and writing the cold data group into the disk.
After the hot data group and the cold data group are sequentially flushed to the persistent memory according to the sequence of first hot and then cold, when the processor detects that the equipment is powered back, a second data flushing control command for flushing the hot data group back to the equipment memory and writing the cold data group into the disk is generated, the controller generates a second data flushing command for flushing the hot data group back to the equipment memory according to the second data flushing control command, writes the cold data group into the disk, and sends the second data flushing command to the persistent memory, and the persistent memory flushes the hot data group back to the equipment memory according to the second data flushing command and writes the cold data group into the disk. And the performance of the system is improved by carrying out data layering processing on cold and hot data. By using the persistent memory as the intermediate cache, the flash of more memory space data can be completed in the same time, and greater advantages can be embodied in the application scene of large cache. After the power supply of the storage device is recovered, the data in the persistent memory can be used for brushing the hot data group back to the memory space of the device in the background, writing the cold data group into the disk, deleting the cache data reserved in the persistent memory after the process of brushing back and writing the data is finished, further continuing to serve as the target space of the cache brushing in the power-down protection scene, and waiting for receiving the data written in the cache. The storage device supports the power failure protection function of the large cache under the condition of slightly changing the system.
Corresponding to the above system embodiment, the embodiment of the present invention further provides a data flushing method, and the data flushing method described below and the data flushing system described above may be referred to in correspondence.
Referring to fig. 2, fig. 2 is a flowchart illustrating an implementation of a data brushing method according to an embodiment of the present invention, where the method may include the following steps:
s201: when the power failure of the equipment is detected, a power supply instruction is sent to the controller, so that the controller controls a preset standby battery to supply power to the equipment.
S202: and sending a first data flushing control command to the controller so that the controller controls the device memory to flush the data to the persistent memory.
S203: and when the power supply reply of the equipment is detected, sending a second data flushing control command to the controller so that the controller controls the persistent memory to write the data into the disk.
By applying the method provided by the embodiment of the invention, when the power failure of the equipment is detected, a power supply instruction is sent to the controller, so that the controller controls the preset standby battery to supply power to the equipment; sending a first data flushing control command to the controller so that the controller controls the device memory to flush data to the persistent memory; and when the power supply reply of the equipment is detected, sending a second data flushing control command to the controller so that the controller controls the persistent memory to write the data into the disk. By arranging the persistent memory between the memory space and the disk in advance, when the equipment is powered off, data is firstly flushed to the persistent memory, and the data is written into the disk after power supply recovery.
In a specific embodiment of the present invention, step S202 may include the following steps:
the method comprises the following steps: when detecting that the data volume in the equipment memory exceeds a preset value, sending a first data refreshing control command to a controller;
step two: and when detecting that the data volume in the equipment memory does not exceed the preset value, sending a third data flushing control command to the controller so that the controller controls the equipment memory to directly flush the data to the disk.
In one embodiment of the present invention, step S203 may include the following steps:
the method comprises the following steps: when the fact that the data are flushed to the persistent memory by the device memory is detected to be completed, sending a second data flushing control command to the controller, and recording the data flushing progress;
step two: and when the power supply reply of the equipment is detected, generating a fourth data flushing control command according to the data flushing progress, and sending the fourth data flushing control command to the controller, so that the controller controls the persistent memory to flush the residual data to the disk according to the data flushing progress.
In a specific embodiment of the present invention, step S202 may include the following steps:
sending a first data flushing control command to the controller so that the controller controls the equipment memory to flush data to the Intel Aomeng memory;
step S203 may include the steps of:
and when the power supply reply of the equipment is detected, sending a second data brushing control command to the controller so that the controller controls the Intel Aolang memory to write data into the disk.
In a specific embodiment of the present invention, step S202 may include the following steps:
the method comprises the following steps: performing cold and hot division on data in the memory of the equipment according to a preset rule to obtain a cold data group and a hot data group;
step two: and sending a first data flushing control command for performing data flushing control according to the sequence of first heating and then cooling to the controller, so that the controller controls the device memory to flush the cold data group and the hot data group to the persistent memory according to the sequence of first heating and then cooling.
In one embodiment of the present invention, step S203 may include the following steps:
the method comprises the following steps: when the power supply reply of the equipment is detected, generating a second data flushing control command for flushing the hot data group back to the internal memory of the equipment and writing the cold data group into the disk;
step two: and sending a second data flushing control command to the controller so that the controller controls the persistent memory to flush the hot data set back to the device memory and write the cold data set to the disk.
Corresponding to the above method embodiment, the present invention further provides a computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, implementing the steps of:
when the power failure of the equipment is detected, a power supply instruction is sent to the controller, so that the controller controls a preset standby battery to supply power to the equipment; sending a first data flushing control command to the controller so that the controller controls the device memory to flush data to the persistent memory; and when the power supply reply of the equipment is detected, sending a second data flushing control command to the controller so that the controller controls the persistent memory to write the data into the disk.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For the introduction of the computer-readable storage medium provided by the present invention, please refer to the above method embodiments, which are not described herein again.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The method and the computer-readable storage medium disclosed by the embodiment correspond to the system disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part.
The principle and the implementation of the present invention are explained in the present application by using specific examples, and the above description of the embodiments is only used to help understanding the technical solution and the core idea of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A data flashing system, comprising:
the processor is used for sending a power supply instruction to the controller when the power failure of the equipment is detected; sending a first data brushing control command to the controller; when the power supply reply of the equipment is detected, sending a second data brushing control command to the controller;
the controller is used for controlling a preset standby battery to supply power to the equipment; generating a first data downloading command according to the first data downloading control command, and sending the first data downloading command to an equipment memory; generating a second data downloading command according to the second data downloading control command, and sending the second data downloading command to a persistent memory;
the device memory is used for flushing data to the persistent memory according to the first data flushing instruction;
the persistent memory is used for flushing the data to a disk according to the second data flushing instruction;
wherein the persistent memory is disposed between the device memory and the disk.
2. The data brushing system according to claim 1, wherein the processor is specifically configured to send the first data brushing control command to the controller when detecting that a data amount in the device memory exceeds a preset value; when detecting that the data volume in the equipment memory does not exceed the preset value, sending a third data refreshing control command to the controller;
the controller is further configured to generate a third data brushing instruction according to the third data brushing control command;
the device memory is further configured to flush the data to the disk according to the third data flushing instruction.
3. The data flushing system according to claim 1 or 2, wherein the processor is specifically configured to send the second data flushing control command to the controller and record a data flushing progress when it is detected that the device memory flushes the data to the persistent memory; when the power supply reply of the equipment is detected, generating a fourth data brushing control command according to the data brushing progress, and sending the fourth data brushing control command to the controller;
the controller is specifically configured to generate a fourth data flushing instruction according to the fourth data flushing control command;
and the persistent memory is specifically configured to flush the remaining data to the disk according to the data flushing progress according to the fourth data flushing instruction.
4. The data scrubbing system of claim 1, wherein said persistent memory is intel' ao memory.
5. The data flushing system of claim 1, wherein the processor is specifically configured to perform cold-hot partitioning on data in the device memory according to a preset rule to obtain a cold data group and a hot data group; sending a first data brushing control command for performing data brushing control according to a sequence of first heating and then cooling to the controller;
the controller is specifically configured to generate a first data flushing instruction for flushing data according to a sequence of first heating and then cooling according to the first data flushing control command;
and the device memory is used for flushing the cold data group and the hot data group to the persistent memory according to the first data flushing instruction and the sequence of first hot and then cold.
6. The data flushing system of claim 5, wherein the processor is specifically configured to generate a second data flushing control command that flushes the hot data set back to the device memory and writes the cold data set to the disk when a device power return is detected;
the controller is specifically configured to generate a second data flushing instruction for flushing the hot data group back to the device memory, writing the cold data group into the disk, and sending the second data flushing instruction to the persistent memory according to the second data flushing control command;
the persistent memory is specifically configured to flush the hot data set back to the device memory according to the second data flushing instruction, and write the cold data set to the disk.
7. A data brushing method is characterized by comprising the following steps:
when the power failure of the equipment is detected, a power supply instruction is sent to a controller, so that the controller controls a preset standby battery to supply power to the equipment;
sending a first data flushing control command to the controller to enable the controller to control the device memory to flush data to the persistent memory;
and when the power supply reply of the equipment is detected, sending a second data flushing control command to the controller so that the controller controls the persistent memory to write the data into a disk.
8. The data flushing method of claim 7, wherein sending a first data flushing control command to the controller to cause the controller to control a device memory to flush data to a persistent memory comprises:
when detecting that the data volume in the equipment memory exceeds a preset value, sending a first data refreshing control command to the controller;
and when detecting that the data volume in the equipment memory does not exceed the preset value, sending a third data flushing control command to the controller, so that the controller controls the equipment memory to directly flush the data to the disk.
9. The data flushing method according to claim 7 or 8, wherein when the device power supply reply is detected, sending a second data flushing control command to the controller to enable the controller to control the persistent memory to write the data to the disk, comprises:
when the fact that the data are flushed to the persistent memory by the equipment memory is detected to be completed, sending a second data flushing control command to the controller, and recording data flushing progress;
when the power supply reply of the equipment is detected, generating a fourth data flushing control command according to the data flushing progress, and sending the fourth data flushing control command to the controller, so that the controller controls the persistent memory to flush the residual data to the disk according to the data flushing progress.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the data brushing method according to any one of claims 7 to 9.
CN202010259403.3A 2020-04-03 2020-04-03 Data downloading and refreshing system and method and computer readable storage medium Pending CN111475114A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010259403.3A CN111475114A (en) 2020-04-03 2020-04-03 Data downloading and refreshing system and method and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010259403.3A CN111475114A (en) 2020-04-03 2020-04-03 Data downloading and refreshing system and method and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111475114A true CN111475114A (en) 2020-07-31

Family

ID=71749742

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010259403.3A Pending CN111475114A (en) 2020-04-03 2020-04-03 Data downloading and refreshing system and method and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111475114A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113138718A (en) * 2021-04-27 2021-07-20 北京百度网讯科技有限公司 Storage method, apparatus, system, and medium for distributed block storage system
WO2023015866A1 (en) * 2021-08-09 2023-02-16 苏州浪潮智能科技有限公司 Data writing method, apparatus and system, and electronic device and storage medium
WO2023098192A1 (en) * 2021-11-30 2023-06-08 苏州浪潮智能科技有限公司 Method and apparatus for processing abnormal power failure of solid state disk, and electronic device and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399520A (en) * 2013-07-22 2013-11-20 深圳市汇川控制技术有限公司 Method and device for accessing power-failure data of PLC (Programmable Logic Controller) system
CN104021093A (en) * 2014-06-24 2014-09-03 浪潮集团有限公司 Power-down protection method for memory device based on NVDIMM (non-volatile dual in-line memory module)
CN104464802A (en) * 2013-09-18 2015-03-25 联想(北京)有限公司 Storage device and data protection method
CN108491058A (en) * 2018-04-03 2018-09-04 郑州云海信息技术有限公司 A kind of the powered-off fault data guard method and device of Nonvolatile memory

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399520A (en) * 2013-07-22 2013-11-20 深圳市汇川控制技术有限公司 Method and device for accessing power-failure data of PLC (Programmable Logic Controller) system
CN104464802A (en) * 2013-09-18 2015-03-25 联想(北京)有限公司 Storage device and data protection method
CN104021093A (en) * 2014-06-24 2014-09-03 浪潮集团有限公司 Power-down protection method for memory device based on NVDIMM (non-volatile dual in-line memory module)
CN108491058A (en) * 2018-04-03 2018-09-04 郑州云海信息技术有限公司 A kind of the powered-off fault data guard method and device of Nonvolatile memory

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113138718A (en) * 2021-04-27 2021-07-20 北京百度网讯科技有限公司 Storage method, apparatus, system, and medium for distributed block storage system
WO2023015866A1 (en) * 2021-08-09 2023-02-16 苏州浪潮智能科技有限公司 Data writing method, apparatus and system, and electronic device and storage medium
WO2023098192A1 (en) * 2021-11-30 2023-06-08 苏州浪潮智能科技有限公司 Method and apparatus for processing abnormal power failure of solid state disk, and electronic device and medium

Similar Documents

Publication Publication Date Title
CN111475114A (en) Data downloading and refreshing system and method and computer readable storage medium
CN102436419B (en) Nonvolatile memory system and manage the method for its power supply
US8423710B1 (en) Sequential writes to flash memory
CN101963891A (en) Method and device for data storage and processing, solid-state drive system and data processing system
CN101458668A (en) Caching data block processing method and hard disk
CN102356382A (en) Apparatus and method for managing dram buffer
CN108959589B (en) STT-MRAM-based method for accelerating log file saving and recovery of solid-state memory device
CN103049220A (en) Storage control method, storage control device and solid-state storage system
CN111475425A (en) Method for managing flash memory module and related flash memory controller and electronic device
CN108874574B (en) Garbage recycling method and related device
CN109284070B (en) Solid-state storage device power-off recovery method based on STT-MRAM
CN104303159A (en) Hibernation based on page source
US20220229775A1 (en) Data storage device and operating method thereof
CN102789422B (en) The method for writing data of solid state hard disc
CN113296701A (en) Solid-state storage method and solid-state storage device
WO2024077863A1 (en) Recovery method for all-flash storage system, and related apparatus
CN110275678B (en) STT-MRAM-based solid state memory device random access performance improvement method
CN113711189A (en) System and method for managing reduced power failure energy requirements on solid state drives
JP2012521032A (en) SSD controller and operation method of SSD controller
CN109032843B (en) STT-MRAM-based method for accelerating starting of solid state memory device
CN116401095A (en) Method and device for recovering data mapping table by powering on solid state disk and solid state disk
US11803307B2 (en) Memory system and operating method thereof
US11966613B2 (en) Selective device power state recovery method
CN112083883B (en) Storage system and method for use in storage system
CN112035065B (en) Data writing method, device and equipment and computer readable storage 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200731

RJ01 Rejection of invention patent application after publication