CN111510151B - Decoding method and device for FM0 encoded data and reader-writer - Google Patents

Decoding method and device for FM0 encoded data and reader-writer Download PDF

Info

Publication number
CN111510151B
CN111510151B CN202010342447.2A CN202010342447A CN111510151B CN 111510151 B CN111510151 B CN 111510151B CN 202010342447 A CN202010342447 A CN 202010342447A CN 111510151 B CN111510151 B CN 111510151B
Authority
CN
China
Prior art keywords
data
waveform
determining
discrete
low levels
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
CN202010342447.2A
Other languages
Chinese (zh)
Other versions
CN111510151A (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.)
Jiangsu Huarui Technology Co ltd
Original Assignee
Jiangsu Huarui Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Huarui Technology Co ltd filed Critical Jiangsu Huarui Technology Co ltd
Priority to CN202010342447.2A priority Critical patent/CN111510151B/en
Publication of CN111510151A publication Critical patent/CN111510151A/en
Application granted granted Critical
Publication of CN111510151B publication Critical patent/CN111510151B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M5/00Conversion of the form of the representation of individual digits
    • H03M5/02Conversion to or from representation by pulses
    • H03M5/04Conversion to or from representation by pulses the pulses having two levels
    • H03M5/06Code representation, e.g. transition, for a given bit cell depending only on the information in that bit cell
    • H03M5/12Biphase level code, e.g. split phase code, Manchester code; Biphase space or mark code, e.g. double frequency code
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Digital Transmission Methods That Use Modulated Carrier Waves (AREA)

Abstract

The application discloses a decoding method, a decoding device and a reader-writer of FM0 encoded data, which are used for solving the technical problem that in the prior art, when FM0 encoded data are decoded, the waveform distortion of signals is large due to frequency deviation and clock jitter, so that decoding errors are easy to occur in decoding. The method comprises the following steps: acquiring first FM0 coding data, and determining the discrete waveform of the effective code of the first FM0 coding data according to the discrete waveform of the first FM0 coding data, wherein the number of level jump nodes of the first FM0 coding data is within a preset interval; dividing the discrete waveforms of the effective codes by level jump nodes according to the discrete waveforms of the effective codes to obtain a plurality of segments of the discrete waveforms of the effective codes, and determining the quantity of high and low levels in each segment; and determining the decoding data of the first FM0 coding data according to the number of high and low levels in each segment.

Description

