Stateless multicast method and system based on multi-layer bloom filter

By dynamically adjusting the type of multi-layer Bloom filter at the multicast tree level, the problems of false positive false positive rate and space cost in the stateless multicast method are solved, and efficient network forwarding and multicast performance with low space overhead are achieved.

CN119561898AActive Publication Date: 2025-03-04NANJING UNIV

Patent Information

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

AI Technical Summary

Technical Problem

When using multi-layer Bloom filters, existing stateless multicast methods have high false positive false positive rates and large packet header space costs, and stacked filters have insufficient query delay and space allocation.

Method used

A stateless multicast method based on multi-layered Bloom filter is designed to reduce false positive false positives and reduce the space cost of packet headers by dynamically adjusting the type of multi-layered Bloom filter (positive multi-layered Bloom filter PMBF and negative multi-layered Bloom filter NMBF) at the multi-cast tree level.

Benefits of technology

It effectively reduces the false positive false positive rate, reduces the space cost of the packet header, improves network efficiency, and shows low space overhead and high query throughput in practical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119561898A_ABST
    Figure CN119561898A_ABST
Patent Text Reader

Abstract

The invention discloses a stateless multicast method and system based on a multi-layer bloom filter. The method comprises the following steps that: sending equipment divides multicast trees according to a layer sequence, judges the proportion of a forwarding port in all ports of the whole layer for each multicast tree layer, and 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, after the multicast tree is coded, the filters form a label according to the hierarchical sequence of the multicast tree, and the label is added into a data packet header to be sent; and the switching equipment receives the data packet, analyzes the label of the data packet header, takes out the byte string of the first filter, deserializes the byte string to construct the filter, selects a query method according to the type of the filter after obtaining the filter, queries all ports in sequence, identifies all ports needing to be forwarded based on a query result, and forwards data. According to the stateless multicast method, the occupied space of the data packet header is low, and the stateless multicast method is almost lossless.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer network and communication, and in particular relates to a stateless multicast method and system based on multi-layer Bloom filters. Background Art

[0002] With the popularization of the Internet, the real-time nature of network communications, especially multicast technology, has been increasingly challenged. The traditional stateful multicast method takes up too much space, increases the load on switching equipment, and further limits the number of multicast sessions. In order to reduce this overhead, using a stateless multicast method is a better choice. The lossless stateless multicast method directly encodes the multicast tree into the data structure without loss, but as the network scale expands, the size of the data packet header will be unacceptable. The lossy stateless multicast method uses a partially acceptable forwarding port false alarm rate in exchange for less space, but this false alarm will lead to redundant traffic and increased network load.

[0003] Bloom filter was proposed by Burton H.Bloom. It is a probabilistic data structure used to determine whether an element is in a set. It uses k hash functions to map elements to k positions in the bit array, and sets the values ​​of these positions to 1, which is considered to add the element to the set. When querying an element, first calculate k hash functions to obtain the k position indexes of this element. If the values ​​corresponding to the k indexes are all 1, it means that this element is in the set. If at least one index value is 0, it means that this element is not in the set. This type of data structure will inevitably have collision problems, resulting in false positive results, that is, elements that should be identified as not in the set are mistakenly identified as being in the set.

[0004] When applying Bloom filters for stateless multicast, in the case of processing large amounts of data, forwarding port queries can be efficiently performed with less storage space, and ports that should be forwarded will not be ignored, that is, there will be no false negative problem. By introducing this "tolerance to errors" mechanism, Bloom filters have greatly reduced the space cost of switching equipment. The false positive problem in this process will manifest itself as forwarding data packets on ports that should not be forwarded, generating redundant network traffic and causing unnecessary network load.

[0005] In order to reduce false positive alarms, Kyle Deeds, Benjamin Hentschel and Stratos Idreos invented stacked filters and improved Bloom filters. The multi-layer improved Bloom filters significantly reduced the false positive alarm rate, but there are still the following three disadvantages in stateless multicast applications:

[0006] (1) Higher long-tail query latency. Since there is no strict limit on the number of layers of stacked filters, the query latency of stacked filters increases as the number of filter layers increases. Each time an element passes through a filter layer, the hash function must be calculated k times, so the multi-level structure can cause higher latency in some cases, especially when encountering ports that need to pass through multiple layers of filters before being accepted or rejected.

[0007] (2) Space allocation cannot be adjusted dynamically. The stacked filter allocates a fixed amount of space to each layer. This heuristic space allocation method cannot be dynamically adjusted according to the actual workload. In fact, each layer of the multicast tree is quite different, and the fixed space allocation cannot adapt well to such changes. In addition, due to the design of the construction algorithm of each layer of the stacked filter, the layers inside different stacked filters are also different. Therefore, when the space allocation of a certain layer is insufficient or excessive, the overall performance will be affected, resulting in the performance of the stacked filter being suboptimal and difficult to have stable performance in actual tasks.

[0008] (3) In some cases, it has a large space cost. When the proportion of forwarding ports to the total ports of the switching device increases, the space cost of the stacked filter gradually becomes unacceptable. The first layer of the stacked filter uses all forwarding ports as filters. When the 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 in these layers may bring significant space costs to the switching device, such space costs are unacceptable.

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

[0010] The object of the present invention is to provide a stateless multicast method and system based on multi-layer Bloom filters, which reduces the false positive alarm rate generated when using multi-layer Bloom filters for stateless multicast, and has a lower data packet header space cost.

[0011] In order to achieve the above invention object, the technical solution of the present invention is as follows:

[0012] In a first aspect, a stateless multicast method based on a multi-layer Bloom filter comprises the following steps:

[0013] The sending device divides the multicast tree into layers, and determines for each multicast tree layer 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, and after the multicast tree encoding is completed, these filters are combined into labels according to the hierarchical order of the multicast tree, and added to the header of the data packet to be sent; wherein 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] The switching device receives the data packet, parses the label in the data packet header, extracts the byte string of the first filter, deserializes the byte string to construct the filter, and after obtaining the filter, selects the query method according to the filter type, and queries all ports in turn. Based on the query results, all ports that need to be forwarded are identified to forward data.

[0015] Furthermore, the three-layer Bloom filter construction method of the positive multi-layer Bloom filter PMBF is as follows: in the first layer, k hash functions are used to calculate the corresponding positions of all forwarding ports of the corresponding 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 corresponding positions of all non-forwarding ports on the hash table, and all positions that have been marked as 1 in the first layer are selected, and these positions are recorded as 1, and the rest are 0; in the third layer, the k hash functions are used to calculate the corresponding positions of all forwarding ports on the hash table, and all positions that have been marked as 1 in the second layer are selected, and these positions are recorded as 1, and the rest are 0.

[0016] Furthermore, the two-layer Bloom filter construction method of the negative multi-layer Bloom filter NMBF is as follows: in the first layer, k hash functions are used to calculate the corresponding positions of the corresponding multicast tree layer non-forwarding ports 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 corresponding 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 these positions are recorded as 1, and the rest are 0.

[0017] Furthermore, the query method of the positive multi-layer Bloom filter PMBF is as follows: use the k hash functions to calculate the port to be queried, obtain k values ​​representing the corresponding positions in the PMBF, and compare them with the Bloom filter of the first layer. If one of the values ​​corresponding to these positions is not 1, it is rejected by the filter and the query port is considered to be a non-forwarding port. If all are 1, it is accepted by the filter and enters the second layer filter; in the comparison with the second layer filter, if the value corresponding to any position is not 1, the query port is considered to be a forwarding port, otherwise it enters the third layer filter; in the comparison with the third layer filter, if the value corresponding to any position is not 1, the query port is considered to be a non-forwarding port, otherwise it enters the third layer filter;

[0018] Furthermore, the query method of the negative multi-layer Bloom filter NMBF is as follows: use the k hash functions to calculate the port to be queried, obtain k values ​​representing the corresponding positions in the NMBF, and compare them with the Bloom filter of the first layer. If one of the values ​​corresponding to these positions is not 1, the query port is considered to be a forwarding port, otherwise it enters the second layer filter; in the comparison of the second layer filter, if the value corresponding to a 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.

[0019] Furthermore, the label includes the type of multiple layers of Bloom filters and the length of each layer; after receiving the data packet, the switching device extracts the byte string of the first filter from the label according to the type of multiple layers of Bloom filters 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 data packet header, and forwards the new data packet to the next-hop switching device through the forwarding port.

[0021] In a second aspect, a stateless multicast system based on a multi-layer Bloom filter includes a sending device, a forwarding device, and a receiving device;

[0022] The sending device divides the multicast tree into layers, and determines for each multicast tree layer 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, and after the multicast tree encoding is completed, these filters are combined into labels according to the hierarchical order of the multicast tree, and added to the header of the data packet to be sent; wherein 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 label of the data packet header to obtain the byte string of the first filter, deserializes the byte string to construct a filter, selects a query algorithm according to the filter type after obtaining the filter, queries all ports in turn, 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: In order to reduce the false positive problem caused by using Bloom filters for stateless multicast, the present invention designs a positive multilayer Bloom filter PMBF and a negative multilayer Bloom filter NMBF, thereby applying multilayer Bloom filters to achieve stateless multicast with a false positive rate almost reduced to 0. In addition, the present invention designs an encoding method for constructing a multicast tree as a filter and a decoding method for taking out the filter and querying the forwarding port, so as to achieve a low space cost of the entire stateless multicast method, effectively reduce redundant network traffic, and improve the overall network efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a schematic diagram of the overall structure of the present invention;

[0027] Figure 2 A schematic diagram of the encoding process of the multicast tree in the present invention;

[0028] Figure 3 Schematic diagram of the structure and query process of the positive multilayer Bloom filter PMBF in the present invention;

[0029] Figure 4 It is a schematic diagram of the negative multi-layer Bloom filter NMBF structure and query process in the present invention.

[0030] Figure 5 It is a schematic diagram of the decoding process of the multicast tree in the present invention. DETAILED DESCRIPTION

[0031] The present invention proposes a stateless multicast method and system based on a multi-layer Bloom filter. The core idea of ​​the method is to adopt different multi-layer Bloom filter designs according to the proportion of forwarding ports at each layer of the multicast tree, and send the type and length information of the multi-layer Bloom filter to the switching device in advance, thereby reducing the false positive alarm rate to almost 0 and generating lower space costs for different multicast trees.

[0032] Figure 1 The figure shows a schematic diagram of 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 into layers, and for each multicast tree layer, 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 labels in the hierarchical order of the multicast tree, and added to the header of the data packet to be sent;

[0033] The forwarding device receives a data packet, parses the label of the data packet header to obtain the byte string of the first filter, deserializes the byte string to construct a filter, selects a query algorithm according to the filter type after obtaining the filter, queries all ports in turn, identifies all ports that need to be forwarded based on the query results, and forwards the data;

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

[0035] The main innovative features of the present invention are 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 data packet header, which will cause a large space occupation when the proportion of ports to be forwarded is large. The present invention selects appropriate multi-layer Bloom filters for encoding the multicast tree layer by layer according to the proportion of forwarding ports. When the proportion of forwarding ports is large, two layers of negative multi-layer Bloom filters are selected to reduce space occupation.

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

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

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

[0041] Step 3: Assemble the encoded filters into the data packet header. Calculate the length of each filter layer of the filter encoded by each multicast tree layer, and send these length parameters and type parameters to the switching device in advance using 3 short integers and 1 flag bit, or simply attach these parameters to the beginning of each filter. The additional overhead generated here (three short integers and a flag bit) is very small and can be ignored. After all multicast tree layers are encoded, they are serialized in hierarchical order to form a label, and the label is attached to the header of the data packet to be sent.

