A lightweight Internet of Things management system based on the SparkLink protocol stack
Through a lightweight IoT management system based on the Star Flash protocol stack, using improved multi-agent Q learning algorithm, weighted binary graph matching model and attention mechanism abnormal detection model, the problems of high communication energy consumption, insufficient resource allocation and insufficient security protection in the Internet of Things system are solved, low-power consumption and efficient communication, intelligent resource allocation and enhanced security protection are achieved, and the overall performance and synergistic efficiency of the system are improved.
Patent Information
- Application Number
- CN202510716820.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-05-30
AI Technical Summary
The existing IoT management systems have many challenges in terms of high communication energy consumption, unstable connections, insufficient resource allocation, insufficient security protection, etc., and it is difficult to meet the requirements of efficient collaborative work and real-time.
The lightweight IoT management system based on the Star Flash protocol stack is adopted, including the Star Flash protocol communication module, dynamic topology management module, resource virtualization module, adaptive scheduling engine, security protection module and edge collaborative processing module. Through improved multi-agent Q learning algorithm, weighted binary graph matching model, attention mechanism abnormal detection model and deep reinforcement learning decision model, low-power consumption and efficient communication between devices, intelligent resource allocation, enhanced security protection and efficient task processing are achieved.
It improves communication quality and stability, improves resource utilization, enhances security, improves the overall processing capacity and coordination efficiency of the system, and meets the real-time and efficient requirements of IoT applications.
Smart Images

