CN102023817A - Read and write control method and system of storage device data - Google Patents

Read and write control method and system of storage device data Download PDF

Info

Publication number
CN102023817A
CN102023817A CN 201010572365 CN201010572365A CN102023817A CN 102023817 A CN102023817 A CN 102023817A CN 201010572365 CN201010572365 CN 201010572365 CN 201010572365 A CN201010572365 A CN 201010572365A CN 102023817 A CN102023817 A CN 102023817A
Authority
CN
China
Prior art keywords
storage area
physical address
operational order
logical
address
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
CN 201010572365
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.)
Shenzhen Netcom Electronics Co Ltd
Original Assignee
Shenzhen Netcom Electronics 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 Shenzhen Netcom Electronics Co Ltd filed Critical Shenzhen Netcom Electronics Co Ltd
Priority to CN 201010572365 priority Critical patent/CN102023817A/en
Publication of CN102023817A publication Critical patent/CN102023817A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention is applied to the technical field of data storage, providing a read and write control method and system of storage device data. The read and write control method comprises the following steps: receiving an operation command sent by a host end, and the operation command contains logic address of read and write operation; converting the logic address of the read and write operation to a physical address according to the corresponding relation between the logic address and the physical address; judging a storage area in which the converted physical address is positioned, wherein the storage area comprises a private data storage area and a logic storage area; when the converted physical address is positioned in the private data storage area, controlling to refuse to execute the operation command sent by the host end; and when the converted physical address is positioned in the logic storage area, controlling to execute the operation command sent by the host end. In the embodiment of the invention, the erasion by mistake on the private data storage area caused by addressing mistake can be effectively prevented, thereby protecting the safety of storage data in storage equipment.

Description

A kind of read/writing control method of storage device data and system
Technical field
The invention belongs to technical field of data storage, relate in particular to a kind of read/writing control method and system of storage device data.
Background technology
Memory device mainly comprises controller, storage unit and external interface, wherein, storage unit is used to provide storage area, usually be divided into private data memory block and logical storage area, the storage area that external host can not be visited is defined as the private data memory block, is used for the firmware program of memory, the inside relevant information of firmware program, the bad block table and the information such as logical address and physical address mapping table of flash memory; The storage area that external host can be visited is defined as logical storage area, this part is used for other data that store file sys-tem data and main frame write, each storage area all has corresponding physical address interval in the storage unit, and its size can be adjusted as required.
Main frame is by logical address access data in memory device, when memory device receives the logical address of main frame transmission, described logical address need be converted to physical address corresponding, operate accordingly again, therefore in memory device, be necessary to set up the corresponding relation that a mapping table writes down logical address and physical address, with conversion foundation as logical address and physical address.
Development along with IT application process, reliability to the memory device, stores data, security is had higher requirement, particularly when memory device faces rugged surroundings, host computer system instability for example, or himself reason (for example there are incidents such as flaw or electrical noise in memory device), may the read-write of memory device be gone wrong, addressing error particularly, may cause wrong erasable to the private data memory block that comprises firmware program, and the data of private data memory block in stored is equipment is stable, safety is the prerequisite that guarantees the safety of the storage data in the logical storage area in the memory device, therefore, if the data in the private data memory block in the storage go wrong, especially the mapping table of logical address and physical address goes wrong, for example deleted by mistake or destroy, will directly cause can't the proper operation memory device.
Summary of the invention
The object of the present invention is to provide a kind of read/writing control method of storage device data, be intended to solve memory device in the prior art and cause wrong erasable to the private data memory block that stores firmware program, logical address and physical address mapping table because of addressing error takes place, thus cause can't the proper operation memory device problem
The present invention is achieved in that a kind of read/writing control method of storage device data, and described method comprises the steps:
Receive the operational order that host side sends, described operational order comprises the logical address of read-write operation;
According to the corresponding relation of logical address and physical address, the logical address of described read-write operation is converted to physical address;
Judge the storage area at the physical address place after changing, described storage area comprises private data memory block and logical storage area;
Physical address after conversion is during in described private data memory block, and the control refusal is carried out the operational order that described host side sends;
Physical address after conversion is during in described logical storage area, and the operational order that described host side sends is carried out in control.
Another embodiment of the present invention is to provide the read-write control system of storage device data, and described system comprises:
The operational order receiver module is used to receive the operational order that host side sends, and described operational order comprises the logical address of read-write operation;
Address conversion module is used for the corresponding relation according to logical address and physical address, and the logical address of described read-write operation is converted to physical address;
The storage area judge module is used for the storage area according to pre-defined division, judges the storage area at the physical address place after changing, and described storage area comprises private data memory block and logical storage area;
First control module, when being used for physical address after described storage area judge module is judged conversion in described private data memory block, the control refusal is carried out the operational order that described host side sends; And
Second control module, when being used for physical address after described storage area judge module is judged conversion in described logical storage area, the operational order that described host side sends is carried out in control.
In embodiments of the present invention, receive the operational order that host side sends, described operational order comprises the logical address of read-write operation; According to the corresponding relation of logical address and physical address, the logical address of described read-write operation is converted to physical address; Judge the storage area at the physical address place after changing, described storage area comprises private data memory block and logical storage area; Physical address after conversion is during in described private data memory block, and the control refusal is carried out the operational order that described host side sends; Physical address after conversion is during in described logical storage area, and the operational order that described host side sends is carried out in control, effectively prevents because of addressing error causes wrong erasable to the private data memory block, thereby has protected security of storage data in the memory device.
Description of drawings
Fig. 1 is the realization flow figure of the read/writing control method of the storage device data that provides of first embodiment of the invention;
Fig. 2 is the realization flow figure of the read/writing control method of the storage device data that provides of second embodiment of the invention;
Fig. 3 is the structured flowchart of the read-write control system of the storage device data that provides of the embodiment of the invention.
Embodiment
In order to make purpose of the present invention, technical scheme and beneficial effect clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
In embodiments of the present invention; the storage area at the corresponding physical address of logical address place in the operational order that the judgement host side sends; when in logical storage area; then allow operation; in the time of in the private data memory block; then refusal operation, thus effectively prevent because of addressing error causes wrong erasable to the private data memory block, thus protected security of storage data in the memory device.
The purpose of the embodiment of the invention is to provide a kind of read/writing control method of storage device data, and described method comprises the steps:
Receive the operational order that host side sends, described operational order comprises the logical address of read-write operation;
According to the corresponding relation of logical address and physical address, the logical address of described read-write operation is converted to physical address;
Judge the storage area at the physical address place after changing, described storage area comprises private data memory block and logical storage area;
Physical address after conversion is during in described private data memory block, and the control refusal is carried out the operational order that described host side sends;
Physical address after conversion is during in described logical storage area, and the operational order that described host side sends is carried out in control.
Another embodiment of the present invention is to provide the read-write control system of storage device data, and described system comprises:
The operational order receiver module is used to receive the operational order that host side sends, and described operational order comprises the logical address of read-write operation;
Address conversion module is used for the corresponding relation according to logical address and physical address, and the logical address of described read-write operation is converted to physical address;
The storage area judge module is used to judge the storage area at the physical address place after the conversion, and described storage area comprises private data memory block and logical storage area;
First control module, when being used for physical address after described storage area judge module is judged conversion in described private data memory block, the control refusal is carried out the operational order that described host side sends; And
Second control module, when being used for physical address after described storage area judge module is judged conversion in described logical storage area, the operational order that described host side sends is carried out in control.
In embodiments of the present invention, receive the operational order that host side sends, described operational order comprises the logical address of read-write operation; According to the corresponding relation of logical address and physical address, the logical address of described read-write operation is converted to physical address; Judge the storage area at the physical address place after changing, described storage area comprises private data memory block and logical storage area; Physical address after conversion is during in described private data memory block, and the control refusal is carried out the operational order that described host side sends; Physical address after conversion is during in described logical storage area, and the operational order that described host side sends is carried out in control.
Fig. 1 shows the implementation method of the read/writing control method of the storage device data that first embodiment of the invention provides, and its concrete step is as described below:
In step S101, receive the operational order that host side sends, described operational order comprises the logical address of read-write operation.
In step S102,, the logical address of described read-write operation is converted to physical address according to the corresponding relation of logical address and physical address.
In embodiments of the present invention, store the logical address of storage area and the corresponding relation of physical address in the memory device, the entrained address of operational order that receives from host side all is a logical address, when the data in the memory device are read and write, logical address need be converted to physical address, could really read and write the data of storage.
In step S103, judge the storage area at the physical address place after changing, described storage area comprises private data memory block and logical storage area.
In step S104, the physical address after conversion is during in described private data memory block, and the control refusal is carried out the operational order that described host side sends.
In embodiments of the present invention, this refusal executable operations is that the operational order that host side sends is left intact, and promptly is understood that illegal command.
In step S105, the physical address after conversion is during in described logical storage area, and the operational order that described host side sends is carried out in control.
In embodiments of the present invention, the physical address after conversion is carried out described operational order during in logical storage area, and data are read and write.
In embodiments of the present invention, needed in advance the storage area of memory device is defined division before carrying out this embodiment, it is specially:
Memory device mainly comprises several parts such as controller, storage unit and external interface, wherein, storage unit is used to provide storage area, storage area can be divided into private data memory block and logical storage area, the storage area that the embodiment of the invention can not be visited external host is defined as the private data memory block, is used for the firmware program of memory storage devices, the inside relevant information of firmware program, the bad block table and the information such as logical address and physical address mapping table of flash memory; The storage area that external host can be visited is defined as logical storage area, and this part is used for other data that store file sys-tem data and host side write.
Wherein, each storage area all has corresponding physical address interval in the storage unit, and its size can be adjusted as required.
Fig. 2 shows the realization flow of the read/writing control method of the storage device data that second embodiment of the invention provides, and its concrete step is as described below:
In step S201, receive the operational order that host side sends, described operational order comprises the logical address of read-write operation.
In step S202,, the logical address of described read-write operation is converted to physical address according to the corresponding relation of logical address and physical address.
In step S203, whether the storage area of judging the physical address place after the conversion in described private data memory block, is execution in step S204 then, otherwise execution in step S206.
In embodiments of the present invention, described storage area comprises private data memory block and logical storage area, and its concrete realization does not repeat them here as described in the above-mentioned embodiment.
In step S204, the physical address after conversion is during in described private data memory block, and the control refusal is carried out the operational order that described host side sends.
In step S205, when the control refusal is carried out the operational order of described host side transmission, point out the information of current operating mistake.
In embodiments of the present invention, this points out the information of current operating mistake to realize by the mode of prompt window or voice suggestion or warning, this not in order to the restriction the present invention.
In step S206, the physical address after conversion is during in described logical storage area, and the operational order that described host side sends is carried out in control.
In embodiments of the present invention; because of the private data memory block by the physical address access data; operation transparent to host side; therefore when the logical address physical address corresponding is positioned at the private data memory block in the operational order that main frame sends; can judge that addressing error has taken place in this operation; so the embodiment of the invention can effectively prevent because of addressing error causes wrong erasable to the private data memory block, thereby protect security of storage data in the memory device.
Simultaneously, by the faulty operation information indicating that above-mentioned steps S206 provides, the memory device user can find the mistake that memory device takes place timely, and then adopts an effective measure and avoid the generation of other mistakes.
Fig. 3 shows the structured flowchart of the read-write control system of the storage device data that the embodiment of the invention provides, and has only provided the part relevant with the embodiment of the invention for convenience of explanation among the figure.
Operational order receiver module 11 receives the operational order that host side sends, and described operational order comprises the logical address of read-write operation; Address conversion module 12 is according to the corresponding relation of logical address and physical address, and the logical address of described read-write operation is converted to physical address; Storage area judge module 13 is judged the storage area at the physical address place after the conversion, and described storage area comprises private data memory block and logical storage area; Physical address after described storage area judge module 13 is judged conversion is during in described private data memory block, and first control module, 14 control refusals are carried out the operational order that described host side sends; Physical address after described storage area judge module 13 is judged conversion is during in described logical storage area, and the operational order that described host side sends is carried out in 15 controls of second control module.
In embodiments of the present invention, storage area to memory device defines division in advance, described storage area is divided into private data memory block and logical storage area, wherein, the private data memory block can not be visited by external host, and it is used for the firmware program of memory storage devices, the inside relevant information of firmware program, bad block table and the logical address and the physical address mapping table information of flash memory; Logical storage area can be visited by external host, and it is used for the file system data of memory storage devices and the data that host side writes.
In embodiments of the present invention, when described first control module, 14 control refusals are carried out the operational order of described host side transmission, the information of the current operating mistake of reminding module 16 promptings.
Above-mentioned only is system embodiment of the present invention, and the function of its each module does not repeat them here as described in the above-mentioned method embodiment.
In embodiments of the present invention, receive the operational order that host side sends, described operational order comprises the logical address of read-write operation; According to the corresponding relation of logical address and physical address, the logical address of described read-write operation is converted to physical address; Judge the storage area at the physical address place after changing, described storage area comprises private data memory block and logical storage area; Physical address after conversion is during in described private data memory block, and the control refusal is carried out the operational order that described host side sends; Physical address after conversion is during in described logical storage area, and the operational order that described host side sends is carried out in control, effectively prevents because of addressing error causes wrong erasable to the private data memory block, thereby has protected security of storage data in the memory device; Simultaneously, when refusal was carried out described operational order, prompting user corresponding error information made things convenient for the user to find the mistake that memory device takes place timely, and then adopts an effective measure and avoid the generation of other mistakes.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1. the read/writing control method of a storage device data is characterized in that, described method comprises the steps:
Receive the operational order that host side sends, described operational order comprises the logical address of read-write operation;
According to the corresponding relation of logical address and physical address, the logical address of described read-write operation is converted to physical address;
Judge the storage area at the physical address place after changing, described storage area comprises private data memory block and logical storage area;
Physical address after conversion is during in described private data memory block, and the control refusal is carried out the operational order that described host side sends;
Physical address after conversion is during in described logical storage area, and the operational order that described host side sends is carried out in control.
2. the method for claim 1, it is characterized in that, described private data memory block can not be visited by external host, and it is used for the firmware program of memory storage devices, the inside relevant information of firmware program, bad block table and the logical address and the physical address mapping table information of flash memory.
3. the method for claim 1 is characterized in that, described logical storage area can be visited by external host, and it is used for the file system data of memory storage devices and the data that host side writes.
4. the method for claim 1 is characterized in that, when carrying out described physical address after conversion in described private data memory block, in the time of the step of the operational order that the described host side of control refusal execution sends, described method also comprises the steps:
When the control refusal is carried out the operational order of described host side transmission, point out the information of current operating mistake.
5. the read-write control system of a storage device data is characterized in that, described system comprises:
The operational order receiver module is used to receive the operational order that host side sends, and described operational order comprises the logical address of read-write operation;
Address conversion module is used for the corresponding relation according to logical address and physical address, and the logical address of described read-write operation is converted to physical address;
The storage area judge module is used to judge the storage area at the physical address place after the conversion, and described storage area comprises private data memory block and logical storage area;
First control module, when being used for physical address after described storage area judge module is judged conversion in described private data memory block, the control refusal is carried out the operational order that described host side sends; And
Second control module, when being used for physical address after described storage area judge module is judged conversion in described logical storage area, the operational order that described host side sends is carried out in control.
6. system as claimed in claim 5, it is characterized in that, described private data memory block can not be visited by external host, and it is used for the firmware program of memory storage devices, the inside relevant information of firmware program, bad block table and the logical address and the physical address mapping table information of flash memory.
7. system as claimed in claim 5 is characterized in that described logical storage area can be visited by external host, and it is used for the file system data of memory storage devices and the data that host side writes.
8. system as claimed in claim 5 is characterized in that, described system also comprises:
Reminding module is used for pointing out the information of current operating mistake when described first control module control refusal is carried out the operational order of described host side transmission.
CN 201010572365 2010-12-03 2010-12-03 Read and write control method and system of storage device data Pending CN102023817A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010572365 CN102023817A (en) 2010-12-03 2010-12-03 Read and write control method and system of storage device data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010572365 CN102023817A (en) 2010-12-03 2010-12-03 Read and write control method and system of storage device data

Publications (1)

Publication Number Publication Date
CN102023817A true CN102023817A (en) 2011-04-20

Family

ID=43865150

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010572365 Pending CN102023817A (en) 2010-12-03 2010-12-03 Read and write control method and system of storage device data

Country Status (1)

Country Link
CN (1) CN102023817A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102566939A (en) * 2011-12-19 2012-07-11 记忆科技(深圳)有限公司 Solid state disk (SSD) and read-modify-write operation data management method thereof
CN103942499A (en) * 2014-03-04 2014-07-23 北京中天安泰信息科技有限公司 Data black hole processing method based on mobile storer and mobile storer
CN105353989A (en) * 2015-11-19 2016-02-24 华为技术有限公司 Stored data access method, related controller, device, mainframe and system
CN107665175A (en) * 2016-07-27 2018-02-06 展讯通信(上海)有限公司 The method, apparatus and electronic equipment of memory partition isolation
CN109214204A (en) * 2018-07-13 2019-01-15 深圳大普微电子科技有限公司 Data processing method and storage equipment
CN109407993A (en) * 2018-10-31 2019-03-01 深圳市硅格半导体有限公司 Data access method, device, computer readable storage medium and system
CN111797037A (en) * 2020-09-08 2020-10-20 北京优炫软件股份有限公司 File tamper-proofing method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1124377A (en) * 1995-12-21 1996-06-12 沈阳工业高等专科学校工矿备件公司 Hard disk information protective technology and equipment for micro computer
CN101082886A (en) * 2006-05-30 2007-12-05 松下电器产业株式会社 Memory data protecting device and LSI for IC card

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1124377A (en) * 1995-12-21 1996-06-12 沈阳工业高等专科学校工矿备件公司 Hard disk information protective technology and equipment for micro computer
CN101082886A (en) * 2006-05-30 2007-12-05 松下电器产业株式会社 Memory data protecting device and LSI for IC card

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102566939B (en) * 2011-12-19 2014-12-03 记忆科技(深圳)有限公司 Solid state disk (SSD) and read-modify-write operation data management method thereof
CN102566939A (en) * 2011-12-19 2012-07-11 记忆科技(深圳)有限公司 Solid state disk (SSD) and read-modify-write operation data management method thereof
CN103942499B (en) * 2014-03-04 2017-01-11 中天安泰(北京)信息技术有限公司 Data black hole processing method based on mobile storer and mobile storer
CN103942499A (en) * 2014-03-04 2014-07-23 北京中天安泰信息科技有限公司 Data black hole processing method based on mobile storer and mobile storer
CN105353989B (en) * 2015-11-19 2018-12-28 华为技术有限公司 Storing data access method and relevant controller, equipment, host and system
CN105353989A (en) * 2015-11-19 2016-02-24 华为技术有限公司 Stored data access method, related controller, device, mainframe and system
US10783086B2 (en) 2015-11-19 2020-09-22 Huawei Technologies Co., Ltd. Method and apparatus for increasing a speed of accessing a storage device
CN107665175A (en) * 2016-07-27 2018-02-06 展讯通信(上海)有限公司 The method, apparatus and electronic equipment of memory partition isolation
CN109214204A (en) * 2018-07-13 2019-01-15 深圳大普微电子科技有限公司 Data processing method and storage equipment
CN109214204B (en) * 2018-07-13 2020-11-10 深圳大普微电子科技有限公司 Data processing method and storage device
CN109407993A (en) * 2018-10-31 2019-03-01 深圳市硅格半导体有限公司 Data access method, device, computer readable storage medium and system
CN109407993B (en) * 2018-10-31 2022-05-27 深圳市硅格半导体有限公司 Data access method, device, computer readable storage medium and system
CN111797037A (en) * 2020-09-08 2020-10-20 北京优炫软件股份有限公司 File tamper-proofing method and device

Similar Documents

Publication Publication Date Title
CN102023817A (en) Read and write control method and system of storage device data
US11360533B2 (en) Device maintenance of a data storage device including wear levelling, garbage collection, or combination thereof
CN110347412B (en) Electronic control unit firmware upgrade management method, device, equipment and storage medium
US7613871B2 (en) Storage system using a flash memory partitioned with write-once and rewritable blocks
CN101593157B (en) Bad block management (BBM) method and device for Nand Flash
CN103164342B (en) Coordinate during the carry of availability of data
CN107544919B (en) Data storage method of data storage device
CN103218274B (en) A kind of method that trouble saving is cumulative and solid state hard disc
CN102681699B (en) System and method for realizing keyboard video mouse remote management
JPWO2004031966A1 (en) Method for controlling nonvolatile memory device
CN103955431A (en) Data management method and apparatus in flash memory storage device
TW201411343A (en) Data storage device and control method for flash memory
CN106408684A (en) Fault information storage method and device
KR101652936B1 (en) Solid state drive management in power loss recovery
CN102799691A (en) File system conversion access method and file system conversion access equipment
CN111736873B (en) Program updating method, device, equipment and storage medium of electronic control unit
CN105740161A (en) Data storage device and flash memory control method
CN103593301B (en) Bad block management method and system
KR101740679B1 (en) Storage device wihh bi-directional communication techniques and system including the same
CN104657088B (en) A kind of acquisition methods and device of hard disk bad block message
CN104424115A (en) Method for restoring preset status of electronic device, memory device and electronic device
US20180232303A1 (en) Method and Apparatus for Controlling a Non-Volatile Digital Information Memory
CN102737716B (en) Memorizer memory devices, Memory Controller and method for writing data
CN104461379A (en) Method for improving stability of NAND and NAND
CN104615387B (en) Mobile unit and its design method based on XPE systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20110420