CN113657131B - Label checking method of UHF handheld terminal and UHF handheld terminal - Google Patents

Label checking method of UHF handheld terminal and UHF handheld terminal Download PDF

Info

Publication number
CN113657131B
CN113657131B CN202111222852.1A CN202111222852A CN113657131B CN 113657131 B CN113657131 B CN 113657131B CN 202111222852 A CN202111222852 A CN 202111222852A CN 113657131 B CN113657131 B CN 113657131B
Authority
CN
China
Prior art keywords
data
tag
code
label
crc
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
CN202111222852.1A
Other languages
Chinese (zh)
Other versions
CN113657131A (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.)
Shenzhen Chengcheng Information Co ltd
Original Assignee
Chainway Information 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 Chainway Information Technology Co ltd filed Critical Chainway Information Technology Co ltd
Priority to CN202111222852.1A priority Critical patent/CN113657131B/en
Publication of CN113657131A publication Critical patent/CN113657131A/en
Application granted granted Critical
Publication of CN113657131B publication Critical patent/CN113657131B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10009Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves
    • G06K7/10297Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves arrangements for handling protocols designed for non-contact record carriers such as RFIDs NFCs, e.g. ISO/IEC 14443 and 18092
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/067Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components
    • G06K19/07Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips
    • G06K19/077Constructional details, e.g. mounting of circuits in the carrier
    • G06K19/07749Constructional details, e.g. mounting of circuits in the carrier the record carrier being capable of non-contact communication, e.g. constructional details of the antenna of a non-contact smart card

Abstract

The application discloses a label checking method of a UHF handheld terminal and the UHF handheld terminal. The method comprises the following steps: reading Electronic Product Code (EPC) area data of the tag, wherein the EPC area data comprises a Cyclic Redundancy Check (CRC) code of the tag, a Protocol Control (PC) code of the tag and an EPC of the tag; comparing the CRC code of the label with a target CRC code in a preset label data table, wherein the target CRC code corresponds to a target PC code and a target EPC in the label data table, and the target CRC code is one CRC code in the label data table; if the CRC code of the label is determined not to exist in the label data table, determining that the label is an illegal label; and if the CRC code of the label is determined to be the same as the target CRC code, but the PC code of the label is different from the target PC code, and/or the EPC of the label is different from the target EPC, determining that the label is an illegal label. Therefore, the illegal label read in series can be screened out, so that the counting efficiency can be improved, and the counting accuracy can be improved.

Description