Decoding method and device for FM0 encoded data and reader-writer
Technical Field
The present application relates to the field of wireless communications technologies, and in particular, to a method and an apparatus for decoding FM0 encoded data, and a reader-writer.
Background
With the development of wireless communication technology, electronic tags carrying important information are increasingly used, communication equipment can scan the electronic tags through a reader-writer to further acquire information in the electronic tags, and at present, after the reader-writer scans the electronic tags, FM0 codes are obtained, so that the reader-writer needs to decode the FM0 codes.
When decoding FM0 coded data, the preamble is detected first, in the whole information structure, the preamble does not accord with the FM0 coding principle, reading is not needed, the reader-writer generally determines the preamble of the FM0 coded data carried by the signal by judging whether the signal strength of the energy signal returned by the electronic tag is larger than a threshold value, but when the signal to noise ratio is smaller, the noise is easily mistaken as the preamble, so that a decoding process is started erroneously, a real effective code is missed, and the decoding success rate is reduced. After the decoding process is started, the rising edge of the FM0 encoded data can be used as a trigger, the time length between two adjacent rising edges is calculated, after the time length is obtained, decoding is carried out according to the time length and an FM0 decoding rule to obtain FM0 decoded data, or fixed point number segmentation can be carried out on the FM0 encoded data, the number of the segmentation points depends on the sampling frequency, for example, four times of the sampling frequency, the sampled data are segmented by taking four points as units, then each unit is decoded according to the FM0 decoding rule, but the signal waveform distortion is larger due to frequency offset and clock jitter, so that decoding errors are easy to occur when the FM0 encoded data are decoded.
Disclosure of Invention
The application provides a decoding method, a decoding device and a reader-writer of FM0 encoded data, which are used for solving the technical problem that decoding errors are easy to occur due to large signal waveform distortion caused by frequency deviation and clock jitter when the FM0 encoded data are decoded in the prior art.
In order to solve the above technical problems, an embodiment of the present application provides a method for decoding FM0 encoded data, which has the following technical scheme:
acquiring first FM0 coding data, and determining the discrete waveform of the effective code of the first FM0 coding data according to the discrete waveform of the first FM0 coding data, wherein the number of level jump nodes of the first FM0 coding data is within a preset interval;
dividing the discrete waveforms of the effective codes by level jump nodes according to the discrete waveforms of the effective codes to obtain a plurality of segments of the discrete waveforms of the effective codes, and determining the quantity of high and low levels in each segment;
and determining the decoding data of the first FM0 coding data according to the number of high and low levels in each segment.
In the embodiment of the application, the discrete waveform of the effective code of the first FM0 encoded data can be determined according to the obtained discrete waveform of the first FM0 encoded data, wherein the number of level jump nodes of the first FM0 encoded data is within a preset interval, then the discrete waveform of the effective code is separated by the level jump nodes according to the discrete waveform of the effective code to obtain a plurality of segments of the discrete waveform of the effective code, the number of high and low levels in each segment is determined, and then the decoding data of the first FM0 encoded data is determined according to the number of the high and low levels in each segment. Therefore, as long as the number of high and low levels in each segment is within the number of high levels or low levels in waveforms corresponding to different bits determined according to the sampling frequency and the frequency deviation range, decoding can be effectively performed, and the problems of large waveform distortion of signals and decoding errors caused by frequency deviation and clock jitter are avoided.
Optionally, acquiring the first FM0 encoded data includes:
monitoring Received Signal Strength Indication (RSSI), and if the RSSI is greater than or equal to a first preset threshold value, acquiring FM0 coded data;
judging whether the number of level jump nodes of the FM0 coded data is within a preset interval or not;
and if the FM0 coding data is within the preset interval, determining that the FM0 coding data is the first FM0 coding data.
In the embodiment of the application, the received signal strength indication RSSI can be monitored, if the RSSI is greater than or equal to the first preset threshold value, FM0 encoded data is obtained, then whether the number of level jump nodes of the FM0 encoded data is within a preset interval is judged, if the number of the level jump nodes of the FM0 encoded data is within the preset interval, the FM0 encoded data is determined to be first FM0 encoded data, so that whether the FM0 encoded data is abnormal can be determined in the first time, and if the RSSI is determined to be abnormal, the decoding of the FM0 encoded data is ended in the first time, and the decoding efficiency is improved.
Optionally, determining the discrete waveform of the effective code of the first FM0 encoded data according to the discrete waveform of the first FM0 encoded data includes:
comparing the discrete waveform of the first FM0 coded data with a preset waveform, and determining whether a waveform with similarity to the preset waveform being larger than a second preset threshold exists in the discrete waveform, wherein the preset waveform is a discrete waveform of a preamble of the first FM0 coded data determined according to sampling frequency, and the preamble contains coded data violating an FM0 coding rule;
if so, determining a discrete waveform of the effective code of the first FM0 coded data according to the length of the preset waveform.
In the embodiment of the application, the discrete waveform of the first FM0 encoded data can be compared with a preset waveform, and whether the waveform with the similarity larger than a second preset threshold value exists in the discrete waveform or not is determined, wherein the preset waveform is the discrete waveform of the preamble of the first FM0 encoded data determined according to the sampling frequency, the preamble contains encoded data violating the FM0 encoding rule, and if the discrete waveform exists, the discrete waveform of the effective code of the first FM0 encoded data is determined according to the length of the preset waveform. Therefore, the problems that when the signal strength of an energy signal returned by an electronic tag is judged to be greater than a threshold value or not and the preamble of FM0 coded data carried by the signal is determined, if the signal to noise ratio is smaller, noise is easily mistaken as the preamble, a decoding process is wrongly started, a real effective code is missed, and the decoding success rate is reduced are avoided.
Optionally, determining the decoded data of the first FM0 encoded data according to the number of high and low levels in each segment includes:
if the number of continuous high levels or low levels in any segment is within a first interval, determining that any segment represents a burr signal, and removing any segment, wherein the first interval is the number of the high levels or the low levels in a waveform corresponding to the burr signal determined according to the sampling frequency and the frequency offset range;
if the number of continuous high levels or low levels in any segment is in a second interval, determining that any segment represents the bit 1, wherein the second interval is the number of the high levels or the low levels in the waveform corresponding to the bit 1 determined according to the sampling frequency and the frequency offset range;
if the number of continuous high levels or low levels in the adjacent two segments is within a third interval, determining that the adjacent two segments represent the bit 0, wherein the third interval is the number of the high levels or the low levels in the waveform corresponding to the bit 0 determined according to the sampling frequency and the frequency offset range.
Optionally, the method further comprises:
if the number of bits in the decoded data is greater than a third preset threshold, exhausting all similar waveforms of discrete waveforms of the decoded data, and determining the decoded data corresponding to all the similar waveforms;
and carrying out Cyclic Redundancy Check (CRC) on the decoded data corresponding to all the similar waveforms, and redetermining the decoded data of the FMO encoded data.
In the embodiment of the application, when the number of bits in the decoded data is greater than a third preset threshold, all the similar waveforms of the discrete waveforms of the decoded data can be exhausted, the decoded data corresponding to all the similar waveforms is determined, cyclic Redundancy Check (CRC) is performed on the decoded data corresponding to all the similar waveforms, and the decoded data of the FMO coded data is determined again. When decoding is in error, the possible decoding data are reversely deduced and checked, so that the correct decoding data are reversely deduced with high probability, and the decoding success rate is effectively improved.
In a second aspect, there is provided a decoding apparatus for FM0 encoded data, comprising:
the first determining module is used for acquiring first FM0 coding data, and determining the discrete waveform of the effective code of the first FM0 coding data according to the discrete waveform of the first FM0 coding data, wherein the number of level jump nodes of the first FM0 coding data is within a preset interval;
the second determining module is used for separating the discrete waveforms of the effective codes by a level jump node according to the discrete waveforms of the effective codes to obtain a plurality of segments of the discrete waveforms of the effective codes, and determining the number of high and low levels in each segment;
and a third determining module, configured to determine decoding data of the first FM0 encoded data according to the number of high and low levels in each segment.
Optionally, the first determining module is specifically configured to:
monitoring Received Signal Strength Indication (RSSI), and if the RSSI is greater than or equal to a first preset threshold value, acquiring FM0 coded data;
judging whether the number of level jump nodes of the FM0 coded data is within a preset interval or not;
and if the FM0 coding data is within the preset interval, determining that the FM0 coding data is the first FM0 coding data.
Optionally, the first determining module is specifically configured to:
comparing the discrete waveform of the first FM0 coded data with a preset waveform, and determining whether a waveform with similarity to the preset waveform being larger than a second preset threshold exists in the discrete waveform, wherein the preset waveform is a discrete waveform of a preamble of the first FM0 coded data determined according to sampling frequency, and the preamble contains coded data violating an FM0 coding rule;
if so, determining a discrete waveform of the effective code of the first FM0 coded data according to the length of the preset waveform.
Optionally, the third determining module is specifically configured to:
if the number of continuous high levels or low levels in any segment is within a first interval, determining that any segment represents a burr signal, and removing any segment, wherein the first interval is the number of the high levels or the low levels in a waveform corresponding to the burr signal determined according to the sampling frequency and the frequency offset range;
if the number of continuous high levels or low levels in any segment is in a second interval, determining that any segment represents the bit 1, wherein the second interval is the number of the high levels or the low levels in the waveform corresponding to the bit 1 determined according to the sampling frequency and the frequency offset range;
if the number of continuous high levels or low levels in the adjacent two segments is within a third interval, determining that the adjacent two segments represent the bit 0, wherein the third interval is the number of the high levels or the low levels in the waveform corresponding to the bit 0 determined according to the sampling frequency and the frequency offset range.
Optionally, the apparatus further includes a fourth determining module configured to:
if the number of bits in the decoded data is greater than a third preset threshold, exhausting all similar waveforms of discrete waveforms of the decoded data, and determining the decoded data corresponding to all the similar waveforms; and carrying out Cyclic Redundancy Check (CRC) on the decoded data corresponding to all the similar waveforms, and redetermining the decoded data of the FMO encoded data.
In a third aspect, there is provided a reader/writer including:
a memory for storing program instructions;
and a processor for invoking program instructions stored in the memory and executing steps comprised in any one of the implementations of the first aspect in accordance with the obtained program instructions.
In a fourth aspect, there is provided a storage medium storing computer executable instructions for causing a computer to perform steps comprised in any one of the embodiments of the first aspect.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present application.
FIG. 1 is a schematic diagram of a reader-writer according to an embodiment of the present application;
FIG. 2-1 is a flow chart of a decoding method of FM0 encoded data according to an embodiment of the present application;
FIGS. 2-2 are schematic diagrams of different waveforms in an embodiment of the present application;
FIG. 3 is a schematic diagram of a decoding apparatus for FM0 encoded data according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a decoding system for FM0 encoded data according to an embodiment of the application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application. Embodiments of the application and features of the embodiments may be combined with one another arbitrarily without conflict. Also, although a logical order is depicted in the flowchart, in some cases the steps depicted or described may be performed in a different order than presented herein.
The terms first and second in the description and claims of the application and in the above-mentioned figures are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the term "include" and any variations thereof is intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
In the embodiment of the present application, the "at least one" may mean one or at least two, for example, one, two, three or more, which is not limited by the embodiment of the present application.
In addition, the term "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. The character "/" herein generally indicates that the associated object is an "or" relationship unless otherwise specified.
At present, when decoding FM0 encoded data, a preamble is detected first, in the whole information structure, the preamble does not conform to the encoding principle of FM0, reading is not needed, a reader-writer generally determines the preamble of the FM0 encoded data carried by an electronic tag by judging whether the signal strength of an energy signal returned by the electronic tag is larger than a threshold value, but when the signal to noise is smaller, noise is easily mistaken as the preamble, so that a decoding process is started erroneously, a real effective code is missed, and the decoding success rate is reduced. After the decoding process is started, the rising edge of the FM0 encoded data can be used as a trigger, the time length between two adjacent rising edges is calculated, after the time length is obtained, decoding is carried out according to the time length and an FM0 decoding rule to obtain FM0 decoded data, or fixed point number segmentation can be carried out on the FM0 encoded data, the number of the segmentation points depends on the sampling frequency, for example, four times of the sampling frequency, the sampled data are segmented by taking four points as units, then each unit is decoded according to the FM0 decoding rule, but the signal waveform distortion is larger due to frequency offset and clock jitter, so that decoding errors are easy to occur when the FM0 encoded data are decoded. Therefore, in the prior art, when decoding FM0 encoded data, signal waveform distortion is large due to frequency offset and clock jitter, so that decoding errors easily occur in decoding.
In view of this, an embodiment of the present application provides a decoding method for FM0 encoded data, where the method may determine, according to an obtained discrete waveform of first FM0 encoded data, a discrete waveform of an effective code of the first FM0 encoded data, where the number of level transition nodes of the first FM0 encoded data is within a preset interval, then separate, according to the discrete waveform of the effective code, the discrete waveform of the effective code by the level transition nodes, to obtain segments of the discrete waveform of the plurality of effective codes, determine the number of high and low levels in each segment, and determine, according to the number of high and low levels in each segment, decoded data of the first FM0 encoded data. Therefore, as long as the number of high and low levels in each segment is within the number of high levels or low levels in waveforms corresponding to different bits determined according to the sampling frequency and the frequency deviation range, decoding can be effectively performed, and the problems of large waveform distortion of signals and decoding errors caused by frequency deviation and clock jitter are avoided.
In order to better understand the technical solutions, the following detailed description of the technical solutions of the present application is made through the accompanying drawings and the specific embodiments, and it should be understood that the specific features of the embodiments and the embodiments of the present application are detailed descriptions of the technical solutions of the present application, and not limiting the technical solutions of the present application, and the embodiments and the technical features of the embodiments of the present application may be combined with each other without conflict.
Fig. 1 is a schematic diagram of a reader/writer to which the method according to the embodiment of the present application is applicable, and of course, the method according to the embodiment of the present application may be applied to a plurality of reader/writers, and it should be understood that the reader/writer shown in fig. 1 is a simple description of a reader/writer to which the method according to the embodiment of the present application is applicable, and is not limited to a reader/writer to which the method according to the embodiment of the present application is applicable.
The reader/writer shown in fig. 1 includes a memory 101, a processor 102, and a bus interface 103. The memory 101 and the processor 102 are connected through a bus interface 103. The memory 101 is used to store program instructions. The processor 102 is configured to call the program instructions stored in the memory 101 and execute all steps included in the decoding method of the FM0 encoded data according to the obtained program instructions.
Referring to fig. 2-1, an embodiment of the present application provides a method for decoding FM0 encoded data, which may be performed by the reader/writer shown in fig. 1. The specific flow of the method is described below.
Step 201: and acquiring first FM0 encoded data, and determining the discrete waveform of the effective code of the first FM0 encoded data according to the discrete waveform of the first FM0 encoded data, wherein the number of level jump nodes of the first FM0 encoded data is within a preset interval.
In the embodiment of the application, the reader-writer scans the electronic tag to further acquire the energy signal carrying the FM0 coded data, which is marked on the electronic tag by the radio frequency identification (RadioFrequency Identification, RFID) antenna, wherein the energy signal returned by the electronic tag is concentrated in one frequency band, and the frequency band is subdivided into different channels, when the electronic tag returns the energy signal on the different channels, the energy signal received by the reader-writer has different powers, whether the energy signal is effective or not can be determined according to the power of the energy signal, and if so, the FM0 coded data carried by the energy signal is acquired. Specifically, the power of an energy Signal received by a reader-writer, namely, a received Signal strength indicator (received Signal StrengthIndication, RSSI), is monitored, whether the RSSI is larger than a first preset threshold value is judged, if the RSSI is larger than or equal to the first preset threshold value, high-speed digital sampling is carried out on the energy Signal to obtain original coding information, then digital filtering is carried out on the original coding information, and high-frequency signals in the original coding information are filtered, namely, noise signals in the original coding information are effectively removed, so that FM0 coding data carried by the energy Signal are obtained.
After the FM0 encoded data carried by the energy signal is obtained, each frame of energy signal returned by the electronic tag only carries 16 bits of FM0 encoded data, and the jump times of bit 1 and bit 0 in a bit window are respectively 1 and 2, so that the number of level jump nodes of the FM0 encoded data carried by each frame of energy signal is 16-32, whether the number of the level jump nodes of the FM0 encoded data is within a preset interval or not is required to be judged, namely whether the number of the level jump nodes of the FM0 encoded data is within 16-32 is judged, if the number of the level jump nodes of the FM0 encoded data is within the preset interval, the FM0 encoded data is determined to be first FM0 encoded data, and the first FM0 encoded data can be decoded to obtain decoded data; if the FM0 encoded data is not within the preset interval, determining that the FM0 encoded data is abnormal, and decoding the FM0 encoded data is not needed.
After determining that the FM0 encoded data is the first FM0 encoded data, a discrete waveform of a valid code of the first FM0 encoded data may be determined from the discrete waveform of the first FM0 encoded data. Specifically, the discrete waveform of the first FM0 encoded data is compared with a preset waveform, whether the waveform with the similarity larger than a second preset threshold value exists in the discrete waveform or not is determined, wherein the preset waveform is the discrete waveform of the preamble of the first FM0 encoded data determined according to the sampling frequency, the preamble contains encoded data violating the FM0 encoding rule, if so, the discrete waveform of the effective code of the first FM0 encoded data is determined according to the length of the preset waveform, so that the problem that if the signal strength of an energy signal returned by an electronic tag is larger than a threshold value, the preamble of the FM0 encoded data carried by the signal is determined, and when the signal-to-noise ratio is smaller, noise is easily mistaken for the preamble, so that a decoding process is wrongly started, the effective code is truly missed, and the decoding success rate is reduced can be avoided.
Step 202: and separating the discrete waveforms of the effective codes by using level jump nodes according to the discrete waveforms of the effective codes to obtain a plurality of segments of the discrete waveforms of the effective codes, and determining the number of high and low levels in each segment.
In the embodiment of the application, after determining the discrete waveform of the effective code of the first FM0 coded data, the discrete waveform of the effective code is separated by a level jump node according to the discrete waveform of the effective code, so as to obtain a plurality of segments of the discrete waveform of the effective code, and the number of high and low levels in each segment is determined. For ease of understanding, the following description is given by way of example:
for example, if the sampling frequency is 8 times that of sampling, under ideal conditions, no level jump exists in the bit window where bit 1 exists, a group of 8 continuous high levels or low levels will be acquired. In the bit window where bit 0 is located, there is one level jump, and 2 groups of continuous 4 high levels or low levels are collected.
Step 203: and determining the decoding data of the first FM0 coding data according to the number of high and low levels in each segment.
In the embodiment of the application, after the number of high and low levels in each segment is determined, the decoding data of the first FM0 encoded data is determined according to the number of high and low levels in each segment, specifically, if the number of continuous high levels or low levels in any segment is within a first interval, determining that any segment represents a burr signal, and removing any segment, wherein the first interval is the number of high levels or low levels in a waveform corresponding to the burr signal determined according to the sampling frequency and the frequency offset range; if the number of continuous high levels or low levels in any segment is in a second interval, determining that any segment represents the bit 1, wherein the second interval is the number of the high levels or the low levels in the waveform corresponding to the bit 1 determined according to the sampling frequency and the frequency offset range; if the number of continuous high levels or low levels in two adjacent segments is within a third interval, determining that the two adjacent segments represent the bit 0, wherein the third interval is the number of the high levels or the low levels in the waveform corresponding to the bit 0 determined according to the sampling frequency and the frequency offset range; if the number of continuous high levels or low levels in any segment is larger than a preset threshold, determining that the first FM0 encoded data is in error, and ending the decoding, wherein the preset threshold is the maximum value of the second interval.
For ease of understanding, the following description is given by way of example:
for example, if the sampling frequency is 8 times that of the sampling, the frequency offset range is 12.5%, under ideal conditions, the number of high levels or low levels in the waveform corresponding to the glitch signal may be determined to be 1-3, i.e., the first interval is 1-3, the number of high levels or low levels in the waveform corresponding to bit 1 is 8-10, i.e., the second interval is 8-10, the number of high levels or low levels in the waveform corresponding to bit 0 is 4-6, i.e., the third interval is 4-6, and the preset threshold is the maximum value 10 of the second interval. Determining decoding data of the first FM0 encoded data according to the number of high and low levels in each segment, determining a first interval, a second interval and a third interval and a preset threshold value, and determining that the first segment represents bit 1 if the number of continuous high levels or low levels in the first segment is in the second interval; if the number of the continuous high levels or low levels in the second segment and the third segment is in the third interval, determining that the first segment represents bit 0, and if the number of the continuous high levels or low levels in the fourth segment is larger than a preset threshold, determining that the FM0 encoded data is in error, and ending the decoding.
After determining the decoded data of the first FM0 encoded data, since each frame of energy signal returned by the electronic tag only carries 16 bits of FM0 encoded data, it is necessary to determine whether the number of bits in the decoded data is greater than a third preset threshold, that is, 16, if the number of bits in the decoded data is greater than the third preset threshold, exhausting all similar waveforms of discrete waveforms of the decoded data, determining decoded data corresponding to all similar waveforms, performing cyclic redundancy check CRC on the decoded data corresponding to all similar waveforms, and redetermining the decoded data of the FMO encoded data.
For ease of understanding, the following description is given by way of example:
for example, as shown in fig. 2-2, when decoding FMO encoded data in engineering practice, it is found that, due to interference such as frequency offset, waveform I of the following figure is easy to grasp, the decoded data corresponding to waveform I is 1011, the number of bits in the decoded data is 4, and in the sampling window of this width, the number of bits in the decoded data should be 3, so that further processing is required for the decoding result, that is, by back-pushing the actual waveform, in the sampling window of this width, the decoding result may be generated by distortion of waveform II or III, so that the correct decoding result may be one of 011 or 101, and then by performing CRC operation check on the possible 2 results, for example, checking according to CCITT-CRC5 or CCITT-CRC16, if the check passes, it indicates that the decoding is successful, otherwise, it indicates that the decoding is wrong.
Based on the same inventive concept, the embodiment of the application provides a decoding device of FM0 encoded data, which can realize the functions corresponding to the decoding method of FM0 encoded data. The decoding device of the FM0 encoded data can be a hardware structure, a software module or a hardware structure plus a software module. The decoding device of the FM0 encoded data can be realized by a chip system, and the chip system can be formed by a chip or can comprise a chip and other discrete devices. Referring to fig. 3, the decoding device for FM0 encoded data includes a first determining module 301, a second determining module 302, and a third determining module 303, wherein:
a first determining module 301, configured to obtain first FM0 encoded data, determine, according to a discrete waveform of the first FM0 encoded data, a discrete waveform of an effective code of the first FM0 encoded data, where the number of level transition nodes of the first FM0 encoded data is within a preset interval;
a second determining module 302, configured to separate the discrete waveforms of the effective codes with level hopping nodes according to the discrete waveforms of the effective codes, obtain segments of the discrete waveforms of the plurality of effective codes, and determine the number of high and low levels in each segment;
a third determining module 303, configured to determine the decoded data of the first FM0 encoded data according to the number of high and low levels in each segment.
Optionally, the first determining module 301 is specifically configured to:
monitoring Received Signal Strength Indication (RSSI), and if the RSSI is greater than or equal to a first preset threshold value, acquiring FM0 coded data;
judging whether the number of level jump nodes of the FM0 coded data is within a preset interval or not;
and if the FM0 coding data is within the preset interval, determining that the FM0 coding data is the first FM0 coding data.
Optionally, the first determining module 301 is specifically configured to:
comparing the discrete waveform of the first FM0 coded data with a preset waveform, and determining whether a waveform with similarity to the preset waveform being larger than a second preset threshold exists in the discrete waveform, wherein the preset waveform is a discrete waveform of a preamble of the first FM0 coded data determined according to sampling frequency, and the preamble contains coded data violating an FM0 coding rule;
if so, determining a discrete waveform of the effective code of the first FM0 coded data according to the length of the preset waveform.
Optionally, the third determining module 303 is specifically configured to:
if the number of continuous high levels or low levels in any segment is within a first interval, determining that any segment represents a burr signal, and removing any segment, wherein the first interval is the number of the high levels or the low levels in a waveform corresponding to the burr signal determined according to the sampling frequency and the frequency offset range;
if the number of continuous high levels or low levels in any segment is in a second interval, determining that any segment represents the bit 1, wherein the second interval is the number of the high levels or the low levels in the waveform corresponding to the bit 1 determined according to the sampling frequency and the frequency offset range;
if the number of continuous high levels or low levels in the adjacent two segments is within a third interval, determining that the adjacent two segments represent the bit 0, wherein the third interval is the number of the high levels or the low levels in the waveform corresponding to the bit 0 determined according to the sampling frequency and the frequency offset range.
Optionally, the apparatus further includes a fourth determining module configured to:
if the number of bits in the decoded data is greater than a third preset threshold, exhausting all similar waveforms of discrete waveforms of the decoded data, and determining the decoded data corresponding to all the similar waveforms; and carrying out Cyclic Redundancy Check (CRC) on the decoded data corresponding to all the similar waveforms, and redetermining the decoded data of the FMO encoded data.
Based on the same inventive concept, an embodiment of the present application provides a decoding system of FM0 encoded data, please refer to fig. 4, wherein the decoding system of FM0 encoded data includes at least one processor 402 and a memory 401 connected with the at least one processor, the embodiment of the present application is not limited to a specific connection medium between the processor 402 and the memory 401, fig. 4 is an example in which the processor 402 and the memory 401 are connected through a bus 400, the bus 400 is shown in fig. 4 by a bold line, and the connection manner between other components is only illustrative, but not limited thereto. The bus 400 may be divided into an address bus, a data bus, a control bus, etc., and is represented by only one thick line in fig. 4 for ease of illustration, but does not represent only one bus or one type of bus.
In the embodiment of the present application, the memory 401 stores instructions executable by the at least one processor 402, and the at least one processor 402 may perform the steps included in the foregoing method for decoding FM0 encoded data by calling the instructions stored in the memory 401.
The processor 402 is a control center of the FM0 encoded data decoding system, and may connect various parts of the entire FM0 encoded data decoding system using various interfaces and lines, and implement various functions of the FM0 encoded data decoding system by executing instructions stored in the memory 401. Alternatively, the processor 402 may include one or more processing units, and the processor 402 may integrate an application processor that primarily processes operating systems, user interfaces, application programs, and the like, with a modem processor that primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 402. In some embodiments, processor 402 and memory 401 may be implemented on the same chip, and in some embodiments they may be implemented separately on separate chips.
The memory 401, which is a type of nonvolatile computer-readable storage medium, may be used to store nonvolatile software programs, nonvolatile computer-executable programs, and modules. The Memory 401 may include at least one type of storage medium, and may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic Memory, magnetic disk, optical disk, and the like. Memory 401 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory 401 in embodiments of the present application may also be circuitry or any other device capable of implementing a memory function for storing program instructions and/or data.
The processor 402 may be a general purpose processor such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, and may implement or perform the methods, steps and logic blocks disclosed in embodiments of the application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the decoding method for FM0 encoded data disclosed in connection with the embodiments of the present application may be directly embodied as being performed by a hardware processor, or may be performed by a combination of hardware and software modules in the processor.
By programming the processor 402, the code corresponding to the decoding method of FM0 encoded data described in the foregoing embodiment may be cured into the chip, so that the chip can execute the steps of the foregoing decoding method of FM0 encoded data during operation, and how to program the processor 402 is a technology known to those skilled in the art will not be repeated herein.
Based on the same inventive concept, embodiments of the present application also provide a storage medium storing computer instructions that, when run on a computer, cause the computer to perform the steps of the method for decoding FM0 encoded data as described above.
In some possible embodiments, aspects of the method for decoding FM0 encoded data provided by the present application may also be implemented in the form of a program product comprising program code for causing a decoding system of FM0 encoded data to perform the steps of the method for decoding FM0 encoded data according to the various exemplary embodiments of the present application as described herein above when the program product is run on the decoding system of FM0 encoded data.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (8)

