CN111062066B - Method for preventing data loss of solid state disk and data storage system - Google Patents

Method for preventing data loss of solid state disk and data storage system Download PDF

Info

Publication number
CN111062066B
CN111062066B CN201911065715.4A CN201911065715A CN111062066B CN 111062066 B CN111062066 B CN 111062066B CN 201911065715 A CN201911065715 A CN 201911065715A CN 111062066 B CN111062066 B CN 111062066B
Authority
CN
China
Prior art keywords
solid state
data
state disk
storage unit
disk storage
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
CN201911065715.4A
Other languages
Chinese (zh)
Other versions
CN111062066A (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.)
Hunan Runcore Innovation Technology Co ltd
Original Assignee
Hunan Runcore Innovation 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 Hunan Runcore Innovation Technology Co ltd filed Critical Hunan Runcore Innovation Technology Co ltd
Priority to CN201911065715.4A priority Critical patent/CN111062066B/en
Publication of CN111062066A publication Critical patent/CN111062066A/en
Application granted granted Critical
Publication of CN111062066B publication Critical patent/CN111062066B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/88Detecting or preventing theft or loss
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
    • G06F21/79Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data in semiconductor storage media, e.g. directly-addressable memories

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention discloses a method for preventing data loss of a solid state disk and a data storage system, wherein the data storage system comprises a temporary solid state disk storage unit and a formal solid state disk storage unit, and the method comprises the following steps: when the data to be stored exist, generating a check code of the data to be stored according to the receiving time and the attribute; packaging the check code and the data to be stored into a data file, and simultaneously sending the data file to the two types of solid state disk storage units in a broadcasting mode; comparing the check codes stored in the two types of solid state disk storage units; judging whether the check code in the temporary solid state disk storage unit is stored in the formal solid state disk storage unit; and if not, forwarding the data file corresponding to the verification code which is not stored in the formal solid state disk storage unit to the formal solid state disk storage unit. The technical scheme of the invention aims to solve the problem of data loss caused by unsuccessful data reception of the solid state disk in the prior art.

Description

Method for preventing data loss of solid state disk and data storage system
Technical Field
The invention relates to the technical field of solid state disks, in particular to a method for preventing data loss of a solid state disk and a data storage system applying the method for preventing data loss of the solid state disk.
Background
A Solid State Drive (SSD), commonly referred to as a Solid State Disk, is a hard Disk made of an array of Solid State electronic memory chips. The SSD is composed of a control unit and a storage unit (FLASH chip, DRAM chip). The specification, definition, function and use method of the interface of the solid state disk are completely the same as those of a common hard disk, and the appearance and size of the product are also completely consistent with those of the common hard disk. The method is widely applied to the fields of military affairs, vehicle-mounted, industrial control, video monitoring, network terminals, electric power, medical treatment, aviation, navigation equipment and the like.
In the data storage process of the solid state disk, the situation that data is not successfully stored may exist, so that data loss is caused. The phenomenon that data is not successfully stored is usually caused by power failure of the solid state disk, in the prior art, in order to avoid power failure of the solid state disk, a standby power supply is often provided for the solid state disk, but the use of the standby power supply still cannot avoid data loss of the solid state disk.
Disclosure of Invention
The invention mainly aims to provide a method for preventing data loss of a solid state disk, and aims to solve the problem of data loss caused by unsuccessful data reception of the solid state disk in the prior art.
In order to achieve the above object, the method for preventing data loss of a solid state disk provided by the present invention is applied to a data storage system, the data storage system includes a temporary solid state disk storage unit and a formal solid state disk storage unit which are powered by different power supplies, and the method for preventing data loss of a solid state disk includes the following steps:
judging whether data to be stored exist or not;
when data to be stored exist, acquiring the receiving time of the data to be stored and the attribute of the data to be stored, and generating a check code of the data to be stored according to the receiving time and the attribute;
packaging the check code and the data to be stored into a data file, and simultaneously sending the data file to the temporary solid state disk storage unit and the formal solid state disk storage unit in a broadcasting mode;
comparing the check codes stored in the temporary solid state disk storage unit and the formal solid state disk storage unit according to a preset comparison period;
judging whether the check code in the temporary solid state disk storage unit is stored in the formal solid state disk storage unit;
if not, forwarding the data file corresponding to the verification code which is not stored in the formal solid state disk storage unit to the formal solid state disk storage unit;
and if so, deleting the data file corresponding to the check code in the temporary solid state disk storage unit.
Preferably, before the step of packaging the check code and the data to be stored into a data file, and sending the data file to the temporary solid state disk storage unit and the formal solid state disk storage unit simultaneously in a broadcast manner, the method further includes:
detecting the operating conditions of the formal solid state disk storage unit, and determining whether the operating conditions trigger a power-down protection mode according to the operating conditions;
if so, the step of packaging the check code and the data to be stored into a data file and simultaneously sending the data file to the temporary solid state disk storage unit and the formal solid state disk storage unit in a broadcasting mode is executed;
if not, packaging the check code and the data to be stored into a data file, and sending the data file to the formal solid state disk storage unit.
Preferably, the data storage system comprises a control module, a voltage detection module and a standby power supply circuit, wherein the voltage detection module and the standby power supply circuit are respectively connected with the control module, and the standby power supply circuit is connected to a power supply input end of the formal solid state disk storage unit; the standby power supply circuit comprises a plurality of energy storage capacitors which are connected in parallel; the step of detecting the operating condition of the formal solid state disk storage unit and determining whether the operating condition triggers a power-down protection mode according to the operating condition comprises the following steps:
detecting the output voltage of the power supply output end of the formal solid state disk storage unit, and determining whether to trigger a power-down protection mode according to whether the output voltage exceeds a preset range;
after the step of detecting the output voltage of the power output end of the formal solid state disk storage unit and determining whether to trigger the power-down protection mode according to whether the output voltage exceeds a preset range, the method further comprises the following steps:
when the voltage is detected to exceed the preset range, the control module controls the formal solid state disk storage unit and the corresponding power supply to be powered off, and controls the formal solid state disk storage unit to be connected with the standby power supply circuit.
Preferably, the standby power supply circuit is connected with a plurality of power conversion modules, and an output end of each power conversion module is electrically connected with each power utilization module in the data storage system, so that the voltage output by the standby power supply circuit is reduced to the working voltage range of each power utilization module, and each power utilization module in the data storage system can work.
Preferably, the step of packaging the check code and the data to be stored into a data file, and sending the data file to the temporary solid state disk storage unit and the formal solid state disk storage unit simultaneously in a broadcast manner includes:
generating a plurality of data packets with the size not exceeding a preset value according to the check code and the data to be stored, wherein each data packet comprises the same data file name and different data packet sequence numbers;
sequentially sending each data packet to the temporary solid state disk storage unit and the formal solid state disk storage unit in a broadcasting mode according to the data packet sequence number, wherein the data transmission sequence of the data packet containing the check code is the last;
the step of forwarding the data file corresponding to the verification code which is not stored in the formal solid state disk storage unit to the formal solid state disk storage unit includes:
comparing the data packets with the same data file name in the formal solid state disk storage unit and the temporary solid state disk storage unit to determine the data packets which are not received by the formal solid state disk storage unit;
and forwarding the data packet which is not received by the formal solid state disk storage unit to the formal solid state disk storage unit.
Preferably, the solid state disk storage unit comprises a cache unit and a storage area; after the step of sequentially sending each data packet to the temporary solid state disk storage unit and the formal solid state disk storage unit in a broadcast manner according to the data packet serial number, the method further includes:
storing each data packet to the cache unit;
restoring all the data packets into the data file and the check code;
and transferring the data file and the check code to the storage area, and deleting each data packet in the cache unit.
Preferably, the step of packaging the check code and the data to be stored into a data file, and sending the data file to the temporary solid state disk storage unit and the formal solid state disk storage unit simultaneously in a broadcast manner includes:
judging whether a plurality of data to be stored exist or not;
if so, determining the priority level of each data to be stored;
and according to the priority level, sequentially packaging the data to be stored and the corresponding check codes into data files, and sequentially sending the data files to the temporary solid state disk storage unit and the formal solid state disk storage unit according to the priority level in a broadcasting manner.
Preferably, the method for preventing data loss of the solid state disk further includes:
according to a set carousel period, the data to be stored is broadcast in a broadcasting mode;
judging whether the formal solid state disk storage unit finishes receiving the data file or not;
and if so, stopping carousel the data to be stored.
In addition, to achieve the above object, the present invention also provides a data storage system, including: a memory, a controller, and a computer program stored on the memory and executable on the controller; the data storage system comprises a temporary solid state disk storage unit and a formal solid state disk storage unit which adopt different power supplies for power supply; when being executed by the controller, the computer program realizes the steps of the method for preventing data loss of the solid state disk according to any one of the above items.
In the technical scheme of the invention, when data to be stored exist, the receiving time of the data to be stored and the attribute of the data to be stored are obtained, and the check code of the data to be stored is generated according to the receiving time and the attribute; and packaging the check code and the data to be stored into a data file, and simultaneously sending the data file to the temporary solid state disk storage unit and the formal solid state disk storage unit in a broadcasting mode. The data to be stored is sent in a broadcasting mode, and a plurality of receiving terminals can be set for data storage and backup. Comparing the check codes stored in the temporary solid-state hard disk storage unit and the formal solid-state hard disk storage unit according to a preset comparison period, and judging whether the check codes in the temporary solid-state hard disk storage unit are stored in the formal solid-state hard disk storage unit; if not, forwarding the data file corresponding to the verification code which is not stored in the formal solid state disk storage unit to the formal solid state disk storage unit, so that the temporary solid state disk storage unit serves as a data backup unit, the temporary solid state disk storage unit and the formal solid state disk storage unit are powered by different power supplies, and when the formal solid state disk storage unit does not successfully store complete data to be stored, the backed-up data file can be forwarded to the formal solid state disk storage unit, so as to solve the problem of data loss caused by the fact that the solid state disk unsuccessfully receives the data in the prior art.
Drawings
Fig. 1 is a schematic flowchart of a method for preventing data loss in a solid state disk according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating a second embodiment of a method for preventing data loss in a solid state drive according to the present invention;
FIG. 3 is a flowchart illustrating a third embodiment of a method for preventing data loss in a solid state disk according to the present invention;
FIG. 4 is a block diagram of a data storage system according to an embodiment of the present invention.
The objects, features and advantages of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
Referring to fig. 1, to achieve the above object, a first embodiment of the present invention provides a method for preventing data loss of a solid state disk, which is applied to a data storage system, where the data storage system includes a temporary solid state disk storage unit and a formal solid state disk storage unit that are powered by different power supplies, and the method for preventing data loss of a solid state disk includes the following steps:
step S10, judging whether data to be stored exist;
when there is data to be stored, step S20 is executed: acquiring the receiving time of the data to be stored and the attribute of the data to be stored, and generating a check code of the data to be stored according to the receiving time and the attribute;
step S30, packaging the check code and the data to be stored into a data file, and sending the data file to the temporary solid state disk storage unit and the formal solid state disk storage unit simultaneously in a broadcasting mode;
step S40, comparing the check codes stored in the temporary solid state disk storage unit and the formal solid state disk storage unit according to a preset comparison period;
step S50, judging whether the check code in the temporary solid state disk storage unit is stored in the formal solid state disk storage unit;
if not, go to step S60: forwarding a data file corresponding to the verification code which is not stored in the formal solid state disk storage unit to the formal solid state disk storage unit;
if yes, go to step S70: and deleting the data file corresponding to the check code in the temporary solid state disk storage unit.
In the technical scheme of the invention, when data to be stored exist, the receiving time of the data to be stored and the attribute of the data to be stored are obtained, and the check code of the data to be stored is generated according to the receiving time and the attribute; and packaging the check code and the data to be stored into a data file, and simultaneously sending the data file to the temporary solid state disk storage unit and the formal solid state disk storage unit in a broadcasting mode. The data to be stored is sent in a broadcasting mode, and a plurality of receiving terminals can be set for data storage and backup. Comparing the check codes stored in the temporary solid-state hard disk storage unit and the formal solid-state hard disk storage unit according to a preset comparison period, and judging whether the check codes in the temporary solid-state hard disk storage unit are stored in the formal solid-state hard disk storage unit; if not, forwarding the data file corresponding to the verification code which is not stored in the formal solid state disk storage unit to the formal solid state disk storage unit, so that the temporary solid state disk storage unit serves as a data backup unit, the temporary solid state disk storage unit and the formal solid state disk storage unit are powered by different power supplies, and when the formal solid state disk storage unit does not successfully store complete data to be stored, the backed-up data file can be forwarded to the formal solid state disk storage unit, so as to solve the problem of data loss caused by the fact that the solid state disk unsuccessfully receives the data in the prior art.
The temporary solid state disk storage unit and the formal solid state disk storage unit can be different solid state disks respectively.
The attribute of the data to be stored may include a data type and a data name. The check code generated by the attribute and the data receiving time is beneficial to quickly and accurately distinguishing different data to be stored.
In the invention, whether the data file is transmitted can be judged only by judging whether the check code in the temporary solid state disk storage unit is stored in the formal solid state disk storage unit. Because the data of the check code is small, the comparison process is simple and quick, and comparison errors are not easy to occur.
The mode of transmitting the data files in a broadcasting mode enables at least one data receiving terminal (a temporary solid state disk storage unit and a formal solid state disk storage unit) to be arranged, and is beneficial to increasing the number of the data receiving terminals. And the data receiving terminal is provided with a data receiving module.
In step S40, the alignment period can be divided into a first alignment period and a second alignment period. Wherein the first comparison period is shorter than the second comparison period. When the data to be stored is detected to exist, comparing the temporary solid state disk storage unit with the check code stored in the formal solid state disk storage unit by adopting a first comparison period, so that steps S40 to S70 can be conveniently executed in a short time, and the data to be stored can be rapidly stored in the formal solid state disk storage unit. After the check code in the temporary solid state disk storage unit is detected to be stored in the formal solid state disk storage unit, a second comparison period is adopted to periodically check whether the formal solid state disk storage unit has data which is stored in a missing mode, missing and filling of the data are facilitated, and the second comparison period is adopted to facilitate reduction of power consumption and comparison workload.
Referring to fig. 2, based on the first embodiment of the method for preventing data loss in a solid state disk of the present invention, in the second embodiment of the method for preventing data loss in a solid state disk of the present invention, before the step S30, the method further includes:
step S80, detecting the operating condition of the formal solid state disk storage unit, and determining whether the operating condition triggers a power-down protection mode according to the operating condition;
if yes, go to step S30;
if not, go to step S90: and packaging the check code and the data to be stored into a data file, and sending the data file to the formal solid state disk storage unit.
Specifically, detecting the operating condition of the formal solid state disk storage unit may include: the performance state of the power supply of the formal solid state disk storage unit (namely the health state of the power supply) is detected, whether the power supply is damaged or not, whether the power supply is aged or not, whether the power supply is normal or not, the discharge time of the power supply and the like are detected.
Referring to fig. 3, based on the second embodiment of the method for preventing data loss in a solid state disk of the present invention and the third embodiment of the method for preventing data loss in a solid state disk of the present invention, the data storage system includes a control module, a voltage detection module and a standby power supply circuit, where the voltage detection module and the standby power supply circuit are respectively connected to the control module, and the standby power supply circuit is connected to a power input end of the formal solid state disk storage unit; the standby power supply circuit comprises a plurality of energy storage capacitors which are connected in parallel; the step S80 includes:
step S81, detecting the output voltage of the power supply output end of the formal solid state disk storage unit, and determining whether to trigger a power-down protection mode according to whether the output voltage exceeds a preset range;
after the step S81, the method further includes:
step S82, when it is detected that the voltage exceeds the preset range, the control module controls the formal solid state disk storage unit and the corresponding power supply to be powered off, and controls the formal solid state disk storage unit and the standby power supply circuit to be connected.
Furthermore, the standby power supply circuit is connected with a plurality of power conversion modules, and the output end of each power conversion module is used for being electrically connected with each power utilization module in the data storage system respectively, so that the voltage output by the standby power supply circuit is reduced to the working voltage range of each power utilization module to supply the power for each power utilization module in the data storage system to work. The power utilization module can be at least one of a temporary solid state disk storage unit, a formal solid state disk storage unit, a control module and a voltage detection module.
Based on the first to third embodiments of the method for preventing data loss in a solid state disk of the present invention, in a fourth embodiment of the method for preventing data loss in a solid state disk of the present invention, the step S30 includes:
step S31, generating a plurality of data packets with the size not exceeding a preset value according to the check code and the data to be stored, wherein each data packet comprises the same data file name and different data packet serial numbers;
step 32, sequentially sending each data packet to the temporary solid state disk storage unit and the formal solid state disk storage unit in a broadcast mode according to the sequence number of the data packet, wherein the data transmission sequence of the data packet containing the check code is the last;
the step S60 includes:
step S61, comparing the data packets with the same data file name in the formal solid state disk storage unit and the temporary solid state disk storage unit to determine the data packets which are not received by the formal solid state disk storage unit;
step S62, forwarding the data packet that is not received by the formal solid state disk storage unit to the formal solid state disk storage unit.
Each data file is divided into a plurality of data packets containing check code information and file serial numbers to be transmitted, if the condition that the hard disk is powered off and the data transmission is interrupted is met in the transmission process, the data transmission is recovered, only the data packets which are not transmitted are required to be continuously transmitted, the whole data file is not required to be completely transmitted, the data transmission efficiency is improved, and the electric quantity loss and the transmission time for continuously transmitting data after power failure in midway are reduced.
Further, the data packet in which the check code is located is used as the last transmission and transmission sequence, and if the check code is detected to exist in the formal solid state disk storage unit or the temporary solid state disk storage unit, it indicates that the transmission work of each data packet corresponding to the data file is completed.
Based on the fourth embodiment of the method for preventing data loss of the solid state disk, in the fifth embodiment of the method for preventing data loss of the solid state disk, the storage unit of the solid state disk comprises a cache unit and a storage area; after the step S32, the method further includes:
step S33, storing each of the data packets in the cache unit;
step S34, restoring all the data packets to the data file and the check code;
step S35, the data file and the check code are transferred to the storage area, and each data packet in the cache unit is deleted.
When the solid state disk carries out random reading and writing on a common file in the mobile terminal, due to the fact that a wear mechanism in the solid state disk or a storage space in a storage area is limited, some flash memory particles or fragment data and the like can appear in the whole process of writing large-capacity data into the solid state disk, at the moment, a cache unit is needed to receive the cache data (namely the flash memory particles or the fragment data) to keep the integrity of the data, then the data reading process of the solid state disk can be greatly improved through the cache unit, meanwhile, omission of the data in the reading and writing process is avoided, the cache unit can expand the storage capacity of the solid state disk, and the data processing capacity of the mobile terminal is improved; optionally, the cache unit includes a cache chip, where the model of the cache chip IS61LV25616AL or AL433B, and the cache function of the data can be implemented by the cache chip.
Based on the first to fifth embodiments of the method for preventing data loss in a solid state disk of the present invention, in a sixth embodiment of the method for preventing data loss in a solid state disk of the present invention, the step S30 includes:
step S36, determining whether there are a plurality of data to be stored;
if yes, executing step S37 to determine the priority level of each piece of data to be stored;
and step S38, sequentially packaging each data to be stored and the corresponding check code into a data file according to the priority, and sequentially sending the data file to the temporary solid-state disk storage unit and the formal solid-state disk storage unit according to the priority in a broadcast manner.
Specifically, when the present embodiment is used in combination with the fourth embodiment, steps S36 to S37 in the present embodiment are executed first to prioritize a plurality of data to be stored;
then, step S31 and step S32 in the fourth embodiment are executed for each storage data in turn in accordance with the priority level. That is, the following operations are performed for each data to be stored in order of priority:
generating a plurality of data packets with the size not exceeding a preset value according to the check code and the data to be stored, wherein each data packet comprises the same data file name and different data packet sequence numbers;
and sequentially sending each data packet to the temporary solid state disk storage unit and the formal solid state disk storage unit in a broadcasting mode according to the sequence number of the data packet, wherein the data transmission sequence of the data packet containing the check code is the last.
Specifically, the setting of the priority level can ensure that important data is stored properly in priority. The priority level can be set according to the importance level of the data type, the data size, whether a data calling instruction exists or not, and the like. Whether a data call instruction exists refers to whether a user or a system issues the data call instruction.
Based on the first embodiment to the sixth embodiment of the method for preventing data loss of a solid state disk of the present invention, in a seventh embodiment of the method for preventing data loss of a solid state disk of the present invention, the method for preventing data loss of a solid state disk further includes:
step S100, according to a set carousel period, carousel the data to be stored in a broadcasting mode;
step S110, judging whether the formal solid state disk storage unit finishes receiving the data file;
if yes, go to step S120: and stopping carousel of the data to be stored.
The data are broadcast in turn, which is beneficial to continuously storing the data which are not successfully received and stored in the current broadcast cycle in the next broadcast cycle, and further avoids data loss.
In addition, to achieve the above object, the present invention also provides a data storage system, including: a memory, a controller, and a computer program stored on the memory and executable on the controller; the data storage system comprises a temporary solid state disk storage unit and a formal solid state disk storage unit which adopt different power supplies for power supply; when being executed by the controller, the computer program realizes the steps of the method for preventing data loss of the solid state disk according to any one of the above items.
Since the technical solution of the data storage system in this embodiment at least includes all technical solutions of the above method for preventing data loss of a solid state disk, at least all technical effects of the above embodiments are achieved, and details are not repeated here.
Referring to FIG. 4, in some embodiments, the data storage system may include: a controller 1001, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002, and a network share module 1006. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the front end acquires data through the user interface 1003. The network interface 1004 comprises a standard wired interface and may optionally comprise a standard wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the controller 1001 described above.
Those skilled in the art will appreciate that the data storage system architecture shown in FIG. 4 does not constitute a limitation of a data storage system and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. With this understanding in mind, the technical solutions of the present invention may be embodied in the form of a software product stored in a computer-readable storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above, and including instructions for causing a data storage system apparatus to perform the methods according to the embodiments of the present invention.
In the description herein, references to the description of the term "one embodiment," "another embodiment," or "first through xth embodiments," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, method steps, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A method for preventing data loss of a solid state disk is characterized by being applied to a data storage system, wherein the data storage system comprises a temporary solid state disk storage unit and a formal solid state disk storage unit which adopt different power supplies for power supply, and the method for preventing data loss of the solid state disk comprises the following steps:
judging whether data to be stored exist or not;
when data to be stored exists, acquiring receiving time of the data to be stored and attributes of the data to be stored, generating a check code of the data to be stored according to the receiving time and the attributes, wherein the attributes of the data to be stored comprise data types and data names, and the check code generated according to the attributes and the data receiving time is used for quickly and accurately distinguishing different data to be stored;
packing the check code and the data to be stored into a data file, and simultaneously sending the data file to the temporary solid state disk storage unit and the formal solid state disk storage unit in a broadcasting mode, wherein the data file comprises: generating a plurality of data packets with the size not exceeding a preset value according to the check code and the data to be stored, wherein each data packet comprises the same data file name and different data packet sequence numbers; sequentially sending each data packet to the temporary solid state disk storage unit and the formal solid state disk storage unit in a broadcasting mode according to the data packet sequence number, wherein the data transmission sequence of the data packet containing the check code is the last, and if the data packet containing the check code is the last transmission sequence, detecting that the check code exists in the formal solid state disk storage unit or the temporary solid state disk storage unit, and indicating that the transmission work of each data packet corresponding to the data file is finished;
comparing the check codes stored in the temporary solid state disk storage unit and the formal solid state disk storage unit according to a preset comparison period;
judging whether the check code in the temporary solid state disk storage unit is stored in the formal solid state disk storage unit;
if not, forwarding the data file corresponding to the verification code which is not stored in the formal solid state disk storage unit to the formal solid state disk storage unit;
and if so, deleting the data file corresponding to the check code in the temporary solid state disk storage unit.
2. The method for preventing data loss in a solid state disk according to claim 1, wherein before the step of packaging the check code and the data to be stored into a data file and sending the data file to the temporary solid state disk storage unit and the formal solid state disk storage unit simultaneously in a broadcast manner, the method further comprises:
detecting the operating conditions of the formal solid state disk storage unit, and determining whether the operating conditions trigger a power-down protection mode according to the operating conditions;
if so, the step of packaging the check code and the data to be stored into a data file and simultaneously sending the data file to the temporary solid state disk storage unit and the formal solid state disk storage unit in a broadcasting mode is executed;
if not, packaging the check code and the data to be stored into a data file, and sending the data file to the formal solid state disk storage unit.
3. The method for preventing data loss of the solid state disk according to claim 2, wherein the data storage system comprises a control module, a voltage detection module and a standby power supply circuit, the voltage detection module and the standby power supply circuit are respectively connected with the control module, and the standby power supply circuit is connected to a power supply input end of the formal solid state disk storage unit; the standby power supply circuit comprises a plurality of energy storage capacitors which are connected in parallel; the step of detecting the operating conditions of the formal solid state disk storage unit and determining whether the operating conditions trigger a power-down protection mode according to the operating conditions comprises the following steps:
detecting the output voltage of the power supply output end of the formal solid state disk storage unit, and determining whether to trigger a power-down protection mode according to whether the output voltage exceeds a preset range;
after the step of detecting the output voltage of the power output end of the formal solid state disk storage unit and determining whether to trigger the power-down protection mode according to whether the output voltage exceeds a preset range, the method further comprises the following steps:
when the voltage is detected to exceed the preset range, the control module controls the formal solid state disk storage unit and the corresponding power supply to be powered off, and controls the formal solid state disk storage unit to be connected with the standby power supply circuit.
4. The method for preventing data loss of the solid state disk according to claim 3, wherein the standby power supply circuit is connected with a plurality of power conversion modules, and an output end of each power conversion module is used for being electrically connected with each power utilization module in the data storage system respectively, so as to step down a voltage output by the standby power supply circuit to an operating voltage range of each power utilization module for the power utilization modules in the data storage system to operate.
5. The method for preventing data loss of the solid state disk according to claim 1, wherein the step of forwarding the data file corresponding to the verification code that is not stored in the formal solid state disk storage unit to the formal solid state disk storage unit includes:
comparing the data packets with the same data file name in the formal solid state disk storage unit and the temporary solid state disk storage unit to determine the data packets which are not received by the formal solid state disk storage unit;
and forwarding the data packet which is not received by the formal solid state disk storage unit to the formal solid state disk storage unit.
6. The method for preventing data loss of the solid state disk according to claim 5, wherein the storage unit of the solid state disk comprises a cache unit and a storage area; after the step of sequentially sending each data packet to the temporary solid state disk storage unit and the formal solid state disk storage unit in a broadcast manner according to the data packet serial number, the method further includes:
storing each data packet to the cache unit;
restoring all the data packets into the data file and the check code;
and transferring the data file and the check code to the storage area, and deleting each data packet in the cache unit.
7. The method for preventing data loss of the solid state disk according to any one of claims 1 to 6, wherein the step of packaging the check code and the data to be stored into a data file, and sending the data file to the temporary solid state disk storage unit and the formal solid state disk storage unit simultaneously in a broadcast manner includes:
judging whether a plurality of data to be stored exist or not;
if so, determining the priority level of each data to be stored;
and according to the priority level, sequentially packaging the data to be stored and the corresponding check codes into data files, and sequentially sending the data files to the temporary solid state disk storage unit and the formal solid state disk storage unit according to the priority level in a broadcasting manner.
8. The method for preventing data loss of the solid state disk according to any one of claims 1 to 6, further comprising:
according to a set carousel period, the data to be stored is broadcast in a broadcasting mode;
judging whether the formal solid state disk storage unit finishes receiving the data file or not;
and if so, stopping carousel the data to be stored.
9. A data storage system, comprising: a memory, a controller, and a computer program stored on the memory and executable on the controller; the data storage system comprises a temporary solid state disk storage unit and a formal solid state disk storage unit which adopt different power supplies for power supply; the computer program, when executed by the controller, implements the steps of the method for preventing data loss of a solid state disk according to any one of claims 1 to 8.
CN201911065715.4A 2019-11-04 2019-11-04 Method for preventing data loss of solid state disk and data storage system Active CN111062066B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911065715.4A CN111062066B (en) 2019-11-04 2019-11-04 Method for preventing data loss of solid state disk and data storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911065715.4A CN111062066B (en) 2019-11-04 2019-11-04 Method for preventing data loss of solid state disk and data storage system

Publications (2)

Publication Number Publication Date
CN111062066A CN111062066A (en) 2020-04-24
CN111062066B true CN111062066B (en) 2022-08-05

Family

ID=70297640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911065715.4A Active CN111062066B (en) 2019-11-04 2019-11-04 Method for preventing data loss of solid state disk and data storage system

Country Status (1)

Country Link
CN (1) CN111062066B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113783907A (en) * 2020-06-10 2021-12-10 神讯电脑(昆山)有限公司 Data acquisition device and file backup method thereof
CN113138653B (en) * 2021-04-14 2021-10-15 福州富昌维控电子科技有限公司 Power failure data protection method and terminal
CN113268205B (en) * 2021-05-28 2023-02-03 海信集团控股股份有限公司 Vehicle-mounted data storage method and device and vehicle-mounted electronic equipment

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0320142D0 (en) * 2003-08-28 2003-10-01 Ibm Data storage systems
CN1859204A (en) * 2006-03-21 2006-11-08 华为技术有限公司 Method and device for realizing synchronous data in double machine heat backup
CN102118309B (en) * 2010-12-31 2013-08-21 中国科学院计算技术研究所 Method and system for double-machine hot backup
US11037625B2 (en) * 2012-11-20 2021-06-15 Thstyme Bermuda Limited Solid state drive architectures
CN103970684A (en) * 2013-02-04 2014-08-06 联想(北京)有限公司 Data storage method and electronic device
CN103631178B (en) * 2013-11-04 2016-02-03 中国航天科技集团公司第九研究院第七七一研究所 A kind of double-unit backup redundancy control device
US20150378415A1 (en) * 2014-02-05 2015-12-31 Christopher George Back-up power supply systems and methods for use with solid state storage devices
CN105224891A (en) * 2015-09-22 2016-01-06 苏州互盟信息存储技术有限公司 Magnetic disc optic disc fused data method for secure storing, system and device
CN105245974A (en) * 2015-10-13 2016-01-13 商埃曲网络软件(上海)有限公司 Big data push interactive system under digital TV dual-network
CN110083478B (en) * 2018-01-25 2024-04-19 东莞力晶科技有限公司 Data recovery method, data recovery system and solid state disk
CN108874312B (en) * 2018-05-30 2021-09-17 郑州云海信息技术有限公司 Data storage method and storage device
CN110347233A (en) * 2019-06-27 2019-10-18 鸿秦(北京)科技有限公司 A kind of solid state hard disk with power down protection and physical destroying function

Also Published As

Publication number Publication date
CN111062066A (en) 2020-04-24

Similar Documents

Publication Publication Date Title
CN111062066B (en) Method for preventing data loss of solid state disk and data storage system
CN101273336B (en) Saving system context in the event of power loss
CN106302632B (en) Downloading method of basic mirror image and management node
CN106155258B (en) Power-down protection circuit and related method
CN109783014B (en) Data storage method and device
CN102915249A (en) Method and device for remotely realizing firmware updating
US20190227710A1 (en) Incremental data restoration method and apparatus
CN111190775A (en) OSD (on Screen display) replacing method, system, equipment and computer readable storage medium
CN111541762B (en) Data processing method, management server, device and storage medium
KR101593829B1 (en) PLC data log module with backup function
CN110661650B (en) Log management method and device, electronic equipment and storage medium
CN113645048B (en) Network card switching method and device and field programmable gate array FPGA
CA2555610A1 (en) Methods and systems for handling software operations associated with startup and shutdown of handheld devices
CN108021413B (en) FPGA (field programmable Gate array) online upgrading method and device
CN102609454A (en) Replica management method for distributed file system
CN111158947A (en) Method for making pre-copy file, server and readable storage medium
WO2020094063A1 (en) Data storage method and device, storage medium and electronic device
CN111385613B (en) Television system repairing method, storage medium and application server
CN116541047A (en) Firmware upgrading method, device, computer equipment and computer readable storage medium
CN110941597B (en) Method and device for cleaning decompressed file, computing equipment and computer storage medium
EP3346671A1 (en) Service processing method and equipment
CN103747529A (en) Cell activation method and cell activation device
CN112948173A (en) Data recovery method, device, equipment and medium
CN106527984A (en) Storage method and system used for solid state disk
CN102938942B (en) The adaptive processing method that PDP connects and device, terminal equipment

Legal Events

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