Label checking method of UHF handheld terminal and UHF handheld terminal
Technical Field
The application relates to the technical field of radio frequency identification, in particular to a tag checking method of an Ultra High Frequency (UHF) handheld terminal and the UHF handheld terminal.
Background
Radio Frequency Identification (RFID) is an automatic Identification technology and is a key technology for constructing the internet of things. The RFID system mainly comprises a reader-writer and a transponder. The transponder mainly includes an antenna, a coupling element and a chip, and generally, tags each having a unique Electronic Product Code (EPC) are used as the transponder, and are attached to an object to identify a target object. The reader-writer, or reader, mainly consists of an antenna, a coupling element and a chip, is a device for reading and/or writing label information, and can be designed as a mobile handheld device or a fixed device.
The application of RFID technology in various fields, especially in the fields of logistics, retail, clothing, etc., is becoming more and more widespread, but at the same time the demand is becoming higher, especially for RFID on handheld devices, which requires a read-miss-free, continuous, efficient inventory of an indefinite number of tags, such as single tags, a small number of tags, or multiple tags, or even a large number of tags.
UHF technology has a long reading distance and supports multi-tag inventory, so that UHF is widely used in various fields, especially warehouse inventory, store inventory, and inventory confirmation for goods delivery quantity. Can improve the efficiency of checking, can also save the cost of labor simultaneously. However, UHF technology has a long reading distance and can support multi-tag inventory, and these drawbacks also cause other problems in practical use. When a large number of tags are checked, the situation that other tags are read in series is easy to occur. For example, in some store or warehouse application scenarios, there is a possibility that tags of other stores or other warehouses may be read in series, which may cause some illegal tags to be checked in the checking process, so that tags not belonging to the store or the warehouse are checked in by mistake. Therefore, how to distinguish the illegal tag read by the string from the legal tag is a problem to be solved urgently.
Disclosure of Invention
The embodiment of the application provides a label checking method of a UHF handheld terminal and the UHF handheld terminal, and aims to distinguish an illegal label read in series from a legal label.
In view of this, a first aspect of the present application provides a method for checking a tag of a UHF handheld terminal, where the method includes: reading Electronic Product Code (EPC) area data of a tag, wherein the EPC area data includes a Cyclic Redundancy Check (CRC) code of the tag, and a Protocol Control (PC) code with the tag, and the EPC of the tag; comparing the CRC code of the tag with a target CRC code in a preset tag data table, wherein the target CRC code corresponds to a target PC code and a target EPC in the tag data table, and the target CRC code is one CRC code in the tag data table; if the CRC code of the label is not determined to exist in the label data table, determining that the label is an illegal label; and if the CRC code of the label is determined to be the same as the target CRC code, but the PC code of the label is different from the target PC code, and/or the EPC of the label is different from the target EPC, determining that the label is an illegal label.
The label data table prestores the corresponding relation among the target CRC code, the target PC code and the target EPC, and the label data table is pre-recorded before the label is checked. In the tag inventory process, the CRC codes of different tags may be the same, and if the tag is determined to be a legitimate tag only by determining that the CRC code of the tag is the same as the CRC code present in the tag data table in the tag inventory process, the tag may not be accurate. If the PC code of the tag is directly compared with the PC code in the tag data table in the tag checking process, and/or the EPC of the tag is compared with the EPC in the tag data table. Although this is accurate, the amount of data to be compared is large, the time required is long, and the number of calculation resources is large. When the CRC code of the label is determined not to exist in the label data table, the label can be directly determined to be an illegal label, so that the time can be saved, and the calculation amount can be reduced. Meanwhile, when the CRC code of the label is determined to be the same as the target CRC code in the label data table, the PC code and the EPC of the label are compared with the PC code and the EPC in the label data table, so that most of data with different CRC codes in the label data table can be filtered, and the calculation amount can be greatly reduced. When the CRC code of the label is the same as the target CRC code, but the PC code of the label is not the same as the target PC code, and/or the EPC of the label is not the same as the target EPC, the label can also be determined to be an illegal label, so that the illegal label read in series can be distinguished from a legal label by the method. The illegal tag which is screened out and read in series can be selected, so that the checking efficiency can be improved, and the checking accuracy can be improved.
Optionally, with reference to the first aspect, in a possible implementation manner, the tag data table includes a CRC code, and a correspondence between a PC code and an EPC, where the CRC code is calculated according to the PC code and the EPC, and data in the tag data table are arranged in order from small to large according to a value of the CRC code. It should be noted that the tag data table is created when the tag is put in storage. And when the label is put in a warehouse, the label data table is established so as to be convenient for judging whether the checked label is a legal label or an illegal label according to the label data table in the subsequent checking process. Since the CRC code is calculated from the PC code and the EPC, when the CRC code of the tag does not exist in the tag data table, the PC code and the EPC of the tag may not be identical to the PC code and the EPC of any piece of data in the tag data table, respectively. Therefore, if the CRC code of the tag is determined to be the same as the target CRC code, but the PC code of the tag is not the same as the target PC code, and/or the EPC of the tag is not the same as the target EPC, the tag can be determined to be an illegal tag.
Optionally, with reference to the first aspect, in a possible implementation manner, the determining that the CRC code of the tag does not exist in the tag data table includes: and if the value of the CRC code of the label is determined to be smaller than the value of the smallest CRC code in the label data table, or the value of the CRC code of the label is determined to be larger than the value of the largest CRC code in the label data table, determining that the CRC code of the label does not exist in the label data table. Therefore, whether the label exists in the label data table can be determined only by comparing the value of the CRC code of the label with the smallest CRC code in the label data table and the largest label data table in the label data table, so that the comparison efficiency and the inventory efficiency can be improved. Further, since the data in the tag data table are arranged in the order of the CRC codes from small to large, the smallest CRC code in the tag data table is the CRC code in the first data in the tag data table, and the largest CRC code in the tag data table is the CRC code in the last data in the tag data table. Thus, the CRC code of the tag is compared with the CRC code of the first piece of data and the CRC code of the last piece of data in the tag data table to determine whether the tag is present in the tag data. Therefore, the contrast efficiency can be obviously improved, and the inventory efficiency is improved.
Optionally, with reference to the first aspect, in a possible implementation manner, the method further includes: determining whether there is matching data in the tag data table; if the matching data exists in the tag data table, determining that the tag is a legal tag, wherein the CRC code contained in the matching data is the same as the CRC code of the tag, the PC code contained in the matching data is the same as the PC code of the tag, and the EPC contained in the matching data is the same as the EPC contained in the matching data. When it is determined that there is matching data in the tag data table, it can be determined that the tag is a legitimate tag.
Optionally, with reference to the first aspect, in a possible implementation manner, the determining that matching data exists in the tag data table includes: if the CRC code contained in the A-th data in the tag data table is determined to be the same as the CRC code of the tag, comparing the PC code contained in the A-th data with the PC code of the tag, and comparing the EPC contained in the A-th data with the EPC of the tag; and when the PC code contained in the A-th data is the same as the PC code of the tag and the EPC contained in the A-th data is the same as the EPC of the tag, determining that the A-th data is the matching data, wherein A is a positive integer. If the PC code and the EPC code of the tag are directly compared with the PC code and the EPC code in the tag data table, respectively, the workload is huge. Firstly, comparing the CRC code of the label with the CRC code in the label data table, if the CRC code of the label is the same as the CRC code in the label data table, only the label can be indicated to be a legal label. The label can be determined to be a legal label only if the CRC code, the PC code and the EPC of the label are the same, so that the accuracy of determining the label to be a legal label can be improved.
Optionally, with reference to the first aspect, in a possible implementation manner, the method further includes: when it is determined that the PC code included in the a-th data is not the same as the PC code of the tag and/or the EPC included in the a-th data is not the same as the EPC of the tag, traversing data whose CRC code included in the tag data table is the same as the CRC code of the tag, and determining that a piece of data whose CRC code, PC code, and EPC are respectively the same as the CRC code of the tag, the PC code of the tag, and the EPC code of the tag in the tag data table is the matching data. Since it cannot be judged whether the tag is legal only by comparing whether the CRC codes are the same. There may be cases where the CRC is the same, but the PC code is not the same as the EPC code. Therefore, the data of the CRC code included in the tag data table that is the same as the CRC code of the tag is traversed, and the data of the CRC code, the PC code, and the EPC that are respectively the same as the CRC code of the tag, the PC code of the tag, and the EPC code of the tag is determined as the matching data. This may improve inventory accuracy.
Optionally, with reference to the first aspect, in a possible implementation manner, the method further includes: and traversing data with the same CRC code as the CRC code of the tag in the tag data table when the PC code contained in the A-th data is determined to be different from the PC code of the tag and/or the EPC contained in the A-th data is determined to be different from the EPC of the tag, and determining that the tag is an illegal tag if the data with the same PC code and the same EPC code as the PC code of the tag and the EPC code of the tag do not exist in the data with the same CRC code as the CRC code of the tag in the tag data table. And traversing the data of which the CRC codes contained in the label data table are the same as the CRC codes of the labels, so that the illegal labels can be accurately determined.
Optionally, with reference to the first aspect, in a possible implementation manner, the determining whether there is matching data in the tag data table includes: step S11: taking the Nth data as low-order data and taking the (N + M) th data as high-order data; step S12: if there are odd number pieces of data between the low-order data and the high-order data, taking one piece of data right in the middle between the low-order data and the high-order data as intermediate data, and if there are even number pieces of data between the low-order data and the high-order data, taking any one of the two pieces of data right in the middle between the low-order data and the high-order data as the intermediate data, wherein the value of a CRC code in the intermediate data is an intermediate CRC value; step S13: determining whether the CRC value of the tag is equal to the intermediate CRC value; step S14: if the CRC value of the tag is determined to be equal to the intermediate CRC value, the PC value of the tag is determined to be equal to the PC value contained in the intermediate data, and the EPC value of the tag is determined to be equal to the EPC value contained in the intermediate data, determining that the intermediate data is the matched data, and exiting the loop; step S15: if it is determined that the CRC value of the tag is greater than the intermediate CRC value, repeatedly performing steps S12 through S15, with the intermediate data as the lower data and the N + M pieces of data as the upper data; if it is determined that the CRC value of the tag is less than the intermediate CRC value, the nth data is regarded as the lower data, the intermediate data is regarded as the upper data, and steps S12 to S15 are repeatedly performed. In this manner, the tag data table may be traversed with minimal effort. Thereby quickly looking up whether there is matching data in the tag data table. The matching efficiency can be improved.
Optionally, with reference to the first aspect, in a possible implementation manner, the step S12 further includes: and if no data exists between the high-order data and the low-order data, determining that the label is an illegal label. When there is no data before the high-order data and the low-order data, it indicates that one traversal of the tag data table has been completed, and if there is no data between the high-order data and the low-order data, it can be determined that the tag is an illegal tag.
Thus, the middle CRC value is continuously compared with the CRC value of the tag, the high-order data or the low-order data can be updated, so that the data between the high-order data and the low-order data is less and less, the range of the CRC of the tag is continuously reduced, the data in which the CRC value of the tag is positioned in the tag data table can be quickly inquired, or whether the CRC value of the tag exists in the tag data table is determined. The matching efficiency can be improved.
A second aspect of the present application provides a UHF handheld terminal, which includes a processor, a memory, and a communication interface, where the memory stores program instructions, and when the program instructions are executed by the processor, the UHF handheld terminal performs a tag inventory method as described in the first aspect of the present application and any one of the implementation manners of the first aspect.
A third aspect of the present application provides a computer-readable storage medium, which stores program instructions that, when executed on a computer, cause the computer to perform the tag inventory method for a UHF handheld terminal according to any one of the first to the second aspects of the present application.
The label checking method of the UHF handheld terminal and the UHF handheld terminal are provided. The method comprises the following steps: reading Electronic Product Code (EPC) area data of a tag, wherein the EPC area data comprises a Cyclic Redundancy Check (CRC) code of the tag, a Protocol Control (PC) code of the tag and an EPC of the tag; comparing the CRC code of the tag with a target CRC code in a preset tag data table, wherein the target CRC code corresponds to a target PC code and a target EPC in the tag data table, and the target CRC code is one CRC code in the tag data table; if the CRC code of the label is not determined to exist in the label data table, determining that the label is an illegal label; and if the CRC code of the label is determined to be the same as the target CRC code, but the PC code of the label is different from the target PC code, and/or the EPC of the label is different from the target EPC, determining that the label is an illegal label. Therefore, the illegal label read in series can be screened out, so that the counting efficiency can be improved, and the counting accuracy can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a tag inventory scene diagram of a UHF handheld terminal according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a tag inventory method of a UHF handheld terminal according to an embodiment of the present application;
fig. 3 is a schematic flowchart of an implementation manner of a tag inventory method of a UHF handheld terminal according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating an embodiment of determining whether matching data exists in a tag data table according to the present application;
fig. 5 is a schematic flowchart of an implementation manner of a tag inventory method of a UHF handheld terminal according to an embodiment of the present application;
fig. 6 is a schematic flowchart of an implementation manner of a tag inventory method of a UHF handheld terminal according to an embodiment of the present application;
FIG. 7 is a flowchart of one implementation of determining whether there is matching data in a tag data table according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a UHF handheld terminal according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," and the like in the description and in the claims and drawings of the present application are used for distinguishing between different objects and not necessarily for describing a particular sequential order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
In the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a and b, a and c, b and c or a and b and c, wherein a, b and c can be single or multiple. It is to be noted that "at least one item" may also be interpreted as "one or more item(s)".
It is noted that, in the present application, words such as "exemplary" or "for example" are used to mean exemplary, illustrative, or descriptive. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In order to achieve the above object, the embodiments of the present application provide a tag inventory method for a UHF handheld terminal and a UHF handheld terminal. The label herein refers to an RFID label, a radio frequency label, or an electronic label, and is simply referred to as a label (Tag). The UHF hand-held terminal, also referred to herein as a Reader, may be a UHF Reader. The UHF handheld terminal and the tag herein may constitute a tag inventory system, which is an RFID system. The technology of the embodiment of the application can be used in various fields such as logistics, retail and clothing.
Referring to fig. 1, fig. 1 provides a diagram of a tag inventory scenario of a UHF handheld terminal. In fig. 1, the UHF handheld terminal 10 may have a large number of tags to be checked, and as shown in fig. 1, the tags to be read and written by the UHF handheld terminal may include one or more tags such as tag 20-1, tag 20-2, tag 20-3 … …, tag 20-N, and the like.
Due to the fact that the UHF handheld terminal has a long reading distance and supports multi-tag checking, the UHF handheld terminal is widely applied to various fields, particularly checking scenes of warehouse checking, store checking and goods handover quantity confirmation. And the UHF technology is adopted to count the articles, so that the counting efficiency can be improved, and the labor cost can be saved. However, the UHF hand-held terminal has a longer reading distance, so that multi-tag inventory can be supported. It is also easy to have other tags read in series during the inventory process. For example, in some stores or warehouse scenes, tags of other stores or other warehouses may be read in series, which may cause some illegal tags to be checked in the checking process, so that tags not belonging to the store or the warehouse are checked in by mistake. Therefore, how to distinguish the illegal tag read by the string from the legal tag is an urgent problem to be solved.
In view of this, the present application provides a method for checking a tag of a UHF handheld terminal, please refer to fig. 2, where the method includes:
and S101, reading the EPC area data of the tag.
And reading the EPC area data of the tag. The EPC area data includes CRC code of the tag, PC code of the tag, and EPC of the tag.
S102, comparing the CRC code of the label with a target CRC code in a preset label data table.
The CRC code of the tag is compared with a target CRC code in a preset tag data table. In the tag data table, each piece of data includes a CRC code, a PC code, and an EPC. Specifically, the target CRC code corresponds to a target PC code and a target EPC, where the target CRC code is a CRC code in the tag data table.
And S103, if the CRC code of the label is determined not to exist in the label data table, determining that the label is an illegal label.
And if the CRC code of the label is determined not to exist in the label data table, determining that the label is an illegal label.
And S104, if the CRC code of the label is determined to be the same as the target CRC code, but the PC code of the label is different from the target PC code, and/or the EPC of the label is different from the target EPC, determining that the label is an illegal label.
And if the CRC code of the label is determined to be the same as the target CRC code, but the PC code of the label is different from the target PC code, and/or the EPC of the label is different from the target EPC, determining that the label is an illegal label.
Because the corresponding relation between the target CRC code, the target PC code and the target EPC is prestored in the tag data table, the tag data table is pre-recorded before the tag is checked, that is, each piece of data prestored in the tag data table corresponds to a legal tag. If the CRC code of the tag does not exist in the tag data table, the tag can be directly determined to be an illegal tag.
Since the CRC code is calculated from the PC code and the EPC, the CRC codes calculated by different tags may be the same. Therefore, in the process of checking the tags, the CRC codes of different tags may be the same, and if the tags are determined to be legal by merely determining that the CRC codes of the tags are the same, the CRC codes of the tags may not be accurate. It is possible that the tag CRC code is the same and in fact the tag is not a legitimate tag. However, if it is determined that the CRC code of the tag does not exist in the tag data table, it can be directly determined that the tag is an illegal tag.
It should be noted that, if the PC code of the tag is the same as the PC code included in a specific piece of data in the tag data table, and the EPC of the tag is also the same as the EPC included in the piece of data in the tag data table, it is possible to directly determine that the tag is a legitimate tag. However, if the PC code of the tag is directly compared with the PC code in the tag data table during the tag inventory process, the EPC of the tag is directly compared with the EPC in the tag data table. Although the comparison is accurate, the data amount required to be compared is large, the time consumption is long, and the consumed computing resources are also large.
Therefore, in one aspect, when it is determined that the CRC code of a tag is not present in the tag data table, it is directly determined that the tag is an illegal tag. This saves time and reduces the amount of computation.
On the other hand, when the CRC code of the label is determined to be the same as the target CRC code in the label data table, the PC code and the EPC of the label are compared with the PC code and the EPC in the label data table, so that most of data with different CRC codes in the label data table can be filtered, and the calculation amount can be greatly reduced. When the CRC code of the label is determined to be the same as the target CRC code, but the PC code of the label is different from the target PC code, and/or the EPC of the label is different from the target EPC, the label can also be determined to be an illegal label, so that the illegal label read in series can be distinguished from a legal label by the method. The illegal tag which is screened out and read in series can be selected, so that the checking efficiency can be improved, and the checking accuracy can be improved.
Note that the tag data table includes a correspondence relationship between the CRC code, the PC code, and the EPC. Wherein, the CRC code value is calculated according to the PC code and the EPC. The data in the tag data table are arranged in descending order of the value of the CRC code.
Specifically, the CRC value inside the tag is 16 bits, and its value ranges from 0 to 65535. While the PC value of the tag is fixed to be 2 bytes, the value of the EPC ranges from 2-62 bytes, so that the PC value plus the byte range of the EPC is 4-64 bytes. This range of bytes plus different values per byte can yield far greater than 65535 data sets consisting of PC values plus EPC. But each of these data sets will only generate a check value range of 0-65535 after being CRC checked. Therefore, there must be a case where the CRC values are the same but the data groups are different. Therefore, the value of the CRC is not unique, that is, the PC code and EPC of the tag having the same value of the CRC are not necessarily the same. But the PC code of a tag whose CRC value is not the same must not be the same as the EPC.
Illustratively, in one particular implementation, the tag data table may be as follows:
Figure DEST_PATH_IMAGE001
it should be noted that, the tag data table may further include an identification bit (Flag), and when one tag is checked in one checking process, the identification bit of the piece of data corresponding to the tag may be set to 1. When no inventory is made, the flag has a value of 0.
In one embodiment, in step S103, if it is determined that the value of the CRC code of the tag is smaller than the value of the smallest CRC code in the tag data table, or the value of the CRC code of the tag is larger than the value of the largest CRC code in the tag data table, it is determined that the CRC code of the tag does not exist in the tag data table. Therefore, whether the label exists in the label data table can be determined only by comparing the value of the CRC code of the label with the smallest CRC code in the label data table and the largest label data table in the label data table, so that the comparison efficiency and the inventory efficiency can be improved. Further, since the data in the tag data table are arranged in the order of the CRC codes from small to large, the smallest CRC code in the tag data table is the CRC code in the first data in the tag data table, and the largest CRC code in the tag data table is the CRC code in the last data in the tag data table. Thus, the CRC code of the tag is compared with the CRC code of the first piece of data and the CRC code of the last piece of data in the tag data table to determine whether the tag is present in the tag data. Therefore, the contrast efficiency can be obviously improved, and the inventory efficiency is improved.
Please refer to fig. 3, in an implementation manner of the above-mentioned tag inventory method for a UHF handheld terminal, the method may further include:
s201, determining whether matching data exist in a tag data table;
s202, if the matching data exists in the tag data table, the tag is determined to be a legal tag.
The CRC code included in the matching data is the same as the CRC code of the tag, the PC code included in the matching data is the same as the PC code of the tag, and the EPC included in the matching data is the same as the EPC included in the matching data. When it is determined that there is matching data in the tag data table, it can be determined that the tag is a legitimate tag.
Further, referring to fig. 4, in the step S201, determining whether there is matching data in the tag data table may specifically include:
s2011, if it is determined that the CRC code included in the a-th data in the tag data table is the same as the CRC code of the tag, comparing the PC code included in the a-th data with the PC code of the tag, and comparing the EPC included in the a-th data with the EPC of the tag.
S2012, when the PC code contained in the A-th data is the same as the PC code of the tag and the EPC contained in the A-th data is the same as the EPC of the tag, determining that the A-th data is matching data, wherein A is a positive integer.
It should be noted that, if the PC code and the EPC code of the tag are directly compared with the PC code and the EPC code in the tag data table, respectively, the workload is enormous. According to the scheme, the CRC code of the label is compared with the CRC code in the label data table, if the CRC code of the label is the same as the CRC code in the label data table, the label can only be indicated to be a legal label, and the label cannot be directly determined to be a legal label. The tag can be determined to be a legitimate tag only if the CRC code, PC code and EPC of the tag are the same. Thus, comparing the CRC codes first, determining the existence of the CRC codes in the tag data table, and then comparing the PC codes with the EPC can reduce the comparison workload on one hand. On the other hand, the label can be determined to be a legal label only if the CRC code, the PC code and the EPC of the label are determined to be the same, and the accuracy of the label being the legal label can be improved.
Please refer to fig. 5, in an implementation manner of the above-mentioned tag inventory method for a UHF handheld terminal, the method may further include:
s301, when the PC code contained in the A-th data is determined to be different from the PC code of the tag and/or the EPC contained in the A-th data is determined to be different from the EPC of the tag, traversing the data of which the CRC code contained in the tag data table is the same as the CRC code of the tag.
S302, determining that one piece of data in the tag data table, which is respectively the same as the CRC code, the PC code and the EPC code of the tag, is matched data.
Since it cannot be judged whether the tag is legal only by comparing whether the CRC codes are the same. It may happen that the CRC is the same, but the PC code and EPC are not the same. Therefore, the data of the CRC code contained in the label data table, which is the same as the CRC code of the label, is traversed, and the data of the CRC code, the PC code and the EPC, which are respectively the same as the CRC code of the label, the PC code of the label and the EPC of the label, is determined as the matching data, so that the inventory accuracy can be improved.
Please refer to fig. 6, in an implementation manner of the above-mentioned tag inventory method for a UHF handheld terminal, the method may further include:
s401, when the PC code contained in the A-th data is determined to be different from the PC code of the tag and/or the EPC contained in the A-th data is determined to be different from the EPC of the tag, traversing the data of which the CRC code contained in the tag data table is the same as the CRC code of the tag.
S402, if it is determined that the data having the same CRC code as the CRC code of the tag does not include data having the same PC code and the same EPC code as the PC code of the tag and the EPC code of the tag, the tag is determined to be an illegal tag.
By traversing the data of which the CRC code included in the tag data table is the same as the CRC code of the tag, the illegal tag can be accurately determined.
Specifically, please refer to the above tag data table, where the CRC code value in the nth data in the tag data table is the smallest, and the CRC code value in the N + M data in the tag data table is the largest. As described above, when the value of the CRC code of the tag is smaller than the value of the CRC code in the nth data, or the value of the CRC code of the tag is larger than the value of the CRC code in the N + M data, it may be directly determined that the tag is not in the tag data table and is an illegal tag.
Referring to fig. 7, if the CRC value of the tag is greater than the CRC code value in the nth data, and the CRC code value of the tag is less than the N + mth CRC code value in the tag data table, the determining whether there is matching data in the tag data table in step S201 may further include:
step S11: the nth data is lower data, and the (N + M) th data is higher data.
Step S12: if there are odd-numbered pieces of data between the lower data and the upper data, one piece of data between the lower data and the upper data is used as intermediate data, and if there are even-numbered pieces of data between the lower data and the upper data, either one of the two pieces of data between the lower data and the upper data is used as intermediate data, and the value of the CRC code in the intermediate data is an intermediate CRC value.
For example, if N =1 and M =10, the 1 st data is low data, and the 11 th data is high data. The data between the 1 st piece of data and the 11 th piece of data includes: the 2 nd data and the 3 rd data … … are the 10 th data and 9 pieces of data (odd-numbered data) in total, and the 6 th data is a piece of data right in the middle between the lower data and the upper data, and the 6 th data is the middle data. If N =1, M =11, the 1 st data is low-order data, and the 12 th data is high-order data. The data between the 1 st piece of data and the 12 th piece of data includes: the 2 nd data, the 3 rd data … …, the 10 th data, and the 11 th data share 10 pieces of data (even-numbered data), and the 6 th data and the 7 th data are two pieces of data located just in between the low-order data and the high-order data. Any one of the 6 th data and the 7 th data may be the intermediate data. This is by way of example only and is not intended as a limitation on the present application.
Step S13: it is determined whether the CRC value of the tag is equal to the intermediate CRC value.
Step S14: if it is determined that the CRC value of the tag is equal to the intermediate CRC value, the PC value of the tag is equal to the PC value contained in the intermediate data, and the EPC value of the tag is equal to the EPC value contained in the intermediate data, the intermediate data is determined to be matching data, and the loop exits.
Step S15: if it is determined that the CRC value of the tag is greater than the middle CRC value, the middle data is regarded as low-order data, the (N + M) -th data is regarded as high-order data, and steps S12 to S15 are repeatedly performed; if it is determined that the CRC value of the tag is less than the middle CRC value, the nth data is regarded as lower data, the middle data is regarded as upper data, and steps S12 to S15 are repeatedly performed.
By the mode, the tag data table can be traversed under the condition of minimum workload, so that whether matching data exists in the tag data table can be quickly searched, and the matching efficiency is improved. The number of such searches is K = log2(N + M). By traversing the tag data table through the method provided by the application, the comparison efficiency can be obviously improved.
Further, the step S12 may further include: and if the data does not exist between the high-order data and the low-order data, determining that the label is an illegal label.
When there is no data before the high-order data and the low-order data, it indicates that one traversal of the tag data table has been completed, and if there is no data between the high-order data and the low-order data, it can be determined that the tag is an illegal tag.
Thus, the middle CRC value is continuously compared with the CRC value of the tag, the high-order data or the low-order data can be updated, so that the data between the high-order data and the low-order data is less and less, the range of the CRC of the tag is continuously reduced, the data in which the CRC value of the tag is positioned in the tag data table can be quickly inquired, or whether the CRC value of the tag exists in the tag data table is determined. The matching efficiency can be improved.
Fig. 8 is a schematic structural diagram of a UHF handheld terminal provided in the present application. As shown in fig. 8, the UHF hand-held terminal 40 includes a processor 41, a memory 42, and a communication interface 43, and the processor 41, the memory 42, and the communication interface 43 may be connected by a bus 44.
Alternatively, the processor 41 may be one or more Central Processing Units (CPUs), microprocessors, application-specific integrated circuits (ASICs), or one or more integrated circuits for controlling the execution of programs according to the present disclosure.
The processor 41 is configured to execute the instructions in the memory 42 to execute the above-mentioned tag inventory method applied to the UHF handheld terminal shown in fig. 2 to 7. The communication interface 43 may include an input/output (I/O) interface.
The memory 42, the processor 41 and the communication interface 43 may be connected to each other by a bus 44, but are not limited to being connected only by the bus 44; the bus 44 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be performed by program instructions instructing associated hardware, and that the program may be stored in a computer-readable storage medium, which may include: ROM, RAM, magnetic or optical disks, and the like.
The present application further provides a computer-readable storage medium, which includes instructions, when the instructions are executed on a computer device, the computer device is caused to execute the tag inventory method of the UHF handheld terminal as provided in any one of the embodiments of the present application.
The application also provides a chip, which comprises a processing unit and a storage unit, wherein the storage unit is used for storing the computer operation instruction; the processing unit is used for executing the tag inventory method of the UHF handheld terminal provided by any one of the embodiments of the present application by calling the computer operation instruction stored in the storage unit.
The tag inventory method for the UHF handheld terminal and the UHF handheld terminal provided in the embodiment of the present application are introduced in detail above, a specific example is applied in the present application to explain the principle and the implementation manner of the present application, and the description of the above embodiment is only used to help understanding the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application. Furthermore, the embodiments and features of the embodiments of the present application may be combined with each other without conflict.

