CN110996268B - SIG mesh-based broadcast bearer layer message filtering strategy method - Google Patents

SIG mesh-based broadcast bearer layer message filtering strategy method Download PDF

Info

Publication number
CN110996268B
CN110996268B CN201911276895.0A CN201911276895A CN110996268B CN 110996268 B CN110996268 B CN 110996268B CN 201911276895 A CN201911276895 A CN 201911276895A CN 110996268 B CN110996268 B CN 110996268B
Authority
CN
China
Prior art keywords
mesh
broadcast
queue
filtering
broadcast message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911276895.0A
Other languages
Chinese (zh)
Other versions
CN110996268A (en
Inventor
徐超
张昭
谢如昕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Panchip Microelectronics Co ltd
Original Assignee
Shanghai Panchip Microelectronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Panchip Microelectronics Co ltd filed Critical Shanghai Panchip Microelectronics Co ltd
Priority to CN201911276895.0A priority Critical patent/CN110996268B/en
Publication of CN110996268A publication Critical patent/CN110996268A/en
Application granted granted Critical
Publication of CN110996268B publication Critical patent/CN110996268B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method for filtering messages of a broadcast bearing layer based on SIG mesh, which is based on a Bluetooth SIG mesh network, wherein the mesh network comprises a bearer layer, a network layer, a transport layer and an access layer, the bearer layer transmits data among mesh nodes and transmits the data to the network layer, the mesh nodes receive the broadcast messages on the bearer layer, and the broadcast messages are compared with a preset queue to filter the broadcast messages in the mesh network, so that the consumption of an RAM (random access memory) and the execution time of a CPU (central processing unit) are reduced. The invention optimizes the RAM and CPU execution time and BLE scanning time consumed by the interference of the air non-mesh broadcast packet, and optimizes the RAM consumption and CPU execution time caused by repeated data packets.

Description

SIG mesh-based broadcast bearer layer message filtering strategy method
Technical Field
The invention relates to the technical field of Bluetooth SIG mesh, in particular to a method for filtering messages of a broadcast bearing layer based on the SIG mesh.
Background
At present, more and more devices are networked through the Bluetooth mesh, and the network scale is larger and larger. A home may also have hundreds of mesh nodes, such as a smart lamp, a smart socket, a smart fan, etc., however, each manufacturer may repeatedly send the same data packet for a plurality of times in order to stably control the operation of the device, for example, a makita's sprite turns on the smart lamp to send about 10 identical data packets, and these 10 messages are forwarded and spread by other devices in the room, which may result in a very large number of data packets in the air, and thus for a Micro Controller Unit (MCU) with low processing capability and low RAM, it is a very large burden to receive and process these data messages.
At present, many Bluetooth chips are Low-speed microprocessor chips, if a mesh node developed by these chips receives a Bluetooth broadcast message through a Low power consumption Bluetooth (BLE) protocol stack standard, it takes a lot of time to know whether the broadcast message is a mesh message, which may cause a load of a CPU, and a BLE frequent interruption callback may also shorten a time for BLE scanning.
The BLE mesh devices on the market can transmit the same data messages for multiple times in order to improve the quality of the broadcast messages, and when the network scale is large, the same data messages are increased. When the BLE mesh device scans that the messages need to be cached in the RAM and then transferred to the network layer, redundant data messages are discarded. This results in a very large RAM overhead, which is not manageable for a typically small embedded system. Meanwhile, each data packet can only know whether to discard the data packet by carrying out AES-CCM decryption on a network layer, and the same data message processing greatly improves the load of a CPU.
Therefore, those skilled in the art are dedicated to develop a method for SIG mesh based broadcast bearer (bearer) layer packet filtering policy, which minimizes these burdens.
Disclosure of Invention
In view of the above-mentioned defects of the prior art, the technical problem to be solved by the present invention is how to reduce the burden of receiving and processing broadcast data packets by the bluetooth SIG mesh node device.
In order to achieve the above object, the present invention provides a method for a broadcast bearer layer packet filtering policy based on SIG mesh, which is characterized in that the method is based on a bluetooth SIG mesh network, the mesh network includes a bearer layer, a network layer, a transport layer, and an access layer, the bearer layer transmits data between mesh nodes and transmits the data to the network layer, the mesh nodes receive broadcast packets on the bearer layer, and the broadcast packets are compared with a preset queue to filter the broadcast packets in the mesh network, thereby reducing the consumption of RAM and the execution time of CPU.
Further, the filtering of the broadcast message in the mesh network includes filtering of a non-mesh broadcast message and filtering of a duplicate mesh broadcast message.
Further, the filtering of the non-mesh broadcast packet includes the following steps:
step 1.1, setting a broadcast identifier corresponding to the mesh broadcast message;
step 1.2, the mesh node records the broadcast identifier into the queue;
step 1.3, comparing the broadcast message received by the mesh node with the queue;
and step 1.4, if the queue has the broadcast identifier of the broadcast message received by the mesh node, receiving the broadcast message, otherwise, discarding the broadcast message.
Furthermore, the implementation manner of filtering the non-mesh broadcast message includes an application program interface, digital circuit hardware, and a host control interface.
Further, the filtering of the duplicate mesh broadcast message includes the following steps:
step 2.1, initializing the queue, wherein the queue comprises a plurality of elements, and the elements comprise a digital fingerprint and original data with a certain length;
step 2.2, solving the digital fingerprint of the broadcast message data packet received by the mesh node;
step 2.3, forming an element by the digital fingerprint and original data with a certain length;
step 2.4, comparing the elements formed in the step 2.3 with all the elements in the queue, if the elements are the same, discarding the repeated packet, and turning to the step 2.6, otherwise, receiving the broadcast message;
step 2.5, pushing the elements formed in the step 2.3 into a queue;
and 2.6, repeating the steps 2.2 to 2.5.
Further, the depth of the queue is 5 to 50.
Further, the depth of the queue is 10.
Further, the digital fingerprint includes a checksum or a hash value.
Further, the length of the original data is 1 to 3 bytes.
Further, the length of the original data is 3 bytes.
The beneficial technical effects of the invention are as follows:
1. and optimizing the RAM consumed due to the interference of the air non-mesh broadcast packet, the execution time of the CPU and the BLE scanning time.
2. And optimizing the consumption of the RAM and the execution time of the CPU caused by repeated data packets.
The conception, the specific structure and the technical effects of the present invention will be further described with reference to the accompanying drawings to fully understand the objects, the features and the effects of the present invention.
Drawings
FIG. 1 is a block diagram of a non-mesh packet filtering policy flow in accordance with a preferred embodiment of the present invention;
FIG. 2 is a block diagram of a data packet filtering strategy according to a preferred embodiment of the present invention.
Detailed Description
The technical contents of the preferred embodiments of the present invention will be more clearly and easily understood by referring to the drawings attached to the specification. The present invention may be embodied in many different forms of embodiments and the scope of the invention is not limited to the embodiments set forth herein.
The invention adds a strategy for filtering non-mesh messages and repeated mesh messages based on the standard of a broadcast bearing (bearer) layer of SIG mesh.
Example one
Filtering non-mesh broadcast packet policy:
aiming at the interference of other non-mesh broadcasts in the mesh network, the filtering is finished at the fastest speed by a software method.
According to the method, the interference of non-mesh broadcasting is filtered as soon as possible, and a broadcast identifier (adv flag) filter function interface void adv _ flag _ set (agent 8_ t flag) and void adv _ flag _ remove (agent 8_ t flag) are added.
And calling the adv _ flag _ remove function by the user to add a field to the global adv flag queue, and calling the adv _ flag _ remove to remove the same field of the global adv flag queue. The BLE bottom layer data interrupt service starts to receive the broadcast message, compares the adv flag field of the received broadcast message with the adv flag queue set by the user, and if the adv flag field of the received broadcast message does not exist in the adv flag queue set by the user, immediately discards the received broadcast message without reporting to a user interface, so that the CPU time of the user is greatly prolonged, and the time occupied by interrupt is also reduced.
The setting and comparison of the adv flag can also be realized by a digital circuit, or software is realized by a Host Controller Interface (HCI) command. For example, a digital circuit may store the value of the adv flag via 8 32-bit registers, and an independent 32-bit register may enable and disable the register corresponding to the adv flag storage via a bit, in a manner analogous to the filter function interfaces, void adv _ flag _ set (uint8_ t flag) and void adv _ flag _ remove (uint8_ t flag). The mode principle of the software HCI interface is equivalent to the filter function interfaces void adv _ flag _ set (agent 8_ t flag) and void adv _ flag _ remove (agent 8_ t flag).
As shown in fig. 1, the filtering of the non-mesh broadcast packet policy includes the following steps:
1. a user calls an Application Programming Interface (API) function to set an adv flag parameter;
2. the chip records these flags into a queue Q1;
3. the BLE data interruption generates data content marked as A;
4. and judging whether the Q1 has the flag of A, if so, receiving the data message and informing the user through a standard BLE protocol, and if not, discarding the data packet.
Example two
Filtering the repeated data packets in the mesh network:
aiming at the problem that mesh receives the same broadcast message for multiple times, the same data message is filtered through a strategy of software.
The method is suitable for devices which are already connected to the network, and according to the standard of SIG mesh, the serial number (sequence number) of each data packet is different, which means that the content of each data packet is different. Where identical packets are relatively close in time, we can initialize a queue, where each set of data in the queue can be a 16-byte checksum or hash (hash) value of a mesh packet, and 1 to 3 bytes of original data. The checksum of the received data packets is calculated every time, 3 bytes of original data are stored, and the data are pushed into a queue to form an element.
Checksum (or hash value)
Data0
Data1
Data2
The depth of the queue can be planned according to the actual network scale and the network node attribute, and is set as 10 by default. These values are calculated when the broadcast packet data is received and compared to all elements in the queue, and if they are the same, the duplicate packet is discarded.
The method of the present invention is an alternative method to the method of the present invention, in which the same data is buffered in the queue, and the same data packet is discarded by comparing the buffered same data in any way. Such as caching all real data or caching the value of the xor sum of the real data, etc.
As shown in fig. 2, filtering the mesh network duplicated data includes the following steps:
1. receiving a mesh broadcast message;
2. calculating a hash value, and storing the hash value and 3 original data into a queue Q1;
3. and judging whether the Q1 has the same data as the tail part of the Q1, if so, receiving the data message, and otherwise, discarding the data message.
The foregoing detailed description of the preferred embodiments of the invention has been presented. It should be understood that numerous modifications and variations could be devised by those skilled in the art in light of the present teachings without departing from the inventive concepts. Therefore, the technical solutions available to those skilled in the art through logic analysis, reasoning and limited experiments based on the prior art according to the concept of the present invention should be within the scope of protection defined by the claims.

Claims (7)

1. A method for filtering messages of a broadcast bearing layer based on SIG mesh is characterized in that the method is based on a Bluetooth SIG mesh network, the mesh network comprises a bearer layer, a network layer, a transport layer and an access layer, the bearer layer transmits data among mesh nodes and transmits the data to the network layer, the mesh nodes receive the broadcast messages on the bearer layer, and the broadcast messages are compared with a preset queue to filter the broadcast messages in the mesh network, so that the consumption of RAM and the execution time of a CPU are reduced;
the filtering of the broadcast message in the mesh network comprises filtering of a non-mesh broadcast message and filtering of a repeated mesh broadcast message;
the filtering of the non-mesh broadcast message comprises the following steps:
step 1.1, setting a broadcast identifier corresponding to the mesh broadcast message;
step 1.2, the mesh node records the broadcast identifier into the queue;
step 1.3, comparing the broadcast message received by the mesh node with the queue;
step 1.4, if the queue has the broadcast identifier of the broadcast message received by the mesh node, receiving the broadcast message, otherwise, discarding the broadcast message;
the specific software implementation mode for filtering the non-mesh broadcast message comprises the following steps:
step S1, the user calls an Application Programming Interface (API) function to set the adv flag parameter;
step S2, recording the flags into a queue Q1 by the chip;
step S3, recording BLE data interruption generation data content as a;
step S4, judging whether Q1 has flag of A, if yes, receiving the broadcast message and informing the user through a standard BLE protocol, otherwise, discarding the broadcast message;
the filtering of the repeated mesh broadcast messages comprises the following steps:
step 2.1, initializing the queue, wherein the queue comprises a plurality of elements, and the elements comprise a digital fingerprint and original data with a certain length;
step 2.2, solving the digital fingerprint of the broadcast message data packet received by the mesh node;
step 2.3, forming an element by the digital fingerprint and original data with a certain length;
step 2.4, comparing the elements formed in the step 2.3 with all the elements in the queue, if the elements are the same, discarding the repeated packet, and turning to the step 2.6, otherwise, receiving the broadcast message;
step 2.5, pushing the elements formed in the step 2.3 into a queue;
step 2.6, repeating the steps 2.2 to 2.5;
the specific software implementation mode for filtering the repeated mesh broadcast messages comprises the following steps:
step T1, receiving a mesh broadcast message;
step T2, calculating a hash value, and storing the hash value and 3 original data into a queue Q1;
and step T3, judging whether the Q1 has the same data as the tail part of the Q1, if so, receiving the broadcast message, otherwise, discarding the broadcast message.
2. The SIG mesh-based broadcast bearer layer message filtering strategy of claim 1, wherein the filtering of non-mesh broadcast messages is implemented in a manner comprising an application program interface, digital circuit hardware, and a host control interface.
3. The SIG mesh based broadcast bearer layer packet filtering policy method of claim 1, wherein the depth of the queue is 5 to 50.
4. The SIG mesh-based broadcast bearer layer packet filtering policy method of claim 3, wherein the depth of the queue is 10.
5. The SIG mesh based broadcast bearer layer message filtering strategy method of claim 1, wherein the digital fingerprint comprises a checksum or a hash value.
6. The SIG mesh based broadcast bearer layer packet filtering policy method of claim 1, wherein the original data is 1 to 3 bytes in length.
7. The SIG mesh based broadcast bearer layer packet filtering policy method of claim 6, wherein the original data is 3 bytes in length.
CN201911276895.0A 2019-12-12 2019-12-12 SIG mesh-based broadcast bearer layer message filtering strategy method Active CN110996268B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911276895.0A CN110996268B (en) 2019-12-12 2019-12-12 SIG mesh-based broadcast bearer layer message filtering strategy method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911276895.0A CN110996268B (en) 2019-12-12 2019-12-12 SIG mesh-based broadcast bearer layer message filtering strategy method

Publications (2)

Publication Number Publication Date
CN110996268A CN110996268A (en) 2020-04-10
CN110996268B true CN110996268B (en) 2021-09-24

Family

ID=70092957

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911276895.0A Active CN110996268B (en) 2019-12-12 2019-12-12 SIG mesh-based broadcast bearer layer message filtering strategy method

Country Status (1)

Country Link
CN (1) CN110996268B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111800773B (en) * 2020-06-30 2021-08-24 深圳市中科蓝讯科技股份有限公司 Bluetooth Mesh node message repetition identification method, system and storage medium
CN113965889B (en) * 2020-07-03 2023-03-31 阿里巴巴集团控股有限公司 Data processing, filtering information quantity determining and configuring method, equipment and medium
CN113660127B (en) * 2021-08-19 2024-02-20 广东九联科技股份有限公司 Networking control method, device and equipment based on easy mesh networking

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107071717A (en) * 2017-06-15 2017-08-18 重庆智石网络科技有限公司 A kind of collecting method and device based on Bluetooth technology
CN108777844A (en) * 2018-05-17 2018-11-09 北京百瑞互联技术有限公司 A kind of localization method and system based on bluetooth MESH network
CN108964813A (en) * 2018-07-04 2018-12-07 哈尔滨工业大学 Based on antijam wireless communication system in the cabin 802.11ac

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080205385A1 (en) * 2007-02-26 2008-08-28 Motorola, Inc. Data frame formats to improve groupcast efficiency in multi-hop wireless networks
CN110022569A (en) * 2018-12-17 2019-07-16 杭州全维技术股份有限公司 A kind of wireless performance optimization method of the inhibition arp and dhcp broadcasting packet based on kernel

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107071717A (en) * 2017-06-15 2017-08-18 重庆智石网络科技有限公司 A kind of collecting method and device based on Bluetooth technology
CN108777844A (en) * 2018-05-17 2018-11-09 北京百瑞互联技术有限公司 A kind of localization method and system based on bluetooth MESH network
CN108964813A (en) * 2018-07-04 2018-12-07 哈尔滨工业大学 Based on antijam wireless communication system in the cabin 802.11ac

Also Published As

Publication number Publication date
CN110996268A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
CN110996268B (en) SIG mesh-based broadcast bearer layer message filtering strategy method
US8908564B2 (en) Method for Media Access Control address learning and learning rate suppression
JP6441404B2 (en) Methods and devices for updating clients
CN1171429C (en) Internal communication protocol using for data exchange apparatus
US7760629B2 (en) Aggregate data frame generation
EP2363996A1 (en) Hashing algorithm for determining a default kernel receive queue
CN108848025B (en) Data processing method, intelligent gateway and Internet of things system
US11316804B2 (en) Forwarding entry update method and apparatus in a memory
US20220191140A1 (en) Data transmission control method, apparatus, and storage medium
CN107204924B (en) Link discovery method and device
CN112565334A (en) Access method and device of Internet of things equipment and MQTT gateway
CN100429906C (en) Linking frame data by inserting qualifiers in control blocks
KR102303424B1 (en) Direct memory access control device for at least one processing unit having a random access memory
WO2024036891A1 (en) Message sending parameter setting method, electronic device, and storage medium
JP2020088517A (en) Communication apparatus, and control method and program of communication apparatus
CN115955447A (en) Data transmission method, switch and switch system
CN111800773B (en) Bluetooth Mesh node message repetition identification method, system and storage medium
CN115866103A (en) Message processing method and device, intelligent network card and server
CN111240867B (en) Information communication system and method
CN104219178A (en) Openflow-based control message processing method, Openflow-based control message transmitting device, Openflow-based control message receiving device and Openflow-based control message processing system
CN111614791B (en) Access device for entity link analysis and method thereof
CN113676413A (en) Method and device for rearranging disordered messages and storage medium
CN115280724A (en) Method for handling data anomalies, in particular in a motor vehicle
CN113890748B (en) Method, system, device and storage medium for accessing MCTP device
Luo et al. Implementation of bootloader based on DoIP

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant