Starburst MESH networking data communication method, device, system and medium
By utilizing the StarSpark MESH networking data communication method and the design of initialization and preset formats, the transmission rate, reliability, and power consumption issues of traditional wireless MESH protocols are solved, achieving efficient and reliable network communication.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2026-03-24
AI Technical Summary
Traditional wireless MESH protocols have shortcomings in terms of transmission rate, device connection reliability, network capacity, and power consumption, and cannot simultaneously meet the requirements of high efficiency, reliability, and low power consumption.
The StarSpark MESH networking data communication method is adopted. By initializing and enabling the StarSpark protocol stack, data receiving, sending and storage threads are created. Preset message formats and data queuing formats are designed to realize data parsing, sending and storage. Combined with watchdog program and status control, the normal operation of the device is ensured.
It achieves high transmission rate, high device connection reliability, high network capacity and low power consumption, improving network communication efficiency and device status management stability.
Smart Images

Figure CN120416923B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of MESH networking technology, and in particular to a StarSpark MESH networking data communication method, device, system and medium. Background Technology
[0002] Wireless Mesh Networks (WMNs) are specially designed wireless communication protocols aimed at providing a more flexible, reliable, and easily scalable way to build and manage wireless networks. They are self-organizing wireless networks, typically characterized by multiple nodes, no central authority, and self-organization. Among related technologies, the main mesh protocols used in the Internet of Things (IoT) include BLE Mesh, WiFi Mesh, and ZigBee Mesh. However, traditional mesh protocols all have significant drawbacks.
[0003] WiFiMESH suffers from high power consumption, poor signal stability, and high equipment deployment costs.
[0004] BLE MESH has poor transmission speed, and the reliability of device connections decreases when the network node density is too high.
[0005] ZigBee MESH suffers from high routing dependency, maintenance difficulties, and limitations in network capacity, transmission rate, and scalability.
[0006] Therefore, how to solve the technical problems existing in traditional wireless MESH protocol technology has become a technical challenge that needs to be overcome by those skilled in the art. Summary of the Invention
[0007] This invention proposes a method, device, system, and medium for data communication in a StarSpark MESH network, which addresses the technical problem that traditional wireless MESH protocol technology cannot simultaneously meet the requirements of high transmission rate, high device connection reliability, high network capacity, and low power consumption.
[0008] In a first aspect, one embodiment of the present invention provides a StarSpark MESH networking data communication method, comprising:
[0009] Device initialization includes enabling the StarScan protocol stack and creating data receiving, data sending, and data storage threads;
[0010] Executing the data receiving thread includes starting a data receiving interrupt function to receive first target data information, and parsing and receiving the first target data information according to a preset message format;
[0011] Executing the data sending thread includes generating second target data information according to the preset message format, and adding the second target data information to the data sending task queue according to the preset data enqueue format before sending the data.
[0012] The data storage thread is executed, including storing preset data and historical received data information.
[0013] The StarSpark MESH networking data communication method of the present invention has at least the following beneficial effects:
[0014] This invention discloses a StarSpark MESH networking data communication method. It enables the StarSpark protocol stack during device initialization and creates a data receiving thread, a data sending thread, and a data storage thread. In the data receiving thread, a data receiving terminal function is started to receive first target data information, and the first target data is parsed and processed according to a preset message format. In the data sending thread, second target data is generated according to the preset message format, and the second target data information is added to the data sending task queue according to a preset data enqueue format before data transmission. In the data storage thread, preset stored data and historical received data information are stored. This invention proposes a StarSpark MESH networking data communication method, and by designing a preset message format for StarSpark MESH networking data communication, it simultaneously satisfies the characteristics of high data transmission efficiency, reliable device connection, high network capacity, and low power consumption. This solves the technical problem that traditional wireless MESH protocol technology cannot simultaneously meet the requirements of high transmission rate, reliable device connection, high network capacity, and low power consumption in related technologies.
[0015] According to other embodiments of the StarSpark MESH networking data communication method of the present invention, the preset message format includes one or more of the following: company ID, device type, source address, destination address, TTL value, flag bit, message version number, startup count, and payload;
[0016] The step of parsing and receiving the first target data according to a preset message format includes:
[0017] The first target data information is parsed to obtain the corresponding source address, message version number, and startup count;
[0018] Based on the source address, the message version number, and the number of startups, determine whether the first target data information is unprocessed information;
[0019] If so, then the first target data information is received and processed;
[0020] Otherwise, abandon the reception and processing of the first target data information and return to the execution of the data reception thread.
[0021] According to other embodiments of the StarSpark MESH networking data communication method of the present invention, the step of determining whether the first target data information is unprocessed information based on the source address, the message version number and the number of startups includes:
[0022] Determine whether the source address is in the historical received data information;
[0023] If not, then the first target data information is determined to be the unprocessed information;
[0024] If so, determine whether the number of startups is greater than the number of historical startups in the historical received data;
[0025] If the number of startups is greater than the number of historical startups in the historical received data, then the first target data information is determined to be the unprocessed information;
[0026] If the number of startups is less than the number of historical startups in the historical received data, then the first target data information is determined to be processed information;
[0027] If the number of startups is equal to the number of historical startups in the historical received data, then determine whether the message version number is greater than the historical message version number in the historical received data;
[0028] If so, then the first target data information is determined to be the unprocessed information;
[0029] Otherwise, the first target data information is determined to be the processed information.
[0030] According to other embodiments of the StarSpark MESH networking data communication method of the present invention, the preset data queuing format includes the second target data information, unicast peer address, priority, total data transmission duration, data transmission mode, and repeat transmission selection;
[0031] The step of adding the second target data information to the data transmission task queue according to a preset data queuing format and then transmitting the data includes:
[0032] The second target data information is added to the data transmission task queue according to the priority.
[0033] The second target data information is sent out based on the unicast peer address, the total data transmission duration, the data transmission mode, and the repeated transmission selection.
[0034] According to other embodiments of the StarSpark MESH networking data communication method of the present invention, the step of parsing and receiving the first target data information according to a preset message format further includes:
[0035] Determine whether the TTL value is greater than 0.
[0036] If the TTL value is greater than 0, then determine whether the destination address is the current device's own address;
[0037] If the destination address is the current device's own address;
[0038] Then, after parsing and receiving the first target data information, the business processing is performed.
[0039] If the destination address is not the current device's own address, the first target data information is added to the data transmission task queue and then the data is forwarded.
[0040] According to other embodiments of the StarSpark MESH networking data communication method of the present invention, the method further includes:
[0041] Enable watchdog program;
[0042] Periodically check whether the watchdog program is triggered;
[0043] If so, the data storage thread will store the current device information and then perform a soft reset operation.
[0044] The star-flash mesh networking data communication method according to other embodiments of the present invention further includes:
[0045] Receive the status control command from the debugging machine and classify the current device into idle state, waiting to be grouped state, waiting to join the network state, not grouped and not joined the network state, grouped and not joined the network state, not grouped and joined the network state, or grouped and joined the network state.
[0046] The current device in the idle state is controlled by the debugging machine;
[0047] The current device in the waiting packet state is controlled by the debugger and is used to forward the debugger's local packet information;
[0048] The current device in the waiting-to-join-the-network state is controlled by the debugging machine and is used to receive network access feedback information from the gateway device;
[0049] The current device in the ungrouped and not networked state, the grouped and not networked state, the ungrouped and networked state, or the grouped and networked state is subject to group control or single control by the gateway device or the debugging machine;
[0050] The current device, which is in the grouped but not yet networked state or the grouped and networked state, is subject to the group control of the gateway device or the debugging machine.
[0051] The star-flash mesh networking data communication method according to other embodiments of the present invention further includes:
[0052] Set a preset duration timer, and generate heartbeat data information after the preset duration timer is triggered;
[0053] Determine whether the current device is in the "grouped and networked" state;
[0054] If so, then obtain a random number from the preset range;
[0055] Start the heartbeat packet sending timer based on the random number;
[0056] The data sending thread is executed to send the heartbeat packet data to the server platform through the gateway device to keep the current device online.
[0057] Secondly, one embodiment of the present invention provides a StarSpark MESH networking data communication device, comprising:
[0058] The initialization module enables the StarShine protocol stack and creates data receiving, data sending, and data storage threads.
[0059] The data receiving thread execution module is used to start the data receiving interrupt function to receive the first target data information and to parse and process the first target data information according to the preset message format.
[0060] The data sending thread execution module is used to generate second target data information according to the preset message format, and add the second target data information to the data sending task queue according to the preset data enqueue format before sending the data.
[0061] The data storage thread execution module is used to store preset data and historical received data information.
[0062] Thirdly, an embodiment of the present invention provides a StarSpark MESH networking data communication system, including a debugging machine, multiple sub-devices, at least one gateway device, and a server platform;
[0063] The server platform is connected to at least one of the gateway devices via a 4G network or a 5G network.
[0064] At least one of the gateway devices is connected to the corresponding sub-device via StarFlash communication;
[0065] The debugging machine is connected to multiple sub-devices via Star Flash Communication;
[0066] Among them, multiple sub-devices perform data communication using the StarSpark MESH networking data communication method described above.
[0067] Fourthly, one embodiment of the present invention provides a computer-readable storage medium storing an executable program, which is executed by a processor to implement the StarSpark MESH networking data communication method as described above. Attached Figure Description
[0068] Figure 1 This is a schematic diagram illustrating the steps of a specific embodiment of a Star Flash MESH networking data communication method according to an embodiment of the present invention;
[0069] Figure 2 This is a schematic diagram of a specific embodiment of step S200, which includes sub-steps, in a StarSpark MESH networking data communication method according to an embodiment of the present invention;
[0070] Figure 3 This is a schematic diagram illustrating a specific embodiment of the preset message format in a StarSpark MESH networking data communication method according to an embodiment of the present invention;
[0071] Figure 4 This is a schematic diagram of a specific embodiment of step S220, which includes sub-steps, in a StarSpark MESH networking data communication method according to an embodiment of the present invention;
[0072] Figure 5 This is a schematic diagram of a specific embodiment of the preset data queuing format in a Star Flash MESH networking data communication method according to an embodiment of the present invention;
[0073] Figure 6 This is a schematic diagram of a specific embodiment of step S300, which includes sub-steps, in a StarSpark MESH networking data communication method according to an embodiment of the present invention;
[0074] Figure 7 This is a schematic diagram of another specific embodiment of step S200, which includes sub-steps, in a StarSpark MESH networking data communication method according to an embodiment of the present invention;
[0075] Figure 8 This is a schematic diagram of a specific embodiment of a StarSpark MESH networking data communication method according to an embodiment of the present invention, in which step S100 includes sub-steps;
[0076] Figure 9 This is a schematic diagram of a specific embodiment of a StarSpark MESH networking data communication method including step S500 according to an embodiment of the present invention;
[0077] Figure 10 This is a schematic diagram of a specific embodiment of steps S600 to S1000 in a Star Flash MESH networking data communication method according to an embodiment of the present invention;
[0078] Figure 11This is a schematic diagram of the module composition of a specific embodiment of a StarSpark MESH networking data communication device according to an embodiment of the present invention;
[0079] Figure 12 This is a schematic diagram of the composition structure of a specific embodiment of a StarSpark MESH networking data communication system according to an embodiment of the present invention. Detailed Implementation
[0080] The following will describe the inventive concept and its resulting technical effects clearly and completely with reference to embodiments, so as to fully understand the purpose, features and effects of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are all within the scope of protection of the present invention.
[0081] In the description of the embodiments of the present invention, the term "several" means one or more, and the term "multiple" means two or more. The terms "greater than," "less than," and "exceeding" should be understood as excluding the stated number, while the terms "above," "below," and "within" should be understood as including the stated number. The terms "first" and "second" should be understood as distinguishing technical features, and not as indicating or implying relative importance, the number of indicated technical features, or the order of the indicated technical features.
[0082] Reference Figure 1 This invention provides a StarSpark MESH networking data communication method, which is applied in a sub-device of a StarSpark MESH networking data communication system for data reception, data transmission, and data storage; it includes the following steps:
[0083] S100, Device initialization, including enabling the StarShine protocol stack and creating data receiving thread, data sending thread and data storage thread;
[0084] Enabling the StarFlash protocol stack primarily enables the device's StarFlash function and creates callback functions. When these callback functions are triggered, they are used to execute functions such as data reception, data transmission, and data storage. By creating separate data reception, data transmission, and data storage threads, the program response can be significantly accelerated.
[0085] S200, Execute the data receiving thread, including starting the data receiving interrupt function to receive the first target data information, and parsing and receiving the first target data information according to the preset message format;
[0086] In step S100, after enabling the StarScan protocol stack, the device starts StarScan scanning. When the first target data information to be received is detected, a data reception interrupt function is initiated to receive the data. Furthermore, by parsing and processing the first target data information according to a preset message format, the device can quickly determine the type of service processing required after receiving the first target data information.
[0087] S300, Execute the data sending thread, including generating second target data information according to a preset message format, adding the second target data information to the data sending task queue according to a preset data enqueue format, and then sending the data.
[0088] When a device needs to send data information outward, it first generates a second target data information through a preset message format, so that the next device to receive the second target data information can quickly parse and receive it; the second target data information is added to the data sending task queue according to a preset queuing format, which can realize the control of the data sending mode.
[0089] S400 executes the data storage thread, including storing preset stored data and historical received data information.
[0090] After initialization, if the device performs grouping and network access operations through the debugging machine, it will store its own grouping information and the address of the gateway device corresponding to the network access (i.e., preset stored data). At the same time, when performing the above step S200, the parsed and received first target data information will be stored as historical received data information.
[0091] This invention provides a method for data communication in a StarSpark MESH network. By designing a preset message format for StarSpark MESH network data communication, it achieves the simultaneous satisfaction of high data transmission efficiency, reliable device connection, high network capacity, and low power consumption. This solves the technical problem that traditional wireless MESH protocol technology cannot simultaneously meet the requirements of high transmission rate, high device connection reliability, high network capacity, and low power consumption.
[0092] Reference Figure 2 and Figure 3In some embodiments, the preset message format includes one or more of the following: company ID, device type, source address, destination address, TTL value, flag bit, message version number, startup count, and payload. Typically, in order to achieve message integrity and reliability, and to enable the receiving device to quickly parse and process the received message, the preset message format includes all of the above-mentioned parts such as company ID, device type, source address, destination address, TTL value, flag bit, message version number, startup count, and payload. Among them, the company ID represents the company to which the device belongs, occupying 1 byte; the device type represents the type of the device, occupying 1 byte; the source address represents the MAC address of the information source, occupying 6 bytes; the destination address represents the destination MAC address of the information, occupying 6 bytes; the TTL value (Time To Live) represents the lifespan of the information, which is decremented by 1 for each node, occupying 1 byte; the flag bit represents the type of information, occupying 1 byte; the message version number represents which message was sent by the message source device, occupying 4 bytes; the start count represents the total number of times the information source device has started, occupying 2 bytes; and the payload represents the data content of the information, occupying 0-230 bytes. In this embodiment, the parsing and receiving processing of the first target data information according to the preset message format in step S200 of the above embodiment includes:
[0093] S210. Parse the first target data to obtain the corresponding source address, message version number, and startup count;
[0094] Wherein, the source address is the starting address from which the first target data information originates, and this starting address is the MAC address of the corresponding device; the message version number is the nth message sent by the device from which the first target data information originates; and the start count is the number of times the device from which the first target data information originates has been started.
[0095] S220. Determine whether the first target data information is an unprocessed message based on the source address, message version number, and number of startups.
[0096] After obtaining the source address, message version number and startup count through step S210, it can accurately determine whether the received first target data information is unprocessed information; where unprocessed information is "fresh message", indicating that the current device has never received and processed the message.
[0097] If step S220 is yes, then proceed with the following steps:
[0098] S230, Receive and process the data information of the first target;
[0099] If the first target data information is unprocessed, it needs to be received and processed.
[0100] If step S220 is not correct, then proceed to step:
[0101] S240, Abandon receiving and processing the first target data information, and return to the execution data receiving thread.
[0102] Specifically, when the first target data information is determined to be historical data information that has already been processed based on the source address, message version number, and number of startups, the process of repeatedly receiving and processing it is abandoned, and the execution data receiving thread is returned to receive the next target data information.
[0103] Reference Figure 4 Specifically, in some embodiments, to accurately determine whether the first target data information is unprocessed information, to ensure the reliability of data information reception, and to prevent misjudgment of the type of the first target data information (misjudging unprocessed information as processed information, or misjudging processed information as unprocessed information), in this embodiment, step S220 in the above embodiment, which determines whether the first target data information is an unprocessed message based on the source address, message version number, and number of startups, specifically includes:
[0104] S221. Determine whether the source address is in the historical received data information;
[0105] If the source address is not in the historical received data information, then proceed with the following steps:
[0106] S222. Determine that the first target data information is unprocessed information;
[0107] If the current device has previously communicated with a device corresponding to the source address, the current device will store the MAC address of the device that has communicated with the source address. Then, after parsing the first target data information according to the preset message format, the source address in the first target data information will be obtained. If the source address is not stored in the current device, it means that the current device and the device corresponding to the source address are communicating with each other for the first time, and the first target data information can be judged as unprocessed information.
[0108] If the source address is in the historical received data information, then proceed with the following steps:
[0109] S223. Determine whether the number of startups is greater than the number of historical startups in the historical received data;
[0110] The startup count indicates the number of times the source address device has been started.
[0111] If step S223 is correct, then proceed with the following steps:
[0112] S224. Determine that the first target data information is unprocessed information;
[0113] In this process, after parsing the first target data information according to the preset message format, the number of times the device corresponding to the source address is started is obtained. If the number of times started is greater than the number of times started stored in the current device (data receiving device), it indicates that the device corresponding to the source address has experienced a power failure restart or soft reset. Therefore, it is judged as unprocessed information to prevent information from being missed. At the same time, the number of times started obtained by parsing the first target data information is replaced with the historical number of times and updated and stored.
[0114] If step S223 is incorrect, then proceed to step:
[0115] S225. Determine whether the message version number is greater than the historical version number in the historical received data;
[0116] The message version number indicates which message was sent by the device corresponding to the source address.
[0117] If step S225 is determined to be yes, then proceed with the following steps:
[0118] S226. If the first target data information is determined to be unprocessed information, the first target data information needs to be received and processed.
[0119] If step S225 is incorrect, then proceed to step:
[0120] S227. Determine that the first target data information is already processed, and no longer receive or execute the corresponding business processing.
[0121] In this embodiment, after parsing the first target data information according to the preset message format to obtain the source address, number of startups and message version number, the system can accurately and quickly determine whether the first target data information is unprocessed information based on the source address, number of startups and message version number. This improves the anti-replay attack performance of the entire StarSpark MESH network data communication system and can significantly suppress broadcast storms, prevent devices from forwarding processed information and occupying channel resources, thereby improving the network's communication efficiency.
[0122] Reference Figure 5 and Figure 6In some embodiments, to achieve precise control over data transmission, the preset data queuing format described in the above embodiments includes broadcast / unicast data, unicast peer address, priority, total data transmission duration, data transmission mode, and repeat transmission selection. Broadcast / unicast data refers to the second target data information generated according to the preset message format, occupying 22-252 bytes. The unicast peer address indicates that if unicast data is being sent, a specific unicast MAC address needs to be entered, occupying 6 bytes. Priority indicates the priority when data is added to the data transmission task queue, with priorities ranging from 1 to 5 levels, where 1 is the highest level, occupying 1 byte. Total data transmission duration indicates the total transmission time of the data, typically set in the range of 40-500ms, occupying 4 bytes. Data transmission mode indicates whether broadcast / unicast data should be broadcast or unicast, occupying 1 byte. Repeat transmission selection indicates whether the transmission of the second target data information will be stopped by the timer; if repeat transmission is selected, transmission needs to be manually stopped; otherwise, the data transmission time is controlled and managed by the timer. In this embodiment, step S300 of the above embodiment, adding the second target data information to the data transmission task queue according to the preset data enqueue format and then transmitting the data includes:
[0123] S310. Add the second target data information to the data transmission task queue according to the priority;
[0124] In data communication, different data types have different latency requirements. To ensure that the latency of important information is within a preset range when the device needs to send a large amount of data, the data information is added to the data transmission task queue according to its priority, which can ensure the timeliness of message transmission.
[0125] S320: Based on the unicast peer address, total data transmission duration, data transmission mode, and repeat transmission selection, the second target data information is sent out.
[0126] In this embodiment, after the second target data information is added to the data transmission task queue according to the corresponding priority, the second target data information is sent out according to its corresponding unicast peer address, total data transmission duration, data transmission mode, and repeated transmission selection.
[0127] Reference Figure 7 In some embodiments, to prevent the second target data information from being continuously received and forwarded between devices, thereby consuming network resources and causing network data transmission lag, this embodiment, after determining the first target data information as unprocessed information in the above embodiments, further includes the step of parsing and receiving the first target data according to a preset message format:
[0128] S250. Determine if the TTL value is greater than 0;
[0129] The TTL value is used to represent the lifespan of information. When information is received by the current device, the TTL value is decremented by 1 and then updated, thereby controlling the number of times information is transmitted and forwarded.
[0130] If the TTL value is greater than 0, then proceed with the following steps:
[0131] S260. Determine whether the destination address is the current device's own address;
[0132] If the destination address obtained after receiving and parsing the first target data information is the current device's own address, it means that the first target data information does not need to be transmitted and forwarded after being sent to the current device.
[0133] If step S260 determines that it is yes, then proceed with the following steps:
[0134] S270. After parsing and receiving the first target data information, perform business processing.
[0135] If the destination address in the first target data information received by the current device is its own address, then the current device will not transmit or forward the first target data information after receiving the data and performing business processing.
[0136] If step S260 determines otherwise, then proceed with the following steps:
[0137] S280. After adding the first target data information to the data transmission task queue, the data is forwarded.
[0138] In this process, after receiving the first target data information, the current device will decrement the TTL value by 1 and then forward the data. However, if the judgment in step S250 is negative, the forwarding of the first target data information will be stopped, thereby controlling the number of times the first target data information is forwarded in the StarShine MESH data communication system.
[0139] Reference Figure 8 In some embodiments, the device may freeze or enter an infinite loop during operation, preventing it from performing its normal functions. Therefore, to quickly restore normal device functionality when this occurs, this embodiment further includes the following step during device initialization in step S100:
[0140] S110, Enable watchdog timer;
[0141] S120: Periodically check if the watchdog timer is triggered;
[0142] S130. If so, then execute step S400 of the above embodiment to execute the data storage thread, store the information of the current device, and then perform a soft reset operation.
[0143] In this embodiment, in order to prevent data loss after a soft reset of the device and to enable rapid access to the StarSpark MESH networking data communication system, a data storage thread is executed to store the current device information before the watchdog program is triggered to perform a soft reset of the device.
[0144] Reference Figure 9 In some embodiments, to achieve device status control in the StarSpark MESH networking data communication system, the grouping and network access of devices are controlled. In this embodiment, the StarSpark MESH networking data communication method further includes the following steps:
[0145] S500 receives the status control command from the debugging machine and divides the current device into states.
[0146] The debugging device is a mobile phone with StarFlash communication capability, or other devices with debugging capabilities. After the current device powers on, the debugging device obtains a list of current devices through StarFlash scanning. Specifically, when the current device powers on for the first time, it is in an idle state. Subsequently, the debugging device selects the device and classifies its state. In this embodiment, the debugging device further classifies the current device into four states: waiting for grouping, waiting to join the network, not grouped and not joined to the network, grouped and not joined to the network, not grouped and joined to the network, or grouped and joined to the network. Among them, the current device in the idle state is only controlled by the debugging machine, receives information from the debugging machine, and does not perform information transmission and forwarding processing; the current device in the waiting for grouping state is only controlled by the debugging machine, receives information from the debugging machine, and only forwards the debugging machine's local grouping information, which is the information of the debugging machine grouping multiple sub-devices in the StarSpark MESH networking data communication system; the current device in the waiting for network entry state is only controlled by the debugging machine and receives network entry feedback information from the gateway device, which is the feedback information of the current device connecting to the Internet; the current device in the ungrouped and un-networked, grouped and un-networked, ungrouped and networked, or grouped and networked states is subject to group control or single control by the gateway device or the debugging machine. Among them, group control is the information sent by the debugging machine or the gateway device to all sub-devices in the ungrouped and un-networked, grouped and un-networked, ungrouped and networked states, and the information of group control is... The debugging machine or gateway device receives and forwards control information from all sub-devices in the StarSpark MESH networking communication system. Each sub-device in any of the following states (ungrouped and not yet networked, grouped and not yet networked, ungrouped and already networked, or grouped and already networked) receives and forwards the group control information until its TTL value reaches 0, at which point forwarding stops. Individual control refers to the debugging machine or gateway device controlling a specific sub-device in any of these states. Upon receiving individual control information, if the destination address is not the sub-device's own address, the sub-device forwards the information until its TTL value reaches 0, at which point forwarding stops. Conversely, if the destination address in the individual control information is the sub-device's own MAC address, forwarding stops, and the sub-device executes the corresponding service processing based on the individual control information.The current device, whether in a grouped but not yet networked state or a grouped and networked state, is also subject to group control by the gateway device or debugging machine. Group control is the control exercised by the gateway device or debugging machine over all sub-devices in the same group. Specifically, when the gateway device or debugging machine sends group control information (which is equivalent to the first target data information at this time), the destination address in the group control information corresponds to the group address. Upon receiving the group control information, the sub-device will determine whether it is in the group. If the sub-device is in the group, it will receive data, perform corresponding business processing, and then forward the data until the TTL value is 0. If the sub-device is not in the group, it will directly forward the group control information until the TTL value is 0.
[0147] Reference Figure 10 In some embodiments, when the sub-device is in the grouped and networked state described in the above embodiments, in order to ensure the stability and reliability of the connection between the sub-device and the server platform in the StarSpark MESH networking data communication system, the sub-device in this state will send heartbeat data to the server platform through the gateway device to maintain online status. The specific steps include:
[0148] S600: Set a preset duration timer and generate heartbeat data information after the preset duration timer is triggered;
[0149] The preset duration timer is usually set according to the frequency of heartbeat packet data transmission. Typically, the preset duration timer is set to 1 minute, and then the preset duration timer is triggered every 1 minute to generate heartbeat packet data.
[0150] S700: Determine whether the current device is in a grouped and network-joined state;
[0151] If the determination in step S700 is yes, then proceed to step:
[0152] S800: Obtain a random number within a preset range;
[0153] Specifically, random numbers are generated and obtained through a random number generator, with a preset range of 20-40.
[0154] S900: Start the heartbeat packet sending timer based on a random number;
[0155] The heartbeat packet sending timer controls the transmission of heartbeat packet data, and the transmission interval corresponds to a random number. For example, if the random number is 23, the heartbeat packet sending timer will control the heartbeat packet data to be sent out every 23 minutes.
[0156] S1000 executes the data sending thread, which is used to send heartbeat packet data information to the server platform through the gateway device to keep the current device online.
[0157] In this embodiment, by generating random numbers, it is possible to prevent the server platform from being subjected to replay attacks during heartbeat packet transmission, thereby preventing network security issues and server platform resource consumption.
[0158] Reference Figure 11 This invention also provides a StarSpark MESH networking data communication device, which includes an initialization module, a data receiving thread execution module, a data sending thread execution module, and a data storage thread execution module. The initialization module enables the StarSpark protocol stack and creates the data receiving thread, data sending thread, and data storage thread. The data receiving thread execution module initiates a data receiving interrupt function to receive first target data information and parses and processes the first target data information according to a preset message format. The data sending thread execution program generates second target data information according to a preset message format and adds the second target data information to the data sending task queue according to a preset data enqueue format before sending the data. The data storage thread execution module stores preset stored data and historical received data information. The StarSpark MESH networking data communication device provided in this embodiment implements data communication in the StarSpark MESH networking data communication system in a manner that corresponds to the StarSpark MESH networking data communication methods described in the above embodiments, and will not be elaborated upon here.
[0159] Reference Figure 12 This invention provides a StarSpark MESH networking data communication system, comprising a debugging machine, multiple sub-devices (M1 to Mn+1), at least one gateway device, and a server platform. The server platform is connected to at least one gateway device via a 4G or 5G network. At least one gateway device is connected to its corresponding sub-device via StarSpark communication; when a sub-device joins the network, it binds to a corresponding gateway device. The debugging machine is connected to the multiple sub-devices via StarSpark communication. In this embodiment, the multiple sub-devices are used to perform data communication using the StarSpark MESH networking data communication methods described in the above embodiments. This embodiment solves the technical problem that wireless MESH protocol technology in related technologies cannot simultaneously meet the requirements of high transmission rate, high device connection reliability, high network capacity, and low power consumption by providing a StarSpark MESH networking data communication system.
[0160] In some embodiments, the server platform described in the above embodiments is a cloud platform, a physical server, or a combination of a cloud platform and a physical server; the specific implementation of the server platform can be adapted to meet the needs of on-site use.
[0161] The data communication process principle of the sub-device in the StarSpark MESH networking data communication system in this embodiment of the invention corresponds to the process principle of the StarSpark MESH networking data communication method described in the above embodiments, and will not be repeated here.
[0162] This invention also provides a computer storage medium, wherein the computer-readable storage medium stores a computer-executable program, which, when executed by a processor, implements the StarSpark MESH networking data communication method described in any of the above embodiments.
[0163] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments, and various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention. Furthermore, the embodiments of the present invention and the features thereof can be combined with each other unless otherwise specified.
Claims
1. A method for data communication in a star-studded mesh network, characterized in that, include: Device initialization includes enabling the StarScan protocol stack and creating data receiving, data sending, and data storage threads; Executing the data receiving thread includes starting a data receiving interrupt function to receive first target data information, and parsing and receiving the first target data information according to a preset message format; Executing the data sending thread includes generating second target data information according to the preset message format, and adding the second target data information to the data sending task queue according to the preset data enqueue format before sending the data. The data storage thread is executed, including storing preset stored data and historical received data information; The preset message format includes one or more of the following: company ID, device type, source address, destination address, TTL value, flag bit, message version number, number of startups, and payload. The step of parsing and receiving the first target data according to a preset message format includes: The first target data information is parsed to obtain the corresponding source address, message version number, and startup count; Based on the source address, the message version number, and the number of startups, determine whether the first target data information is unprocessed information; If so, then the first target data information is received and processed; Otherwise, abandon the reception and processing of the first target data information and return to the execution of the data reception thread; The step of determining whether the first target data information is unprocessed information based on the source address, the message version number, and the number of startups includes: Determine whether the source address is in the historical received data information; If not, then the first target data information is determined to be the unprocessed information; If so, determine whether the number of startups is greater than the number of historical startups in the historical received data; If the number of startups is greater than the number of historical startups in the historical received data, then the first target data information is determined to be the unprocessed information; If the number of startups is less than the number of historical startups in the historical received data, then the first target data information is determined to be processed information; If the number of startups is equal to the number of historical startups in the historical received data, then determine whether the message version number is greater than the historical message version number in the historical received data; If so, then the first target data information is determined to be the unprocessed information; Otherwise, the first target data information is determined to be the processed information.
2. The Star Flash MESH networking data communication method according to claim 1, characterized in that, The preset data enqueue format includes the second target data information, unicast peer address, priority, total data transmission duration, data transmission mode, and repeat transmission selection; The step of adding the second target data information to the data transmission task queue according to a preset data queuing format and then transmitting the data includes: The second target data information is added to the data transmission task queue according to the priority. The second target data information is sent out based on the unicast peer address, the total data transmission duration, the data transmission mode, and the repeated transmission selection.
3. The Star Flash MESH networking data communication method according to claim 1 or 2, characterized in that, The step of parsing and receiving the first target data information according to a preset message format further includes: Determine whether the TTL value is greater than 0. If the TTL value is greater than 0, then determine whether the destination address is the current device's own address; If the destination address is the current device's own address; Then, after parsing and receiving the first target data information, the business processing is performed. If the destination address is not the current device's own address, the first target data information is added to the data transmission task queue and then the data is forwarded.
4. The Star Flash MESH networking data communication method according to claim 1, characterized in that, The method further includes: Enable watchdog program; Periodically check whether the watchdog program is triggered; If so, the data storage thread will store the current device information and then perform a soft reset operation.
5. The Star Flash MESH networking data communication method according to claim 1, characterized in that, Also includes: Receive the status control command from the debugging machine and classify the current device into idle state, waiting to be grouped state, waiting to join the network state, not grouped and not joined the network state, grouped and not joined the network state, not grouped and joined the network state, or grouped and joined the network state. The current device in the idle state is controlled by the debugging machine; The current device in the waiting packet state is controlled by the debugger and is used to forward the debugger's local packet information; The current device in the waiting-to-join-the-network state is controlled by the debugging machine and is used to receive network access feedback information from the gateway device; The current device in the ungrouped and not networked state, the grouped and not networked state, the ungrouped and networked state, or the grouped and networked state is subject to group control or single control by the gateway device or the debugging machine; The current device, which is in the grouped but not yet networked state or the grouped and networked state, is subject to the group control of the gateway device or the debugging machine.
6. The Starlight MESH networking data communication method according to claim 5, characterized in that, Also includes: Set a preset duration timer, and generate heartbeat data information after the preset duration timer is triggered; Determine whether the current device is in the "grouped and networked" state; If so, then a random number is obtained from the preset range; Start the heartbeat packet sending timer based on the random number; The data sending thread is executed to send the heartbeat packet data to the server platform through the gateway device to keep the current device online.
7. A StarSpark MESH networking data communication device, characterized in that, include: The initialization module enables the StarScan protocol stack and creates data receiving, data sending, and data storage threads. The data receiving thread execution module is used to start the data receiving interrupt function to receive the first target data information and to parse and process the first target data information according to the preset message format. The data sending thread execution module is used to generate second target data information according to the preset message format, and add the second target data information to the data sending task queue according to the preset data enqueue format before sending the data. The data storage thread execution module is used to store preset stored data and historical received data information; The preset message format includes one or more of the following: company ID, device type, source address, destination address, TTL value, flag bit, message version number, number of startups, and payload. The step of parsing and receiving the first target data according to a preset message format includes: The first target data information is parsed to obtain the corresponding source address, message version number, and startup count; Based on the source address, the message version number, and the number of startups, determine whether the first target data information is unprocessed information; If so, then the first target data information is received and processed; Otherwise, abandon the reception and processing of the first target data information and return to the execution of the data reception thread; The step of determining whether the first target data information is unprocessed information based on the source address, the message version number, and the number of startups includes: Determine whether the source address is in the historical received data information; If not, then the first target data information is determined to be the unprocessed information; If so, determine whether the number of startups is greater than the number of historical startups in the historical received data; If the number of startups is greater than the number of historical startups in the historical received data, then the first target data information is determined to be the unprocessed information; If the number of startups is less than the number of historical startups in the historical received data, then the first target data information is determined to be processed information; If the number of startups is equal to the number of historical startups in the historical received data, then determine whether the message version number is greater than the historical message version number in the historical received data; If so, then the first target data information is determined to be the unprocessed information; Otherwise, the first target data information is determined to be the processed information.
8. A StarSpark MESH networking data communication system, characterized in that... It includes a debugging machine, multiple sub-devices, at least one gateway device, and a server platform; The server platform is connected to at least one of the gateway devices via a 4G network or a 5G network. At least one of the gateway devices is connected to the corresponding sub-device via StarFlash communication; The debugging machine is connected to multiple sub-devices via Star Flash Communication; The multiple sub-devices perform data communication using the StarSpark MESH networking data communication method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an executable program, which is executed by a processor to implement the StarSpark MESH networking data communication method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Star flash MESH networking equipment network access configuration method, equipment, system and medium
CN120416876A