[0042] Through the above three steps, the present invention realizes the specific logic of encoding the multicast tree.

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

[0044] In order to reduce the false positive problem caused by a single-layer Bloom filter and the long-tail query delay problem caused by stacked Bloom filters, the present invention designs a positive multi-layer Bloom filter that uses a three-layer Bloom filter to filter false positive ports. By alternately stacking positive and negative filter layers, only a very small part of the ports finally accepted by the filter are false positive ports, which greatly improves the filtering ability of false positive ports. The three-layer design also limits the generation of long-tail query delays.

[0045] Reference Figure 3 ,PMBF is implemented based on multi-layer Bloom filters. It uses 3 layers of Bloom filters. Each layer of Bloom filters consists of 1 bit array and k hash functions. Through 3 layers of continuous filtering, it queries 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, use k hash functions to hash all forwarding ports in the multicast tree layer one by one, obtain a set of values ​​representing the positions in the bit array, and then set the flag positions corresponding to the positions represented by these values ​​to 1. The remaining positions are set to 0 by default. The ports that pass will enter the second layer of filters.

[0047] The second layer is a Bloom filter that rejects forwarding ports. First, use k hash functions to perform hash calculations on all non-forwarding ports in the multicast tree layer one by one, and compare the obtained values ​​with those in the first layer. If the positions represented by these values ​​have their flags set to 1 in the bit array of the first layer, then the flags corresponding to the positions represented by these values ​​in the bit array of the second layer will also be set to 1, otherwise the default value is 0. The ports that pass will enter the third layer filter.

[0048] The third layer is a filter that rejects non-forwarding ports and accepts forwarding ports (including false positive non-forwarding ports). Continue to use k hash functions to hash all forwarding ports in the multicast tree layer one by one, and compare the obtained values ​​with the second layer. If the positions represented by these values ​​have their flags set to 1 in the bit array of the second layer, then the flags corresponding to the positions represented by these values ​​in the bit array of the third layer will also be set to 1, otherwise the default value is 0.

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

[0050] Step 1: Use k hash functions to calculate the port to be queried, obtain 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 not all are 1, directly consider the queried port as a non-forwarding port, otherwise go to step 2.

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

[0052] Step 3: Find the flag bits of these positions on the third layer filter BF[2] of PMBF. If not all are 1, the queried port is directly considered as a non-forwarding port. Otherwise, the queried port is considered as a forwarding port.

[0053] That is, when querying a port, first use these k hash functions to calculate its corresponding position, and compare it with the first layer filter. If one of the values ​​corresponding to these positions is not 1, it will be rejected by the filter, and the rejected port must be a non-forwarding port. If all are 1, it will be accepted by the filter and enter the second layer filter. In the comparison with the second layer filter, the rejected port must be a forwarding port, and the accepted port enters the third layer filter. In the third layer, the rejected port must be a non-forwarding port, and the accepted port is considered a forwarding port.

[0054] The current stacked filter has no limit on the number of layers of Bloom filters, and the allocation of space is relatively fixed, which cannot have the best performance and will cause the problem of long-tail query delay. The PMBF proposed in the present invention limits the number of filter layers to three layers, constructs Bloom filters layer by layer using the information of forwarding ports, and screens possible false positive ports. The ports accepted by the third layer filter will be considered as forwarding ports. The ports accepted by the third layer filter still have the possibility of false positives, but after three layers of filtering, the false positive rate has been reduced to a very low level or even to 0.

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

[0056] Because the first layer of PMBF uses all forwarding ports to construct filters, when the proportion of receiving devices in the entire network increases, the label size in the data packet header will also increase, which will bring higher space costs. At the same time, considering that the proportion of forwarding ports in all ports in different multicast tree layers varies greatly in actual applications, the present invention adopts negative multi-layer Bloom filters for multicast tree layers where the forwarding ports account for a relatively large proportion, and uses two layers of Bloom filters with negative Bloom filters as the first layer and positive Bloom filters as the second layer, thereby being able to maintain the optimal false positive alarm rate under different circumstances while reducing space occupancy.

[0057] Reference Figure 4 ,NMBF is implemented based on multi-layer Bloom filters. It uses 2 layers of Bloom filters. Each layer of Bloom filters consists of 1 bit array and k hash functions. Through 2 layers of continuous filtering, it queries 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, use k hash functions to perform hash calculations on all non-forwarding ports in the multicast tree layer one by one to obtain a set of values ​​representing the positions in the bit array, and then set the flag positions corresponding to the positions represented by these values ​​in the bit array to 1. The remaining positions are set to 0 by default. The ports that pass will enter the second layer of filters.

[0059] The second layer is a Bloom filter that rejects non-forwarding ports and accepts forwarding ports (including false positive non-forwarding ports). First, use k hash functions to hash all forwarding ports in the multicast tree layer one by one, and compare the obtained values ​​with those in the first layer. If the positions represented by these values ​​have their flags set to 1 in the bit array of the first layer, then the flags corresponding to the positions represented by these values ​​in the bit array of the second layer will also be set to 1, otherwise the default value is 0.

[0060] Since only using the first layer of filters will produce false negative effects, which is unacceptable in multicast forwarding tasks, a second layer is 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 label will decrease as it increases, which proves the effectiveness of the NMBF design.

[0061] The implementation logic of the negative multi-layer Bloom filter NMBF query algorithm is as follows:

[0062] Step 1: Use k hash functions to calculate the port to be queried, obtain 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 not all are 1, directly consider the queried port as a forwarding port, otherwise go 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 are 1, the queried port is directly considered as a non-forwarding port. Otherwise, the queried port is considered as a forwarding port.

[0064] That is, NMBF's port query method is that in the first layer, the rejected ports must be forwarding ports, and the accepted ports enter the second layer of filters. In the second layer, the rejected ports must be non-forwarding ports, and the accepted ports are considered forwarding ports. Ports accepted by the second layer of filters still have the possibility of false positives, but after the second layer of filtering, the false positive rate has been reduced to a very low level or even zero.

[0065] According to conventional Bloom filters, the forwarding ports should be encoded to the first layer according to the hash algorithm, and the non-forwarding ports are checked to find out the part of the forwarding port index in the hash table that may accept the non-forwarding ports. This method will bring a large space overhead when the forwarding ports are in the majority. In order to cope with this situation, the present invention proposes a two-layer NMBF, in which the non-forwarding ports are encoded in the first layer, and the non-forwarding port index in the hash table may have a false positive part by checking the forwarding ports, which reduces the space occupation and enhances the robustness of the entire stateless multicast mechanism.

[0066] (IV) Decoding implementation of multicast tree

[0067] As mentioned above, in order to allow the switching device to accurately extract the required filters, the present invention designs a strategy that allows the sender to send necessary information in advance at the beginning of multicast initiation or to attach additional information to the data packet header. For example, the sender can pass the type of multi-layer Bloom filters and the length of each layer to the switching device through some "initial data packets" at the beginning of the multicast session, or simply attach this information to the beginning of each multi-layer Bloom filter. This allows the switching device to extract the corresponding filter to query the forwarding port and discard the used filter after the query is completed, thereby improving the forwarding efficiency at a negligible cost.

[0068] Since the filter will be serialized into a byte stream and assembled into the packet header during transmission, the byte stream must be deserialized at the receiving end (switching device). Deserialization refers to building a byte stream (byte string) into an actual Bloom filter object so that it can be used in the device. The process is as follows: Since the label contains the byte string of the multi-layer Bloom filter encoded in each layer of the multicast tree and its type and length information (1 flag bit, three short integers, attached to the beginning of the byte string of each multi-layer Bloom filter by the sending device), when the filter is taken out, it will choose to construct NMBF or PMBF according to the type information, and then take out the byte stream of the length corresponding to each layer in the multi-layer Bloom filter according to the length information. When constructing 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 will parse the data packet header and take out the byte string of the first filter from the label according to the length and type of each layer of the known multi-layer Bloom filter, and deserialize the byte string to construct the filter. After obtaining the filter, the switching device will select a query algorithm according to the filter type, and query all ports in turn, and identify all ports that need to be forwarded based on the query results. After querying all ports, the switching device will discard the filter to save bandwidth for transmitting data packets, and ensure that the filter that the next-hop switching device needs to use is placed first. Finally, the switching device will reassemble the truncated label into the data packet header and forward the new data packet from the forwarding port to the next-hop switching device.

[0070] Reference Figure 5 , specifically including the following steps:

[0071] Step 1: The switch receives the data packet, parses the packet header, and extracts the filter. The switch extracts the filter byte string from the first position of the label according to the length of each layer of the filter encoded in each multicast tree layer and the filter type, and then deserializes the byte string according to the known parameters to construct the corresponding filter.

[0072] Step 2: The switching device queries each port to see if it is a forwarding port. The switching device will calculate a port to be queried, obtain k values ​​calculated by the hash function, and compare the obtained values ​​with the first layer of the filter. If the flag bits of the positions represented by these values ​​are not all 1, they are rejected. Otherwise, they pass through the first layer of the filter and enter the next layer until they are rejected or accepted by the entire filter. According to the filter type, the ports rejected at each layer will be queried as forwarding ports or non-forwarding ports, and the ports accepted by the entire filter will be considered forwarding ports.

[0073] Step 3: Truncate the used filter and assemble the remaining part back into the packet header. After all ports that need to be queried are queried, the switching device discards the removed filter, reassembles the truncated label into the packet header, and forwards the new packet to the next-hop switching device through the forwarding port.

[0074] The evaluation shows that when compared with stateless multicast mechanisms, including lossy mechanisms LIPSIN, MEB, and lossless mechanisms MSBF and Yeti, the method proposed in the present invention has a sufficiently low space overhead, a false positive rate and a redundant traffic ratio close to 0, and provides competitive query throughput and construction latency, which can effectively improve multicast performance in practical applications. Specifically, in terms of space overhead, the method proposed in the present invention reduces the label size by about 50% compared to the lossless mechanism Yeti in all experimental settings, and reduces it by up to 75% compared to MSBF. When the number of hash functions k used to construct the filter is less than or equal to 12, the method proposed in the present invention has the smallest label size, and when k is equal to 14, it is only slightly larger than the label size of the lossy mechanism LIPSIN, but LIPSIN has a higher false positive rate and redundant traffic ratio in this case. In terms of accuracy, in most cases, the method proposed in the present invention exhibits a false positive rate and redundant traffic ratio of 0, and when there are false alarms, compared with the lossy mechanism MEB, the method proposed in the present invention brings at least 12 times and 8.5 times improvement in the false positive rate and redundant traffic ratio. When k = 14, compared with LIPSIN, these two indicators have achieved an improvement of about 100 times. Even when compared with the lossless multicast mechanism, it provides competitive accuracy while achieving a smaller label size. Therefore, it is reasonable to believe that the method proposed in the present invention is a nearly lossless multicast mechanism. At the same time, in terms of query throughput, the method proposed in the present invention is only slightly lower than LIPSIN, but at the same time achieves a query throughput of almost 4 times that of MEB. In terms of construction delay, the method proposed in the present invention 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 in the process of establishing a multicast session, the construction delay of the method proposed in the present invention is low enough 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 rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does 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 multi-layer Bloom filters, characterized in that: The following steps are involved: The sending device divides the multicast tree into layers, and determines for each multicast tree layer 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, and after the multicast tree encoding is completed, these filters are combined into labels according to the hierarchical order of the multicast tree, and added to the header of the data packet to be sent; wherein 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 switching device receives the data packet, parses the label in the data packet header, extracts the byte string of the first filter, deserializes the byte string to construct the filter, and after obtaining the filter, selects the query method according to the filter type, and queries all ports in turn. Based on the query results, all ports that need to be forwarded are identified to forward data.

2. The method according to claim 1, characterized in that The three-layer Bloom filter construction method of the positive multi-layer 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 corresponding 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 corresponding positions of all non-forwarding ports on the hash table, and all positions that have been marked as 1 in the first layer are selected, and these positions are recorded as 1, and the rest are 0; in the third layer, the k hash functions are used to calculate the corresponding positions of all forwarding ports on the hash table, and all positions that have been marked as 1 in the second layer are selected, and these positions are recorded as 1, and the rest are 0.

3. The method according to claim 1, characterized in that The two-layer Bloom filter construction method of the negative multi-layer Bloom filter NMBF is as follows: in the first layer, k hash functions are used to calculate the corresponding positions of the corresponding multicast tree layer non-forwarding ports 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 corresponding 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 these positions are recorded as 1, and the rest are 0.

4. The method according to claim 1, characterized in that: The query method of the positive multi-layer Bloom filter PMBF is as follows: use the k hash functions to calculate the port to be queried, obtain k values ​​representing the corresponding positions in the PMBF, and compare them with the Bloom filter of the first layer. If one of the values ​​corresponding to these positions is not 1, it is rejected by the filter and the query port is considered to be a non-forwarding port. If all are 1, it is accepted by the filter and enters the second layer filter; in the comparison with the second layer filter, if the value corresponding to any position is not 1, the query port is considered to be a forwarding port, otherwise it enters the third layer filter; in the comparison with the third layer filter, if the value corresponding to any position is not 1, the query port is considered to be 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 multi-layer Bloom filter NMBF is as follows: use the k hash functions to calculate the port to be queried, obtain k values ​​representing the corresponding positions in the NMBF, and compare them with the Bloom filter of the first layer. If one of the values ​​corresponding to these positions is not 1, it is considered that the query port is a forwarding port, otherwise it enters the second layer filter; In the second-layer filter comparison, if the value corresponding to a 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 considered to be a forwarding port.

6. The method according to claim 1, characterized in that The label includes the type of multiple layers of Bloom filters and the length of each layer; after receiving the data packet, the switching device takes out the byte string of the first filter from the label according to the type of multiple layers of Bloom filters and the length of each layer.

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

8. A stateless multicast system based on multi-layer Bloom filters, characterized in that: Including sending equipment, forwarding equipment, and receiving equipment; The sending device divides the multicast tree into layers, and determines for each multicast tree layer 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, and after the multicast tree encoding is completed, these filters are combined into labels according to the hierarchical order of the multicast tree, and added to the header of the data packet to be sent; wherein 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 label of the data packet header to obtain the byte string of the first filter, deserializes the byte string to construct a filter, and after obtaining the filter, selects a query algorithm according to the filter type, queries all ports in turn, 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 multi-layer 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 corresponding 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 corresponding positions of all non-forwarding ports on the hash table, and all positions that have been marked as 1 in the first layer are selected, and these positions are recorded as 1, and the rest are 0; in the third layer, the k hash functions are used to calculate the corresponding positions of all forwarding ports on the hash table, and all positions that have been marked as 1 in the second layer are selected, and these positions are recorded as 1, and the rest are 0.

10. The system according to claim 8, characterized in that The two-layer Bloom filter construction method of the negative multi-layer Bloom filter NMBF is as follows: in the first layer, k hash functions are used to calculate the corresponding positions of the corresponding multicast tree layer non-forwarding ports 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 corresponding 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 these positions are recorded as 1, and 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

  • Apparatus and method for bloom filter capable of improving false positives performance

    KR1020150030405A

  • Scalable software-defined networking (SDN) bloom filter-based forwarding

    WO2017031326A1

Cited By

  • Multicast data transmission method suitable for switch, switch and system

    CN120639730A