원시데이터 수집 시스템
선정목록으로

Suitability of a new Bloom filter for numerical vectors with high dimensions

관련 필름·전자재료 · (11) 배리어 필름

기본 정보

저자
  1. Chunyan Shuai — Faculty of Transportation Engineering, Kunming University of Science and Technology, Kunming, China
  2. Jiayou Lei — Faculty of Transportation Engineering, Kunming University of Science and Technology, Kunming, China
  3. Zeweiyi Gong — Faculty of Electric Power Engineering, Kunming University of Science and Technology, Kunming, China
  4. Xin Ouyang — Faculty of Information Engineering and Automation, Kunming University of Science and Technology, Kunming, China
DOI
10.1371/journal.pone.0209159
저널
PLoS ONE
발행년도
2018
발행기관
Public Library of Science
피인용수
0
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1371/journal.pone.0209159
토픽
Carbon and Quantum Dots Applications
OpenAlex ID
W2906642065

평가 내용

관련도
관련
사업분야
필름·전자재료 · (11) 배리어 필름
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '필름·전자재료 > 배리어 필름' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

The notable increase in the size and dimensions of data have presented challenges for data storage and retrieval. The Bloom filter and its generations, due to efficient space overheads and constant query delays, have been broadly applied to querying memberships of a big data set. However, the Bloom filter and most of the variants regard each element as a 1-dimensional string and adopt multiple different string hashes to project the data. The interesting problem is when the inputs are numerical vectors with high dimensions, it remains unknown whether they can be projected into the Bloom filter in their original format. Furthermore, we investigate whether the projection is random and uniform. To address these problems, this paper presents a new uniform Prime-HD-BKDERhash family and a new Bloom filter (P-HDBF) to retrieve the membership of a big data set with the numerical high dimensions. Since the randomness and uniformity of data mapping determines the performance of the Bloom filter, to verify these properties, we first introduce information entropy. Our theoretical and experimental results show that the P-HDBF can randomly and uniformly map the data in their native formats. Moreover, the P-HDBF provides an efficient solution alternative to implement membership search with space-time overheads. This advantage may be suitable for engineering applications that are resource-constrained or identification of the nuances of the graphics and images.

본문 49,086자