1. A method of decoding FM0 encoded data, comprising:
acquiring first FM0 coding data, and determining the discrete waveform of the effective code of the first FM0 coding data according to the discrete waveform of the first FM0 coding data, wherein the number of level jump nodes of the first FM0 coding data is within a preset interval;
dividing the discrete waveforms of the effective codes by level jump nodes according to the discrete waveforms of the effective codes to obtain a plurality of segments of the discrete waveforms of the effective codes, and determining the quantity of high and low levels in each segment;
determining decoding data of the first FM0 encoding data according to the number of high and low levels in each segment;
if the number of bits in the decoded data is greater than a third preset threshold, exhausting all similar waveforms of discrete waveforms of the decoded data, and determining the decoded data corresponding to all the similar waveforms;
and carrying out Cyclic Redundancy Check (CRC) on the decoded data corresponding to all the similar waveforms, and redetermining the decoded data of the FM0 encoded data.
2. The method of claim 1, wherein obtaining first FM0 encoded data comprises:
monitoring Received Signal Strength Indication (RSSI), and if the RSSI is greater than or equal to a first preset threshold value, acquiring FM0 coded data;
judging whether the number of level jump nodes of the FM0 coded data is within a preset interval or not;
and if the FM0 coding data is within the preset interval, determining that the FM0 coding data is the first FM0 coding data.
3. The method of claim 1 or 2, wherein determining the discrete waveform of the effective code of the first FM0 encoded data from the discrete waveform of the first FM0 encoded data comprises:
comparing the discrete waveform of the first FM0 coded data with a preset waveform, and determining whether a waveform with similarity to the preset waveform being larger than a second preset threshold exists in the discrete waveform, wherein the preset waveform is a discrete waveform of a preamble of the first FM0 coded data determined according to sampling frequency, and the preamble contains coded data violating an FM0 coding rule;
if so, determining a discrete waveform of the effective code of the first FM0 coded data according to the length of the preset waveform.
4. The method of claim 1, wherein determining the decoded data of the first FM0 encoded data based on the number of high and low levels within each segment comprises:
if the number of continuous high levels or low levels in any segment is within a first interval, determining that any segment represents a burr signal, and removing any segment, wherein the first interval is the number of the high levels or the low levels in a waveform corresponding to the burr signal determined according to the sampling frequency and the frequency offset range;
if the number of continuous high levels or low levels in any segment is in a second interval, determining that any segment represents the bit 1, wherein the second interval is the number of the high levels or the low levels in the waveform corresponding to the bit 1 determined according to the sampling frequency and the frequency offset range;
if the number of continuous high levels or low levels in the adjacent two segments is within a third interval, determining that the adjacent two segments represent the bit 0, wherein the third interval is the number of the high levels or the low levels in the waveform corresponding to the bit 0 determined according to the sampling frequency and the frequency offset range.
5. An FM0 encoded data decoding apparatus, comprising:
the first determining module is used for acquiring first FM0 coding data, and determining the discrete waveform of the effective code of the first FM0 coding data according to the discrete waveform of the first FM0 coding data, wherein the number of level jump nodes of the first FM0 coding data is within a preset interval;
the second determining module is used for separating the discrete waveforms of the effective codes by a level jump node according to the discrete waveforms of the effective codes to obtain a plurality of segments of the discrete waveforms of the effective codes, and determining the number of high and low levels in each segment;
a third determining module, configured to determine decoding data of the first FM0 encoded data according to the number of high and low levels in each segment;
a fourth determining module, configured to, if the number of bits in the decoded data is greater than a third preset threshold, exhaust all similar waveforms of discrete waveforms of the decoded data, and determine decoded data corresponding to all similar waveforms; and carrying out Cyclic Redundancy Check (CRC) on the decoded data corresponding to all the similar waveforms, and redetermining the decoded data of the FM0 encoded data.
6. The apparatus of claim 5, wherein the third determination module is specifically configured to:
if the number of continuous high levels or low levels in any segment is within a first interval, determining that any segment represents a burr signal, and removing any segment, wherein the first interval is the number of the high levels or the low levels in a waveform corresponding to the burr signal determined according to the sampling frequency and the frequency offset range;
if the number of continuous high levels or low levels in any segment is in a second interval, determining that any segment represents the bit 1, wherein the second interval is the number of the high levels or the low levels in the waveform corresponding to the bit 1 determined according to the sampling frequency and the frequency offset range;
if the number of continuous high levels or low levels in the adjacent two segments is within a third interval, determining that the adjacent two segments represent the bit 0, wherein the third interval is the number of the high levels or the low levels in the waveform corresponding to the bit 0 determined according to the sampling frequency and the frequency offset range.
7. A reader/writer, characterized by comprising:
a memory for storing program instructions;
a processor for invoking program instructions stored in said memory and for performing the steps comprised in the method according to any of claims 1-4 in accordance with the obtained program instructions.
8. A storage medium storing computer-executable instructions for causing a computer to perform the steps comprised by the method of any one of claims 1-4.
CN202010342447.2A 2020-04-27 2020-04-27 Decoding method and device for FM0 encoded data and reader-writer Active CN111510151B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010342447.2A CN111510151B (en) 2020-04-27 2020-04-27 Decoding method and device for FM0 encoded data and reader-writer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010342447.2A CN111510151B (en) 2020-04-27 2020-04-27 Decoding method and device for FM0 encoded data and reader-writer

