CN102054192A - Information storage method and device of electronic tag - Google Patents

Information storage method and device of electronic tag Download PDF

Info

Publication number
CN102054192A
CN102054192A CN2009102101307A CN200910210130A CN102054192A CN 102054192 A CN102054192 A CN 102054192A CN 2009102101307 A CN2009102101307 A CN 2009102101307A CN 200910210130 A CN200910210130 A CN 200910210130A CN 102054192 A CN102054192 A CN 102054192A
Authority
CN
China
Prior art keywords
sector
activation
sign
current
state
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
Application number
CN2009102101307A
Other languages
Chinese (zh)
Other versions
CN102054192B (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.)
ZTE Intelligent IoT Technology Co Ltd
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN200910210130.7A priority Critical patent/CN102054192B/en
Publication of CN102054192A publication Critical patent/CN102054192A/en
Application granted granted Critical
Publication of CN102054192B publication Critical patent/CN102054192B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an information storage method and device of an electronic tag. The method comprises the following steps of: searching sectors in an activated state in various sectors in a storage space of an electronic tag after the electronic tag receives a use request; confirming a current usable sector according to a search result of the sectors in the activated state, and activating the current usable sector; writing in the received information to be stored by using the current usable sector as an initial writing-in point when receiving a writing-in request; and/or ending the current storage flow when receiving a use ending instruction. When a certain sector is in use, the sector is set in an activated state; when sectors are used the next time, usable sectors are confirmed by recognizing and searching the sectors in the activated state to alternately use the sectors so as to prolong the service life of the electronic tag.

Description

