Method and device for conducting data reading and writing on storage device
A storage device and data writing technology, applied in the field of information security, can solve problems such as affecting the service life of storage devices, reducing the security of smart cards, and losing data in storage devices.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0225] Embodiment 1 of the present invention provides a method for reading and writing data on a storage device, such as figure 1 As shown, it includes: calling the write function, passing the data to be written, the length of the data to be written, and the logical address of the data to be written to the write function, and the write function receives the incoming data to be written, After the length of the data to be written and the logical address of the data to be written, perform the following operations:
[0226] Step 101: Obtain a system table from the storage device, write the system table into the system table cache area, calculate the logical page number of the data to be written according to the logical address of the data to be written, and calculate the logical page number of the data to be written according to the A logical page number, calculating a logical page number of an address-mapped page corresponding to the logical page number and an offset within a pag...
Embodiment 2
[0236] Embodiment 2 of the present invention provides a method for reading data from a storage device, such as figure 2 As shown, the storage device in this embodiment uses the method provided in Embodiment 1 to write data; the method includes: calling a read function, and passing in a read address (the address is a logical address) to the read function ) and read length, after the read function receives the incoming read address and read length, it performs the following operations:
[0237] Step 201: Acquiring a system table from the storage device, and judging whether the system table is empty, if yes, execute step 207, otherwise execute step 202;
[0238] Step 202: Calculate the logical page number according to the read address, calculate the physical page number of the address-mapped page corresponding to the logical page number and the offset of the logical page number within the page of the address-mapped page;
[0239] Step 203: judging whether the physical page numb...
Embodiment 3
[0247] Embodiment 3 of the present invention provides a method for writing data to a storage device. In this embodiment, the preset page length is 256 bytes as an example for illustration, as shown in image 3 and Figure 4 As shown, it includes: calling the write function, passing in the data to be written, the length of the data to be written, and the logical address of the data to be written to the write function, and the write function receives the incoming data to be written, After the length of the data to be written and the logical address of the data to be written, perform the following operations:
[0248] Step 301: Obtain the static recovery mark in the effective static recovery mark page from the storage device, judge whether the static recovery mark is a preset value, if yes, execute the operation of static recovery, execute step 302, otherwise directly execute step 302;
[0249] Specifically, obtain the data in all the static recovery mark pages, obtain the valid d...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com