Figure CN120223503B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things management, and specifically provides a lightweight Internet of Things management system based on the SparkLink protocol stack. Background Art
[0002] At present, with the rapid development of Internet of Things technology, lightweight Internet of Things management systems have been widely used in fields such as smart home, industrial automation, and intelligent transportation due to their advantages of low power consumption and high integration. However, the existing Internet of Things management systems still face many challenges in actual operation, restricting their further development and application:
[0003] At the communication level, traditional Internet of Things communication technologies have problems such as high energy consumption and unstable connections; the establishment efficiency of communication links between devices is relatively low, and data is easily interfered during the transmission process, resulting in high transmission delays and large packet loss rates, making it difficult to meet the requirements of application scenarios with high real-time requirements; especially in complex network environments, the reliability and stability of communication cannot be effectively guaranteed, restricting the efficient collaborative work between Internet of Things devices;
[0004] In terms of resource management, the existing systems have insufficient ability to allocate heterogeneous resources; it is difficult to achieve precise matching and dynamic allocation of different types of computing resources, storage resources, and network resources, often resulting in contradictions between resource idleness and tasks waiting for resources, with low resource utilization; moreover, in the face of changes in system load, there is a lack of an effective adaptive resource scheduling mechanism, and it is unable to optimize the resource allocation strategy in a timely manner, leading to a decline in the overall performance of the system and an increase in operating costs;
[0005] In the field of security protection, with the continuous expansion of Internet of Things application scenarios, security threats have become increasingly diverse and complex; traditional security protection means are difficult to cope with new types of network attacks, such as malicious intrusion, data theft, and tampering with Internet of Things devices; the anomaly detection ability is limited, and it is unable to identify potential security risks in a timely and accurate manner; the key management method is relatively single, making it difficult to resist security challenges brought by emerging technologies such as quantum computing, and the confidentiality and integrity of data are seriously threatened.
[0006] Therefore, a lightweight Internet of Things management system based on the SparkLink protocol stack is proposed to address the above problems. Summary of the Invention
[0007] The purpose of the present invention is to provide a lightweight Internet of Things management system based on the SparkLink protocol stack to solve the problems raised in the above background art.
[0008] To achieve the above purpose, the present invention provides the following technical solutions:
[0009] A lightweight Internet of Things management system based on the SparkLink protocol stack, comprising:
[0010] The SparkLink protocol communication module receives the physical layer radio frequency signal, parses the SparkLink protocol data frame, and outputs device discovery information and channel status data to the dynamic topology management module;
[0011] The dynamic topology management module receives the link quality metrics from the SparkLink protocol communication module, generates the optimal connection topology based on the improved multi-agent reinforcement learning algorithm, and outputs the node connection relationship table to the resource virtualization module;
[0012] The resource virtualization module collects the computing power, storage capacity, and sensor types of each Internet of Things device, constructs a virtual resource pool through a weighted matching model, and outputs a resource allocation plan to the adaptive scheduling engine;
[0013] The adaptive scheduling engine receives the quality of service level of the service request and the resource allocation plan, executes the dynamic time slot allocation strategy, and outputs the time slot configuration instruction to the SparkLink protocol communication module;
[0014] The security protection module monitors the data stream of device communication behaviors, generates a security situation assessment report based on the anomaly detection model with an attention mechanism, and outputs an alarm signal to the edge collaborative processing module;
[0015] The edge collaborative processing module receives the raw sensor data and the security situation report, generates a task offloading strategy through a task offloading decision model, and outputs the preprocessed data packet to the cloud server.
[0016] As an optimal solution, the dynamic topology management module executes the following processing flow:
[0017] Obtain the signal strength matrix, bit error rate matrix, and transmission delay matrix of each node from the SparkLink protocol communication module in real time;
[0018] Input the signal strength matrix, bit error rate matrix, and transmission delay matrix of each node into the link quality evaluation model to calculate the comprehensive quality score, which is weighted and composed of the following three parts:
[0019] Signal strength score: Normalize the original signal strength value to the 0-1 interval and then multiply it by the first weight coefficient;
[0020] Bit error rate score: Multiply the value obtained by subtracting the actual bit error rate from 1 by the second weight coefficient;
[0021] Delay score: Exponentially decay the ratio of the transmission delay to the maximum allowable delay and then multiply it by the third weight coefficient;
[0022] Among them, the sum of the first weight coefficient, the second weight coefficient, and the third weight coefficient is 1, and they are dynamically configured according to the current service type;
[0023] Construct an adjacency matrix based on the comprehensive quality score, and use an improved reinforcement learning algorithm to iteratively optimize the network topology, and finally output a topology configuration table containing the list of optimal relay nodes.
[0024] As a preferred solution, the action selection strategy of the improved reinforcement learning algorithm is as follows:
[0025] Obtain the current resource load rate from the resource virtualization module;
[0026] Dynamically adjust the exploration rate parameter according to the resource load rate, and the exploration rate increases correspondingly with the increase of the load rate;
[0027] Update the state value table according to the Bellman equation. Among them, the weighted summation process of future benefits considers the remaining energy and computing power of neighbor nodes;
[0028] Output the topology structure that maximizes the network lifetime.
[0029] As a preferred solution, the resource virtualization module performs the following operations:
[0030] Receive resource registration requests from Internet of Things devices, and parse the device description file to obtain computing power, storage space, and sensor types;
[0031] Construct a multi-dimensional feature vector containing device hardware capabilities and sensor characteristics;
[0032] Input the task requirement vector and the device feature vector into the improved matching algorithm solver to calculate the matching degree scores of each device and the task. Among them, the matching degree is comprehensively calculated by the following factors:
[0033] Computing power matching degree: the ratio of the device CPU capacity to the task requirement;
[0034] Storage space matching degree: the ratio of the device memory capacity to the task requirement;
[0035] Topology proximity: the exponential decay function of the communication hop count between devices;
[0036] Generate a resource allocation list containing virtual resource identifiers and physical device mapping relationships.
[0037] As a preferred solution, the improved matching algorithm includes:
[0038] Construct a bipartite graph model of tasks and devices, and the edge weights are determined by the product of the device matching degree score and the device trust score;
[0039] Introduce virtual nodes to handle resource over-request situations, and automatically expand the resource pool when the number of tasks exceeds the available devices;
[0040] Output the matching scheme that maximizes the total matching degree score and the list of spare devices.
[0041] As a preferred solution, the working process of the security protection module includes:
[0042] Grab the device communication message from the SparkLink protocol communication module, and extract the feature vector including the packet sending frequency, destination address distribution, protocol type diversity, and data payload complexity;
[0043] Input the feature vector into the anomaly detection model based on the multi-head attention mechanism, and this model performs the following processing:
[0044] Calculate the correlation matrix of each device behavior feature;
[0045] Apply the mask matrix generated by the device trust score to weight the correlation;
[0046] Generate the attention weight distribution through the softmax function;
[0047] The model outputs the anomaly probability value. When the probability exceeds the preset threshold, trigger the linkage protection mechanism, including:
[0048] Send a data isolation instruction to the edge collaboration module;
[0049] Update the blacklist of the topology management module;
[0050] Start the dynamic key rotation process.
[0051] As a preferred solution, the training method of the anomaly detection model includes:
[0052] Construct a training data set containing normal traffic and various attack samples;
[0053] Add an adversarial training item to the loss function to enhance the robustness of the model by calculating the gradient magnitude of the prediction result;
[0054] Adopt a progressive difficulty improvement strategy to gradually enhance the strength of adversarial samples;
[0055] Output a classification model with anti-interference ability.
[0056] As a preferred solution, the steps for the edge collaboration processing module to perform data processing are as follows:
[0057] Receive the original data stream uploaded by the sensor node;
[0058] Select the preprocessing algorithm according to the sensor type, and the selection rule is:
[0059] For vibration sensor data, use the wavelet denoising algorithm;
[0060] For position sensor data, use the Kalman filtering algorithm;
[0061] The environmental sensor data is processed by normalization;
[0062] The preprocessed data is input into the task offloading decision model to calculate the benefit ratio of local processing and cloud offloading, which is determined by the ratio of the product of local processing energy consumption and delay to the product of transmission energy consumption and delay;
[0063] The computing tasks are dynamically allocated according to the benefit ratio threshold, and the compressed result data packet is output.
[0064] As an optimal solution, the state space of the task offloading decision model is defined as a multi-dimensional vector including network bandwidth, edge node load, data priority, and remaining battery power. The action space includes the local processing ratio, transmission power level, and caching strategy. The reward function is calculated by weighting the service quality compliance rate, energy consumption cost, and delay violation amount.
[0065] As an optimal solution, the system also includes a cross-module coordination controller, which performs:
[0066] Periodically collect the operation metrics of each module, including channel utilization rate, node online rate, and virtualization overhead;
[0067] Calculate the system health index, which is the product of the deviation degrees of the failure rates of each module from the corresponding thresholds;
[0068] When the health degree is lower than the warning value, trigger system reconstruction, including adjusting the topology optimization frequency, shrinking the resource pool size, and enhancing the security detection level.
[0069] It can be seen from the technical solution provided by the present invention described above that a lightweight Internet of Things management system based on the SparkLink protocol stack provided by the present invention has the following beneficial effects:
[0070] Efficient communication and stable connection: The SparkLink protocol communication module is based on the SparkLink protocol stack to achieve low-power and high-efficiency communication between devices. It quickly establishes a connection through the broadcast discovery mechanism, optimizes the physical layer frame structure to reduce energy consumption, and combines the dynamic topology management module to optimize the network topology in real time to ensure the efficiency and stability of data transmission, reduce network latency and packet loss rate, and improve communication quality;
[0071] Intelligent resource allocation and optimization: The resource virtualization module uses the weighted bipartite graph matching model to achieve precise matching and dynamic allocation of heterogeneous resources, and dynamically adjusts the allocation strategy in combination with real-time load monitoring; The adaptive scheduling engine flexibly allocates bandwidth resources according to the network state through the dynamic time slot allocation algorithm; The two work together to significantly improve resource utilization, avoid resource waste, and reduce the system operation cost;
[0072] Strengthen the security protection system: The security protection module deploys an anomaly detection model based on the attention mechanism, combined with a dynamic key management system and a cross-layer defense unit to achieve accurate identification and defense of network attacks, ensure data transmission and storage security, and achieve a quantitative balance between security and performance to ensure that the system runs in a safe and reliable environment;
[0073] Efficient task processing and collaboration: The edge collaborative processing module uses the deep reinforcement learning decision model of task offloading to intelligently allocate tasks according to task requirements and device status, achieve efficient collaboration between edge devices, reduce task processing delays, improve the overall processing capability of the system, and meet the real-time and efficiency requirements of IoT applications;
[0074] Overall system collaborative optimization: The cross-module coordination controller serves as the "nerve center" of the system, coordinating the information interaction and collaborative work among modules, breaking down data barriers, achieving deep collaboration among modules, improving the overall system performance and stability, and enhancing the system's scalability and adaptability, providing strong support for the sustainable development of the Internet of Things system. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] Figure 1 This is a schematic diagram of the overall structure of a lightweight Internet of Things management system based on the Star Flash protocol stack of the present invention. DETAILED DESCRIPTION
[0076] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0077] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0078] like Figure 1 As shown, an embodiment of the present invention provides a lightweight Internet of Things management system based on the Star Flash protocol stack, including:
[0079] The Star Flash protocol communication module receives the physical layer radio frequency signal, parses the Star Flash protocol data frame, and outputs the device discovery information and channel status data to the dynamic topology management module;
[0080] The dynamic topology management module receives the link quality index from the Star Flash protocol communication module, generates the optimal connection topology based on the improved multi-agent reinforcement learning algorithm, and outputs the node connection relationship table to the resource virtualization module;
[0081] The resource virtualization module collects the computing power, storage capacity, and sensor types of each Internet of Things device, constructs a virtual resource pool through a weighted matching model, and outputs a resource allocation plan to the adaptive scheduling engine;
[0082] The adaptive scheduling engine receives the quality of service level of the service request and the resource allocation plan, executes the dynamic time slot allocation strategy, and outputs the time slot configuration instruction to the SparkLink protocol communication module;
[0083] The security protection module monitors the data stream of device communication behaviors, generates a security situation assessment report based on the anomaly detection model with attention mechanism, and outputs an alarm signal to the edge collaborative processing module;
[0084] The edge collaborative processing module receives the original sensor data and the security situation report, generates a task offloading strategy through the task offloading decision model, and outputs the preprocessed data packet to the cloud server.
[0085] In this embodiment, the SparkLink protocol communication module serves as the "connection hub" of the lightweight Internet of Things management system based on the SparkLink protocol stack. With the help of the broadcast discovery mechanism of the SparkLink protocol stack, it constructs a low-power and high-efficiency communication link between devices, laying a foundation for the stable operation of the entire system; The following will elaborate on this module in terms of overall functions, sub-module composition, working processes, etc.:
[0086] I. Overview of overall functions:
[0087] Based on the SparkLink protocol stack, the SparkLink protocol communication module realizes the rapid discovery between devices and the establishment of a low-power communication link, supporting the efficient transmission of data between devices; Through the optimization of the physical layer frame structure of the SparkLink protocol stack, the communication energy consumption is significantly reduced, while ensuring the accuracy and stability of data transmission, meeting the requirements of low power consumption and high reliability of communication for lightweight Internet of Things devices, and providing a solid communication guarantee for data interaction and collaborative work among modules in the system;
[0088] II. Composition and functions of sub-modules:
[0089] (I) Device discovery unit:
[0090] Broadcast signal sending: Devices in the module regularly send broadcast signals carrying device basic information (such as device ID, device type, communication capabilities, etc.) according to the broadcast discovery mechanism of the SparkLink protocol stack; These broadcast signals are sent at a specific frequency and power to ensure that other devices within the effective range can receive them;
[0091] Signal reception and parsing: Devices simultaneously monitor the surrounding environment, receive broadcast signals sent by other devices; Parse the received broadcast signals, extract the device information therein, establish a device list, and record the relevant information of the connectable devices around, preparing for the subsequent establishment of a communication link;
[0092] (2) Link Establishment Unit:
[0093] Link Parameter Negotiation: After determining the connectable device during the device discovery phase, the link establishment unit negotiates link parameters with the target device according to the specifications of the SparkLink protocol stack; the negotiation content includes communication frequency band, data transmission rate, channel coding method, etc.; through the exchange of negotiation messages, both parties reach a consistent link parameter configuration to meet the communication requirements of different devices and application scenarios;
[0094] Connection Establishment and Verification: Based on the negotiated link parameters, the link establishment unit initiates a connection request. After the target device responds, both parties complete the connection establishment according to the protocol process; after establishing the connection, the connectivity and stability of the link are verified by sending test data and receiving responses to ensure that the communication link is reliable and available;
[0095] (3) Data Transmission Unit:
[0096] Data Encapsulation and Sending: Process the data to be transmitted according to the data encapsulation format of the SparkLink protocol stack, add protocol headers, check codes and other information to form a complete data frame; according to the link parameter configuration, select an appropriate sending method and transmission rate, and send the data frame to the target device;
[0097] Data Reception and Decapsulation: Receive the data frames from other devices, check the received data frames to ensure the integrity and accuracy of the data; if the check passes, perform decapsulation according to the protocol format, extract the original data, and transfer it to other modules within the system for processing;
[0098] (4) Energy Consumption Optimization Unit:
[0099] Physical Layer Frame Structure Optimization: Deeply study the physical layer frame structure of the SparkLink protocol stack, and reduce the redundant information in the data transmission process and lower the transmission power consumption by adjusting the frame header length, data field coding method, etc.; for example, adopt a more compact frame header design to reduce the transmission resources occupied by the frame header while ensuring the transmission of necessary information;
[0100] Dynamic Power Management: Dynamically adjust parameters such as the device's transmission power and sleep cycle according to the device's communication requirements and working status; when there is no data transmission or the data transmission volume is small, reduce the device's transmission power or put the device into the sleep state to reduce energy consumption; when there is a data transmission requirement, quickly wake up the device and adjust it to the appropriate working state to ensure the balance between communication timeliness and low power consumption;
[0101] III. Working Process of the Module:
[0102] (1) Initialization Phase:
[0103] After the SparkLink protocol communication module is started, it loads the configuration parameters of the SparkLink protocol stack, including broadcast frequency, communication frequency band, initial values of link parameters, etc.; initializes the device discovery unit, link establishment unit, data transmission unit, and energy consumption optimization unit, establishes communication interfaces with other modules in the system, and prepares to receive and send data;
[0104] (2) Device discovery phase:
[0105] The device discovery unit sends broadcast signals carrying device information outward according to the set broadcast period; at the same time, continuously monitors the surrounding environment, receives broadcast signals sent by other devices, parses the signals, updates the device list, and records relevant information of connectable devices;
[0106] (3) Link establishment phase:
[0107] According to the device list, select a target device to establish a link; the link establishment unit negotiates link parameters with the target device, and determines parameters such as communication frequency band and data transmission rate by exchanging negotiation messages; after the negotiation is completed, initiate a connection request, and after the target device responds, complete the connection establishment, and verify the link connectivity and stability;
[0108] (4) Data transmission phase:
[0109] The data transmission unit receives data from other modules in the system, encapsulates it according to the data encapsulation format of the SparkLink protocol stack, and then sends the data frame to the target device according to the link parameter configuration; at the same time, receives data frames from other devices, performs verification and de-encapsulation, and passes the original data to the corresponding module for processing;
[0110] (5) Energy consumption optimization phase:
[0111] The energy consumption optimization unit monitors the working status and communication requirements of the device in real time, and dynamically adjusts parameters such as the device's transmit power and sleep cycle according to preset rules and algorithms; during data transmission gaps or when there is no data transmission, reduce the device power consumption; when there is a data transmission requirement, quickly wake up the device and adjust it to the appropriate working state to ensure low-power operation of the communication;
[0112] (6) Feedback and optimization phase:
[0113] According to the quality and energy consumption of data transmission, collect feedback information from other modules in the system, and optimize the working parameters and algorithms of the SparkLink protocol communication module; for example, adjust the channel coding method according to the bit error rate of data transmission, further optimize the physical layer frame structure and dynamic power management strategy according to the energy consumption situation, and continuously improve the performance and efficiency of the module;
[0114] (7) End phase:
[0115] When the system stops running or receives a stop instruction, the SparkLink protocol communication module stops data transmission and device communication operations, closes the communication interfaces with other modules, releases system resources, and saves relevant configuration parameters and working status information for a quick recovery when starting up next time.
[0116] In this embodiment, the dynamic topology management module performs the following processing flow:
[0117] Obtain the signal strength matrix, bit error rate matrix, and transmission delay matrix of each node from the SparkLink protocol communication module in real time;
[0118] Input the signal strength matrix, bit error rate matrix, and transmission delay matrix of each node into the link quality evaluation model to calculate the comprehensive quality score, which is weighted and composed of the following three parts:
[0119] Signal strength score: Normalize the original signal strength value to the 0 - 1 interval and then multiply by the first weight coefficient;
[0120] Bit error rate score: Multiply (1 minus the actual bit error rate value) by the second weight coefficient;
[0121] Delay score: Exponentially decay the ratio of the transmission delay to the maximum allowable delay and then multiply by the third weight coefficient;
[0122] Among them, the sum of the first weight coefficient, the second weight coefficient, and the third weight coefficient is 1, and they are dynamically configured according to the current service type;
[0123] Construct an adjacency matrix based on the comprehensive quality score, use an improved reinforcement learning algorithm to iteratively optimize the network topology, and finally output a topology configuration table containing the list of optimal relay nodes;
[0124] Furthermore, the dynamic topology management module, as the core component of the lightweight Internet of Things management system based on the SparkLink protocol stack, is like the "intelligent commander" of the system. With the improved multi - agent Q - learning algorithm and a series of innovative technologies, it can optimize the network topology structure in real time. The following will elaborate in detail from aspects such as overall functions, sub - module composition, and working processes:
[0125] I. Overview of overall functions:
[0126] The dynamic topology management module realizes the dynamic optimization of the Internet of Things network topology by monitoring the status of each node, link quality, and resource usage in the network in real time and using an improved multi-agent Q-learning algorithm. This module can quickly respond to changes in the network environment, such as node addition, withdrawal, or link failure, and adjust the network topology in a timely manner. With the help of a formula-based calculation model and algorithm, it accurately plans the data transmission path, ensures the efficiency and stability of data transmission, reduces network latency and energy consumption, and improves the overall performance and reliability of the system. Its core goal is to keep the network topology in an optimal state through scientific calculations and decisions to adapt to the ever-changing Internet of Things application requirements.
[0127] II. Composition and Functions of Sub-Modules:
[0128] (I) Network Status Monitoring Unit:
[0129] Node Information Collection: Continuously collect the basic information of each node in the network, including node ID, device type, processing capacity, storage capacity, etc. At the same time, obtain the real-time operating status data of the node, such as CPU usage rate, memory occupancy rate, battery power, etc., to provide basic data at the node level for subsequent formula-based network topology optimization calculations.
[0130] Link Status Monitoring: Monitor the communication links between nodes in real time, collect data related to link quality, such as received signal strength (RSSI), bit error rate (BER), link delay, etc. By regularly sending probe packets and analyzing the returned information, evaluate the stability and transmission performance of the link, and determine whether the link has failed or its quality has deteriorated. These data will be used for the calculation of the link quality evaluation formula.
[0131] (II) Topology Optimization Calculation Unit:
[0132] Algorithm Execution: Apply the improved multi-agent Q-learning algorithm, which satisfies the formula (where is the -th iteration, the value of taking action in state ; is the -th iteration, the value of taking action in state ; is the learning rate, which controls the update degree of the new information to the original value each time of learning; is the immediate reward obtained by taking action in state ; is the discount factor, used to measure the importance of future rewards; is the executed action is the next state transferred to after the execution of the action; is the action in the next state: is the number of neighbor nodes; is the neighbor node weight: is at the iteration, the neighbor node takes the action in the state of value); According to the data collected by the network status monitoring unit, calculate the optimal action strategy of each node in different states; Through continuous iterative learning, find the best solution that can optimize the network topology structure to adapt to the dynamic changes of the network environment;
[0133] Among them, the calculation of the neighbor node weight satisfies the formula (where is the weight of the neighbor node ; is the real-time load factor from the resource virtualization module; is the link distance between the current node and the neighbor node ; is the maximum value of the communication radius; is the link distance between the current node and the neighbor node ), this formula reflects the algorithm coupling enhancement feature. Through this calculation method, the algorithm can dynamically adjust the neighbor node weight according to the node distance and system load conditions;
[0134] While satisfies the formula , through this formula, the association between topology optimization and resource status is realized, enabling the algorithm to consider the system resource status during topology optimization;
[0135] Parameter interaction: Perform parameter interaction with the resource virtualization module to obtain the real-time load factor ; According to the value, adjust the relevant parameters in the algorithm, such as the neighbor node weight , realize the coordination between topology optimization and resource status, and through formula-based calculation, increase the topology convergence speed by 45% - 50%, ensuring that the algorithm can make more reasonable topology adjustment decisions according to the system resource usage situation;
[0136] (3) Link quality evaluation unit:
[0137] Three-dimensional evaluation model calculation: Adopt the three-dimensional link quality evaluation model, and its comprehensive index calculation is:
[0138] , where is the comprehensive evaluation index of link quality; , , are evaluation parameters, and ; is the normalized received signal strength indication; BER is the bit error rate; is the link delay; is the maximum allowable delay; where the evaluation parameters are dynamically associated with the resource virtualization state and satisfy the formula , ; Through these formulas, cross-layer parameter coupling is achieved, and the accuracy of link quality evaluation is improved by 22% - 28%;
[0139] Link state determination: According to the calculated comprehensive link quality index , compare it with the preset threshold to determine the link state; if the link quality is lower than the threshold, promptly feedback to the topology optimization calculation unit to provide a basis for network topology adjustment and ensure that high-quality links are selected for data transmission;
[0140] (4) Topology update execution unit:
[0141] Topology adjustment decision: According to the optimization scheme generated by the topology optimization calculation unit based on the formula, combined with the results of the link quality evaluation unit, determine the specific topology adjustment strategy; such as selecting appropriate nodes as relay nodes, disconnecting poor-quality links, establishing new connections, etc., to optimize the network topology structure;
[0142] Instruction issuance and execution: Issue topology adjustment instructions to relevant nodes in the network to guide the nodes to change the connection state and switch the data transmission path; monitor the instruction execution process to ensure that the topology adjustment operation is completed accurately and the network quickly reaches the optimized topology structure state;
[0143] III. Working process of the module:
[0144] (1) Initialization stage:
[0145] After the dynamic topology management module is started, load the initial parameters of the improved multi-agent Q-learning algorithm, the configuration parameters of the link quality evaluation model, and the initial state information of the network topology structure; establish communication connections with the network status monitoring unit, the topology optimization calculation unit, the link quality evaluation unit, and the topology update execution unit, initialize the working environment of each unit, and prepare to start network status monitoring and topology optimization work based on the formula calculation;
[0146] (2) Network status monitoring stage:
[0147] The network status monitoring unit continuously collects information of each node and link status data in the network; according to the set sampling frequency, it regularly obtains the operating status of nodes and link quality indicators, preprocesses and organizes the collected data, and stores it in the local database to provide real-time and accurate data support for subsequent topology optimization calculations based on formulas;
[0148] (III) Topology optimization calculation stage:
[0149] The topology optimization calculation unit obtains the latest network status data from the network status monitoring unit and combines it with the real-time load factor obtained from the resource virtualization module to execute the improved multi-agent Q-learning algorithm; perform iterative calculations according to relevant formulas, update the Q values of each node, and find the optimal topology adjustment strategy; during the calculation process, further optimize the calculation results according to the link quality information fed back by the link quality evaluation unit to ensure that the generated topology adjustment plan can effectively improve network performance;
[0150] (IV) Link quality evaluation stage:
[0151] The link quality evaluation unit calculates the comprehensive link quality index of each link according to the link status data provided by the network status monitoring unit using the relevant formulas of the three-dimensional link quality evaluation model ; compares the calculation result with the preset threshold to judge whether the link status is good; if it is found that the link quality is poor, it promptly feeds back the link status information to the topology optimization calculation unit and the topology update execution unit to provide an important basis for topology adjustment;
[0152] (V) Topology update execution stage:
[0153] The topology update execution unit formulates a specific topology update plan according to the topology adjustment plan generated by the topology optimization calculation unit based on formulas and the feedback information of the link quality evaluation unit; issues topology adjustment instructions to relevant nodes to guide the nodes to change the connection relationship and reconfigure the data transmission path; during the execution process, it monitors the progress and effect of the topology update operation in real time to ensure that the network topology structure can be smoothly adjusted to the optimized state;
[0154] (VI) Feedback and optimization stage:
[0155] The module collects performance index data during the network operation, such as network latency, throughput, energy consumption, etc., and evaluates the network performance after topology adjustment; according to the performance evaluation results and user feedback, it optimizes and adjusts the parameters of the improved multi-agent Q-learning algorithm, the configuration of the link quality evaluation model, etc., continuously improves the performance and adaptability of the dynamic topology management module to better cope with the changes in the network environment;
[0156] (7) End stage:
[0157] When the system stops running or receives a stop instruction, the dynamic topology management module stops operations such as network status monitoring, topology optimization calculation, and topology update, closes the communication connection with other modules, releases system resources, and saves the current network topology structure status and related configuration parameters so that it can quickly resume work when starting up next time.
[0158] In this embodiment, the resource virtualization module performs the following operations:
[0159] Receive resource registration requests from Internet of Things devices, parse the device description file to obtain computing power, storage space, and sensor types;
[0160] Construct a multi-dimensional feature vector containing device hardware capabilities and sensor characteristics;
[0161] Input the task requirement vector and the device feature vector into the improved matching algorithm solver to calculate the fitness scores of each device and the task. The fitness is comprehensively calculated by the following factors:
[0162] Computing power matching degree: the ratio of the device CPU capability to the task requirement;
[0163] Storage space matching degree: the ratio of the device memory capacity to the task requirement;
[0164] Topological proximity: the exponential decay function of the communication hop count between devices;
[0165] Generate a resource allocation list containing virtual resource identifiers and physical device mapping relationships;
[0166] Furthermore, as the "resource allocation center" of the lightweight Internet of Things management system based on the SparkLink protocol stack, the resource virtualization module realizes the efficient scheduling of heterogeneous resources through a weighted bipartite graph matching model, providing core support for the stable operation of the system and the optimal allocation of resources. Next, I will elaborate on this module from aspects such as overall functions, sub-module composition, and working processes:
[0167] I. Overview of overall functions:
[0168] The resource virtualization module aims to abstract various heterogeneous resources (such as computing resources, storage resources, network resources, etc.) in the Internet of Things system, construct a unified resource view; through a weighted bipartite graph matching model, accurately match resource demanders and resource providers, realize dynamic allocation and scheduling of resources; at the same time, combine the real-time load situation and topological structure information of the system, optimize the resource allocation strategy, improve resource utilization rate, reduce resource waste, and ensure the efficient operation of the system in different application scenarios;
[0169] II. Composition and functions of sub-modules:
[0170] 1. Resource Information Collection Unit:
[0171] Collection of resource provider information: Interact with various resource nodes in the system to collect detailed information of resource providers, including performance parameters such as the CPU model, number of cores, main frequency of computing devices, capacity, read / write speed of storage devices, bandwidth, and latency of network devices; at the same time, collect the running status information of resource nodes, such as CPU usage rate, memory occupancy rate, remaining storage capacity, etc., to keep track of the available situation of resources in real time;
[0172] Obtaining of resource requester information: Receive resource requirement information from different applications or tasks in the system, including required CPU computing power, memory space size, network bandwidth requirements, etc.; clarify key attributes such as the priority and timeliness of resource requirements to provide a comprehensive basis for subsequent resource matching;
[0173] 2. Weighted Bipartite Graph Matching Calculation Unit:
[0174] Model construction: Based on the data obtained by the resource information collection unit, construct a weighted bipartite graph; use the resource providers and resource requesters as the two vertex sets of the bipartite graph respectively, and the edges between the vertices represent resource matching relationships. The weights of the edges are calculated through specific formulas to measure the quality of the matching;
[0175] Weight calculation: Use the formula
[0176] ( is the weight of the edge between node (resource requester) and node (resource provider); , , are dynamic weight coefficients, and ; is the CPU resource amount of resource provider node ; is the CPU resource demand of resource requester node ; is the memory resource amount of resource provider node ; is the memory resource demand of resource requester node ; is the topological proximity score between node and node ) to calculate the weight of the edge; among them, (where is the number of hops between node and node ) (with the maximum number of hops), through multi-dimensional considerations, enhance the accuracy and rationality of matching;
[0177] Matching solution: Use an optimization algorithm (such as the Hungarian algorithm, etc.) to solve the weighted bipartite graph, find the maximum weight matching scheme, that is, the optimal resource allocation strategy, to maximize the overall resource utilization rate of the system;
[0178] (III) Resource Allocation Execution Unit:
[0179] Issuing allocation instructions: Convert the resource allocation scheme obtained by the weighted bipartite graph matching calculation unit into specific instructions and send them to the resource provider and the resource demander; Guide the resource provider to allocate resources to the corresponding demander, and the resource demander to obtain and use the allocated resources;
[0180] Execution monitoring and adjustment: Monitor the execution process of resource allocation in real time, check whether resources are delivered and used accurately and in a timely manner according to the allocation scheme; If abnormal situations such as resource conflicts and equipment failures occur during the execution process, adjust the resource allocation scheme in a timely manner to ensure the smooth progress of resource allocation and the stable operation of the system;
[0181] (IV) Real-time Load Monitoring and Parameter Adjustment Unit:
[0182] Load monitoring: Through the load monitoring unit, collect resource usage data such as the CPU / memory usage rate of each node every 5 seconds; Keep real-time track of the overall load situation of the system and the resource usage status of each node, providing data support for dynamically adjusting the resource allocation strategy;
[0183] Parameter adjustment: According to the collected load data, use the formula (where is the real-time load factor at the th moment, is the real-time load factor at the th moment; is the number of online devices; is the resource usage rate of the th online device; is the resource usage rate threshold) to calculate the real-time load factor , and dynamically adjust the weight coefficients in the weighted bipartite graph matching model according to the , , values, realizing millisecond-level coordination of topology optimization and resource status, so that the resource allocation strategy can better adapt to changes in system load;
[0184] (V) Cross-layer Defense Unit:
[0185] Risk assessment: Use the formula (where is the risk score of the resource ; is the probability that the resource is attacked; is the degree of impact caused by the attack on the resource ; is the defense strength of the resource ), evaluate the security risks in the resource allocation process; combine the information provided by the security protection module, analyze the attack probability and potential impact faced by the resource, and calculate the risk score of the resource;
[0186] Decision-making: According to the risk assessment results, use the formula (where is the resource allocation decision result; represents finding the parameter value that maximizes the objective function; is the quality of service score; is the security weight factor, dynamically adjusted according to the system threat level: is the resource risk score) to make a resource allocation decision; on the premise of ensuring the quality of service, comprehensively consider the security risks, achieve a quantitative balance between security and efficiency, and ensure the security and reliability of resource allocation;
[0187] III. Workflow of the module:
[0188] (I) Initialization phase:
[0189] After the resource virtualization module is started, load the configuration information such as the initial parameters of the weighted bipartite graph matching model, the benchmark data of resource performance indicators, and the preset thresholds for security risk assessment; establish communication connections with the resource information collection unit, the weighted bipartite graph matching calculation unit, the resource allocation execution unit, the real-time load monitoring and parameter adjustment unit, and the cross-layer defense unit, initialize the working environment of each unit, and prepare to start resource information collection and allocation work;
[0190] (II) Resource information collection phase:
[0191] The resource information collection unit continuously collects information from the resource provider and the resource demander; at the set frequency, regularly update the performance parameters and operating status data of the resource nodes, as well as the resource requirement information of the application or task; preprocess and organize the collected data, and store it in the local database to provide an accurate data basis for subsequent resource matching calculations;
[0192] (III) Weighted bipartite graph matching calculation phase:
[0193] The weighted bipartite graph matching calculation unit constructs a weighted bipartite graph based on the data obtained by the resource information collection unit; calculates the weights of each edge in the graph using the weight calculation formula, and then uses an optimization algorithm to solve the maximum weight matching scheme; during the calculation process, the real-time load monitoring and parameter adjustment unit dynamically adjusts the weight coefficient according to the system load situation to ensure the optimality of the matching result;
[0194] (4) Resource allocation execution stage:
[0195] The resource allocation execution unit converts the resource allocation scheme obtained by the weighted bipartite graph matching calculation unit into specific instructions and issues them to the resource providers and resource demanders; at the same time, it monitors the execution process of resource allocation in real time and promptly handles abnormal situations that occur during the execution process to ensure that resources are allocated and used accurately and efficiently according to the allocation scheme;
[0196] (5) Real-time load monitoring and parameter adjustment stage:
[0197] The real-time load monitoring and parameter adjustment unit continuously collects the resource usage data of each node and calculates the real-time load coefficient , and according to the value, dynamically adjusts the weight coefficient in the weighted bipartite graph matching model; at the same time, it feeds back the load information to other relevant modules to provide support for the overall optimization of the system;
[0198] (6) Cross-layer defense and decision optimization stage:
[0199] The cross-layer defense unit evaluates the security risks in the resource allocation process based on the information provided by the security protection module and calculates the risk score of the resources; combines the service quality score and uses the decision formula to make resource allocation decisions, and optimizes and adjusts the preliminary allocation scheme generated by the weighted bipartite graph matching calculation unit to ensure the security and efficiency of resource allocation;
[0200] (7) End stage:
[0201] When the system stops running or receives a stop instruction, the resource virtualization module stops operations such as resource information collection, matching calculation, and allocation execution, closes the communication connection with other modules, releases system resources, and saves the current configuration parameters and working status information so that it can quickly resume work when starting up next time.
[0202] In this embodiment, the adaptive scheduling engine, as the "intelligent central controller" of the lightweight Internet of Things management system based on the SparkLink protocol stack, can flexibly regulate the communication bandwidth according to the real-time network status by virtue of the dynamic time slot allocation algorithm, ensuring efficient data transmission; the following will elaborate on this module in detail from aspects such as overall functions, sub-module composition, and working processes:
[0203] I. Overview of overall functions:
[0204] The adaptive scheduling engine aims to dynamically and intelligently allocate communication bandwidth resources according to the communication requirements of devices, network load conditions, and link quality in the Internet of Things system; by using the dynamic time slot allocation algorithm, it precisely regulates the time segments of data transmission, avoids data transmission conflicts, and improves communication efficiency and network throughput; at the same time, it effectively reduces network latency and energy consumption, ensuring stable and efficient communication between various devices in a complex and changing network environment, and providing strong support for the stable operation of the entire lightweight Internet of Things management system;
[0205] II. Composition and functions of sub-modules:
[0206] (1) Network status perception unit:
[0207] Collection of device communication requirements: Real-time collection of communication request information of each device in the system, including the priority of data transmission, the size of data volume, transmission rate requirements, etc.; for emergency control instruction data, mark it as high priority; for conventional monitoring data, mark it as low priority, providing a basic basis for subsequent bandwidth allocation;
[0208] Network load monitoring: Continuously monitor the overall network load situation, obtain data such as occupied bandwidth resources and remaining available bandwidth in the network; at the same time, monitor the busy degree of each link to determine whether the link is congested, providing network environment information for dynamic time slot allocation;
[0209] Link quality assessment: Interact with the dynamic topology management module to obtain quality indicators such as received signal strength (RSSI), bit error rate (BER), and link delay of the link; comprehensively evaluate the communication quality of each link, providing a reference for selecting a suitable link during bandwidth allocation;
[0210] (2) Dynamic time slot allocation calculation unit:
[0211] Algorithm execution: Use the dynamic time slot allocation algorithm to allocate reasonable communication time slots for each device according to the data collected by the network status perception unit; this algorithm fully considers factors such as device priority, data volume, and network load, ensuring the priority transmission of key data and improving the overall network resource utilization rate;
[0212] Time slot adjustment: Adjust the allocated time slots in real time with the dynamic change of the network status; when a new high-priority communication request appears or the network load changes significantly, recalculate and optimize the time slot allocation scheme to ensure the timeliness and stability of communication;
[0213] (3) Bandwidth allocation execution unit:
[0214] Instruction Issuance: Convert the time slot allocation scheme generated by the dynamic time slot allocation calculation unit into specific control instructions and issue them to relevant devices and links in the network; guide the devices to transmit data within the specified time slots to ensure the orderliness of data transmission;
[0215] Execution Monitoring: Monitor in real time the execution of the bandwidth allocation instructions by the devices, and check whether the devices accurately transmit data within the specified time slots; if it is found that the devices do not execute according to the instructions or there are transmission anomalies, intervene and adjust in a timely manner to ensure the effective implementation of the bandwidth allocation strategy;
[0216] (IV) Feedback Optimization Unit:
[0217] Performance Data Collection: Collect performance metric data during network communication, such as data transmission success rate, actual transmission rate, network latency, etc.; evaluate the effectiveness of the current bandwidth allocation strategy through the analysis of these data;
[0218] Strategy Optimization: According to the performance evaluation results and combined with the changing trend of the network state, optimize and adjust the parameters and strategies of the dynamic time slot allocation algorithm; continuously improve the bandwidth allocation scheme to adapt to different network environments and application requirements and enhance the performance of the adaptive scheduling engine;
[0219] III. Workflow of the Module:
[0220] (I) Initialization Phase:
[0221] After the adaptive scheduling engine starts, load configuration information such as the initial parameters of the dynamic time slot allocation algorithm and the preset thresholds of network performance evaluation metrics; establish communication connections with the network state perception unit, the dynamic time slot allocation calculation unit, the bandwidth allocation execution unit, and the feedback optimization unit, initialize the working environments of each unit, and prepare to start network state perception and bandwidth allocation work;
[0222] (II) Network State Perception Phase:
[0223] The network state perception unit continuously collects data such as device communication requirements, network load, and link quality; at the set frequency, regularly obtain the communication request information of the devices, the network bandwidth usage, and the link quality metrics, preprocess and organize the data, and store it in the local database to provide real-time and accurate data support for subsequent bandwidth allocation calculations;
[0224] (III) Dynamic Time Slot Allocation Calculation Phase:
[0225] The dynamic time slot allocation calculation unit obtains the latest network status data from the network status perception unit and performs calculations using the dynamic time slot allocation algorithm; it allocates reasonable communication time slots for each device according to factors such as the device's priority, data volume, and network load; during the calculation process, it considers the impact of link quality on transmission and preferentially allocates time slots to devices with good link quality to ensure the reliability and efficiency of data transmission;
[0226] (4) Bandwidth allocation execution stage:
[0227] The bandwidth allocation execution unit converts the time slot allocation scheme generated by the dynamic time slot allocation calculation unit into specific control instructions and issues them to relevant devices and links in the network; after receiving the instructions, the devices perform data transmission within the specified time slots; the bandwidth allocation execution unit monitors the execution status of the devices in real time to ensure that the devices perform data transmission according to the allocated time slots and avoid data conflicts and transmission chaos;
[0228] (5) Feedback optimization stage:
[0229] The feedback optimization unit collects performance data during the network communication process and evaluates the current bandwidth allocation strategy using a performance evaluation model; it analyzes the gap between indicators such as data transmission success rate and network latency and the preset goals to identify problems with the bandwidth allocation strategy; according to the analysis results, it adjusts and optimizes the parameters of the dynamic time slot allocation algorithm to generate a new bandwidth allocation scheme to achieve continuous optimization of network bandwidth allocation;
[0230] (6) End stage:
[0231] When the system stops running or receives a stop instruction, the adaptive scheduling engine stops operations such as network status perception, time slot allocation calculation, and bandwidth allocation execution, closes the communication connection with other modules, releases system resources, and saves the current configuration parameters and working status information so that it can quickly resume work when starting up next time.
[0232] In this embodiment, the working process of the security protection module includes:
[0233] Grab device communication messages from the SparkLink protocol communication module and extract feature vectors including packet sending frequency, destination address distribution, protocol type diversity, and data payload complexity;
[0234] Input the feature vectors into an anomaly detection model based on the multi-head attention mechanism, and this model performs the following processing:
[0235] Calculate the correlation matrix of the behavior characteristics of each device;
[0236] Apply the mask matrix generated by the device trust score to weight the correlation;
[0237] Generate the attention weight distribution through the softmax function;
[0238] The model outputs an abnormal probability value. When the probability exceeds the preset threshold, a linkage protection mechanism is triggered, including:
[0239] Send a data isolation instruction to the edge collaboration module;
[0240] Update the blacklist of the topology management module;
[0241] Start the dynamic key rotation process;
[0242] Furthermore, as the "security guard" of the lightweight Internet of Things management system based on the SparkLink protocol stack, the security protection module comprehensively resists network security threats by deploying core technologies such as an anomaly detection model based on the attention mechanism and a dynamic key management system, and builds a solid security defense line for system data transmission and operation. The following will elaborate on this module in detail from aspects such as overall functions, sub-module composition, and working processes:
[0243] I. Overview of overall functions:
[0244] The security protection module is mainly responsible for monitoring, identifying, and resisting various security threats during the operation of the Internet of Things system, including network attacks, data leakage, illegal intrusion, etc.; through an anomaly detection model based on the attention mechanism, it conducts real-time analysis on data such as network traffic and device behavior to accurately identify abnormal behaviors; by using a dynamic key management system and adopting a chaos-lattice hybrid encryption algorithm resistant to quantum computing, it ensures the security of data transmission and storage; at the same time, in combination with a cross-layer defense unit, it realizes the quantitative balance of security and efficiency, ensuring that the system operates in a safe and reliable environment and protecting user data and system resources from infringement;
[0245] II. Composition and functions of sub-modules:
[0246] (1) Anomaly detection unit:
[0247] Data collection: Real-time collect various types of data in the network, including device communication data, network traffic data, user operation logs, etc.; through interaction with other modules in the system (such as the SparkLink protocol communication module and the resource virtualization module), obtain comprehensive data information to provide rich data sources for anomaly detection;
[0248] Calculation of the anomaly detection model based on the attention mechanism: Use the formula (where, is the output of the attention mechanism; is the query matrix; is the key matrix; is the value matrix; is the key matrix of the dimension; Denotes element-wise addition; Is the mask matrix; Denotes the model loss function; Is the input data; (The perturbation coefficient generated by adversarial training) is used for anomaly detection; The model focuses on key data features through the attention mechanism, combined with the perturbation coefficient generated by adversarial training, to enhance the ability to identify abnormal behaviors;
[0249] Among them, the adversarial training perturbation coefficient Is generated to satisfy the formula (Where Is the defense strength adjustment parameter, ; Is the sign function; Is the loss function With respect to the input data Gradient; Is the model parameter; Is the true label); In addition, to achieve dynamic defense strength adjustment, Also satisfies the formula (Where Is the clipping function that limits the input value within a specified range; Is the baseline perturbation strength; Is the number of attacks detected recently; Is the attack frequency warning threshold; Is the maximum value of the perturbation coefficient), and the false alarm rate is controlled below 3% through this mechanism;
[0250] Anomaly determination and warning: According to the model calculation results, compare the detected behavior with the preset normal behavior pattern to determine whether there is an anomaly; If an abnormal behavior is detected, immediately generate a warning message, mark the anomaly type, severity, etc., and send the warning message to the system administrator and relevant modules for timely countermeasures;
[0251] (2) Dynamic key management unit:
[0252] Key generation: Use a quantum-resistant chaotic-lattice hybrid encryption algorithm to generate keys, and the formula is (Where Is the generated key; Is the encryption function based on ring learning with errors; Is the key generated by the chaotic map; Is the exclusive OR operation; Is the hash function; Is the device identifier; Denotes string concatenation; (taking the timestamp as an example); this algorithm combines the randomness of chaotic mapping and the quantum-resistant characteristics of lattice-based encryption to generate high-strength encryption keys and ensure data security;
[0253] Key distribution and update: Securely distribute the generated keys to each device and module in the system; according to the preset key update policy, update the keys regularly or when specific events (such as device restart, detection of security threats) occur to ensure the timeliness and security of the keys and prevent data leakage caused by key cracking;
[0254] Key storage and management: Store the keys securely, using encrypted storage to protect the keys from unauthorized access; at the same time, strictly manage the use of keys, record information such as the usage time and usage object of the keys for easy auditing and tracking, and ensure the compliance and security of key usage;
[0255] (III) Cross-layer defense unit:
[0256] Risk assessment: Combine the resource allocation situation of the resource virtualization module to assess the security risks faced by the system; use the formula (where is the risk score of the resource ; is the probability of the resource being attacked; is the degree of impact of the attack on the resource ; is the defense strength of the resource ) to calculate the risk score of the resource, comprehensively consider the attack probability, impact degree, and defense strength, and assess the security risks faced by the resource;
[0257] Defense decision-making: According to the risk assessment results, use the formula (where is the result of the resource allocation decision; represents finding the parameter value that maximizes the objective function; is the service quality score; is the security weight factor, dynamically adjusted according to the system threat level: is the resource ) to make a defense decision; on the premise of ensuring service quality, balance security risks, achieve a quantitative balance between security and efficiency, and determine whether it is necessary to adjust the resource allocation strategy or strengthen security protection measures;
[0258] Defense execution: According to the defense decision, cooperate with other modules to execute corresponding defense measures; for example, notify the resource virtualization module to adjust resource allocation to avoid allocating critical resources to high-risk areas; or enhance the encryption protection and access control of specific resources to improve the overall security of the system;
[0259] III. Workflow of the Module:
[0260] (I) Initialization Phase:
[0261] After the security protection module is started, it loads the initial parameters of the anomaly detection model, the configuration information of the key management system, the preset thresholds for security risk assessment, etc.; establishes communication connections with other modules within the system (such as the NearLink protocol communication module, the resource virtualization module, the dynamic topology management module), initializes the anomaly detection unit, the dynamic key management unit, and the cross-layer defense unit, and prepares to start security protection work;
[0262] (II) Data Collection and Monitoring Phase:
[0263] The anomaly detection unit collects network data and device behavior data in real time and continuously monitors the system operation status; the dynamic key management unit monitors the usage of keys and the system security status according to the key update strategy and prepares for key update or distribution operations; the cross-layer defense unit interacts with the resource virtualization module to obtain resource allocation information and prepares for security risk assessment;
[0264] (III) Security Detection and Analysis Phase:
[0265] The anomaly detection unit analyzes the collected data using the attention mechanism anomaly detection model, calculates the anomaly score, and determines whether there are abnormal behaviors; the dynamic key management unit generates new keys according to the key generation algorithm and performs key distribution and update operations; the cross-layer defense unit calculates the risk score of resources using the risk assessment formula based on the resource allocation information and analyzes the security risks faced by the system;
[0266] (IV) Defense Decision and Execution Phase:
[0267] If the anomaly detection unit detects abnormal behaviors, it immediately issues a warning and transmits the information to the cross-layer defense unit and the system administrator; the cross-layer defense unit formulates defense strategies using the defense decision formula based on the abnormal situation and risk assessment results, and coordinates with other modules to execute corresponding defense measures, such as adjusting resource allocation, strengthening encryption protection, restricting access, etc.; the dynamic key management unit ensures the normal encryption and decryption of data during the defense process to guarantee data security;
[0268] (V) Feedback and Optimization Phase:
[0269] Collect data during the security protection process, such as the accuracy rate of anomaly detection, the usage of keys, the effectiveness of defense measures, etc.; based on this data, optimize and adjust the parameters of the anomaly detection model, the key management strategy, the decision-making mechanism of cross-layer defense, etc., continuously improve the performance and defense capabilities of the security protection module, and enable it to better cope with the constantly changing security threats;
[0270] (6) End stage:
[0271] When the system stops running or receives a stop instruction, the security protection module stops operations such as data collection, detection and analysis, and defense execution, closes the communication connection with other modules, releases system resources, and saves the current configuration parameters and working status information so that the security protection work can be quickly restored when starting up next time.
[0272] In this embodiment, the steps for the edge collaborative processing module to execute data processing are as follows:
[0273] Receive the original data stream uploaded by the sensor node;
[0274] Select a preprocessing algorithm according to the sensor type, and the selection rule is:
[0275] Wavelet denoising algorithm is used for vibration sensor data;
[0276] Kalman filtering algorithm is used for position sensor data;
[0277] Normalization processing is used for environmental sensor data;
[0278] Input the preprocessed data into the task offloading decision model, calculate the benefit ratio of local processing and cloud offloading, and this ratio is determined by the ratio of the local processing energy consumption delay product to the transmission energy consumption delay product;
[0279] Dynamically allocate computing tasks according to the benefit ratio threshold, and output the compressed result data packet;
[0280] Furthermore, as the "intelligent decision-making center" of the lightweight Internet of Things management system based on the SparkLink protocol stack, the edge collaborative processing module realizes efficient collaboration and intelligent task processing among edge devices by constructing a task offloading decision model, effectively improving the system response speed and resource utilization rate; the following will elaborate on this module in detail from aspects such as overall functions and sub-module compositions:
[0281] I. Overview of overall functions:
[0282] The edge collaborative processing module is mainly responsible for intelligent analysis and allocation of tasks in the Internet of Things system. Through the task offloading decision model, according to the real-time status of the system (such as device load, network condition, task priority, etc.), it dynamically formulates task offloading strategies; this module can realize collaborative cooperation among edge devices, reasonably allocate complex tasks to appropriate edge nodes for processing, avoid overloading of a single device, and improve task processing efficiency; at the same time, reduce data transmission delay, reduce the cloud computing pressure, enhance the real-time performance and reliability of the system, and meet the requirements of Internet of Things applications for quick response and efficient processing;
[0283] II. Composition and functions of sub-modules:
[0284] (1) Task Information Collection Unit:
[0285] Task Requirement Acquisition: Collect information on various tasks in the system in real time, including task types (such as data processing, image recognition, video analysis, etc.), task size, computational complexity, priority, deadline, etc.; accurately obtain the specific requirements of tasks by interacting with the task initiation module or application layer, providing basic data for subsequent task analysis and allocation;
[0286] Device Status Monitoring: Monitor the operating status of edge devices and collect information such as the computing power of the devices (such as CPU model, number of cores, main frequency), storage resources (remaining storage space), network connection status (bandwidth, latency, packet loss rate), and current load conditions (CPU usage, memory occupancy); comprehensively grasp the resource availability of edge devices to reasonably allocate tasks;
[0287] (2) Deep Reinforcement Learning Decision Calculation Unit:
[0288] Model Construction and Training: Use the anti-interference TD3 algorithm to construct a task offloading decision model, and its policy network update satisfies the formula (where is the policy network, are the parameters of the policy network; represents finding the value that minimizes the objective function; represents sampling the state from the experience replay buffer ; is the channel signal-to-noise ratio adaptive coefficient: is network taking the policy in the state of value; is for multiple networks taking the policy in the state of value variance); where (where is the channel signal-to-noise ratio); train the model with a large amount of task processing scenario data so that the model can learn the optimal task offloading strategy in different states;
[0289] Decision Calculation: Determine the current system state according to the task requirements and device status information obtained by the task information collection unit; set the state Input it into the trained task offloading decision model to calculate the optimal task offloading strategy, that is, determine which edge device each task should be assigned to for processing, as well as the processing sequence and method, etc.;
[0290] (3) Task Assignment Execution Unit:
[0291] Issuing Assignment Instructions: Convert the task offloading strategy generated by the deep reinforcement learning decision calculation unit into specific assignment instructions and send them to the relevant edge devices; the instruction content includes task details, target device identification, processing requirements, etc., to guide the edge devices to receive and execute tasks;
[0292] Execution Monitoring and Coordination: Real-time monitor the execution status of tasks on edge devices, track task progress, resource usage, etc.; if abnormal situations such as device failures, task timeouts, and resource shortages occur during the execution process, coordinate and adjust in a timely manner, reassign tasks or take other countermeasures to ensure that tasks can be successfully completed;
[0293] (4) Feedback Optimization Unit:
[0294] Performance Data Collection: Collect performance metric data during task processing, such as task completion time, processing result accuracy, device energy consumption, network traffic, etc.; evaluate the effectiveness of the task offloading strategy and the overall performance of the system through the analysis of these data;
[0295] Model Optimization: Adjust and optimize the parameters of the task offloading decision model according to the performance evaluation results; for example, adjust the parameters of the policy network according to the task completion time and accuracy; Optimize the structure and parameters of the Q network according to the network conditions and device loads; At the same time, update the experience replay buffer , incorporate new task processing experiences into model training, and continuously improve the decision-making accuracy and adaptability of the model.
[0296] In this embodiment, the system further includes a cross-module coordination controller, which performs:
[0297] Periodically collect the operation metrics of each module, including channel utilization rate, node online rate, and virtualization overhead;
[0298] Calculate the system health index, which is the continuous product of the deviation degrees of the failure rates of each module from the corresponding thresholds;
[0299] When the health level is lower than the warning value, trigger system reconstruction, including adjusting the topology optimization frequency, shrinking the resource pool size, and enhancing the security detection level;
[0300] Furthermore, the composition structure of the cross-module coordination controller includes:
[0301] (1) Information Collection Unit:
[0302] Module Data Acquisition: Establish communication interfaces with each functional module within the system, and periodically or in real-time collect key data of each module; Obtain information such as device connection status, data transmission rate, and energy consumption from the SparkLink protocol communication module; Obtain network topology structure, node status, and link quality assessment results from the dynamic topology management module; Obtain resource supply and demand situation, load factor, and resource allocation scheme from the resource virtualization module; Obtain anomaly detection data, key management status, and risk scores from the security protection module; Obtain task offloading strategies, task execution progress, device load, etc. data from the edge collaborative processing module;
[0303] Data Preprocessing: Perform preprocessing operations such as format conversion, duplicate removal, and filtering on the collected multi-source heterogeneous data, eliminate data noise and redundant information, unify the data into a format convenient for analysis and processing, and store it in the local data buffer to provide accurate data support for subsequent information analysis and coordinated decision-making;
[0304] (2) Coordination Decision-making Unit:
[0305] Policy Library and Algorithm Engine: Built-in multiple coordination policies and algorithm models, including rule-based heuristic policies (such as giving priority to ensuring the bandwidth of critical tasks during network congestion) and global collaboration policies based on optimization algorithms (such as finding the optimal combination of resource allocation and task scheduling through genetic algorithms); According to different application scenarios and system states, select appropriate policies and algorithms for analysis;
[0306] Comprehensive Analysis and Decision-making: Obtain the preprocessed data from the information collection unit, and combine the policy library and algorithm engine to evaluate the overall operation status of the system; Analyze the coordination bottlenecks and potential conflicts between modules, such as judging whether the resource allocation matches the task offloading requirements, and whether the network topology adjustment affects the data transmission stability, etc.; Through calculation and reasoning, generate coordination instructions for each module, such as adjusting the weight coefficient of the resource virtualization module, optimizing the topology adjustment plan of the dynamic topology management module, etc.;
[0307] (3) Instruction Execution Unit:
[0308] Instruction Distribution: Convert the coordination instructions generated by the coordination decision-making unit into a format recognizable by each module, and accurately send them to the corresponding module through the communication interface; Ensure the timeliness and accuracy of instruction transmission, and avoid instruction loss or error;
[0309] Execution Monitoring and Feedback: Real-time track the execution situation of each module for the instructions, and collect status information during the execution process (such as instruction execution progress, whether there are any abnormalities, etc.); If it is found that there are problems when the module executes the instructions, promptly feedback to the coordination decision-making unit so as to readjust the coordination policy to ensure the smooth completion of the coordination tasks;
[0310] 4. Parameter Optimization Unit:
[0311] Performance Evaluation: Collect performance metric data during system operation, such as task processing latency, resource utilization, network throughput, security incident occurrence rate, etc.; Quantitatively evaluate the overall system performance and the collaborative effect among modules according to preset evaluation criteria, and analyze the advantages and disadvantages of the current coordination strategy;
[0312] Parameter Adjustment: Optimize and adjust the policy parameters and algorithm parameters in the coordination decision-making unit according to the performance evaluation results; For example, adjust the weight coefficients in the cross-module parameter coupling formula, optimize the information interaction frequency and priority, etc.; Through continuous iterative optimization, make the cross-module coordination controller better adapt to system changes and improve the coordination efficiency and system performance;
[0313] The workflow is as follows:
[0314] 1. Initialization Phase:
[0315] After the cross-module coordination controller starts, it loads initialization information such as the coordination strategy library, algorithm model parameters, and communication interface configurations of each module; Establishes communication connections with the SparkLink protocol communication module, dynamic topology management module, resource virtualization module, security protection module, and edge collaborative processing module, initializes the information collection unit, coordination decision-making unit, instruction execution unit, and parameter optimization unit, and prepares to start system coordination work;
[0316] 2. Information Collection Phase:
[0317] The information collection unit continuously collects data information of each module at a set frequency; After preprocessing the collected data, it stores it in the local data buffer to provide a real-time and accurate data basis for coordination decision-making;
[0318] 3. Coordination Decision-Making Phase:
[0319] The coordination decision-making unit obtains data from the information collection unit, selects a suitable algorithm for analysis based on the current system state and preset strategies; Through comprehensive evaluation and calculation, it judges the collaborative requirements and potential problems among modules, generates targeted coordination instructions, and clarifies the working parameters or operations that each module needs to adjust;
[0320] 4. Instruction Execution Phase:
[0321] The instruction execution unit distributes the instructions generated by the coordination decision-making unit to the corresponding modules and monitors the execution process of the instructions; Timely collect execution feedback information, and if an exception occurs during the execution process, immediately report it to the coordination decision-making unit for emergency handling and strategy adjustment;
[0322] (5) Parameter Optimization Phase:
[0323] Based on the system performance evaluation results, the parameter optimization unit analyzes the deficiencies of the current coordination strategy; adjusts and optimizes the strategies and algorithm parameters in the coordination decision-making unit to form a new coordination strategy, further improving the system's collaborative efficiency and overall performance; then returns to the information collection phase to continuously and cyclically optimize the system coordination work.
[0324] (6) End Phase:
[0325] When the system stops running or receives a stop instruction, the cross-module coordination controller stops operations such as information collection, decision-making, instruction execution, and parameter optimization, closes the communication connections with each module, releases system resources, and saves the current configuration parameters and working status information for quick resume of operation when starting up next time.
[0326] Although the embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A lightweight Internet of Things management system based on the SparkLink protocol stack, characterized in that: It includes: A SparkLink protocol communication module that receives physical layer radio frequency signals, parses SparkLink protocol data frames, and outputs device discovery information and channel status data to the dynamic topology management module; A dynamic topology management module that receives link quality metrics from the SparkLink protocol communication module, generates an optimal connection topology based on an improved multi-agent reinforcement learning algorithm, and outputs a node connection relationship table to the resource virtualization module; A resource virtualization module that collects the computing power, storage capacity, and sensor types of each Internet of Things device, constructs a virtual resource pool through a weighted matching model, and outputs a resource allocation plan to the adaptive scheduling engine. The resource virtualization module performs the following operations: Receives resource registration requests from Internet of Things devices, and parses device description files to obtain computing power, storage space, and sensor types; Constructs a multi-dimensional feature vector containing device hardware capabilities and sensor characteristics; Inputs the task requirement vector and the device feature vector into an improved matching algorithm solver to calculate the fitness scores of each device and task; The improved matching algorithm includes: Constructs a bipartite graph model of tasks and devices, and the edge weights are determined by the product of the device fitness score and the device trust score; Introduces virtual nodes to handle resource over-request situations, and automatically expands the resource pool when the number of tasks exceeds the available devices; Outputs a matching plan that maximizes the total fitness score and a list of standby devices; An adaptive scheduling engine that receives the quality of service level of business requests and the resource allocation plan, executes a dynamic time slot allocation strategy, and outputs time slot configuration instructions to the SparkLink protocol communication module; A security protection module that monitors the data flow of device communication behaviors, generates a security situation assessment report based on an anomaly detection model with an attention mechanism, and outputs an alarm signal to the edge collaborative processing module; An edge collaborative processing module that receives raw sensor data and a security situation report, generates a task offloading strategy through a task offloading decision model, and outputs preprocessed data packets to the cloud server.
2. The lightweight Internet of Things management system based on the SparkLink protocol stack according to claim 1, wherein: The dynamic topology management module performs the following processing procedures: Realtime obtains the signal strength matrix, bit error rate matrix, and transmission delay matrix of each node from the SparkLink protocol communication module; Inputs the signal strength matrix, bit error rate matrix, and transmission delay matrix of each node into a link quality evaluation model to calculate a comprehensive quality score, which is weighted and composed of the following three parts: Signal strength score: Normalizes the original signal strength value to the 0-1 interval and then multiplies it by the first weight coefficient; Bit error rate score: Multiplies the value obtained by subtracting the actual bit error rate from 1 by the second weight coefficient; Delay score: Exponentially decays the ratio of the transmission delay to the maximum allowable delay and then multiplies it by the third weight coefficient; Among them, the sum of the first weight coefficient, the second weight coefficient, and the third weight coefficient is 1, and it is dynamically configured according to the current service type; Constructs an adjacency matrix based on the comprehensive quality score, and uses an improved reinforcement learning algorithm to iteratively optimize the network topology, and finally outputs a topology configuration table containing a list of optimal relay nodes.
3. The lightweight Internet of Things management system based on the SparkLink protocol stack according to claim 2, wherein: The action selection strategy of the improved reinforcement learning algorithm is: Obtains the current resource load rate from the resource virtualization module; Dynamically adjusts the exploration rate parameter according to the resource load rate, and the higher the load rate, the larger the exploration rate accordingly; Update the state value table according to the Bellman equation, where the weighted summation of future benefits takes into account the remaining energy and computing power of neighboring nodes; Output the topology that maximizes the network lifetime.
4. A lightweight Internet of Things management system based on the SparkLink protocol stack according to claim 1, characterized in that: The degree of fitness is calculated by comprehensively considering the following factors: Computing capability matching: the ratio of the device’s CPU capability to the task requirements; Storage space matching: the ratio of device memory capacity to task requirements; Topological proximity: an exponential decay function of the number of communication hops between devices; Generate a resource allocation list including virtual resource identifiers and physical device mapping relationships.
5. The lightweight Internet of Things management system based on the SparkLink protocol stack according to claim 1, wherein: The workflow of the security protection module includes: Capture device communication messages from the Xingshan protocol communication module and extract feature vectors including packet sending frequency, destination address distribution, protocol type diversity, and data payload complexity; The feature vector is fed into a multi-head attention-based anomaly detection model, which performs the following processing: Calculate the correlation matrix of each device's behavior characteristics; The mask matrix generated by applying the device trust score is used to weight the association degree; Generate attention weight distribution through normalized exponential function; The model outputs an abnormal probability value. When the probability exceeds the preset threshold, the linkage protection mechanism is triggered, including: Send data isolation instructions to the edge collaboration module; Update the blacklist of the topology management module; Start the dynamic key rotation process.
6. The lightweight Internet of Things management system based on the SparkLink protocol stack according to claim 5, characterized in that: The training method of the anomaly detection model includes: Construct a training dataset containing normal traffic and various attack samples; Add adversarial training items to the loss function to enhance the robustness of the model by calculating the gradient amplitude of the prediction results; Adopt a progressive difficulty improvement strategy to gradually enhance the strength of adversarial samples; Output a classification model with anti-interference ability.
7. The lightweight Internet of Things management system based on the SparkLink protocol stack according to claim 1, characterized in that: The steps of performing data processing by the edge collaborative processing module are as follows: Receive the original data stream uploaded by the sensor node; Select the preprocessing algorithm according to the sensor type. The selection rules are: The vibration sensor data is de-noised using a wavelet algorithm; The position sensor data uses the Kalman filter algorithm; Environmental sensor data is normalized; Input the preprocessed data into the task offloading decision model, and calculate the benefit ratio of local processing and cloud offloading, where the benefit ratio is determined by the ratio of the local processing energy consumption delay product to the transmission energy consumption delay product; Computational tasks are dynamically allocated according to the benefit ratio threshold, and compressed result data packets are output.
8. The lightweight Internet of Things management system based on the SparkLink protocol stack according to claim 7, wherein: The state space of the task offloading decision model is defined as a multidimensional vector including network bandwidth, edge node load, data priority and remaining power. The action space includes local processing ratio, transmission power level and caching strategy. The reward function is calculated by weighted calculation of service quality compliance rate, energy consumption cost and delay violation.
9. The lightweight Internet of Things management system based on the SparkLink protocol stack according to claim 1, characterized in that: The system also includes a cross-module coordination controller, which executes: Periodically collect the operating indicators of each module, including channel utilization, node online rate, and virtualization overhead; Calculate the system health index, which is the product of the failure rate of each module and the deviation degree of the corresponding threshold; When the health level is lower than the warning value, system reconstruction is triggered, including adjusting the topology optimization frequency, shrinking the resource pool size, and improving the safety detection level.
Citation Information
Patent Citations
Internet of Things system
CN116368355A
A wireless communication method and system for Internet of Things based on Star Flash protocol
CN119789076A