A Temporal and Spatial Data Redundancy Processing Algorithm for RFID Surveillance Data

The Radio Frequency Identification (RFID) data acquisition rate used for monitoring is so high that the RFID data stream contains a large amount of redundant data, which increases the system overhead. To balance the accuracy and real-time performance of monitoring, it is necessary to filter out redundant RFID data. We propose an algorithm called Time-Distance Bloom Filter (TDBF) that takes into account the read time and read distance of RFID tags, which greatly reduces data redundancy. In addition, we have proposed a measurement of the filter performance evaluation indicators. In experiments, we found that the performance score of the TDBF algorithm was 5.2, while the Time Bloom Filter (TBF) score was only 0.03, which indicates that the TDBF algorithm can achieve a lower false negative rate, lower false positive rate, and higher data compression rate. Furthermore, in a dynamic scenario, the TDBF algorithm can filter out valid data according to the actual scenario requirements.


Introduction
Radio Frequency Identification (RFID) is a wireless communication technology that has the advantages of low cost, low power consumption, and easy deployment. As one of the key technologies pertaining to the Internet of Things, RFID technology is used in many fields in our daily lives, especially in the field of access monitoring. RFID devices are deployed in places where the need exists to detect personnel flow, such as the entrance of a building or an office. An RFID tag is adhered to objects such as documents and paper files and is capable of storing the identifying information of these objects [1]. One important issue is whether the tags can be detected at the building exit, as the items the tags are attached to are often critical corporate assets or confidential government documents. For example, many documents created during meetings are highly confidential. Once these documents are taken out of the meeting room, either intentionally or unintentionally, the probability of information leakage signifi-cantly increases, a leak that can cause losses to an enterprise or even a country.
Except for tag data detection accuracy, the RFID detection system requires real-time performance to decide instantaneously whether the tag carries the risk of escaping. Because loss of items, as well as information, can occur in an instant, the ability to detect the risk of loss in advance and handle it in real time is crucial. An RFID reader collects RFID data streams on the tags, keeps them within its detection range, and sends them to the server, and, as a result, a massive amount of data is generated, although most of it is redundant and useless. These redundant data not only increase network latency but also take up valuable system storage space. If not filtered, this redundant data can even lead to server overload and failure to detect important tag information. Therefore, it is vital to research redundancy filtering technology for improving the efficiency of the RFID systems and striking a balance between the needs for realtime performance and accuracy when filtering the data.
Although there are many approaches to filtering duplicate RFID data, existing approaches cannot satisfy the demands of RFID monitoring. Three problems need to be solved. First of all, most of these algorithms do not have a clear definition of what is redundancy in a specific scenario. For example, when inventory is counted, each item only needs to be counted once. If it is counted multiple times, it will cause an inventory error. If these same items are counted multiple times, it could be considered as redundancy. For instance, a reader in a supermarket is primarily concerned with the items on the target shelf, but the reader's wide detection range allows additional data to be read. We can also count these useless data as redundant data. Second, many of these approaches focus on redundant filtering in a single dimension, such as temporal or spatial, rather than combining several dimensions to achieve better filtration efficiency. Finally, the typical RFID system is more concerned with the collection of static data, which is more stable and easier to filter, than dynamic data, while, in reality, many tags are not static.
In this paper, we propose an innovative algorithm for the removal of redundant RFID data. The contributions of this paper are as follows: (a) propose an algorithm called Time-Distance Bloom Filter (TDBF) to eliminate redundant RFID data in multiple dimensions, (b) propose a novel filter efficiency measurement formula for RFID data, (c) perform experimental analysis of the proposed algorithm and its performance in static and dynamic scenarios, and (d) strike a balance between the need for real-time performance and accuracy when filtering the data in a monitoring scenario. The experiment's results show that our proposed approach demonstrates superior performance compared to the other baseline approaches.
The rest of the paper is organized as follows. In Section 2, we discuss background information, including the basic structure of the RFID system and the characteristics of RFID data streams. The related work is described in detail in Section 3. In Section 4, an RFID redundant data filter algorithm is proposed that takes into account time and space information simultaneously. In addition, we propose a new formula to measure the quality of filtration. Section 5 describes the experiments, whose results prove that the proposed approach significantly outperforms other existing approaches. Our conclusions and planned future research are presented in Section 6.

Background
2.1. System Model. A typical RFID system consists of three parts: an RFID tag, which is attached to the object to be identified and can be read from up to several feet away and does not need to be within the direct line of sight of the reader; a reader, which is responsible for generating interactive information with the tag, such as reading data from the tag or modifying tag information (communications between the reader and tags adhere to the EPC Class 1 Gen 2 RFID standard [2]); and software, such as the middleware that collects and processes the readings from readers and transforms raw data into meaningful information for the application [3].
RFID tags are generally categorized into four RFID frequency bands [4]: low frequency (LF): 125-134 kHz, high frequency (HF): 13.56 MHz, ultrahigh frequency (UHF): 433-956 MHz, and microwave frequency (MF): 2.45 GHz. In this paper, we focus on the UHF tags, as they are widely used in large quantities in many applications, such as supply chain management.
RFID readers obtain data by querying tags and forward the resulting information through the middleware to the back end applications or database servers. The middleware filters, aggregates, and transforms raw data (while also allowing heterogeneous devices to collaborate) and coordinates reader activities. The applications receive these filtered data and then decide to respond to these events and orchestrate corresponding actions such as sending theft alerts, raising alarms regarding harmful operations, or replacing fragile components before they fail [4].

RFID Data Characteristics.
It is vital to understand the characteristics of RFID data, as our work is based on RFID data streams. Unlike traditional data streams, RFID data streams have the following characteristics [5,6].
2.2.1. Simplicity. Most RFID devices in the UHF frequency band follow international standards [2] and have an embedded system to handle some complicated applications such as access control, networking, and formatting data. The RFID devices are capable of providing the ID of tags, capturing the time and antenna number of the captured tags, and providing the received signal strength (RSS), and signal phase of tags, as well as other tag-related information. All captured information is transmitted to back end with a formatted structure. For example, the RFID data are often formatted as <tag_id, location, time>, where tag_id means the unique code of the tag, location means the IP or number of the RFID reader that captured the tag, and time means the time of the capture. RFID data is better organized and formatted than other radio signals and can be received and stored in a predesigned database or data structures.

Massive
Amounts of Data. RFID devices for article surveillance generally capture data in a high frequency for the sake of loss protection. However, frequent capturing will lead to redundant data to some degree. The cost of communications between tags and readers is quite low. And readers continuously read tag information and lead to a large amount of RFID data.

Redundant Data.
Although a large amount of data is collected by the reader, most of these data are replicate or redundant. There are three reasons for the redundancy of RFID data: the crossreading and writing areas exist between multiple adjacent readers, so that the same tag is read repeatedly; the same tag stays in the range of a fixed reader for a long time and is read many times, resulting in a large amount of duplicate or invalid data; and multiple tags are attached to the same item to improve detection accuracy [7].

Real Time.
When the reader acquires the RFID tag information, the data stream flows into the reader 2 Wireless Communications and Mobile Computing continuously. The interaction between the tag and the reader occurs at a very short interval, so the data is generated in real time and needs real-time processing.
2.2.5. Relevance. RFID data generally does not exist independently but is interrelated. RFID data has a space-time feature, meaning that the timestamp of the same tag reflects its timing relationship and the recorded position, and state reflects the spatial change process of the tag. The spacetime association also reflects the related events of the object as identified by the tag.
Considering the characteristics of RFID data streams, some challenges need to be solved when processing RFID data streams in the field of monitoring. On the one hand, due to the real-time requirements of application software, the traditional method of saving all data to the database is no longer feasible. Therefore, our work focuses on how to filter redundant RFID data in real time to meet the needs of the surveillance sector, as these redundant data often lack practical value and reduce a system's operational efficiency. On the other hand, when filtering redundant data, all the above characteristics should be considered so that we can perform comprehensive filtering, including the RFID signal or the space-time relevance hidden in the data. This paper will focus on how to perform efficient real-time filtering on redundant data.
2.2.6. RFID Signal Characteristics. RSS is an important eigenvalue of RFID signals, which can be obtained by the RFID reader when reading the RFID tags. Figure 1 depicts the test we performed with a continuously increasing distance of 0-6 meters by recording one data per 0.2 meter. Through testing, we found that the RSS value shows a decreasing trend with the increase of the distance, but it is not strictly attenuated. This means that the relationship between the RSS value and the distance is not one-to-one mapping, and there is a certain degree of jitter. When the transmission distance is close, the RSS value decays faster. The farther the transmission distance, the slower the RSS value attenuated.
Due to the severe jitter in received signal strength (RSS), several methods have been proposed to avoid this instability when using RSS to represent distance. Xu et al. in [8] processed the RSS by using a Gaussian filter to filter the abnormal value. Shangguan et al. in [9] focused on the reading rate of the RSS in a short distance. In our research, we found that it was not effective to preprocess RSS values at the expense of real-time performance, although these algorithms above perform well in filtering RSS. We found that the RSS value can indicate a region while tolerating fluctuations in RSS values within the region.

Related Work
Many filtering approaches have been proposed to eliminate redundant data in the RFID data stream efficiently [10]. Table 1 summarizes these approaches.
Traditional data redundancy processing technology stores all the data in a data warehouse or database and then returns the query results according to the database query statement [11]. RFID Cube is a data warehouse model based on the assumption that RFID tags tend to move and stay together, and therefore, a large amount of redundant data can be filtered, based on the data's locations. However, as the data scale expands, query efficiency will decrease, and the real-time requirements cannot be met. In that circumstance, a window-based filtering method should be used, which does not need to save all the data; it only needs to maintain a much smaller scale than its size [12]. As the new data stream arrives, the data in the window is continuously updated, the expiration data overflows, and the new data is inserted synchronously. In this manner, the RFID stream data can be continuously processed in real time. However, the effectiveness of the sliding window method depends on the selection of attribute fields and the size of the window. Too large of a window size may result in higher time complexity, while a small window size may result in incomplete filtering [13].
In addition, there are many redundant processing algorithms designed for the characteristics of RFID data streams. Jeffery et al. and Le each proposed a framework for pipelined data cleansing, called ESP and PDC, respectively [14,15]. Both cleaning frames consist of certain cleaning steps with their own cleaning task, such as correcting missed readings or detecting outliers for the sensor streams. These two methods are proposed for cleaning the sensor data stream when the complexity and nature of RFID objects that dynamically move make them unsuitable for RFID data streams.
Paper [16] uses the finite state machine model, which focuses on the moving tags for the cleaning of redundant data. The method divides the real-world area into different states in the state machine model, so that the valid data is defined as the data in which the state is migrated and so that a large amount of redundant data generated by static tags can be filtered. This method is suitable for the monitoring and access control scenarios. However, the method is not suitable for complex environments, because it limits the number of state machines and because different state models need to be developed for different scenarios.