본문 펼치기
~~<u>[a1111111111](http://crossmark.crossref.org/dialog/?doi=10.1371/journal.pone.0209159&domain=pdf&date_stamp=2018-12-21)</u>~~ ~~<u>[a1111111111](http://crossmark.crossref.org/dialog/?doi=10.1371/journal.pone.0209159&domain=pdf&date_stamp=2018-12-21)</u>~~ ~~<u>[a1111111111](http://crossmark.crossref.org/dialog/?doi=10.1371/journal.pone.0209159&domain=pdf&date_stamp=2018-12-21)</u>~~ ~~<u>[a1111111111](http://crossmark.crossref.org/dialog/?doi=10.1371/journal.pone.0209159&domain=pdf&date_stamp=2018-12-21)</u>~~ ~~<u>[a1111111111](http://crossmark.crossref.org/dialog/?doi=10.1371/journal.pone.0209159&domain=pdf&date_stamp=2018-12-21)</u>~~ OPEN ACCESS Citation: Shuai C, Lei J, Gong Z, Ouyang X (2018) Suitability of a new Bloom filter for numerical vectors with high dimensions. PLoS ONE 13(12): [e0209159. https://doi.org/10.1371/journal.](https://doi.org/10.1371/journal.pone.0209159) [pone.0209159](https://doi.org/10.1371/journal.pone.0209159) Editor: Zhan Li, University of Electronic Science and Technology of China, CHINA Received: July 13, 2018 Accepted: December 2, 2018 Published: December 21, 2018 Copyright: © 2018 Shuai et al. This is an open access article distributed under the terms of the [Creative Commons Attribution License, which](http://creativecommons.org/licenses/by/4.0/) permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. Data Availability Statement: Data are available [freely from http://corpus-texmex.irisa.fr/ and on](http://corpus-texmex.irisa.fr/) [figshare at the URLs: https://figshare.com/articles/](https://figshare.com/articles/sift_data/7428974) [sift_data/7428974 and https://figshare.com/](https://figshare.com/articles/sift_data/7428974) [articles/ivecs_read_m/7428971.](https://figshare.com/articles/ivecs_read_m/7428971) Funding: This work is supported by the National Key R&D Plan of China (No. 2017YFB0306405) to XO, the National Natural Science Foundation of China (No.61562056, No.61364008) to CS. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript. RESEARCH ARTICLE # Suitability of a new Bloom filter for numerical vectors with high dimensions [Chunyan ShuaiID](http://orcid.org/0000-0001-8282-2697) <sup>1</sup> , Jiayou Lei <sup>1</sup> , Zeweiyi Gong <sup>2</sup> , Xin Ouyang <sup>3</sup> * 1 Faculty of Transportation Engineering, Kunming University of Science and Technology, Kunming, China, 2 Faculty of Electric Power Engineering, Kunming University of Science and Technology, Kunming, China, 3 Faculty of Information Engineering and Automation, Kunming University of Science and Technology, Kunming, China - kmoyx@hotmail.com ## Abstract The notable increase in the size and dimensions of data have presented challenges for data storage and retrieval. The Bloom filter and its generations, due to efficient space overheads and constant query delays, have been broadly applied to querying memberships of a big data set. However, the Bloom filter and most of the variants regard each element as a 1 dimensional string and adopt multiple different string hashes to project the data. The inter esting problem is when the inputs are numerical vectors with high dimensions, it remains unknown whether they can be projected into the Bloom filter in their original format. Further more, we investigate whether the projection is random and uniform. To address these prob lems, this paper presents a new uniform Prime-HD-BKDERhash family and a new Bloom filter (P-HDBF) to retrieve the membership of a big data set with the numerical high dimen sions. Since the randomness and uniformity of data mapping determines the performance of the Bloom filter, to verify these properties, we first introduce information entropy. Our the oretical and experimental results show that the P-HDBF can randomly and uniformly map the data in their native formats. Moreover, the P-HDBF provides an efficient solution alterna tive to implement membership search with space-time overheads. This advantage may be suitable for engineering applications that are resource-constrained or identification of the nuances of the graphics and images. 1. Introduction With increasing data sizes, concise data representations and efficient query algorithms have become the key factors to large-scale data management. As a result, a large number of technologies have appeared, such as the Bloom filter (BF) [1]. The BF has a low query delay and a high time-space overhead, leading to its broad use in computing areas, such as network and network security [2–5], distributed systems [6–9] and applications or embedded devices [10,11], with limited computing and storage resources. Moreover, many variants have been proposed, including the counting Bloom filter (CBF) [12] and its improvements [13–14], the compressed Bloom filter[15], the spectral Bloom filter[16], the dynamic Bloom filter [17], the Cuckoo Filter[18], and the parallel BFs (PBF-HT and PBF-BF) [19, 20]. [PLOS ONE | https://doi org/10 1371/journal pone 0209159](https://doi.org/10.1371/journal.pone.0209159) December 21 2018 1 / 15 Competing interests: The authors have declared that no competing interests exist. Abbreviations: _S_ = ( _V_ 1,..., _Vn_ ), A set of _n_ vectors for member query; _V_ ( _v_ 1... _vd_ ), _q_ ( _q_ 1... _qd_ ), A vector in _S_ and a query _q_ with _d_ dimensions; _P_ ( _p_ 1... _pl_ ), A prime number set _P_ and a prime number _pi_ ; H <sup>p</sup>, A Prime_HD_ BKDRHash function family with a function of _hkP_ = _Si_ = ∏ _pi_ −1� _Si_ −1+ _vi_ ( _i_ = 1... _d_ ); _fP−HDBF_, _fnpP−HDBF_, The false positive (negative) probability of P-HDBF.; m, The array size of P HDBF.; k, The number of Prime_HD_ BKDRHash functions. A new BF for numerical vectors with HD The BF can perform well and obtain a low false positive probability (FPP) only when the hash randomly and uniformly disperses the data, and usually, string hash functions [21] are the default choices. Regardless of the data format, the string hash takes the input as a 1-dimensional string, rather than its original format, and iteratively computes every character to obtain a random integer. To better scatter the data into different places and reduce the FPP, multiple different string hashes are usually selected. To project numerical vectors with high dimensions in their original formats, LshBFs [22–25] replace the string hashes with a uniform locality sensitive hashing (LSH) [26]. However, since the LSH gathers the data around the mean, LshBFs are more suitable for approximate nearest neighbours queries, rather than membership queries. When the inputs are numerical vectors with high dimensions, this paper proposes dealing with them in their original formats other than strings. First, a unified prime BKDERhash [27] function family, denoted as Prime-HD-BKDERhash, is proposed to substitute for multiple different string hashes. Meanwhile, information entropy is introduced in the BF to verify the randomness and uniformity of the data mapped by the Prime-HD-BKDERhash. Next, by combining the unified Prime-HD-BKDERhash with a counter array, a new BF called P-HDBF is established to store and retrieve the memberships of the big data set. The theoretical analysis and experiments show that the Prime-HD-BKDERhash can disperse elements more effectively than the string hashes, and the P-HDBF is more suitable to represent and query the numerical vectors of a big data set in high-dimensional spaces, which has low space-time costs. Compared with the PBF-HT and PBF-BF, the P-HDBF possesses low false detection rates, low query delays and low space requirements. The advantages of the constant query delay and low space-time costs make the P-HDBF more appropriate for some engineering applications with constrained computing and storage resources, such as distinguish the nuances of the graphics and images. The remainder of this paper is organized as follows. Related works are described in section 2. The design of Bloom filter and our structure are presented in section 3. The theoretical analyses and proofs are in Sections 4 and 5. Section 6 presents the related performance evaluation and experiments. Section 7 presents the study’s conclusions. 2. Related work This section provides a brief survey related to the Bloom filter designs and its variants that are suitable for element deletion and multi-dimensional vectors. A Bloom filter [1] utilities a slightly array to store a big data set. This filter uses the mappings of multiple string hashes to answer whether a query is member of the set with a small false positive probability or not. To support element deletion, the counting Bloom filter (CBF) [12] proves that a 4-bit counter array will be sufficient to defend against overflows brought by element deletion. The FPP, array size and cardinality of the BF have been discussed in [28–30]. The variable incremental counting Bloom filter (VI-CBF) [31] increases the counter by a variable increment rather than the unaltered increment to reduce memory costs. Moreover, with the same counter width, the query in VI-CBF can get a more complete answer than in CBF. The Cuckoo filter [18] consists of an array of buckets where each item has two candidate buckets. The filter computes every item’s two fingerprints and bucket positions using hash functions _h_ 1( _x_ ) = _h_ ( _x_ ) and _h_ 2( _x_ ) = _h_ 1( _x_ )� _h_ ( _h_ is x’s fingerprint). The lookup procedure checks both buckets to see if either one contains the query to determine the membership. Since the insert procedure will continuously relocate existing fingerprints to their alternatives until no more buckets can be allocated, it efficiently reduces the memory costs but results in a long computational time. [PLOS ONE | https://doi org/10 1371/journal pone 0209159](https://doi.org/10.1371/journal.pone.0209159) December 21 2018 2 / 15 A new BF for numerical vectors with HD Bloom-1 [32] achieves a reduced query overhead at the cost of a higher FPP for a given memory size. Reviriego [33] provides a correct analysis of Bloom-1 and gives out an exact FPP. For the fixed FPP and cardinality of a dataset, the spaces that a BF required are determined. Once a number of extra elements are added in, the FPP will increase quickly. Therefore, the traditional BF is suitable for static sets. The Spectral BF [16] and Dynamic BF (DBF) [17] extend the BF to multi-set and dynamic sets, respectively. To determine which BF an element belongs to in cloud environment, Bloofi [34] organizes different BFs in a hierarchical index structure similar to a B+ tree and the FPP of the hierarchical Bloofi is discussed in [35]. These BFs recognize the inputs as 1-dimensional strings. PBF [20], PBF-HT and PBF-BF [21] have been developed to store and query multi-dimensional elements. The PBF consists of multiple parallel standard BFs, and each standard BF represents an attribute. Due to the destruction of the integrity of the attributes, the PBF generates a high FPP. Furthermore, to reduce the FPP, the PBF-HT (PBF-BF) adds a hash table (a check BF) to the PBF. Let _d_ be the number of dimensions, let _m_ 1 and _m_ 2 be the sizes of the array of the BF and the HT (or the checkBF), and let _k_ 1 and _k_ 2 be numbers of hash functions of the PBF and the HT (or the check BF), respectively. The memory cost and query delay of the PBF-BF (or PBF-HT) are _dm_ 1+ _m_ 2 and _k_ 1 _d_ + _k_ 2, respectively. Both of them grow linearly as dimensions increase and result in huge memory wastes and query delays. Rather than applying multiple different string hashes to map the inputs into different integers, the LshBF schemes [22–25] apply locality sensitive hashing (LSH) [26] functions to directly transform high-dimensional vectors into serial real numbers by performing the dot product with the input dimensions and mapping similar vectors in the Euclidean space to near location(s). The LSH avoids “dimensional disasters” but results in a high FPP when querying memberships. To reduce the FPP, the LshBF-BF [23] adds a verification BF to further disperse vectors. According to the central limited theorem [36], the LSH shrinks all elements of the set around the mean. For example, when the LSH satisfies the standard normal distribution, approximately 68.5% of the elements gather between the negative and positive variance after mapping, which makes it more suitable for approximate nearest neighbours search. 3. Methods and structure 3.1 Standard Bloom filter and Counter Bloom filter Definition 1. Bloom filter (BF) [1] . A Bloom filter contains _k_ independent string hash functions _hj_ ( _j_ = 1,. . ., _k_ ) and an array of _m_ bits initiated to 0. By projecting _k_ hashes, the BF stores _n_ elements of a set _S_ ( _V_ 1, _V_ 2. . . _Vn_ ) into the bit array. For _hj_ ( _j_ = 1,. . ., _k_ ) and _Vi_ ( _i_ - _n_ ), the bit _hj_ ( _Vi_ )% _m_ is set to 1. A bit can be set to 1 multiple times, but only the first change has an effect. Given a query _q_, if _hj_ ( _q_ )% _m_ = 1 for all _hj_ ( _j_ = 1,. . ., _k_ ), the _q_ is accepted as a member of _S_ with a false positive probability (FPP). The BF assumes that each _hj_ ( _j_ = 1,. . ., _k_ ) can randomly and uniformly map elements. Usually, _hj_ is a string hash [21], such as sax_hash and RSHash. By repeatedly iterating every character of _Vi_, _hj_ obtains an integer in the range of [0−(2 <sup>31</sup> -1)] (32 bits length) as the random hash fingerprint of _Vi_ . For example, given two vectors _X_ (357,246,369) and _Y_ (468,369,157), the sax_ hash function ( _h_ 1) uses ASCII codes of characters ’3’,’5’,’7’,’,’,’2’. . . of _X_ to iteratively compute a random integer. Then, the counter _h_ 1( _X_ )% _m_ is added with 1, as shown in Fig 1. 3.2 Prime high dimensional Bloom filter To address numerical vectors with high dimensions in their original formats other than strings, a new uniform hash function family, denoted as Prime_HD_BKDRHash, is proposed. [PLOS ONE | https://doi org/10 1371/journal pone 0209159](https://doi.org/10.1371/journal.pone.0209159) December 21 2018 3 / 15 A new BF for numerical vectors with HD <u>Fig 1.</u> <u>Bloom filter and counting Bloom filter.</u> [https://doi.org/10.1371/journal.pone.0209159.g001](https://doi.org/10.1371/journal.pone.0209159.g001) Based on the unified Prime_HD_BKDRHash and a counter array, a new BF called P-HDBF is built, as shown in Fig 2. (1) Prime_HD_BKDRHash. It originates from the BKDRHash function [27] and prime numbers. Given a prime number set _P_ = [3,5,7,11,13,17. . .](except of 2) and a _d_ dimensional numerical vector _V_ ( _v_ 1,. . ., _vd_ ), Prime_HD_BKDRHash considers _V_ as a _d_ dimensional vector. By iteratively computing _h_ <sup>_p_</sup> = _Si_ = ∏ _pi_ -1� _Si_ −1+ _vi_ ( _i_ = 1. . . _d_ ), _d_ dimensions contribute to the last hash value. Although the _jth_ operation and the ( _j_ +1) _th_ operation are same, the corresponding prime numbers are different. Therefore, _hj_ ( _V_ ) and _hj_ +1( _V_ ) will get different hash values (details in section 4.1). (2)A counter array (CA). The array of P-HDBF contains _m_ counters and each counter occupies 4 bits, which is enough to defend against the FNP brought by deleting elements [12]. When _k_ random integers are calculated by _k_ Prime_HD_BKDRHash functions, the counter _hj_ ( _V_ )% _m_ (1� _j_ - _k_ ) of the CA is added to 1. 4. Theoretical analysis The BF structure can work well only when the hashes can randomly and uniformly project all elements, since it is the basis of the BF. Therefore, this section will discuss the hash family- Prime_H-D_BKDRHash which is based on BKDRHash [27], and demonstrate why it is effective <u>Fig 2.</u> <u>P-HDBF and prime_HDBKDRHash.</u> [https://doi.org/10.1371/journal.pone.0209159.g002](https://doi.org/10.1371/journal.pone.0209159.g002) [PLOS ONE | https://doi org/10 1371/journal pone 0209159](https://doi.org/10.1371/journal.pone.0209159) December 21 2018 4 / 15 A new BF for numerical vectors with HD in the projection and query of high-dimensional vectors. The definition, proof and algorithm are shown as follows. 4.1 Prime_HD_ BKDRHash Definition 2. A family _H_ <sup>_p_</sup> = { _h_ <sup>_p_</sup> : _R_ <sup>_d_</sup> ! _U_ } of functions is called a prime high-dimensional BKDRHash (Prime_HD_BKDRHash), if 8 _V_ 2 _R_ <sup>_d_</sup>, _V_ ( _v_ 1,. . ., _vd_ ) and a prime number set _P_ ( _p_ 1,. . ., _pl_ )( _l_ 21) (without 2), such that _h_ <sup>_p_</sup> = _Si_ = ∏ _pi_ -1� _Si_ −1+ _vi_ ( _i_ = 1. . . _d_ ). Theorem 1. By _h_ <sup>_p_</sup> mapping, all vectors _Vj_ ( _v_ 1,. . ., _vd_ ) with _d_ dimensions in a set will be randomly and uniformly projected to different integers. Proof. Since _h_ <sup>_p_</sup> = _Si_ = ∏ _pi_ -1� _Si_ −1+ _vi_ ( _i_ = 1. . . _d_ ), then _Sd_ ¼ ð _p_ 2 � . . . � _pi_ - . . . � _pd_ Þ _v_ 1 þ ð _p_ 3 � . . . � _pi_ - . . . � _pd_ Þ _v_ 2 þ . . . þ ð _pi_ þ1 � . . . � _pd_ Þ _vi_ þ . . . þ _vd_ _:_ ð1Þ Y _d_ _pi_ þ . . . þ _vi_ _i_ ¼3 Y _d_ _i_ ¼ _i_ þ1 ¼ _v_ 1 Y _d_ _pi_ þ _v_ 2 _i_ ¼2 _pi_ þ . . . þ _vd_ Let _pi<_ 2 <sup>32</sup>, 0 _<vi_ �2 <sup>32</sup> ( _i_ = 1,. . ., _d_ ), _αd_ = 1 and _αd_ −1 = _pd_ - _αd_ . For any _i_ = 1,. . ., _d_ −1, _αi_ = _pi_ +1� _αi_ +1 _>_ 0 and _αj>αi_ ( _j>_ i). If _αi<_ 2 <sup>32</sup> and any _αj_ - _vj>_ 2 <sup>32</sup> ( _j>i_ ), _αj_ - _vj_ overflows, and the overflow part will be discarded by the 32-bit CPU. Since _pj_ 2 _P_ (without 2), _pi_ is an odd number, and the mul tiplication of odd numbers is still an odd number. Since 9 _x_ ’2 _N_, _vj_ 2 _N_ and 0 _<vi_ �2 <sup>32</sup>, therefore Y _d_ Y _d_ _j_ ¼ _j_ þ1 _pj_ ¼ 2 _x_ 0 þ 1. Meanwhile, _ai_ - _vj_ ¼ _vj_ _pj_ _j_ ¼ _j_ þ1 ¼ _vj_ ð2 _x_ 0 þ 1Þð _x_ 0 2 _N_ Þ _:_ ð2Þ ¼ _vj_ - 2 _x_ 0 þ _vj_ ¼ 2 <sup>32</sup> þ b _jvj_ If _αi<_ 2 <sup>32</sup> and _αi_ −1 = _pi_ - _αi>_ 2 <sup>32</sup>, there always exists _zi_ −1 = 2 _x_ +1( _x_ 2 _N_ ), which makes _;_ ð3Þ and a _i_ - 1 � _vi_ - 1 ¼ ð2 <sup>32</sup> þ _zi_ - 1Þ � _vi_ - 1 ¼ 2 <sup>32</sup> - _vi_ - 1 þ _zi_ - 1 � _vi_ - 1 a _i_ - 2 � _vi_ - 2 ¼ _pi_ - 1 � a _i_ - 1 � _vi_ - 2 ¼ _pi_ - 1 �ð2 <sup>32</sup> þ _zi_ - 1Þ � _vi_ - 2 ¼ _pi_ - 1 � 2 <sup>32</sup> - _vi_ - 2 þ _pi_ - 1 � _zi_ - 1 � _vi_ - 2 _:_ ð4Þ The same operations are applied on other fields from _α_ 1� _v_ 1 to _αi_ −3� _vi_ −3. For _vi_ 2 _N_, all 2 <sup>32</sup> - _vi_ −1 and _pj_ �. . .� _pi_ −1�2 <sup>32</sup> - _vj_ (1� _j<i_ −2) will be discarded by the 32-bit CPU due to overflow. Then, _Sd_ ¼ ð _p_ 1 � . . . � _pi_ - 1 � _zi_ - 1Þ _v_ 1 þ ð _p_ 2 � . . . � _pi_ - 1 � _zi_ - 1Þ _v_ 2 þ . . . _pi_ - 1 _zi_ - 1 � _vi_ - 2 þ _zi_ - 1 � _vi_ - 1 þ a _ivi_ þ . . . b _jvj_ þ . . . þ _vd_ _:_ ð5Þ If _pj_ . . .� _pi_ −1�z _i_ -1 = 2 <sup>32</sup> + _z_ ( _j<i_ ), the CPU will iteratively discard the overflows. After multiple [PLOS ONE | https://doi org/10 1371/journal pone 0209159](https://doi.org/10.1371/journal.pone.0209159) December 21 2018 5 / 15 A new BF for numerical vectors with HD iterations, _Sd_ ¼ _z_ 1 � _v_ 1 þ . . . þ . . . _pi_ - 2 _zi_ - 1 � _vi_ - 2 þ _zi_ - 1 � _vi_ - 1 þ a _ivi_ þ . . . b _jvj_ þ . . . þ _vd_ 0 _;_ ð6Þ where, for example, _pi_ 2 _P_, _zi_ −1 = 2 _x_ +1( _x_ 2 _N_ ), _z_ 1 = _p_ 1� _p_ 2. . .� _pl_ - _zi_ −1 _z_ 2 = _p_ 2. . .� _pl_ - _z_ i−1. Therefore, _p_ 1 _p_ 2. . . _zi_ −16¼ _p_ 2. . . _zi_ −16¼ _pi_ −2 _zi_ −16¼ _zi_ −16¼ _α_ 1 6¼ _βj_ . . . _<_ 2 <sup>32</sup> . Next, according to congruence theory [37], _Sd_ % _m_ ¼ ð _z_ 1 � _v_ 1 þ . . . þ _pi_ - 2 � _zi_ - 1 � _vi_ - 2 þ _zi_ - 1 � _vi_ - 1 þ a _ivi_ þ . . . b _jvj_ þ . . . þ _vd_ Þ% _m_ ¼ ð _z_ 1 � _v_ 1% _m_ . . . _pi_ - 2 � _zi_ - 1 � _vi_ - 2% _m_ þ _zi_ - 1 � _vi_ - 1% _m_ þ a _ivi_ % _m_ þ . . . b _jvj_ % _m_ þ . . . þ _vd_ % _m_ Þ% _m_ <sup>_:_</sup> <sup>ð7Þ</sup> Worst case: Since _pi_ 2 _P_ (without 2), _pi_ is an odd number, and the multiplication of odd Y Y numbers is still an odd number. Let _ni_ be positive integers. Then, _pi_ ¼ 2 _n_ 1 þ 1, _pi_ Y Y _pi_ ¼ 2 _n_ 1 þ 1, _pi_ ¼ _i_ ¼2 Y 2 _n_ 2 þ 1 and _i_ ¼ _i_ _i_ ¼1 _pi_ ¼ 2 _ni_ þ 1. Therefore, _Sd_ ¼ ð2 _n_ 1 þ 1Þ _v_ 1 þ ð2 _n_ 2 þ 1Þ _v_ 2 þ . . . þ ð2 _ni_ þ 1Þ _vi_ þ . . . þ _vd:_ ð8Þ For _Sd_, if 2 _ni_ �2 <sup>32</sup>, the CPU will discard the overflow part. At worst, for all _i_, 2 _ni_ = _ki_ 2 <sup>32</sup> ( _ki_ 2 _N_ ), then _Sd_ = _v_ 1+ _v_ 2+. . .+ _vi_ +. . .+ _vd_ . The function _Sd_ % _m_ maps the _Sd_ into the counter array, according to congruence theory [37]. _Sd_ % _m_ ¼ ð _v_ 1 þ . . . þ _vi_ þ . . . þ _vd_ Þ% _m_ ¼ ð _v_ 1% _m_ þ . . . þ _vi_ % _m_ þ . . . þ _vd_ % _m_ Þ% _m_ _:_ ð9Þ From formulas (7) and (9), even in the worst case, every dimension _vi_ contributes to _Sd_ % _m_ . In fact, from formula (7), all of the coefficients are odd numbers and they are different. For a well-selected _m_, different _vi_ will have different contributions to the final result, and the change of a _vi_ will change _Sd_ % _m_ . Therefore, _h_ <sup>_p_</sup> satisfies the avalanche effect of hash functions [38] and can be regard as a uniform hash function. Lemma 1. For a vector _V_, functions _hpi_ <sup>and</sup> <sup>_h_</sup> _pj_ <sup>are independently selected from the Pri-</sup> me_HD_BKDRhash family. There exist _hpi_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ 6¼</sup> <sup>_h_</sup> _pj_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ and</sup> <sup>_h_</sup> _pi_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ%</sup> <sup>_m_</sup> <sup>6¼</sup> <sup>_h_</sup> _pj_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ%</sup> <sup>_m_</sup> <sup>.</sup> _pi_ <sup>and</sup> <sup>_h_</sup> Lemma 1. For a vector _V_, functions _h_ me_HD_BKDRhash family. There exist _hpi_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ 6¼</sup> <sup>_h_</sup> _pj_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ and</sup> <sup>_h_</sup> _pi_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ%</sup> <sup>_m_</sup> <sup>6¼</sup> <sup>_h_</sup> _pj_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ%</sup> <sup>_m_</sup> <sup>.</sup> Explain. For any two hash functions _hpi_ <sup>and</sup> <sup>_h_</sup> _pj_ <sup>,</sup> <sup>_h_</sup> _pi_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ 6¼</sup> <sup>_h_</sup> _pj_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ. For simplicity, let</sup> _pi_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ 6¼</sup> <sup>_h_</sup> _pj_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ and</sup> <sup>_h_</sup> _pi_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ%</sup> <sup>_m_</sup> <sup>6¼</sup> <sup>_h_</sup> Explain. For any two hash functions _hpi_ <sup>and</sup> <sup>_h_</sup> _pj_ <sup>,</sup> <sup>_h_</sup> _pi_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ 6¼</sup> <sup>_h_</sup> _pj_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ. For simplicity, let</sup> <sup>_d_</sup> <sup>= 3,</sup> <sup>_V_</sup> ( _v_ 1, _v_ 2, _v_ 3), _hp_ 1 <sup>and</sup> <sup>_h_</sup> 2 <sup>_P_</sup> <sup>. From formula (1),</sup> _pi_ <sup>and</sup> <sup>_h_</sup> _pj_ <sup>,</sup> <sup>_h_</sup> _pi_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ 6¼</sup> <sup>_h_</sup> _p_ 1 <sup>and</sup> <sup>_h_</sup> 2 <sup>_P_</sup> <sup>. From formula (1),</sup> _S_ <sup>_h_</sup> 1 <sup>_p_</sup> 3 <sup>_h_</sup> 1 <sup>_p_</sup> 3 <sup>¼ ð</sup> <sup>_p_</sup> <sup>1</sup> <sup>_p_</sup> <sup>2</sup> <sup>_p_</sup> <sup>3Þ</sup> <sup>_v_</sup> <sup>1 þ ð</sup> <sup>_p_</sup> <sup>2</sup> <sup>_p_</sup> <sup>3Þ</sup> <sup>_v_</sup> <sup>2 þ</sup> <sup>_p_</sup> <sup>3</sup> <sup>_v_</sup> <sup>3</sup> _;_ ð10Þ <sup>_h_</sup> 2 <sup>_p_</sup> 3 <sup>¼ ð</sup> <sup>_p_</sup> <sup>4</sup> <sup>_p_</sup> <sup>5</sup> <sup>_p_</sup> <sup>6Þ</sup> <sup>_v_</sup> <sup>1 þ ð</sup> <sup>_p_</sup> <sup>5</sup> <sup>_p_</sup> <sup>6Þ</sup> <sup>_v_</sup> <sup>2 þ</sup> <sup>_p_</sup> <sup>6</sup> <sup>_v_</sup> <sup>3Þ</sup> _S_ <sup>_h_</sup> 2 <sup>_p_</sup> 3 _p_ _p_ where _p_ 1 _<p_ 2 _<p_ 3 _<p_ 4 _<p_ 5 _<p_ 6 and _pi_ 2 _P_ . Therefore, _S_ <sup>_h_</sup> 3 1 <sup>_p_</sup> <sup>6¼</sup> <sup>_Sh_</sup> 3 2 <sup>_p_</sup> <sup>and</sup> <sup>_h_</sup> 1 <sup>ð</sup> <sup>_V_</sup> <sup>Þ 6¼</sup> <sup>_h_</sup> 2 <sup>ð</sup> <sup>_V_</sup> <sup>Þ.</sup> 1 2 Let _q_ 1 and _q_ 2 be quotients and _r_ 1 and _r_ 2 be remainders. _S_ <sup>_h_</sup> 3 <sup>_p_</sup> <sup>and</sup> <sup>_Sh_</sup> 3 <sup>_p_</sup> <sup>mod</sup> <sup>_m_</sup> <sup>are</sup> 1 _r_ 1 ¼ _S_ <sup>_h_</sup> 3 <sup>_p_</sup> 2 _r_ 2 ¼ _S_ <sup>_h_</sup> 3 <sup>_p_</sup> 1 <sup>_h_</sup> 3 <sup>_p_</sup> <sup>%</sup> <sup>_m_</sup> <sup>¼ ðð</sup> <sup>_p_</sup> <sup>1</sup> <sup>_p_</sup> <sup>2</sup> <sup>_p_</sup> <sup>3Þ</sup> <sup>_v_</sup> <sup>1 þ ð</sup> <sup>_p_</sup> <sup>2</sup> <sup>_p_</sup> <sup>3Þ</sup> <sup>_v_</sup> <sup>2 þ</sup> <sup>_p_</sup> <sup>3</sup> <sup>_v_</sup> <sup>3Þ%</sup> <sup>_m_</sup> _:_ ð11Þ 2 <sup>_h_</sup> 3 <sup>_p_</sup> <sup>%</sup> <sup>_m_</sup> <sup>¼ ðð</sup> <sup>_p_</sup> <sup>4</sup> <sup>_p_</sup> <sup>5</sup> <sup>_p_</sup> <sup>6Þ</sup> <sup>_v_</sup> <sup>1 þ ð</sup> <sup>_p_</sup> <sup>5</sup> <sup>_p_</sup> <sup>6Þ</sup> <sup>_v_</sup> <sup>2 þ</sup> <sup>_p_</sup> <sup>6</sup> <sup>_v_</sup> <sup>3Þ%</sup> <sup>_m_</sup> For a proper _m_ and _r_ 16¼ _r_ 2, _hp_ 1 <sup>and</sup> <sup>_h_</sup> _p_ 2 <sup>can scatter vectors into different positions. Without the</sup> loss of generality, 3 dimensions expand to _d_ dimensions and _hp_ 1 <sup>and</sup> <sup>_h_</sup> _p_ 2 <sup>spread to</sup> <sup>_h_</sup> _pi_ <sup>and</sup> <sup>_h_</sup> _pj_ For a proper _m_ and _r_ 16¼ _r_ 2, _h_ loss of generality, 3 dimensions expand to _d_ dimensions and _hp_ 1 <sup>and</sup> <sup>_h_</sup> _p_ 2 <sup>spread to</sup> <sup>_h_</sup> _pi_ <sup>and</sup> <sup>_h_</sup> _pj_ <sup>. For</sup> well selected prime numbers, the worst case of formula (9) can be avoided, since _hpi_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ 6¼</sup> _p_ 1 <sup>and</sup> <sup>_h_</sup> _p_ 2 <sup>spread to</sup> <sup>_h_</sup> _pi_ <sup>and</sup> <sup>_h_</sup> _pj_ _pi_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ 6¼</sup> [PLOS ONE | https://doi org/10 1371/journal pone 0209159](https://doi.org/10.1371/journal.pone.0209159) December 21 2018 6 / 15 A new BF for numerical vectors with HD _hpj_ <sup>ð</sup> <sup>_V_</sup> <sup>Þ and</sup> <sup>_r_</sup> _i_ <sup>6¼</sup> <sup>_r_</sup> _j_ <sup>,</sup> _i_ _ri_ ¼ _S_ <sup>_h_</sup> _d_ <sup>_p_</sup> <sup>%</sup> <sup>_m_</sup> <sup>¼ ðð</sup> <sup>_pi_</sup> <sup>�</sup> <sup>_d_</sup> <sup>þ1</sup> <sup>_pi_</sup> <sup>�</sup> <sup>_d_</sup> <sup>þ2 . . .</sup> <sup>_pi_</sup> <sup>�</sup> <sup>_d_</sup> <sup>þ</sup> <sup>_d_</sup> <sup>Þ</sup> <sup>_v_</sup> <sup>1 þ ð</sup> <sup>_pi_</sup> <sup>�</sup> <sup>_d_</sup> <sup>þ</sup> <sup>_t_</sup> <sup>. . .</sup> <sup>_pd_</sup> <sup>Þ</sup> <sup>_vt_</sup> <sup>þ</sup> <sup>_pdvd_</sup> <sup>Þ%</sup> <sup>_m_</sup> _i_ _ri_ ¼ _S_ <sup>_h_</sup> _d_ <sup>_p_</sup> _h_ <sup>_p_</sup> _:_ ð12Þ _rj_ ¼ _S_ _d_ _j_ <sup>%</sup> <sup>_m_</sup> <sup>¼ ðð</sup> <sup>_pj_</sup> <sup>�</sup> <sup>_d_</sup> <sup>þ1</sup> <sup>_pj_</sup> <sup>�</sup> <sup>_d_</sup> <sup>þ2 . . .</sup> <sup>_pj_</sup> <sup>�</sup> <sup>_d_</sup> <sup>þ</sup> <sup>_d_</sup> <sup>Þ</sup> <sup>_v_</sup> <sup>1 þ ð</sup> <sup>_pj_</sup> <sup>�</sup> <sup>_d_</sup> <sup>þ</sup> <sup>_t_</sup> <sup>. . .</sup> <sup>_pd_</sup> <sup>Þ</sup> <sup>_vt_</sup> <sup>þ</sup> <sup>_pdvd_</sup> <sup>Þ%</sup> <sup>_m_</sup> 4.2 Algorithm From the above discussion, the Prime_HD_BKDRhash functions can randomly and uniformly map high-dimensional vectors to integers and Algorithms 1 combined with Fig 2 demonstrate the working process. Algorithm 1 . unsigned int Prime_HD_BKDRHash (int <sup>�</sup> V, int k, int d) { 1. unsigned int prime_set = [3,5,7,11,13,17 . . .]; 2. unsigned int S = 0, i = 0; 3. while ( <sup>�</sup> V) 4. S = prime_set [k <sup>�</sup> d+i++] <sup>�</sup> S+ ( <sup>�</sup> V++); 5. return S&0x0FFFFFFF; } The input parameters contain the vector _V_, dimensions _d_ and the _kth_ hash function. After _d_ loops, lines 3 and 4 of Algorithm 1 obtain _hp_ _k_ <sup>¼</sup> <sup>_S_</sup> _i_ <sup>¼ Q</sup> <sup>_p_</sup> _i_ - 1 <sup>�</sup> <sup>_S_</sup> _i_ - 1 <sup>þ</sup> <sup>_v_</sup> _i_ <sup>ð</sup> <sup>_i_</sup> <sup>¼ 1 . . .</sup> <sup>_d_</sup> <sup>Þ. By per-</sup> forming a bitwise AND on _Si_ and 0x0FFFFFFF, the _kth_ Prime_HD_BKDRHash transforms the vector _V_ into an integer that ranges from [0−(2 <sup>32</sup> −1)]. Since different hash functions adopt different prime numbers, the return integers are different. 5. Performances In section 4, we have demonstrated that the Prime_HD_ BKDRHash can randomly and uniformly scatter the high-dimensional vectors of a set to integers in the range of 0 to 2 <sup>32</sup> −1. Therefore, the P-HDBF satisfies the theory of the BF, including all parameters and their relationships. 5.1 False positive probability (FPP), m, n, k and false negative probability (FNP) FPP. Let there be _k_ hash functions, a counter array of size _m_ and a set containing _n_ vectors with _d_ numerical dimensions. After the _n_ vectors are mapped onto the P-HDBF, the false positive probability of the P-HDBF is [15]. _k_ �ð1 � _e_ - <sup>_<u>nk</u>_</sup> _<u>m</u>_ Þ _k:_ ð13Þ _fP_ - _HDBF_ ¼ ð1 �ð1 � 1 _=m_ Þ _nk_ Þ Counters. For fixed _k_, _n_ and FPP, t he counters that the P-HDBF requires are _<u>kn</u>_ _m_ ¼ � lnð1 � _fP_ - _HDBF_ 1 _=k_ Þ <sup>_:_</sup> ð14Þ Maximum cardinality. For fixed _m_, _k_ and FPP, the maximum number of the vectors the P-HDBF can represent is _k_ <u>Þ �</u> _<u>m</u>_ _n_ 0 ¼ � <sup><u>lnð1 �</u></sup> <sup>_<u>e</u>_</sup> <sup>l</sup> <sup>~~n~~</sup> <sup>_<u>f</u>_</sup> <sup><u>0</u></sup> _:_ ð15Þ _k_ [PLOS ONE | https://doi org/10 1371/journal pone 0209159](https://doi.org/10.1371/journal.pone.0209159) December 21 2018 7 / 15 A new BF for numerical vectors with HD Minimum number of hash functions. For fixed _m_, _n_ and FPP, the minimum number of hash functions is _k_ min ¼ ln 2 ~~ð~~ <sup>_<u>m</u>_</sup> ð16Þ _n_ <sup>~~Þ~~</sup> <sup>_:_</sup> False negative probability (FNP). The FNP of the P-HDBF is _fnpP_ - _HDBF_ ¼ 0 _:_ ð17Þ 5.2 Time complexity For a hash _hj_ and a query _q_, every numerical dimension _qi_ will participate in the computation. By computing the _k_ hashes, the P-HDBF obtains _k_ integers. Next, by mapping _hj_ ( _q_ )% _m_, the P-HDBF checks whether the corresponding _k_ counters are greater than or equal to 0. If any counter is 0, we know that the query is not in the set. If all counters are larger than 0, the query is determined as a member of the set with a small FPP. For a set of _n_ elements with _d_ dimensions, its initialization time complexity is _O_ ð _kn_ Þ _:_ ð18Þ The time complexity of insertion/deletion/query of a vector is _O_ ð _k_ Þ _:_ ð19Þ 6. Experiment 6.1. Dataset and setting To verify the effectiveness of the P-HDBF on high-dimensional numeric vectors, this paper adopts 3 picture datasets, including Colour [39], Sift [40] and Gist [40], used in most experiments. On these datasets, we compare the performances of the P-HDBF with the CBF, PBF-HT and PBF-BF. The CBF is the classical method in all variants and the PBF-HT and PBF-BF support the query of multiple dimensions. The Colour includes 70,000(70K) vectors with 32 dimensions, and the values are expanded to positive integers. The Sift and Gist contain 100,000 (100K) vectors with 128 and 960 dimensions, respectively, and values of dimensions are all positive integers. All query vectors are different from the samples and are set to 10,000 (10K). The experiments were conducted on a computer with an Intel Xeon E5-2603 v3 and 16GB RAM. 6.2 Distribution and entropy The key of the BF is that the data can be randomly and uniformly projected by hash functions. To verify this performance, we first introduce information entropy of the array in the BF after Prime_HD_BKDRHash mapping. Information entropy can describe the randomness of a system, and a larger entropy indicates a greater dispersed state. Let _v_ ’ be the number of the elements allocated in a counter of the array, and _n_ and _m_ be the size of the set and the array, respectively. Then, the proportion of the vectors allocated in the counter can be calculated by _p_ - _v_ ’/ _kn_, and the entropy of all counters is defined as follows. X - _p_ log _p_ _m_ _E_ ¼ X _m_ �ð _v_ <sup>0</sup> _=kn_ Þlogð _v_ <sup>0</sup> _=kn_ Þ _:_ ð20Þ Let _k_ = 6 and _m_ = 25 _n_ . Figs 3 and 4 display the number of the vectors allocated in different counters (denoted as distribution) and entropies of the P-HDBF and the CBF on the 3 datasets. As Fig 3 shows, the distribution of the P-HDBF is similar to the CBF, which implies that the [PLOS ONE | https://doi org/10 1371/journal pone 0209159](https://doi.org/10.1371/journal.pone.0209159) December 21 2018 8 / 15 A new BF for numerical vectors with HD Fig 3. Number of vectors allocated in different counters of the CBF and the P-HDBF on colour (d = 32), Sift (d = 128) and Gist <u>(d = 960).</u> [https://doi.org/10.1371/journal.pone.0209159.g003](https://doi.org/10.1371/journal.pone.0209159.g003) vectors are uniformly allocated in different counters. Fig 4 shows that the entropy of the P-HDBF is slightly larger than that of the CBF under different samples and dimensions, especially in a high-dimensional space. From the view of the entropy, larger entropy means better discretization and less collision. Figs 3 and 4 reflect that the Prime_HD_BKDRHash can scatter vectors more randomly and uniformly, especially for the high-dimensional vectors of a big data set (on Gist with d = 960). This implies that the FPP of the query after mapping by the uniform Prime_HD_BKDRHash will be less than that of multiple string hashes. The uniform Prime_HD_BKDRHash can project the numerical vectors as the inputs of the original formats and substitute multiple different string hashes of the BF. 6.3 Relationships of the FPP, n, m, d and k This section will show whether the P-HDBF is consistent with the theory of the Bloom filter, and the indicators include the FPP, n, m, k and their relationships. The CBF, as a classical BF, <u>Fig 4.</u> <u>Entropy of the CBF and P-HDBF under different samples and dimensions.</u> [https://doi.org/10.1371/journal.pone.0209159.g004](https://doi.org/10.1371/journal.pone.0209159.g004) [PLOS ONE | https://doi org/10 1371/journal pone 0209159](https://doi.org/10.1371/journal.pone.0209159) December 21 2018 9 / 15 A new BF for numerical vectors with HD <u>Fig 5.</u> <u>FPPs of the CBF and P-HDBF with an increasing n.</u> [https://doi.org/10.1371/journal.pone.0209159.g005](https://doi.org/10.1371/journal.pone.0209159.g005) is applied for comparison with the P-HDBF, and the P-HDBF should show the same tendencies as the CBF. By fixing one or two parameter(s) in turn, Figs 5, 6 and 7 show the FPPs’ changes with other parameters changing. For the fixed memory costs (m) and the number of the hash functions (k), the increased collision rate causes the FPP growing. Let _m_ = 50 _k_ and _k_ = 6. Fig 5 displays the increased tendencies of the FPPs as the cardinality of the set increases, even to 100%. Then, by fixing memory costs (0.21 MB, 0.28 MB, and 0.35 MB), Fig 6 demonstrates the FPPs as _k_ increases on the 3 datasets. For the fixed number of samples (n) and memory costs (m), the number of the hash functions (k) determines the FPP. Firstly, the FPP will decrease as _k_ grows and reach to a minimum value, then the increasing collisions will result in a low FPP. With _k_ rising, both FPPs sharply decrease, reach a minimum value, and then increase slowly, which is consistent with the theory of the BF. Lastly, for _k_ = 6, Fig 7 displays the similar changes in the FPPs of the CBF and the P-HDBF as _m_ increases from 5 _n_ to 25 _n_ . For fixed _k_ and _n_, the FPP will be decided by memories allocated to them, and a large _m_ can effectively reduce the FPPs. To further observe the performance of the P-HDBF in a high dimensional space, an extra experiment is added. Let _n_ = 70 _K_ (100 _K_,100 _K_ ), _k_ = 6 and the memory be 0.35 MB. Fig 8 demonstrates the changes of the FPPs with increasing dimensions. The FPPs of the P-HDBF are lower than those of the CBF, especially in certain high dimensional cases. For different _m_, _n_ and _k_, the FPPs’ changes of the CBF and the P-HDBF are almost the same. Even the performance of the P-HDBF is better than the CBF, which implies that the P-HDBF can replace the CBF to process high-dimensional vectors. Meanwhile, the FPPs’ changes of the P-HDBF are consistent with the theory in section 5. Next, we will continue to compare the performance of the P-HDBF with other methods. 6.4 Compared with other methods Let _FPP_ �[0.0001−0.0005], _m_ = 25 _n_ and _k_ = 6. This paper compares the memory usages of the CBF, PBF-BF and PBF-HT with the P-HDBF on 3 datasets, as shown in Fig 9. For the fixed FPP, the CBF and the P-HDBF have memory overheads. However, the memory costs of the PBF-BF and the PBF-HT grow with increased sample sizes and dimensions. <u>Fig 6.</u> <u>FPPs of the CBF and the P-HDBF under different k and memory costs.</u> [https://doi.org/10.1371/journal.pone.0209159.g006](https://doi.org/10.1371/journal.pone.0209159.g006) [PLOS ONE | https://doi org/10 1371/journal pone 0209159](https://doi.org/10.1371/journal.pone.0209159) December 21 2018 10 / 15 A new BF for numerical vectors with HD <u>Fig 7.</u> <u>FPPs of the CBF and P-HDBF with the memory increase.</u> [https://doi.org/10.1371/journal.pone.0209159.g007](https://doi.org/10.1371/journal.pone.0209159.g007) <u>Fig 8.</u> <u>FPPs of the CBF and P-HDBF under different dimensions.</u> [https://doi.org/10.1371/journal.pone.0209159.g008](https://doi.org/10.1371/journal.pone.0209159.g008) <u>Fig 9.</u> <u>Memory costs under different samples and dimensions.</u> [https://doi.org/10.1371/journal.pone.0209159.g009](https://doi.org/10.1371/journal.pone.0209159.g009) Figs 10 and 11 exhibit the average initiation and query time of different schemes under 10K query vectors. Since these schemes need to split all vectors and project them into the storing arrays, the initiation and query times will continue to increase with larger samples and more dimensions. Compared with the PBF-BF and PBF-HT, the CBF and the P-HDBF only require dividing the dimensions and computing the hash values. Therefore, their initiation and query times increase slowly with more dimensions. The initiation time and query delays of the CBF and P-HDBF are far smaller than those of the PBF-BF and PBF-HT. [PLOS ONE | https://doi org/10 1371/journal pone 0209159](https://doi.org/10.1371/journal.pone.0209159) December 21 2018 11 / 15 A new BF for numerical vectors with HD <u>Fig 10.</u> <u>Average initiation time of the PBF-HT, PBF-BF, CBF and P-HDBF with</u> _<u>FPP</u>_ <u>�</u> <u>[0.0001−0.0005] and</u> _<u>k</u>_ <u>= 6.</u> [https://doi.org/10.1371/journal.pone.0209159.g010](https://doi.org/10.1371/journal.pone.0209159.g010) <u>Fig 11.</u> <u>Average query delays of the PBF-HT, PBF-BF,CBF and P-HDBF with</u> _<u>FPP</u>_ <u>�</u> <u>[0.0001−0.0005] and</u> _<u>k</u>_ <u>= 6.</u> [https://doi.org/10.1371/journal.pone.0209159.g011](https://doi.org/10.1371/journal.pone.0209159.g011) Therefore, for a given FPP and a dataset with high-dimensional vectors, the P-HDBF will be a better choice than the PBF-based schemes by avoiding a long member query delay and huge memory costs. 7. Conclusions Regardless of the formats of the inputs, the traditional Bloom filters adopt multiple string hashes to implement memberships queries of a big data set. To map the inputs with numerical high dimensions in their original type(s), this paper proposes a uniform Prime_HD_BKDRHash function and establishes a P-HDBF structure, a new Bloom filter, to store and query members of a big data set with numerical dimensions. The unified Prime_HD_BKDRHash can randomly and uniformly project the inputs (other than multiple string hashes) into [PLOS ONE | https://doi org/10 1371/journal pone 0209159](https://doi.org/10.1371/journal.pone.0209159) December 21 2018 12 / 15 A new BF for numerical vectors with HD different integers. The performances and parameters of the P-HDBF have been theoretically discussed. The experiments show that the P-HDBF, as a substitute for the counting Bloom filter in high-dimensional numerical spaces, can obtain excellent data discretization and a good performance. Compared with the methods based on the parallel Bloom filters, the P-HDBF will not increase memory use or query delays as dimensions increase and can be used in applications with limited CPU and memory resources. The P_HDBF can be applied in some applications, such as identify the nuances of pictures. Acknowledgments The authors would like to thank Matthijs Douze and Cordelia Schmid for their data sources, [data and interpretation of data (http://corpus-texmex.irisa.fr/).](http://corpus-texmex.irisa.fr/) Disclaimer : The authors alone are responsible for the views expressed in this article and they do not necessarily represent the views, decisions or policies of the institutions with which they are affiliated. Author Contributions Conceptualization: Chunyan Shuai. Data curation: Xin Ouyang. Funding acquisition: Chunyan Shuai, Xin Ouyang. Methodology: Chunyan Shuai, Jiayou Lei. Software: Xin Ouyang. Supervision: Chunyan Shuai. Visualization: Zeweiyi Gong. Writing – original draft: Zeweiyi Gong. Writing – review & editing: Chunyan Shuai. References 1. Bloom BH. Space/Time Trade-Offs in Hash Coding with Allowable Errors. Communications of the ACM. 1970; 13: 422–426. 2. Geravand S, Ahmadi M. Bloom Filter applications in network security: A state-of-the-art survey. Computer Networks. 2013; 57: 4047–4064. 3. Mun JH, Lim H. New approach for efficient IP address lookup using a Bloom filter in trie-based algorithms. IEEE Transactions on Computers. 2016; 65: 1558–1565. 4. Antikainen M, Aura T, Sa¨rela¨ M. Denial-of-service attacks in Bloom-filter-based forwarding. IEEE/ACM Transactions on Networking (TON). 2014; 22: 1463–1476. 5. Saravanan K, Senthilkumar A. Security enhancement in distributed networks using link-based mapping scheme for network intrusion detection with enhanced Bloom filter. Wireless Personal Communications. 2015; 84: 821–839. 6. Tarkoma S, Rothenberg CE, Lagerspetz E. Theory and practice of Bloom Filters for distributed systems. IEEE Communications Surveys & Tutorials. 2012; 14: 131–155. 7. Jiang P, Ji Y, Wang X, Zhu J, Cheng Y. Design of a multiple Bloom filter for distributed navigation routing. IEEE Transactions On Systems, Man, And Cybernetics: Systems. 2014; 44: 254–260. 8. Oigawa Y, Sato F. An Improvement in Zone Routing Protocol Using Bloom Filter. 19th International Conference on Network-Based Information Systems (NBiS); 2016 Sept 07–09; Ostrava, Czech Republic. 9. Ko H, Lee G, Pack S, Kweon K. Timer-based Bloom Filter aggregation for reducing signaling overhead in distributed mobility management. IEEE Transactions on Mobile Computing. 2016; 15: 516–529. [PLOS ONE | https://doi org/10 1371/journal pone 0209159](https://doi.org/10.1371/journal.pone.0209159) December 21 2018 13 / 15 A new BF for numerical vectors with HD 10. Zengin S, Schmidt EG. A Fast and Accurate Hardware String Matching Module with Bloom Filters. IEEE Transactions on Parallel and Distributed Systems. 2016; 28: 305–317. 11. Liu J, Chen S, Wang G, Wu T. Page replacement algorithm based on counting Bloom filter for NAND flash memory. IEEE Transactions on Consumer Electronics. 2014; 60: 636–643. 12. Fan L, Cao P, Almeida J, Broder AZ. Summary cache: a scalable wide-area web cache sharing protocol. IEEE/ACM Trans. Networking. 2000; 8: 281–293. 13. Pontarelli S, Reviriego P, Maestro JA. Improving counting Bloom filter performance with fingerprints. Information Processing Letters. 2016; 116: 304–309. 14. Lim H, Lee J, Byun H, Yim C. Ternary Bloom Filter Replacing Counting Bloom Filter. IEEE Communications Letters. 2017; 21: 278–281. 15. Mitzenmacher M. Compressed Bloom Filters. IEEE/ACM Transactions on Networking. 2002; 10: 604– 612. 16. Cohen S, Matias Y. Spectral Bloom Filters. Proceedings of the 2003 ACM SIGMOD international conference on Management of data; 2003 June 09–12; San Diego, California, US. 17. Guo D, Wu J, Chen H, Yuan Y, Luo X. The dynamic Bloom Filters. IEEE Transactions on Knowledge and Data Engineering. 2010; 22: 120–133. 18. Fan B, Andersen DG, Kaminsky M, Mitzenmacher MD. Cuckoo filter: Practically better than bloom. Proceedings of the 10th ACM International on Conference on emerging Networking Experiments and Technologies; 2014 December 02–05; Sydney, Australia. 19. Xiao MZ, Dai YF, Li XM. Split Bloom Filters. Acta Electronica Sinica. 2004; 32: 241–245. 20. Xiao B, Hua Y. Using parallel Bloom Filters for multiattribute representation on network services. IEEE Transactions on parallel and distributed systems. 2010; 21: 20–32. 21. [Partow A. General Purpose Hash Function Algorithms. 2013. Available from: http://www.partow.ne-t/](http://www.partow.ne-t/programming/hashfunctions/DEKHashFunction) [programming/hashfunctions/DEKHashFunction](http://www.partow.ne-t/programming/hashfunctions/DEKHashFunction) 22. Kirsch A, Mitzenmacher M. Distance-Sensitive Bloom Filters. In: The Eighth Workshop on Algorithm Engineering and Experiments (ALENEX06). Society for Industrial and Applied Mathematics; 2006. pp. 41–51. 23. Hua Y, Xiao B, Veeravalli B, Feng D. Locality-sensitive Bloom Filter for Approximate Membership Query. IEEE Transactions on Computers. 2012; 61: 817–830. 24. Qian J, Zhu Q, Chen H. Multi-Granularity Locality-Sensitive Bloom Filter. IEEE Transactions on Computers. 2015; 64: 3500–3514. 25. Qian J, Zhu Q, Chen H. Integer-Granularity Locality-Sensitive Bloom Filter. IEEE Communications Letters. 2016; 20: 2125–2128. 26. Datar M, Immorlica N, Indyk P, Mirrokni VS. Locality-Sensitive Hashing Scheme Based on P-Stable Distributions. In: Proceedings of the twentieth annual symposium on Computational geometry. New York: ACM; 2004. pp. 253–262. 27. Kernighan BW, Ritchie D. C Programming Language. 2nd ed. London: Prentice-Hall; 1988. 28. Rottenstreich O, Keslassy I. The Bloom paradox: When not to use a Bloom Filter. IEEE/ACM Transactions on Networking (TON). 2015; 23: 703–716. 29. Bose P, Guo H, Kranakis E, Maheshwari A, Morin P, Morrison J, et al. On the false-positive rate of Bloom filters. Information Processing Letters. 2008; 108: 210–213. 30. Christensen K, Roginsky A, Jimeno M. A new analysis of the false positive rate of a Bloom filter. Information Processing Letters 2010; 110: 944–949. 31. Rottenstreich O, Kanizo Y, Keslassy I. The variable-increment counting Bloom filter. IEEE/ACM Transactions on Networking (TON). 2014; 22: 1092–1105. 32. Qiao Y, Li T, Chen S. Fast Bloom Filters and their generalization. IEEE Transactions on Parallel and Distributed Systems. 2014; 25: 93–103. 33. Reviriego P, Christensen K, Maestro JA. A Comment on “Fast Bloom Filters and Their Generalization”. IEEE Transactions on Parallel and Distributed Systems. 2016; 27: 303–304. 34. Crainiceanu A, Lemire D. Bloofi: Multidimensional Bloom Filters. Information Systems. 2015; 54: 311– 324. 35. Fu Y, Biersack E. False-Positive Probability and Compression Optimization for Tree-Structured Bloom Filters. ACM Transactions on Modeling and Performance Evaluation of Computing Systems (TOMPECS). 2016; 1: 19. 36. Heyde CC. Central Limit Theorem. In: Convergence of Stochastic Processes. New York: Springer; 1984. pp. 3244–3248. [PLOS ONE | https://doi org/10 1371/journal pone 0209159](https://doi.org/10.1371/journal.pone.0209159) December 21 2018 14 / 15 A new BF for numerical vectors with HD 37. Katz VJ. Chapter 3: Chinese Mathematics. In: The Mathematics of Egypt, Mesopotamia, China, India and Islam: A Sourcebook. Princeton University Pres; 2007. pp. 187–384. 38. Feistel H. Cryptography and Computer Privacy. Scientific American. 1973; 228:15–23. 39. Fagin R, Kumar R, Sivakumar D. Efficient similarity search and classification via rank aggregation. Proceedings of the 2003 ACM SIGMOD international conference on Management of data; 2003 June 09– 12; San Diego, California, US. 40. [Amsaleg L. Datasets for approximate nearest neighbor search. 2017. Available from: http://corpus-](http://corpus-texmex.irisa.fr/) [texmex.irisa.fr/](http://corpus-texmex.irisa.fr/) [PLOS ONE | https://doi org/10 1371/journal pone 0209159](https://doi.org/10.1371/journal.pone.0209159) December 21 2018 15 / 15

섹션 본문 52문단 · 20,555자

(제목 없음)

1The notable increase in the size and dimensions of data have presented challenges for data storage and retrieval. The Bloom filter and its generations, due to efficient space overheads and constant query delays, have been broadly applied to querying memberships of a big data set. However, the Bloom filter and most of the variants regard each element as a 1dimensional string and adopt multiple different string hashes to project the data. The interesting problem is when the inputs are numerical vectors with high dimensions, it remains unknown whether they can be projected into the Bloom filter in their original format. Furthermore, we investigate whether the projection is random and uniform. To address these problems, this paper presents a new uniform Prime-HD-BKDERhash family and a new Bloom filter (P-HDBF) to retrieve the membership of a big data set with the numerical high dimensions. Since the randomness and uniformity of data mapping determines the performance of the Bloom filter, to verify these properties, we first introduce information entropy. Our theoretical and experimental results show that the P-HDBF can randomly and uniformly map the data in their native formats. Moreover, the P-HDBF provides an efficient solution alternative to implement membership search with space-time overheads. This advantage may be suitable for engineering applications that are resource-constrained or identification of the nuances of the graphics and images.OPEN ACCESSCitation: Shuai C, Lei J, Gong Z, Ouyang X (2018) Suitability of a new Bloom filter for numerical vectors with high dimensions. PLoS ONE 13(12): e0209159. https://doi.org/10.

Introduction

2With increasing data sizes, concise data representations and efficient query algorithms have become the key factors to large-scale data management. As a result, a large number of technologies have appeared, such as the Bloom filter (BF) [1]. The BF has a low query delay and a high time-space overhead, leading to its broad use in computing areas, such as network and network security [2][3][4][5], distributed systems [6][7][8][9] and applications or embedded devices [10,11], with limited computing and storage resources. Moreover, many variants have been proposed, including the counting Bloom filter (CBF) [12] and its improvements [13][14], the compressed Bloom filter [15], the spectral Bloom filter [16], the dynamic Bloom filter [17], the Cuckoo Filter [18], and the parallel BFs (PBF-HT and PBF-BF) [19,20]. PLOS The BF can perform well and obtain a low false positive probability (FPP) only when the hash randomly and uniformly disperses the data, and usually, string hash functions [21] are the default choices. Regardless of the data format, the string hash takes the input as a 1-dimensional string, rather than its original format, and iteratively computes every character to obtain a random integer. To better scatter the data into different places and reduce the FPP, multiple different string hashes are usually selected. To project numerical vectors with high dimensions in their original formats, LshBFs [22][23][24][25] replace the string hashes with a uniform locality sensitive hashing (LSH) [26]. However, since the LSH gathers the data around the mean, LshBFs are more suitable for approximate nearest neighbours queries, rather than membership queries.

3When the inputs are numerical vectors with high dimensions, this paper proposes dealing with them in their original formats other than strings. First, a unified prime BKDERhash [27] function family, denoted as Prime-HD-BKDERhash, is proposed to substitute for multiple different string hashes. Meanwhile, information entropy is introduced in the BF to verify the randomness and uniformity of the data mapped by the Prime-HD-BKDERhash. Next, by combining the unified Prime-HD-BKDERhash with a counter array, a new BF called P-HDBF is established to store and retrieve the memberships of the big data set. The theoretical analysis and experiments show that the Prime-HD-BKDERhash can disperse elements more effectively than the string hashes, and the P-HDBF is more suitable to represent and query the numerical vectors of a big data set in high-dimensional spaces, which has low space-time costs. Compared with the PBF-HT and PBF-BF, the P-HDBF possesses low false detection rates, low query delays and low space requirements. The advantages of the constant query delay and low space-time costs make the P-HDBF more appropriate for some engineering applications with constrained computing and storage resources, such as distinguish the nuances of the graphics and images.

4The remainder of this paper is organized as follows. Related works are described in section 2. The design of Bloom filter and our structure are presented in section 3. The theoretical analyses and proofs are in Sections 4 and 5. Section 6 presents the related performance evaluation and experiments. Section 7 presents the study's conclusions.

Related work

5This section provides a brief survey related to the Bloom filter designs and its variants that are suitable for element deletion and multi-dimensional vectors.

6A Bloom filter [1] utilities a slightly array to store a big data set. This filter uses the mappings of multiple string hashes to answer whether a query is member of the set with a small false positive probability or not. To support element deletion, the counting Bloom filter (CBF) [12] proves that a 4-bit counter array will be sufficient to defend against overflows brought by element deletion. The FPP, array size and cardinality of the BF have been discussed in [28][29][30]. The variable incremental counting Bloom filter (VI-CBF) [31] increases the counter by a variable increment rather than the unaltered increment to reduce memory costs. Moreover, with the same counter width, the query in VI-CBF can get a more complete answer than in CBF. The Cuckoo filter [18] consists of an array of buckets where each item has two candidate buckets. The filter computes every item's two fingerprints and bucket positions using hash functions h 1 (x) = h(x) and h 2 (x) = h 1 (x)�h (h is x's fingerprint). The lookup procedure checks both buckets to see if either one contains the query to determine the membership. Since the insert procedure will continuously relocate existing fingerprints to their alternatives until no more buckets can be allocated, it efficiently reduces the memory costs but results in a long computational time.

7Bloom-1 [32] achieves a reduced query overhead at the cost of a higher FPP for a given memory size. Reviriego [33] provides a correct analysis of Bloom-1 and gives out an exact FPP. For the fixed FPP and cardinality of a dataset, the spaces that a BF required are determined. Once a number of extra elements are added in, the FPP will increase quickly. Therefore, the traditional BF is suitable for static sets. The Spectral BF [16] and Dynamic BF (DBF) [17] extend the BF to multi-set and dynamic sets, respectively. To determine which BF an element belongs to in cloud environment, Bloofi [34] organizes different BFs in a hierarchical index structure similar to a B+ tree and the FPP of the hierarchical Bloofi is discussed in [35].

8These BFs recognize the inputs as 1-dimensional strings. PBF [20], PBF-HT and PBF-BF [21] have been developed to store and query multi-dimensional elements. The PBF consists of multiple parallel standard BFs, and each standard BF represents an attribute. Due to the destruction of the integrity of the attributes, the PBF generates a high FPP. Furthermore, to reduce the FPP, the PBF-HT (PBF-BF) adds a hash table (a check BF) to the PBF. Let d be the number of dimensions, let m 1 and m 2 be the sizes of the array of the BF and the HT (or the checkBF), and let k 1 and k 2 be numbers of hash functions of the PBF and the HT (or the check BF), respectively. The memory cost and query delay of the PBF-BF (or PBF-HT) are dm 1 +m 2 and k 1 d+k 2 , respectively. Both of them grow linearly as dimensions increase and result in huge memory wastes and query delays. Rather than applying multiple different string hashes to map the inputs into different integers, the LshBF schemes [22][23][24][25] apply locality sensitive hashing (LSH) [26] functions to directly transform high-dimensional vectors into serial real numbers by performing the dot product with the input dimensions and mapping similar vectors in the Euclidean space to near location(s). The LSH avoids "dimensional disasters" but results in a high FPP when querying memberships. To reduce the FPP, the LshBF-BF [23] adds a verification BF to further disperse vectors. According to the central limited theorem [36], the LSH shrinks all elements of the set around the mean. For example, when the LSH satisfies the standard normal distribution, approximately 68.5% of the elements gather between the negative and positive variance after mapping, which makes it more suitable for approximate nearest neighbours search.

Standard Bloom filter and Counter Bloom filter

9. A Bloom filter contains k independent string hash functions h j (j = 1,. . .,k) and an array of m bits initiated to 0. By projecting k hashes, the BF stores n elements of a set S (V 1 ,V 2 . . .V n ) into the bit array. For h j (j = 1,. . .,k) and V i (i�n), the bit h j (V i )%m is set to 1. A bit can be set to 1 multiple times, but only the first change has an effect. Given a query q, if h j (q)%m = 1 for all h j (j = 1,. . .,k), the q is accepted as a member of S with a false positive probability (FPP).

10The BF assumes that each h j (j = 1,. . .,k) can randomly and uniformly map elements. Usually, h j is a string hash [21], such as sax_hash and RSHash. By repeatedly iterating every character of V i , h j obtains an integer in the range of [0−(2 31 -1)] (32 bits length) as the random hash fingerprint of V i . For example, given two vectors X(357,246,369) and Y(468,369,157), the sax_ hash function (h 1 ) uses ASCII codes of characters '3','5','7',',','2'. . . of X to iteratively compute a random integer. Then, the counter h 1 (X)%m is added with 1, as shown in Fig 1.

Prime high dimensional Bloom filter

11To address numerical vectors with high dimensions in their original formats other than strings, a new uniform hash function family, denoted as Prime_HD_BKDRHash, is proposed.

12Based on the unified Prime_HD_BKDRHash and a counter array, a new BF called P-HDBF is built, as shown in Fig 2. (1) Prime_HD_BKDRHash. It originates from the BKDRHash function [27] and prime numbers. Given a prime number set P = [3,5,7,11,13,17. . .](except of 2) and a d dimensional

13, d dimensions contribute to the last hash value. Although the jth operation and the (j+1)th operation are same, the corresponding prime numbers are different. Therefore, h j (V) and h j+1 (V) will get different hash values (details in section 4.1).

14(2)A counter array (CA). The array of P-HDBF contains m counters and each counter occupies 4 bits, which is enough to defend against the FNP brought by deleting elements [12]. When k random integers are calculated by k Prime_HD_BKDRHash functions, the counter h j (V)%m(1�j�k) of the CA is added to 1.

Theoretical analysis

15The BF structure can work well only when the hashes can randomly and uniformly project all elements, since it is the basis of the BF. Therefore, this section will discuss the hash family-Pri-me_H-D_BKDRHash which is based on BKDRHash [27], and demonstrate why it is effective

Prime_HD_ BKDRHash

16Theorem 1. By h p mapping, all vectors V j (v 1 ,. . .,v d ) with d dimensions in a set will be randomly and uniformly projected to different integers.

