A stateless multicast method and system based on multi-layer bloom filter

By using dynamically encoded multilayer Bloom filters (PMBF) and NMBF, the problems of high false positive rates and excessive space costs in stateless multicast are solved, realizing a low-cost and efficient stateless multicast method and improving network communication performance.

CN119561898BActive Publication Date: 2025-12-05NANJING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411706763.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-12-05
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

Existing stateless multicast methods suffer from problems such as high false positive rates, long-tail query latency, and excessive space costs when using multi-layer Bloom filters, making them difficult to apply effectively in network communication.

Method used

Positive multi-layer Bloom filter (PMBF) and negative multi-layer Bloom filter (NMBF) are employed. The multi-layer Bloom filter is dynamically encoded based on the forwarding port ratio of the multicast tree layer. Through the construction and query algorithm of three or two layers of Bloom filters, the false positive rate is reduced and the space occupation is reduced.

Benefits of technology

It achieves stateless multicast with virtually no false positives, reduces the spatial cost of packet headers, improves network efficiency and query throughput, and reduces redundant traffic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119561898B_ABST
    Figure CN119561898B_ABST
Patent Text Reader

Abstract

The application discloses a stateless multicast method and system based on a multi-layer Bloom filter. The method comprises the following steps: a sending device divides multicast trees by layers in sequence, judges the proportion of a forwarding port in all ports in the whole layer for each multicast tree layer, encodes the layer into a three-layer positive multi-layer Bloom filter (PMBF) or a two-layer negative multi-layer Bloom filter (NMBF) according to the situation, and adds the filters into a packet header to be sent in the order of the layer level of the multicast trees after the encoding of the multicast trees is completed; a switching device receives the packet, parses the byte string of the first filter in the label of the packet header, deserializes the byte string to construct the filter, selects a query method according to the type of the filter after the filter is obtained, queries all ports in sequence, identifies all ports needing forwarding based on the query result, and forwards data. The application realizes a stateless multicast method with low packet header space occupation and almost no loss.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer networks and communications, and particularly relates to a stateless multicast method and system based on a multilayer Bloom filter. Background Technology

[0002] With the widespread adoption of the internet, the real-time performance of network communications, especially multicast technology, has faced increasing challenges. Traditional stateful multicast methods consume too much space, increasing the load on switching equipment and further limiting the number of multicast sessions. To reduce this overhead, stateless multicast is a better choice. Lossless stateless multicast methods directly and losslessly encode the multicast tree into the data structure, but as the network scales up, the packet header size becomes unacceptable. Lossy stateless multicast methods, on the other hand, achieve less space consumption with a partially acceptable false alarm rate on forwarding ports, but these false alarms lead to redundant traffic and increased network load.

[0003] The Bloom filter, proposed by Burton H. Bloom, is a probabilistic data structure used to determine whether an element is in a set. It uses k hash functions to map the element to k positions in an array, setting the values ​​at these positions to 1 to indicate that the element has been added to the set. To query an element, the k hash functions are calculated to obtain the k indices of the element. If all k indices are 1, the element is in the set; if at least one index is 0, the element is not in the set. This type of data structure inevitably suffers from collisions, leading to false positives—elements that should not be identified as being in the set are incorrectly identified as being in the set.

[0004] When using Bloom filters for stateless multicast, they can efficiently query forwarding ports with less storage space when processing large amounts of data, while ensuring that ports that should be forwarded are not ignored, thus eliminating the false negative problem. Bloom filters significantly reduce the space cost of switching equipment by introducing this "error-tolerant" mechanism. The false positive problem, however, manifests as forwarding packets to ports that shouldn't be forwarded, generating redundant network traffic and causing unnecessary network load.

[0005] To reduce false positives, Kyle Deeds, Benjamin Hentschel, and Stratos Idreos invented stacked filters, an improvement on Bloom filters. These multi-layered, improved Bloom filters significantly reduced the false positive rate, but still have the following three drawbacks in stateless multicast applications:

[0006] (1) Higher long-tail query latency. Since there is no strict limit to the number of stacked filters, the query latency of stacked filters increases with the number of filter layers. Each element needs to be hashed k times to pass through each filter layer, so multi-level structures can lead to higher latency in some cases, especially when encountering ports that require multiple layers of filters before being accepted or rejected.

[0007] (2) Inability to dynamically adjust space allocation. Stacked filters allocate a fixed amount of space to each layer. This heuristic space allocation method cannot be dynamically adjusted according to the actual workload. In reality, each layer of a multicast tree varies considerably, and a fixed space allocation cannot adapt well to this variation. Furthermore, due to the design of the stacked filter's layer construction algorithm, the layers within different stacked filters are not entirely the same. Therefore, when the space allocation of a certain layer is insufficient or excessive, the overall performance will be affected, resulting in suboptimal performance of the stacked filter and difficulty in achieving stable performance in practical tasks.

[0008] (3) In some cases, it has a large space cost. As the proportion of forwarding ports to the total ports of the switching equipment increases, the space overhead of stacked filters gradually becomes unacceptable. The first layer of stacked filters uses all forwarding ports as filters. When forwarding ports occupy a large proportion, the space occupied by the first layer increases accordingly. Since each layer needs to store information, and the increase of these layers may bring significant space costs to the switching equipment, such space costs are unacceptable.

[0009] Therefore, it is necessary to make further improvements to enhance multicast performance. Summary of the Invention

[0010] The purpose of this invention is to provide a stateless multicast method and system based on multilayer Bloom filters, which reduces the false positive rate when using multilayer Bloom filters for stateless multicast, while also having a lower data packet header space cost.

[0011] To achieve the above-mentioned objectives, the technical solution of the present invention is as follows:

[0012] Firstly, a stateless multicast method based on a multilayer Bloom filter includes the following steps:

[0013] The transmitting device divides the multicast tree into layers. For each multicast tree layer, it determines whether the proportion of forwarding ports in the total number of ports in the layer is lower than a preset condition. If it is lower, the multicast tree layer is encoded as a positive multi-layer Bloom filter (PMBF). If it is not lower, the multicast tree layer is encoded as a negative multi-layer Bloom filter (NMBF). After the multicast tree encoding is completed, these filters are combined into tags according to the multicast tree's hierarchical order and added to the header of the data packet to be sent. The positive multi-layer Bloom filter (PMBF) includes three layers of Bloom filters: the first layer rejects non-forwarding ports, the second layer rejects forwarding ports, and the third layer rejects non-forwarding ports and accepts forwarding ports. The negative multi-layer Bloom filter (NMBF) includes two layers of Bloom filters: the first layer rejects forwarding ports, and the second layer rejects non-forwarding ports and accepts forwarding ports.

[0014] When a switching device receives a data packet, it parses the tag in the packet header to extract the byte string of the first filter, deserializes the byte string to construct the filter, obtains the filter, selects a query method according to the filter type, and queries all ports in sequence. Based on the query results, it identifies all ports that need to be forwarded and performs data forwarding.

[0015] Furthermore, the three-layer Bloom filter construction method of the positive multilayer Bloom filter PMBF is as follows: In the first layer, k hash functions are used to calculate the corresponding positions of all forwarding ports in the hash table for the corresponding multicast tree layer, and the corresponding positions are marked as 1; in the second layer, the k hash functions are used to calculate the corresponding positions of all non-forwarding ports in the hash table, and all positions that have been marked as 1 in the first layer are selected and recorded as 1, with the rest as 0; in the third layer, the k hash functions are used to calculate the corresponding positions of all forwarding ports in the hash table, and all positions that have been marked as 1 in the second layer are selected and recorded as 1, with the rest as 0.

[0016] Furthermore, the two-layer Bloom filter construction method of the negative multilayer Bloom filter (NMBF) is as follows: In the first layer, the corresponding positions of the non-forwarding ports of the multicast tree layer in the hash table are calculated using k hash functions, and the corresponding positions are marked as 1; In the second layer, the positions of all forwarding ports in the hash table are calculated using the k hash functions, and all positions that have been marked as 1 in the first layer are selected and recorded as 1, while the rest are 0.

[0017] Furthermore, the query method for the positive multilayer Bloom filter (PMBF) is as follows: The port to be queried is calculated using the k hash functions to obtain k values ​​representing the corresponding positions in the PMBF. These values ​​are compared with those of the first-layer Bloom filter. If any value corresponding to these positions is not 1, the port is rejected by the filter and considered a non-forwarding port. If all values ​​are 1, the port is accepted by the filter and enters the second-layer filter. In the comparison with the second-layer filter, if any value corresponding to a position is not 1, the port is considered a forwarding port; otherwise, it enters the third-layer filter. In the comparison with the third-layer filter, if any value corresponding to a position is not 1, the port is considered a non-forwarding port; otherwise, the port is considered a forwarding port.

[0018] Furthermore, the query method of the negative multilayer Bloom filter (NMBF) is as follows: The port to be queried is calculated using the k hash functions to obtain k values ​​representing the corresponding positions in the NMBF. These values ​​are compared with those of the first-layer Bloom filter. If any of these values ​​is not 1, the queried port is considered a forwarding port; otherwise, it enters the second-layer filter. In the comparison of the second-layer filter, if any value is not 1, the queried port is considered a non-forwarding port; otherwise, the queried port is accepted, and the accepted port is considered a forwarding port.

[0019] Furthermore, the tag includes the type of multi-layer Bloom filter and the length of each layer; after receiving the data packet, the switching device extracts the byte string of the first filter from the tag according to the type of multi-layer Bloom filter and the length of each layer.

[0020] Furthermore, after querying all ports, the switching device discards the used filters, reassembles the truncated labels into the packet header, and forwards the new packet to the next-hop switching device through the forwarding port.

[0021] Secondly, a stateless multicast system based on a multilayer Bloom filter includes a transmitting device, a forwarding device, and a receiving device.

[0022] The transmitting device divides the multicast tree into layers. For each multicast tree layer, it determines whether the proportion of forwarding ports in the total number of ports in the layer is lower than a preset condition. If it is lower, the multicast tree layer is encoded as a positive multi-layer Bloom filter (PMBF). If it is not lower, the multicast tree layer is encoded as a negative multi-layer Bloom filter (NMBF). After the multicast tree encoding is completed, these filters are combined into tags according to the multicast tree hierarchy and added to the header of the data packet to be sent. The positive multi-layer Bloom filter (PMBF) includes three layers of Bloom filters: the first layer rejects non-forwarding ports, the second layer rejects forwarding ports, and the third layer rejects non-forwarding ports and accepts forwarding ports. The negative multi-layer Bloom filter (NMBF) includes two layers of Bloom filters: the first layer rejects forwarding ports, and the second layer rejects non-forwarding ports and accepts forwarding ports.

[0023] The forwarding device receives a data packet, parses the tag in the data packet header to extract the byte string of the first filter, deserializes the byte string to construct the filter, obtains the filter, selects a query algorithm according to the filter type, queries all ports in sequence, identifies all ports that need to be forwarded based on the query results, and forwards the data.

[0024] The receiving device is a member of the multicast group and receives data.

[0025] Beneficial Effects: To reduce false positives in stateless multicast using Bloom filters, this invention designs a Positive Multilayer Bloom Filter (PMBF) and a Negative Multilayer Bloom Filter (NMBF), thereby achieving stateless multicast with a false positive rate almost reduced to zero using multilayer Bloom filters. Furthermore, this invention designs an encoding method for constructing the multicast tree as filters and a decoding method for extracting filters and querying forwarding ports, achieving low space cost for the entire stateless multicast method, effectively reducing redundant network traffic, and improving overall network efficiency. Attached Figure Description

[0026] Figure 1 This is a schematic diagram of the overall architecture of the present invention;

[0027] Figure 2 This is a schematic diagram of the encoding process for the multicast tree in this invention;

[0028] Figure 3 This is a schematic diagram of the positive multilayer Bloom filter (PMBF) structure and query process in this invention;

[0029] Figure 4 This is a schematic diagram of the structure and query process of the negative multilayer Bloom filter (NMBF) in this invention.

[0030] Figure 5 This is a schematic diagram of the decoding process of the multicast tree in this invention. Detailed Implementation

[0031] This invention proposes a stateless multicast method and system based on multilayer Bloom filters. The core idea of ​​the method is to adopt different multilayer Bloom filter designs according to the proportion of forwarding ports at each layer of the multicast tree. At the same time, the type and length information of the multilayer Bloom filters are sent to the switching equipment in advance. In this way, the false positive rate can be reduced to almost zero while generating low space cost for different multicast trees.

[0032] Figure 1 The diagram shows the overall architecture of the present invention. In a multicast communication scenario, the sending device is responsible for generating and initializing multicast data transmission; the forwarding device is responsible for copying and forwarding multicast data packets in the network; and the receiving device is responsible for joining the multicast group and receiving and processing multicast data. According to an embodiment of the present invention, the sending device divides the multicast tree according to its layer order. For each multicast tree layer, it determines whether the proportion of the forwarding port in all ports of the entire layer is lower than a preset condition. If it is lower, the multicast tree layer is encoded as a positive multi-layer Bloom filter (PMBF); if it is not lower, the multicast tree layer is encoded as a negative multi-layer Bloom filter (NMBF). After the multicast tree encoding is completed, these filters are combined into tags according to the multicast tree's layer order and added to the header of the data packet to be sent.

[0033] The forwarding device receives a data packet, parses the tag in the data packet header to extract the byte string of the first filter, deserializes the byte string to construct the filter, obtains the filter, selects a query algorithm according to the filter type, queries all ports in sequence, identifies all ports that need to be forwarded based on the query results, and forwards the data.

[0034] The receiving device is a member of the multicast group and receives multicast data.

[0035] The main innovative aspects of this invention will be described in detail below.

[0036] (I) Implementation of multicast tree encoding

[0037] Stateless multicast communication using Bloom filters requires encoding the multicast tree into a Bloom filter and adding it to the packet header, which can result in significant space consumption when the proportion of ports requiring forwarding is large. This invention encodes the multicast tree layer by layer using appropriate multi-layer Bloom filters based on the proportion of forwarding ports. When the proportion of forwarding ports is large, a two-layer negative multi-layer Bloom filter is selected to reduce space consumption.

[0038] Reference Figure 2 The encoding of a multicast tree includes the following steps:

[0039] Step 1: In the initial stage of a multicast session, the sending device divides the multicast tree (which has been pre-generated based on the multicast protocol and is known to the sending device) into layers. The sending device at the top layer of the multicast tree does not need to be encoded as a filter.

[0040] Step 2: Encode the multicast tree layers into NMBF or PMBF. Use an iterative loop to process each layer of the multicast tree sequentially. For each layer, determine whether the forwarding port accounts for the majority of all ports in the entire layer. If so, encode it as NMBF; otherwise, encode it as PMBF.

[0041] Step 3: Assemble the encoded filters into the packet header. Calculate the length of each filter layer encoded in each multicast tree layer. Pre-send these length and type parameters to the switching device using three short integers and one flag bit, or simply append these parameters to the beginning of each filter. The overhead incurred here (three short integers and one flag bit) is very small and can be ignored. After all multicast tree layers are encoded, serialize them in hierarchical order to form a tag, and append this tag to the header of the data packet to be sent.

[0042] Through the above three steps, this invention realizes the specific logic for encoding multicast trees.

[0043] (II) Implementation of Positive Multilayer Bloom Filter (PMBF)

[0044] To reduce the false positive problem caused by single-layer Bloom filters and the long-tail query latency problem caused by stacked Bloom filters, this invention designs a positive multilayer Bloom filter that uses three layers of Bloom filters to filter false positive ports. By alternately stacking positive and negative filter layers, only a very small portion of the ports finally accepted by the filter are false positive ports, which greatly improves the filtering capability for false positive ports. The three-layer design also limits the generation of long-tail query latency.

[0045] Reference Figure 3 PMBF is implemented based on a multi-layer Bloom filter, using three layers of Bloom filters. Each layer of the Bloom filter consists of a bit array and k hash functions. It uses these three layers of continuous filtering to determine whether a port is a forwarding port. The specific construction method of PMBF is as follows:

[0046] The first layer is a Bloom filter that rejects non-forwarding ports. First, k hash functions are used to hash all forwarding ports in the multicast tree layer, resulting in a set of values ​​representing positions in a bit array. Then, the flags corresponding to these positions are set to 1. The remaining positions are set to 0 by default. Ports that pass through will then enter the second layer of filtering.

[0047] The second layer is a Bloom filter that rejects forwarding ports. First, k hash functions are used to hash all non-forwarding ports in the multicast tree layer. The resulting values ​​are compared with those in the first layer. If the positions represented by these values ​​have their corresponding flags set to 1 in the first layer's bit array, then the flags for those positions are also set to 1 in the second layer's bit array; otherwise, they are set to 0 by default. Ports that pass through will then enter the third layer filter.

[0048] The third layer is a filter that rejects non-forwarding ports and accepts forwarding ports (including non-forwarding ports with false positives). The process continues by using k hash functions to hash all forwarding ports in the multicast tree layer one by one. The resulting values ​​are compared with those in the second layer. If the positions represented by these values ​​have already been flagged as 1 in the bit array of the second layer, then the corresponding flags in the bit array of the third layer will also be set to 1; otherwise, they will default to 0.