Claims (10)

1. A label checking method of a UHF hand-held terminal is characterized by comprising the following steps:
reading Electronic Product Code (EPC) area data of a tag, wherein the EPC area data comprises a Cyclic Redundancy Check (CRC) code of the tag, a Protocol Control (PC) code of the tag and an EPC of the tag;
comparing the CRC code of the tag with a target CRC code in a preset tag data table, wherein the target CRC code corresponds to a target PC code and a target EPC in the tag data table, and the target CRC code is one CRC code in the tag data table;
if the CRC code of the label is not determined to exist in the label data table, determining that the label is an illegal label;
and if the CRC code of the label is determined to be the same as the target CRC code, but the PC code of the label is different from the target PC code, and/or the EPC of the label is different from the target EPC, determining that the label is an illegal label.
2. The method of claim 1, wherein the tag data table contains a CRC code, a PC code and an EPC, wherein the CRC code is calculated from the PC code and the EPC,
and the data in the label data table are arranged from small to large according to the value of the CRC code.
3. The UHF hand-held terminal's tag inventory method of claim 2, wherein the determining that the CRC code for the tag is not present in the tag data table comprises:
and if the value of the CRC code of the label is determined to be smaller than the value of the smallest CRC code in the label data table, or the value of the CRC code of the label is determined to be larger than the value of the largest CRC code in the label data table, determining that the CRC code of the label does not exist in the label data table.
4. The UHF hand-held terminal's tag inventory method of claim 2, characterized in that the method further comprises:
determining whether there is matching data in the tag data table;
if the matching data exists in the tag data table, determining that the tag is a legal tag, wherein the CRC code contained in the matching data is the same as the CRC code of the tag, the PC code contained in the matching data is the same as the PC code of the tag, and the EPC contained in the matching data is the same as the EPC contained in the matching data.
5. The UHF handheld terminal tag inventory method of claim 4, wherein the determining that matching data exists in the tag data table comprises:
if the CRC code contained in the A-th data in the tag data table is determined to be the same as the CRC code of the tag, comparing the PC code contained in the A-th data with the PC code of the tag, and comparing the EPC contained in the A-th data with the EPC of the tag;
and when the PC code contained in the A-th data is the same as the PC code of the tag and the EPC contained in the A-th data is the same as the EPC of the tag, determining that the A-th data is the matching data, wherein A is a positive integer.
6. The UHF handheld terminal tag inventory method of claim 5, further comprising:
traversing data of which the CRC code contained in the tag data table is the same as the CRC code of the tag when the PC code contained in the A-th data is determined to be not the same as the PC code of the tag and/or the EPC contained in the A-th data is determined to be not the same as the EPC of the tag,
and determining that one piece of data in the tag data table, in which the CRC code, the PC code and the EPC are the same as the CRC code, the PC code and the EPC code of the tag respectively, is the matching data.
7. The UHF handheld terminal tag inventory method of claim 5, further comprising:
traversing data of which the CRC code contained in the tag data table is the same as the CRC code of the tag when the PC code contained in the A-th data is determined to be not the same as the PC code of the tag and/or the EPC contained in the A-th data is determined to be not the same as the EPC of the tag,
and if the data that the CRC code contained in the tag data table is the same as the CRC code of the tag is determined to be absent, determining that the tag is an illegal tag.
8. The method of claim 4, wherein the determining whether there is matching data in the tag data table includes:
step S11: taking the Nth data as low-order data and taking the (N + M) th data as high-order data;
step S12: if there are odd number pieces of data between the low-order data and the high-order data, taking one piece of data right in the middle between the low-order data and the high-order data as intermediate data, and if there are even number pieces of data between the low-order data and the high-order data, taking any one of the two pieces of data right in the middle between the low-order data and the high-order data as the intermediate data, wherein the value of a CRC code in the intermediate data is an intermediate CRC value;
step S13: determining whether the CRC value of the tag is equal to the intermediate CRC value;
step S14: if the CRC value of the tag is determined to be equal to the intermediate CRC value, the PC value of the tag is determined to be equal to the PC value contained in the intermediate data, and the EPC value of the tag is determined to be equal to the EPC value contained in the intermediate data, determining that the intermediate data is the matched data, and exiting the loop;
step S15: if it is determined that the CRC value of the tag is greater than the intermediate CRC value, repeatedly performing steps S12 through S15, with the intermediate data as the lower data and the N + M pieces of data as the upper data; if it is determined that the CRC value of the tag is less than the intermediate CRC value, the nth data is regarded as the lower data, the intermediate data is regarded as the upper data, and steps S12 to S15 are repeatedly performed.
9. The UHF hand-held terminal tag inventory method of claim 8, wherein the step S12 further comprises:
and if no data exists between the high-order data and the low-order data, determining that the label is an illegal label.
10. A UHF handheld terminal, characterized in that the UHF handheld terminal comprises a processor, a memory, a communication interface, the memory having stored therein program instructions which, when executed by the processor, implement the tag inventory method of the UHF handheld terminal as claimed in any one of claims 1 to 9.
CN202111222852.1A 2021-10-20 2021-10-20 Label checking method of UHF handheld terminal and UHF handheld terminal Active CN113657131B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111222852.1A CN113657131B (en) 2021-10-20 2021-10-20 Label checking method of UHF handheld terminal and UHF handheld terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111222852.1A CN113657131B (en) 2021-10-20 2021-10-20 Label checking method of UHF handheld terminal and UHF handheld terminal