17Proof.

18Let p i <2 32 , 0<v i �2 32 (i = 1,. . .,d), α d = 1 and α d−1 = p d �α d . For any i = 1,. . .,d−1, α i = p i+1 �α i+1 >0 and α j >α i (j>i). If α i <2 32 and any α j �v j >2 32 (j>i), α j �v j overflows, and the overflow part will be discarded by the 32-bit CPU. Since p j 2P (without 2), p i is an odd number, and the multiplication of odd numbers is still an odd number. Since 9x'2N,

19If α i <2 32 and α i−1 = p i �α i >2 32 , there always exists z i−1 = 2x+1(x2N), which makes

20and

21The same operations are applied on other fields from α 1 �v 1 to α i−3 �v i−3 . For v i 2N, all 2 32 �v i−1 and p j �. . .�p i−1 �2 32 �v j (1�j<i−2) will be discarded by the 32-bit CPU due to overflow. Then,

22If p j . . .�p i−1 �z i-1 = 2 32 +z(j<i), the CPU will iteratively discard the overflows. After multiple iterations,

23where, for example,

24Next, according to congruence theory [37],

25Worst case: Since p i 2P (without 2), p i is an odd number, and the multiplication of odd numbers is still an odd number. Let n i be positive integers. Then,

26For S d , if 2n i �2 32 , the CPU will discard the overflow part. At worst, for all i,

