CN103605600B - A kind of method and system of mobile terminal storage card memory element read-write number of times record - Google Patents

A kind of method and system of mobile terminal storage card memory element read-write number of times record Download PDF

Info

Publication number
CN103605600B
CN103605600B CN201310600002.XA CN201310600002A CN103605600B CN 103605600 B CN103605600 B CN 103605600B CN 201310600002 A CN201310600002 A CN 201310600002A CN 103605600 B CN103605600 B CN 103605600B
Authority
CN
China
Prior art keywords
storage card
mobile terminal
read
memory element
write
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
CN201310600002.XA
Other languages
Chinese (zh)
Other versions
CN103605600A (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.)
Weihai Shenzhou Information Technology Research Institute Co ltd
Original Assignee
TCL Communication Ningbo 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 TCL Communication Ningbo Ltd filed Critical TCL Communication Ningbo Ltd
Priority to CN201310600002.XA priority Critical patent/CN103605600B/en
Publication of CN103605600A publication Critical patent/CN103605600A/en
Application granted granted Critical
Publication of CN103605600B publication Critical patent/CN103605600B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention discloses the method and system of a kind of mobile terminal storage card memory element read-write number of times record, described method includes: pre-set the log file for record storage unit read-write number of times in A, storage card, when detecting that described storage card is inserted into mobile terminal, described log file is copied in mobile terminal;B, described storage card read or write detected, update the log file preserved in mobile terminal according to testing result;C, detect that the log file of latest update, when mobile terminal is extracted, is preserved to storage card by described storage card.The present invention is by detection and records the read-write number of times in storage card, it is achieved the real-time monitoring to storage card service condition, can give warning in advance the storage card that will damage, it is to avoid because the damage of storage card causes the risk that subscriber data loses.

Description

A kind of method and system of mobile terminal storage card memory element read-write number of times record
Technical field
The present invention relates to mobile terminal memory card applications field, particularly relate to the method and system of a kind of mobile terminal storage card memory element read-write number of times record.
Background technology
Along with developing rapidly of memory card technologies, the most can produce various volume little, the storage card that memory capacity is big, people always use various sorts of memory cards to extend the memory space of mobile terminal, such as microSD card, TF card etc..And storage card in general service life is all limited, limited number of time read-write i.e. can only be carried out;Read-write number of times, if it exceeds the number of times that specify of storage card, may bring loss to user, the most then cause storage card to damage, the heavy then capsule information loss that is saved in storage card.And make a general survey of in prior art, and number of times being read and write for the memory element in storage card and does not make any record, user cannot know whether used storage card exists the risk of damage.
Therefore, prior art has yet to be improved and developed.
Summary of the invention
In view of above-mentioned the deficiencies in the prior art, it is an object of the invention to provide the method and system of a kind of mobile terminal storage card memory element read-write number of times record, it is intended to solve current mobile terminal storage card and damage the unforeseen problem of risk.
Technical scheme is as follows:
The method of a kind of mobile terminal storage card memory element read-write number of times record, wherein, said method comprising the steps of:
A, storage card pre-set the log file for record storage unit read-write number of times, when detecting that described storage card is inserted into mobile terminal, described log file is copied in mobile terminal;
B, described storage card read or write detected, update the log file preserved in mobile terminal according to testing result;
C, detect that the log file of latest update, when mobile terminal is extracted, is preserved to storage card by described storage card.
The method of described mobile terminal storage card memory element read-write number of times record, wherein, described storage card is microSD card or TF card.
The method of described mobile terminal storage card memory element read-write number of times record, wherein, each memory element one byte content of storage of described storage card.
The method of described mobile terminal storage card memory element read-write number of times record, wherein, reads and writes the object of number of times every 32000 memory cell selecting one memory element as described log file record in the memory element of described storage card.
The method of described mobile terminal storage card memory element read-write number of times record, wherein, reads and writes the object of number of times every 1000 memory cell selecting one memory element as described log file record in the memory element of described storage card.
The method of described mobile terminal storage card memory element read-write number of times record, wherein, in described log file, the information of each memory element of record includes: the number of times that memory unit address, this memory element have been read, the number of times that this memory element has been write.
The method of described mobile terminal storage card memory element read-write number of times record, wherein, described step B also includes:
The log file that detection updates exceedes the memory element reading or writing number of times higher limit, and adds up the quantity of such memory element, it is judged that whether this quantity exceedes default threshold value, if exceeding threshold value, then sends prompting message.
The method of described mobile terminal storage card memory element read-write number of times record, wherein, described default threshold value is the 80% of total number of memory cells.
A kind of system realizing mobile terminal storage card memory element as above read-write number of times recording method, it is characterised in that described system includes:
Storage card detection module, inserts or pull out the action of mobile terminal, and and then trigger recording file replication module for detecting storage card;
Log file replication module, in the mobile terminal copied to by log file, or copied to log file storage card from mobile terminal when storage card is extracted when storage card inserts;
Log file more new module, for updating the log file preserved in mobile terminal according to detected storage card read or write.
Memory module, is used for when detecting that described storage card is inserted into mobile terminal, the log file in storage replication to mobile terminal.
Described mobile terminal storage card memory element read-write number of times record system, wherein, described system also includes:
Judge module, for judging that exceeding of statistics reads or writes the number of memory cells of number of times higher limit and whether exceed default threshold value;
Prompting module, for reading or writing the number of memory cells of number of times higher limit and exceed the judged result of threshold value according to exceeding of described judge module and send prompting message.
Beneficial effect: the present invention provides the method and system of a kind of mobile terminal storage card memory element read-write number of times record, by detecting and recording the read-write number of times in storage card, realize the real-time monitoring to storage card service condition, the storage card that will damage can be given warning in advance, it is to avoid because the damage of storage card causes the risk that subscriber data loses.
Accompanying drawing explanation
Fig. 1 is the method flow diagram of the mobile terminal storage card memory element read-write number of times record of the present invention.
Fig. 2 is the mobile terminal storage card memory element read-write number of times record system principle diagram of the present invention.
Fig. 3 is the system pie graph that in presently preferred embodiments of the present invention, storage card memory element read-write number of times is recorded by mobile terminal.
Detailed description of the invention
The present invention provides the method and system of a kind of mobile terminal storage card memory element read-write number of times record, and for making the purpose of the present invention, technical scheme and effect clearer, clear and definite, the present invention is described in more detail below.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The method of a kind of mobile terminal storage card memory element read-write number of times record, wherein, said method comprising the steps of:
S100, storage card pre-set the log file for record storage unit read-write number of times, when detecting that described storage card is inserted into mobile terminal, described log file is copied in mobile terminal.
Wherein, described storage card is microSD card or TF card, and microSD card, the conventional FAT file system form of TF card at present, and bunch size of acquiescence is 32kB in FAT file system form, bunch be storage cell minimum in file system, i.e. minimum memory unit is 32kB.And each memory element one byte content of storage.It is therefore advantageous in embodiment, the memory element of described storage card reads and writes the object of number of times every 32000 memory cell selecting one memory element as described log file record.So can realize the detection of storage cell all to storage card.
In a further preferred embodiment, least unit bunch in view of storage cards such as file system operation microSD cards is typically all more than 1kB's, therefore, the memory element of described storage card reads and writes the object of number of times every 1000 memory cell selecting one memory element as described log file record.
In described log file, the information of each memory element of record generally comprises: the number of times that memory unit address, this memory element have been read, the number of times that this memory element has been write.Then this information format is (number of times that memory unit address, this memory element have been read, the number of times that this memory element has been write), using every 1000 memory cell selecting one memory element as read-write number of times object as a example by, in log file preserve content as follows:
(0, address is the number of times read of memory element of 0, and address is the number of times write of memory element of 0)
(1000, address is the number of times read of memory element of 1000, and address is the number of times write of memory element of 1000)
(2000, address is the number of times read of memory element of 2000, and address is the number of times write of memory element of 2000)
(3000, address is the number of times read of memory element of 3000, and address is the number of times write of memory element of 3000).
S200, described storage card read or write detected, update the log file preserved in mobile terminal according to testing result.
Described storage card read or write detected, the most concrete detected rule by: judge that this reads or writes the memory unit address of the operation of the storage card number of memory cells whether aliquot is spaced, if it is update the number of times that this address storaging unit has been read or the number of times write;If this read or write storage card operation have multiple memory unit address to meet the number of memory cells that can be spaced to divide exactly, update the number of times that the memory element of these addresses has been read or the number of times write the most successively.Such as, if reading and writing the object of number of times every 1000 memory cell selecting one memory element as described log file record according in the memory element of storage card, then during detection read-write number of times, each memory unit address the most completely tripe during detection once reads or writes can be divided exactly by 1000, if can, then update the number of times read or write of this memory element in log file.
Described step S200 also includes: exceed, in the log file that detection updates, the memory element reading or writing number of times higher limit, and add up the quantity of such memory element, judge whether this quantity exceedes default threshold value, if exceeding threshold value, then send prompting message, remind user to change storage card in time to prevent data from losing.In preferred embodiment, described default threshold value is set by mobile terminal production firm, is usually set to the 80% of total number of memory cells.
S300, detect that the log file of latest update, when mobile terminal is extracted, is preserved to storage card by described storage card.
A kind of system realizing mobile terminal storage card memory element as above read-write number of times recording method as shown in Figure 2, it is characterised in that described system includes:
Storage card detection module 110, inserts or pull out the action of mobile terminal, and and then trigger recording file replication module for detecting storage card;
Log file replication module 120, in the mobile terminal copied to by log file, or copied to log file storage card from mobile terminal when storage card is extracted when storage card inserts;
Log file more new module 130, for updating the log file preserved in mobile terminal according to detected storage card read or write;
Memory module 140, is used for when detecting that described storage card is inserted into mobile terminal, the log file in storage replication to mobile terminal.
Judge module 150, for judging that exceeding of statistics reads or writes the number of memory cells of number of times higher limit and whether exceed default threshold value;
Prompting module 160, for reading or writing the number of memory cells of number of times higher limit and exceed the judged result of threshold value according to exceeding of described judge module and send prompting message.
As shown in Figure 3 be in presently preferred embodiments of the present invention mobile terminal to the storage card memory element read-write system pie graph that records of number of times.
The central processing unit 100 of described mobile terminal is attached with micro SD card 300 by the micro SD card interface 200 arranged.
Storage card detection module 110 that described mobile terminal includes being sequentially connected with, log file replication module 120, memory module 140, log file more new module 130, judge module 150, prompting module 160.Described storage card detection module 110 is connected with micro SD card interface 200, for detect storage card into and out action.When card detection module detect microSD card insert microSD card interface time, trigger recording file replication module from microSD card duplicated record file 310 to memory module;When card detection module detects that microSD card is extracted from microSD card interface, trigger recording file replication module from memory module duplicated record file in microSD card.
Log file replication module: this module from microSD card duplicated record file to the memory module of mobile terminal, or from memory module duplicated record file in microSD card.
Log file more new module: when card detection module detects that central processing unit reads or writes microSD card, updates the number of times that in memory module, corresponding memory element reads or writes.
Judge module: after log file more new module updates, check that the number of times read or write in all memory element of record in memory module exceedes the value of the memory element number reading or writing the number of times upper limit, send alerting signal when this value exceedes default threshold values to prompting module.
Prompting module: the alerting signal that reception judge module sends issues the user with prompting, informs that user changes microSD card 100 in time to prevent data from losing.
Memory module: this module is for when card detection module detects microSD card insertion microSD card interface, being copied to the log file in microSD card in memory module by log file replication module;Afterwards, if card detection module is not detected by microSD card and extracts from microSD card interface, the number of times that the respective memory unit updating memory module record is read to or written by all central processing units by the read or write of microSD card;If card detection module detects that microSD card is extracted from microSD card interface, then during the content in memory module is copied to the log file of microSD card by log file replication module.
The preferred embodiment to the read-write number of times recording method of storage card memory element of the mobile terminal of the present invention is illustrated in conjunction with above-mentioned module and element.
Step 1, card detection module detect that microSD card inserts in microSD card interface;
Step 2, log file replication module from microSD card duplicated record file in memory module;
Step 3, card detection module detect that central processing unit reads or writes microSD card, perform step 4;
Step 4, judge that this reads or writes the memory unit address of the operation of microSD card whether aliquot 1000, if it is update the number of times that the storage unit that in memory module, this address is deposited has been read or the number of times write;If this read or write microSD card operation have multiple memory unit address to meet to be divided exactly by 1000, update the number of times that the memory element of these addresses has been read in memory module or the number of times write the most successively;
The number of times read or write in the memory element of record in step 5, inspection memory module exceedes the value of the memory element number reading or writing the number of times upper limit, sent prompting when this value exceedes default threshold values by prompting module, remind user to change microSD card in time to prevent data from losing.
If mobile terminal action is extracted in microSD card execution, perform following steps:
Step 6, card detection module detect that microSD card is extracted from microSD card interface;
Step 7, log file replication module replicate memory element read-write number of times recorded content in the duplicated record file of microSD card from memory module.
The present invention provides the method and system of a kind of mobile terminal storage card memory element read-write number of times record, by detecting and recording the read-write number of times in storage card, realize the real-time monitoring to storage card service condition, the storage card that will damage can be given warning in advance, it is to avoid because the damage of storage card causes the risk that subscriber data loses.
It should be appreciated that the application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can be improved according to the above description or convert, all these modifications and variations all should belong to the protection domain of claims of the present invention.