Publications (2)

Publication Number Publication Date
CN113657131A CN113657131A (en) 2021-11-16
CN113657131B true CN113657131B (en) 2022-02-11

Family

ID=78484307

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111222852.1A Active CN113657131B (en) 2021-10-20 2021-10-20 Label checking method of UHF handheld terminal and UHF handheld terminal

Country Status (1)

Country Link
CN (1) CN113657131B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002743A (en) * 2018-07-24 2018-12-14 深圳市成为信息技术有限公司 Anti-collision method, reader and the label check system that label is made an inventory
CN110334553A (en) * 2019-05-08 2019-10-15 广东识芯微电子科技有限公司 The link method and sensing label node of radio frequency identification sensing data

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101048612B1 (en) * 2008-07-25 2011-07-12 성균관대학교산학협력단 RFID tag recognition method to prevent RFID tag collision, RFID reader and RFID tag using same
US9443119B2 (en) * 2012-04-20 2016-09-13 Hand Held Products, Inc. Portable encoded information reading terminal configured to locate groups of RFID tags
CN107273774B (en) * 2013-02-08 2020-12-01 台湾开发建设股份有限公司 Electronic tag and processing system and method for ensuring electronic tag
CN106446663B (en) * 2016-08-30 2019-07-16 德阳市闪通思动科技有限责任公司 A kind of label reader and database three-dimensional Verification System and method
JP6835689B2 (en) * 2017-09-06 2021-02-24 富士通フロンテック株式会社 RFID reader / writer device, error detection program and error detection method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002743A (en) * 2018-07-24 2018-12-14 深圳市成为信息技术有限公司 Anti-collision method, reader and the label check system that label is made an inventory
CN110334553A (en) * 2019-05-08 2019-10-15 广东识芯微电子科技有限公司 The link method and sensing label node of radio frequency identification sensing data

