A method and device for storing data
A technology for saving data and data, which is applied in the computer field, can solve problems such as data corruption, and achieve the effect of a highly reliable data storage system
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0036] In order to provide users with highly reliable data storage, the embodiment of the present invention provides a method for saving data, see figure 1 , the method includes:
[0037] 101: Receive the operation data of the operation object in a transaction cycle, and save the operation data to the memory;
[0038] Wherein, the received operation data for the operation object in the file system can be directly directed to the memory of the computer by calling corresponding instructions and pointers of the computer.
[0039] 102: Back up the original data of the operation object in the compound document to a log file;
[0040] Wherein, when the computer receives the operation data for the operation object in the file system, it can determine the original data of the operation object in the compound document, read this part of original data from the compound document, and back it up to the log file. The log file and the compound document are independent of each other. The m...
Embodiment 2
[0045] In order to provide users with highly reliable data storage and overcome the problems in the prior art that the compound document in the hard disk is damaged due to the abnormality of the application program in the file system during the process of saving data, the embodiment of the present invention provides a data saving method, by which the "All or Nothing" transactional feature of data operations in the file system can be realized. Taking the execution subject as a commonly used computer and the file system of the computer to process various operation instructions as an example, see figure 2 , the method includes:
[0046] 201: The computer receives the operation data of the operation object within a transaction cycle, and sends an operation request to the file system;
[0047]It should be noted that the transaction cycle specifically refers to the time required to complete a specific transaction. Taking the write operation as an example, the computer needs to go...
Embodiment 3
[0085] In order to provide users with highly reliable data storage and overcome the problems in the prior art that the compound document in the hard disk is damaged due to the abnormality of the file system in the file system, the embodiment of the present invention provides a method for saving data, through which the Realize the "All or Nothing" transactional feature of data operations in the file system. Different from Embodiment 2, the log file provided in this Embodiment 3 has a flag, and the flag is used to identify whether the log file is valid, and the execution subject is a commonly used computer, and the computer's instructions cooperate with each other to complete the method For example, see image 3 , the method includes:
[0086] 301: The computer receives the operation data of the operation object in a transaction cycle, and after judging that it is a corresponding operation on the file system, directly saves the received operation data in the memory of the compu...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 