Publications (2)

Publication Number Publication Date
CN111510151A CN111510151A (en) 2020-08-07
CN111510151B true CN111510151B (en) 2023-08-18

Family

ID=71871388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010342447.2A Active CN111510151B (en) 2020-04-27 2020-04-27 Decoding method and device for FM0 encoded data and reader-writer

Country Status (1)

Country Link
CN (1) CN111510151B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102522997A (en) * 2011-12-08 2012-06-27 北京握奇数据系统有限公司 Method and device for decoding FM0 coded data
CN103258228A (en) * 2013-04-27 2013-08-21 无锡昶达信息技术有限公司 Ultrahigh frequency RFID reader, base band system on chip (SOC) and port control method
CN107959549A (en) * 2017-11-15 2018-04-24 浙江大华技术股份有限公司 A kind of label signal coding/decoding method, label decoding apparatus and label reader
CN109818713A (en) * 2019-01-24 2019-05-28 浙江大华技术股份有限公司 Miller code coding/decoding method, device and the equipment and storage medium of subcarrier modulation
CN110138501A (en) * 2018-02-08 2019-08-16 北京万集科技股份有限公司 A kind of coding/decoding method and device of FM0 coding

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102522997A (en) * 2011-12-08 2012-06-27 北京握奇数据系统有限公司 Method and device for decoding FM0 coded data
CN103258228A (en) * 2013-04-27 2013-08-21 无锡昶达信息技术有限公司 Ultrahigh frequency RFID reader, base band system on chip (SOC) and port control method
CN107959549A (en) * 2017-11-15 2018-04-24 浙江大华技术股份有限公司 A kind of label signal coding/decoding method, label decoding apparatus and label reader
CN110138501A (en) * 2018-02-08 2019-08-16 北京万集科技股份有限公司 A kind of coding/decoding method and device of FM0 coding
CN109818713A (en) * 2019-01-24 2019-05-28 浙江大华技术股份有限公司 Miller code coding/decoding method, device and the equipment and storage medium of subcarrier modulation