Also Published As

Publication number Publication date
CN113657131A (en) 2021-11-16

Similar Documents

Publication Publication Date Title
US11397915B2 (en) Ex-warehousing method and device
US20070222596A1 (en) Radio Frequency Identification System and Tag
CN110807080A (en) Commodity coding method and device
CN108388931B (en) Intelligent coding scheme and settlement system of radio frequency electronic tag in field of unmanned retail
CN114429401A (en) Transaction data processing method and device, terminal device and readable storage medium
US20060017544A1 (en) Method for multi-reading a plurality of id's
CN113541741B (en) Analog card switching method and device, electronic equipment and storage medium
CN113657131B (en) Label checking method of UHF handheld terminal and UHF handheld terminal
US20110050422A1 (en) System and Method for Identifying Location of an Information Handling System
CN107895131B (en) RFID label checking method in accordance with ISO15693 protocol
KR100876424B1 (en) Hull Block Management System Using Radio Frequency Identification
CN114091490B (en) Method for searching tag by UHF handheld terminal, UHF handheld terminal and tag
CN111260280A (en) Goods checking method, device, electronic equipment, system and storage medium
CN101324915B (en) Electronic label recognition method, radio frequency recognition system and electronic label
CN113283260B (en) Method for intelligently switching channels of multi-channel reader-writer, reader-writer and storage medium
US11200250B2 (en) Method and system for optimizing validations carried out for input data at a data warehouse
JP2019029880A (en) Filtering device for RFID tag
JP4451667B2 (en) Device and lead device
CN108415916A (en) Goods sorting reminding method, device and electronic equipment
CN115118527B (en) Bidirectional authentication method for ultrahigh frequency module and PDA and related equipment
CN112069772A (en) Data processing method and device based on FPGA, electronic equipment and storage medium
CN114757315B (en) Method for reader-writer to rapidly output label data, reader-writer and receiving terminal
CN116047399B (en) Method and related device for precisely positioning tag by UHF handheld terminal
CN114239629B (en) Anti-counterfeiting verification method of label, UHF handheld terminal and storage medium
CN104766034A (en) Simplified IPA anti-collision algorithm suitable for RFID system

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
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 518102 Floor 9, plant 2, Daqian industrial plant, zone 67, Xingdong community, Xin'an street, Bao'an District, Shenzhen, Guangdong Province

Patentee after: Shenzhen Chengcheng Information Co.,Ltd.

Address before: 518102 Floor 9, plant 2, Daqian industrial plant, zone 67, Xingdong community, Xin'an street, Bao'an District, Shenzhen, Guangdong Province

Patentee before: CHAINWAY INFORMATION TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder