CN-121985415-A - Label anti-collision method based on time slot allocation scanning code and related equipment
Abstract
The invention discloses a label anti-collision method based on time slot distribution scanning codes and related equipment, wherein the method comprises the steps of sending a first command in an identification range by a reader so as to initialize scanning codes with preset digits for all unidentified labels in the identification range; the method comprises the steps of enabling unidentified tags to randomly select reserved time slot numbers through a reader, judging assignment states of reserved time slots one by one based on the reserved time slot numbers, assigning identification time slot numbers to the unidentified tags according to the assignment states of the reserved time slots, sending a third command through the reader, enabling the unidentified tags to sequentially send tag data to the reader based on the identification time slot numbers, and receiving the tag data one by one through the reader. The invention not only reserves the high efficiency of random allocation, but also avoids the time slot waste caused by collision through centralized scheduling, thereby obviously improving the overall recognition efficiency while guaranteeing the recognition reliability, and being widely applied to the technical field of data processing.
Inventors
- JIANG AN
- WU YUANYUAN
- ZHANG PENGFEI
- ZENG JIAN
- LIAO HONGXIANG
Assignees
- 广东农工商职业技术学院(农业部华南农垦干部培训中心)
Dates
- Publication Date
- 20260505
- Application Date
- 20251231
Claims (10)
- 1. A method for collision avoidance of a tag based on a slot allocation scan code, the method comprising the steps of: A first command is sent in an identification range by a reader, so that all unidentified tags in the identification range initialize scanning codes with preset digits, wherein only one digit in each scanning code is assigned; Transmitting a second command in the identification range through the reader so that the unidentified tag randomly selects a reserved time slot number in the identification range; Based on the reserved time slot numbers, judging the assignment state of each reserved time slot one by one through the reader, and distributing identification time slot numbers to the unidentified tags according to the assignment state of each reserved time slot; Transmitting a third command in the identification range through the reader, so that the unidentified tag in the identification range sequentially transmits tag data to the reader based on the identification time slot number; and receiving the tag data by the reader time slot by time slot.
- 2. The method according to claim 1, wherein the preset number of bits is greater than or equal to the number of unidentified tags, the method comprising the steps of sending, by a reader, a first command over an identification range thereof to cause all unidentified tags within the identification range to initialize a scan code of the preset number of bits, comprising: transmitting the first command to all the unidentified tags within the identification range through the reader; Performing assignment operation on any bit number of an original code by the unidentified tag in response to the first command, and initializing to obtain the corresponding scanning code; wherein the original code includes zero values of the preset number of bits.
- 3. The method of claim 1, wherein said transmitting, by said reader, a second command within said identification range to cause said unidentified tag within said identification range to randomly select a reserved slot number, comprises the steps of: Determining an initial frame length based on a fixed value or the number of unidentified tags within the identification range; determining the total number of reserved time slots based on the initial frame length conversion; transmitting the second command to all the unidentified tags within the identification range through the reader; and randomly selecting a numerical value from a numerical range from an initial value of the reserved time slot to the total number of the reserved time slot as the corresponding reserved time slot number through the unidentified tag in response to the second command.
- 4. The method according to claim 1, wherein said individually determining, by said reader, the assigned status of each reserved slot based on said reserved slot number, comprises the steps of: Taking a preset reservation time slot initial value as a target reservation time slot number; Acquiring the scanning codes of all unidentified tags with the reserved time slot number being the target preset time slot number as candidate scanning codes; When the number of the candidate scanning codes is 0, determining that the assignment state of the reserved time slot corresponding to the target preset time slot number is null; When the number of the candidate scanning codes is 1, the candidate scanning codes are used as the assignment states of reserved time slots corresponding to the target preset time slot numbers; When the number of the candidate scanning codes is larger than 1, integrating the digit assignment results of all the candidate scanning codes into a numerical code with the preset digits, and taking the numerical code as the assignment state of the reserved time slot corresponding to the target preset time slot number; And adding 1 to the target reservation time slot number to update the target reservation time slot number, and returning to the step of executing the scanning codes of all the unidentified tags with the reservation time slot number being the target preset time slot number to be used as candidate scanning codes until the target reservation time slot number reaches the preset reservation time slot total number.
- 5. The method of claim 1, wherein said assigning an identification slot number to each of said unidentified tags based on said assigned status of each of said reserved slots comprises the steps of: taking the first reserved time slot as a target reserved time slot; Performing null value judgment on the assignment state of the target reservation time slot; When the assignment state of the target reservation time slot is null, taking the reservation time slot next to the target reservation time slot as the target reservation time slot; When the assignment state of the target reservation time slot is not null, restoring to obtain at least one scanning code based on the assignment state; Sequentially allocating the identification time slot numbers to the unidentified tags corresponding to the scanning codes obtained by restoration based on the identification time slot numbers stored in the register of the reader, and taking the next reservation time slot of the target reservation time slot as the target reservation time slot, wherein the initial value of the identification time slot number is obtained by initializing based on the first command, and each time the identification time slot number is allocated, the identification time slot number is subjected to an incremental operation to be used as the numerical value of the identification time slot number allocated next time; and returning to the step of executing the null value judgment on the assignment state of the target reservation time slot until the assignment state of all reservation time slots is traversed.
- 6. The method of claim 5, wherein said recovering based on said assigned state results in at least one of said scan codes, comprising the steps of: When the number of bits assigned in the assignment state is 1, directly using the assignment state as the scan code obtained by restoration; when the assigned bit number in the assignment state is larger than 1, the assigned bit number is used as a collision bit; Taking the first collision bit as a target collision bit; performing assignment operation on the target collision bit of an original code, and recovering to obtain the scanning code, wherein the original code comprises zero values of the preset digits; And returning the next collision bit serving as the target collision bit to the step of executing the assignment operation on the target collision bit of the original code until all the collision bits are traversed.
- 7. The method according to any one of claims 1 to 6, further comprising the step of: When the process of receiving the tag data by the reader is in tag collision or the tag data received by the reader is not empty, the tag data of a plurality of unidentified tags related to the tag collision are not received by the reader; And returning to the step of executing the first command sent by the reader in the identification range until no label collision occurs in the process of receiving the label data by the reader and no new label data is received by the reader, and finishing the reading of all the unidentified labels in the identification range.
- 8. A tag collision avoidance apparatus based on slot allocation scan codes, the apparatus comprising: The first module is used for sending a first command in the identification range of the reader through the reader so that all unidentified tags in the identification range initialize scanning codes with preset digits, wherein only one digit in each scanning code is assigned; A second module, configured to send a second command through the reader in the identification range, so that the unidentified tag randomly selects a reserved time slot number in the identification range; the third module is used for judging the assignment state of each reserved time slot one by one through the reader based on the reserved time slot numbers, and distributing the identification time slot numbers to the unidentified tags according to the assignment state of each reserved time slot; A fourth module, configured to send a third command through the reader in the identification range, so that the unidentified tag in the identification range sequentially sends tag data to the reader based on the identification timeslot number; and a fifth module for receiving the tag data from the reader slot by slot.
- 9. An electronic device comprising a memory storing a computer program and a processor implementing the method of any of claims 1 to 7 when the computer program is executed by the processor.
- 10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the method of any one of claims 1 to 7.
Description
Label anti-collision method based on time slot allocation scanning code and related equipment Technical Field The invention relates to the technical field of data processing, in particular to a label anti-collision method based on time slot allocation scanning codes and related equipment. Background With the internet of things of everything entering the age of scale application, radio frequency identification (Radio Frequency Identifiction, RFID) is a core technology of the internet of things, and is widely applied to traffic, logistics, supply chain, asset management and other scenes. The typical RFID system consists of a tag, a reader and a data processing system, wherein the tag stores the data information of an identified object, and the reader reads the tag data through a radio frequency technology. Tags in the area to be identified by the reader share the same wireless transmission channel, but the tags do not have channel sensing capability and cannot communicate with each other, so that a situation that a plurality of tags send data to the reader simultaneously occurs, and the tags cannot be identified due to signal collision received by the reader, namely the tag collision. Disclosure of Invention The embodiment of the invention mainly aims to provide a label anti-collision method, device, electronic equipment, storage medium and program product based on time slot allocation scanning codes, and aims to solve at least one problem in the prior art. In order to achieve the above objective, an aspect of an embodiment of the present invention provides a tag anti-collision method based on slot allocation scan codes, the method including: A first command is sent in the identification range by a reader so that all unidentified tags in the identification range initialize scanning codes with preset digits, wherein only one digit in each scanning code is assigned; transmitting a second command in the identification range through the reader so that the unidentified tag in the identification range randomly selects the reserved time slot number; Based on the reserved time slot numbers, judging the assignment state of each reserved time slot one by one through a reader, and distributing identification time slot numbers to the unidentified tags according to the assignment state of each reserved time slot; Transmitting a third command in the identification range through the reader, so that the unidentified tags in the identification range sequentially transmit tag data to the reader based on the identification time slot number; tag data is received by the reader slot by slot. In some embodiments, the preset number of bits is greater than or equal to the number of unidentified tags, and the reader sends a first command in its identification range, so that all unidentified tags in the identification range initialize a scan code with the preset number of bits, including the following steps: transmitting a first command to all unidentified tags within the identification range through a reader; Performing assignment operation on any bit number of the original code by responding to the first command through the unidentified tag, and initializing to obtain a corresponding scanning code; Wherein the original code comprises zero values of a preset number of bits. In some embodiments, sending, by the reader, a second command over the identification range to cause unidentified tags within the identification range to randomly select the reserved slot number, comprising the steps of: Determining an initial frame length based on a fixed value or the number of unidentified tags within an identification range; Determining the total number of reserved time slots based on the initial frame length conversion; transmitting a second command to all unidentified tags within the identification range through the reader; And randomly selecting a numerical value from the numerical range of the initial value of the reserved time slot to the total number of the reserved time slot as a corresponding reserved time slot number through the unidentified tag in response to the second command. In some embodiments, based on the reserved time slot number, the assignment state of each reserved time slot is judged by the reader one by one, and the method comprises the following steps: Taking a preset reservation time slot initial value as a target reservation time slot number; Acquiring scanning codes of all unidentified tags with reserved time slot numbers as target preset time slot numbers as candidate scanning codes; When the number of the candidate scanning codes is 0, determining that the assignment state of the reserved time slot corresponding to the target preset time slot number is null; When the number of the candidate scanning codes is 1, taking the candidate scanning codes as assignment states of reserved time slots corresponding to target preset time slot numbers; when the number of the candidate scanning codes is larger than 1, integrating t