Data storage method and system

A data storage system and data storage technology, applied in the direction of electrical digital data processing, special data processing applications, redundant data error detection in computing, etc., can solve complex solutions, increase design and development workload, and cannot Efficient and low-cost data storage consistency and other issues to achieve the effect of consistency

Inactive Publication Date: 2016-06-01
INSPUR BEIJING ELECTRONICS INFORMATION IND
View PDF3 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] For some situations where the amount of data is small, the above solutions are too complicated. Using a database will introduce additional modules and costs, while using data redundancy and verification will increase the workload of design and development, which cannot be realized efficiently and at low cost. data storage consistency

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data storage method and system
  • Data storage method and system
  • Data storage method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0029] The invention provides a data storage method, figure 1 A flow chart of Embodiment 1 of the data storage method of the present invention is shown, including:

[0030] Step S101: writing target data into a temporary file;

[0031] Obtain the target data to be written in response to the data write command, write the target data into a temporary file, and the data will be saved as a temporary file. It is necessary to ensure that the data is placed on the disk to deal with hardware restart and hardware power failure.

[0032] Step S102: Rename the temporary file to a formal file by calling the rename system.

[0033] In Linux / UNIX systems, the rename system call has a feature: if the target file already exists, it will be replaced atomically. The rename under the Windows system will fail when the target file already exists, so this solution does not apply to the Windows system.

[0034] The function of the rename function is to rename a file. This function can be used to ...

Embodiment 2

[0042] The present invention also provides a data storage system, figure 2 It shows a schematic structural diagram of Embodiment 2 of the data storage system of the present invention, including:

[0043] Temporary file writing module 101, is used for writing target data into temporary file;

[0044] The official file acquisition module 102 is configured to rename the temporary file into an official file by calling the rename system.

[0045] Such as image 3 shown, corresponding to figure 2 , this embodiment may also include:

[0046] The target data obtaining module 100 is used to obtain the target data to be written in response to the data writing instruction;

[0047] The data reading module 103 is configured to read the target data from the official document in response to the target data read instruction.

[0048] Apply a kind of data storage system provided by this embodiment, write the target data into the temporary file, rename the temporary file into a formal f...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The present invention discloses a data storage method and system. Target data is write into a temporary file, the temporary file is renamed as an official file by using a rename system calling manner, writing the temporary file cannot affect data in the official file, and if a renaming operation result is successful, the official file can be replaced by the temporary file, and original data can be entirely replaced by the stored data; and if the result is failed, an operating system can ensure that the official file is not affected. In both cases, the data in the official file is always consistent and complete. Atomicity of file replacement is ensured by the atomicity of rename system call, and if a target file has already existed, the target file will be atomically replaced, so that data storage consistency can be realized efficiently and in low cost.

Description

technical field [0001] The invention relates to the field of distributed data processing, in particular to a data storage method and system. Background technique [0002] When running a software system, sometimes some data generated or required by the system will be stored on the disk. The advantage of this method is that when the system is suspended due to accidents (process crash or killing, operating system crash, system power failure or immediate restart, etc.), the data can be read from the disk again after the next startup, and partially or completely restored The operating state of the system prior to the abort. [0003] In the above design, as the data is continuously updated, it is also necessary to save these updates to the disk from time to time, and ensure the consistency (no data errors) and integrity (no data loss) of these data after saving, otherwise , the system will encounter problems after restarting. In order to achieve the consistency of data storage ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30G06F11/14
CPCG06F11/1407G06F16/116G06F16/182
Inventor 吴明桥文中领
Owner INSPUR BEIJING ELECTRONICS INFORMATION IND
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products