[0049] The specific implementation logic of the positive multilayer Bloom filter PMBF query algorithm is as follows:

[0050] Step 1: Use k hash functions to calculate the port to be queried, and get k values ​​representing the corresponding positions in PMBF. Find the flag bits of these positions on the first layer filter BF[0] of PMBF. If they are not all 1, the port to be queried is directly considered to be a non-forwarding port; otherwise, proceed to step 2.

[0051] Step 2: Find the flag bits at these positions on the second layer filter BF[1] of PMBF. If not all of them are 1, the port being queried is directly considered to be a forwarding port; otherwise, proceed to step 3.

[0052] Step 3: Find the flag bits at these positions on the third layer filter BF[2] of PMBF. If not all of them are 1, the port being queried is considered to be a non-forwarding port; otherwise, the port being queried is considered to be a forwarding port.

[0053] In other words, when querying a port, the corresponding position is first calculated using these k hash functions and compared with the first-layer filter. If any value at these positions is not 1, the port is rejected by the filter, and the rejected port is definitely a non-forwarding port. If all values ​​are 1, the port is accepted by the filter and enters the second-layer filter. In the comparison with the second-layer filter, the rejected port is definitely a forwarding port, and the accepted port enters the third-layer filter. In the third layer, the rejected port is definitely a non-forwarding port, and the accepted port is considered a forwarding port.

[0054] Current stacked filters have no limit on the number of Bloom filter layers and relatively fixed space allocation, which cannot achieve optimal performance and can lead to long-tail query latency issues. The PMBF proposed in this invention limits the number of filter layers to three. It constructs Bloom filters layer by layer using information from forwarding ports to filter out potential false positive ports. Ports accepted by the third-layer filter are considered forwarding ports. While ports accepted by the third-layer filter still have the potential for false positives, the false positive rate is reduced to a very low level, even zero, after three layers of filtering.

[0055] (III) Implementation of Negative Multilayer Bloom Filter (NMBF)

[0056] Because the first layer of PMBF uses all forwarding ports to construct the filter, as the proportion of receiving devices in the entire network increases, the size of the tag in the packet header will also increase, which will lead to higher space costs. At the same time, considering that the proportion of forwarding ports in all ports of different multicast tree layers varies greatly in actual applications, this invention adopts a negative multilayer Bloom filter for the multicast tree layer with a large proportion of forwarding ports. It uses a two-layer Bloom filter with a negative Bloom filter as the first layer and a positive Bloom filter as the second layer, so as to maintain the optimal false positive rate under different conditions, while reducing space occupation.

[0057] Reference Figure 4 NMBF is implemented based on a multi-layer Bloom filter, using two layers of Bloom filters. Each layer of the Bloom filter consists of a bit array and k hash functions. It uses two layers of continuous filtering to determine whether a port is a forwarding port. The specific structure of NMBF is as follows:

[0058] The first layer is a Bloom filter that rejects forwarding ports. First, k hash functions are used to hash all non-forwarding ports in the multicast tree layer, resulting in a set of values ​​representing positions in a bit array. Then, the flags corresponding to these values ​​in the bit array are set to 1. The remaining positions are left as 0. Ports that pass through will then enter the second layer of filtering.

[0059] The second layer is a Bloom filter that rejects non-forwarding ports and accepts forwarding ports (including non-forwarding ports with false positives). First, k hash functions are used to hash all forwarding ports in the multicast tree layer one by one. The resulting values ​​are compared with those in the first layer. If the positions represented by these values ​​have already been marked as 1 in the bit array of the first layer, then the corresponding positions in the bit array of the second layer will also be marked as 1. Otherwise, the default value is 0.

[0060] Using only the first-layer filter can produce false negatives, which is unacceptable in multicast forwarding tasks. Therefore, a second layer was constructed to solve the false negative problem caused by the first layer and reduce the false positive rate. When the proportion of receiving devices exceeds a certain size, the space occupied by the tag actually decreases as the proportion increases, which proves the effectiveness of the NMBF design.

[0061] The implementation logic of the negative multilevel Bloom filter (NMBF) query algorithm is as follows:

[0062] Step 1: Use k hash functions to calculate the port to be queried, and get k values ​​representing the corresponding positions in NMBF. Find the flag bits of these positions on the first layer filter BF[0] of NMBF. If they are not all 1, the port to be queried is directly considered to be a forwarding port; otherwise, proceed to step 2.

[0063] Step 2: Find the flag bits at these positions on the second layer filter BF[1] of NMBF. If not all of them are 1, the port being queried is considered to be a non-forwarding port; otherwise, the port being queried is considered to be a forwarding port.

[0064] In other words, the NMBF's port query method works as follows: In the first layer, rejected ports are always forwarding ports, while accepted ports enter the second layer filter. In the second layer, rejected ports are always non-forwarding ports, while accepted ports are considered forwarding ports. Ports accepted by the second layer filter still have the possibility of false positives, but after two layers of filtering, the false positive rate has been reduced to a very low level, or even zero.

[0065] Conventional Bloom filters typically encode forwarding ports using a hash algorithm at the first layer, then check non-forwarding ports to find the portion of the hash table where forwarding port indices might accept non-forwarding ports. This approach incurs significant space overhead when forwarding ports constitute a majority. To address this, this invention proposes a two-layer NMBF: the first layer encodes non-forwarding ports, and the hash table's non-forwarding port indices are checked to identify potentially false positives. This reduces space consumption and enhances the robustness of the entire stateless multicast mechanism.

[0066] (iv) Decoding implementation of multicast tree

[0067] As mentioned earlier, to enable switching devices to accurately extract the required filters, this invention designs a strategy whereby the sender pre-sends necessary information or appends additional information to the packet header at the beginning of the multicast initiation. For example, the sender can transmit the type of the multi-layer Bloom filter and the length of each layer to the switching device through certain "initial packets" at the start of the multicast session, or simply append this information to the beginning of each multi-layer Bloom filter. This allows the switching device to extract the corresponding filter for forwarding port lookup and discard used filters after the lookup, improving forwarding efficiency at negligible cost.

[0068] Because filters are serialized into byte streams and assembled into the packet header during transmission, the receiving end (switching device) needs to deserialize the byte streams. Deserialization refers to constructing the actual Bloom filter object from the byte stream (byte string) so that it can be used in the device. The process is as follows: Since the tag contains the byte strings of the multi-layer Bloom filters encoded by each layer of the multicast tree, as well as their type and length information (1 flag bit and three short integers, which are appended to the beginning of the byte string of each multi-layer Bloom filter by the sending device), when retrieving the filter, it selects whether to construct an NMBF or a PMBF according to the type information, and then retrieves the byte streams of the corresponding length for each layer of the multi-layer Bloom filter according to the length information. When constructing an NMBF, the length parameter of the third layer is 0.

[0069] Therefore, according to an embodiment of the present invention, the multicast tree decoding logic is as follows: Once the switching device receives a data packet, it parses the packet header and extracts the byte string of the first filter from the tag according to the known length and type of each layer of the multi-layer Bloom filter. The byte string is then deserialized to construct the filter. After obtaining the filter, the switching device selects a query algorithm based on the filter type and queries all ports sequentially, identifying all ports that need to be forwarded based on the query results. After querying all ports, the switching device discards the filter to save bandwidth for data packet transmission and ensures that the filter needed by the next-hop switching device is at the top. Finally, the switching device reassembles the truncated tag into the data packet header and forwards the new data packet from the forwarding port to the next-hop switching device.

[0070] Reference Figure 5 Specifically, it includes the following steps:

[0071] Step 1: The switching device receives the data packet, parses the packet header, and extracts the filter. Based on the length of each layer of the filter encoded by each multicast tree layer and the filter type, the switching device extracts the filter's byte string from the first tag, then deserializes the byte string according to known parameters to construct the corresponding filter.

[0072] Step 2: The switching device queries each port to determine if it is a forwarding port. The switching device calculates k hash values ​​for the port to be queried. These values ​​are compared with the first layer of the filter. If the flag bits of the positions represented by these values ​​are not all 1, the port is rejected; otherwise, it passes through the first layer of the filter and proceeds to the next layer until it is rejected again or accepted by the entire filter. Depending on the filter type, ports rejected at each layer will be queried as either forwarding ports or non-forwarding ports. Ports accepted by the entire filter will be considered forwarding ports.

[0073] Step 3: Truncate used filters and reassemble the remaining parts back into the packet header. After querying all the ports that need to be queried, the switching device discards the retrieved filters, reassembles the truncated labels into the packet header, and forwards the new packet to the next-hop switching device through the forwarding port.

