A method, system, device and storage medium for information anti-collision in radio frequency identification
By using one-hot code pre-query coding in the radio frequency identification system, combined with the number of effective identifications and identification information, the problem of low efficiency in the information sender's query in radio frequency identification is solved, efficient identification is achieved, and query time and hardware are reduced complexity.
Patent Information
- Application Number
- CN202011110549.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-16
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-10-16
AI Technical Summary
In radio frequency identification technology, the deterministic anti-collision algorithm is inefficient when processing a large number of tags. The one-hot code query method increases the query time and hardware complexity. Especially when the tag ID length is long, the system query efficiency is significantly reduced.
By receiving the query command from the information sender, the pre-query code is determined as a one-hot code based on the number of valid identifications and the valid identification information, and the pre-query code and identification information are sent to the information sender to prevent collision of identity information and reduce Query time and improve efficiency.
The combination of effective identification number and effective identification information realizes the anti-collision of identification information through one-hot code, reduces the query time, improves the query efficiency of the radio frequency identification system, and avoids all the identity identifiers in the information receiver. Convert to one-hot code requirements.
Smart Images

Figure CN114386439B
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of radio frequency identification technology, and in particular to an information anti-collision method, system, device and storage medium in radio frequency identification. Background Art
[0002] The radio frequency card protocol includes two types of transmission protocols and devices: Type A and Type B. The differences in transmission coding used by the two protocols are as follows: Type A subcarrier uses Manchester encoding, which is a bit encoding that can support the detection of collisions in bits; Type B subcarrier uses BPSK encoding, which is a phase encoding, so bit collisions cannot be detected.
[0003] In order to solve the collision problem of Type A tags (information receivers), RFID systems usually adopt deterministic anti-collision algorithms, such as binary search algorithm, dynamic binary search algorithm, jumping dynamic tree algorithm, query tree algorithm, dynamic query tree algorithm, back-off index search algorithm, etc.; the deterministic anti-collision algorithm does not have randomness in the entire recognition process, improves the signal transmission rate, has a relatively high channel utilization rate, and has stable performance; or based on the feedback of the one-hot code (ONE-HOT) encoding, the number of tags is estimated. Intuitively speaking, ONE-HOT is a code system in which there are as many bits as there are states, and only one bit is 1, and the others are all 0. The way to identify tags based on the feedback of the ONE-HOT code is to convert the tags into one-hot codes, which can more conveniently estimate the approximate number of tags and group the tags.
[0004] However, the deterministic anti-collision algorithm has disadvantages such as high complexity and long system recognition delay. When the number of tags is too large, the system efficiency decreases. When querying through the one-hot code, the tag's ID identifier cannot be directly identified. Other commands and a small-scale binary tree query method are required. The hardware implementation logic and commands are more, and when the length of the tag ID is n, the length of the one-hot code is m = 2 n ,If the tag ID length is relatively long, such as 32 bits, then the length of the one-hot code will be very long, which increases the query time and reduces the query efficiency. Summary of the invention
[0005] The present invention provides an information anti-collision method, system, device and storage medium in radio frequency identification, so as to realize efficient and accurate identification of the information sender.
[0006] In a first aspect, an embodiment of the present invention provides a method for information anti-collision in radio frequency identification, the method being applied to an information receiver, comprising:
[0007] Receive the query command sent by the information sender;
[0008] Determine a pre-query code and identity information according to the number of valid identifications and valid identification information included in the query command, and send the pre-query code and identity information to the information sender, so as to achieve anti-collision of the identity information through the pre-query code;
[0009] Wherein, the pre-query code is a one-hot code.
[0010] In a second aspect, an embodiment of the present invention further provides a method for information anti-collision in radio frequency identification, the method being applied to an information sender, comprising:
[0011] Generate a query command according to a preset query command format, and send it to each information receiving party, so that each information receiving party determines the pre-query code and identity identification information according to the query command;
[0012] The pre-query code and the identity identification information fed back by each of the information receiving parties are received, so as to implement anti-collision of the pre-query code and the identity identification information fed back by the information receiving parties through the query command.
[0013] In a third aspect, an embodiment of the present invention further provides an information anti-collision sending system in radio frequency identification, the system comprising: an information receiver and an information sender;
[0014] The information receiving party includes: a command receiving module and a determining module;
[0015] The command receiving module is used to receive the query command sent by the information sender;
[0016] The determining module is used to determine the pre-query code and the identity identification information according to the valid identification number and the valid identification information included in the query command, and send the pre-query code and the identity identification information to the information sender, so as to achieve anti-collision of the identity identification information through the pre-query code;
[0017] Wherein, the pre-query code is a one-hot code;
[0018] The information sender comprises: a sending module and an information receiving module;
[0019] The sending module is used to generate a query command according to a preset query command format and send it to each information receiving party, so that each information receiving party determines the pre-query code and identity identification information according to the query command;
[0020] The information receiving module is used to receive the pre-query code and identity identification information fed back by each of the information receiving parties, so as to achieve anti-collision of the pre-query code and identity identification information fed back by the information receiving parties through the query command.
[0021] In a fourth aspect, an embodiment of the present invention further provides a device, the device comprising:
[0022] one or more processors;
[0023] a storage device for storing one or more programs,
[0024] When the one or more programs are executed by the one or more processors, the one or more processors implement a method for preventing information collision in radio frequency identification as described in any one of the embodiments of the present invention.
[0025] In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for preventing information collision in radio frequency identification as described in any one of the embodiments of the present invention.
[0026] The embodiment of the present invention provides a method, system, device and storage medium for information anti-collision in radio frequency identification. The method is applied to an information receiver, comprising: receiving a query command sent by an information sender; determining a pre-query code and identity information according to the number of valid identifications and valid identification information included in the query command, and sending the pre-query code and identity information to the information sender, so as to achieve anti-collision of the identity information through the pre-query code; wherein the pre-query code is a one-hot code. The method solves the problem that when the information sender in radio frequency identification queries the identity information of the information receiver, the query time is long and the system query efficiency is low due to the large number of queries when the number of information receivers is large or the length is long. The pre-query code and identity information are determined by the number of valid identifications and the valid identification information, and sent to the information sender. The pre-query code is a one-hot code. Therefore, when determining that no collision occurs according to the pre-query code and the identity information, it is not necessary to convert all the identity identifiers of the information receivers into one-hot codes, so that the effect of distinguishing each information receiver can be achieved, the query time is reduced, and the query efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is a flow chart of an information anti-collision method in radio frequency identification in embodiment 1 of the present invention;
[0028] Figure 2 is a flow chart of a method for preventing information collision in radio frequency identification in Embodiment 2 of the present invention;
[0029] Figure 3is a flow chart of a method for preventing information collision in radio frequency identification in Embodiment 3 of the present invention;
[0030] Figure 4 is a flow chart of another method for preventing information collision in radio frequency identification in Embodiment 3 of the present invention;
[0031] Figure 5 It is a structural schematic diagram of an information anti-collision system in radio frequency identification in a fourth embodiment of the present invention;
[0032] Figure 6 It is a structural diagram of a device in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0033] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0034] Embodiment 1
[0035] Figure 1 This is a flow chart of a method for preventing information collision in radio frequency identification provided by Embodiment 1 of the present invention. This embodiment is applicable to the case of preventing information collision in radio frequency identification. The method is applied to the information receiving party and specifically includes the following steps:
[0036] Step S110: receiving a query command sent by the information sender.
[0037] In this embodiment, the information receiver can be understood as a computer device that receives query information and provides corresponding feedback, such as a tag or radio frequency card in radio frequency identification technology, and the information receiver has a unique identity identifier (ID); the information sender can be understood as a computer device that needs to query other nearby user information, such as a reader or reader-writer in radio frequency identification technology, which can be a host device. The query command can be understood as a command sent by the information sender to the information receiver when querying the information receiver, which is used for the information receiver to provide corresponding feedback.
[0038] The information sender sends the query command to the information receiver through the transceiver antenna via a radio frequency signal, and the information receiver receives the query command through the transceiver antenna.
[0039] Step S120: determine the pre-query code and identity information according to the valid identification number and valid identification information included in the query command, and send the pre-query code and identity information to the information sender to achieve anti-collision of the identity information through the pre-query code.
[0040] In this embodiment, the number of valid identifications can be understood as a numerical value pre-set according to the length of the identity identifier of the information receiver; the valid identification information can be understood as a pre-set binary number; the information sender determines the code for the next query based on the pre-query code fed back by the information receiver, and the pre-query code is a one-hot code; the identity identification information can be understood as part of the data in the identity identifier, and the information receiver needs to feed back the identity identification information to the information sender so that the information sender can determine the identity identifier of the information receiver based on the identity identification information combined with the pre-query code and the valid identification information; the number of valid identifications and the valid identification information are used to constrain whether the information receiver sends the identity identification information.
[0041] The query command includes at least the number of valid identifications and valid identification information. After receiving the query command, the information receiver determines whether the data at the corresponding position in the identity identifier is consistent with the valid identification information based on the number of valid identifications. If they are consistent, the pre-query code and identity identification information are determined and feedback is given. If they are inconsistent, the information receiver does not need to give corresponding feedback to this query command. According to the number of valid identifications, part of the data in the identity identifier is determined to be the pre-query code, and the data in the identity identifier minus the pre-query code and valid identification information is used as the identity identification information.
[0042] The number of valid identifications can be set to zero or other values. When the number of valid identifications is set to zero, there is no restriction on the ID of the information recipient, that is, all information recipients will reply. Even if the valid identification information is set, it will not impose any restrictions on the information recipient, so it does not need to be set. When the number of valid identifications is not 0, the valid identification information needs to be set accordingly. When the information sender generates a query command, the valid identification information in the query command is an integer byte. If it is not an integer byte, the low bit is padded with 0 or the high bit is padded with 0 to make it an integer byte. If the valid identification information starts from the low bit, the high bit is padded with zero; if the valid identification information starts from the high bit, the low bit is padded with zero.
[0043] The embodiment of the present invention provides an information anti-collision method in radio frequency identification. The method is applied to an information receiver, comprising: receiving a query command sent by an information sender; determining a pre-query code and identity identification information according to the number of valid identifications and valid identification information included in the query command, and sending the pre-query code and identity identification information to the information sender, so as to achieve anti-collision of the identity identification information through the pre-query code; wherein the pre-query code is a one-hot code. The method solves the problem that when the information sender in radio frequency identification queries the identity information of the information receiver, the query time is long and the system query efficiency is low due to the large number of queries when the number of information receivers is large or the length is long. The pre-query code and identity identification information are determined by the number of valid identifications and the valid identification information, and sent to the information sender. The pre-query code is a one-hot code. Therefore, when it is determined that there is no collision information according to the pre-query code and the identity identification information, it is not necessary to convert all the identity identifiers of the information receivers into one-hot codes, so that the effect of distinguishing each information receiver can be achieved, the query time is reduced, and the query efficiency is improved.
[0044] Embodiment 2
[0045] Figure 2 This is a flow chart of a method for information anti-collision in radio frequency identification provided in Embodiment 2 of the present invention. The method is applied to the information receiving party. The technical solution of this embodiment is further refined on the basis of the above technical solution, and specifically mainly includes the following steps:
[0046] Step S210: Receive a query command sent by the information sender.
[0047] The query command at least includes the number of valid identifications and valid identification information.
[0048] Step S220: Obtain an identity identifier, and determine valid bit information corresponding to the number of valid identifications in the identity identifier.
[0049] In this embodiment, the valid bit information can be understood as part of the data in the identity identifier of the information receiver, and the valid bit information is obtained by screening the data in the identity identifier according to the valid identification number.
[0050] The information receiver obtains its own identity identifier and determines the data corresponding to the valid identification number in the identity identifier as the valid bit information according to the valid identification number. For example, the identity identifier is 10001101, the valid identification number CNT in the query command sent by the information sender is 3, and the valid identification information is 100. Therefore, after receiving the query command, the information receiver determines that the first 3 bits (CNT) of its own identity identifier are 100, that is, the valid bit information is 100.
[0051] Step S230, determine whether the valid identification information is equal to the valid bit information, if so, execute step S240; otherwise, execute step S270.
[0052] If the valid bit information is consistent with the valid identification information, the information receiver will determine the pre-query code and identity information and provide feedback, otherwise, no feedback will be provided.
[0053] Step S240: Determine the one-hot code corresponding to the preset number of bit data after the valid identification number in the identity identifier as the pre-query code.
[0054] Step S250: Determine the remaining data in the identity identifier after removing the valid identification information and the pre-query code as the identity identification information.
[0055] In this embodiment, the preset number can be understood as a value pre-agreed by the information receiver and the information sender. Usually, this value is related to the length of the information receiver's identity identifier. When the information receiver's identity identifier is long, the preset number can be set larger. When the information receiver's identity identifier is short, the preset number can be set smaller. When the preset number is N, N bits of data can be queried, and the query space used is 2. N . For example, when the preset number is 4, 4-bit data can be queried, and the query space is 16 bits, that is, the one-hot code is 0000000000000000 to 11111111111111111. If the preset number is too large, although the number of queries is saved, the query time is greatly wasted. Therefore, in practical applications, the preset number is usually selected as 4, which can achieve a relatively long query. The identity identifier is usually composed of a set of binary data, such as 0100, where 0, 1, 0, and 0 are respectively one bit of data.
[0056] Step S260: Send the pre-query code and identity information to the information sender.
[0057] Furthermore, when the identity identification information is not an integer byte, the identity identification information is padded with zeros to form an integer byte of identity identification information.
[0058] If the valid identification number and valid identification information included in the query command start from the low bit, then the high bit is padded with zero when the identity identification information is padded with zero; if the valid identification number and valid identification information included in the query command start from the high bit, then the low bit is padded with zero when the identity identification information is padded with zero.
[0059] For example, the identity identifier is 10001101, the valid identification number is 3, the valid identification information is 100, the preset number is 4, and the valid identification number and the valid identification information start from the high position, and the low position needs to be filled with zero when filling zero. According to the valid identification number and the identity identifier, the valid bit is determined to be 100, so the information receiver feeds back. After determining the valid identification number in the identity identifier, the preset number of bit data is 0110, and the corresponding one-hot code is 0000000001000000 (bin) , so the pre-query code is 0000000001000000 (bin) , that is 0040 (hex) , the identification information is the remaining 1 (bin) , after completing the whole byte, it is 10000000, which is 80 (hex) ; The reason for using hexadecimal representation here is that the one-hot code or binary code may be too long, and it looks more convenient and clear to use hexadecimal representation. In fact, the value is the same. No matter which method is used, the essence is the same. If the number of valid identifications is 0, then all information receivers need to provide feedback. The preset number of bits after the number of valid identifications in the identity identifier is 1000, and the corresponding one-hot code is 0000000010000000 (bin) , so the pre-query code is 000000010000000 (bin) , that is 0080 (hex) , the identification information is the remaining 1101 (bin) , after completing the whole byte, it is 11010000, which is d0 (hex) .
[0060] Step S270, end the operation.
[0061] Exemplarily, an example is given of the information fed back by the information receiver to the information sender in response to the query command.
[0062] The format of the feedback information from the information receiver is:
[0063] SOF Pre-query encoding Identification Information CRC EOF
[0064] In the above feedback information, SOF stands for start; CRC stands for cyclic redundancy check; and EOF stands for end.
[0065] (a) The ID of the information receiver 1 is: 10001101 (bin) The entire ID LEN is 8 bits, the valid identification number CNT in the query command sent by the information sender is 3 bits, and the valid identification information is 100 (bin)At this time, the information receiver 1 determines that the first 3 digits of the ID are consistent with the first 3 digits of the valid identification information sent by the information sender. The information receiver 1 will reply. The pre-query code ONE-HOT in the reply content is the 3 digits after the first 3 digits of the ID (the binary code of the 3-digit ID can be converted into an 8-bit ONE-HOT, and the preset number is 3), which is 00001000 (bin) , becomes the hexadecimal pre-query code 08 (hex) , the identity information replied is the remaining 2-bit ID value, which is 01 (bin) , becomes hexadecimal 40 (hex) The overall response is as follows: SOF, 08 (hex) , 40 (hex) , CRC, EOF.
[0066] (b) The ID of the information receiver 2 is: 5A6B3C7F (hex) The entire ID LEN is 32 bits, the valid identification number CNT sent by the information sender is 8 bits, and the valid identification information value is 5A (hex) , the information receiver 2 determines that the first 8 digits of the ID are 5A (hex) , which is consistent with the valid identification information sent by the information sender, the information receiver 2 will reply, and the pre-query code ONE-HOT in the reply content is the 4 bits after the first 8 bits of ID (the binary code of the 4-bit ID can just be converted into a 16-bit ONE-HOT, and the preset number is 4), which is 6 (hex) , so the 16-bit ONE-HOT in reply is 0040 (hex) The next 20 bits of the reply are the remaining 3 bytes IDB3C7F0 (hex) , the overall reply is as follows: SOF, 0040 (hex) ,B3C7F0 (hex) , CRC, EOF.
[0067] (c) The ID of the information recipient 5 is: 3598C0A6DD154123 (hex) The entire ID LEN is 64 bits, the valid identification number CNT sent by the sender is 20 bits, and the valid identification information is 3598C (hex) The information receiver 5 determines that the first 20 bits of the ID value are 3598C (hex) , which is consistent with the valid identification information sent by the message sender, the message receiver 5 will reply, and the pre-query code ONE-HOT in the reply content is 4 digits after the first 20 digits of ID (the preset number is 4), which is 0, so the first 16 digits of ONE-HOT in the reply are 0001 (hex) The next 40 bits of the reply are the remaining IDA6DD154123(hex) , the overall response content is as follows: SOF, 0001 (hex) ,A6DD154123 (hex) , CRC, EOF.
[0068] The embodiment of the present invention provides an information anti-collision method in radio frequency identification. The method is applied to an information receiver, and solves the problem that when an information sender in radio frequency identification queries the identity information of an information receiver, the query time is long and the system query efficiency is low due to the large number of queries when the number of information receivers is large or the length is long. The pre-query code and the identity identification information are determined by the number of effective identifications and the effective identification information, and sent to the information sender. The pre-query code is a one-hot code. Therefore, when it is determined that there is no collision information based on the pre-query code and the identity identification information, the length of the appropriate pre-query code is selected through the characteristics of the one-hot code, which not only realizes the anti-collision of the identity identification information, but also does not need to convert all the identity identifiers of the information receivers into one-hot codes, so that the effect of distinguishing each information receiver can be achieved, reducing the query time and improving the query efficiency.
[0069] Embodiment 3
[0070] Figure 3 This is a flow chart of a method for information anti-collision in radio frequency identification provided by Embodiment 3 of the present invention. The method is applied to the information sender and specifically includes the following steps:
[0071] Step S310: Generate a query command according to a preset query command format, and send it to each information receiver, so that each information receiver determines the pre-query code and identity identification information according to the query command.
[0072] In this embodiment, the preset query command format can be understood as a format specification preset before sending the query command, which is used to form the query command. According to the preset query command format, corresponding data is set to form a query instruction and sent to each information recipient.
[0073] Step S320: receiving the pre-query code and identity identification information fed back by each information receiving party, so as to implement anti-collision of the pre-query code and identity identification information fed back by the information receiving party through a query command.
[0074] After sending the query command, the information sender waits for and receives the pre-query code and identity information determined and fed back by each information receiver according to the query command.
[0075] Exemplarily, an embodiment of the present invention provides a pre-query command format:
[0076] SOF Query Command Number of effective identification Valid identification information CRC EOF
[0077] The number of valid identifications is the bit count of a byte.
[0078] The embodiment of the present invention provides an information anti-collision method in radio frequency identification. The method is applied to an information sender, and generates a query command according to a preset query command format and sends it to each information receiver, so that each information receiver determines a pre-query code and identity identification information according to the query command; receives the pre-query code and identity identification information fed back by each information receiver, and realizes anti-collision of the pre-query code and identity identification information fed back by the information receiver through the query command, thereby solving the problem that when the information sender in radio frequency identification queries the identity information of the information receiver, the query time is long and the system query efficiency is low due to the large number of queries when the number of information receivers is large or the length is long. The query command is generated by the preset query command format and sent to the information receiver, and the information receiver determines the pre-query code and identity identification information according to the query command and feeds back. Therefore, when determining that no collision occurs according to the pre-query code and identity identification information, the length of the appropriate pre-query code is agreed with the information receiver in advance through the characteristics of the one-hot code, so that the anti-collision of the identity identification information is realized without converting all the identity identifiers of the information receivers into one-hot codes, so as to achieve the effect of distinguishing each information receiver, reduce the query time, and improve the query efficiency.
[0079] Further, Figure 4 This is a flowchart of another method for information anti-collision in radio frequency identification provided in Embodiment 3 of the present invention. The method is applied to the information sender. The technical solution of this embodiment is further refined on the basis of the above technical solution, and specifically mainly includes the following steps:
[0080] Step S410: Generate a query command according to a preset query command format, and send it to each information receiver, so that each information receiver determines the pre-query code and identity identification information according to the query command.
[0081] Step S420: receiving the pre-query code and identity identification information fed back by each information receiving party, so as to implement anti-collision of the pre-query code and identity identification information fed back by the information receiving party through a query command.
[0082] Step S430: determine the starting conflict bit according to each pre-query code and identity identification information.
[0083] In this embodiment, the starting conflict bit can be understood as the first position where data conflict occurs from low to high. Each information receiver will feedback its own pre-query code and identity information accordingly. When the information sender receives multiple pre-query codes and identity information, for example, taking two information receivers as an example, the first set of pre-query codes and identity information received is: 1001 (bin)and 1000 (bin) , the second set of pre-query code and identity information is 1100 (bin) and 1010 (bin) , then the pre-query code is 1001 (bin) The corresponding one-hot code is 0000001000000000, so the pre-query code is 1100 (bin) The corresponding one-hot code is 0001000000000000, and the conflicting positions are bit9 and bit12, so the starting conflicting position is bit9, where bit9 and bit12 occur in the pre-query code. Or, taking two information receivers as an example, the first set of pre-query codes and identity information received is: 1000 (bin) and 1000 (bin) , the second set of pre-query code and identity information is 1000 (bin) and 1010 (bin) , then the pre-query code is 1000 (bin) No conflict occurs, the information sender (host) recognizes that the identity information conflicts, and the conflicting bit is at bit 1. The information sender can directly feedback the starting conflicting bit through hardware implementation when determining the starting conflicting bit, and display other conflicting bits as 1. Due to various limitations of the host, it may not be possible to directly feedback the specific positions of all conflicts, but the conflicting positions can be displayed. For example, in 10000011111110, all 1 positions are conflicting bits.
[0084] Step S440: Update the query command according to the initial conflict bit, so as to send a new query command to the information receiver until all identity identification information is obtained.
[0085] After determining the starting conflict bit, the starting conflict bit is used to determine whether the conflict first occurs in the pre-query code or in the identity identification information. Then, different update methods are selected according to the judgment result to update the query command, and a new query command is formed and sent to the information recipient again until the identity identification information of all information recipients is queried.
[0086] Optionally, updating the query command according to the start conflict bit may be implemented in the following manner:
[0087] If the starting conflict bit is less than or equal to the length of the pre-query code, determine each code conflict bit according to each pre-query code, and update the valid identification information in the query command according to each code conflict bit and update the number of valid identifications in the query command according to a preset number;
[0088] If the starting conflict bit is greater than the length of the pre-query code, the non-conflicting information in the identity information is determined based on the starting conflict bit, the valid identification information in the query command is updated based on the valid identification information, the pre-query code and the non-conflicting information, and the number of valid identifications in the query command is updated based on the difference between the starting conflict bit and the preset value.
[0089] In this embodiment, the coded conflicting bits can be understood as the positions where data conflicts occur; the non-conflicting information can be understood as the positions where no conflicts are determined. The preset value is determined according to the length of the pre-query code and the preset number.
[0090] If the starting conflict bit is less than or equal to the length of the pre-query code, the pre-query code conflicts at this time. When updating the query command, the pre-query code needs to be screened, and the pre-query code of the information receiver is screened by setting the valid identification number and valid identification information. Determine each code conflict bit according to each pre-query code, and use the number corresponding to the code conflict bit together with the valid identification information of this query as the new valid identification information, so as to update the valid identification information. At this time, the valid identification number also needs to be updated accordingly, and the sum of the preset number and the valid identification number of this query is used as the new valid identification number. When the information receiver feeds back information, since the valid identification information and the valid identification number are set for screening (only the valid bit information and the valid identification information are equal to each other can be replied), there is no conflict in the valid identification information (valid bit information) of the information receiver. Therefore, when the pre-query code conflicts, the valid identification information of this query continues to be used as the screening condition, and on this basis, the data corresponding to the code conflict bit is added as the screening condition. The length of the pre-query code depends on the preset number. For example, if the preset number is 4, the length of the pre-query code is 16 bits. Therefore, when adding valid identification information, the number of valid identifications is increased by the preset number.
[0091] Optionally, determining each coding conflict bit according to the pre-query coding may be implemented in the following manner:
[0092] Determine each bit whose bit data in the pre-query code is 1;
[0093] The values corresponding to the bits are determined as the coding conflict bits.
[0094] For example, the received 16-bit precode is 0010110001100000 (bin), then, bit5, bit6, bit10, bit11, and bit13 are 1, so the possibilities of determining the 4-bit data following the existing valid identification information are: 0101 (decimal 5), 0110 (decimal 6), 1010 (decimal 10), 1011 (decimal 11), and 1101 (decimal 13), that is, the coding conflicting bits are 5, 6, 10, 11, and 13, so the number of valid identifications is increased by 4 on the original value, and under this number of valid identifications, the valid identification information is queried on the basis of the previous one, plus the 4-bit values of these five cases, and the ID of the information recipient is obtained by five queries.
[0095] If the starting conflict bit is greater than the length of the pre-query code, the identity information conflicts at this time. The starting conflict bit is subtracted from the length of the pre-query code, and the remaining is the conflict information in the identity information. For example, the starting conflict bit is 18, 18-16=2, and the first 2 bits in the identity information are non-conflicting information. At this time, it can be determined that the bits that do not conflict are: the valid identification information of this query, the pre-query code, and the non-conflicting information. Therefore, the information that does not conflict is used as the new valid identification information to achieve the update of the valid identification information. In the embodiment of the present invention, taking the length of the pre-query code as 16 bits and the number of valid identifications as 4 as an example, the number of command header SOF is 1, so the preset value is equal to 16+1-4=13, and the new number of valid identifications = the number of valid identifications in this query + the starting conflict bit - the preset value (that is, the new number of valid identifications = the number of valid identifications in this query + the starting conflict bit - 16-1+4).
[0096] Exemplarily, an embodiment of the present invention provides a method for an information sender to query an information receiver:
[0097] There are 5 information receivers, and their ID values are 10001111, 01010010, 01011100, 10001100, and 00101100.
[0098] The usual binary tree query method:
[0099] (1) The highest bit is 0, and the conflicting bit is the second bit;
[0100] (2) The highest two digits are 00, and the ID value of the information recipient is 00101100;
[0101] (3) The highest two bits are 01, and the conflicting bit is the fifth bit;
[0102] (4) The highest 5 digits are 01010, and the ID value of the information receiver is 01010010;
[0103] (5) The highest 5 digits are 01011, and the ID value of the information receiver is 01011100;
[0104] (6) The highest bit is 1, and the conflicting bit is at bit 7;
[0105] (7) The first 7 digits are 1000110, and the ID value of the information recipient is 10001100;
[0106] (8) The first 7 digits are 1000111, and the ID value of the information recipient is 10001111.
[0107] The number of queries required by the information sender to query the information receiver in the information anti-collision method in radio frequency identification provided by the embodiment of the present invention is:
[0108] (1) Assume that the number of valid identifications is 0, perform the first query, and determine that the first 4 bits have three possible values: 2, 5, and 8;
[0109] (2) Assume that the number of valid identifications is 4 and the valid identification information is 00100000, and the ID value of the information receiver is 00101100;
[0110] (3) Assume that the number of valid identifications is 4 and the valid identification information is 01010000. The query results show that the information receiver conflicts, but also the pre-query code is 2 and 12. Since there are only 8 bits in total, it can be determined that the IDs of the two information receivers are 01010010 and 01011100 respectively.
[0111] (4) Assuming the number of valid identifications is 4 and the valid identification information is 10000000, a conflict in the information receiver is obtained. However, two pre-query codes, 12 and 15, are also obtained. Since there are only 8 bits in total, it can be determined that the IDs of the two information receivers are 10001100 and 10001111 respectively.
[0112] The information anti-collision method in radio frequency identification provided by the embodiment of the present invention can remove all empty queries, and each query can obtain data, thereby reducing conflict queries that cannot obtain identity identifiers. In the existing multi-tree query, the more forks there are, the faster the query can be for a large number of information receivers, but for a small number of information receivers, there are many query gaps, so many queries use dynamic queries, that is, when the number of information receivers is large at the beginning, the more forks there are, and as more and more information receivers are identified, the number of multi-tree forks is reduced until the binary tree and the last information receiver are identified, but this method cannot avoid all empty time slots. The embodiment of the present invention can avoid all idle queries because it performs pre-query by pre-query encoding in the form of a one-hot code.
[0113] In the above exemplary description, since the ID length of the information receiver is only 8 bits, after setting the valid identification number to 4, according to the conflicts of the first 4 bits being 2, 5 and 8, respectively set as valid identification information for query, the ID of the information receiver can be determined. If the information receiver is 16 bits, there is still a conflict after querying 4 bits, increase the valid identification number and valid identification information, form a new query command to continue querying, until there is no conflict or only 4 bits of data are left after the pre-query code. For example, the information receiver is 16 bits, the valid identification number is 4, and the valid identification information is 01010000 for querying, and the information receiver conflicts, but also obtains two values of the pre-query code of 2 and 12, so the query command is updated to continue querying: the valid identification number is 8, and the valid identification information is 010100000100000.
[0114] Embodiment 4
[0115] Figure 5 This is a schematic diagram of the structure of an information anti-collision system in radio frequency identification provided by a fourth embodiment of the present invention. The system includes: an information receiver 51 and an information sender 52.
[0116] The information receiving side 51 includes: a command receiving module and a determining module;
[0117] A command receiving module, used for receiving a query command sent by an information sender;
[0118] A determination module, used to determine the pre-query code and the identity identification information according to the number of valid identifications and the valid identification information included in the query command, and send the pre-query code and the identity identification information to the information sender, so as to achieve anti-collision of the identity identification information through the pre-query code;
[0119] Among them, the pre-query encoding is a one-hot encoding;
[0120] The information sender includes: a sending module and an information receiving module;
[0121] A sending module, used to generate a query command according to a preset query command format, and send it to each information receiving party, so that each information receiving party determines the pre-query code and identity identification information according to the query command;
[0122] The information receiving module is used to receive the pre-query code and identity identification information fed back by each information receiving party, so as to realize anti-collision of the pre-query code and identity identification information fed back by the information receiving party through the query command.
[0123] The embodiment of the present invention provides an information anti-collision system in radio frequency identification, which solves the problem that when the information sender in radio frequency identification queries the identity information of the information receiver, the query time is long and the system query efficiency is low due to the large number of queries when the number of information receivers is large or the length is long. The information receiver determines the pre-query code and identity identification information through the number of valid identifications and the valid identification information, and sends them to the information sender. The pre-query code is a one-hot code, so when it is determined that there is no collision information based on the pre-query code and the identity identification information, it is not necessary to convert all the identity identifiers of the information receivers into one-hot codes, so that the effect of distinguishing each information receiver can be achieved, which reduces the query time and improves the query efficiency.
[0124] Further, the determination module includes:
[0125] An acquisition unit, used to acquire the identity identifier and determine valid bit information corresponding to the number of valid identifications in the identity identifier;
[0126] A code determination unit, configured to determine, if the valid identification information is equal to the valid bit information, a one-hot code corresponding to a preset number of bit data after the valid identification number in the identity identifier as a pre-query code;
[0127] The information determination unit is used to determine the remaining data in the identity identifier after removing the valid identification information and the pre-query code as the identity identification information.
[0128] Furthermore, when the identity identification information is not a whole byte, the identity identification information is padded with zeros at the lower bits to form a whole byte of identity identification information.
[0129] Furthermore, the information sender 52 also includes:
[0130] A conflict position determination module, used to determine a starting conflict position according to each pre-query code and identity identification information;
[0131] The updating module is used to update the query command according to the starting conflict bit so as to send a new query command to the information receiver until all the identity identification information is obtained.
[0132] Furthermore, the update module includes:
[0133] A first updating unit, configured to determine each code conflict bit according to each pre-query code if the starting conflict bit is less than or equal to the length of the pre-query code, and to update the valid identification information in the query command according to each code conflict bit and to update the number of valid identifications in the query command according to a preset number;
[0134] The second updating unit is used to determine the non-conflicting information in the identity information according to the starting conflict bit if the starting conflict bit is greater than the length of the pre-query code, update the valid identification information in the query command according to the valid identification information, the pre-query code and the non-conflicting information, and update the number of valid identifications in the query command according to the difference between the starting conflict bit and the preset value.
[0135] Furthermore, the first updating unit is specifically used to: determine each bit whose bit data in the pre-query code is 1; and determine the decimal number corresponding to each bit as each coding conflict bit.
[0136] The information anti-collision system in radio frequency identification provided by the embodiment of the present invention can execute the information anti-collision method in radio frequency identification provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0137] Embodiment 5
[0138] Figure 6 A schematic diagram of a device provided in Embodiment 5 of the present invention is shown in FIG. Figure 6 As shown, the device includes a processor 60, a memory 61, an input device 62 and an output device 63; the number of processors 60 in the device can be one or more. Figure 6 A processor 60 is taken as an example; the processor 60, the memory 61, the input device 62 and the output device 63 in the device can be connected by a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0139] The memory 61 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the information anti-collision method in radio frequency identification in the embodiment of the present invention. The processor 60 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 61, that is, implementing the above-mentioned information anti-collision method in radio frequency identification.
[0140] The memory 61 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 61 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 61 may further include a memory remotely arranged relative to the processor 60, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0141] The input device 62 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 63 may include a display device such as a display screen.
[0142] Embodiment 6
[0143] Embodiment 6 of the present invention further provides a storage medium containing computer executable instructions, which, when executed by a computer processor, is used to execute the information anti-collision method in radio frequency identification provided by Embodiment 1 of the present invention or Embodiment 2 of the present invention.
[0144] Of course, the computer executable instructions of a storage medium containing computer executable instructions provided in an embodiment of the present invention are not limited to the method operations described above, and can also execute related operations in the information anti-collision method in radio frequency identification provided in any embodiment of the present invention.
[0145] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0146] It is worth noting that in the above-mentioned embodiment of the information anti-collision system in radio frequency identification, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0147] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for preventing information collision in radio frequency identification, It is characterized in that The method is applied to the information receiving party, and includes: Receive the query command sent by the information sender; Determine a pre-query code and identity information according to the number of valid identifications and valid identification information included in the query command, and send the pre-query code and identity information to the information sender, so as to achieve anti-collision of the identity information through the pre-query code; Among them, the pre-query code is a one-hot code; the valid identification number is a numerical value pre-set according to the length of the identity identifier of the information recipient; the valid identification information is a pre-set binary number, and part of the data in the identity identifier is determined as the pre-query code according to the valid identification number, and the data in the identity identifier minus the pre-query code and the valid identification information is used as the identity identification information.
2. The method according to claim 1, It is characterized in that The determining of the pre-query code and the identity identification information according to the valid identification number and the valid identification information included in the query command includes: Obtaining an identity identifier, and determining valid bit information corresponding to the valid identification number in the identity identifier; If the valid identification information is equal to the valid bit information, the one-hot code corresponding to the preset number of bit data after the valid identification number in the identity identifier is determined as the pre-query code; The remaining data of the identity identifier after removing the valid identification information and the pre-query code is determined as the identity identification information.
3. The method according to claim 1 or 2, It is characterized in that When the identity identification information is not an integer byte, the identity identification information is padded with zeros to form an integer byte of identity identification information.
4. A method for preventing information collision in radio frequency identification, It is characterized in that The method is applied to the information sender, and includes: Generate a query command according to a preset query command format, and send it to each information receiving party, so that each information receiving party determines the pre-query code and identity identification information according to the query command; Receiving the pre-query code and identity identification information fed back by each of the information receiving parties, so as to achieve anti-collision of the pre-query code and identity identification information fed back by the information receiving parties through the query command; The method further comprises: Determine the starting conflict position according to each of the pre-query codes and the identity identification information; wherein the starting conflict position is the first position where data conflict occurs in the direction from low to high; updating the query command according to the starting conflict bit so as to send a new query command to the information receiver until all identity identification information is obtained; The updating of the query command according to the starting conflict bit comprises: If the starting conflict bit is less than or equal to the length of the pre-query code, determine each code conflict bit according to each pre-query code, and update the valid identification information in the query command according to each code conflict bit and update the number of valid identifications in the query command according to a preset number; If the starting conflict bit is greater than the length of the pre-query code, the non-conflicting information in the identity identification information is determined according to the starting conflict bit, the valid identification information in the query command is updated according to the valid identification information, the pre-query code and the non-conflicting information, and the number of valid identifications in the query command is updated according to the difference between the starting conflict bit and a preset value.
5. The method according to claim 4, It is characterized in that The determining of each coding conflict bit according to the pre-query coding comprises: Determine each bit whose bit data in the pre-query code is 1; The values corresponding to the bits are determined as the coding conflict bits. 6.An information anti-collision transmission system in radio frequency identification, It is characterized in that include: The recipient and sender of the information; The information receiving party includes: a command receiving module and a determining module; The command receiving module is used to receive the query command sent by the information sender; The determining module is used to determine the pre-query code and the identity identification information according to the valid identification number and the valid identification information included in the query command, and send the pre-query code and the identity identification information to the information sender, so as to achieve anti-collision of the identity identification information through the pre-query code; Wherein, the pre-query code is a one-hot code; the effective identification number is a value preset according to the length of the identity identifier of the information receiver; the effective identification information is a preset binary number, and part of the data in the identity identifier is determined as the pre-query code according to the effective identification number, and the data in the identity identifier minus the pre-query code and the effective identification information is used as the identity identification information; The information sender comprises: a sending module and an information receiving module; The sending module is used to generate a query command according to a preset query command format and send it to each information receiving party, so that each information receiving party determines the pre-query code and identity identification information according to the query command; The information receiving module is used to receive the pre-query code and identity identification information fed back by each of the information receiving parties, so as to achieve anti-collision of the pre-query code and identity identification information fed back by the information receiving parties through the query command; The information sender also includes: A conflict bit determination module is used to determine a starting conflict bit according to each pre-query code and identity identification information; wherein the starting conflict bit is the first position where a data conflict occurs in the direction from the low bit to the high bit; An updating module, used for updating the query command according to the starting conflict bit, so as to send a new query command to the information receiver until all the identity identification information is obtained; The update module includes: A first updating unit, configured to determine each code conflict bit according to each pre-query code if the starting conflict bit is less than or equal to the length of the pre-query code, and to update the valid identification information in the query command according to each code conflict bit and to update the number of valid identifications in the query command according to a preset number; A second updating unit is used to determine the non-conflicting information in the identity identification information according to the starting conflict bit if the starting conflict bit is greater than the length of the pre-query code, update the valid identification information in the query command according to the valid identification information, the pre-query code and the non-conflicting information, and update the number of valid identifications in the query command according to the difference between the starting conflict bit and a preset value.
7. A device, It is characterized in that The device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the information anti-collision method in radio frequency identification as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, an information anti-collision method in radio frequency identification as described in any one of claims 1 to 5 is implemented.
