Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The method of the embodiment of the invention can be applied to the decoding scene of the electronic tag, and can effectively realize the decoding of the electronic tag.
In the related art, an electronic tag generally has two demodulation circuits supporting demodulation of two ASK signals, one demodulation circuit for demodulation of an ASK100% signal and the other demodulation circuit for demodulation of an ASK10% signal. The decoding circuit needs to determine which demodulation circuit outputs the demodulation signal by itself, if two demodulation circuits output signals at the same time, false triggering is easy to occur, and it is not easy to determine which demodulation circuit outputs the demodulation signal.
According to the decoding method of the electronic tag, the modulation type corresponding to the demodulation signal is accurately determined through the first groove time sequence of the demodulation signal, so that the demodulation signal output by which demodulation circuit should be decoded can be accurately judged; determining the corresponding coding type of the demodulation signal according to the characteristic of the SOF time sequence of the frame start part in the demodulation signal; and finally, decoding the demodulation signal output by the demodulation circuit determined according to the groove time sequence according to the decoding rule corresponding to the determined coding mode, thereby realizing the purpose of accurate decoding.
The following describes the technical solution of the present invention in detail with reference to fig. 1 to 16. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 1 is a flowchart of an embodiment of a decoding method of an electronic tag according to an embodiment of the present invention. As shown in fig. 1, the method provided in this embodiment includes:
step 101, determining a modulation type corresponding to a demodulation signal according to a first groove time sequence of the demodulation signal;
specifically, the electronic tag generally has two demodulation circuits supporting demodulation of two ASK signals, one demodulation circuit for demodulation of an ASK100% signal and the other demodulation circuit for demodulation of an ASK10% signal; if two demodulation circuits output signals at the same time, false triggering is easy to occur, so the electronic tag decoding circuit needs to determine which demodulation circuit outputs the demodulation signal by itself.
The modulation type corresponding to the demodulation signal can be accurately determined through the first groove time sequence of the demodulation signal.
For example, fig. 2 is a schematic diagram of shaping grooves corresponding to ASK10% and ASK100% modulation types, and fig. 3 is a schematic diagram of shaping grooves corresponding to ASK100% modulation types, and the decoding circuit can determine the modulation type corresponding to the demodulation signal according to whether the first groove timing of the received demodulation signal is ASK10% groove timing or ASK100% groove timing. If the first groove time sequence of the demodulation signal received by the decoding circuit is the groove time sequence of ASK10%, determining that the modulation type corresponding to the demodulation signal is ASK 10%; if the first slot timing of the demodulation signal received by the decoding circuit is the slot timing of ASK100%, it may be determined that the modulation type corresponding to the demodulation signal is ASK 100%.
Step 102, determining a coding type corresponding to the demodulation signal according to the time sequence and the modulation type of the SOF in the demodulation signal;
specifically, in the RFID system conforming to the ISO15693 protocol, the dialogue of the reader and the electronic tag is performed in the form of frames, and each frame signal includes: a frame start portion, a data portion, and a frame end portion.
The reader-writer supports one or two of 256 1-out or 4-out 1 coding modes, so the electronic tag should support decoding of 256 1-out or 4-out 1 coding modes. The 256-choice 1 encoding rule is divided into 256 time segments in about 4.833ms, representing one byte of data, each time segment being about 18.88us; the 4-choice 1 encoding rule is to split equally into 4 time periods of about 75.52us each of about 18.88us.
The 256-select 1 encoded frame start portion is ASK modulated at the first and last 9.44us times within about 75.52 us; the 1-out-of-4 encoded frame start portion is ASK modulated at first and sixth 9.44us times within about 75.52 us;
therefore, the decoding circuit can determine whether the reader/writer uses 256-1 encoding or 4-1 encoding according to the timing of the SOF.
For example, when the time sequence of the frame start part in the demodulation signal received by the electronic tag decoding circuit is ASK modulation performed by the first 9.44us and the last 9.52 us within about 75.52us, the code type corresponding to the demodulation signal can be judged to be 256-choice 1 codes according to the time sequence of the frame start part; the electronic tag decoding circuit receives the first and sixth 9.44us ASK modulation in the time sequence of the frame start part in the demodulation signal, and can judge that the corresponding code type of the demodulation signal is 4-1 codes according to the time sequence of the frame start part.
Step 103, if the modulation type of the demodulation signal is unchanged in the process of decoding the SOF, decoding the demodulation signal according to the modulation type and the corresponding coding type.
Specifically, after determining whether the coding mode corresponding to the demodulation signal is 256-1 coding or 4-1 coding, if the modulation type of the demodulation signal is unchanged in the process of decoding the SOF, the decoding circuit can decode the demodulation signal according to the modulation type and the corresponding coding type to finish decoding the demodulation signal; if it is determined in step 101 that the modulation type corresponding to the demodulation signal is ASK10% of the first modulation type according to the first slot timing of the demodulation signal, when a slot end pulse signal of ASK100% of the second modulation type is received in the process of decoding the SOF, since in ASK100% modulation, the modulation time of each signal reaches 9.44us, the radio frequency field cannot continue to provide electromagnetic coupling for the electronic tag, and generally no system clock is provided for the digital circuit, which means that the digital circuit has no clock in about 9.44us before the signal, the timing of ASK10% being decoded has been in error, the decoding of ASK10% demodulation signal should be stopped, i.e. when a demodulation signal of ASK10% modulation type is received, the ASK100% modulation type signal interrupts the ASK10% demodulation signal, and the slot end pulse signal of ASK100% of the second modulation type is used as the start signal of the SOF, the coding type is determined according to the timing of the SOF, and the decoding of the demodulation signal is completed.
For example, after the decoding circuit determines that the coding mode corresponding to the demodulation signal is 256-1, the decoding circuit can accurately determine the decoding rule corresponding to the demodulation signal because the coding and the decoding are corresponding inverse processes; if the type of the demodulation signal is not changed in the process of decoding the SOF, decoding the demodulation signal according to a decoding rule corresponding to the determined 256-option 1 coding mode; if the decoding circuit determines that the coding mode corresponding to the demodulation signal is a 4-choice 1 coding mode, if the type of the demodulation signal is not changed in the process of decoding the SOF, decoding the demodulation signal according to a decoding rule corresponding to the determined 4-choice 1 coding mode; if a demodulation signal of an ASK10% modulation type is received, a demodulation signal of an ASK100% modulation type is received, the ASK10% demodulation signal is interrupted by the ASK100% modulation type signal, a groove end pulse signal of an ASK100% second modulation type is used as a start signal of the SOF, the coding type is determined according to the time sequence of the SOF, and decoding of the demodulation signal is completed.
According to the method, the modulation type corresponding to the demodulation signal is accurately determined through the first groove time sequence of the demodulation signal, so that the demodulation signal output by which demodulation circuit should be decoded can be accurately judged; determining the corresponding coding type of the demodulation signal according to the characteristic of the SOF time sequence of the frame start part in the demodulation signal; and finally, decoding the demodulation signal output by the demodulation circuit determined according to the groove time sequence according to the decoding rule corresponding to the determined coding mode, thereby realizing the purpose of accurate decoding.
In an embodiment, before decoding the demodulated signal according to the modulation type and the corresponding coding type, the method further includes:
if the modulation type is the first modulation type, controlling a demodulation circuit corresponding to the second modulation type to be turned off;
and if the modulation type is the second modulation type, controlling the demodulation circuit corresponding to the first modulation type to be turned off.
Specifically, if the modulation type is determined to be the first modulation type before decoding the demodulation signal, the demodulation circuit corresponding to the second modulation type may be turned off, so as to avoid the influence of the demodulation signal corresponding to the second modulation type on decoding; if the modulation type is determined to be the second modulation type, the demodulation circuit corresponding to the first modulation type can be turned off, so that the influence of the demodulation signal corresponding to the first modulation type on decoding is avoided.
For example, as shown in fig. 4, before decoding the demodulated signal, it has been determined that the modulation type corresponding to the signal to be demodulated is ASK10% modulation, theoretically, ASK100% demodulation output maintains a high level, but due to environmental effects or design problems of the demodulation circuit, the demodulation circuit corresponding to the modulation type ASK100% modulation also outputs an ASK100% signal, which affects decoding of the demodulated signal of the demodulation circuit corresponding to the modulation type ASK 10%; therefore, the demodulation circuit corresponding to the modulation type ASK100% is turned off, so that the influence of decoding of the demodulation signal corresponding to the modulation type ASK10% can be avoided, and the purpose of accurate decoding is further realized.
As shown in fig. 5, if it has been determined that the modulation type corresponding to the signal to be demodulated is ASK100% modulation, theoretically, ASK10% demodulation output maintains a high level, but due to environmental effects or design problems of the demodulation circuit, the demodulation circuit corresponding to the modulation type ASK10% modulation also outputs an ASK10% signal, which affects decoding of the demodulation signal of the demodulation circuit corresponding to the modulation type ASK 100%; therefore, the demodulation circuit corresponding to the modulation type ASK10% is turned off, so that the influence of decoding of the demodulation signal corresponding to the modulation type ASK10% can be avoided, and the purpose of accurate decoding is further realized.
In the above embodiment, before decoding the demodulation signal according to the modulation type and the corresponding coding type, if the modulation type of the signal to be demodulated is already determined, the demodulation circuits corresponding to the modulation types except for the modulation type are turned off, so that the demodulation circuits corresponding to the other modulation types are prevented from generating signals to affect the decoding of the demodulation signal, and the purpose of accurate decoding is further achieved.
In an embodiment, before determining the modulation type corresponding to the demodulation signal, the method further includes:
If the demodulation signal is a demodulation signal of a first modulation type, performing first shaping processing on the demodulation signal to increase the widths of a groove start pulse signal and a groove end pulse signal of the demodulation signal;
and if the demodulation signal is the demodulation signal of the second modulation type, performing second shaping processing on the demodulation signal to acquire a groove ending pulse signal of the second modulation type.
For example, as shown in fig. 3, the modulation type of the demodulation signal is ASK10% modulation, and then the demodulation signal is decoded after being shaped, that is, the ASK10% demodulation signal is synchronized and stretched, so that the occurrence of metastable state is reduced and the sampling frequency requirement of the decoding module is met; if the modulation type of the demodulated signal is ASK100% modulation, the ASK100% demodulated signal is shaped to include a form having a groove end pulse representing signal for processing by the decoding module.
Optionally, for modulation type of ASK100%, the shaping process may be performed simultaneously with the synchronization process.
In the above embodiment, the demodulation signal is shaped, that is, the ASK10% demodulation signal is synchronized and stretched, so that the occurrence of metastable state is reduced and the sampling frequency requirement of the decoding module is satisfied; shaping the ASK100% demodulated signal to include a form having a groove end pulse representing signal; the method achieves the aim of facilitating the processing of the decoding module and reduces the complexity of decoding.
In an embodiment, the modulation type of the SOF is a first modulation type, and determining the coding type corresponding to the demodulated signal according to the timing and the modulation type of the SOF in the frame start part of the demodulated signal includes:
and if the groove ending pulse signal of the second modulation type is received in the SOF decoding process, the groove ending pulse signal is used as a starting signal of the SOF, and the coding type is determined according to the time sequence of the SOF.
Specifically, if the modulation type corresponding to the demodulation signal is determined to be ASK10% modulated according to the first groove timing sequence of the demodulation signal, if a groove ending pulse signal with the modulation type of ASK100% modulated is received in the process of decoding the SOF, the groove ending pulse signal is used as a starting signal of the SOF, and the coding type is determined according to the SOF timing sequence.
For example, as shown in fig. 6, when it is determined that the modulation type corresponding to the demodulation signal is ASK10% modulation according to the first slot timing sequence of the demodulation signal, if a slot end pulse signal modulated by ASK100% of the second modulation type is received in the SOF decoding process, since in ASK100% modulation, the modulation time of each signal reaches 9.44us, the radio frequency field cannot continue to provide electromagnetic coupling for the electronic tag, and the electronic tag will drop at a certain rate due to the lack of supply of power, so as to slow down the power supply voltage drop rate, and generally no longer provide a system clock for the digital circuit; that is, ideally, the digital circuit is clocked during a modulation time of 9.44us of ASK 100%; the first modulation type ASK10% demodulated signal is being decoded, the second modulation type ASK100% demodulation circuit generates a demodulated signal, which means that the digital circuit has no clock for about 9.44us before the signal, the time sequence of ASK10% being decoded has been erroneous, the decoding of ASK10% demodulated signal should be exited, and the ASK100% demodulated signal is decoded as the first groove time sequence of SOF; then the groove end pulse signal modulated with ASK100% modulation type is used as the start signal of the SOF, and it is determined whether to encode 1-by-4 or 1-by-256 according to the timing of the SOF.
In the above embodiment, by judging whether the groove ending pulse signal of the second modulation type is received in the SOF decoding process of the first modulation type; if so, indicating that the SOF of the first modulation type is an error SOF signal, taking a groove end pulse signal of the second modulation type as an SOF start signal, and determining the coding type according to the time sequence of the SOF; therefore, the problem of SOF decoding errors is avoided, and the purpose of accurate decoding is achieved.
In an embodiment, if the modulation type of the SOF is the second modulation type, the method further includes:
and if the groove start pulse signal or the groove end pulse signal of the demodulation signal of the first modulation type is received in the SOF decoding process, continuing to decode the SOF.
Specifically, if the modulation type corresponding to the demodulation signal is determined to be ASK100% modulation according to the first groove timing sequence of the demodulation signal, if a groove start or end pulse signal with the modulation type of ASK10% modulation is received in the process of decoding the SOF, the SOF is continuously decoded.
For example, as shown in fig. 7, it is determined that the modulation type corresponding to the demodulation signal is ASK100% modulation according to the first slot timing of the demodulation signal; because in ASK100% modulation, the modulation time of each signal reaches 9.44us, the radio frequency field can not continue to provide electromagnetic coupling for the electronic tag, the power supply voltage of the electronic tag can be reduced at a certain rate due to the lack of power supply, and a system clock is not provided for a digital circuit in general in order to slow down the power supply voltage reduction rate; that is, ideally, the digital circuit is clocked during a modulation time of 9.44us of ASK 100%; if the first modulation type ASK10% demodulation circuit generates a demodulation signal at this time, this means that ASK10% of the timing has been erroneous, the notch start or end pulse signal of the received demodulation signal of the first modulation type should be discarded, and the decoding of the SOF of the second modulation type should be continued.
In the above embodiment, by judging whether the groove start or end pulse signal of the demodulation signal of the first modulation type is received in the second modulation type SOF decoding process; if so, discarding the start or end pulse signal of the received demodulation signal of the first modulation type, and continuing decoding the second modulation type SOF; therefore, the influence of the demodulation signal of the first modulation type on the SOF decoding of the current second modulation type is avoided, and the purpose of accurate decoding is achieved.
In an embodiment, after receiving a complete data frame of a demodulation signal, if it is determined that a modulation type of the demodulation signal is a first modulation type, if the electronic tag is within a preset radio frequency field range, the demodulation circuit of the second modulation type is kept off;
after receiving the complete data frame of the demodulation signal, if the modulation type of the demodulation signal is determined to be the second modulation type, keeping the demodulation circuit of the first modulation type off when the electronic tag is in the preset radio frequency field range.
Specifically, the dialogue between the reader and the electronic tag is performed in the form of frames, and each frame signal includes: a frame start portion, a data portion, and a frame end portion.
The dialogue between the reader and the electronic tag is performed in the form of frames, and each frame signal comprises: a frame start portion, a data portion, and a frame end portion; the reader and the electronic tag generally cannot mix modulation types in the interaction process; if the decoding circuit receives the complete data frame of the demodulation signal, if the modulation type of the demodulation signal is determined to be the first modulation type, the first modulation type is selected in the interaction process of the reader and the electronic tag, and then the demodulation circuit of the second modulation type is turned off in the current interaction process of the reader and the electronic tag; if the decoding circuit receives the complete data frame of the demodulation signal, and if the modulation type of the demodulation signal is determined to be the second modulation type, the fact that the reader and the electronic tag select the second modulation type in the interaction process is indicated, and the demodulation circuit of the first modulation type is turned off in the current interaction process of the reader and the electronic tag.
For example, as shown in fig. 8, if the decoding circuit receives the complete data frame of the demodulation signal, if the modulation type of the demodulation signal is determined to be ASK10% modulation, it is indicated that the reader and the electronic tag select ASK10% modulation in the interaction process, and the demodulation circuit of ASK100% modulation type is turned off in the current interaction process of the reader and the electronic tag; as shown in fig. 9, if the decoding circuit receives the complete data frame of the demodulation signal, if the modulation type of the demodulation signal is determined to be ASK100% modulation, it is indicated that the reader and the electronic tag select ASK100% modulation in the interaction process, and the demodulation circuit of ASK10% modulation type is turned off in the current interaction process of the reader and the electronic tag.
In the above embodiment, after receiving the complete data frame of the demodulation signal, the demodulation circuit corresponding to the other modulation types except the current modulation type is turned off by judging the modulation type of the current demodulation signal; the influence of demodulation signals generated by demodulation circuits of other modulation types on the current decoding is avoided, and the purpose of accurate decoding is achieved.
In an embodiment, in decoding the demodulation signal of the first modulation type, if another notch start pulse signal is received after the previous notch start pulse signal is received, the notch start pulse signal is taken as the inactive signal.
Specifically, when decoding the first modulated demodulation signal, the other groove start signals between the first groove start signal and the first groove end signal are not valid for decoding, and the other groove end signals between the first groove end signal and the next groove start signal are not valid for decoding; that is, the timing of the notch depends on the first notch start signal and the first notch end signal, the other signals being considered false triggers that are not valid for decoding; i.e. another groove start pulse signal is received after the previous groove start pulse signal is received, the groove start pulse signal is taken as an inactive signal.
For example, when decoding an ASK10% modulation type demodulation signal, as shown in fig. 10, other groove start signals between the first groove start signal and the first groove end signal are not valid for decoding, and other groove end signals between the first groove end signal and the next groove start signal are not valid for decoding; that is, the timing of the notch depends on the first notch start signal and the first notch end signal, and the other signals are considered false triggers that are not valid for decoding.
In the above embodiment, when decoding the first modulated demodulation signal, another notch start pulse signal is received after the previous notch start pulse signal is received, and since the other notch start signals between the first notch start signal and the first notch end signal are not valid for decoding, the other notch start pulse start signals received after the previous notch start pulse signal are discarded as false trigger signals; the influence of false triggering signals on the current decoding is avoided, and the purpose of accurate decoding is achieved.
Illustratively, the frame of this embodiment is shown in fig. 11:
the decoding type judging unit determines a modulation type corresponding to the demodulation signal according to the first groove time sequence of the demodulation signal, and determines a coding type corresponding to the demodulation signal according to the time sequence and the modulation type of the SOF in the demodulation signal; the demodulation circuit switch control unit performs switch control on the ASK10% and ASK100% demodulation circuits according to the modulation type corresponding to the demodulation signal determined by the decoding type judging unit; the high fault tolerance decoding unit judges the decoding time sequence and decodes and receives the data; if the modulation type of the demodulation signal is unchanged in the process of decoding the SOF, the output control unit decodes the demodulation signal according to the modulation type and the corresponding coding type.
Exemplary decoding detailed flowcharts are shown in fig. 12-14:
as shown in fig. 12: after the reader sends a request to the tag, the electronic tag demodulation circuit outputs a demodulation signal after receiving the request, shapes the demodulation signal, and executes steps 301 and 302 to determine the modulation type corresponding to the demodulation signal according to the received first groove time sequence; if the first notch of the received demodulation signal is an ASK100% notch end signal, decoding the ASK100% modulation signal; if the first notch of the received demodulated signal is an ASK10% notch start signal, ASK10% modulated signal decoding is performed.
The ASK10% demodulated signal decoding flow is as shown in fig. 13:
specifically, if the first slot of the received demodulation signal is an ASK10% slot start signal, steps 308 and 309 are executed to determine whether the slot timing is within the fault tolerance range, and if the slot timing is beyond the fault tolerance range, the decoding process ends;
because ASK10% modulation type, there is clock running in the groove, need to judge whether the time sequence of the groove is in the fault tolerance range set, therefore when receiving the signal of the groove, need to judge whether its time sequence is in the fault tolerance range, extend groove normal time sequence about 9.44us to 4.72us to 14.16us and decode, the time sequence of the groove in this range is judged as the normal time sequence, time sequence X between two grooves also extends X-4.72us to X+4.72us and decodes, the time sequence of two groove time in this range is judged as the normal time sequence; if the time sequence is judged to be beyond the fault tolerance range, the decoding process is ended;
If the slot timing is within the fault tolerance range, when receiving a demodulation signal of ASK10% modulation type, receiving a demodulation signal of ASK100% modulation type, executing the ASK100% modulation type signal of step 304 to interrupt decoding of the ASK10% demodulation signal, and entering into ASK100% modulation signal decoding of step 307; if the ASK10% modulation type demodulation signal is received, step 304 is executed to determine that there is no ASK100% demodulation signal, step 303 is executed to continue to receive the ASK10% groove start signal and the ASK10% groove end signal, step 319 is executed to determine whether the received groove is a single EOF timing, and if the received groove is a single EOF timing, the decoding process ends.
After step 303 is executed, if an ASK10% groove start signal and an ASK10% groove end signal are received, steps 314 and 323 are executed to determine whether the received signal is an SOF sequence and satisfies the fault tolerance range, and step 305 is executed to determine whether ASK10% is interrupted by ASK 100%; if it is determined that the SOF sequence meets the fault tolerance range and the ASK10% slot timing is not interrupted by the ASK100% slot, step 320 is executed to turn off the demodulation circuit corresponding to the ASK100% modulation type, so as to avoid that the false triggering signal of the demodulation circuit of the ASK100% modulation type affects the decoding of the demodulation signal;
The decoding type is judged as follows: executing step 306 to determine the coding type corresponding to the demodulation signal according to the timing sequence and modulation type of the SOF; when the timing sequence satisfies the first and sixth grooves 9.44us time within about 75.52us, performing ASK modulation, and then encoding for 4-selection 1; if the timing sequence is ASK modulated at a first and last groove 9.44us times within about 75.52us, then a 256-select 1 code is used;
the 4-out-of-1 coding rule is that the coding rule is divided into 4 time periods in about 75.52us time, the time periods represent two bits of data, each time period is about 18.88us, and the second half period (about 9.44 us) of the time period corresponding to the two bits of data is subjected to ASK modulation; the 256-choice 1 coding rule is divided into 256 time periods in a period of about 4.833ms, wherein the 256 time periods represent one byte of data, each time period is about 18.88us, the second half period (about 9.44 us) of the corresponding time period of the coded data is subjected to ASK modulation, and no modulation is needed in other time periods;
if it is determined that the code type corresponding to the demodulation signal is the 4-to-1 code according to the timing sequence of the SOF, step 312 is executed to determine whether the received slot timing sequence satisfies the fault tolerance range, and if the slot timing sequence exceeds the timing sequence fault tolerance range, the decoding process is ended;
If the time sequence range is satisfied, executing step 318 and step 327 to determine whether the received EOF sequence is an EOF sequence and the fault tolerance range is satisfied, if so, executing step 322 to permanently turn off the ASK100% demodulation circuit during the current RF field, and ending the decoding process; otherwise, step 316 is performed to determine whether it satisfies the data sequence, and if so, step 325 is performed to decode the 2-bit data.
If it is determined that the code type corresponding to the demodulation signal is 256-1 codes according to the sequence of the SOF, steps 313 and 311 are executed to determine that the received slot sequence satisfies the fault tolerance range, and if the slot sequence exceeds the fault tolerance range, the decoding process is ended;
if the time sequence range is satisfied, executing step 317 and step 326 to determine whether the received EOF sequence is an EOF sequence and the fault tolerance range is satisfied, if so, executing step 321 to permanently turn off the ASK100% demodulation circuit during the current RF field, and ending the decoding process; otherwise, step 315 is executed to determine whether it satisfies the data sequence, and if so, step 325 is executed to decode the 1-byte data.
The ASK100% demodulated signal decoding flow is shown in fig. 14:
when receiving an ASK100% groove end signal, judging whether the time sequence is in a fault tolerance range, and if the time sequence is out of the fault tolerance range, ending the decoding flow; if the time sequence fault tolerance range is satisfied, executing step 409 to determine whether the received groove is a single EOF time sequence, and if the received groove is a single EOF time sequence, ending the decoding flow; otherwise, step 404 and step 413 are executed to determine whether the received SOF sequence is received and the fault tolerance range is satisfied; if yes, executing step 410 to turn off the demodulation circuit corresponding to the ASK10% modulation type, so as to avoid the error triggering signal of the demodulation circuit corresponding to the ASK10% modulation type from affecting the decoding of the demodulation signal;
The decoding type is judged as follows: according to the timing sequence and modulation type of the SOF, step 401 is executed to determine the coding type corresponding to the demodulation signal; when the timing sequence satisfies the first and sixth grooves 9.44us time within about 75.52us, performing ASK modulation, and then encoding for 4-selection 1; if the timing sequence is ASK modulated at a first and last groove 9.44us times within about 75.52us, then a 256-select 1 code is used;
if the execution step 401 determines that the code type corresponding to the demodulation signal is a 4-to-1 code according to the sequence of the SOF, the execution step 403 determines whether the received slot sequence meets the fault tolerance range, if the received slot sequence exceeds the fault tolerance range, the decoding process is ended;
if the time sequence range is satisfied, executing step 408 and step 417 to determine whether the received EOF sequence is an EOF sequence and the fault tolerance range is satisfied, if so, executing step 412 to permanently turn off the ASK100% demodulation circuit during the current RF field, and ending the decoding process; otherwise, step 406 is performed to determine whether it satisfies the data sequence, and if so, step 415 is performed to decode the 2-bit data.
If the code type corresponding to the demodulation signal is 256-1 codes according to the SOF time sequence, executing the step 402 to ensure that the received groove time sequence meets the fault tolerance range, and if the received groove time sequence exceeds the fault tolerance range, ending the decoding flow;
If the time sequence range is satisfied, executing step 407 and step 416 to determine whether the received EOF sequence is an EOF sequence and the fault tolerance range is satisfied; if yes, executing step 411 to permanently turn off the ASK100% demodulation circuit during the current rf field, and ending the decoding flow; otherwise, step 405 is executed to determine whether it satisfies the data sequence, and if so, step 414 is executed to decode the 1-byte data.
According to the decoding method of the electronic tag, the modulation type corresponding to the demodulation signal is accurately determined through the first groove time sequence of the demodulation signal, so that the demodulation signal output by which demodulation circuit should be decoded can be accurately judged; determining the corresponding coding type of the demodulation signal according to the characteristic of the SOF time sequence of the frame start part in the demodulation signal; and finally, decoding the demodulation signal output by the demodulation circuit determined according to the groove time sequence according to the decoding rule corresponding to the determined coding mode, thereby realizing the purpose of accurate decoding.
Fig. 15 is a schematic structural diagram of a decoding device of an electronic tag according to the present invention. The decoding device of the electronic tag provided in this embodiment includes:
a judging module 710, configured to determine a modulation type corresponding to the demodulation signal according to the first slot timing of the demodulation signal;
Determining a coding type corresponding to the demodulation signal according to the time sequence and the modulation type of the SOF in the demodulation signal;
the decoding module 720 is configured to decode the demodulated signal according to the modulation type and the corresponding coding type if the modulation type of the demodulated signal is unchanged in the process of decoding the SOF.
Optionally, the determining module 710 is specifically configured to:
the method further comprises the following steps before decoding the demodulation signal according to the modulation type and the corresponding coding type:
if the modulation type is the first modulation type, controlling a demodulation circuit corresponding to the second modulation type to be turned off;
and if the modulation type is the second modulation type, controlling the demodulation circuit corresponding to the first modulation type to be turned off.
Optionally, the determining module 710 is specifically configured to:
before determining the modulation type corresponding to the demodulation signal, the method further comprises the following steps:
if the demodulation signal is a demodulation signal of a first modulation type, performing first shaping processing on the demodulation signal to increase the widths of a groove start pulse signal and a groove end pulse signal of the demodulation signal;
and if the demodulation signal is the demodulation signal of the second modulation type, performing second shaping processing on the demodulation signal to acquire a groove ending pulse signal of the second modulation type.
Optionally, the determining module 710 is specifically configured to:
the modulation type of the SOF is a first modulation type, and the code type corresponding to the demodulation signal is determined according to the time sequence and the modulation type of the SOF of the frame start part in the demodulation signal, which comprises the following steps:
and if the groove ending pulse signal of the second modulation type is received in the SOF decoding process, the groove ending pulse signal is used as a starting signal of the SOF, and the coding type is determined according to the time sequence of the SOF.
Optionally, the determining module 710 is specifically configured to:
if the modulation type of the SOF is the second modulation type, the method further includes:
and if the groove start pulse signal or the groove end pulse signal of the demodulation signal of the first modulation type is received in the SOF decoding process, continuing to decode the SOF.
Optionally, the encoding module 720 is specifically configured to:
after receiving a complete data frame of a demodulation signal, if the modulation type of the demodulation signal is determined to be a first modulation type, keeping a demodulation circuit of a second modulation type off when the electronic tag is in a preset radio frequency field range;
after receiving the complete data frame of the demodulation signal, if the modulation type of the demodulation signal is determined to be the second modulation type, keeping the demodulation circuit of the first modulation type off when the electronic tag is in the preset radio frequency field range.
Optionally, the determining module 710 is specifically configured to:
in decoding the demodulation signal of the first modulation type, if another groove start pulse signal is received after the previous groove start pulse signal is received, the groove start pulse signal is taken as an invalid signal.
The judging module is used for executing the functions of the decoding type judging unit, the demodulation circuit switch control unit and the high fault tolerance decoding unit in fig. 11; the encoding module is used for executing the function of the output control unit.
The device of the embodiment of the present invention is configured to perform the method of any of the foregoing method embodiments, and its implementation principle and technical effects are similar, and are not described in detail herein.
Fig. 16 illustrates a physical structure diagram of an electronic device, as shown in fig. 16, which may include: processor 810, communication interface (Communications Interface) 820, memory 830, and communication bus 840, wherein processor 810, communication interface 820, memory 830 accomplish communication with each other through communication bus 840. The processor 810 may invoke logic instructions in the memory 830 to perform a method of decoding an electronic tag, the method comprising: determining a modulation type corresponding to the demodulation signal according to the first groove time sequence of the demodulation signal; determining a coding type corresponding to the demodulation signal according to the time sequence and the modulation type of the SOF in the demodulation signal; if the modulation type of the demodulation signal is unchanged in the process of decoding the SOF, decoding the demodulation signal according to the modulation type and the corresponding coding type.
Further, the logic instructions in memory 830 described above may be implemented in the form of software functional units and stored in a computer readable storage medium when sold or used as a stand alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform a method of decoding an electronic tag provided by the methods described above, the method comprising: determining a modulation type corresponding to the demodulation signal according to the first groove time sequence of the demodulation signal; determining a coding type corresponding to the demodulation signal according to the time sequence and the modulation type of the SOF in the demodulation signal; if the modulation type of the demodulation signal is unchanged in the process of decoding the SOF, decoding the demodulation signal according to the modulation type and the corresponding coding type.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the above-provided method of decoding an electronic tag, the method comprising: determining a modulation type corresponding to the demodulation signal according to the first groove time sequence of the demodulation signal; determining a coding type corresponding to the demodulation signal according to the time sequence and the modulation type of the SOF in the demodulation signal; if the modulation type of the demodulation signal is unchanged in the process of decoding the SOF, decoding the demodulation signal according to the modulation type and the corresponding coding type.
The apparatus embodiments described above are merely illustrative, wherein the small units described as separate components may or may not be physically separate, and the components shown as small units may or may not be physically small units, may be located in one place, or may be distributed over a plurality of network small units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.