A kind of information storage means of electronic tag and device
Technical field
The present invention relates to technical field of information storage, refer to a kind of information storage means and device of electronic tag especially.
Background technology
Claim also that in radio-frequency (RF) identification (Radio Frequency Identification in application RFID), can relate to the electronic tag problem in serviceable life to electronic tag.Such as, in the path identifying system of intelligent transportation field, electronic tag need be written to label inside with the gateway information of collecting at the place, gateway of highway.Simultaneously, electronic tag be responsible for to receive the routing information that road side base station sends on highway, and with path information storage in label inside.CPU (central processing unit) (the central processing unit in the electronic tag is directly used in the storage of gateway information and routing information usually, CPU) (Electrically Erasable Programmable Read-Only Memory is EEPROM) as storage medium for the outer EEPROM (Electrically Erasable Programmable Read Only Memo) of Nei Bu Flash (flash memory) or sheet.Because on highway and the gateway can repeatedly collect the various information that comprise gateway information and routing information, thereby the situation that same electronic tag is repeatedly used appears, this just inevitably will be to the storage space of electronic tag, comprise Flash or EEPROM, carry out frequent erasable.
The erasable number of times of permission of general Flash or EEPROM is all about 100,000 times.Per hour be used 3 times with every electronic tag, the information stores operation when at every turn using makes Flash or EEPROM only once be calculated as example by erasable, and then the erasable number of times of 100,000 times permission can only guarantee that electronic tag is used the time less than 4 years.And every electronic tag may be used three times in one hour incessantly in the actual use, and will guarantee usually in the actual demand that electronic tag has the longer life-span, and for example: reach 6 years even the longer time serviceable life that guarantee electronic tag.
Therefore, at present the electronic tag ubiquity is short serviceable life, can not practical requirement in to the requirement in long serviceable life of electronic tag.
Summary of the invention
The embodiment of the invention provides a kind of information storage means and device of electronic tag, to solve electronic tag weak point in serviceable life in the prior art, can not satisfy the problem of actual user demand.
A kind of information storage means of electronic tag comprise:
Electronic tag is searched the sector that is in state of activation in each sector of its storage space after receiving and using request;
According to the Query Result that whether inquires the sector that is in state of activation, determine the current sector of using, and activate the described current sector of using;
Write when request when receiving, a little write the information to be stored that receives as initial writing with the described current sector of using; And/or when receiving the instruction that is used to complete, finish this Stored Procedure.
A kind of information-storing device of electronic tag comprises:
Receiver module is used to receive the instruction of using request, writing request and be used to complete;
Enquiry module is used for searching the sector that is in state of activation in each sector of its storage space after described receiver module receives the use request;
Determination module is used for whether inquiring according to described enquiry module the Query Result of the sector that is in state of activation, determines the current sector of using, and activates the described current sector of using;
Writing module is used for writing when request when described receiver module receives, and the current sector of determining with described determination module of using a little writes the information to be stored that receives as initial writing;
Execution module is used for finishing this Stored Procedure after described receiver module receives the instruction that is used to complete.
The information storage means of the electronic tag that the embodiment of the invention provides and device, by electronic tag receive use request after, search the sector that is in state of activation in each sector of its storage space; According to the Query Result that whether inquires the sector that is in state of activation, determine the current sector of using, and activate the described current sector of using; Write when request when receiving, a little write the information to be stored that receives as initial writing with the described current sector of using; And/or when receiving the instruction that is used to complete, finish this Stored Procedure.When using certain sector, it is set to state of activation, when using next time by identification with search the sector that is in state of activation, determine that its next sector is current spendable sector, thereby realize using by turns successively of sector, improve the resources of chip utilization factor of electronic tag, prolonged the serviceable life of electronic tag internal storage space.
Description of drawings
Fig. 1 is the synoptic diagram of the structure information storage of electronic tag storage space in the embodiment of the invention;
Fig. 2 is the process flow diagram of the information storage means of electronic tag in the embodiment of the invention one;
Fig. 3 searches the particular flow sheet of the sector that is in state of activation for traversal in the embodiment of the invention one;
Fig. 4 is the process flow diagram of the information storage means of electronic tag in the embodiment of the invention two;
Fig. 5 is the process flow diagram that electronic labeling information recovers in the embodiment of the invention;
Fig. 6 is a kind of structural representation of the information-storing device of electronic tag in the embodiment of the invention
Fig. 7 is the another kind of structural representation of the information-storing device of electronic tag in the embodiment of the invention.
Embodiment
The information storage means of the electronic tag that the embodiment of the invention provides by in each sector of storage space the state of activation byte being set, realize recycling of all sectors, improve the serviceable life of electronic tag.
At first, each sector to the electronic tag storage space is provided with.For example storage space can be that CPU inside can also can be outside other storage spaces such as EEPROM for the Flash storage space of canned data.As shown in Figure 1, be the storage organization synoptic diagram of electronic tag internal storage space, this storage space can comprise S 0, S 1, S 2..., S N-1Be total to N the sector that the address is continuous.
The state of activation byte is set in each sector, and preferable, the first byte of each sector is set to the state of activation byte of this sector (for example shown in Figure 1).Activate to write in the identification byte and activate sign, can also write and be used to complete sign.For example: activate sign and can be set to 0xfe, the expression sector is in the state of being activated, and is used to complete sign and can be set to 0xfc, represents that this sector is used to complete.
When certainly the information in the sector is wiped free of, then be a sign of unused state in this byte, this is identified at the sector and is wiped free of the back and recovers automatically to obtain.For example: do not use sign to be traditionally arranged to be 0xff, the expression sector is in the state that is not used.
Preferable, the data for the ease of recovering to write under abnormal conditions can also be provided with the byte that returns to form in each sector, and for example: second byte of each sector is set to the byte that returns to form (as shown in Figure 1) of this sector.When the sector was used to complete, what then write in this byte that returns to form was irrecoverable sign, then reverts to automatically in this byte that returns to form to recover sign when the sector is wiped free of, and keep the state that can recover to identify in the process of using always after activation.For example: irrecoverable sign can be set to 0xfe, represents that the information of this sector is in unrecoverable state; Can recover to be designated 0xff, represent that the information of this sector is in and can returns to form.
As shown in Figure 1, except that the state of activation byte that is provided with and the byte that returns to form, other storage areas of each sector are available memory area.
Embodiment one
The information storage means of the electronic tag that the embodiment of the invention one provides, after the state of activation byte is set, the flow process that electronic tag is realized information stores as shown in Figure 2, execution in step is as follows:
Step S11: electronic tag receives the request of using.
Electronic tag is in dormant state when not using, and waits for the outside use request that receives.
For example: the use request can be from the compound read write line of expressway entrance and exit and road side base station on the way etc.
Step S12: electronic tag is searched the sector that is in state of activation in each sector of its storage space after receiving and using request.
After receiving the use request, electronic tag begins to search which sector is in state of activation in its storage space, generally search in the state of activation byte of setting and comprise the sector of activating sign, realize searching the sector that is in state of activation in each sector of storage space by traversal.
For example: when the activation that is provided with was designated 0xfe, then finding in the state of activation byte was that sector of 0xfe, is the sector that is in state of activation.
For example: the traversal specific implementation flow process of searching as shown in Figure 3, execution in step is as follows:
Step S120: beginning.
Step S121: read sector S iThe state of activation byte.
From i=0, promptly first sector begins to read when generally searching.
Step S122: judge that this sector is in state of activation?
Activate sign if comprise in the state of activation byte of this sector, then this sector is in state of activation, otherwise is not.
If, execution in step S123, otherwise execution in step S124.
Step S123: determine this sector S iFor being in the sector of state of activation.
Step S124: make i=i++, and judge that whether i is more than or equal to sector total quantity N.If, execution in step S125 then; If not, then return continuation execution in step S121.
Step S125: the sector of determining not to be in state of activation.
Step S13:, determine the current sector of using according to the Query Result that whether inquires the sector that is in state of activation.Specifically comprise:
(1) comprises the sector of activating sign if found among the above-mentioned steps S12, and when this sector is not last sector of storage space, activation in this sector sign is rewritten as is used to complete sign, and with the next sector of this sector as the current sector of using.
(2) comprise the sector of activating sign if found among the above-mentioned steps S12, and during last sector that this sector is a storage space, activation in this sector sign is rewritten as is used to complete sign, and with first sector of storage space as the current sector of using.
(3) if do not find among the above-mentioned steps S12 when comprising the sector of activating sign, with first sector of storage space as the current sector of using.
Continue to use the example of top, if find sector S iThe state of activation byte in when comprising state of activation sign 0xfe, illustrate that then this sector is the sector of using last time, the sign of the activation in this sector 0xfe is rewritten as is used to complete sign 0xfc.And definite sector S (i+1) %NAs the current sector of using.Wherein, (i+1) %N represents the remainder of (i+1)/N, thereby can be implemented in the sector S that comprises state of activation sign 0xfe that finds iBe sector S N-1The time, the current sector of determining of using is sector S0.
If find when comprising the sector of activating sign 0xfe in the state of activation byte, the current sector of determining of using is sector S 0Be the situation of storage space when being in unused state at this moment, all sectors all are original, therefore do not need to rewrite the state of activation byte.
Step S14: activate the current sector of using.
Determine current use the sector after, wipe current the use and being used to complete sign and canned data in the sector, in the current state of activation byte of using the sector, write and activate sign, to activate the current sector of using.
Continue to use the example of top, with the current sector S that uses that determines (i+1) %NOr S 0Wipe, and in its state of activation byte, write activation sign 0xfe.Be the current sector S that uses (i+1) %NOr S 0Be activated.
Step S15: continue to receive information from the outside.
After receiving the use request and carrying out above-mentioned steps, electronic tag then can keep dormant state and wait for the information that reception is outside, and the information from the outside that may receive comprises request of writing and the instruction that is used to complete.
Write when request, execution in step S16 when receiving; When receiving the instruction that is used to complete, execution in step S17; Otherwise continuation dormancy.
Step S16: a little write the information to be stored that receives with the current sector of using as initial writing, and return step S15 and continue to wait for reception information.
After electronic tag receives information to be stored, though information to be stored generally speaking can not surpass the size of a sector.But consider that the size that information to be stored may occur surpasses this special circumstances of size of the available memory area of a sector.Preferable, need carry out the judgement whether needs are striden sector storage according to the actual conditions of information to be stored.Can be divided into following dual mode at the different situations of court verdict writes:
(i), if the size of the required storage area of information to be stored is not more than the size of the available memory area of a sector, then directly information to be stored is written to determine current and uses in the sector.
Continue to use above-mentioned example, the information to be stored that receives is written to the current current sector S that uses in sector that uses that is activated (i+1) %NOr S 0
(ii), the size of the storage area required as if information to be stored is greater than the size of the available memory area of a sector, then, information to be stored is written at least from the available memory area of the continuous sector of current two of using the sector to begin according to the size of the required storage area of information to be stored.
Continue to use above-mentioned example, the information to be stored that receives is written to from the current sector S that uses that is activated (i+1) %NOr S 0In at least two continuous sectors of beginning.
(ii) under the kind situation, in order to use the storage space of sector more fully, it is also conceivable that in the several sectors that to use continuously that first byte of other sector except that first sector and second byte also are used for storage, then need to do an escape this moment and handle.Promptly when using first byte, if the information data that need write is not just for using identification informations such as identifying or activate sign identical with above-mentioned setting.When second bytes store information, if the information data that need write then can adopt two characters of setting to replace just for using irrecoverable sign maybe can recover to identify identical with above-mentioned the setting.For example: when writing information data 0xfe, use two characters of 0xff and 0x01 to replace; When writing information data 0xff, use two characters of 0xff and 0x00 to replace.Other situation is then carried out normal write operation.
Step S17: finish this Stored Procedure.
When electronic tag receives the instruction that is used to complete, then finish this use, electronic tag enters dormant state.
Preferable, judge whether need to recover information in the sector for the ease of the back in abnormal conditions, when receiving the instruction that is used to complete, in the current byte that returns to form of using the sector, write irrecoverable sign, represent that this sector has been used to complete to need not recovering information again.That is to say when not writing this irrecoverable sign, is to wipe the sign the recovered sign that obtains behind the sector in the byte that returns to form, and expression needs recovering information.
Continue to use above-mentioned example, when being used to complete, in the current byte that returns to form of using the sector, write irrecoverable sign 0xfe, for before writing this sign, in the byte that returns to form for recovering sign 0xff.
Embodiment two
The information storage means of the electronic tag that the embodiment of the invention two provides, after the state of activation byte is set, the flow process that electronic tag is realized information stores as shown in Figure 4, execution in step is as follows:
Step S21: electronic tag receives the request of using.
With step S11, repeat no more herein.
Step S22: electronic tag is searched the sector that is in state of activation in each sector of its storage space after receiving and using request.
With step S12, repeat no more herein.
Step S23:, determine the current sector of using according to the Query Result that whether inquires the sector that is in state of activation.Specifically comprise:
(1) if found among the above-mentioned steps S22 and comprise the sector of activating sign, and this sector wipes activation sign and canned data in this sector when not being last sector of storage space, and with the next sector of this sector as the current sector of using.
(2), and during last sector that is storage space, this sector, wipe activation sign and canned data in this sector if found among the above-mentioned steps S22 and comprise the sector of activating sign, and with first sector of storage space as the current sector of using.
(3) if do not find among the above-mentioned steps S22 when comprising the sector of activating sign, with first sector of storage space as the current sector of using.
Continue to use the example of top, if find sector S iThe state of activation byte in when comprising state of activation sign 0xfe, illustrate that then this sector is the sector of using last time, wipes this sector S iIn activation sign and canned data, and definite sector S (i+1) %NAs the current sector of using.Wherein, (i+1) %N represents the remainder of (i+1)/N, thereby can be implemented in the sector S that comprises state of activation sign 0xfe that finds iBe sector S N-1The time, the current sector of determining of using is sector S 0
If find when comprising the sector of activating sign 0xfe in the state of activation byte, the current sector of determining of using is sector S 0At this moment, be the situation of storage space when being in unused state, all sectors all are original, therefore do not need to wipe.
Step S24: activate the current sector of using.
Determine current use the sector after, in the current state of activation byte of using the sector, write and activate sign, to activate the current sector of using.
Continue to use the example of top, the current sector S that uses that is determining (i+1) %NOr S 0The state of activation byte in write and activate sign 0xfe.Be the current sector S that uses (i+1) %NOr S 0Be activated.
Step S25: continue to receive information from the outside.
After receiving the use request and carrying out above-mentioned steps, electronic tag then can keep dormant state and wait for the information that reception is outside, and the information from the outside that may receive may comprise request of writing and the instruction that is used to complete.
Write when request, execution in step S26 when receiving; When receiving the instruction that is used to complete, execution in step S27; Otherwise continuation dormancy.
Step S26: a little write the information to be stored that receives with the current sector of using as initial writing, and return step S25 and continue to wait for reception information.
The detailed process of information stores repeats no more with step S16 herein.
Step S27: finish this Stored Procedure.Electronic tag enters dormant state.
With step S17, repeat no more herein.
The electronic labeling information storage realization flow of the foregoing description one was wiped the sector that will use at every turn before writing, realize that the sector repeating query of storage space is used, and guaranteed that each sector of using only is wiped free of once.The electronic labeling information storage realization flow of the foregoing description two, before writing, wipe once just used sector at every turn, clash again writing fashionable then need not, can realize that equally the sector repeating query of storage space is used, and guarantee that each sector of using only is wiped free of once.
After above-mentioned setting returns to form byte, when abnormal restarting takes place, for example: when accident power-off, equipment failure etc. causes the situation of abnormal restarting to occur, can recover to be in state of activation and the sector of using in information.Its flow process as shown in Figure 5, execution in step is as follows:
Step S31: electronic tag powers on and restarts.
For example: electronic tag hinders or abnormal conditions such as outage and restarting for some reason.
Step S32: find the sector that is in state of activation in each sector of its storage space.
The process of searching can repeat no more with step S12 herein.
Step S33: check the byte that returns to form in the sector that is in state of activation that finds.
Check the byte that returns to form in the sector that is in state of activation,, determine whether and to recover this information that is in the sector of state of activation so that according to whether comprising irrecoverable sign in the byte that returns to form that is provided with.
Wherein, above-mentioned irrecoverable be identified to receive write after the instruction that is used to complete in the current byte that returns to form of using the sector.If fruit is in the sector of state of activation not this irrecoverable sign, this sector just in use needed recovery when then specification exception started.
For example: the sector that is in state of activation that finds, promptly comprising the sector of activating sign in the state of activation byte is S i, then check sector S iThe byte that returns to form.
Step S34: comprise irrecoverable sign in the byte that returns to form? if not, execution in step S36; If, execution in step S35.
Continue to use the example of top, if sector S iThe byte that returns to form comprise irrecoverable sign 0xfe, if execution in step S35 then is sector S iThe byte that returns to form do not comprise irrecoverable sign 0xfe, can recover to identify 0xff but comprise, then execution in step S36.
Step S35: electronic tag enters dormant state.
Need not sector S iInternal storage information recover.
Step S36: canned data in the sector that is in state of activation of recovering to find.
To sector S iInternal storage information recover according to message structure.
Step S37: electronic tag enters normal Stored Procedure.
After canned data was recovered to finish, this electronic tag that is in state of activation entered normal Stored Procedure, until finishing this use.
Be available as long as guarantee not use sign and can recover sign in fact by erase operation, and irrecoverable sign and activation sign are to get final product by the mode that writes is available, and being used to complete sign is can be by available the getting final product of mode of rewriting.Concrete sign setting can be selected flexibly.
The information storage means of the above-mentioned electronic tag that provides according to the embodiment of the invention one, can make up a kind of information-storing device of electronic tag, its structure comprises as shown in Figure 6: receiver module 10, enquiry module 20, determination module 30, writing module 40 and execution module 50.
Receiver module 10 is used to receive the instruction of using request, writing request and be used to complete.
Enquiry module 20 is used for searching the sector that is in state of activation in each sector of its storage space after receiver module 10 receives the use request.
Above-mentioned enquiry module 20 specifically is used for: after receiver module 10 receives the use request, comprise the sector of activating sign in the state of activation byte that is provided with in the storage space by searching, realize looking into the sector that is in state of activation in each sector of storage space.
Determination module 30 is used for whether inquiring according to enquiry module 20 Query Result of the sector that is in state of activation, determines the current sector of using, and the sector that change is in state of activation is the current sector of determining of using.
Preferable, above-mentioned determination module 30 further can comprise: first determining unit 301 and first activates unit 302.
First determining unit 301, be used for finding when comprising last sector that the sector of activating sign and this sector be not storage space in the state of activation byte that storage space is provided with when enquiry module 20, activation in this sector sign is rewritten as is used to complete sign, and with the next sector of this sector as the current sector of using; When enquiry module 20 finds when comprising the sector of activating sign and being last sector of storage space, the sign of the activation in this sector is rewritten as is used to complete sign, and with first sector of storage space as the current sector of using; When enquiry module 20 does not find when comprising the sector of activating sign, with first sector of storage space as the current sector of using.
First activates unit 302, is used to wipe that first determining unit 301 determines that current the use being used to complete sign and canned data the sector in, writes to activate to identify in the current state of activation byte of using the sector.
Writing module 40 is used for writing when request when receiver module 10 receives, and the current sector of determining with determination module 30 of using a little writes the information to be stored that receives as initial writing.
Preferable, above-mentioned writing module 40 further can comprise: judging unit 401 and writing unit 402.
Judging unit 401 is used for writing when request when receiver module 10 receives, and whether the size of judging the storage area that information to be stored is required is greater than the size of the available memory area of a sector.
Writing unit 402, the size that is used for the storage area required as if information to be stored is not more than the size of the available memory area of a sector, then directly information to be stored is written to determine current and uses in the sector; If the size of the storage area that information to be stored is required is greater than the size of the available memory area of a sector, then, information to be stored is written at least from the available memory area of the continuous sector of current two of using the sector to begin according to the size of the required storage area of information to be stored.
Execution module 50 is used for finishing this Stored Procedure after receiver module 10 receives the instruction that is used to complete.
Preferable, the information-storing device of above-mentioned electronic tag also comprises: recover module 60.
Above-mentioned execution module 50 also is used for after receiver module 10 receives the instruction that is used to complete, and writes irrecoverable sign in the current byte that returns to form of using the sector.
Recover module 60, after being used for the electronic tag abnormal restarting, find the sector that is in state of activation in each sector of its storage space, be in the byte that returns to form that is provided with in the sector of state of activation whether comprise irrecoverable sign according to this, determine whether and to recover this information that is in the sector of state of activation.
The information storage means of the above-mentioned electronic tag that provides according to the embodiment of the invention two, can make up a kind of information-storing device of electronic tag, its structure comprises as shown in Figure 7: receiver module 11, enquiry module 21, determination module 31, writing module 41 and execution module 51.
Wherein, receiver module 11, enquiry module 21, writing module 41 and execution module 51 respectively with receiver module 10, enquiry module 20, writing module 40 and the execution module 50 of the information-storing device of above-mentioned electronic tag shown in Figure 6.Judging unit 411 that comprises in the writing module 41 and writing unit 412 are identical with writing unit 402 with the judging unit 401 that comprises in the writing module 40.
The difference of this device and device shown in Figure 6 is: its determination module 31, be used for whether inquiring the Query Result of the sector that is in state of activation according to enquiry module 20, determine the current sector of using, and the sector that change is in state of activation is the current sector of determining of using.
Preferable, above-mentioned determination module 31 further can comprise: first determining unit 311 and first activates unit 312.
Second determining unit 311, be used for finding when comprising last sector that the sector of activating sign and this sector be not storage space in the state of activation byte that storage space is provided with when enquiry module 21, wipe activation sign and canned data in this sector, and with the next sector of this sector as the current sector of using; When enquiry module 21 finds when comprising the sector of activating sign and being last sector of storage space, wipe activation sign and canned data in this sector, and with first sector of storage space as the current sector of using; When enquiry module 21 does not find when comprising the sector of activating sign, with first sector of storage space as the current sector of using.
Second activates unit 312, is used for writing the activation sign in the current state of activation byte of sector of using that second determining unit 311 is determined.
The information storage means of the above-mentioned electronic tag that the embodiment of the invention provides and device, by when using certain sector, it is set to state of activation, search the sector that is in state of activation by comprising to activate to identify in the identification state of activation byte when using next time, and determine that its next sector is current spendable sector, thereby realize using by turns successively of sector, improved the resources of chip utilization factor of electronic tag, prolonged the serviceable life of electronic tag internal storage space.
The electronic tag of using in the path identifying system of intelligent transportation field, storage spaces such as interior Flash of the sheet of its CPU or the outer EEPROM of sheet generally are used for store electrons the label routing information and the expressway entrance and exit information of process on the way.Need the canned data amount to have only tens bytes usually, generally be not more than the memory capacity of a minimum sector.And the storage space of electronic tag can provide the space of a plurality of sectors to be used for data storage, makes machine-processed by turns the application in the electronic labeling information storage in sector possess precondition.
As can be seen, after new each time sector used request to take place, the sector of use all can be rotated automatically, and available sector is recycled from the flow process of above-mentioned whole information stores.No matter be that the foregoing description one was wiped the sector that will use before writing at every turn, the foregoing description two before writing, wipe once just used sector at every turn, write the fashionable mode that clashes again of then need not in next time, the every use in each sector once all is an erase operation for once.For the transition process of embodiment one from the state of activation to the completion status is the sign of the activation in state of activation byte 0xfe directly to be rewritten into be used to complete sign 0xfc; The process that becomes unrecoverable state from returning to form to is recovering the byte that returns to form to be identified 0xff directly be rewritten into irrecoverable sign 0xfe.
The characteristic of Flash storage space has determined write operation can only realize being write 1 of some or several binary digits as 0, and erase operation is that 0 of all binary digits are reverted to 1.And above-mentioned state of activation byte and the sign in the byte of returning to form are provided with and just are based on that this rule is provided with, never use sign 0xff to be rewritten into to activate sign 0xfe, directly be rewritten into and be used to complete sign 0xfc and directly be rewritten into irrecoverable sign 0xfe, write as 0 operation from 1 from recovering to identify 0xff from activating sign 0xfe; And from reverting to and do not use sign 0xff, revert to and do not use sign 0xff and revert to and can recover to identify 0xff from can not recovering to identify 0xfe from being used to complete sign 0xfc from activating sign 0xfe, all be to recover 1 operation by erasable from 0.Therefore, the setting of the state of activation byte and the byte that returns to form does not need additionally storage space to be wiped, at utmost reduce the frequency of wiping of storage space, guarantee that each sector of using only is wiped free of once, improves the access times of storage space to greatest extent.Avoided the erasable repeatedly problem of same position quilt, thereby improved serviceable life at storage space.
Said method meets writing the activation sign and being used to complete sign, use sign of erasable characteristic by using in the state of activation byte, controls the use by turns of sector; And sign recovered and irrecoverable sign by meeting erasable characteristic equally, come realization information to recover control.By having taken into full account the erasable characteristic of storage space, guarantee that each byte of current use sector only can be by once erasable in the process of finishing primary information storage use.Simultaneously, by the setting byte that returns to form, when abnormal conditions take place, can also guarantee system meet accident the outage or restart after, canned data in the sector of using that is in state of activation before can correctly recovering to cut off the power supply after restarting that powers on has improved the stability and the reliability of system to a great extent.
The above; only be the preferable embodiment of the present invention; but protection scope of the present invention is not limited thereto; anyly be familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily, replace or be applied to other similar devices, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claims.