[0074] Evaluations show that, compared with stateless multicast mechanisms, including the lossy mechanisms LIPSIN and MEB, and the lossless mechanisms MSBF and Yeti, the proposed method achieves near-zero false positive and redundant traffic ratios while maintaining sufficiently low space overhead, and provides competitive query throughput and build latency, effectively improving multicast performance in practical applications. Specifically, regarding space overhead, the proposed method reduces label size by approximately 50% compared to the lossless Yeti mechanism and by up to 75% compared to MSBF in all experimental settings. When the number of hash functions k used to construct the filters is less than or equal to 12, the proposed method has the smallest label size. When k equals 14, it is only slightly larger than the label size of the lossy mechanism LIPSIN, but LIPSIN exhibits a higher false positive rate and redundant traffic ratio in this case. Regarding accuracy, in most cases, the method proposed in this invention exhibits a false positive rate and a redundant traffic ratio of 0. Furthermore, when false positives are present, compared to the lossy MEB mechanism, the proposed method achieves at least a 12-fold and 8.5-fold improvement in both false positive rate and redundant traffic ratio. When k=14, compared to LIPSIN, these two metrics achieve approximately a 100-fold improvement. Even compared to lossless multicast mechanisms, it provides competitive accuracy while achieving a smaller label size. Therefore, the proposed method can reasonably be considered a near-lossless multicast mechanism. In terms of query throughput, the proposed method is only slightly lower than LIPSIN, but achieves almost four times the query throughput of MEB. Regarding construction latency, the proposed method is higher than LIPSIN and Yeti, but significantly lower than MEB and MSBF by two orders of magnitude. Considering that only one construction is required during multicast session establishment, the construction latency of the proposed method is sufficiently low in practical applications.