27The function S d %m maps the S d into the counter array, according to congruence theory [37].

28From formulas (7) and (9), even in the worst case, every dimension v i contributes to S d %m. In fact, from formula (7) (1),

29where p 1 <p 2 <p 3 <p 4 <p 5 <p 6 and p i 2P. Therefore, S h p

30For a proper m and r 1

Algorithm

31From the above discussion, the Prime_HD_BKDRhash functions can randomly and uniformly map high-dimensional vectors to integers and Algorithms 1 combined with Fig 2 demonstrate the working process.

32By performing a bitwise AND on S i and 0x0FFFFFFF, the kth Prime_HD_BKDRHash transforms the vector V into an integer that ranges from [0−(2 32 −1)]. Since different hash functions adopt different prime numbers, the return integers are different.

Performances

33In section 4, we have demonstrated that the Prime_HD_ BKDRHash can randomly and uniformly scatter the high-dimensional vectors of a set to integers in the range of 0 to 2 32 −1. Therefore, the P-HDBF satisfies the theory of the BF, including all parameters and their relationships.

False positive probability (FPP), m, n, k and false negative probability (FNP)

34FPP. Let there be k hash functions, a counter array of size m and a set containing n vectors with d numerical dimensions. After the n vectors are mapped onto the P-HDBF, the false positive probability of the P-HDBF is [15].

35Counters. For fixed k, n and FPP, the counters that the P-HDBF requires are

36Maximum cardinality. For fixed m,k and FPP, the maximum number of the vectors the P-HDBF can represent is

37Minimum number of hash functions. For fixed m, n and FPP, the minimum number of hash functions is

38False negative probability (FNP). The FNP of the P-HDBF is

Time complexity

39For a hash h j and a query q, every numerical dimension q i will participate in the computation. By computing the k hashes, the P-HDBF obtains k integers. Next, by mapping h j (q)%m, the P-HDBF checks whether the corresponding k counters are greater than or equal to 0. If any counter is 0, we know that the query is not in the set. If all counters are larger than 0, the query is determined as a member of the set with a small FPP. For a set of n elements with d dimensions, its initialization time complexity is

40The time complexity of insertion/deletion/query of a vector is

41OðkÞ:

426. Experiment

Dataset and setting

43To verify the effectiveness of the P-HDBF on high-dimensional numeric vectors, this paper adopts 3 picture datasets, including Colour [39], Sift [40] and Gist [40], used in most experiments. On these datasets, we compare the performances of the P

Distribution and entropy

44The key of the BF is that the data can be randomly and uniformly projected by hash functions.

45To verify this performance, we first introduce information entropy of the array in the BF after Prime_HD_BKDRHash mapping. Information entropy can describe the randomness of a system, and a larger entropy indicates a greater dispersed state. Let v' be the number of the elements allocated in a counter of the array, and n and m be the size of the set and the array, respectively. Then, the proportion of the vectors allocated in the counter can be calculated by p�v'/kn, and the entropy of all counters is defined as follows.