Claims (10)

1. the information storage means of an electronic tag is characterized in that, comprising:
Electronic tag is searched the sector that is in state of activation in each sector of its storage space after receiving and using request;
According to the Query Result that whether inquires the sector that is in state of activation, determine the current sector of using, and activate the described current sector of using;
Write when request when receiving, a little write the information to be stored that receives as initial writing with the described current sector of using; And/or when receiving the instruction that is used to complete, finish this Stored Procedure.
2. the method for claim 1 is characterized in that, comprises the sector of activating sign in the state of activation byte that is provided with in the described storage space by searching, and realizes searching the sector that is in state of activation in each sector of described storage space.
3. method as claimed in claim 2 is characterized in that whether described basis inquires the Query Result of the sector that is in state of activation, determines the current sector of using, and the sector that change is in state of activation is the described current sector of using; Specifically comprise:
When finding last sector that the sector that comprises described activation sign and this sector be not described storage space, the sign of the activation in this sector is rewritten as is used to complete sign, and with the next sector of this sector as the current sector of using; Or
When finding the sector that comprises described activation sign when being last sector of described storage space, the sign of the activation in this sector is rewritten as is used to complete sign, and with first sector of described storage space as the current sector of using; Or
When not finding the sector that comprises described activation sign, with first sector of described storage space as the current sector of using;
Wipe current the use and being used to complete sign and canned data in the sector, in the described current state of activation byte of using the sector, write described activation sign.
4. method as claimed in claim 2 is characterized in that whether described basis inquires the Query Result of the sector that is in state of activation, determines the current sector of using, and the sector that change is in state of activation is the described current sector of using; Specifically comprise:
When finding last sector that the sector that comprises described activation sign and this sector be not described storage space, wipe activation sign and canned data in this sector, and with the next sector of this sector as the current sector of using; Or
When finding the sector that comprises described activation sign when being last sector of described storage space, wipe activation sign and canned data in this sector, and with first sector of described storage space as the current sector of using; Or
When not finding the sector that comprises described activation sign, with first sector of described storage space as the current sector of using;
In the described current state of activation byte of using the sector, write described activation sign.
5. the method for claim 1 is characterized in that, describedly a little writes the information to be stored that receives with the described current sector of using as initial writing, and specifically comprises:
If the size of the storage area that described information to be stored is required is not more than the size of the available memory area of a sector, then directly described information to be stored is written to determine described current and uses in the sector;
If the size of the storage area that described information to be stored is required is greater than the size of the available memory area of a sector, then, described information to be stored is written at least from the available memory area of the continuous sector of described current two of using the sector to begin according to the size of the required storage area of described information to be stored.
6. as the arbitrary described method of claim 1-5, it is characterized in that, also comprise:
After the electronic tag abnormal restarting, find the sector that is in state of activation in each sector of its storage space, be in the byte that returns to form that is provided with in the sector of state of activation whether comprise irrecoverable sign according to this, determine whether and to recover this information that is in the sector of state of activation; Described irrecoverable be identified to receive write after the instruction that is used to complete in the described current byte that returns to form of using the sector.
7. the information-storing device of an electronic tag is characterized in that, comprising:
Receiver module is used to receive the instruction of using request, writing request and be used to complete;
Enquiry module is used for searching the sector that is in state of activation in each sector of its storage space after described receiver module receives the use request;
Determination module is used for whether inquiring according to described enquiry module the Query Result of the sector that is in state of activation, determines the current sector of using, and activates the described current sector of using;
Writing module is used for writing when request when described receiver module receives, and the current sector of determining with described determination module of using a little writes the information to be stored that receives as initial writing;
Execution module is used for finishing this Stored Procedure after described receiver module receives the instruction that is used to complete.
8. device as claimed in claim 7 is characterized in that, described determination module specifically comprises:
First determining unit, be used for finding when comprising last sector that the sector of activating sign and this sector be not described storage space in the state of activation byte that described storage space is provided with when described enquiry module, activation in this sector sign is rewritten as is used to complete sign, and with the next sector of this sector as the current sector of using; When described enquiry module finds the sector that comprises described activation sign when being last sector of described storage space, activation in this sector sign is rewritten as is used to complete sign, and with first sector of described storage space as the current sector of using; When described enquiry module does not find the sector that comprises described activation sign, with first sector of described storage space as the current sector of using;
First activates the unit, is used to wipe that described first determining unit determines that current the use being used to complete sign and canned data the sector in, writes described activation and identify in the described current state of activation byte of using the sector.
9. device as claimed in claim 7 is characterized in that, described determination module specifically comprises:
Second determining unit, be used for finding when comprising last sector that the sector of activating sign and this sector be not described storage space in the state of activation byte that described storage space is provided with when described enquiry module, wipe activation sign and canned data in this sector, and with the next sector of this sector as the current sector of using; When described enquiry module finds the sector that comprises described activation sign when being last sector of described storage space, wipe activation sign and canned data in this sector, and with first sector of described storage space as the current sector of using; When described enquiry module does not find the sector that comprises described activation sign, with first sector of described storage space as the current sector of using;
Second activates the unit, is used for writing described activation sign in the current state of activation byte of sector of using that described second determining unit is determined.
10. as the arbitrary described device of claim 7-9, it is characterized in that, also comprise: recover module;
Described execution module also is used for after described receiver module receives the instruction that is used to complete, and writes irrecoverable sign in the described current byte that returns to form of using the sector;
Described recovery module, after being used for the electronic tag abnormal restarting, find the sector that is in state of activation in each sector of its storage space, be in the byte that returns to form that is provided with in the sector of state of activation whether comprise irrecoverable sign according to this, determine whether and to recover this information that is in the sector of state of activation.
CN200910210130.7A 2009-10-27 2009-10-27 A kind of information storage means of electronic tag and device Active CN102054192B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910210130.7A CN102054192B (en) 2009-10-27 2009-10-27 A kind of information storage means of electronic tag and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910210130.7A CN102054192B (en) 2009-10-27 2009-10-27 A kind of information storage means of electronic tag and device

Publications (2)

Publication Number Publication Date
CN102054192A true CN102054192A (en) 2011-05-11
CN102054192B CN102054192B (en) 2016-01-20

Family

ID=43958490

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910210130.7A Active CN102054192B (en) 2009-10-27 2009-10-27 A kind of information storage means of electronic tag and device

Country Status (1)

Country Link
CN (1) CN102054192B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1896972A (en) * 2005-07-14 2007-01-17 中国科学院计算技术研究所 Method and device for converting virtual address, reading and writing high-speed buffer memory
US20090222689A1 (en) * 2006-08-24 2009-09-03 Vipul Patel Memory device internal parameter reliability
WO2009129161A2 (en) * 2008-04-14 2009-10-22 Quantum Corporation Methods and systems for space management in data de-duplication

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1896972A (en) * 2005-07-14 2007-01-17 中国科学院计算技术研究所 Method and device for converting virtual address, reading and writing high-speed buffer memory
US20090222689A1 (en) * 2006-08-24 2009-09-03 Vipul Patel Memory device internal parameter reliability
WO2009129161A2 (en) * 2008-04-14 2009-10-22 Quantum Corporation Methods and systems for space management in data de-duplication

Also Published As

Publication number Publication date
CN102054192B (en) 2016-01-20

Similar Documents

Publication Publication Date Title
CN102135942B (en) Method for realizing wear-leveling in storage equipment as well as the storage equipment
CN101551780B (en) Television and data storage method and device thereof
CN101436158B (en) Parameter management method and system based on embedded type equipment flash memory
CN101908023A (en) Data storage method for NandFlash storage
CN102063380A (en) Method and device for writing data in non-volatile memory
CN101593157A (en) The bad block management method of nandflash and device
WO1997012324A1 (en) Memory management
CN101281493A (en) And non flash memory device and management method thereof
CN103210597A (en) A transponder, RFID system and methods of operation
CN102073592B (en) Quick read-write method and device for flash memory
CN106227680A (en) A kind of data process and power fail preventing data guard method
CN102662856A (en) Solid state disk and access method
CN101533481A (en) Method for expanding function of mask smart card
JP3689213B2 (en) Non-contact IC card
JP2000222292A (en) Data managing method utilizing flash memory
CN102054192A (en) Information storage method and device of electronic tag
CN105653208A (en) Data storage system and data read-write method based on same
CN1849590A (en) Management of erased blocks in flash memories
CN101425334A (en) Method for implementing NOR FLASH bad block management and control circuit thereof
CN111124294B (en) Sector mapping information management method and device, storage medium and equipment
CN101916351A (en) Smart card multi-protocol adaptive method and smart card
CN101751340A (en) Data write method for improving service life of data storage equipment
US20040125669A1 (en) Flash memory device capable of repairing a word line
CN101887750A (en) Method for storing dynamic data by using Flash memory
CN100421087C (en) Method for reading and writing non-contact intelligent card data

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
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20160905

Address after: 300308 Tianjin Airport Economic Zone, Binhai New Area seven East Road No. 2 Zhongxing Industrial Base

Patentee after: ZTE INTELLIGENT IOT TECHNOLOGY Co.,Ltd.

Address before: 518057 Nanshan District Guangdong high tech Industrial Park, South Road, science and technology, ZTE building, Ministry of Justice

Patentee before: ZTE Corp.

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Room 401, building 12, east area, airport business park, No. 80, Huanhe North Road, free trade zone (Airport Economic Zone), Binhai New Area, Tianjin 300000

Patentee after: Gaoxing Zhilian Technology Co.,Ltd.

Address before: 300308, Zhongxing Industrial base, 2 East seven, Airport Economic Zone, Tianjin Binhai New Area

Patentee before: ZTE INTELLIGENT IOT TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: Room 401, building 12, East Airport Business Park, 80 Huanhe North Road, Tianjin Binhai New Area pilot free trade zone (Airport Economic Zone)

Patentee after: Zte Intelligent Iot Technology Co.,Ltd.

Address before: Room 401, building 12, East Airport Business Park, 80 Huanhe North Road, Tianjin Binhai New Area pilot free trade zone (Airport Economic Zone)

Patentee before: Gaoxing Zhilian Technology Co.,Ltd.