Star flash MESH-based wireless sensor network system and method
By using the StarSpark MESH system, combined with a multi-node and five-layer protocol stack design, a low-power, wide-coverage, and high-bandwidth wireless sensor network has been realized. This solves the shortcomings of existing Mesh networks in terms of security, energy efficiency, and transmission rate, and improves the applicability and scalability of the network.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-21
- Publication Date
- 2026-04-14
AI Technical Summary
Existing Mesh networks have shortcomings in terms of security, energy efficiency, transmission rate, and node role flexibility. In particular, Wi-Fi Mesh has high power consumption, BLE Mesh is prone to network congestion and does not support high-speed data transmission, and ZigBee Mesh has the risk of single point of failure and poor interoperability.
The wireless sensor network system using StarSpark MESH includes StarSpark ordinary nodes, StarSpark relay nodes, StarSpark fusion nodes, and StarSpark low-power nodes. It is configured with StarSpark device discovery bearers and StarSpark device service interaction bearers. Combining a five-layer protocol stack, the national cryptographic SM4-GCM encryption algorithm, and the elliptic curve Diffie-Hellman algorithm, it realizes secure key negotiation and network address allocation, and supports broadcast and connection-based high-speed data transmission.
It achieves a balance between low power consumption, wide coverage, and high bandwidth, supports audio and video streaming and large-capacity firmware upgrades, resists man-in-the-middle attacks, improves network applicability and scalability, reduces multi-hop transmission latency, provides different levels of service quality assurance, and improves development efficiency.
Smart Images

