Rapid tag acquisition method and system based on RFID
By using the randomness on RFID tags to generate filtered strings, combined with Bloom filters and greedy algorithms, we quickly filter out the target tags in the RFID system, solving the problems of delay and resource consumption in the tag selection process, and achieving efficient and fast tag collection.
Patent Information
- Application Number
- CN202510231444.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-05-30
AI Technical Summary
In the RFID system, how to quickly and accurately filter out the required tags in a huge collection of tags, while effectively eliminating unrelated tags has become the core challenge in achieving the efficient operation of RFID systems.
By utilizing the inherent randomness of the unique identification code on the RFID tag, the first filter string is generated, combined with the Bloom filter and the greedy algorithm, the optimal subset composed of the second filter string is quickly determined, thereby effectively distinguishing between target tags and non-target tags without writing to user memory.
This method greatly reduces the data transmission delay, reduces the number of sampling instructions required to select all target tags, improves tag sampling efficiency and system response speed, and is suitable for read-only tag systems.
Smart Images

Figure CN120068911A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of radio frequency identification, and particularly relates to a fast tag acquisition method and system based on RFID. Background Art
[0002] RFID technology has been widely used in various applications. Its advantage of being able to read multiple tags simultaneously significantly improves the operation efficiency, especially in fields such as inventory management, logistics tracking, and access control. However, in these applications, the tag selection problem is particularly crucial. Specifically, how to quickly and accurately screen out the required tags from a large tag set while effectively excluding irrelevant tags is one of the core challenges for the efficient operation of the RFID system. Precise tag selection can not only reduce redundant data in the system but also improve the data processing speed and accuracy, thereby further optimizing the overall application effect. Therefore, researching efficient tag selection methods is of great significance for improving the performance of the RFID system.
[0003] Currently, mainstream tag selection methods usually rely on writing additional bit vectors into the user memory of the tag to identify and screen target tags. However, this method has high requirements for hardware resources and is difficult to apply in RFID systems with read-only tags because the RFID systems with read-only tags do not have enough storage space to store relevant data. In addition, transmitting the pre-written long bit vector to the tag will cause a large delay in the tag selection process, thus affecting the response speed and overall efficiency of the system.
[0004] Therefore, how to efficiently optimize the tag selection process and reduce data transmission delay without relying on the user memory is a major challenge currently faced in the field of RFID technology. Summary of the Invention
[0005] The object of the present invention is to provide a fast tag acquisition method and system based on RFID. First, a first filtering string is generated using the inherent randomness of the unique identification code on the tag, and the Bloom filter is used to efficiently evaluate the practicality of the first filtering string to determine the second filtering string, effectively distinguishing target tags and non-target tags without writing operations. Secondly, the counting Bloom filter and the greedy algorithm are used to quickly determine the optimal subset composed of the second filtering string, thereby minimizing the number of sampling instructions required to select all target tags.
[0006] To achieve the above object, the present invention proposes the following technical solutions:
[0007] In a first aspect, a fast tag acquisition method based on RFID is proposed, including:
[0008] Randomly establish a target tag set and a non-target tag set according to the total tag set of the RFID tag system; wherein, the number of target tags in the target tag set is less than the number of non-target tags in the non-target tag set;
[0009] Collect the identifiers of each RFID tag in the target tag set and the non-target tag set respectively, and generate the EPC data files of the corresponding sets;
[0010] For each identifier in the EPC data file, calculate the randomness of the identifier in sequence, and generate the first filtering string corresponding to each RFID tag according to the randomness;
[0011] Based on the Bloom filter, search for a number of first filtering strings corresponding to the target tag set and a number of first filtering strings corresponding to the non-target tag set, and screen and establish a filtering string set composed of a number of second filtering strings; wherein, the second filtering string is the first filtering string that can be used to screen out only the target tags from the RFID tag system;
[0012] Based on the counting Bloom filter, apply the greedy algorithm to determine an approximate optimal subset from the filtering string set, and the approximate optimal subset is composed of the least number of second filtering strings used to screen out all target tags from the target tag set;
[0013] Send a sampling instruction to the RFID tag system according to the optimal subset, and then perform tag sampling according to the tag matching result.
[0014] Further, the process of calculating the randomness of each identifier in the EPC data file in sequence and generating the first filtering string corresponding to each RFID tag according to the randomness includes:
[0015] Read any identifier in the EPC data file, divide the identifier into several data groups according to the preset bits; for each data group of the identifier, calculate the empirical entropy of each data group;
[0016] For any identifier, judge whether the empirical entropy of several data groups within the preset range is greater than the preset threshold, and when the empirical entropy of several data groups corresponding to the identifier is greater than the preset threshold, determine that the identifier meets the randomness requirement, and use the data content of several data groups corresponding to the identifier as the first filtering string; otherwise, use the data content of all data groups of the identifier as the first filtering string.
[0017] Further, the process of screening and establishing a filtering string set composed of a number of second filtering strings includes:
[0018] Build a Bloom filter, initialize the Bloom filter, and set all bit positions to 0;
[0019] For a number of first filtering strings corresponding to a non-target tag set, insert them one-to-one into the corresponding Bloom filter to obtain a target Bloom filter;
[0020] For each first filtering string corresponding to the target tag set, evaluate it using the target Bloom filter respectively. When the first filtering string does not exist in the target Bloom filter, select the first filtering string as the second filtering string and establish a filtering string set.
[0021] Further, the process of determining an approximate optimal subset from the filtering string set based on a counting Bloom filter using a greedy algorithm includes:
[0022] Based on the counting Bloom filter, count the number of target tags in the target tag set that any of the second filtering strings in the filtering string set can screen;
[0023] Apply the greedy algorithm to select a second filtering string with the largest number of screened target tags in the filtering string set to construct a sampling instruction, and perform target tag selection and elimination in the target tag set;
[0024] Judge whether the target tag set after eliminating some target tags is an empty set. When the target tag set after eliminating some target tags is an empty set, construct an optimal subset composed of several screened second filtering strings; otherwise, apply the greedy algorithm, select a second filtering string with the largest number of screened target tags in the filtering string set for the target tag set after eliminating some target tags to construct a secondary sampling instruction, and perform target tag selection and elimination in the target tag set after eliminating some target tags until the target tag set is an empty set.
[0025] Further, the sampling instruction sent to the RFID tag system according to the optimal subset is:
[0026] SELECT{Membank = 1, Pointer = i, Length = j - i + 1, Mask = t[i, j]};
[0027] Among them, Membank = 1 indicates selecting the identifier EPC, Pointer indicates the starting position of the second filtering string, Length indicates the length of the second filtering string, t[i, j] indicates the second filtering string for screening target tags, and Mask indicates the data content of the second filtering string.
[0028] Further, after generating the first filtering strings corresponding to each RFID tag according to the randomness, it also includes:
[0029] Perform length screening on a number of first filtering strings corresponding to the target tag set and a number of first filtering strings corresponding to the non-target tag set, and retain a number of first filtering strings within a set length range.
[0030] In a second aspect, a fast tag acquisition system based on RFID is proposed, including:
[0031] A first establishment module for randomly establishing a target tag set and a non-target tag set according to the total tag set of the RFID tag system; wherein, the number of target tags in the target tag set is less than the number of non-target tags in the non-target tag set;
[0032] An acquisition and generation module for respectively acquiring the identifiers of each RFID tag in the target tag set and the non-target tag set, and generating EPC data files for the corresponding sets;
[0033] A calculation and generation module for sequentially calculating the randomness of each identifier in the EPC data file, and generating a first filtering string corresponding to each RFID tag according to the randomness;
[0034] A second establishment module for searching for a number of first filtering strings corresponding to the target tag set and a number of first filtering strings corresponding to the non-target tag set based on a Bloom filter, screening and establishing a filter string set composed of a number of second filtering strings; wherein, the second filtering string is a first filtering string that can be used to only screen out target tags from the RFID tag system;
[0035] A filtering determination module for determining an approximate optimal subset from the filter string set based on a counting Bloom filter, and applying a greedy algorithm, where the approximate optimal subset is composed of the least number of second filtering strings used to screen out all target tags from the target tag set;
[0036] A sending and sampling module for sending a sampling instruction to the RFID tag system according to the optimal subset, and then performing tag sampling according to the tag matching result.
[0037] Furthermore, the process in which the calculation and generation module generates a first filtering string corresponding to each RFID tag according to the randomness includes the following execution units:
[0038] A reading unit for reading any identifier in the EPC data file and dividing the identifier into a number of data groups according to a preset number of bits;
[0039] A calculation unit for respectively calculating the empirical entropy of each data group of the identifier;
[0040] A judgment unit is configured to judge, for any identifier, whether the empirical entropy of the identifier in a plurality of data groups within a preset range is greater than a preset threshold. When the empirical entropy of the identifier corresponding to the plurality of data groups is greater than the preset threshold, it is determined that the identifier meets the randomness requirement, and the data content of the plurality of data groups corresponding to the identifier is used as the first filtering string; otherwise, the data content of all data groups of the identifier is used as the first filtering string.
[0041] In a third aspect, an electronic device is proposed, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device implements the above-mentioned RFID-based fast tag acquisition method.
[0042] In a fourth aspect, a computer-readable storage medium is proposed. The computer-readable storage medium is used to store a computer program. When the computer program runs on a computer, the computer executes the above-mentioned RFID-based fast tag acquisition method.
[0043] As can be seen from the above technical solutions, the technical solutions of the present invention have obtained the following beneficial effects:
[0044] The RFID-based fast tag acquisition method and system disclosed by the present invention. The method includes: randomly establishing a target tag set and a non-target tag set according to the total tag set of the RFID tag system; collecting the identifiers of each RFID tag to generate an EPC data file for the corresponding set; calculating the randomness of each identifier in sequence, and generating a first filtering string for each corresponding tag according to the randomness; searching for the first filtering string based on a Bloom filter, screening and establishing a filtering string set composed of a plurality of second filtering strings, where the second filtering string is a first filtering string that can only screen out target tags; based on a counting Bloom filter, applying a greedy algorithm to determine an approximate optimal subset from the filtering string set, and the approximate optimal subset is composed of the minimum number of second filtering strings used to screen out all target tags from the target tag set; sending a sampling instruction according to the optimal subset for tag sampling. The fast tag acquisition method of the present invention not only optimizes the communication consumption and running time of tag acquisition, uses the necessary and unique identifier EPC on the RFID tag for tag sampling, avoids writing an additional bit vector to the user memory of the RFID tag, is applicable to read-only tags, can efficiently separate target tags from the tag population, avoids writing bit vectors to tags, and greatly reduces the calculation overhead and time overhead, and has a wider application scenario.
[0045] In addition, when the fast tag acquisition method and system of the present invention are applied, the reader reduces the number of SELECT commands while not needing to send WRITE commands, thereby reducing the execution time of selecting tags, greatly reducing the computational cost and time cost of tag sampling for the RFID tag system, and greatly improving the sampling speed and sampling efficiency.
[0046] It should be understood that all combinations of the foregoing concepts and additional concepts described in more detail below can be regarded as part of the inventive subject matter of the present disclosure as long as such concepts do not contradict each other.
[0047] The foregoing and other aspects, embodiments, and features of the teachings of the present invention can be more fully understood from the following description in conjunction with the accompanying drawings. Other additional aspects of the present invention, such as the features and / or beneficial effects of exemplary embodiments, will be apparent from the following description, or will be learned through the practice of specific embodiments according to the teachings of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings are not drawn to scale with respect to actual reference objects. In the drawings, each identical or nearly identical component shown in each figure may be denoted by the same reference numeral. For clarity, not every component is labeled in each figure. Now, embodiments of various aspects of the present invention will be described by way of example and with reference to the drawings, wherein:
[0049] Figure 1 is a schematic flowchart of a fast tag acquisition method based on RFID disclosed in an embodiment of the present invention;
[0050] Figure 2 is a schematic flowchart of generating a first filtering string according to randomness disclosed in an embodiment of the present invention;
[0051] Figure 3 is a schematic flowchart of screening and establishing a filtering string set disclosed in an embodiment of the present invention;
[0052] Figure 4 is a schematic flowchart of applying a greedy algorithm to determine an approximate optimal subset disclosed in an embodiment of the present invention;
[0053] Figure 5 is a schematic diagram of calculating the randomness of the identifier EPC disclosed in an embodiment of the present invention;
[0054] Figure 6 is a schematic diagram of a fast tag acquisition system framework based on RFID disclosed in an embodiment of the present invention;
[0055] Figure 7 is a schematic diagram of an electronic device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the described embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present invention. Unless otherwise defined, the technical terms or scientific terms used herein shall have the ordinary meanings understood by those of ordinary skill in the art to which the present invention pertains.
[0057] The terms "first", "second", and similar terms used in the description and claims of this patent application for the present invention do not denote any order, quantity, or importance, but are only used to distinguish different components. Similarly, unless the context clearly indicates otherwise, singular forms such as "a", "an", or "the" do not denote a limitation on quantity, but rather indicate the presence of at least one. Terms such as "comprising" or "including" are intended to mean that the elements or items appearing before "comprising" or "including" cover the features, wholes, steps, operations, elements, and / or components listed after "comprising" or "including", and do not exclude the existence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0058] Based on the fact that current mainstream tag selection methods usually rely on writing additional bit vectors into the user memory of tags to identify and filter target tags, which not only causes a large delay in the tag selection process, but also has high requirements for hardware resources and is difficult to apply in RFID systems with read-only tags, resulting in low overall efficiency. Therefore, the present invention aims to propose a fast tag acquisition method and system based on RFID, which uses the inherent randomness of the identifier EPC to generate a filtering string, and obtains an optimal subset that effectively separates target tags from the RFID tag system through a Bloom filter and a greedy algorithm. The method is used for quickly acquiring read-only tags, not only avoiding writing bit vectors to tags, but also greatly reducing the computational cost and time cost of tag sampling, and improving the sampling speed and efficiency.
[0059] The following further specifically introduces a fast sampling RFID tag method disclosed in the present invention with reference to specific embodiments.
[0060] Combined Figure 1 As shown, the fast tag acquisition method based on RFID disclosed in the embodiment includes the following steps:
[0061] Step S102: Randomly establish a target tag set and a non-target tag set according to the total tag set of the RFID tag system; wherein, the number of target tags in the target tag set is less than the number of non-target tags in the non-target tag set.
[0062] The RFID tag system includes a number of RFID tags, an RFID reader, and a backend server. The backend server is connected to the RFID reader through Ethernet, and the backend server is composed of a computer. Before the system works, first place the RFID tags to be selected on the desktop or the surface of an object, ensure that the position of the RFID tags is flat, without wrinkles or obstacles, to ensure stable signal reading. Then, adjust the orientation of the RFID tags according to actual needs so that their antennas are aligned with the antenna of the RFID reader, thereby obtaining the best communication effect. The RFID reader communicates with the RFID tags by transmitting radio frequency signals through the antenna. The backend server controls the RFID reader through a preset program, periodically transmits radio frequency signals and receives the response data returned by the RFID tags. Through the programming interface, the backend server collects the identifier (EPC) of each RFID tag in real time, and the identifier (EPC) is unique to each RFID tag. For the RFID tag system, all RFID tags form the total tag set. Then, according to user requirements or advanced applications, determine which tags are needed and which are not needed, and form the target tag set with the needed tags and the non-target tag set with the unneeded tags. The number of target tags in the target tag set is less than the number of non-target tags in the non-target tag set because the RFID tag system can set the selected tags as A and the unselected tags as B, and then randomly select tag A or tag B when counting information. That is, when the number of target tags is more than the number of non-target tags, non-target tag B can be selected, and target tag A is counted when counting information. At the same time, when the number of target tags is more than the number of non-target tags, the task calculation amount and time overhead of selecting non-target tags are lower.
[0063] In this embodiment, the required target tag set is denoted as S and contains a total of n target tags, and the unrequired non-target tag set is denoted as P and contains a total of m non-target tags.
[0064] Step S104: Collect the identifiers of each RFID tag in the target tag set and the non-target tag set respectively, and generate the EPC data file corresponding to the set; the EPC data file usually stores the identifiers of multiple RFID tags in text or binary form, and each identifier is 96 bits.
[0065] Step S106: For each identifier in the EPC data file, calculate the randomness of the identifier in sequence, and generate a first filtering string corresponding to each RFID tag according to the randomness. According to the application of the identifier EPC in the prior art, theoretically, there may be random bits in the distribution of the identifier EPC. The technical solution of the present invention aims to apply this randomness for tag screening. The process of verifying the randomness of the identifier EPC and generating the first filtering string according to the randomness is as follows:
[0066] Combined with Figure 2 As shown, the process of generating a first filtering string corresponding to each RFID tag according to the randomness includes: Step S1061: Read any identifier in the EPC data file, and divide the identifier into several data groups according to a preset bit. In the embodiment, each identifier EPC is divided into 16 groups by 4 bits per group. This grouping method can effectively disassemble the tag data into smaller units, which is beneficial to subsequent analysis. Step S1062: For each data group of the identifier, calculate the empirical entropy of each data group. The calculation formula of the empirical entropy H(D) is as follows:
[0067]
[0068] where H is the empirical entropy function, D represents the calculated data group, K is the number of all combinations of the binary string that appear, and p j represents the probability that the jth type of binary string appears in the data group;
[0069] Step S1063: For any identifier, determine whether the empirical entropy of several data groups within a preset range is greater than a preset threshold. When the empirical entropy of several data groups corresponding to the identifier is greater than the preset threshold, it is determined that the identifier meets the randomness requirement, and the data content of several data groups corresponding to the identifier is used as the first filtering string; otherwise, the data content of all data groups of the identifier is used as the first filtering string.
[0070] In this embodiment, the preset range is the last 4 data groups that make up the identifier, that is, the 21st, 22nd, 23rd, and 24th groups, and the preset threshold of the empirical entropy is 3.9; as Figure 5As shown, when the empirical entropy values of the last 4 data groups are all greater than 3.9, it indicates that the entire identifier meets the randomness requirement. The identifier shows a random distribution statistically and subsequent data processing and analysis can be continued to ensure the reliability and accuracy of the data. When the empirical entropy value does not exceed the threshold, it means that the identifier may contain certain regularities or patterns and does not meet the expected randomness requirement. Then, for the identifier that meets the randomness requirement, in the embodiment, the data content of the last 4 data groups is used as the first filtering string, that is, the content of the last 16 bits. For the identifier that does not meet the randomness requirement, in this embodiment, the data content of all data groups of the identifier is directly used as the first filtering string, that is, the content of all 96 bits of the identifier.
[0071] Step S108: Based on the Bloom filter, search for a number of first filtering strings corresponding to the target tag set and a number of first filtering strings corresponding to the non-target tag set, and screen and establish a filter string set composed of a number of second filtering strings. Among them, the second filtering string is a first filtering string that can be used to screen out only the target tags from the RFID tag system.
[0072] Step S106 screens out a lot of first filtering strings. A first filtering string can query at least one RFID tag from the RFID tag system, but this RFID tag is not necessarily the target tag. Therefore, it is necessary to select the part of the strings that can only be used to screen the target tags from the generated number of first filtering strings, that is, to screen out the effective filtering strings. Step S108 uses the Bloom filter to match and evaluate the first filtering strings to determine whether each first filtering string meets the standard of the effective filtering string. The effective filtering strings are all selected from a number of first filtering strings corresponding to the target tag set.
[0073] Step S110: Based on the counting Bloom filter, use the greedy algorithm to determine an approximate optimal subset from the filter string set. The approximate optimal subset is composed of the minimum number of second filtering strings used to screen out all target tags from the target tag set.
[0074] The foregoing steps screen out a number of second filtering strings that can only be used to identify the target tags, but the target tags that each second filtering string can identify may be repeated. Sampling in turn with each second filtering string of the filter string set can collect all target tags of the target tag set, but there will be computational redundancy, more acquisition instructions are executed, and the overall acquisition time is long. Therefore, the purpose of step S110 is to use the counting Bloom filter in cooperation with the greedy algorithm to screen the filter string set, reduce the number of effective filtering strings that can select all target tags, and speed up the processing speed of tag sampling.
[0075] Step S112: Send a sampling instruction to the RFID tag system according to the optimal subset, and then perform tag sampling based on the tag matching result.
[0076] The fast tag acquisition method based on RFID disclosed by the present invention first generates a first filtering string by using the inherent randomness of the identifier EPC of the target tag, and then uses a Bloom filter to screen out an effective second filtering string, so as to effectively distinguish the target tag from the non-target tag without writing additional bit vector operations to the RFID tag, ensuring compatibility with various RFID systems; secondly, a counting Bloom filter is used in cooperation with a greedy algorithm to quickly identify an almost optimal subset, minimizing the number of sampling instructions required to select all target tags, reducing the computational overhead and time overhead, and improving the tag sampling efficiency.
[0077] Combined Figure 3 As shown, the process of screening and establishing a filtering string set composed of several second filtering strings in step S108 includes: Step S1081: Build a Bloom filter, initialize the Bloom filter, and set all bit positions to 0; Step S1082: Insert each of the several first filtering strings corresponding to the non-target tag set into the corresponding Bloom filter one by one to obtain a target Bloom filter; wherein, the process of inserting the first filtering string into the corresponding Bloom filter is:
[0078] BF[i,j][h w (u[i,j])]=1, w = 1, 2,..., k (2)
[0079] wherein, u[i, j] is the first filtering string corresponding to a non-target tag in the non-target tag set P, and BF[i, j] is the Bloom filter corresponding to u[i, j]; k is the number of hash functions, k = 2log 2 n, w represents the hash function serial number; i is the starting bit of u[i, j], and j is the ending bit of u[i, j]; the first filtering string u[i, j] corresponding to the non-target tag needs to confirm the insertion position in the Bloom filter by calculating k hash functions, and set the element at this position to 1;
[0080] Step S1083: Evaluate each of the first filtering strings corresponding to the target tag set by using the target Bloom filter. When the first filtering string does not exist in the target Bloom filter, select the first filtering string as the second filtering string and establish a filtering string set; the specific operation is:
[0081]
[0082] Wherein, t[i, j] is the first filtering string corresponding to a target label in the target label set S; if the result of formula (3) is 1, it is considered that the first filtering string t[i, j] corresponding to the target label exists in the Bloom filter BF[i, j].
[0083] Combined with Figure 4 As shown, based on the counting Bloom filter, the process of determining an approximately optimal subset from the filtering string set by applying the greedy algorithm includes: Step S1101, based on the counting Bloom filter, count the number of target labels in the target label set that any of the second filtering strings in the filtering string set can filter; Step S1102, apply the greedy algorithm, select a second filtering string with the largest number of filtered target labels in the filtering string set to construct a sampling instruction, and perform target label selection and elimination in the target label set; Step S1103, determine whether the target label set after eliminating some target labels is an empty set. When the target label set after eliminating some target labels is an empty set, construct an optimal subset composed of several second filtering strings that are filtered; otherwise, apply the greedy algorithm, select a second filtering string with the largest number of filtered target labels in the filtering string set for the target label set after eliminating some target labels to construct a secondary sampling instruction, and perform target label selection and elimination in the target label set after eliminating some target labels until the target label set is an empty set.
[0084] The process implemented in the above steps S1102 - S1103 is that the RFID reader issues a sampling instruction using the second filtering string that can filter the largest number of target labels, and removes the selected labels from the target label set S. This process is repeated until all target labels are successfully selected; the above process implemented by the greedy algorithm can obtain an approximately optimal subset for collecting all target labels. In addition, each iteration of the prior art to implement the above process includes a process of determining the number of times the second filtering string appears in the target label set, which requires multiple comparisons to obtain the result; in this solution, a counting Bloom filter is used in this step, similar to the Bloom filter used to filter the first filtering string. This adjustment can further reduce the number of required comparisons, thereby improving the processing efficiency.
[0085] In this application, the sampling instruction sent to the RFID tag system according to the optimal subset is:
[0086] SELECT{Membank = 1, Pointer = i, Length = j - i + 1, Mask = t[i, j]};
[0087] Among them, Membank = 1 indicates the selected identifier EPC, Pointer indicates the starting position of the second filtering string, Length indicates the length of the second filtering string, t[i, j] indicates the second filtering string for screening the target tag, and Mask indicates the data content of the second filtering string.
[0088] In this solution, the length of the first filtering string selected is 16 bits or 96 bits. However, in some cases, the length of the filtering string affects the data processing speed. Therefore, after generating the first filtering string corresponding to each RFID tag according to the randomness, this solution further includes performing a round of screening on the first filtering string using length limitation to improve the subsequent processing speed, that is: Step S107, perform length screening on several first filtering strings corresponding to the target tag set and several first filtering strings corresponding to the non-target tag set, and retain several first filtering strings within the set length range.
[0089] The Bloom filter used in the present invention is a structure based on a hash function to quickly find whether an element exists in a set. Compared with the traditional comparison that requires O(mn) comparisons to determine whether the first filtering string u[i, j] corresponding to the non-target tag and the first filtering string t[i, j] corresponding to the target tag are the same, the comparison method based on the Bloom filter used in the present invention only needs O(nlog 2 n) times to determine, which speeds up the comparison and reduces the running time of the algorithm; similarly, when using a counting Bloom filter for comparison, the running time of the algorithm is further reduced.
[0090] Based on the same inventive concept as the above method embodiment, there is also a fast tag acquisition system based on RFID in the embodiment of the present application, as Figure 6 shown as a framework schematic diagram of a fast tag acquisition system based on RFID, which consists of Figure 6It can be seen that the fast tag acquisition system includes: a first establishment module, configured to randomly establish a target tag set and a non-target tag set according to the total tag set of the RFID tag system; wherein, the number of target tags in the target tag set is less than the number of non-target tags in the non-target tag set; an acquisition generation module, configured to respectively acquire the identifiers of each RFID tag in the target tag set and the non-target tag set, and generate EPC data files for the corresponding sets; a calculation generation module, configured to sequentially calculate the randomness of each identifier in the EPC data file, and generate a first filtering string corresponding to each RFID tag according to the randomness; a second establishment module, configured to search for a plurality of first filtering strings corresponding to the target tag set and a plurality of first filtering strings corresponding to the non-target tag set based on a Bloom filter, and screen and establish a filtering string set composed of a plurality of second filtering strings; wherein, the second filtering string is a first filtering string that can be used to filter only the target tags from the RFID tag system; a filtering determination module, configured to determine an approximate optimal subset from the filtering string set based on a counting Bloom filter and applying a greedy algorithm, the approximate optimal subset being composed of the minimum number of second filtering strings used to filter all target tags from the target tag set; a sending sampling module, configured to send a sampling instruction to the RFID tag system according to the optimal subset, and then perform tag sampling according to the tag matching result.
[0091] This system is used to implement the steps of the RFID-based fast tag acquisition method disclosed in the above embodiments. Those that have been described will not be repeated here.
[0092] For example, the process in which the calculation generation module generates a first filtering string corresponding to each RFID tag according to the randomness includes the following execution units: a reading unit, configured to read any identifier in the EPC data file, and divide the identifier into a plurality of data groups according to a preset bit; a calculation unit, configured to respectively calculate the empirical entropy of each data group of the identifier; a judgment unit, configured to judge, for any identifier, whether the empirical entropy of a plurality of data groups within a preset range is greater than a preset threshold, and when the empirical entropy of the plurality of data groups corresponding to the identifier is greater than the preset threshold, determine that the identifier meets the randomness requirement, and use the data content of the plurality of data groups corresponding to the identifier as the first filtering string; otherwise, use the data content of all data groups of the identifier as the first filtering string.
[0093] For another example, the process of the second establishment module screening and establishing a filter string set composed of a plurality of second filter strings includes the following execution units: a building unit, configured to build a Bloom filter, initialize the Bloom filter, and set all bit positions to 0; an insertion unit, configured to insert one-to-one a plurality of first filter strings corresponding to a non-target tag set into the corresponding Bloom filter to obtain a target Bloom filter; an evaluation and establishment unit, configured to evaluate each first filter string corresponding to the target tag set by using the target Bloom filter respectively. When the first filter string does not exist in the target Bloom filter, select the first filter string as a second filter string and establish a filter string set.
[0094] For another example, the process of the filtering determination module determining an approximate optimal subset from the filter string set based on a counting Bloom filter and applying a greedy algorithm includes the following execution units: a statistics unit, configured to count, based on the counting Bloom filter, the number of target tags in the target tag set that any one of the second filter strings in the filter string set can screen; a screening unit, configured to apply the greedy algorithm to select, from the filter string set, a second filter string that screens the largest number of target tags to construct a sampling instruction, and perform target tag selection and elimination in the target tag set; a judgment unit, configured to judge whether the target tag set after eliminating some target tags is an empty set. When the target tag set after eliminating some target tags is an empty set, construct an optimal subset composed of the selected several second filter strings; otherwise, apply the greedy algorithm to select, from the filter string set, a second filter string that screens the largest number of target tags for the target tag set after eliminating some target tags to construct a secondary sampling instruction, and perform target tag selection and elimination in the target tag set after eliminating some target tags until the target tag set is an empty set.
[0095] Based on the same inventive concept as the above method embodiment, an electronic device is further provided in an embodiment of the present application, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device implements the RFID-based fast tag acquisition method in the above embodiment.
[0096] In one embodiment, the electronic device may be a server. In this embodiment, the structure of the electronic device may be as Figure 7 shown, including a memory 201, a communication module 203, and one or more processors 202.
[0097] A memory 201 for storing a computer program executed by a processor 202. The memory 201 may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system and programs required to run an instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0098] The memory 201 may be a volatile memory, such as a random-access memory (RAM); the memory 201 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or the memory 201 is any other medium that can be used to carry or store a desired computer program in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 201 may be a combination of the above memories.
[0099] The processor 202 may include one or more central processing units (CPUs) or be a digital processing unit, etc. The processor 202 is used to implement the above-mentioned audio data processing method when calling the computer program stored in the memory 201.
[0100] A communication module 203 is used to communicate with a terminal device and other servers.
[0101] In the embodiments of the present application, the specific connection medium between the above-mentioned memory 201, communication module 203 and processor 202 is not limited. In the embodiments of the present application Figure 7 it is described that the memory 201 and the processor 202 are connected through a bus 204, and the bus 204 is described by an arrow in Figure 7 The connection manners between other components are only for illustrative purposes and are not limited thereto. The bus 204 may be divided into an address bus, a data bus, a control bus, etc. For the convenience of description, Figure 7 only one arrow is used to describe it in
[0102] Based on the same inventive concept as the above method embodiments, an embodiment of the present invention further provides a computer-readable storage medium, which is used to store a computer program. When the computer program runs on a computer, the electronic device is enabled to implement the RFID-based fast tag acquisition method in the above embodiments. The computer-readable storage medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection with one or more wires, a portable disk, a magnetic disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0103] Based on the same inventive concept as the above method embodiments, an embodiment of the present invention further provides a computer program product, which includes a computer program. When the program product runs on an electronic device, the computer program is used to enable the electronic device to execute the steps in the fast tag acquisition method according to various exemplary embodiments of the present application described above in this specification. The program product can adopt any combination of one or more readable media. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for realizing the functions specified in Figure 1 one process or multiple processes and / or Figure 1 boxes or multiple boxes.
[0104] Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Those with ordinary knowledge in the technical field to which the present invention pertains can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to what is defined by the claims.
Claims
1. A rapid tag collection method based on RFID, characterized in that: include: According to the total tag set of the RFID tag system, a target tag set and a non-target tag set are randomly established; wherein the number of target tags in the target tag set is less than the number of non-target tags in the non-target tag set; Collect identifiers of each RFID tag in the target tag set and the non-target tag set respectively, and generate EPC data files of the corresponding sets; For each identifier in the EPC data file, the randomness of the identifier is calculated in turn, and a first filter string corresponding to each RFID tag is generated according to the randomness; Based on the Bloom filter, searching for a plurality of first filter strings corresponding to the target tag set and a plurality of first filter strings corresponding to the non-target tag set, screening and establishing a filter string set consisting of a plurality of second filter strings; wherein the second filter string is a first filter string that can be used to screen out only the target tag from the RFID tag system; Based on the counting Bloom filter, a greedy algorithm is applied to determine an approximately optimal subset from the filter string set, wherein the approximately optimal subset is composed of the minimum number of second filter strings for filtering out all target tags from the target tag set; A sampling instruction is sent to the RFID tag system according to the optimal subset, and tag sampling is then performed according to the tag matching result.
2. The RFID-based rapid tag collection method according to claim 1, characterized in that: The process of calculating the randomness of each identifier in the EPC data file in turn and generating a first filter string corresponding to each RFID tag according to the randomness includes: Read any identifier in the EPC data file and divide the identifier into several data groups according to preset bits; For each data group of the identifier, the empirical entropy of each data group is calculated respectively; For any identifier, determine whether the empirical entropy of several data groups within a preset range is greater than a preset threshold, and when the empirical entropy of several data groups corresponding to the identifier is greater than the preset threshold, determine that the identifier meets the randomness requirements, and use the data content of the several data groups corresponding to the identifier as the first filter string; otherwise, use the data content of all data groups of the identifier as the first filter string.
3. The RFID-based rapid tag collection method according to claim 1, characterized in that: The process of screening and establishing a filter string set consisting of a plurality of second filter strings includes: Build a Bloom filter, initialize the Bloom filter, and set all bits to 0; Inserting a number of first filter strings corresponding to the non-target tag set into the corresponding Bloom filter one by one to obtain the target Bloom filter; Each first filter string corresponding to the target tag set is evaluated using a target Bloom filter. When the first filter string does not exist in the target Bloom filter, the first filter string is selected as a second filter string to establish a filter string set.
4. The RFID-based rapid tag collection method according to claim 1, characterized in that: The process of determining a nearly optimal subset from the filter string set by applying a greedy algorithm based on a counting Bloom filter includes: Based on the counting Bloom filter, counting the number of target tags in the target tag set that can be filtered by any of the second filter strings in the filter string set; Applying a greedy algorithm, selecting a second filter string with the largest number of target tags in the filter string set to construct a sampling instruction, and selecting and removing target tags in the target tag set; Determine whether the target tag set after removing some target tags is an empty set. When the target tag set after removing some target tags is an empty set, construct an optimal subset consisting of several filtered second filter strings; otherwise, apply a greedy algorithm, select a second filter string with the largest number of filtered target tags in the filter string set for the target tag set after removing some target tags to construct a secondary sampling instruction, and select and remove target tags in the target tag set after removing some target tags until the target tag set is an empty set.
5. The RFID-based rapid tag collection method according to claim 1, characterized in that: The sampling instruction sent to the RFID tag system according to the optimal subset is: SELECT{Membank=1, Pointer=i, Length=j-i+1, Mask=t[i,j]}; Among them, Membank=1 indicates the selection identifier EPC, Pointer indicates the starting position of the second filter string, Length indicates the length of the second filter string, t[i, j] indicates the second filter string for filtering the target tag, and Mask indicates the data content of the second filter string.
6. The RFID-based rapid tag collection method according to claim 1, characterized in that: After generating the first filter string corresponding to each RFID tag according to the randomness, the method further includes: A number of first filter character strings corresponding to the target tag set and a number of first filter character strings corresponding to the non-target tag set are screened for length, and a number of first filter character strings within a set length range are retained.
7. A rapid tag collection system based on RFID, characterized in that: include: A first establishing module is used to randomly establish a target tag set and a non-target tag set according to the total tag set of the RFID tag system; wherein the number of target tags in the target tag set is less than the number of non-target tags in the non-target tag set; A collection and generation module, used to collect identifiers of each RFID tag in the target tag set and the non-target tag set, and generate an EPC data file of the corresponding set; A calculation and generation module, used for calculating the randomness of each identifier in the EPC data file in turn, and generating a first filter string corresponding to each RFID tag according to the randomness; A second establishment module is used to search for a plurality of first filter strings corresponding to the target tag set and a plurality of first filter strings corresponding to the non-target tag set based on a Bloom filter, and to screen and establish a filter string set consisting of a plurality of second filter strings; wherein the second filter string is a first filter string that can be used to screen out only the target tag from the RFID tag system; A filtering determination module, used for determining an approximately optimal subset from the filter string set by applying a greedy algorithm based on a counting Bloom filter, wherein the approximately optimal subset is composed of a minimum number of second filter strings for filtering out all target tags from the target tag set; The sending sampling module is used to send a sampling instruction to the RFID tag system according to the optimal subset, and then perform tag sampling according to the tag matching result.
8. The RFID-based rapid tag collection system according to claim 7, characterized in that: The process of the calculation generation module generating a first filter string corresponding to each RFID tag according to the randomness includes the following execution units: A reading unit, used for reading any identifier in the EPC data file, and dividing the identifier into a plurality of data groups according to preset bits; A calculation unit, used for respectively calculating the empirical entropy of each data group of the identifier; The judgment unit is used to judge whether the empirical entropies of several data groups within a preset range of any identifier are all greater than a preset threshold, and when the empirical entropies of several data groups corresponding to the identifier are all greater than the preset threshold, the identifier is judged to meet the randomness requirements, and the data content of the several data groups corresponding to the identifier is used as the first filter string; otherwise, the data content of all data groups of the identifier is used as the first filter string.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the electronic device implements the RFID-based rapid tag acquisition method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program. When the computer program is executed on a computer, the computer is enabled to execute the RFID-based rapid tag acquisition method according to any one of claims 1 to 6.