CN102054192B - A kind of information storage means of electronic tag and device - Google Patents

A kind of information storage means of electronic tag and device Download PDF

Info

Publication number
CN102054192B
CN102054192B CN200910210130.7A CN200910210130A CN102054192B CN 102054192 B CN102054192 B CN 102054192B CN 200910210130 A CN200910210130 A CN 200910210130A CN 102054192 B CN102054192 B CN 102054192B
Authority
CN
China
Prior art keywords
sector
activation
mark
state
storage space
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
CN200910210130.7A
Other languages
Chinese (zh)
Other versions
CN102054192A (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

Landscapes

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

Abstract

The invention discloses a kind of information storage means and device of electronic tag, the method comprises: electronic tag searches the sector being in state of activation in each sector of its storage space after receiving and using request; According to the Query Result whether inquiring the sector being in state of activation, determine and currently use sector, activate and describedly currently use sector; When receiving write request, write as initial write point the information to be stored received using the described current sector that uses; And/or when receiving the instruction be used to complete, terminate this Stored Procedure.When using certain sector, being set to state of activation, by identifying and searching the sector being in state of activation next time when using, determining spendable sector, the rotation realizing sector uses, and improves the serviceable life of 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, espespecially a kind of information storage means of electronic tag and device.
Background technology
Also claim in radio-frequency (RF) identification, in the application of electronic tag (RadioFrequencyIdentification, RFID), the problem in electronic tag serviceable life can be related to.Such as, in the path identifying system of intelligent transportation field, electronic tag needs the gateway information collected to be written to inside tags at the gateway place of highway.Meanwhile, electronic tag is responsible for the routing information receiving road side base station transmission on a highway, and by path information storage at inside tags.The storage of gateway information and routing information directly uses the CPU (central processing unit) (centralprocessingunit in electronic tag usually, CPU) EEPROM (Electrically Erasable Programmable Read Only Memo) (ElectricallyErasableProgrammableRead-OnlyMemory, EEPROM) outside inner Flash (flash memory) or sheet is as storage medium.Due on a highway and gateway repeatedly can collect the various information comprising gateway information and routing information, thus occur that same electronic tag is by the situation repeatedly used, this is just inevitably to the storage space of electronic tag, comprise Flash or EEPROM, carry out erasable frequently.
The erasable number of times of permission of general Flash or EEPROM is all at about 100,000 times.Per hour by use 3 times often to open electronic tag, each information storage operation when using make Flash or EEPROM only by erasable once for example calculates, then the erasable number of times of the permission of 100,000 times can only ensure that electronic tag is by the time used less than 4 years.And often open electronic tag in the use of reality in one hour and incessantly by use three times, and in actual demand, usually may will ensure that electronic tag has the longer life-span, such as: ensure to reach the serviceable life of electronic tag 6 years even longer time.
Therefore, current electronic tag ubiquity is short for serviceable life, can not to the requirement in electronic tag longer serviceable life in practical requirement.
Summary of the invention
The embodiment of the present invention provides a kind of information storage means and device of electronic tag, short for serviceable life to solve electronic tag in prior art, can not meet the problem of actual user demand.
Information storage means for electronic tag, comprising:
Electronic tag searches the sector being in state of activation in each sector of its storage space after receiving and using request;
Electronic tag, according to the Query Result whether inquiring the sector being in state of activation, is determined and is currently used sector, and activates and describedly currently use sector;
When electronic tag receives write request, write as initial write point the information to be stored received using the described current sector that uses; And/or when electronic tag receives the instruction be used to complete, terminate this Stored Procedure.
An information-storing device for electronic tag, comprising:
Receiver module, for receiving the instruction using request, write request and be used to complete;
Enquiry module, for receive use request when described receiver module after, searches the sector being in state of activation in each sector of its storage space;
Determination module, for whether inquiring the Query Result of the sector being in state of activation according to described enquiry module, determines and currently uses sector, and activates and describedly currently use sector;
Writing module, for when described receiver module receives write request, writes as initial write point the information to be stored received using the current sector that uses that described determination module is determined;
Execution module, for after described receiver module receives the instruction be used to complete, terminates this Stored Procedure.
The information storage means of the electronic tag that the embodiment of the present invention provides and device, after receiving use request, search the sector being in state of activation in each sector of its storage space by electronic tag; According to the Query Result whether inquiring the sector being in state of activation, determine and currently use sector, and activate and describedly currently use sector; When receiving write request, write as initial write point the information to be stored received using the described current sector that uses; And/or when receiving the instruction be used to complete, terminate this Stored Procedure.When using certain sector, be set to state of activation, by identifying and searching the sector being in state of activation next time when using, determine that its next sector is current spendable sector, thus the rotation successively realizing sector uses, improve the resources of chip utilization factor of electronic tag, extend the serviceable life of electronic tag internal storage space.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of the structure information storage of electronic tag storage space in the embodiment of the present invention;
Fig. 2 is the process flow diagram of the information storage means of electronic tag in the embodiment of the present invention one;
Fig. 3 is the particular flow sheet that in the embodiment of the present invention one, traversal searches the sector being in state of activation;
Fig. 4 is the process flow diagram of the information storage means of electronic tag in the embodiment of the present invention two;
Fig. 5 is the process flow diagram that in the embodiment of the present invention, electronic labeling information recovers;
Fig. 6 is a kind of structural representation of the information-storing device of electronic tag in the embodiment of the present invention
Fig. 7 is the another kind of structural representation of the information-storing device of electronic tag in the embodiment of the present invention.
Embodiment
The information storage means of the electronic tag that the embodiment of the present invention provides, by arranging state of activation byte in each sector of storage space, realizing recycling of all sectors, improving the serviceable life of electronic tag.
First, each sector of electronic tag storage space is arranged.Such as storage space can be the inner Flash storage space that can supply storage information of CPU, also can be other storage spaces such as the EEPROM of outside.As shown in Figure 1, be the storage organization schematic diagram of electronic tag internal storage space, this storage space can comprise S 0, S 1, S 2..., S n-1continuous print sector, N number of address altogether.
State of activation byte is set in each sector, preferably, the first byte of each sector is set to the state of activation byte (such as shown in Fig. 1) of this sector.Activate in identification byte to write and activate mark, can also write and be used to complete mark.Such as: activate mark and can be set to 0xfe, represent that sector is in the state of being activated, be used to complete mark and can be set to 0xfc, represent that this sector is used to complete.
Certainly when information is in a sector wiped free of, be then a mark of unused state in this byte, this is identified at sector and is wiped free of rear automatic recovery and obtains.Such as: do not use mark to be traditionally arranged to be 0xff, represent that sector is in not by the state used.
Preferably, for the ease of recovering the data write in abnormal cases, the byte that returns to form can also be set in each sector, such as: the byte that returns to form (as shown in Figure 1) second of each sector byte being set to this sector.When sector is used to complete, then what write in this byte that returns to form is irrecoverable mark, is then automatically restored to can recovers mark when sector is wiped free of in this byte that returns to form, and maintains the state can recovering to identify in the process used upon activation always.Such as: irrecoverable mark can be set to 0xfe, represent that the information of this sector is in unrecoverable state; Can recover to be designated 0xff, representing that the information of this sector is in can return to form.
As shown in Figure 1, except arrange state of activation byte and return to form except byte, 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 present invention one provides, after arranging state of activation byte, electronic tag realizes the flow process of information storage as shown in Figure 2, performs step as follows:
Step S11: electronic tag receives and uses request.
Electronic tag, when not using, is in dormant state, and the use request of wait-receiving mode outside.
Such as: use request can from the composite read-write device of expressway entrance and exit and road side base station etc. on the way.
Step S12: electronic tag searches the sector being in state of activation in each sector of its storage space after receiving and using request.
After receiving use request, electronic tag starts to search which sector in its storage space is in state of activation, general by traveling through the sector of searching in the state of activation byte of setting and comprising and activating mark, realize searching the sector being in state of activation in each sector of storage space.
Such as: when the activation arranged is designated 0xfe, then finding in state of activation byte is that sector of 0xfe, is the sector being in state of activation.
Such as: the specific implementation flow process that traversal is searched as shown in Figure 3, performs step as follows:
Step S120: start.
Step S121: read sector S istate of activation byte.
From i=0 when generally searching, namely first sector starts to read.
Step S122: judge that this sector is in state of activation?
Activate mark if comprise in the state of activation byte of this sector, then this sector is in state of activation, otherwise is not.
If so, perform step S123, otherwise perform step S124.
Step S123: determine this sector S ifor being in the sector of state of activation.
Step S124: make i=i++, and judge whether i is more than or equal to sector total quantity N.If so, then step S125 is performed; If not, then return continuation and perform step S121.
Step S125: determine the sector not being in state of activation.
Step S13: according to the Query Result whether inquiring the sector being in state of activation, determines and currently uses sector.Specifically comprise:
(1) sector activating mark is comprised if found in above-mentioned steps S12, and this sector is not when being last sector of storage space, activation mark in this sector is rewritten as and is used to complete mark, and the next sector of this sector is used sector as current.
(2) sector activating mark is comprised if found in above-mentioned steps S12, and this sector is when being last sector of storage space, activation mark in this sector is rewritten as and is used to complete mark, and first of storage space sector is used sector as current.
(3), when comprising the sector activating mark if do not find in above-mentioned steps S12, first of storage space sector is used sector as current.
Continue to use the example of top, if find sector S istate of activation byte in comprise state of activation mark 0xfe time, then illustrate this sector be last time use sector, by this sector activation mark 0xfe be rewritten as be used to complete mark 0xfc.And determine sector S (i+1) %Nsector is used as current.Wherein, (i+1) %N represents the remainder of (i+1)/N, thus can be implemented in the sector S comprising state of activation mark 0xfe found ifor sector S n-1time, the current sector that uses determined is for sector S 0.
If when finding in state of activation byte the sector comprising and activate mark 0xfe, the current sector that uses determined is for sector S 0.Be now the situation of storage space when being in unused state, all sectors are all original, therefore do not need to rewrite state of activation byte.
Step S14: activate and currently use sector.
Determine current use sector after, wipe the current information being used to complete mark and storing used in sector, to use in the state of activation byte of sector write to activate mark current, currently use sector to activate.
Continue to use the example of top, currently use sector S by what determine (i+1) %Nor S 0erasing, and write activates mark 0xfe in its state of activation byte.Namely currently sector S is used (i+1) %Nor S 0be activated.
Step S15: continue to receive the information from outside.
Ask and after performing above-mentioned steps, electronic tag then can keep dormant state and the information of wait-receiving mode outside, the instruction that the information from outside that may receive comprises write request and is used to complete receiving to use.
When receiving write request, perform step S16; When receiving the instruction be used to complete, perform step S17; Otherwise continuation dormancy.
Step S16: write as initial write point the information to be stored received using the current sector that uses, and return step S15 continuation wait-receiving mode information.
After electronic tag receives information to be stored, although information generally to be stored can not more than the size of a sector.But consider and may occur this special circumstances of the size of information to be stored more than the size of the available memory area of a sector.Preferably, need to carry out the need of the judgement across sector storage according to the actual conditions of information to be stored.Different situations for court verdict can be divided into following two kinds of modes to write:
If the size of the storage area needed for i information that () is 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 uses in sector.
Continue to use above-mentioned example, the information to be stored received is written to be activated current and uses that sector is current uses sector S (i+1) %Nor S 0.
(ii) if the size of the storage area needed for information to be stored is greater than the size of the available memory area of a sector, the size of the storage area then needed for information to be stored, is written to information to be stored and uses in the available memory area of at least two continuous print sectors sector from current.
Continue to use above-mentioned example, the information to be stored received is written to from what be activated and currently uses sector S (i+1) %Nor S 0in at least two the continuous print sectors started.
In (ii) kind situation, in order to use the storage space of sector more fully, it is also conceivable in several sectors of using continuously, the first character joint of other sector except first sector and second byte, also for storage, now then need to do an escape process.Namely, when using first character joint, for not using with above-mentioned setting, the information data if desired write identifies or activates that the identification information such as to identify identical just.When second bytes store information, the information data if desired write for being set using irrecoverable mark maybe can recovering identify identical with above-mentioned, then can adopt two characters replacements of setting just.Such as: when written information data 0xfe, 0xff and 0,x01 two characters are used to replace; When written information data 0xff, 0xff and 0,x00 two characters are used to replace.Other situation then carries out normal write operation.
Step S17: terminate this Stored Procedure.
When electronic tag receives the instruction be used to complete, then terminate this use, electronic tag enters dormant state.
Preferably, for the ease of after judge whether to need the information recovered in sector in abnormal cases, when receiving the instruction be used to complete, writing irrecoverable mark current use in the byte that returns to form of sector, representing that this sector has been used to complete without the need to recovering information again.That is, when not writing this irrecoverable mark, being the recovered Identification obtained behind erasing sector in the byte that returns to form, representing and need recovery information.
Continuing to use above-mentioned example, when being used to complete, writing irrecoverable mark 0xfe current use in the byte that returns to form of sector, before for this mark of write, for recovering mark 0xff in the byte that returns to form.
Embodiment two
The information storage means of the electronic tag that the embodiment of the present invention two provides, after arranging state of activation byte, electronic tag realizes the flow process of information storage as shown in Figure 4, performs step as follows:
Step S21: electronic tag receives and uses request.
With step S11, repeat no more herein.
Step S22: electronic tag searches the sector being 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: according to the Query Result whether inquiring the sector being in state of activation, determines and currently uses sector.Specifically comprise:
(1) sector activating mark is comprised if found in above-mentioned steps S22, and this sector is not when being last sector of storage space, the information of wiping the activation mark in this sector and storing, and the next sector of this sector is used sector as current.
(2) sector activating mark is comprised if found in above-mentioned steps S22, and this sector is when being last sector of storage space, the information of wiping the activation mark in this sector and storing, and first of storage space sector is used sector as current.
(3), when comprising the sector activating mark if do not find in above-mentioned steps S22, first of storage space sector is used sector as current.
Continue to use the example of top, if find sector S istate of activation byte in comprise state of activation mark 0xfe time, then illustrate this sector be last time use sector, wipe this sector S iin activation mark and the information that stores, and determine sector S (i+1) %Nsector is used as current.Wherein, (i+1) %N represents the remainder of (i+1)/N, thus can be implemented in the sector S comprising state of activation mark 0xfe found ifor sector S n-1time, the current sector that uses determined is for sector S 0.
If when finding in state of activation byte the sector comprising and activate mark 0xfe, the current sector that uses determined is for sector S 0.Now, be the situation of storage space when being in unused state, all sectors are all original, therefore do not need erasing.
Step S24: activate and currently use sector.
Determine current use sector after, to use in the state of activation byte of sector write to activate mark current, currently use sector to activate.
Continue to use the example of top, currently use sector S what determine (i+1) %Nor S 0state of activation byte in write activate mark 0xfe.Namely currently sector S is used (i+1) %Nor S 0be activated.
Step S25: continue to receive the information from outside.
Ask and after performing above-mentioned steps, electronic tag then can keep dormant state and the information of wait-receiving mode outside, the instruction that the information from outside that may receive may comprise write request and be used to complete receiving to use.
When receiving write request, perform step S26; When receiving the instruction be used to complete, perform step S27; Otherwise continuation dormancy.
Step S26: write as initial write point the information to be stored received using the current sector that uses, and return step S25 continuation wait-receiving mode information.
The detailed process that information stores, with step S16, repeats no more herein.
Step S27: terminate this Stored Procedure.Electronic tag enters dormant state.
With step S17, repeat no more herein.
The electronic labeling information of above-described embodiment one stores realization flow, before each write, wipe the sector that will use, and the sector repeating query realizing storage space uses, and ensures that each sector used only is wiped free of once.The electronic labeling information of above-described embodiment two stores realization flow, just used sector was wiped once before each write, when writing then without the need to clashing, the sector repeating query that can realize storage space equally uses again, and ensures that each sector used only is wiped free of once.
After above-mentioned setting returns to form byte, when there is abnormal restarting, such as: when accident power-off, equipment failure etc. cause the situation of abnormal restarting to occur, can recover to be in state of activation and information in the sector used.Its flow process as shown in Figure 5, performs step as follows:
Step S31: electronic tag powers on and restarts.
Such as: electronic tag restarts because of the abnormal conditions such as fault or power-off.
Step S32: find the sector being in state of activation in each sector of its storage space.
The process of searching with step S12, can repeat no more herein.
Step S33: check the byte that returns to form be in the sector of state of activation found.
Check the byte that returns to form be in the sector of state of activation, whether to comprise irrecoverable mark according in the byte that returns to form arranged, determine whether to need to recover the information that this is in the sector of state of activation.
Wherein, above-mentioned irrecoverable be identified at the instruction receiving and be used to complete after write current the returning to form in byte of sector of using.If fruit to be in the sector of state of activation not this irrecoverable mark, then when specification exception starts, this sector just in use, needs to recover.
Such as: the sector being in state of activation found, namely comprising the sector activating mark in state of activation byte is S i, then sector S is checked ithe byte that returns to form.
Step S34: comprise irrecoverable mark in the byte that returns to form? if not, step S36 is performed; If so, step S35 is performed.
Continue to use the example of top, if sector S ithe byte packet that returns to form containing irrecoverable mark 0xfe, then execution step S35, if sector S ithe byte that returns to form do not comprise irrecoverable mark 0xfe, but comprise can recover identify 0xff, then perform step S36.
Step S35: electronic tag enters dormant state.
Without the need to sector S iinternal storage information recover.
Step S36: what recovery found is in the information stored in the sector of state of activation.
To sector S iinternal storage information recover according to message structure.
Step S37: electronic tag enters normal Stored Procedure.
After storage Information recovering completes, this electronic tag being in state of activation enters normal Stored Procedure, uses until complete this.
As long as ensure that in fact it is available by erase operation for not using mark and can recovering mark, and irrecoverable mark and activate mark be can by write mode available, be used to complete mark be can by rewriting mode available.Concrete mark is arranged can be selected flexibly.
According to the information storage means of the above-mentioned electronic tag that the embodiment of the present invention one provides, a kind of information-storing device of electronic tag can be built, its structure as shown in Figure 6, comprising: receiver module 10, enquiry module 20, determination module 30, writing module 40 and execution module 50.
Receiver module 10, for receiving the instruction using request, write request and be used to complete.
Enquiry module 20, for receive use request when receiver module 10 after, searches the sector being in state of activation in each sector of its storage space.
Above-mentioned enquiry module 20, specifically for: after receiver module 10 receives and uses request, by searching the sector comprising in the state of activation byte that arranges in storage space and activate mark, realize looking into the sector being in state of activation in each sector of storage space.
Determination module 30, for whether inquiring the Query Result of the sector being in state of activation according to enquiry module 20, determines and currently use sector, and the sector that change is in state of activation is that determine current uses sector.
Preferably, above-mentioned determination module 30, can comprise further: the first determining unit 301 and first activates unit 302.
First determining unit 301, for find in the state of activation byte that arranges in storage space the sector that comprises and activate mark when enquiry module 20 and this sector is not last sector of storage space time, activation mark in this sector is rewritten as and is used to complete mark, and the next sector of this sector is used sector as current; When enquiry module 20 finds that to comprise the sector activating mark be last sector of storage space, the activation mark in this sector is rewritten as and is used to complete mark, and first of storage space sector is used sector as current; When enquiry module 20 does not find the sector comprising and activate mark, first of storage space sector is used sector as current.
First activates unit 302, for wiping the current information being used to complete mark and storing used in sector that the first determining unit 301 is determined, uses write in the state of activation byte of sector to activate mark current.
Writing module 40, for when receiver module 10 receives write request, writes as initial write point the information to be stored received using the current sector that uses that determination module 30 is determined.
Preferably, above-mentioned writing module 40, can comprise further: judging unit 401 and writing unit 402.
Judging unit 401, for when receiver module 10 receives write request, judges whether the size of the storage area needed for information to be stored is greater than the size of the available memory area of a sector.
Writing unit 402, if the size being not more than the available memory area of a sector for the size of the storage area needed for information to be stored, is then directly written to determine current and uses in sector by information to be stored; If the size of the storage area needed for information to be stored is greater than the size of the available memory area of a sector, the size of the storage area then needed for information to be stored, is written to information to be stored and uses in the available memory area of at least two continuous print sectors sector from current.
Execution module 50, for after receiver module 10 receives the instruction be used to complete, terminates this Stored Procedure.
Preferably, the information-storing device of above-mentioned electronic tag, also comprises: recover module 60.
Above-mentioned execution module 50, also for after receiver module 10 receives the instruction be used to complete, writes irrecoverable mark current use in the byte that returns to form of sector.
Recover module 60, after electronic tag abnormal restarting, find the sector being in state of activation in each sector of its storage space, be in the byte that returns to form arranged in the sector of state of activation whether comprise irrecoverable mark according to this, determine whether to need to recover the information that this is in the sector of state of activation.
According to the information storage means of the above-mentioned electronic tag that the embodiment of the present invention two provides, a kind of information-storing device of electronic tag can be built, its structure as shown in Figure 7, comprising: 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 the receiver module 10 of the information-storing device of the electronic tag shown in above-mentioned Fig. 6, enquiry module 20, writing module 40 and execution module 50.The judging unit 411 comprised in writing module 41 and writing unit 412 are identical with writing unit 402 with the judging unit 401 comprised in writing module 40.
The difference of the device shown in this device and Fig. 6 is: its determination module 31, for whether inquiring the Query Result of the sector being in state of activation according to enquiry module 20, determine and currently use sector, and the sector that change is in state of activation is that determine current uses sector.
Preferably, above-mentioned determination module 31, can comprise further: the first determining unit 311 and first activates unit 312.
Second determining unit 311, for find in the state of activation byte that arranges in storage space the sector that comprises and activate mark when enquiry module 21 and this sector is not last sector of storage space time, the information of wiping the activation mark in this sector and storing, and the next sector of this sector is used sector as current; When enquiry module 21 finds that to comprise the sector activating mark be last sector of storage space, the information of wiping the activation mark in this sector and storing, and uses sector using first of storage space sector as current; When enquiry module 21 does not find the sector comprising and activate mark, first of storage space sector is used sector as current.
Second activates unit 312, writes activation mark for current the use in the state of activation byte of sector determined in the second determining unit 311.
The information storage means of the above-mentioned electronic tag that the embodiment of the present invention provides and device, by when using certain sector, be set to state of activation, search by identifying in state of activation byte to comprise to activate to identify the sector being in state of activation when using next time, and determine that its next sector is current spendable sector, thus the rotation successively realizing sector uses, and improves the resources of chip utilization factor of electronic tag, extends the serviceable life of electronic tag internal storage space.
The electronic tag applied in the path identifying system of intelligent transportation field, in the sheet of its CPU, the storage space such as the outer EEPROM of Flash or sheet is generally used for the store electrons label routing information of process and expressway entrance and exit information on the way.Need the quantity of information stored usually to only have tens bytes, be generally not more than the memory capacity of a minimum sector.And the storage space of electronic tag can provide the space of multiple sector to store for data, the application on electronic labeling information stores of sector rotation mechanism is made to possess precondition.
As can be seen from the flow process that above-mentioned whole information stores, after sector new each time uses request to occur, the sector of use all can automatic alternate, recycles available sector.No matter be that above-described embodiment one wiped the sector that will use before each write, the once just used sector in erasing before each write of above-described embodiment two, when next time writes then without the need to carrying out the mode clashed again, it is once for once erase operation that each sector often uses.For the transition process of embodiment one from state of activation to completion status be by state of activation byte activation mark 0xfe be directly rewritten into be used to complete mark 0xfc; The process becoming unrecoverable state from returning to form to is that the mark the recovered 0xff returned to form byte is directly rewritten into irrecoverable mark 0xfe.
The characteristic of Flash storage space determines write operation and can only realize being write as 0 by 1 of some or several binary digit, and erase operation reverts to 1 by 0 of all binary digits.And above-mentioned state of activation byte and the mark setting returned to form in byte are arranged based on this rule just, never use mark 0xff be rewritten into activate mark 0xfe, from activation mark 0xfe be directly rewritten into be used to complete mark 0xfc and from can recover mark 0xff be directly rewritten into irrecoverable mark 0xfe, be all write as from 10 operation; And from from activation mark 0xfe revert to do not use mark 0xff, from be used to complete mark 0xfc revert to do not use mark 0xff and from can not recover mark 0xfe revert to can recover identify 0xff, be all by erasable from 0 recover 1 operation.Therefore, the setting of state of activation byte and the byte that returns to form does not need additionally to wipe storage space, at utmost reduce the erasing frequency of storage space, ensure that each sector used only is wiped free of once, improve the access times of storage space to greatest extent.Avoid same position at storage space by repeatedly erasable problem, thus improve serviceable life.
Said method activates mark by using the write meeting erasable characteristic in state of activation byte and is used to complete mark, does not use mark, controls the rotation use of sector; And pass through to meet the mark recovered of erasable characteristic and irrecoverable mark equally, realize Information recovering and control.By having taken into full account the erasable characteristic of storage space, ensure that each byte of current use sector only can by once erasable in the process completing primary information storage use.Simultaneously, by arranging the byte that returns to form, when there are abnormal conditions, the system that can also ensure is meeting accident power-off or after restarting, power on restart after correctly can recover power-off before be in the information stored in the sector used of state of activation, improve stability and the reliability of system to a great extent.
The above; be only the present invention's preferably embodiment; 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 change 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. information storage means for electronic tag, is characterized in that, comprising:
Electronic tag searches the sector being in state of activation in each sector of its storage space after receiving and using request;
Electronic tag, according to the Query Result whether inquiring the sector being in state of activation, is determined and is currently used sector, and activates and describedly currently use sector;
When electronic tag receives write request, write as initial write point the information to be stored received using the described current sector that uses; And/or when electronic tag receives the instruction be used to complete, terminate this Stored Procedure.
2. the method for claim 1, is characterized in that, by searching the sector comprising in the state of activation byte that arranges in described storage space and activate mark, realizes searching the sector being in state of activation in each sector of described storage space.
3. method as claimed in claim 2, it is characterized in that, whether described basis inquires the Query Result of the sector being in state of activation, determines currently to use sector, and activates and describedly currently use sector; Specifically comprise:
When find comprise described activate mark sector and this sector be not last sector of described storage space time, the activation mark in this sector is rewritten as and is used to complete mark, and the next sector of this sector is used sector as current; Or
When finding that to comprise the described sector activating mark be last sector of described storage space, the activation mark in this sector being rewritten as and being used to complete mark, and first of described storage space sector is used sector as current; Or
When not finding the sector comprising described activation mark, first of described storage space sector is used sector as current;
Wipe the current information being used to complete mark and storing used in sector, write described activation mark described current use in the state of activation byte of sector.
4. method as claimed in claim 2, it is characterized in that, whether described basis inquires the Query Result of the sector being in state of activation, determines currently to use sector, and activates and describedly currently use sector; Specifically comprise:
When find comprise described activate mark sector and this sector be not last sector of described storage space time, the information of wiping the activation mark in this sector and storing, and uses sector using the next sector of this sector as current; Or
When finding that to comprise the described sector activating mark be last sector of described storage space, the information of wiping the activation mark in this sector and storing, and uses sector using first of described storage space sector as current; Or
When not finding the sector comprising described activation mark, first of described storage space sector is used sector as current;
Described activation mark is write described current use in the state of activation byte of sector.
5. the method for claim 1, is characterized in that, described using the described current information to be stored using sector to receive as the write of initial write point, specifically comprises:
If the size of the storage area needed for described information to be stored 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 uses in sector;
If the size of the storage area needed for described information to be stored is greater than the size of the available memory area of a sector, the size of the storage area then needed for described information to be stored, is written to described information to be stored and currently uses in the available memory area of at least two continuous print sectors sector from described.
6. the method as described in as arbitrary in claim 1-5, is characterized in that, also comprise:
After electronic tag abnormal restarting, electronic tag finds the sector being in state of activation in each sector of its storage space, be in the byte that returns to form arranged in the sector of state of activation whether comprise irrecoverable mark according to this, determine whether to need to recover the information that this is in the sector of state of activation; Described irrecoverable be identified at the instruction receiving and be used to complete after write described current the returning to form in byte of sector of using.
7. an information-storing device for electronic tag, is characterized in that, comprising:
Receiver module, for receiving the instruction using request, write request and be used to complete;
Enquiry module, for receive use request when described receiver module after, searches the sector being in state of activation in each sector of its storage space;
Determination module, for whether inquiring the Query Result of the sector being in state of activation according to described enquiry module, determines and currently uses sector, and activates and describedly currently use sector;
Writing module, for when described receiver module receives write request, writes as initial write point the information to be stored received using the current sector that uses that described determination module is determined;
Execution module, for after described receiver module receives the instruction be used to complete, terminates this Stored Procedure.
8. device as claimed in claim 7, it is characterized in that, described determination module, specifically comprises:
First determining unit, for find in the state of activation byte that arranges in described storage space the sector that comprises and activate mark when described enquiry module and this sector is not last sector of described storage space time, activation mark in this sector is rewritten as and is used to complete mark, and the next sector of this sector is used sector as current; When described enquiry module find comprise described activate mark sector be last sector of described storage space time, activation mark in this sector is rewritten as and is used to complete mark, and first of described storage space sector is used sector as current; When described enquiry module does not find the sector comprising described activation mark, first of described storage space sector is used sector as current;
First activates unit, for wiping the current information being used to complete mark and storing used in sector that described first determining unit is determined, writes described activation mark described current use in the state of activation byte of sector.
9. device as claimed in claim 7, it is characterized in that, described determination module, specifically comprises:
Second determining unit, for find in the state of activation byte that arranges in described storage space the sector that comprises and activate mark when described enquiry module and this sector is not last sector of described storage space time, the information of wiping the activation mark in this sector and storing, and the next sector of this sector is used sector as current; When described enquiry module finds that to comprise the described sector activating mark be last sector of described storage space, the information of wiping the activation mark in this sector and storing, and uses sector using first of described storage space sector as current; When described enquiry module does not find the sector comprising described activation mark, first of described storage space sector is used sector as current;
Second activates unit, writes described activation mark for current the use in the state of activation byte of sector determined in described second determining unit.
10. the device as described in as arbitrary in claim 7-9, is characterized in that, also comprise: recover module;
Described execution module, also for after described receiver module receives the instruction be used to complete, writes irrecoverable mark described current use in the byte that returns to form of sector;
Described recovery module, after electronic tag abnormal restarting, find the sector being in state of activation in each sector of its storage space, be in the byte that returns to form arranged in the sector of state of activation whether comprise irrecoverable mark according to this, determine whether to need to recover the information that this 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 CN102054192A (en) 2011-05-11
CN102054192B true 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 (1)

* 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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7529969B1 (en) * 2006-08-24 2009-05-05 Micron Technology, Inc. Memory device internal parameter reliability
US8650228B2 (en) * 2008-04-14 2014-02-11 Roderick B. Wideman Methods and systems for space management in data de-duplication

Patent Citations (1)

* 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

Also Published As

Publication number Publication date
CN102054192A (en) 2011-05-11

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
CN100424655C (en) Method for managing flash memory
US20170206157A1 (en) Recovery for non-volatile memory after power loss
CN102063380B (en) Method and device for writing data in non-volatile memory
EP1782176B1 (en) Systems, methods, computer readable medium and apparatus for memory management using nvram
CN101650972B (en) Method for updating data of nonvolatile memory of intelligent card
WO1997012324A1 (en) Memory management
WO2003056433A1 (en) Memory device and recording/reproducing apparatus using the same
CN101763295A (en) Data backup method, data backup device, backup item erasing method, backup item erasing device, data recovery method and data recovery device
CN104090730A (en) Method and device for conducting data reading and writing on storage device
CN102073592B (en) Quick read-write method and device for flash memory
CN102737715A (en) Data brown-out protection method for NOR flash memory
CN101908023A (en) Data storage method for NandFlash storage
CN101436158A (en) Parameter management method and system based on embedded type equipment flash memory
JP3212960B2 (en) Data management method using flash memory
CN102662856A (en) Solid state disk and access method
CN110287068B (en) NandFlash driving method
CN109165115A (en) A method of enhancing FLASH memory reliability
CN101458661B (en) Flash memory block abrasion equilibration method and system
CN108664208A (en) File appending write operation method based on FLASH memory and device
CN103176920A (en) Nor flash power down protection method and Nor flash power down protection device
CN105653208A (en) Data storage system and data read-write method based on same
CN102054192B (en) A kind of information storage means of electronic tag and device
CN111124294B (en) Sector mapping information management method and device, storage medium and equipment

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.