Claims (7)

1. the method for a mobile terminal storage card memory element read-write number of times record, it is characterised in that said method comprising the steps of:
A, storage card pre-set the log file for record storage unit read-write number of times, when detecting that described storage card is inserted into mobile terminal, described log file is copied in mobile terminal;
B, described storage card read or write detected, update the log file preserved in mobile terminal according to testing result;
C, detect that the log file of latest update, when mobile terminal is extracted, is preserved to storage card by described storage card;
Detect the specific rules of described storage card read or write by: judge that this reads or writes the memory unit address of the operation of the storage card number of memory cells whether aliquot is spaced, if it is update the number of times that this address storaging unit has been read or the number of times write;If this read or write storage card operation have multiple memory unit address to meet the number of memory cells that can be spaced to divide exactly, the most once update the number of times that the memory element of these addresses has been read or the number of times write;
Described step B also includes:
The log file that detection updates exceedes the memory element reading or writing number of times higher limit, and adds up the quantity of such memory element, it is judged that whether this quantity exceedes default threshold value, if exceeding threshold value, then sends prompting message;
Described default threshold value is the 80% of total number of memory cells.
The method of mobile terminal storage card memory element the most according to claim 1 read-write number of times record, it is characterised in that described storage card is microSD card or TF card.
The method of mobile terminal storage card memory element the most according to claim 1 read-write number of times record, it is characterised in that each memory element one byte content of storage of described storage card.
4. the method reading and writing number of times record according to the mobile terminal storage card memory element described in Claims 2 or 3, it is characterized in that, the memory element of described storage card reads and writes the object of number of times every 32000 memory cell selecting one memory element as described log file record.
5. the method reading and writing number of times record according to the mobile terminal storage card memory element described in Claims 2 or 3, it is characterized in that, the memory element of described storage card reads and writes the object of number of times every 1000 memory cell selecting one memory element as described log file record.
The method of mobile terminal storage card memory element the most according to claim 1 read-write number of times record, it is characterized in that, in described log file, the information of each memory element of record includes: the number of times that memory unit address, this memory element have been read, the number of times that this memory element has been write.
7. the system of the mobile terminal storage card memory element read-write number of times recording method that a kind realizes as described in claim 1-6, it is characterised in that described system includes:
Storage card detection module, inserts or pull out the action of mobile terminal, and and then trigger recording file replication module for detecting storage card;
Log file replication module, in the mobile terminal copied to by log file, or copied to log file storage card from mobile terminal when storage card is extracted when storage card inserts;
Log file more new module, for updating the log file preserved in mobile terminal according to detected storage card read or write, detect the specific rules of described storage card read or write by: judge that this reads or writes the memory unit address of the operation of the storage card number of memory cells whether aliquot is spaced, if it is update the number of times that this address storaging unit has been read or the number of times write;If this read or write storage card operation have multiple memory unit address to meet the number of memory cells that can be spaced to divide exactly, the most once update the number of times that the memory element of these addresses has been read or the number of times write;
Memory module, is used for when detecting that described storage card is inserted into mobile terminal, the log file in storage replication to mobile terminal;
Judge module, for judging that exceeding of statistics reads or writes the number of memory cells of number of times higher limit and whether exceed default threshold value;
Prompting module, for reading or writing the number of memory cells of number of times higher limit and exceed the judged result of threshold value according to exceeding of described judge module and send prompting message.
CN201310600002.XA 2013-11-25 2013-11-25 A kind of method and system of mobile terminal storage card memory element read-write number of times record Active CN103605600B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310600002.XA CN103605600B (en) 2013-11-25 2013-11-25 A kind of method and system of mobile terminal storage card memory element read-write number of times record

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310600002.XA CN103605600B (en) 2013-11-25 2013-11-25 A kind of method and system of mobile terminal storage card memory element read-write number of times record

Publications (2)

Publication Number Publication Date
CN103605600A CN103605600A (en) 2014-02-26
CN103605600B true CN103605600B (en) 2016-08-17

Family

ID=50123829

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310600002.XA Active CN103605600B (en) 2013-11-25 2013-11-25 A kind of method and system of mobile terminal storage card memory element read-write number of times record

Country Status (1)

Country Link
CN (1) CN103605600B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI507975B (en) * 2014-02-27 2015-11-11 Nat Univ Chung Cheng Storage device with multiple threshold and its method
CN105242977B (en) * 2015-10-20 2018-03-09 广东欧珀移动通信有限公司 The method of testing and device of a kind of storage access performance of intelligent terminal
CN105549918B (en) * 2016-02-18 2018-11-09 珠海全志科技股份有限公司 The data guard method and its device of automobile data recorder storage card
CN114648836B (en) * 2020-12-18 2023-08-11 北京万集科技股份有限公司 Charging pile charging method and device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0612195A (en) * 1992-06-29 1994-01-21 Seiko Epson Corp Magnetic recorder connector
CN1673969A (en) * 2004-03-23 2005-09-28 上海华虹集成电路有限责任公司 Method for monitoring simulation chip internal CCPROM
CN101211306A (en) * 2006-12-27 2008-07-02 宇瞻科技股份有限公司 Solid-state memory life-span warning device and its method
CN101236784A (en) * 2007-01-30 2008-08-06 富士通株式会社 Data recording system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0612195A (en) * 1992-06-29 1994-01-21 Seiko Epson Corp Magnetic recorder connector
CN1673969A (en) * 2004-03-23 2005-09-28 上海华虹集成电路有限责任公司 Method for monitoring simulation chip internal CCPROM
CN101211306A (en) * 2006-12-27 2008-07-02 宇瞻科技股份有限公司 Solid-state memory life-span warning device and its method
CN101236784A (en) * 2007-01-30 2008-08-06 富士通株式会社 Data recording system

Also Published As

Publication number Publication date
CN103605600A (en) 2014-02-26

Similar Documents

Publication Publication Date Title
CN103605600B (en) A kind of method and system of mobile terminal storage card memory element read-write number of times record
CN102043686B (en) Disaster tolerance method, backup server and system of memory database
CN107402870B (en) Method and device for processing log segment in metadata server
CN106682162A (en) Log management method and device
CN104935735A (en) Information deletion method and information deletion system
CN105260320B (en) Data processing method and device for FLASH memory
CN109614045B (en) Metadata dropping method and device and related equipment
CN106205731B (en) Information processing method and storage equipment
CN106815124A (en) Journal file treating method and apparatus
CN107958166A (en) A kind of data detection method and detection device
CN103455391B (en) A kind of apparatus and method of data protection of dynamic conditioning
CN109144754B (en) Reliability testing method and device
CN103176867A (en) Fast file differential backup method
CN105260140A (en) Disk size monitoring method and apparatus
CN102737171B (en) Method and device for storing virus file and storage equipment
CN103500138A (en) Power management method and system and mobile terminal
CN109634528A (en) A kind of rule method, apparatus, equipment and the storage medium of target data
CN103176753A (en) Storage device and data management method of storage device
CN106648990B (en) A kind of method of data in rapidly extracting BlueSky File System Watcher equipment
CN107450914A (en) A kind of informing message treatment method, device and computer-readable recording medium
CN104461754B (en) A kind of method and apparatus for monitoring eMMC
CN105045725A (en) Multi-storage-card storage realization method and system for mobile terminal
CN104660968B (en) A kind of method using multi-memory card storage warning message
CN113655958A (en) Application data storage method
CN110597674B (en) Memory detection method, device, video recording system and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20211126

Address after: 264200 19th floor, block a, innovation and entrepreneurship base, No. 213, Torch Road, torch high tech Industrial Development Zone, Weihai City, Shandong Province

Patentee after: WEIHAI ELECTRONIC INFORMATION TECHNOLOGY COMPREHENSIVE RESEARCH CENTER, MINISTRY OF INDUSTRY AND INFORMATION TECHNOLOGY

Address before: 6 / F, No.5, Lane 999, Yangfan Road, high tech Zone, Ningbo, Zhejiang 315100

Patentee before: TCL COMMUNICATION (NINGBO) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221118

Address after: 264200 18th Floor, Building A, Innovation and Entrepreneurship Base, No. 213, Torch Road, Torch Hi tech Industrial Development Zone, Weihai, Shandong

Patentee after: Weihai Shenzhou Information Technology Research Institute Co.,Ltd.

Address before: 264200 19th floor, block a, innovation and entrepreneurship base, No. 213, Torch Road, torch high tech Industrial Development Zone, Weihai City, Shandong Province

Patentee before: WEIHAI ELECTRONIC INFORMATION TECHNOLOGY COMPREHENSIVE RESEARCH CENTER, MINISTRY OF INDUSTRY AND INFORMATION TECHNOLOGY

TR01 Transfer of patent right