[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A stateless multicast method based on a multilayer Bloom filter, characterized in that, Includes the following steps: The transmitting device divides the multicast tree into layers. For each multicast tree layer, it determines whether the proportion of forwarding ports in the total number of ports in the layer is lower than a preset condition. If it is lower, the multicast tree layer is encoded as a positive multi-layer Bloom filter (PMBF). If it is not lower, the multicast tree layer is encoded as a negative multi-layer Bloom filter (NMBF). After the multicast tree encoding is completed, these filters are combined into tags according to the multicast tree's hierarchical order and added to the header of the data packet to be sent. The positive multi-layer Bloom filter (PMBF) includes three layers of Bloom filters: the first layer rejects non-forwarding ports, the second layer rejects forwarding ports, and the third layer rejects non-forwarding ports and accepts forwarding ports. The negative multi-layer Bloom filter (NMBF) includes two layers of Bloom filters: the first layer rejects forwarding ports, and the second layer rejects non-forwarding ports and accepts forwarding ports. When a switching device receives a data packet, it parses the tag in the packet header to extract the byte string of the first filter, deserializes the byte string to construct the filter, obtains the filter, selects a query method according to the filter type, and queries all ports in sequence. Based on the query results, it identifies all ports that need to be forwarded and forwards the data.

2. The method according to claim 1, characterized in that, The three-layer Bloom filter construction method of the positive multilayer Bloom filter PMBF is as follows: In the first layer, k hash functions are used to calculate the corresponding positions of all forwarding ports in the hash table for the corresponding multicast tree layer, and the corresponding positions are marked as 1; in the second layer, the k hash functions are used to calculate the corresponding positions of all non-forwarding ports in the hash table, and all positions that have been marked as 1 in the first layer are selected and recorded as 1, with the rest as 0; in the third layer, the k hash functions are used to calculate the corresponding positions of all forwarding ports in the hash table, and all positions that have been marked as 1 in the second layer are selected and recorded as 1, with the rest as 0.

3. The method according to claim 1, characterized in that, The two-layer Bloom filter construction method of the Negative Multilayer Bloom Filter (NMBF) is as follows: In the first layer, k hash functions are used to calculate the corresponding positions of the non-forwarding ports of the multicast tree layer on the hash table, and the corresponding positions are marked as 1; In the second layer, the k hash functions are used to calculate the positions of all forwarding ports on the hash table, and all positions that have been marked as 1 in the first layer are selected and recorded as 1, while the rest are 0.

4. The method according to claim 1, characterized in that, The query method for the positive multilayer Bloom filter (PMBF) is as follows: The port to be queried is calculated using the k hash functions to obtain k values ​​representing the corresponding positions in the PMBF. These values ​​are compared with those of the first-layer Bloom filter. If any value corresponding to these positions is not 1, the port is rejected by the filter and considered a non-forwarding port. If all values ​​are 1, the port is accepted by the filter and enters the second-layer filter. In the comparison with the second-layer filter, if any value corresponding to a position is not 1, the port is considered a forwarding port; otherwise, it enters the third-layer filter. In the comparison with the third-layer filter, if any value corresponding to a position is not 1, the port is considered a non-forwarding port; otherwise, it enters the third-layer filter.

5. The method according to claim 1, characterized in that, The query method of the negative multilayer Bloom filter (NMBF) is as follows: the port to be queried is calculated using the k hash functions to obtain k values ​​representing the corresponding positions in the NMBF. These values ​​are then compared with the first layer of the Bloom filter. If any of the values ​​corresponding to these positions is not 1, the queried port is considered to be a forwarding port; otherwise, it enters the second layer filter. In the second layer of filter comparison, if the value corresponding to any position is not 1, the query port is considered to be a non-forwarding port; otherwise, the query port is accepted, and the accepted port is regarded as a forwarding port.

6. The method according to claim 1, characterized in that, The tag includes the type of multi-layer Bloom filter and the length of each layer; after receiving the data packet, the switching device extracts the byte string of the first filter from the tag according to the type of multi-layer Bloom filter and the length of each layer.

7. The method according to claim 1, characterized in that, After querying all ports, the switching device discards the used filters, reassembles the truncated labels into the packet header, and forwards the new packet to the next-hop switching device through the forwarding port.

8. A stateless multicast system based on a multilayer Bloom filter, characterized in that, This includes transmitting devices, relaying devices, and receiving devices; The transmitting device divides the multicast tree into layers. For each multicast tree layer, it determines whether the proportion of forwarding ports in the total number of ports in the layer is lower than a preset condition. If it is lower, the multicast tree layer is encoded as a positive multi-layer Bloom filter (PMBF). If it is not lower, the multicast tree layer is encoded as a negative multi-layer Bloom filter (NMBF). After the multicast tree encoding is completed, these filters are combined into tags according to the multicast tree hierarchy and added to the header of the data packet to be sent. The positive multi-layer Bloom filter (PMBF) includes three layers of Bloom filters: the first layer rejects non-forwarding ports, the second layer rejects forwarding ports, and the third layer rejects non-forwarding ports and accepts forwarding ports. The negative multi-layer Bloom filter (NMBF) includes two layers of Bloom filters: the first layer rejects forwarding ports, and the second layer rejects non-forwarding ports and accepts forwarding ports. The forwarding device receives a data packet, parses the tag in the data packet header to extract the byte string of the first filter, deserializes the byte string to construct the filter, obtains the filter, selects a query algorithm according to the filter type, queries all ports in sequence, identifies all ports that need to be forwarded based on the query results, and forwards the data. The receiving device is a member of the multicast group and receives data.

9. The system according to claim 8, characterized in that, The three-layer Bloom filter construction method of the positive multilayer Bloom filter PMBF is as follows: In the first layer, k hash functions are used to calculate the corresponding positions of all forwarding ports in the hash table for the corresponding multicast tree layer, and the corresponding positions are marked as 1; in the second layer, the k hash functions are used to calculate the corresponding positions of all non-forwarding ports in the hash table, and all positions that have been marked as 1 in the first layer are selected and recorded as 1, with the rest as 0; in the third layer, the k hash functions are used to calculate the corresponding positions of all forwarding ports in the hash table, and all positions that have been marked as 1 in the second layer are selected and recorded as 1, with the rest as 0.

10. The system according to claim 8, characterized in that, The two-layer Bloom filter construction method of the Negative Multilayer Bloom Filter (NMBF) is as follows: In the first layer, k hash functions are used to calculate the corresponding positions of the non-forwarding ports of the multicast tree layer on the hash table, and the corresponding positions are marked as 1; In the second layer, the k hash functions are used to calculate the positions of all forwarding ports on the hash table, and all positions that have been marked as 1 in the first layer are selected and recorded as 1, while the rest are 0.

Citation Information

Patent Citations

  • Redundancy removal file system based on limited binary tree bloom filter and construction method of redundancy removal file system

    CN103345472A

  • Name routing fast matching search method and device

    CN103873371A