A task processing system based on intelligent internet of things equipment
By implementing system initialization and dynamic task table construction, hierarchical event polling and priority processing, adaptive low-power management, and dynamic task expansion and hot-swapping support, the system solves the problems of insufficient hardware integration, event processing delay, and improper energy management in IoT task processing systems, achieving efficient and flexible device management and energy optimization.
Patent Information
- Application Number
- CN202610221608.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-25
- Publication Date
- 2026-05-08
- Estimated Expiration
- 2046-02-25
AI Technical Summary
Existing IoT task processing systems suffer from insufficient hardware and protocol stack integration and unreasonable task planning during device initialization, resulting in low system startup efficiency; lack of priority sorting in event processing, which may delay critical events; lack of dynamic expansion and hot-swapping support for newly connected devices, making it difficult to flexibly respond to device changes; and insufficient intelligent system energy management, which cannot adaptively adjust power consumption according to actual load, resulting in energy waste.
The system employs a system initialization and task table dynamic construction unit to initialize hardware and protocol stacks, create event tables and function tables, a hierarchical event polling and priority processing unit to classify and process events, an adaptive low-power management unit to adjust power consumption, and a dynamic task expansion and hot-swap support unit to support the access of new devices.
It improves system startup efficiency, ensures timely response to critical events, enhances system flexibility and adaptability, reduces energy consumption, and improves energy utilization efficiency and overall performance.
Smart Images

Figure CN121722526B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart Internet of Things (IoT), and more particularly to a task processing system based on smart IoT devices, for efficiently processing and managing the tasks of smart IoT devices. Background Technology
[0002] With the rapid development of IoT technology, its application scenarios are becoming increasingly widespread, covering numerous fields such as smart homes, industrial automation, intelligent transportation, and healthcare. In smart home scenarios, a large number of smart devices, such as smart door locks, smart cameras, and smart appliances, are connected through the IoT to achieve remote control and automated management. In the field of industrial automation, various sensors, robots, and other devices collaborate to improve production efficiency and quality. In intelligent transportation systems, vehicles and road facilities exchange information through networks, improving traffic safety and flow. In the healthcare field, wearable devices and medical monitoring equipment collect patients' health data in real time and transmit it to medical institutions for analysis and processing.
[0003] However, existing IoT task processing systems have revealed numerous problems in practical applications. During the device initialization phase, due to the wide variety of IoT devices and significant differences in hardware architecture and communication protocols, existing systems often lack effective integration mechanisms. For example, in some smart home systems, connecting smart devices from different brands to the network may require complex configuration and debugging to achieve interoperability. This not only increases the difficulty for users but may also lead to excessively long system startup times, impacting user experience. Furthermore, the planning of system tasks is often inadequate, failing to fully consider the collaborative work needs between devices, resulting in uneven resource allocation, and some devices may malfunction due to insufficient resources.
[0004] In terms of event processing, most existing IoT task processing systems employ simple first-in-first-out (FIFO) or random processing methods, lacking effective differentiation of event priorities. In some critical scenarios, such as emergency fault alarms in industrial automation or fire alarms in smart homes, critical events may be delayed because the system is processing a large number of ordinary events, leading to serious consequences. Furthermore, the real-time requirements for events are difficult to meet; when multiple events occur simultaneously, the system may experience processing chaos.
[0005] With the continuous development of IoT technology, the pace of device upgrades is accelerating, and new devices are constantly emerging. However, existing IoT task processing systems lack the ability to dynamically expand and hot-swap newly connected devices. When a new device is connected, the system may need to undergo large-scale software upgrades and hardware modifications to become compatible. This not only increases costs and workload but may also lead to system failures during the upgrade process, affecting normal operation. Moreover, for some temporarily connected devices, such as motion detection devices, the system struggles to quickly allocate tasks and resources, reducing the system's flexibility and adaptability.
[0006] In terms of energy management, most existing IoT task processing systems employ fixed power consumption modes and cannot adaptively adjust to the actual load conditions. Under low loads, the system continues to operate in high-power mode, resulting in energy waste; conversely, under high loads, insufficient power consumption can lead to performance degradation. This energy consumption issue is particularly prominent in battery-powered IoT devices, such as wireless sensor nodes, directly impacting their lifespan and reliability. Therefore, a new task processing system based on intelligent IoT devices is urgently needed to address these problems and improve the performance, reliability, and energy efficiency of IoT systems. Summary of the Invention
[0007] This invention aims to overcome the following technical problems existing in the IoT task processing system: First, insufficient hardware and protocol stack integration and unreasonable task planning during device initialization lead to low system startup efficiency; second, the lack of priority sorting in event processing may cause delays in the processing of critical events; third, the lack of dynamic expansion and hot-swapping support for newly connected devices makes it difficult to flexibly respond to device changes; and fourth, the system's energy management is not intelligent enough and cannot adaptively adjust power consumption according to the actual load, resulting in energy waste.
[0008] To address the aforementioned technical problems, the present invention provides a task processing system based on intelligent Internet of Things (IoT) devices, characterized in that the system comprises:
[0009] The system initialization and task table dynamic construction unit is used to initialize and set up the hardware and protocol stack, create event tables and function tables, and record the task event status in the form of bitmasks with timestamps and priority weights. It predefines core tasks and assigns fixed event masks and dynamic priority adjustment and recovery strategies, and outputs the system environment with the initialization completed and the task table built.
[0010] The hierarchical event polling and priority processing unit receives the system environment and event status in the event table output by the system initialization and task table dynamic construction unit, and classifies and processes the events according to the priority of the tasks.
[0011] The adaptive low-power management unit adjusts the system's power consumption state based on the system state output by the hierarchical event polling and priority processing unit, thereby reducing system energy consumption.
[0012] The dynamic task extension and hot-swap support unit identifies the device based on its type and communication protocol when a new device access signal is detected, assigns it corresponding tasks and resources, and adds the new task to the event table and function table.
[0013] Preferably, in each round of the hierarchical event polling and priority processing unit, the key events are first scanned. If a key event exists, the current low-priority task is interrupted and the context information is saved. After determining the key event type, the corresponding processing function is called. After processing, the event flag is cleared. If there is no key event, ordinary events are processed in batches, and the system status after processing is output.
[0014] Preferably, the hierarchical event polling and priority processing unit includes a critical event processing subunit and an event classification subunit. The critical event processing subunit continuously monitors for the existence of critical event flags. When the event classification subunit identifies an event as a critical event, it sets the flag and notifies the critical event processing subunit that a critical event needs to be processed. When a critical event needs to be processed, the critical event processing subunit further analyzes the critical event to determine its specific type. Based on the type of critical event and according to a pre-defined correspondence, it calls the processing function for that type of critical event. Once the processing function for the critical event has finished executing, the critical event processing subunit clears the critical event flag.
[0015] Preferably, the system initialization and task table dynamic construction unit includes: a hardware initialization unit, used to initialize the system and output a hardware environment with completed hardware initialization configuration; a protocol stack initialization and task table creation unit, which initializes the software protocol stack based on the hardware-initialized environment and creates a task table and an event table, wherein the event table records the task event status in bitmask form and records a timestamp for each event; and a function table; and a core task pre-registration and strategy formulation unit, which receives the system environment with the initialized protocol stack and completed task table output by the protocol stack initialization and task table creation unit, predefines security monitoring tasks, assigns them fixed event masks, and sets dynamic priority adjustment strategies.
[0016] Preferably, the hierarchical event polling and priority processing unit includes: a critical event scanning and processing unit, which receives the system environment and event status in the event table output by the system initialization and task table dynamic construction unit, scans the critical event bitmask in the event table, and if a critical event is detected, interrupts the currently executing low-priority task, saves the task's current register status, program counter value, and other context information to a specific memory area, which is a dedicated memory area pre-allocated by the system for storing task context information; calls the corresponding processing function in the function table according to the critical event type, and clears the flag bit corresponding to the critical event in the event table after processing; and a general event batch processing unit, which performs batch and ordered processing of general events when the critical event scanning and processing unit does not detect a critical event.
[0017] Preferably, the process of scanning the key event bitmask in the event table includes: initializing the scan pointer and positioning it at the starting position of the key event bitmask in the event table; scanning the key event bitmask from the starting position; extracting features according to pre-set rules during each scan; combining the extracted features into a feature vector as the scan progresses; searching for the most similar pattern to the feature vector in the pattern library; and determining the key event type based on the matching result.
[0018] Preferably, the adaptive low-power management unit includes: a system status monitoring unit, which receives the system status output by the hierarchical event polling and priority processing unit, analyzes the number and type of tasks in the task queue, determines the current system load, and outputs real-time system operating status data; a power consumption strategy decision unit, which receives the real-time system operating status data output by the system status monitoring unit, determines that the system can enter a low-power mode when the system is under low load, and selects a deep sleep mode; and determines that high-performance operation needs to be maintained when the system is under high load; and a power consumption execution control unit, which receives the power consumption adjustment strategy instruction output by the power consumption strategy decision unit, and if the instruction is to enter a deep sleep mode, sends a shutdown signal to the wireless communication module through the hardware control interface to reduce the CPU operating frequency to a set value.
[0019] Preferably, the dynamic task expansion and hot-plug support unit includes: a task expansion request parsing unit, which receives task expansion requests sent by external devices or other modules of the system, parses them, and determines the specific content and requirements of the request; a resource evaluation and allocation unit, which evaluates whether the system currently has sufficient resources to support the new task based on the information provided by the task expansion request parsing unit, and allocates resources accordingly; a task loading and initialization unit, which loads the new task into the system and performs initialization settings after the resource evaluation and allocation unit successfully allocates resources; and a hot-plug device detection and processing unit, which receives device insertion and removal detection signals from the hardware layer, obtains information about the inserted device through a device identification protocol when a device is detected, finds the corresponding driver according to the device type, and loads it into the system; and when a device is detected to be removed, stops all tasks related to that device, releases the resources allocated to these tasks, and then uninstalls the corresponding device driver.
[0020] The technical effects of this invention are significant. Through the system initialization and dynamic task table construction unit, effective integration of hardware and protocol stacks, as well as rational task planning, are achieved, improving system startup efficiency. The hierarchical event polling and priority processing unit classifies and processes events according to priority, ensuring timely responses to critical events and avoiding processing delays. The dynamic task expansion and hot-swappable support unit can quickly identify newly connected devices, assigning them tasks and resources, realizing dynamic system expansion and enhancing system flexibility. The adaptive low-power management unit automatically adjusts power consumption based on system load, reducing system energy consumption and improving energy utilization efficiency. The collaborative work of these units enhances the performance and reliability of the entire task processing system based on intelligent IoT devices. Attached Figure Description
[0021] Figure 1 This is a logical architecture diagram of a task processing system based on smart IoT devices. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0024] like Figure 1 As shown, the present invention provides a task processing system based on a smart Internet of Things (IoT) device, the system comprising the following units:
[0025] The system initialization and task table dynamic construction unit is responsible for initializing the hardware and protocol stack, creating event tables and function tables, and pre-registering core tasks, thus building the infrastructure for the entire system. Its input is the system startup command. Upon receiving this command, it initializes and configures hardware components such as the microcontroller, sensor interfaces, communication modules, and interrupt controllers, while also configuring the network parameters of the ZigBee protocol stack. It then creates an event table that records task event states in bitmask format and incorporates timestamps and priority weights, as well as a function table with intelligent binding and adaptive update capabilities. Finally, it predefines core tasks such as security monitoring and coordinator communication, assigning fixed event masks and dynamic priority adjustment and recovery strategies. The output is the system environment with initialized and task tables built, providing the operational foundation for the subsequent hierarchical event polling and priority processing unit.
[0026] The hierarchical event polling and priority processing unit categorizes events based on task priority, ensuring timely response to critical tasks while also handling ordinary tasks. Inputs include the system environment output by the system initialization and task table dynamic construction unit, and the event states in the event table. In each loop, critical events are scanned first. If a critical event exists, the current low-priority task is interrupted, and its context information is saved. Simultaneously, the critical event type is determined, and the corresponding processing function is called. After processing, the event flag is cleared. If no critical events exist, ordinary events are processed in batches. First, similar events are aggregated according to an intelligent strategy. Then, based on task characteristics, the aggregated tasks are intelligently scheduled and their priorities adjusted before sequentially executing the processing functions in the function table. Output is the system state after event processing. This result is used by the adaptive low-power management unit and the dynamic task expansion and hot-swappable support unit.
[0027] Preferably, the hierarchical event polling and priority processing unit may include a critical event processing subunit and an event classification subunit. The critical event processing subunit continuously monitors for the presence of a critical event flag. This flag can be understood as a special signal or identifier. When the event classification subunit identifies an event as a critical event, it sets this flag to notify the critical event processing subunit that a critical event needs to be handled. Once a critical event flag is detected, it means that an important event requiring immediate response has occurred in the current system. In order to concentrate system resources to quickly process the critical event, the critical event processing subunit will interrupt the currently executing low-priority tasks. At the same time, it saves the context information. The context information includes various state data of the interrupted task at the time of interruption, such as the code position of the task execution, the current system resource status (such as allocated memory blocks, open file handles, etc.), and the data in registers.
[0028] The critical event handling subunit further analyzes critical events to determine their specific types. Different types of critical events require different handling methods. The critical event handling subunit comprehensively considers various characteristic information of the event, such as the time of occurrence, the event source (which hardware device or software module triggered the event), and the parameters carried by the event. Once the type of critical event is determined, the critical event handling subunit will call the processing function specifically for that type of critical event according to the pre-defined correspondence. For example, if the critical event is determined to be a hard drive failure, the function for handling hard drive failures will be called. This function may include a series of operation steps such as attempting to repair bad sectors, backing up important data, and prompting the user to replace the hard drive.
[0029] Once the processing function for a critical event has finished executing, it means the critical event has been properly handled. At this point, the critical event processing subunit clears the critical event flag. Clearing the flag also prepares for the next detection and processing of critical events, ensuring that erroneous duplicate processing is not caused by previous flag residue.
[0030] The adaptive low-power management unit dynamically adjusts the system's power consumption based on actual operating conditions, reducing energy consumption. The input is the system status output from the hierarchical event polling and priority processing unit, including current task execution status and resource usage. By monitoring this information in real time and based on a preset power adjustment strategy, the unit reduces the operating frequency of system components or puts them into sleep mode when the system is idle or under low load, while resuming normal operation when tasks are busy. The output is the adjusted system status, fed back to the hierarchical event polling and priority processing unit to ensure that task processing is not negatively affected by power consumption adjustments.
[0031] Dynamic Task Expansion and Hot-Swapping Support Unit: Enables convenient access to new devices and expands system functionality. Inputs include external device access signals and the system status output from the hierarchical event polling and priority processing unit. When a new device access signal is detected, the system automatically identifies the device based on its type and communication protocol, assigns appropriate tasks and resources, and adds the new task to the event table and function table. Simultaneously, system resources are reallocated and adjusted to accommodate the addition of the new device. Output is the system status after successfully connecting a new device and expanding functionality, which is fed back to the system initialization and dynamic task table construction unit.
[0032] Preferably, the system initialization and task table dynamic construction unit further includes the following units:
[0033] The hardware initialization unit initializes the system, providing a stable hardware foundation for subsequent software-level initialization and task list construction. The input to the hardware initialization unit is the system startup command. For the microcontroller, it sets parameters such as operating frequency and clock source, for example, setting the operating frequency to 80MHz and selecting the internal high-speed clock as the clock source; it configures the sensor interface, determining the data transmission method (SPI, I2C, etc.) and sampling frequency, for example, setting the temperature sensor to I2C communication mode and sampling frequency to 1Hz; it configures the communication module, including the wireless frequency band and communication rate, such as setting the ZigBee module to operate in the 2.4GHz band and with a communication rate of 250kbps; it initializes the interrupt controller, setting interrupt priority and triggering method, for example, setting the safety alarm interrupt to the highest priority and triggering method to rising edge triggering. The output completes the hardware environment configuration. This output serves as the hardware foundation input for the protocol stack initialization and task list creation unit.
[0034] The protocol stack initialization and task table creation unit, based on the completed hardware initialization environment, initializes the software protocol stack and creates a task table, providing a framework for system task management and execution. This unit receives the hardware environment (complete hardware initialization configuration) from the hardware initialization unit and configures the network parameters of the ZigBee protocol stack. It creates an event table, which records task event states in bitmask format and records a timestamp for each event to determine its timeliness (e.g., event A's timestamp is 2024-10-10 12:00:00). Each event is assigned a priority weight, such as a security alarm event with a weight of 100. It also creates a function table with intelligent binding capabilities, automatically associating appropriate processing functions based on task characteristics and event types (e.g., automatically binding a temperature anomaly processing function when the event is a temperature anomaly). The function table also has adaptive update capabilities, automatically updating when the system detects new task types or updated processing logic. Finally, it outputs the system environment with the initialized protocol stack and completed task table creation. This output provides the foundational environment for the core task pre-registration and strategy formulation unit.
[0035] The core task pre-registration and strategy formulation unit, based on the existing system environment, pre-registers core tasks and formulates corresponding execution and priority adjustment strategies to ensure the stable operation of critical system functions. It receives the system environment with an initialized protocol stack and completed task table creation from the protocol stack initialization and task table creation unit, predefines security monitoring tasks, assigns them a fixed event mask of 0x0001, and sets a dynamic priority adjustment strategy. For example, when a security threat level is detected to be elevated, the priority of the security monitoring task is increased by 20%, and a priority recovery strategy is formulated to gradually restore it to the initial priority after the security threat is resolved. For coordinator communication tasks, an event mask of 0x0010 is assigned, its resource usage ratio is set to 30% of the total system resources, and a resource preemption strategy is formulated to prioritize the transmission of communication data during network congestion. It outputs the system environment with completed core task pre-registration and strategy formulation, serving as the final output of the entire system initialization and dynamic task table construction unit, providing a complete operational foundation for the hierarchical event polling and priority processing unit.
[0036] The hierarchical event polling and priority handling unit includes the following units:
[0037] The critical event scanning and processing unit is used to quickly capture and process critical events in each loop, ensuring the system's timely response to critical situations. It receives the system environment and event status from the system initialization and task table dynamic construction unit, scans the critical event bitmasks in the event table, and if a critical event is detected (such as a security alarm event whose bitmask is set), it immediately interrupts the currently executing low-priority task, saving the task's current register state, program counter value, and other context information to a specific memory area. This specific memory area is a dedicated memory area pre-allocated by the system for storing task context information. Based on the critical event type (determined by parsing specific flag bits in the event mask), it calls the corresponding processing function in the function table. For example, if it's a security intrusion alarm event, it calls the security intrusion processing function, which may include triggering alarm devices or sending alarm information to a remote server. After processing, it clears the flag bit corresponding to the critical event in the event table. Output: The system state after processing the critical event (including possibly changed task execution states, event table states, etc.). This output serves as input to the ordinary event batch processing unit, used to continue processing ordinary events after the critical event processing.
[0038] An event table is a collection of various event information within a system, while a critical event bitmask is a data structure used to mark critical events. By scanning this mask, critical events can be quickly located, and their characteristics can be further analyzed to determine the appropriate handling method.
[0039] Preferably, the process of scanning the key event bitmask in the event table includes: extracting feature information related to key events from the event table. For the key event bitmask, it focuses on the state changes of specific positions in the mask, the overall pattern of the mask, etc. For example, certain bits may be associated with key events of specific hardware devices. The state information of these bits and their relationship with adjacent bits are extracted. In a system containing events of multiple hardware devices, such as server systems, network interface devices, storage devices, etc., the key events corresponding to each may have specific bit representations in the mask. These bits are identified and converted into feature vectors that can be used for subsequent analysis. Based on the feature vectors extracted from the features, an attempt is made to find matches in a predefined pattern library. The pattern library is constructed by analyzing and summarizing a large amount of historical key event data, which contains feature patterns of various known key events. For example, for a specific network failure key event, it will present a unique bit combination pattern in the key event bitmask. The currently extracted feature vector is compared with the network failure-related patterns in the pattern library. The comparison process may use various algorithms, such as similarity-based algorithms, to determine whether a match exists by calculating the similarity between the feature vector and each pattern in the pattern library. Based on the pattern matching results, a determination is made regarding key events. If a highly matching pattern is found, the corresponding key event type is identified. If no perfectly matching pattern is found, but the similarity exceeds a certain threshold, a judgment is made based on probability or fuzzy logic to infer the possible key event type. For example, when the similarity reaches 80% or higher, it is considered a certain type of key event, but a credibility index is also provided. If the similarity is extremely low, further analysis may be triggered, such as calling more complex analysis algorithms or combining other event information for a comprehensive judgment.
[0040] The specific process for scanning the critical event bitmask is as follows: First, initialize the scan pointer, positioning it at the starting position of the critical event bitmask in the event table. Simultaneously, initialize relevant parameters to ensure accurate extraction of features related to the critical event bitmask. Starting from the starting position, scan the critical event bitmask. During each bit scan, extract features according to pre-defined rules. For example, if a bit represents the critical event trigger state of a specific hardware device, record the state of that bit (0 or 1) and its logical relationship with the preceding and following bits (e.g., whether multiple consecutive 1s indicate a specific fault state). As the scan progresses, these features are gradually combined into a feature vector. For example, for a 32-bit critical event bitmask, after scanning the first 8 bits, a partial feature vector containing 8 feature values may be obtained. Continue scanning until the 32-bit scan is completed, obtaining the complete feature vector. After the complete feature vector is generated, a matching operation is performed in the pattern library to find the pattern most similar to the feature vector. The critical event type is determined based on the matching results. For example, if a pattern related to hard drive failure is matched, the critical event is determined to be a hard drive failure type, and this information is passed to subsequent processing steps, such as calling the corresponding hard drive failure handling function. After scanning the entire critical event bitmask, if the critical event type is successfully identified, the system will initiate the critical event handling mechanism according to the established procedure, such as interrupting low-priority tasks. If no clear critical event type is identified, the system may scan again or combine other event information for further analysis, depending on the results of the decision module, to ensure that no critical events are missed.
[0041] The ordinary event batch processing unit executes when the critical event scanning and processing unit has not detected any critical events. It processes ordinary events in batches and in an orderly manner, improving the overall system processing efficiency. It receives the system status after the critical event scanning and processing unit has processed critical events, as well as the ordinary event status from the event table. First, it aggregates similar ordinary events according to an intelligent strategy; for example, it aggregates environmental data acquisition events from multiple different sensors into a single environmental data acquisition task set. Then, it intelligently schedules and adjusts the priorities of the aggregated tasks based on their characteristics (such as data processing complexity and real-time requirements). For environmental data acquisition tasks with high real-time requirements, its priority is appropriately increased. Afterward, it executes the processing functions in the function table according to the adjusted priority order. For example, for the environmental data acquisition task set, it sequentially calls the data processing functions corresponding to each sensor to perform data calibration, filtering, and other operations. Finally, it outputs the system status after processing the ordinary events, serving as input to the adaptive low-power management unit and the dynamic task expansion and hot-swappable support unit, providing subsequent units with the latest system status information.
[0042] The adaptive low-power management unit further includes the following units:
[0043] The system status monitoring unit continuously monitors the system's operating status, providing data for power consumption adjustment. It receives system status output from the hierarchical event polling and priority processing unit, including current task execution status (e.g., number and type of tasks currently executing) and resource usage (e.g., CPU utilization and memory usage). It periodically collects data such as CPU utilization and memory usage, for example, every 100ms. Simultaneously, it analyzes the number and type of tasks in the task queue to determine the current system load. If there are more than five complex data processing tasks in the task queue, the system is considered to be under high load. It outputs real-time system operating status data as input to the power consumption strategy decision unit, providing it with the information needed to formulate power consumption adjustment strategies.
[0044] The power consumption strategy decision unit formulates appropriate power consumption adjustment strategies based on data provided by the system status monitoring unit. It receives real-time system operating status data from the system status monitoring unit. When the system is under low load (e.g., CPU utilization below 30% and fewer than 3 tasks in the task queue), it determines that it can enter a low-power mode, selects deep sleep mode, shuts down some non-critical hardware modules (e.g., wireless communication modules can be shut down if communication is not needed for a short period), and reduces the CPU operating frequency to 50% of its original frequency. When the system is under high load (e.g., CPU utilization above 70% and multiple complex computing tasks in the task queue), it determines that high-performance operation needs to be maintained, keeping the current hardware module operating status and CPU operating frequency. When the system is under medium load, it selects a lightweight energy-saving strategy, such as appropriately reducing the operating voltage of some hardware modules (e.g., reducing the sensor power supply voltage by 10%), to reduce power consumption without affecting system performance. It outputs a power consumption adjustment strategy instruction, which serves as input to the power consumption execution control unit to guide the actual power consumption adjustment operation.
[0045] The power consumption execution control unit executes hardware and software-level power adjustment operations based on the instructions output by the power consumption strategy decision unit. It receives power adjustment strategy instructions from the power consumption strategy decision unit; if the instruction is to enter deep sleep mode, it sends a shutdown signal to the wireless communication module through the hardware control interface, and simultaneously reduces the CPU operating frequency to a set value using the CPU control register. For instructions to reduce the sensor supply voltage in lightweight energy-saving strategies, it adjusts the sensor supply voltage through the power management chip. At the software level, it adjusts the task scheduling algorithm to reduce unnecessary task wake-ups in low-power mode, for example, doubling the wake-up interval of periodic tasks. It outputs the system status after power consumption adjustment and feeds it back to the system status monitoring unit so that it can continuously monitor the adjusted system operating status.
[0046] The dynamic task extension and hot-swap support unit further includes the following units:
[0047] The task extension request parsing unit receives task extension requests sent by external devices or other system modules, parses them, and determines the specific content and requirements of the request. Externally sent task extension request signals may contain information such as task type, task priority, and required resources. The unit decodes the request signal to extract key information such as task type (e.g., whether it is a new sensor data processing task), task priority (represented by a specific priority code), and required resources (e.g., memory space size, estimated CPU processing time). For example, for a new image recognition task request, the parsed task type is image recognition, the priority is medium, and the estimated required memory space is 10MB and CPU processing time is 500ms. The parsed task extension request information is output as input to the resource evaluation and allocation unit, providing it with a basis for resource evaluation and allocation.
[0048] Resource Assessment and Allocation Unit: Based on the information provided by the Task Extension Request Parsing Unit, this unit assesses whether the system currently has sufficient resources to support the new task and performs reasonable resource allocation. It receives the parsed task extension request information from the Task Extension Request Parsing Unit and the current system resource status information (such as available memory, remaining CPU processing power, etc.) provided by the System Status Monitoring Unit. It compares the resources required by the new task (such as memory, CPU processing time) with the currently available system resources. If the available memory is greater than the memory required by the new task, and the remaining CPU processing power can meet the processing time requirements of the new task, then the system is deemed to have sufficient resources to support the new task. Then, based on task priority, resources are allocated to high-priority tasks first. For example, for a high-priority new task, contiguous, high-performance memory space is allocated first, while reserving sufficient CPU time slices. If system resources are insufficient, a resource shortage warning is returned to the task extension request sender. The resource allocation result (including whether resource allocation was successful, specific resource information, etc.) is output as input to the Task Loading and Initialization Unit to determine whether the new task can be loaded and how to perform initialization operations; if resources are insufficient, a resource shortage warning is returned to the task extension request sender.
[0049] The task loading and initialization unit, after the resource evaluation and allocation unit successfully allocates resources, is responsible for loading new tasks into the system and initializing them to ensure their normal operation. It receives the resource allocation success result and specific resource information from the resource evaluation and allocation unit, as well as the new task's program code and configuration parameters. First, based on the allocated memory address, it loads the new task's program code into the designated memory area. Then, based on the task's configuration parameters, it initializes the task's runtime environment, such as setting the task's execution priority and initializing the register values required by the task. For tasks that need to interact with external devices, it also needs to initialize the corresponding device drivers; for example, a new sensor data processing task requires initializing the corresponding sensor driver and setting parameters such as the sensor's sampling frequency and data transmission format. After initialization, the new task is added to the task queue and awaits system scheduling and execution according to priority. It outputs the status information of the loaded and initialized new task and feeds it back to the hierarchical event polling and priority processing unit, enabling it to incorporate the new task into the system's task management and event processing flow.
[0050] The hot-swappable device detection and processing unit monitors hot-swappable events in the system in real time. When a device is detected being inserted or removed, it performs corresponding processing to ensure system stability and compatibility. It receives device insertion / removal detection signals from the hardware layer, which contain information such as device type and insertion / removal action (insertion or removal). When a device is detected being inserted, it first obtains detailed information about the inserted device, such as device model and functional characteristics, through a device identification protocol. Then, based on the device type, it locates and loads the corresponding driver into the system. For example, if a new USB storage device is inserted, the system locates and loads the USB storage device driver. For tasks that may be generated by the new device, it converts them into task extension requests and sends them to the task extension request parsing unit for processing. When a device is detected being removed, it first stops all tasks related to that device, releases the resources allocated to these tasks, and then unloads the corresponding device driver, ensuring the proper reclamation of system resources. It outputs system status information after device insertion / removal processing and feeds it back to the hierarchical event polling and priority processing unit and the system status monitoring unit, so that the system can adjust its task management and operational status monitoring strategies in a timely manner.
[0051] The technical effects of this invention are multifaceted, as detailed below.
[0052] Improving system response performance: A hierarchical event polling and priority processing mechanism ensures that critical events are processed immediately, reducing response latency for critical business operations and improving the overall real-time performance of the system. Meanwhile, intelligent handling of ordinary events ensures efficient allocation of system resources, preventing the processing of a large number of ordinary events from impacting the response to critical events.
[0053] Achieving high efficiency and energy saving: The adaptive power consumption adjustment strategy adjusts power consumption in real time according to the system load, effectively reducing power consumption without affecting system performance. For example, reducing the operating voltage of some hardware modules under medium load and entering deep sleep mode under low load can significantly reduce system energy consumption, extend device battery life, or reduce energy consumption costs.
[0054] Enhanced system scalability and compatibility: Dynamic task expansion and hot-swapping support mechanisms enable the system to quickly adapt to the addition of new tasks and devices. Whether it is a new task request or a device hot-swapping event, the system can handle it in an orderly manner, including resource assessment and allocation, task loading and initialization, device driver processing, etc., improving the system's versatility and flexibility, and facilitating functional expansion and device upgrades in different scenarios.
[0055] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0056] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A task processing system based on intelligent Internet of Things (IoT) devices, characterized in that, The system includes: The system initialization and task table dynamic construction unit is used to initialize and configure the hardware and protocol stack, and create task tables, event tables, and function tables. The event table records the task event status in bitmask form, records a timestamp for each event, and assigns a priority weight. It predefines core tasks and assigns fixed event masks and dynamic priority adjustment and recovery strategies, outputting the system environment with the initialization completed and the task table built. The function table has intelligent binding function, which can automatically associate the corresponding processing functions according to the characteristics of the task and the event type. The hierarchical event polling and priority processing unit receives the system environment and event status in the event table output by the system initialization and task table dynamic construction unit, and classifies and processes events according to the priority of the tasks. In each loop, the hierarchical event polling and priority processing unit first scans for critical events. If a critical event exists, it interrupts the current low-priority task and saves the context information. After determining the type of critical event, it calls the corresponding processing function and clears the event flag after processing. If there are no critical events, it processes ordinary events in batches and outputs the system status after processing. The hierarchical event polling and priority processing unit includes a critical event scanning and processing unit and a general event batch processing unit. The critical event scanning and processing unit receives the system environment and event status in the event table output by the system initialization and task table dynamic construction unit. It scans the critical event bitmask in the event table. If a critical event is detected, it interrupts the currently executing low-priority task, saves the task's current register state, program counter value, and context information to a dedicated memory area pre-allocated by the system for storing task context information, calls the corresponding processing function in the function table according to the critical event type, and clears the flag bit corresponding to the critical event in the event table after processing. The general event batch processing unit processes general events in batches and in an ordered manner when the critical event scanning and processing unit does not detect a critical event. The adaptive low-power management unit adjusts the system's power consumption state based on the system state output by the hierarchical event polling and priority processing unit, thereby reducing system energy consumption. The dynamic task extension and hot-swap support unit identifies the device based on its type and communication protocol when a new device access signal is detected, assigns it corresponding tasks and resources, and adds the new task to the event table and function table.
2. The task processing system based on intelligent Internet of Things devices as described in claim 1, characterized in that, The hierarchical event polling and priority processing unit includes a critical event processing subunit and an event classification subunit. The critical event processing subunit continuously monitors whether there is a critical event flag. When the event classification subunit identifies an event as a critical event, it sets the critical event flag and notifies the critical event processing subunit that there is a critical event that needs to be processed.
3. The task processing system based on intelligent Internet of Things devices as described in claim 2, characterized in that, When a critical event needs to be handled, the critical event handling subunit further analyzes the critical event to determine its specific type. Based on the type of critical event and according to the pre-defined correspondence, it calls the handling function for that type of critical event. Once the handling function for the critical event has finished executing, the critical event handling subunit clears the critical event flag.
4. The task processing system based on intelligent Internet of Things devices as described in claim 3, characterized in that, The process of scanning the key event bitmask in the event table includes: initializing the scan pointer and positioning it at the starting position of the key event bitmask in the event table; scanning the key event bitmask from the starting position; extracting features according to pre-set rules during each scan; combining the extracted features into a feature vector as the scan progresses; searching for the most similar pattern to the feature vector in the pattern library; and determining the key event type based on the matching result.
5. A task processing system based on a smart Internet of Things device as described in claim 4, characterized in that, The adaptive low-power management unit includes the following units: The system status monitoring unit receives the system status output from the hierarchical event polling and priority processing unit, analyzes the number and type of tasks in the task queue, determines the current system load, and outputs real-time system operating status data. The power consumption strategy decision unit receives real-time system operating status data output by the system status monitoring unit. When the system is in a low-load state, it determines that it can enter a low-power mode and selects a deep sleep mode. When the system is under high load, it is determined that high-performance operation is required. The power consumption execution control unit receives power consumption adjustment strategy instructions output by the power consumption strategy decision unit. If the instruction is to enter deep sleep mode, it sends a shutdown signal to the wireless communication module through the hardware control interface to reduce the CPU operating frequency to the set value.
6. A task processing system based on a smart Internet of Things device as described in claim 5, characterized in that, The dynamic task extension and hot-swap support unit includes: The task extension request parsing unit receives task extension requests sent by external devices or other modules of the system, parses them, and determines the specific content and requirements of the request. Resource assessment and allocation unit: Based on the information provided by the task extension request parsing unit, assesses whether the system currently has sufficient resources to support the new task and performs resource allocation; The task loading and initialization unit loads the new task into the system and performs initialization settings after the resource evaluation and allocation unit successfully allocates resources.
7. A task processing system based on a smart Internet of Things device as described in claim 6, characterized in that, The dynamic task extension and hot-swap support unit also includes: The hot-swappable device detection and processing unit receives device insertion and removal detection signals from the hardware layer. When a device is detected to be inserted, it obtains information about the inserted device through the device identification protocol, finds the corresponding driver according to the device type, and loads it into the system. When a device is detected to be removed, it stops all tasks related to the device, releases the resources allocated to these tasks, and then uninstalls the corresponding device driver.
Citation Information
Patent Citations
Event-driven embedded software architecture implementation method and system
CN121029368A
Task scheduling and resource management system and method
CN121116518A