CN102520878A - Method and system for visiting intelligent secure digital (SD) card - Google Patents
Method and system for visiting intelligent secure digital (SD) card Download PDFInfo
- Publication number
- CN102520878A CN102520878A CN2011103292101A CN201110329210A CN102520878A CN 102520878 A CN102520878 A CN 102520878A CN 2011103292101 A CN2011103292101 A CN 2011103292101A CN 201110329210 A CN201110329210 A CN 201110329210A CN 102520878 A CN102520878 A CN 102520878A
- Authority
- CN
- China
- Prior art keywords
- interface document
- smart card
- module
- data
- intelligent
- 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.)
- Granted
Links
Images
Abstract
The invention relates to a method and system for visiting an intelligent secure digital (SD) card. The method comprises the following steps that: the specified data is used as a data head to be connected to intelligent card operation commands; the writing operation is executed on an interface file, and the intelligent card operation commands using the specific data as the data head are written into the interface file; when the specific data is identified, and the intelligent card operation commands are transmitted to an intelligent card; the reading operation is executed on the interface file, and the response data returned according to the intelligent card operation commands is read. The method and the system for visiting the intelligent SD card have the advantages that the specific data is used as the data head to be connected to the intelligent card operation commands and is written into the interface file, and when the specific data is identified, the intelligent card operation commands are transmitted to the intelligent card, so the response data returned according to the intelligent card operation commands is read, the intelligent card visiting is realized, any file deletion or formatting operation can be executed on the intelligent SD card, and the use by users is convenient.
Description
[technical field]
The present invention relates to data access technology, particularly a kind of method and system of visiting intelligent SD card.
[background technology]
SD card (Secure Digital Memory Card) is a kind of memory device of new generation of based semiconductor fast-flash memory device, and it is widely used on the mancarried device, like digital camera, personal digital assistant (PDA) and multimedia player etc.After in common SD card, articulating intelligent card chip, be called intelligent SD card, intelligent SD card also provides the smart card service except traditional memory function is provided.
SD controller in traditional intelligent SD card is used to discern the operation of external unit to file system, if, then visit smart card to the operation of the intelligent card interface file in the file system, otherwise visit SD storer.Application program writes interface document with the smart card operation order, and the SD controller is transmitted and should be ordered to smart card, and application program is read interface document, receives the response data that smart card returns through the SD controller.
During application program read-write intelligent card interface file, the SD controller is whether to belong to interface document through the address that fixing address realm goes to judge the application program read-write, so interface document is static, the address is fixing unalterable.If rebuild again after interface document is deleted; Because of the address of interface document in file system changes; Can be mistaken as when application program is removed the read-write interface file is visit SD storer, and when application program written document or data, as the address of writing interface document; Can cause the SD controller to think that this moment, the file or the data that write were the operations to smart card, thereby cause the file or the data failure that write this moment.Because of the docking port file is deleted or format can lead to errors, therefore inconvenient user uses.
[summary of the invention]
Based on this, be necessary to provide a kind of method of the visit intelligent SD card that is user-friendly to.
A kind of method of visiting intelligent SD card may further comprise the steps:
Particular data is connected to the smart card operation order as data head;
The docking port file is carried out write operation, has particular data and writes interface document as the smart card operation order of data head said;
When recognizing said particular data, give smart card with the smart card operation command transfer;
Said interface document is carried out read operation, read the response data that order is returned according to smart card operation.
Preferably, before the said step that particular data is connected to smart card operation order as data head, also comprise step: detect whether there is interface document; If then open interface document, if not; Dynamic creation interface document then, and open the interface document of said establishment.
Preferably, the address realm that comprises interface document in the said particular data;
After the said step to said interface document execution read operation; Also comprise step: judge whether the interface document address of reading belongs to the address realm of interface document, if then read the response data that order is returned according to smart card operation; If not, then read the interior data of SD storer.
Preferably, said the smart card operation command transfer is given after the step of said smart card, also comprise step: the address realm that writes down said interface document.
Preferably, said particular data is the figure place byte more than 32.
In addition, also be necessary to provide a kind of system of the visit intelligent SD card that is user-friendly to.
A kind of system that visits intelligent SD card comprises:
Integrate module is used for particular data is connected to the smart card operation order as data head;
The write operation module is used for the docking port file and carries out write operation, and to have particular data be that the smart card operation order of data head writes interface document with said;
Transport module is used for when recognizing said particular data, gives said smart card with the smart card operation command transfer;
The read operation module is used for said interface document is carried out read operation, reads the response data that order is returned according to smart card operation.
Preferably, also comprise detection module, opening module and establishment module, said detection module is used for detecting whether have interface document; Said opening module is used for detecting when having interface document at said detection module, opens interface document; Said establishment module is used for detecting when not having interface document at said detection module, the dynamic creation interface document, and said opening module also is used to open the interface document of said establishment.
Preferably, the address realm that comprises interface document in the said particular data; The access system of said intelligent SD card also comprises judge module, and said judge module is used to judge whether the interface document address of reading belongs to the address realm of interface document; Said read operation module also is used for when said judge module is judged said interface document address of reading and belonged to the address realm of interface document, reads the response data that order is returned according to smart card operation; Said read operation module also is used for when said judge module is judged said interface document address of reading and do not belonged to the address realm of interface document, reading the data in the SD storer.
Preferably, also comprise logging modle, be used to write down the address realm of said interface document.
Preferably, said particular data is the figure place byte more than 32.
The method and system of above-mentioned visit intelligent SD card adopt particular data is connected to the smart card operation order as data head, and it are write interface document; When recognizing this particular data; Then give smart card, thereby read the response data that order is returned according to smart card operation, realized visit smart card with the smart card operation command transfer; Can carry out the deletion or the format manipulation of any file to intelligent SD card, be user-friendly to.
[description of drawings]
Fig. 1 is the process flow diagram of the method for visit intelligent SD card among the embodiment;
Fig. 2 is the process flow diagram of the method for visit intelligent SD card among another embodiment;
Fig. 3 is the structural representation of the system of visit intelligent SD card among the embodiment;
Fig. 4 is the structural representation of the system of visit intelligent SD card among another embodiment;
Fig. 5 is the structural representation of the system of visit intelligent SD card among another embodiment.
[embodiment]
Below in conjunction with concrete embodiment and accompanying drawing the technical scheme of the method and system of visit intelligent SD card is carried out detailed description, so that it is clearer.
As shown in Figure 1, in one embodiment, a kind of method of visiting intelligent SD card may further comprise the steps:
Step S110 is connected to the smart card operation order with particular data as data head.
Including the address realm of interface document in the particular data, is 8 to 256 like the address realm of interface document.In addition, also comprise identification data as unique judgement of particular data etc. in the particular data.Particular data is connected to the smart card operation order as data head, convenient identification.Particular data must be enough complicated as data head; In order to avoid in normal read-write SD data, identical data occur; Be considered to carry out the smart card operation order, so particular data is the figure place byte more than 32, like 32 bytes, 64 bytes, 128 bytes or 256 bytes or the like.Application program on the terminal is connected to the smart card operation order with particular data as data head.Wherein, the smart card operation command definition action type of smart card, external unit is according to smart card operation command access smart card.
In one embodiment, also comprise step before the step S110: detect whether there is interface document, if, then open interface document, if not, dynamic creation interface document then, and open the interface document of establishment.When detecting less than interface document, dynamically create an interface document, do not need static establishment interface document, after preventing to delete static interface document, mistake appears in the visit of intelligent SD card.
Step S120, docking port file carry out write operation, will have particular data and write interface document as the smart card operation order of data head.
End application is carried out write operation through the docking port file, and the smart card operation order is write in the interface document.
Step S130 when recognizing this particular data, gives smart card with the smart card operation command transfer.
The data head that the SD controller recognizes this particular data is write fashionable, then thinks to carry out smart card operation, gives smart card with the smart card operation command transfer.
In one embodiment, after step S130, also comprise step: the address realm of record interface file.The address realm of this interface document is the address realm of the interface document that comprises in the particular data, with convenient follow-up judgement relatively.
Step S140 carries out read operation to this interface document, reads the response data that order is returned according to smart card operation.
In one embodiment, as shown in Figure 2, a kind of method of visiting intelligent SD card may further comprise the steps:
Step S210 is connected to the smart card operation order with particular data as data head.
This step is with step S110.
Step S220, docking port file carry out write operation, will have particular data and write interface document as the smart card operation order of data head.
Step S230 when recognizing this particular data, gives smart card with the smart card operation command transfer.
Step S240 carries out read operation to this interface document.
Step S250 judges whether the interface document address read belongs to the address realm of interface document, if, execution in step S260 then, if not, execution in step S270 then.
When the docking port file is carried out read operation; The fetch interface file address judges whether the interface document address read belongs to the address realm of interface document, is 8 to 256 like the address realm of interface document; The fetch interface file address is 8; The address realm that belongs to this interface document, expression then read the response data that order is returned according to smart card operation to smart card operation; If the fetch interface file address is 512, then do not belong to the address realm of this interface document, expression is read the data in the SD storer.Wherein, the address realm of this interface document is the address realm of the interface document that comprises in the particular data.
Step S260 reads the response data that order is returned according to smart card operation.
Step S270 reads the data in the SD storer.
Execution in step S210 capable of circulation to step S270 up to executing the order of all smart card operation, down interface files then.
As shown in Figure 3, in one embodiment, a kind of system that visits intelligent SD card comprises integrate module 310, write operation module 320, transport module 330 and read operation module 340.Wherein,
Read operation module 340 is used for this interface document is carried out read operation, reads the response data that order is returned according to smart card operation.
As shown in Figure 4, in one embodiment, the system of above-mentioned visit intelligent SD card except comprising integrate module 310, write operation module 320, transport module 330 and read operation module 340, also comprises detection module 350, opening module 360 and creates module 370.Wherein,
Creating module 370 is used for detecting when not having interface document the dynamic creation interface document at detection module 350.Opening module 360 also is used to open the interface document of establishment.Dynamically create an interface document, do not need to create interface document statically, after preventing to delete static interface document, mistake appears in the visit of intelligent SD card.
As shown in Figure 5; In a further embodiment; The system of above-mentioned visit intelligent SD card; Except comprising integrate module 310, write operation module 320, transport module 330, read operation module 340, detection module 350, opening module 360 and creating module 370, also comprise judge module 380 and logging modle 390.Wherein,
Read operation module 340 also is used for when judge module 380 is judged this interface document address of reading and belonged to the address realm of interface document, reads the response data that order is returned according to smart card operation; Read operation module 340 also is used for when judge module 380 is judged this interface document address of reading and do not belonged to the address realm of interface document, reading the data in the SD storer.
In addition, execute the order of all smart card operation after, but opening module 360 down interface files.
In other embodiments, the system of above-mentioned visit intelligent SD card can include only integrate module 310, write operation module 320, transport module 330, read operation module 340, judge module 380 and logging modle 390.
The method and system of above-mentioned visit intelligent SD card adopt particular data is connected to the smart card operation order as data head, and it are write interface document; When recognizing this particular data; Then give smart card, thereby read the response data that order is returned according to smart card operation, realized visit smart card with the smart card operation command transfer; Can carry out the deletion or the format manipulation of any file to intelligent SD card, be user-friendly to.
In addition, when detecting when not having interface document the dynamic creation interface document; Order writes interface document as the smart card operation of data head will to have particular data, need not set up static interface document, in order to avoid after deleting this static interface document; When visiting this intelligent SD card, mistake appears; Whether the interface document address of reading through judgement belongs to the address realm of interface document, further accurately judges whether to be the visit to smart card; The address realm of record interface file conveniently compares; When particular data adopts the byte more than 32 bytes, increase the complicacy of data head, reduced the probability that mistake occurs.
The above embodiment has only expressed several kinds of embodiments of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to claim of the present invention.Should be pointed out that for the person of ordinary skill of the art under the prerequisite that does not break away from the present invention's design, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with accompanying claims.
Claims (10)
1. method of visiting intelligent SD card may further comprise the steps:
Particular data is connected to the smart card operation order as data head;
The docking port file is carried out write operation, has particular data and writes interface document as the smart card operation order of data head said;
When recognizing said particular data, give smart card with the smart card operation command transfer;
Said interface document is carried out read operation, read the response data that order is returned according to smart card operation.
2. the method for visit intelligent SD card according to claim 1 is characterized in that, before the said step that particular data is connected to smart card operation order as data head; Also comprise step: detect whether there is interface document; If then open interface document, if not; Dynamic creation interface document then, and open the interface document of said establishment.
3. the method for visit intelligent SD card according to claim 1 is characterized in that, comprises the address realm of interface document in the said particular data;
After the said step to said interface document execution read operation; Also comprise step: judge whether the interface document address of reading belongs to the address realm of interface document, if then read the response data that order is returned according to smart card operation; If not, then read the interior data of SD storer.
4. the method for visit intelligent SD card according to claim 3 is characterized in that, said the smart card operation command transfer is given after the step of said smart card, also comprises step: the address realm that writes down said interface document.
5. the method for visit intelligent SD card according to claim 1 is characterized in that, said particular data is the figure place byte more than 32.
6. a system that visits intelligent SD card is characterized in that, comprising:
Integrate module is used for particular data is connected to the smart card operation order as data head;
The write operation module is used for the docking port file and carries out write operation, and to have particular data be that the smart card operation order of data head writes interface document with said;
Transport module is used for when recognizing said particular data, gives said smart card with the smart card operation command transfer;
The read operation module is used for said interface document is carried out read operation, reads the response data that order is returned according to smart card operation.
7. the system of visit intelligent SD card according to claim 6 is characterized in that, also comprises detection module, opening module and establishment module, and said detection module is used for detecting whether have interface document; Said opening module is used for detecting when having interface document at said detection module, opens interface document; Said establishment module is used for detecting when not having interface document at said detection module, the dynamic creation interface document, and said opening module also is used to open the interface document of said establishment.
8. the system of visit intelligent SD card according to claim 6 is characterized in that, comprises the address realm of interface document in the said particular data; The access system of said intelligent SD card also comprises judge module, and said judge module is used to judge whether the interface document address of reading belongs to the address realm of interface document; Said read operation module also is used for when said judge module is judged said interface document address of reading and belonged to the address realm of interface document, reads the response data that order is returned according to smart card operation; Said read operation module also is used for when said judge module is judged said interface document address of reading and do not belonged to the address realm of interface document, reading the data in the SD storer.
9. the system of visit intelligent SD card according to claim 8 is characterized in that, also comprises logging modle, is used to write down the address realm of said interface document.
10. the system of visit intelligent SD card according to claim 6 is characterized in that, said particular data is the figure place byte more than 32.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110329210.1A CN102520878B (en) | 2011-10-25 | 2011-10-25 | Method and system for visiting intelligent secure digital (SD) card |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110329210.1A CN102520878B (en) | 2011-10-25 | 2011-10-25 | Method and system for visiting intelligent secure digital (SD) card |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102520878A true CN102520878A (en) | 2012-06-27 |
CN102520878B CN102520878B (en) | 2015-03-11 |
Family
ID=46291823
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110329210.1A Active CN102520878B (en) | 2011-10-25 | 2011-10-25 | Method and system for visiting intelligent secure digital (SD) card |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102520878B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103366795A (en) * | 2013-07-10 | 2013-10-23 | 侯英祚 | Method for storing and packaging music |
CN103914263A (en) * | 2013-01-05 | 2014-07-09 | 中国银联股份有限公司 | SD card and device and method for accessing SD card |
CN106648977A (en) * | 2016-12-05 | 2017-05-10 | 武汉斗鱼网络科技有限公司 | Recovery method and device of Android system file |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101383017A (en) * | 2007-09-06 | 2009-03-11 | 中国银联股份有限公司 | Intelligent SD card and intelligent SD card access method |
CN101510187B (en) * | 2009-03-20 | 2011-03-30 | 华中科技大学 | Method for implementing smart card control instruction communication on standard data interface |
CN101526883B (en) * | 2008-03-03 | 2011-10-19 | 群联电子股份有限公司 | Data stream transmission and dispatch method, system for executing same and controller of the system |
-
2011
- 2011-10-25 CN CN201110329210.1A patent/CN102520878B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101383017A (en) * | 2007-09-06 | 2009-03-11 | 中国银联股份有限公司 | Intelligent SD card and intelligent SD card access method |
CN101526883B (en) * | 2008-03-03 | 2011-10-19 | 群联电子股份有限公司 | Data stream transmission and dispatch method, system for executing same and controller of the system |
CN101510187B (en) * | 2009-03-20 | 2011-03-30 | 华中科技大学 | Method for implementing smart card control instruction communication on standard data interface |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103914263A (en) * | 2013-01-05 | 2014-07-09 | 中国银联股份有限公司 | SD card and device and method for accessing SD card |
WO2014106464A1 (en) * | 2013-01-05 | 2014-07-10 | 中国银联股份有限公司 | Sd card and device and method for accessing sd card |
CN103914263B (en) * | 2013-01-05 | 2018-01-23 | 中国银联股份有限公司 | SD card and the device and method for accessing SD card |
CN103366795A (en) * | 2013-07-10 | 2013-10-23 | 侯英祚 | Method for storing and packaging music |
CN106648977A (en) * | 2016-12-05 | 2017-05-10 | 武汉斗鱼网络科技有限公司 | Recovery method and device of Android system file |
Also Published As
Publication number | Publication date |
---|---|
CN102520878B (en) | 2015-03-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107844431B (en) | Mapping table updating method, memory control circuit unit and memory storage device | |
TWI408551B (en) | Falsh memory storage system and flash memory controller and data processing method thereof | |
TWI451435B (en) | Non-volatile memory storage apparatus, memory controller and data storage method | |
TWI423024B (en) | Data storing method for a flash memory, and flash memory controller and flash memory storage system using the same | |
TWI443513B (en) | Memory storage device, memory controller thereof, and method for programming data thereof | |
TWI515735B (en) | Data erasing method, memory control circuit unit and memory storage apparatus | |
TWI425355B (en) | Data access method, memory controller, memory storage system | |
TWI569139B (en) | Valid data merging method, memory controller and memory storage apparatus | |
US9176865B2 (en) | Data writing method, memory controller, and memory storage device | |
US8266371B2 (en) | Non-volatile storage device, host device, non-volatile storage system, data recording method, and program | |
KR20060119391A (en) | Usb-sd memory with multiple dma channels, and data storing method thereof | |
TWI454912B (en) | Data processing method, memory controller and memory storage device | |
TWI459202B (en) | Data processing method, memory controller and memory storage device | |
TWI525625B (en) | Memory management method, memory controlling circuit unit, and memory storage device | |
TWI421870B (en) | Data writing method for a flash memory, and controller and storage system using the same | |
TW201217968A (en) | Data writing method, memory controller and memory storage apparatus | |
CN102520878B (en) | Method and system for visiting intelligent secure digital (SD) card | |
CN113885808B (en) | Mapping information recording method, memory control circuit unit and memory device | |
CN108710507B (en) | SSD host dormancy optimization method | |
US8776232B2 (en) | Controller capable of preventing spread of computer viruses and storage system and method thereof | |
CN113282239A (en) | Data migration method, memory and controller | |
TW201214111A (en) | Data writing method, memory controller and memory storage apparatus | |
WO2015154541A1 (en) | Firmware storage apparatus for usb solid-state disk | |
TWI521538B (en) | Non-volatile memory storage apparatus, memory controller and data storage method | |
CN113778317A (en) | Computer readable storage medium, method and device for scheduling host commands |
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 | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 518057 A, B, C, D, E, F1, 8 Building, Financial Services Technology Innovation Base, No. 8 Kefa Road, Nanshan District, Shenzhen City, Guangdong Province Patentee after: Shenzhen jiangbolong electronic Limited by Share Ltd Address before: 518057 A, B, C, D, E, F1, 8 Building, Financial Services Technology Innovation Base, No. 8 Kefa Road, Nanshan District, Shenzhen City, Guangdong Province Patentee before: Shenzhen jiangbolong Electronic Co., Ltd. |