46Let k = 6 and m = 25n. Figs 3 and 4 display the number of the vectors allocated in different counters (denoted as distribution) and entropies of the P-HDBF and the CBF on the 3 datasets. As Fig 3 shows, the distribution of the P-HDBF is similar to the CBF, which implies that the vectors are uniformly allocated in different counters. Fig 4 shows that the entropy of the P-HDBF is slightly larger than that of the CBF under different samples and dimensions, especially in a high-dimensional space. From the view of the entropy, larger entropy means better discretization and less collision. Figs 3 and 4 reflect that the Prime_HD_BKDRHash can scatter vectors more randomly and uniformly, especially for the high-dimensional vectors of a big data set (on Gist with d = 960). This implies that the FPP of the query after mapping by the uniform Prime_HD_BKDRHash will be less than that of multiple string hashes. The uniform Prime_HD_BKDRHash can project the numerical vectors as the inputs of the original formats and substitute multiple different string hashes of the BF.

Relationships of the FPP, n, m, d and k

47This section will show whether the P-HDBF is consistent with the theory of the Bloom filter, and the indicators include the FPP, n, m, k and their relationships. The CBF, as a classical BF, For the fixed number of samples (n) and memory costs (m), the number of the hash functions (k) determines the FPP. Firstly, the FPP will decrease as k grows and reach to a minimum value, then the increasing collisions will result in a low FPP. With k rising, both FPPs sharply decrease, reach a minimum value, and then increase slowly, which is consistent with the theory of the BF.

48Lastly, for k = 6, Fig 7 displays the similar changes in the FPPs of the CBF and the P-HDBF as m increases from 5n to 25n. For fixed k and n, the FPP will be decided by memories allocated to them, and a large m can effectively reduce the FPPs.

49To further observe the performance of the P-HDBF in a high dimensional space, an extra experiment is added. Let n = 70K(100K,100K), k = 6 and the memory be 0.35 MB. Fig 8 demonstrates the changes of the FPPs with increasing dimensions. The FPPs of the P-HDBF are lower than those of the CBF, especially in certain high dimensional cases.

50For different m, n and k, the FPPs' changes of the CBF and the P-HDBF are almost the same. Even the performance of the P-HDBF is better than the CBF, which implies that the P-HDBF can replace the CBF to process high-dimensional vectors. Meanwhile, the FPPs' changes of the P-HDBF are consistent with the theory in section 5. Next, we will continue to compare the performance of the P-HDBF with other methods.

Compared with other methods

51Let FPP�[0.0001−0.0005], m = 25n and k = 6. This paper compares the memory usages of the CBF, PBF-BF and PBF-HT with the P-HDBF on 3 datasets, as shown in Fig 9. For the fixed FPP, the CBF and the P-HDBF have memory overheads. However, the memory costs of the PBF-BF and the PBF-HT grow with increased sample sizes and dimensions. 10 and 11 exhibit the average initiation and query time of different schemes under 10K query vectors. Since these schemes need to split all vectors and project them into the storing arrays, the initiation and query times will continue to increase with larger samples and more dimensions. Compared with the PBF-BF and PBF-HT, the CBF and the P-HDBF only require dividing the dimensions and computing the hash values. Therefore, their initiation and query times increase slowly with more dimensions. The initiation time and query delays of the CBF and P-HDBF are far smaller than those of the PBF-BF and PBF-HT. Therefore, for a given FPP and a dataset with high-dimensional vectors, the P-HDBF will be a better choice than the PBF-based schemes by avoiding a long member query delay and huge memory costs.

Conclusions

52Regardless of the formats of the inputs, the traditional Bloom filters adopt multiple string hashes to implement memberships queries of a big data set. To map the inputs with numerical high dimensions in their original type(s), this paper proposes a uniform Prime_HD_BKDR-Hash function and establishes a P-HDBF structure, a new Bloom filter, to store and query members of a big data set with numerical dimensions. The unified Prime_HD_BKDRHash can randomly and uniformly project the inputs (other than multiple string hashes) into https://doi.org/10.1371/journal.pone.0209159.g011 different integers. The performances and parameters of the P-HDBF have been theoretically discussed. The experiments show that the P-HDBF, as a substitute for the counting Bloom filter in high-dimensional numerical spaces, can obtain excellent data discretization and a good performance. Compared with the methods based on the parallel Bloom filters, the P-HDBF will not increase memory use or query delays as dimensions increase and can be used in applications with limited CPU and memory resources. The P_HDBF can be applied in some applications, such as identify the nuances of pictures.

참고문헌 39건

  1. Central Limit Theorem Wiley StatsRef: Statistics Reference Online · 2014 10.1002/9781118445112.stat04559
  2. Proceedings of the twentieth annual symposium on Computational geometry Symposium on Computational Geometry · 2004
  3. The Mathematics of Egypt, Mesopotamia, China, India, and Islam: a sourcebook Choice Reviews Online · Association of College and Research Libraries · 2008 10.5860/choice.45-3172
  4. Cuckoo Filter 2014 10.1145/2674005.2674994
  5. Design of a Multiple Bloom Filter for Distributed Navigation Routing IEEE Transactions on Systems Man and Cybernetics Systems · Institute of Electrical and Electronics Engineers · 2014 10.1109/tsmc.2013.2242884
  6. Bloofi: Multidimensional Bloom filters Information Systems · Elsevier BV · 2015 10.1016/j.is.2015.01.002
  7. The Bloom Paradox: When Not to Use a Bloom Filter IEEE/ACM Transactions on Networking · Institute of Electrical and Electronics Engineers · 2014 10.1109/tnet.2014.2306060
  8. Timer-Based Bloom Filter Aggregation for Reducing Signaling Overhead in Distributed Mobility Management IEEE Transactions on Mobile Computing · IEEE Computer Society · 2015 10.1109/tmc.2015.2411603
  9. Denial-of-Service Attacks in Bloom-Filter-Based Forwarding IEEE/ACM Transactions on Networking · Institute of Electrical and Electronics Engineers · 2013 10.1109/tnet.2013.2281614
  10. Spectral bloom filters 2003 10.1145/872757.872787
  11. A new analysis of the false positive rate of a Bloom filter Information Processing Letters · Elsevier BV · 2010 10.1016/j.ipl.2010.07.024
  12. Multi-Granularity Locality-Sensitive Bloom Filter IEEE Transactions on Computers · Institute of Electrical and Electronics Engineers · 2015 10.1109/tc.2015.2401011
  13. A Comment on “Fast Bloom Filters and Their Generalization” IEEE Transactions on Parallel and Distributed Systems · Institute of Electrical and Electronics Engineers · 2015 10.1109/tpds.2014.2378268
  14. Page replacement algorithm based on counting bloom filter for NAND flash memory IEEE Transactions on Consumer Electronics · Institute of Electrical and Electronics Engineers · 2014 10.1109/tce.2014.7027337
  15. Theory and Practice of Bloom Filters for Distributed Systems IEEE Communications Surveys & Tutorials · Institute of Electrical and Electronics Engineers · 2011 10.1109/surv.2011.031611.00024
  16. Cryptography and Computer Privacy Scientific American · Springer Nature · 1973 10.1038/scientificamerican0573-15
  17. The Variable-Increment Counting Bloom Filter IEEE/ACM Transactions on Networking · Institute of Electrical and Electronics Engineers · 2013 10.1109/tnet.2013.2272604
  18. Improving counting Bloom filter performance with fingerprints Information Processing Letters · Elsevier BV · 2015 10.1016/j.ipl.2015.11.002
  19. Bloom filter applications in network security: A state-of-the-art survey Computer Networks · Elsevier BV · 2013 10.1016/j.comnet.2013.09.003
  20. Space/time trade-offs in hash coding with allowable errors Communications of the ACM · Association for Computing Machinery · 1970 10.1145/362686.362692
  21. Summary cache: a scalable wide-area Web cache sharing protocol IEEE/ACM Transactions on Networking · Institute of Electrical and Electronics Engineers · 2000 10.1109/90.851975
  22. Fast Bloom Filters and Their Generalization IEEE Transactions on Parallel and Distributed Systems · Institute of Electrical and Electronics Engineers · 2013 10.1109/tpds.2013.46
  23. Compressed Bloom filters IEEE/ACM Transactions on Networking · Institute of Electrical and Electronics Engineers · 2002 10.1109/tnet.2002.803864
  24. Efficient similarity search and classification via rank aggregation 2003 10.1145/872757.872795
  25. Locality-Sensitive Bloom Filter for Approximate Membership Query IEEE Transactions on Computers · Institute of Electrical and Electronics Engineers · 2011 10.1109/tc.2011.108
  26. Using Parallel Bloom Filters for Multiattribute Representation on Network Services IEEE Transactions on Parallel and Distributed Systems · Institute of Electrical and Electronics Engineers · 2009 10.1109/tpds.2009.39
  27. Locality-sensitive hashing scheme based on p-stable distributions 2004 10.1145/997817.997857
  28. The Dynamic Bloom Filters IEEE Transactions on Knowledge and Data Engineering · IEEE Computer Society · 2009 10.1109/tkde.2009.57
  29. On the false-positive rate of Bloom filters Information Processing Letters · Elsevier BV · 2008 10.1016/j.ipl.2008.05.018
  30. New Approach for Efficient IP Address Lookup Using a Bloom Filter in Trie-Based Algorithms IEEE Transactions on Computers · Institute of Electrical and Electronics Engineers · 2015 10.1109/tc.2015.2444850
  31. Split Bloom Filter 2004
  32. A Fast and Accurate Hardware String Matching Module with Bloom Filters IEEE Transactions on Parallel and Distributed Systems · Institute of Electrical and Electronics Engineers · 2016 10.1109/tpds.2016.2577033
  33. Integer-Granularity Locality-Sensitive Bloom Filter IEEE Communications Letters · IEEE Communications Society · 2016 10.1109/lcomm.2016.2600670
  34. False-Positive Probability and Compression Optimization for Tree-Structured Bloom Filters ACM Transactions on Modeling and Performance Evaluation of Computing Systems · Association for Computing Machinery · 2016 10.1145/2940324
  35. Ternary Bloom Filter Replacing Counting Bloom Filter IEEE Communications Letters · IEEE Communications Society · 2016 10.1109/lcomm.2016.2624286
  36. An Improvement in Zone Routing Protocol Using Bloom Filter 2016 10.1109/nbis.2016.60
  37. Security Enhancement in Distributed Networks Using Link-Based Mapping Scheme for Network Intrusion Detection with Enhanced Bloom Filter Wireless Personal Communications · Springer Science+Business Media · 2015 10.1007/s11277-015-2662-1
  38. Chapter 3 Chinese Mathematics Princeton University Press eBooks · Princeton University Press · 2007 10.1515/9780691235394-006
  39. Convergence of Stochastic Processes Springer series in statistics · Springer Science+Business Media · 1984 10.1007/978-1-4612-5254-2