Wireless Communications and Mobile Computing
In the area of machine learning [17,18], many RFID dataset cleaning methods based on dynamic Bayesian networks (DBNs) have been proposed. Paper [17] introduced a cleaning framework to generate a globally optimal cleaning scheme to minimize cost and also introduced a decision tree-based cleaning method. However, the disadvantage of the DBN cleaning method is that it obtains the relationship between the predicted value and the observed value from the historical data and cannot be dynamically updated.
Due to the dynamic generation of RFID data, it is impractical to store all the data. How to clean these data dynamically with limited time and space is a challenge. Approaches that explore the Bloom filter for filtering redundant readings in RFID have recently emerged. Compared with the other above approaches, the Bloom filter is more sensitive to real-time applications. Generally, when a new reading in the format of <tag_id, location, time> comes at the reader, it will be inserted into the Bloom filter and can be filtered without delay. Bloom filters perform well even in the face of huge RFID data streams. However, existing methods of removing RFID redundancy based on Bloom filters are usually filtered for the classic triplet with the attribute such as time or tag id. Table 2 shows the algorithm of Bloom filter in RFID data stream redundancy filtering methods.
Based on the characteristics of RFID data streams, the TBF modifies the bit array into an integer array. The timestamp of the latest data is saved in the array, which ensures that the tuple in the filter will not be full, so that the error rate will increase sharply by updating the time. The Time Interval Bloom Filter works in a similar manner, while it stores the timestamp of the start and end by using a twodimensional array.
The Compared Bloom Filter (CBF) considers the problem of data filtering in multireader environment. In the environment of multiple readers existing, the tag data may be collected and stored by multiple readers for many times. The Compared Bloom Filter determines which reader is the reader of the tag data. The principle is that in a time span, when a tag is read by multiple readers, the reader with the least number of reads is redundant.
The proposed Time and Space Bloom Filter algorithm solves the problem of how to judge the mobility of the tag. This filter extends the one-dimensional array in the standard Bloom filter to a two-dimensional array that includes location and time information.
The Approximate Probability Synthesis Bloom Filter extends the number of dimensions to four. This approach handles the situations of location movement and staying at the overlapping areas among multiple readers with accuracy.
Although the aforementioned method considers the characteristics of time dimension and space dimension of multiple readers, there is no mention of filtering redundant data within a certain range. The work presented in this paper takes into account the filtering of redundant data within a certain range and can be applied into the actual scenario.

Bloom Filters.
A Bloom filter is a space-saving probabilistic data structure proposed by Burton Howard Bloom in 1970 to test whether an element is in a collection or not [20]. A Bloom filter consists of a bit array of size m and k independent hash functions h 1 , h 2 , ⋯, h k . The array of m bit is initialized to 0, and the value range of these hash functions is f1, 2, ⋯, mg. Suppose that the set S = fx 1 , x 2 , ⋯, x n g has n elements, each element x i will be mapped to different positions in the array via each hash function in order and set the corresponding value to 1, denoted as To test whether an element x i is a member of the existing set S, it will be run through the same hash functions. The element is said to be a member of the set if all the bits in which the element was mapped to are 1. If there are one or more mapping values of 0, then the element is considered to be new.
The specific operation of the Bloom filter is shown in Figure 2. All bits in a Bloom filter are initially set to 0 and will be replaced by 1 when it is hashed by the element. "TagID1" is a newly arrived element that is mapped to the first, fourth, and sixth bits of the array via the Bloom filter shown in Figure 2(a). When checking whether "TagID2" is duplicated, the first hash function puts the corresponding mapping position at 0 to 1, which means that "TagID2" has not yet been inserted into the bit array.
Compared to other data structures, a Bloom filter has significant advantages in terms of space and time because the storage space and query time in the filter are constants [24,25]. In addition, the hash functions have no relationship with each other and can be implemented in parallel by hardware. Furthermore, because the Bloom filter does not require the Approach Weakness RFID Cube [11] Needs to wait for all readings to be completed before duplicate readings can be filtered Sliding window [12] Subject to a selection of parameters and needs to scan along the sliding windows for every new reading Extensible receptor Stream Processing (ESP) and pipelined data cleaning (PDC) [14,15] Complex filtering framework, delayed process, and not suitable for dynamic tag filtering Finite state machine [16] Limited by scenario and lack of generalization ability Dynamic Bayesian networks (DBN) [17] Cleaning effect of the dynamic tag is not obvious Bloom filter [19,20] Does not allow deletion and filtering in a single dimension 4 Wireless Communications and Mobile Computing storage element itself, it has advantages in certain situations where the privacy requirements are very strict.

Definitions of Redundant RFID Data.
Generally speaking, RFID data redundancy refers to that in a time period, a certain tag is read many times, and these data are sorted by time.
Except the first reading data is valid, other data are redundant. But in the scenario of warehouse monitoring, data redundancy has a richer meaning. The RFID-based electrical article surveillance (EAS) system of the warehouse is deployed at the entrance of the warehouse to monitor the items in and out of the warehouse. However, due to the RFID technology itself, the RFID system deployed at the entrance is very likely to read not only the tags of items entering the entrance but also the tags of items close to the entrance in the warehouse. These items near the entrance bring a lot of invalid redundant data. As mentioned previously, RFID data are always described as a tuple of <tag_id, location, time> which stands for the ID of the captured tag, the ID of the capturing reader, and capturing time, respectively. Furthermore, the Bloom filter has some variants for different purposes. Here, we introduce a new collected data RSS and provide some definitions of RFID data stream redundancy in this algorithm: Definition 1. Use S to denote a series of RFID data streams, S = fe 1 , e 2 , ⋯, e n g, where e i denotes an RFID four-tuple <tid, loc, time, RSS>, where tid stands for the unique identifier of the tag, loc is the ID of the reader that captured the data, time is the timestamp of the data acquisition, and RSS is the acquired signal strength value, which can represent the distance of the data.
Definition 2 (temporal redundancy). Set w as the time window in data stream S. If there are two tag data x ∈ S, y ∈ S in w, if x:tid = y:tid, x:loc = y:loc, y:time − x:time ≤ τ ðτ > 0Þ, where τ is a set time threshold, at this time data y is considered to be temporal redundant data. The tagged object is detected multiple times by a reader within a time window. Therefore, only the earliest arriving data in the time window can be considered as redundant while others are regarded as nonredundant.
Definition 3 (distance redundancy). If x ∈ S, y ∈ S exists and the tag data x and y are, respectively, satisfied x:tid = y:tid, x:loc = y:loc, y:time > x:time, and y:RSS < ε, where ε is the distance threshold of RSS. If the RSS value is smaller than the threshold ε, it indicates that the tag is not in the detection range, so the data y can be considered as meaningless redundant data. Tagged objects scattered in every corner of space, no matter if the tag data is in the time window or not, only if it is detected out of the detection range ε will it be considered as redundant data.
Definition 4. Although we give a simple definition of RFID redundancy, some special cases need further consideration. If x ∈ S, y ∈ S exists and the tag data x and y are, respectively, satisfied x:tid = y:tid, x:loc = y:loc, y:time > x:time, y:RSS > ε, and y:RSS > x:RSS, we believe that y is not redundant data. In the actual scenario, the value of RSS keeps changing with the movement of the tag. When the tag enters and leaves the detection area, the distance between the tag and the reader is from far, near, and far. In theory, in this process, the RSS value of the tag will change from small to big and big to small. The tag stored in the warehouse for a long time will not change like this. Therefore, this trend can be used to determine whether the label left the warehouse.

Basic Principle of the Time-Distance Bloom Filter
Algorithm. The Bloom filter can be extended to RFID data streams by taking advantage of its high performance and acceptable error rate. Based on time and space considerations, we designed an algorithm called Time-Distance Bloom Filter (TDBF). Based on the TBF, the TDBF algorithm increases the unique distance judgment in RFID data filtering and achieves the function of filtering RFID redundant data at a certain time and space. Reading timestamp of stored data to determine whether it is redundant data (TIBF stores the timestamp of the start and end) Compared Bloom Filter (CBF) [7] Focus on data filtering in the physical space dimension Time and Space Bloom Filter (TSBF) [22] Judges the mobility of the tag with consideration of the time-space characteristics Approximate Probability Synthesis Bloom Filter (PSBF) [23] Not only filters redundant probability events but also handles positional motion, even in overlapping areas "TaglD1"

Wireless Communications and Mobile Computing
The structure of TDBF is shown in Figure 3. The TDBF array size is initialized to m, and each cell represents a twodimensional integer array. The first column stores the timestamp information of the read tag, and the second column stores the RSS value of the read tag. The data of the unit can be represented as M i ½Time½RSS, and the RSS value is represented as a negative number, so that when the TDBF is initialized, the value of the first column is initialized to 0, and the value of the second column is initialized to the distance threshold ε.
When new RFID data arrives, k independent hash functions are used for filtering the tid value of RFID tags. The timestamp value stored in the mapping and the RSS information unit are used to determine whether the data is redundant data. Once we determine which data are redundant data, we can delete those data and obtain the data we want. The principle of redundancy judgment is as follows: (1) For the newly arrived RFID data x, k independent hash functions are used for mapping its unique ID into the corresponding array unit (4) A special case that needs to be considered is that if there is i ∈ f1, 2,⋯kg, x:RSS > M i ½RSS ≥ ε, x:Time > M i ½Time, we can ascertain that the newly arrived data x is within the distance threshold ε and the value of RSS is larger compared to the previous detected value. Therefore, we are given a reason to think that the data has a tendency to approach the reader. In this case, whether the data is within the prescribed time interval or not, we consider data x as paramount and that it needs to be saved for further processing. At this time, the time information and signal strength information in k different array units do not need to be updated, which is M i ½Time = x:Time, M i ½RSS = x:RSS (5) Otherwise, the data is considered redundant or invalid data and is directly deleted Combined with the definitions of redundancy introduced earlier and the basic principles of TDBF, the pseudocode representation of TDBF is shown in Algorithm 1.

Performance Evaluation Standard.
Approaches to evaluate the performance of TDBF are difficult because in the real world it is sometimes hard to say what is useful data. Here, we consider three main factors as evaluation indicators: the data compression ratio (CR), the false positive (FP) rate, and the false negative (FN) rate. The data compression rate is the number of original tags collected per minute, divided by the number of filtered tags, which can reflect the filtering efficiency. The higher the compression ratio, the more the data filtered. However, an excessive data compression ratio leads to loss of valid information. A false positive in TDBF refers to the misidentification of RFID tags that are not redundant data into redundant data, and a false negative in TDBF means that redundant RFID tag data is mistaken for nonredundant data.
For the redundant filtering algorithm, we want to get the highest possible data compression rate with the smallest possible error rate. Therefore, we use the following formula to express filtering performance [26]: where N denotes the number of RFID tags in the environment; FP and FN indicate the number of detected RFID tags; W denotes the weight of the FP, because we believe that FP should be minimized to avoid the loss of valid information; M is the maximum ideal number of read tags; and log function here is to prevent the data compression ratio from being too high, resulting in loss of effective information. According to the formula, higher scores indicate better algorithm performance. This formula can produce a specific evaluation of the filtering algorithm, which is convenient for evaluating the filtering performance.
Since there are k hash functions, there are k bits mapped, and the probability of a false positive is However, the size of the TDBF array can be set to be much larger than the number of tags. In this case, the probability of a false positive can be ignored.
(b) The RSS value itself has a certain volatility. Ideally, the closer the RSS value is to the reader, the larger it is. However, due to the complexity of the real-world environment, there may be a situation where the tag is close to the reader, and the RSS value decreases. The probability of false positives and false negatives at this time is based on the environment (2) The false negative rate of TDBF also consists of two parts: (a) Assume that there is an RFID data stream S = fs 1 , s 2 , s 3 , ⋯, s n g, s 1 = <TagId 1 , 2,−40>,s 2 = < TagId 2 , 3,−50>,s 3 = <TagId 1 , 4,−45 > . Note that the second term in the triplet should be expressed as an integer format of datetime, because in Algorithm 1, it is necessary to calculate the time interval. Here, we use small integers for short. We define the RSS distance threshold as -60, the time threshold is 3, TagId 1 is mapped to the position of r and s in the array of size m, and TagId 2 is mapped to the position of s and t in the array. According to the TDBF algorithm, the data s 3 has the RSS value -45, which is greater than the RSS value -50 stored in the position of s in the array, so it is determined to be nonredundant data. However, in the actual  Wireless Communications and Mobile Computing scenario, although this tag is within the distance range, the tag is not moving to the reader in the time threshold. Therefore, it should be considered as redundant data. The possibility of this situation is very low, because the TDBF array can be very large, and it is hard for the data to be mapped to the same cell (b) Due to the complexity of the actual environment and the unreliability of the RSS value, when the tag is far away from the reader, its RSS value may become smaller, so the redundant data is mistaken as nonredundant data. In the actual scenario, the miss rate of the tag should be minimized. If so, it is less likely to lose key information in the data collection In addition, the set address in the traditional Bloom filter cannot be deleted because the incoming data may share the same address of the Bloom filter. As a result, there is a case where the Bloom filter is full; that is, as with the increase of time, the addresses of Bloom filters are all set to 1, resulting in a significant increase in the rate of false positives. Some improved algorithms, such as CBF [27], are proposed to use the counting method to differentiate the situation where different data share the same address. However, our algorithm uses the time parameter instead. The time is gradually increased, and we in turn update the time parameter in the TDBF. In this way, we effectively solved the challenging situation of a full Bloom filter.
TDBF achieves a balance of time, space efficiency, and accuracy. Spatially, TDBF uses a two-dimensional integer array with a size of m, so the space complexity is θðmÞ, which is twice the size of the Time Bloom Filter (TBF). In terms of time, when new data arrives, a comparison can be done only once at least to determine whether redundancy exists and the processing of n data only needs to be compared n times. The best time complexity is ΩðnÞ, while the worst case is that it needs to be compared k times for each time that new data arrives, where k is the number of hash functions, and n data needs to be compared k * n times. The worst time complexity at this time is OðnÞ, and therefore, the average time complexity is θðnÞ.

Algorithm Design and Implementation
Our experiment uses the Impinj Revolution series of passive readers and several supporting tags. In order to verify the effectiveness of the algorithm, the experimental environment is an open room without interference, thereby reducing the environmental impact on RSS. The reader and the computer are connected by a network cable. The other components of the experimental environment are shown in Table 3.

Experiment in Static
Scenario. The static experimental scenario deployment is shown in Figure 4. To ensure that there are no obstacles, we chose an empty room to simulate the ideal experimental environment. In the experiment, we used the basic Bloom filter, the Time Bloom Filter (TBF), and the Time-Distance Bloom Filter (TDBF) to filter and analyze the same data stream. The RSS distance threshold shown in Figure 4 is roughly represented by a curve. Since the RSS value has a certain volatility and the RSS value generated by the tag at the same position is slightly different, the RSS distance threshold should be expressed as a distance range. We selected a distance threshold of approximately 3 meters from the reader and set the time threshold to 2 seconds. Then, we attempted to verify the filtering efficiency of the algorithm in a static environment. 5.1.1. Experiment 1. First, we put 10 tags in the TDBF detection range and counted the total amount of data filtered by the BF, TBF, and TDBF algorithms in 1 minute. To reduce the impact of RSS fluctuations, we placed the tags approximately 1 meter from the threshold to minimize the uncertainty of the RSS. Next, we put all 10 tags out of the distance threshold and performed the same operation. The experimental results are shown in the form of the histogram in Figure 5.
As can be seen in Figure 5, in the same time, the number of tags outside the threshold is slightly lower than the number of tags in the distance threshold, but the total amount of data is basically the same. This shows that our experimental environment is less affected by external interference and can effectively collect most of the data information, but the distance of the tags will affect the data reading rate to some extent. After the Bloom filter, TBF, and TDBF algorithms, the tags are well filtered.
When the tags are all placed within the distance threshold, we observe that the RSS value of the original data is very stable. In theory, the number of valid tags at this time is 300,   This shows that when the TDBF algorithm is within the range of the threshold, there is basically no leakage of the tags. Because the Bloom filter algorithm does not take into account the time and space information of the tags, it only performs coarse-grained filtering on the tag ID. Although it has a high data compression rate, it also loses valuable information. Table 4 reflects the evaluation scores of different filtering algorithms, where W is 10 and M is 300. The Bloom filter has the lowest score and poor filtering performance. TBF and TDBF have the same score within the distance threshold, indicating that the filtering performance is similar. When all the tags are outside the distance threshold, the number of theoretical valid tags is 0 (because all the tag data outside the threshold can be regarded as redundant data), and because the TBF algorithm only considers the time characteristics of the RFID data stream, it generated 292 false negatives. The reason why TBF did not reach the theoretical value of 300 is that the reading distance is too far, and some data cannot be obtained within 2 seconds. After TDBF filtering, the number of false negatives was reduced to 33. From Table 5, we can see that TDBF has the highest score and the best performance because it has a low false negative rate and high compression ratio, while the Bloom filter has a high compression ratio and high false negative rate. TBF only works well within the threshold and has a high false negative rate and low compression ratio compared with TDBF.
The experiment proves that the TDBF algorithm and the TBF algorithm maintain the same zero false positive rate when the tags are within the distance threshold. However, when the tags are outside the distance threshold, the false negative rate of the TDBF algorithm is much smaller than the false negative rate of the TBF algorithm. Therefore, the TDBF algorithm can achieve a 0 false positive rate, a low false negative rate, and a high data compression ratio in a static ideal environment.

Experiment in Dynamic
Scenario. The dynamic experimental scenario deployment is shown in Figure 6. In the experiment, the operator carries a number of tags, from the position outside the threshold shown in the figure, slowly getting closer to the reader at the gate. We use the basic Bloom filter (BF), the TBF, and the TDBF to filter and analyze the same data stream. We selected the distance threshold at approximately 2 meters from the reader and set the time threshold to 1 second. We then attempted to verify the filtering efficiency of the algorithm in a dynamic environment.

Experiment 2.
We first placed all five tags outside the distance threshold, and then, the experimenter carried these tags along the motion trajectory shown in Figure 6, slowly approaching the gate. The tag data filtered by TBF and TDBF is calculated separately to see if TDBF can filter out valid data.
As shown in Figure 7, the tag carrier is slowly moving closer to the RFID reader along the trajectory. Slow movement can make the tags approximately static, which can simulate the efficiency of redundant data filtering in an ideal environment. At this time, the TBF does not consider the spatial characteristics, and the filtered data volume has a linear growth trend. The deviation of the data from the expected value is often due to the missing or misreading caused by the tags being unstable when the experimenter moves. When the tag carrier is far away from the threshold, TDBF will produce very little false negative data. As the tag carrier approaches the distance threshold, the RSS value gradually increases and has some fluctuation, resulting in a low false negative rate. About 16 seconds after the tag carrier enters the distance threshold, the RSS fluctuation causes the TDBF to have a certain degree of false positive rate. But after 20 seconds, once the tag carrier has completely entered the distance threshold range, the TDBF maintains a tag filtering rate similar to that of the TBF.
The experiment shows that there is a range of RSS fluctuations in the vicinity of the distance threshold. In this range, the TDBF algorithm will produce a certain degree of false negative rate and false positive rate due to the instability of the RSS value. TDBF can produce a good filtering effect, and within the distance threshold, it can produce a filtering effect similar to that of the TBF algorithm. The spatial granularity of the RFID redundant data is further filtered by using the distance information.

Experiment 3.
Typically, the data that we are most concerned about is the data that is close to the reader. Such data tends to reflect the tendency of the tag carrier to carry the tags away from the area. In Experiment 2, the movement of the tag is in a straight line. Therefore, it is not possible to simulate the motion trajectory of a person in a real-world environment. Therefore, in Experiment 3, we express the trajectory of a character in a curve. The specific trajectory is shown in Figure 8. The experimental results are shown in Figure 9. It can be observed that the data filtered by the TBF maintains a linear growth trend because it is not bound by the spatial condi-tions. After TDBF filtering, the amount of data after filtering in the first 10 seconds is almost 0, indicating that the tag is still far from the distance threshold, and can therefore be