Figure CN121865253A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of wireless communication and the Internet of Things, specifically a wireless sensor network system and method based on StarSpark MESH. Background Technology
[0002] Wireless mesh networks are widely used in the Internet of Things (IoT) field due to their self-organizing, multi-hop transmission, and high fault tolerance characteristics. Currently common mesh technologies include Wi-Fi Mesh, BLE Mesh, and ZigBee Mesh, but each has its limitations: Wi-Fi Mesh has high power consumption, making it unsuitable for battery-powered devices; BLE Mesh uses a broadcast flooding mechanism, which can easily lead to network congestion and does not support high-speed data transmission; ZigBee Mesh relies on a coordinator, posing a single point of failure risk, and has poor interoperability.
[0003] Existing StarSpark MESH solutions also have significant shortcomings in terms of security, message efficiency, node role flexibility, and data transmission rate. For example, they lack encryption mechanisms, have excessively large message headers, and all nodes are relay nodes, which makes it impossible to achieve low-power operation. They only support broadcast mode and cannot support high-speed services such as audio and video.
[0004] To address these technical problems, those skilled in the art have proposed a wireless sensor network system and method based on Star Flash MESH. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a wireless sensor network system and method based on StarSpark MESH, which overcomes the shortcomings of existing Mesh networks in terms of security, energy efficiency, transmission rate, and node role flexibility.
[0006] A wireless sensor network system and method based on StarSpark MESH includes a wireless mesh network composed of multiple nodes, wherein the nodes include at least one or more of StarSpark ordinary nodes, StarSpark relay nodes, StarSpark fusion nodes and StarSpark low-power nodes. The StarSpark fusion node is configured to simultaneously support StarSpark device discovery bearer and StarSpark device service interaction bearer, and is used to perform broadcast communication and connection-based high-speed data transmission in the Mesh network. The system operates on a five-layer protocol stack, including the bearer layer, network layer, transport layer, access layer, and application layer. The bearer layer includes a StarSpark device discovery bearer and a StarSpark device service interaction bearer, used to manage the broadcast transmission and scanning reception of data, as well as connection establishment and high-speed data transmission; The network layer includes a network identifier filtering module, a replay detection module, an address resolution module, and a forwarding control module, which are used to implement packet routing, forwarding, and security filtering. The transport layer includes a message packet splitting and reassembly module, an acknowledgment and response management module, and a heartbeat message management module, which are used to ensure the reliability of end-to-end data transmission; The access layer is configured to use the national cryptographic SM4-GCM encryption algorithm to encrypt and decrypt the application layer payload, generate and verify message integrity check codes, and provide message subscription and filtering interfaces based on opcodes. During the node network access phase, the system employs a key negotiation mechanism based on the elliptic curve Diffie-Hellman algorithm, combined with a pre-set PIN code for authentication, to securely distribute network keys and assign network addresses.
[0007] Furthermore, the StarSpark device discovery bearer is used to send and receive data on the broadcast channel, with a maximum single data length of 255 bytes; the StarSpark device service interaction bearer is used to transmit data on the established StarSpark connection, with a maximum physical layer transmission rate of 12Mbps.
[0008] Furthermore, the packet header processed by the network layer includes at least: an 8-bit NetID field for identifying the network to which it belongs, an 8-bit TTL field for controlling the packet's lifespan, a 24-bit sequence number field for preventing replay, a 16-bit source address field, a 16-bit destination address field, a 16-bit initialization vector index field, and an 8-bit function flag field containing a fast relay flag.
[0009] Furthermore, the ACK response message defined by the ACK response management module of the transport layer includes: an operation code that identifies the ACK type, a length field that indicates the length of subsequent data, a status code field that characterizes the operation result, and a packet bitmap field that indicates the packet reception status; wherein, the status code includes at least three types: success, failure, and packet ACK.
[0010] Furthermore, when the access layer uses the SM4-GCM algorithm for encryption, the initialization vector is constructed from the following elements: the initialization vector index in the network layer header, the source address, the destination address, the sequence number, the 4-bit device salt value in the access layer PDU, and the function flag bit.
[0011] Furthermore, the role of the node in the network can be dynamically configured and switched according to network management instructions or its own policies; among them, the StarShine ordinary node can be configured as a StarShine relay node with relay function enabled, and the working mode of the StarShine low-power node is to periodically wake up to send and receive data and then enter a sleep state.
[0012] Furthermore, the network layer is also configured with a header authentication module, which uses the HMAC-SM3 algorithm and the NetKey to verify the received header, ensuring that the header has not been tampered with during transmission.
[0013] A wireless sensor network communication method based on star-flash mesh includes the following steps: S1. After the node is powered on, it enters the unconfigured state. By executing the secure network configuration process based on ECDH and PIN authentication, it obtains the NetKey and network address and enters the network-connected state. S2. When the sending node needs to send application data, the application layer generates the payload, the access layer uses the SM4-GCM algorithm and the current Nonce to encrypt the payload and generate the MIC, and constructs the access layer PDU containing the encrypted payload and the MIC. S3. The transport layer determines whether to split the data into packets based on the data size and adds transport layer control information. S4. The network layer adds a header to the data packet containing NetID, source / destination address, sequence number, TTL and flag bits, and calculates the header authentication tag; S5. The bearer layer selects to broadcast the final message through the StarSpark device discovery bearer or send it through the StarSpark device service interaction bearer via connection, based on the destination address, data size, and node role. S6. After receiving the message, the relay node verifies the validity of the message header and the sequence number, determines the forwarding strategy based on the TTL and flag bits, updates the TTL, and then hands it over to the bearer layer for forwarding. S7. After receiving the message, the destination node performs verification and decryption layer by layer, and finally delivers the decrypted payload to the application layer module that has subscribed to the corresponding Opcode for processing.
[0014] Furthermore, the secure network distribution process specifically includes: S101. Unconfigured network devices periodically broadcast beacons containing their device identifier and public key derivation information; S102. The network adapter sends an invitation message containing its own public key to the target device; S103. The target device responds to the invitation and sends its own public key to the network distribution device. S104. The network distribution device and the target device calculate a shared session key based on the ECDH algorithm using the other party's public key and its own private key; S105. The network adapter uses the session key to encrypt the NetKey, the assigned address, and other configuration information, and sends them to the target device to complete secure network access.
[0015] Furthermore, the method for constructing the Nonce is as follows: the initialization vector index, source address, destination address, and sequence number in the network layer packet header are concatenated with the device salt value and function flag bits in the access layer PDU, and the concatenated data is zero-padded to 96 bits.
[0016] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention, by introducing a star-flash fusion node and a dual-bearer architecture, breaks through the performance bottleneck of traditional mesh networks. The broadcast bearer ensures basic access and communication for a massive number of low-power nodes; while the connection-based SSAP bearer enables high-speed data transmission of up to 12Mbps between fusion nodes, thus truly supporting broadband services such as audio and video streaming and large-capacity firmware upgrades in a low-power mesh network for the first time. At the same time, the low-power nodes significantly extend battery life through a periodic sleep mechanism.
[0017] 2. This invention employs an ECDH key negotiation mechanism combined with a unique device PIN code authentication to securely distribute network keys without a pre-shared key, effectively resisting man-in-the-middle attacks. Application data is encrypted using the SM4-GCM algorithm to generate a 128-bit MIC checksum, ensuring data confidentiality and integrity. Simultaneously, the message header's legitimacy is verified using the HMAC-SM3 algorithm. By fusing source / destination addresses, sequence numbers, IVs, and device salt values to construct a unique, non-repeating random value (Nonce), combined with a sliding window detection mechanism at the network layer, the risks of replay attacks and cross-session attacks are fundamentally eliminated.
[0018] 3. This invention defines four roles: ordinary node, relay node, converged node, and low-power node, and supports dynamic configuration and switching. This design enables the network to adaptively optimize according to actual needs (such as coverage expansion, bandwidth requirements, and energy consumption limitations), solving the problems of single-function nodes and rigid network topology in traditional Mesh networks, and greatly improving the applicability and scalability of the network.
[0019] 4. This invention introduces a fast relay flag at the network layer, allowing relay nodes to skip complex MIC verification and forward directly in specific scenarios, significantly reducing the latency of multi-hop transmission. Furthermore, the transport layer is designed with a complete set of packet reassembly, selective ACK confirmation, and retransmission mechanisms to ensure the integrity and reliability of large data transmissions and provide different levels of quality of service assurance. At the same time, relying on the 5G Polar code and interference avoidance mechanism inherent in the StarFlash technology itself, the network has stronger anti-interference capabilities and lower air interface latency in complex electromagnetic environments.
[0020] 5. The five-layer protocol stack of bearer, network, transmission, access, and application clearly defined in this invention makes the functions of each layer clear and evolve independently. In particular, the complete decoupling of the application layer from the underlying communication layer, as well as the Opcode subscription filtering mechanism provided by the access layer, allow business developers to focus on defining business Opcodes without having to worry about complex network communication details. This greatly improves development efficiency and reduces system resource consumption. Attached Figure Description
[0021] Figure 1 This is a diagram of the StarSpark MESH networking architecture of the present invention; Figure 2 This is a diagram of the layered architecture of the StarSpark MESH protocol stack of the present invention; Figure 3 This is a logic diagram of the implementation of the bearer layer manager of the present invention; Figure 4 Flowchart for discovering the carrier broadcast for the StarSpark device; Figure 5 Flowchart for detecting carriers in StarScan devices; Figure 6 Flowchart of the server-side interaction carrier for StarSpark devices; Figure 7 Flowchart of the client interface for the StarSpark device service interaction carrier; Figure 8 A diagram illustrating the overall logic of network layer data processing; Figure 9 Flowchart for message header validity verification; Figure 10 Flowchart for network layer replay attack prevention detection; Figure 11 Flowchart for transport layer data packet segmentation and reassembly; Figure 12 Here is a flowchart of the transport layer data ACK response processing. Figure 13 Flowchart for publishing heartbeat messages at the transport layer; Figure 14 Flowchart for data encryption / decryption processing at the access layer; Figure 15 Flowchart for access layer data validity verification; Figure 16 For the power distribution network flowchart; Figure 17 This is a diagram showing the changes in network state. Detailed Implementation
[0022] The embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and should not be construed as limiting the scope of the invention.
[0023] As attached Figure 1 To be continued Figure 17 As shown: Example 1: As Figure 1 As shown, this embodiment provides a wireless sensor network system based on StarSpark MESH. The system network is composed of a mixture of various types of nodes, including StarSpark ordinary nodes, StarSpark relay nodes, StarSpark fusion nodes and StarSpark low-power nodes. These nodes together constitute a decentralized, self-organizing multi-hop wireless network.
[0024] Starflash ordinary nodes: As basic members of the network, they usually do not take the initiative to undertake message relay tasks, but continuously listen to the network and can quickly respond to control commands or report sensor data.
[0025] StarSignal Relay Node: In addition to the functions of a regular node, it enables the relay function to receive and forward messages from other nodes to extend network coverage. Such nodes typically do not have the ability to establish StarSignal Connections (SSAP).
[0026] StarSpark Convergence Node: This is a key node in the network, supporting both StarSpark device discovery (broadcast) and StarSpark device service interaction (SSAP, connection-oriented communication) capabilities. Therefore, it can participate in Mesh networking as a relay node and also establish high-speed, reliable connections with other convergence nodes for transmitting high-bandwidth data such as audio / video and large files (e.g., firmware upgrade packages). Typical convergence nodes include StarSpark gateways, network adapters, or high-performance StarSpark terminals (e.g., mobile phones).
[0027] Starflash low-power nodes: To meet the long-term operating requirements of battery-powered devices, these nodes are in a dormant state most of the time, only waking up periodically according to a preset cycle. During the short window of wake-up, they send and receive data, and then immediately return to dormancy, thus achieving extremely low average power consumption.
[0028] As shown above, after the system is powered on, the nodes securely join the network through the network configuration process described later. In daily communication, small data packets such as control commands and sensor status are mainly transmitted in the Mesh network via broadcast over multiple hops. When high-speed data transmission is required (such as when the gateway pushes firmware to multiple converged nodes), the relevant converged nodes establish SSAP connections, bypassing broadcast flooding, and directly conduct efficient point-to-point or multicast communication, thus achieving an organic unity of low power consumption, wide coverage, high bandwidth, and low latency.
[0029] It should be further explained in this embodiment that the core of this system is the implementation of a set of... Figure 2 The five-layer protocol stack shown, from bottom to top, consists of: bearer layer, network layer, transport layer, access layer, and application layer.
[0030] The bearer layer is the physical and link foundation of the protocol stack, responsible for the final transmission and reception of data packets. It contains two parallel bearers: Starlight device discovers the carrier: based on the Starlight broadcast mechanism. For example... Figure 4 and Figure 5 As shown, its workflow includes the creation, parameter setting, and sending of broadcast packets, as well as the initialization, packet reception, and processing of the scanner. The maximum single transmission unit of this carrier is 255 bytes, of which some bytes need to be reserved for the broadcast packet header and TLV format overhead specified by the Starlight Alliance. StarSpark device service interaction carrier: based on StarSpark Connection (SSAP protocol), such as Figure 6 and Figure 7 As shown, it is divided into server side (broadcast connectable signal, waiting for connection) and client side (initiating connection). After the connection is established, it can support a physical layer rate of up to 12Mbps and a single packet of up to 1500 bytes. A host layer manager (logic as follows) Figure 3 (As shown) is responsible for coordinating these two bearers. Based on upper-layer instructions, destination address, and packet size, it intelligently decides whether to use broadcast transmission or attempt to establish an SSAP connection for transmission.
[0031] The network layer is responsible for addressing, routing, and basic security filtering within the Mesh network. The packet header format it processes is shown in Table 1. Table 1. Network Layer PDUs for StarShine's MESH Networking field name length Function Description NetID 8bit Network identifier (0-255) is used to quickly filter data packets from outside the local network. TTL 8bit TTL is used to control the number of hops in this message. Sequence Number 24bit Anti-replay serial number, incrementing with each packet, is used in conjunction with IV for nonce and replay detection. Source Address 16bit Source device address Destination Address 16bit Target address IV 16bit Initialize the vector index, a globally synchronized scroll counter, used for Nonce construction. FL_Q 1 bit Fast relay (relay nodes can skip MIC verification) The overall logic of network layer data processing is as follows: Figure 8 As shown, it mainly includes: NetID filtering: After receiving a packet, a node first compares it with the NetID of the local network. If they do not match, the packet is discarded immediately. Replay protection detection: such as Figure 10 As shown, a sliding window mechanism is used. The node records the latest sequence number and IV received for each source address. When a new packet is received, if its (IV, Sequence Number) combination is within the history window or has expired, it is regarded as a replay attack packet and is discarded. Message header authentication: such as Figure 9 As shown, using the HMAC-SM3 algorithm, a 4-byte "header authentication tag" is generated with the network key (NetKey) and the entire message header as input. The receiver performs the same operation and compares the results to verify whether the message header has been tampered with during transmission. Address resolution and forwarding: Check the Destination Address. If it is the local address, submit it to the upper layer. If it is a broadcast / multicast address or a unicast address that needs to be relayed, determine the forwarding strategy based on the TTL and FL_Q flags. If FL_Q=1, skip the complex MIC verification and directly decrement the TTL by 1 before forwarding. This is suitable for latency-sensitive scenarios.
[0032] The transport layer ensures the reliability of end-to-end data transmission, and its PDU format is shown in Table 2: Table 2. Transmission Layer PDUs for StarSpark MESH Networking
[0033] Main functions of the transport layer: Packet segmentation and reassembly: When the data sent by the application layer exceeds the payload capacity of a single packet, the transport layer initiates packet segmentation. The packet format is shown in Table 5, containing information such as the packet number and the total number of packets. The sending process is as follows: Figure 11 The left half shows the data reassembled by the recipient according to the sub-package number. Figure 11 (Right half) to ensure complete transmission of big data.
[0034] ACK acknowledgment mechanism: When the sender sets FL_A=1, it expects an ACK response from the receiver. The ACK message format is shown in Table 6, containing status codes such as "Success", "Failure", and "Segmented ACK", as well as a segmented bitmap. Based on the ACK, the sender decides whether to terminate the transmission, retransmit the entire packet, or selectively retransmit lost segments (logic as follows). Figure 12 As shown in the figure, to reduce collisions, ACK replies are typically sent with a delay of 10-30ms.
[0035] Heart rate management: such as Figure 13 As shown, nodes that have joined the network periodically send heartbeat messages (message format as shown in Table 7) to a specified destination address (not 0x0000) for network liveness detection.
[0036] The access layer is a critical layer for security and business filtering, and its PDU format is shown in Table 3: Table 3. Mesh Network Access Layer PDUs of XingShan field name length Function Description Secret 1 bit Security Mode: 0 = Encrypted using NetKey, 1 = Encrypted using AppKey 1 bit Reserved fields DevSalt 4bit Device salt value increases nonce randomness and prevents cross-device replay attacks. IV 16bit Initialize the vector index, a globally synchronized scroll counter, used for Nonce construction. Access layer core functionality: Data encryption and decryption: such as Figure 14As shown, the sender uses the SM4-GCM algorithm to encrypt the payload and generates a 128-bit Message Integrity Check Code (MIC). The receiver uses the same key and Nonce to decrypt and verify the MIC. If it fails, the message is discarded. The construction of the Nonce is the key to this invention. It is composed of fields such as the IV, Source Address, Destination Address, Sequence Number of the network layer, and DevSalt and Secret of the access layer (padding with zeros if less than 96 bits) to ensure that the initialization vector for each encryption is globally unique.
[0037] Opcode subscription filtering: such as Figure 15 As shown, the application layer can subscribe to the opcodes it is interested in from the access layer. After decryption, the access layer will check the opcodes in the payload and only report the data corresponding to the subscribed opcodes to the application layer, effectively reducing the processing overhead of the application layer.
[0038] The application layer is located at the top of the protocol stack and is completely customized by developers. It is used to implement specific business logic (such as switch control, temperature reporting, firmware upgrade command parsing, etc.). It sends and receives data by calling lower-level interfaces, decoupling from the underlying communication mechanism and improving development flexibility and efficiency.
[0039] Furthermore, new devices must be added to the network through methods such as... Figure 16 The secure network configuration process shown addresses the issues of lack of encryption and vulnerability to man-in-the-middle attacks in existing technologies. Specifically, it involves: Beacon Broadcast: Unconnected devices periodically broadcast beacons containing their own MAC address and public key derivation information; Invitation: After the network configurator (such as a mobile app) scans the device, it sends an "invitation" message containing the network configurator's public key; Public key exchange: After receiving the invitation, the device replies with a response containing its own public key; Key negotiation and authentication: The network distribution unit and the device independently calculate the same shared secret based on the ECDH elliptic curve algorithm, using the other party's public key and its own private key. The key improvement is that the generator G used for ECDH calculation is not a fixed value, but is calculated by the SM3 hash algorithm from the device's MAC address and its factory-preset unique PIN code. The PIN code is always offline, thus implicitly completing device identity authentication in key negotiation and effectively resisting man-in-the-middle attacks. Secure distribution: The network adapter uses the negotiated session key to encrypt the network key (NetKey), the 16-bit short address assigned to the device, heartbeat configuration, and other information, and then distributes it to the device. After the device decrypts the encryption, it completes the network access process, and its state transitions from the unconfigured state to the normal operating state (state machine such as...). Figure 17 (As shown).
[0040] Furthermore, this system uses the national cryptographic standard SM4-GCM mode for application data encryption, such as... Figure 14 As shown, encryption requires an IV, ADD (Additional Authentication Data), a key, and plaintext; Key: Select either NetKey or AppKey based on the access layer Secret bit; ADD: Usually the entire message header, used for integrity verification; IV (Nonce) Construction: As mentioned earlier, multiple fields (IV, SrcAddr, DstAddr, Seq, DevSalt, Flags, etc.) from the network layer and access layer are concatenated to form a unique value. This design ensures that even if the same pair of devices sends a large number of messages in a short period of time, the encrypted Nonce will be completely different each time, fundamentally preventing replay attacks and security issues in encrypted mode. Output: After encryption, a ciphertext payload and a 128-bit MIC (authentication tag) are generated. The MIC is placed at the end of the message and transmitted along with the ciphertext for the receiver to verify. As can be seen from the above, this invention constructs a high-performance, highly reliable, low-power, and secure StarSpark Mesh wireless sensor network by integrating nodes with multiple roles, an innovative five-layer protocol stack design, an end-to-end security system based on national cryptographic algorithms, and a secure and efficient network configuration process.
[0041] Working principle: After the system starts up, each node initializes the corresponding protocol stack module according to its role. During the network configuration phase, key negotiation and address allocation are completed through ECDH and PIN authentication. During data transmission, the sender encrypts the payload with SM4-GCM at the access layer and generates a MIC. The network layer adds a message header and performs HMAC-SM3 signature. The receiver decrypts the data after verifying the validity of the message header, sequence number and MIC, and submits it to the application layer for processing according to the Opcode. The relay node determines whether to verify the MIC according to the FL_Q flag and whether to forward the data according to the TTL. Low-power nodes wake up according to the set period, and continue to sleep after sending and receiving data, thereby achieving energy efficiency optimization.
[0042] Example 2: This example provides a wireless sensor network communication method based on StarSpark MESH, including the following steps: S1. After the node is powered on, it enters the unconfigured state. By executing the secure network configuration process based on ECDH and PIN authentication, it obtains the NetKey and network address and enters the network-connected state. The secure network configuration process specifically includes: S101. Unconfigured network devices periodically broadcast beacons containing their device identifier and public key derivation information; S102. The network adapter sends an invitation message containing its own public key to the target device; S103. The target device responds to the invitation and sends its own public key to the network distribution device. S104. The network distribution device and the target device calculate a shared session key based on the ECDH algorithm using the other party's public key and its own private key; S105. The network adapter uses the session key to encrypt the NetKey, the assigned address, and other configuration information, and sends them to the target device to complete secure network access. S2. When the sending node needs to send application data, the application layer generates the payload, the access layer uses the SM4-GCM algorithm and the current Nonce to encrypt the payload and generate the MIC, and constructs the access layer PDU containing the encrypted payload and the MIC. S3. The transport layer determines whether to split the data into packets based on the data size and adds transport layer control information. S4. The network layer adds a header to the data packet containing NetID, source / destination address, sequence number, TTL and flag bits, and calculates the header authentication tag; S5. The bearer layer selects to broadcast the final message through the StarSpark device discovery bearer or send it through the StarSpark device service interaction bearer via connection, based on the destination address, data size, and node role. S6. After receiving the message, the relay node verifies the validity of the message header and the sequence number, determines the forwarding strategy based on the TTL and flag bits, updates the TTL, and then hands it over to the bearer layer for forwarding. S7. After receiving the message, the destination node performs verification and decryption layer by layer, and finally delivers the decrypted payload to the application layer module that has subscribed to the corresponding Opcode for processing.
[0043] In this embodiment, it should be further explained that the Nonce is constructed by concatenating the initialization vector index, source address, destination address, and sequence number in the network layer packet header with the device salt value and function flag bits in the access layer PDU, and then zero-padding the concatenated data to 96 bits.
[0044] The following is a comparison of key parameters between the SLE MESH implemented using this method and the existing BLE MESH. The BLE MESH data comparison is based on publicly available test data from Axiomtek: Packet sending interval BLE MESH packet loss rate SLE MESH packet loss rate BLE MESH latency SLE MESH latency 100ms 69.0% 13.6% / / 150ms 38.7% 2.7% / / 200ms 11.7% 0% / 30.4ms 250ms 0% 0% 154.64ms 36.8ms The embodiments of the present invention are given for the purposes of illustration and description. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Any changes, modifications, substitutions and variations made by those skilled in the art to the above embodiments within the scope of the present invention should be included within the protection scope of the present invention.
Claims
1. A wireless sensor network system based on StarSpark MESH, characterized in that: The wireless mesh network comprises multiple nodes, wherein the nodes include at least one or more of the following: StarSpark ordinary nodes, StarSpark relay nodes, StarSpark fusion nodes, and StarSpark low-power nodes. The StarSpark fusion node is configured to simultaneously support StarSpark device discovery bearer and StarSpark device service interaction bearer, and is used to perform broadcast communication and connection-based high-speed data transmission in the Mesh network. The system operates on a five-layer protocol stack, including the bearer layer, network layer, transport layer, access layer, and application layer. The bearer layer includes a StarSpark device discovery bearer and a StarSpark device service interaction bearer, used to manage the broadcast transmission and scanning reception of data, as well as connection establishment and high-speed data transmission; The network layer includes a network identifier filtering module, a replay detection module, an address resolution module, and a forwarding control module, which are used to implement packet routing, forwarding, and security filtering. The transport layer includes a message packet splitting and reassembly module, an acknowledgment and response management module, and a heartbeat message management module, which are used to ensure the reliability of end-to-end data transmission; The access layer is configured to use the national cryptographic SM4-GCM encryption algorithm to encrypt and decrypt the application layer payload, generate and verify message integrity check codes, and provide message subscription and filtering interfaces based on opcodes. During the node network access phase, the system employs a key negotiation mechanism based on the elliptic curve Diffie-Hellman algorithm, combined with a pre-set PIN code for authentication, to securely distribute network keys and assign network addresses.
2. The wireless sensor network system based on StarSpark MESH as described in claim 1, characterized in that: The StarSpark device discovery bearer is used to send and receive data on the broadcast channel, with a maximum data length of 255 bytes per transmission. The StarSpark device service interaction bearer is used to transmit data on established StarSpark connections, with a maximum physical layer transmission rate of 12Mbps.
3. The wireless sensor network system based on StarSpark MESH as described in claim 1, characterized in that: The packet header processed by the network layer includes at least: an 8-bit NetID field for identifying the network to which it belongs, an 8-bit TTL field for controlling the packet's lifespan, a 24-bit sequence number field for preventing replay, a 16-bit source address field, a 16-bit destination address field, a 16-bit initialization vector index field, and an 8-bit function flag field containing a fast relay flag.
4. The wireless sensor network system based on StarSpark MESH as described in claim 1, characterized in that: The ACK response message defined by the ACK response management module of the transport layer includes: an opcode identifying the ACK type, a length field indicating the length of subsequent data, a status code field representing the operation result, and a packet bitmap field indicating the packet reception status; wherein, the status code includes at least three types: success, failure, and packet ACK.
5. The wireless sensor network system based on StarSpark MESH as described in claim 1, characterized in that: When the access layer uses the SM4-GCM algorithm for encryption, the initialization vector is constructed from the following elements: the initialization vector index in the network layer header, the source address, the destination address, the sequence number, the 4-bit device salt value in the access layer PDU, and the function flag bit.
6. The wireless sensor network system based on StarSpark MESH as described in claim 1, characterized in that: The role of the nodes in the network can be dynamically configured and switched according to network management instructions or their own policies; among them, the StarShine ordinary nodes can be configured as StarShine relay nodes with relay function enabled, and the working mode of the StarShine low-power nodes is to periodically wake up to send and receive data and then enter a sleep state.
7. The wireless sensor network system based on StarSpark MESH as described in claim 1, characterized in that: The network layer is also configured with a header authentication module, which uses the HMAC-SM3 algorithm and the NetKey to verify the received header, ensuring that the header has not been tampered with during transmission.
8. A wireless sensor network communication method based on a star-studded mesh, applied to a wireless sensor network system based on a star-studded mesh as described in any one of claims 1-7, characterized in that, Includes the following steps: S1. After the node is powered on, it enters the unconfigured state. By executing the secure network configuration process based on ECDH and PIN authentication, it obtains the NetKey and network address and enters the network-connected state. S2. When the sending node needs to send application data, the application layer generates the payload, the access layer uses the SM4-GCM algorithm and the current Nonce to encrypt the payload and generate the MIC, and constructs the access layer PDU containing the encrypted payload and the MIC. S3. The transport layer determines whether to split the data into packets based on the data size and adds transport layer control information. S4. The network layer adds a header to the data packet containing NetID, source / destination address, sequence number, TTL and flag bits, and calculates the header authentication tag; S5. The bearer layer selects to broadcast the final message through the StarSpark device discovery bearer or send it through the StarSpark device service interaction bearer via connection, based on the destination address, data size, and node role. S6. After receiving the message, the relay node verifies the validity of the message header and the sequence number, determines the forwarding strategy based on the TTL and flag bits, updates the TTL, and then hands it over to the bearer layer for forwarding. S7. After receiving the message, the destination node performs verification and decryption layer by layer, and finally delivers the decrypted payload to the application layer module that has subscribed to the corresponding Opcode for processing.
9. The wireless sensor network communication method based on star-flash mesh as described in claim 8, characterized in that: The secure network configuration process specifically includes: S101. Unconfigured network devices periodically broadcast beacons containing their device identifier and public key derivation information; S102. The network adapter sends an invitation message containing its own public key to the target device; S103. The target device responds to the invitation and sends its own public key to the network distribution device. S104. The network distribution device and the target device calculate a shared session key based on the ECDH algorithm using the other party's public key and its own private key; S105. The network adapter uses the session key to encrypt the NetKey, the assigned address, and other configuration information, and sends them to the target device to complete secure network access.
10. The wireless sensor network communication method based on star-flash mesh as described in claim 1, characterized in that: The Nonce is constructed by concatenating the initialization vector index, source address, destination address, and sequence number in the network layer header with the device salt value and function flag bits in the access layer PDU, and then padding the concatenated data with zeros to 96 bits.