Also Published As

Publication number Publication date
CN111510151A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
Choi et al. Query tree-based reservation for efficient RFID tag anti-collision
US7978051B2 (en) RFID interrogator device
CN101441724B (en) IC card, information processing device, communication type identification device and method, and computer program product
CN107959549B (en) Label signal decoding method, label decoding device and label reader
CN108964868B (en) FPGA-based ultrahigh frequency RFID reader-writer Miller subcarrier decoding method
US7349467B2 (en) Data demodulation apparatus and method
CN109818713B (en) Subcarrier modulated Miller code decoding method, apparatus and device and storage medium
CN111510151B (en) Decoding method and device for FM0 encoded data and reader-writer
CN112395895A (en) Magnetic stripe software decoding method and device and computer readable storage medium
CN109922017B (en) Decoding method and device for FM0 coded data and reader-writer
CN110138501B (en) Decoding method and device for FM0 codes
US8120466B2 (en) Decoding scheme for RFID reader
CN103178933A (en) Subcarrier modulation miller code decoding device and method
US7903004B2 (en) Decoding apparatus and method
CN105718830A (en) Decoder and decoding method for UHF RFID reader-writer
CN112491763B (en) Decoding method and device for Manchester encoding
KR101237974B1 (en) RFID tag, RFID reader, and RFID system therewith
CN109412757B (en) Modified Miller self-adaptive decoding method and device
CN110598498B (en) Method for improving signal identification capability of non-contact card reader
CN115277352B (en) Network element instruction error correction method and device, electronic equipment and computer storage medium
CN116822560B (en) Multi-electronic-tag interaction method, reader and system based on software radio
CN211015523U (en) Ultrahigh frequency tag decoding device supporting error correction
Li et al. FM0 decode for collided RFID tag signals with frequency drift
CN104639483A (en) Digital correlation demodulation circuit based on 14443-BPSK (binary phase shift keying) subcarriers
KR101187910B1 (en) RFID reader and method for controlling thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 214100 999-8-c2-501, gaolang East Road, Wuxi City, Jiangsu Province

Applicant after: Jiangsu Huarui Technology Co.,Ltd.

Address before: 214100 999-8-c2-501, gaolang East Road, Wuxi City, Jiangsu Province

Applicant before: Wuxi Dahua Rui Frequency Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant