Programmable remote control system and method for combined robot

By introducing the MicroPython environment and modular driver management into the modular robot control platform, intelligent peripheral adaptation, secure script updates, and battery status monitoring are achieved. This solves the problems of insufficient program flexibility and insufficient device status awareness in existing technologies, improves the system's task execution efficiency and battery management capabilities, and ensures the stability and reliability of robot control.

CN121900281APending Publication Date: 2026-04-21SHANGHAI GUOFAN TECH
View PDF 8 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI GUOFAN TECH
Filing Date
2026-03-25
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing modular robot control platforms suffer from insufficient program flexibility, poor reliability of remote updates, weak platform scalability, and inadequate equipment status awareness, resulting in problems such as low task switching efficiency, difficulty in multi-task concurrent processing, and inability to provide real-time feedback on battery status.

Method used

Using the MicroPython runtime environment, a programmable remote control system is built, including a main control processing module, a script update module, an asynchronous task scheduling module, and a coprocessor management module. This enables intelligent peripheral adaptation, secure remote script updates, hierarchical coprocessor control, and dynamic scheduling of asynchronous tasks. Combined with battery status monitoring and modular driver management, task priorities and resource quotas are dynamically adjusted.

Benefits of technology

It improves the flexibility and stability of the combined robot control program, realizes the high efficiency of multi-task collaborative execution and real-time monitoring of battery status, ensures the safety and reliability of the system, and supports rapid deployment, flexible expansion and multi-functional collaborative operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121900281A_ABST
    Figure CN121900281A_ABST
Patent Text Reader

Abstract

The invention provides a programmable remote control system and method for a combined robot, and relates to the technical field of electric digital data processing, and the programmable remote control system comprises a main control processing module, a script updating module, a coprocessor management module and an asynchronous task scheduling module; the main control processing module carries out adaptive configuration and resource management on the peripheral interface of the target main control chip; the script updating module executes integrity verification on the issued data, if the integrity verification is passed, the issued data is analyzed to generate a control script, the control script is written into a cache region, the control script is switched to a target execution script in a script starting stage and transmitted to a target main control chip, and if the integrity verification is not passed, security backspacing control is executed; the coprocessor management module executes communication time sequence dynamic adjustment of the universal serial communication interface based on the real-time communication state and the link quality; and the asynchronous task scheduling module dynamically adjusts the scheduling priority of each task and concurrently executes the multifunctional collaborative task of the combined robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic digital data processing technology, and in particular to a programmable remote control system and method for modular robots. Background Technology

[0002] With the widespread application of modular robots, related control platforms not only need to implement basic control and interaction functions, but also must support rapid switching of control logic, flexible expansion of functional modules, and stable feedback of operating status. However, most current robot control solutions still adopt fixed firmware or pre-programmed architectures, which are difficult to meet the above-mentioned diverse needs in practical applications. There is an urgent need for a more flexible, reliable, and scalable control platform to support the complex application scenarios of modular robots.

[0003] For example, the invention patent announcement CN109213306B discloses a robot remote control platform and its design method, which establishes a robot dynamics model to realize the overall force analysis of the robot's mechanical system; uses a sensor system and a robot feedback system to construct the mapping between the operator and the robot in the real world and the virtual world; and uses a tactile sensor to simulate the operation and control of the robot in the real world.

[0004] For example, the invention patent announcement CN113821108B discloses a robot remote control system and control method based on multimodal interaction technology, which includes a master-end multimodal interaction control system for controlling a slave robot system. The master-end multimodal interaction control system includes a master-end microprocessor, an image processing unit, an infrared camera unit, an image display unit, a visual servo control unit, a wireless network communication unit, a voice interaction unit, and a mode selection button. The master-end microprocessor is connected to the image processing unit, the infrared camera unit, the image display unit, the visual servo control unit, the wireless network communication unit, the voice interaction unit, and the mode selection button, respectively.

[0005] This invention reveals that existing technical solutions still suffer from the following major drawbacks: First, insufficient program flexibility, relying on pre-programmed fixed programs, leading to inefficient task switching and logic adjustments; second, poor reliability of remote distribution and updates, easily affected by link interruptions, timeouts, or data loss when transmitting scripts via Bluetooth or serial port, potentially causing update failures or program corruption; third, weak platform expansion and concurrent processing capabilities, often requiring re-adaptation of the underlying program when adding new modules such as sensors or actuators, and traditional blocking processing struggles to balance real-time performance and resource utilization in multi-task concurrent scenarios; finally, insufficient device status awareness, with overly simplistic monitoring of critical operating states such as batteries, failing to provide real-time feedback on remaining capacity, health status, and other information, hindering equipment maintenance and battery life management. Therefore, it is necessary to propose a programmable remote control platform for modular robots to comprehensively improve capabilities in program distribution, module expansion, multi-task operation, and battery status monitoring. Summary of the Invention

[0006] In view of this, embodiments of the present invention provide a programmable remote control system and method for modular robots, which can realize programmable remote control of modular robots based on the MicroPython environment. Through the collaborative cooperation of multiple modules, it can complete intelligent adaptation of peripherals, remote secure update of scripts, hierarchical management and control of coprocessors, and dynamic scheduling of asynchronous tasks. At the same time, it takes into account power consumption optimization, security protection and local interaction, creating a stable, efficient, flexible and scalable integrated remote control system.

[0007] The technical solution of this invention is implemented as follows: This application provides a programmable remote control system for a modular robot. The system includes: a main control processing module, a script update module, an asynchronous task scheduling module, and a coprocessor management module. The main control processing module is equipped with a MicroPython runtime environment for adapting, configuring, and managing the peripheral interfaces of the target main control chip. The target main control chip is a control chip equipped with the main control processing module. The peripheral interfaces include a general-purpose serial communication interface, a general-purpose input / output interface, and a storage peripheral interface. The script update module receives data remotely sent from a host computer and performs integrity checks on the sent data. Integrity checks include frame header recognition, length parsing, verification comparison, and frame... The system includes tail confirmation and timeout checks. If the integrity check passes, the data is parsed and a control script is generated and written to the buffer. During the script startup phase, the system switches to the target execution script and transmits it to the target main control chip. If the integrity check fails, a safety rollback control is executed. The coprocessor management module is used to dynamically adjust the communication timing of the general serial communication interface based on the real-time communication status and link quality to achieve data interaction between the main control processing module and each coprocessor. The asynchronous task scheduling module is used to dynamically adjust the scheduling priority of each task based on the control logic of the main control processing module, the interaction data of the coprocessor management module, and the running status of each functional module, and concurrently execute the multi-functional collaborative tasks of the combined robot.

[0008] This invention also provides a programmable remote control method for a modular robot. This method is applied to a programmable remote control system for a modular robot and includes: adapting and configuring the peripheral interfaces of a target main control chip and managing its resources. The target main control chip is a control chip equipped with a main control processing module. The peripheral interfaces include a universal serial communication interface, a universal input / output interface, and a storage peripheral interface; receiving data remotely sent from a host computer and performing integrity verification on the sent data. Integrity verification includes frame header identification, length parsing, verification comparison, frame tail confirmation, and timeout judgment. If the integrity verification passes, the sent data is parsed to generate a control script, which is written to a buffer. During the script startup phase, the target execution script is switched and transmitted to the target main control chip. If the integrity verification fails, a safety rollback control is executed; dynamically adjusting the communication timing of the universal serial communication interface based on real-time communication status and link quality to achieve data interaction between the main control processing module and each coprocessor; and dynamically adjusting the scheduling priority of each task based on the control logic of the main control processing module, the interaction data of the coprocessor management module, and the operating status of each functional module, concurrently executing the multi-functional collaborative tasks of the modular robot.

[0009] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: 1. By porting the MicroPython runtime environment to the programmable remote control system of the modular robot, completing the dynamic adaptation of peripheral interfaces and resource conflict remapping, constructing a remote script distribution, integrity verification and security rollback mechanism, adopting a "main controller + coprocessor" hierarchical control and dynamically adjusting the communication timing, building a unified asynchronous scheduling core to realize dynamic adjustment of task priorities, establishing a modular drive and multimedia full lifecycle management solution, integrating AI vision and touch screen local interaction modules, realizing full-dimensional battery status monitoring, health assessment and dynamic adjustment of system power consumption, thereby effectively improving the flexibility of control program deployment, real-time performance and stability of system operation, functional module expansion compatibility, peripheral driver adaptability, human-machine interaction experience and battery power supply safety, and ultimately realizing rapid deployment, stable operation, flexible expansion, intelligent perception, secure updates, efficient multi-task collaboration and reliable operation in all scenarios for the modular robot control logic.

[0010] 2. By pre-constructing a unified asynchronous scheduling core, defining task classification and priority rules according to business scenarios, assigning identifiers to tasks and mapping initial priorities and resource quotas, and monitoring system operation, peripheral device and battery status in real time to calculate adjustment factors, dynamically adjusting the priorities and resource quotas of various tasks in a hierarchical manner, and using a combination of time-slice round-robin and preemptive scheduling to execute tasks while ensuring synchronization mutual exclusion and exception fault tolerance, the system prioritizes the execution of core control and safety tasks, improves the efficiency of multi-task concurrency, the system's real-time response capability and resource utilization, and ultimately achieves stable, efficient and orderly concurrent execution of multi-functional collaborative tasks of modular robots.

[0011] 3. By terminating the update process, locking the cache, and recording exception logs when the script integrity verification fails, a safe switch is performed after a second verification of the historical valid scripts. If the historical script is abnormal, a safety backup script is loaded. After rollback, the exception information is reported synchronously and log queries are enabled. This avoids the robot from going out of control due to script update failure, ensuring that the robot is always in a safe and controllable state. It also makes it easy for users to quickly troubleshoot update failures, thereby achieving a safety backup, stable operation, and traceability of exceptions for remote updates of combined robot control scripts. Attached Figure Description

[0012] Figure 1 This is a schematic diagram of the structure of a programmable remote control system for a modular robot provided in an embodiment of the present invention; Figure 2 This is a flowchart of a programmable remote control method for a modular robot provided in an embodiment of the present invention. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0014] This invention provides a programmable remote control system for a modular robot. For example... Figure 1 The schematic diagram of the programmable remote control system for a modular robot shown includes: a main control processing module, a script update module, an asynchronous task scheduling module, and a coprocessor management module. The main control processing module is communicatively connected to the script update module, the asynchronous task scheduling module, and the coprocessor management module. The asynchronous task scheduling module is also communicatively connected to the coprocessor management module. The main control processing module is equipped with a MicroPython runtime environment for adapting, configuring, and managing the peripheral interfaces of the target main control chip. The target main control chip is a control chip equipped with the main control processing module. The peripheral interfaces include a general serial communication interface, a general input / output interface, and a storage peripheral interface. The general serial communication interface includes UART, SPI, USB, I2C, and I2S interfaces, with at least several reserved UART interfaces for connecting to the coprocessor. The general input / output interface includes an analog input interface (ADC) and a GPIO interface for compatibility with user sensor devices. The storage peripheral interface includes a Flash interface. The script update module receives data remotely sent from the host computer and performs integrity checks on the sent data. The integrity checks include frame header recognition, length parsing, checksum comparison, frame tail confirmation, and timeout judgment. If the integrity check passes, the transmitted data is parsed to generate a control script, which is then written to the buffer. During the script startup phase, the system switches to the target execution script and transmits it to the target main control chip. If the integrity check fails, a safety rollback control is executed. The coprocessor management module is used to build a hierarchical control architecture of "main control + coprocessor," managing multiple microcontroller-based coprocessors. It dynamically adjusts the communication timing of the general serial communication interface based on real-time communication status and link quality to achieve data interaction between the main control processing module and each coprocessor. The asynchronous task scheduling module is used to build a unified asynchronous scheduling core, based on the control logic of the main control processing module. The system manages the interaction data of the coprocessor module and the operating status of each functional module, dynamically adjusts the scheduling priority of each task, and concurrently executes the multi-functional collaborative tasks of the combined robot. The system also includes an AI vision module and a touch screen interaction module that are respectively connected to the main control processing module. The AI ​​vision module is an independently set vision processing unit used to receive instructions from the main control processing module, perform image acquisition, visual recognition and tracking processing, and return the processing results to the main control processing module. The touch screen interaction module communicates with the main control processing module to realize local human-machine interaction of the robot, as well as the display of operating status and perception data.

[0015] This invention integrates a main control processing module, a script update module, an asynchronous task scheduling module, and a coprocessor management module, along with an AI vision module and a touchscreen interaction module. This achieves comprehensive technical effects, including programmable control of modular robots, remote script updates, multi-coprocessor collaborative management, concurrent execution of multi-functional tasks, and integrated AI visual perception and local human-machine interaction. It effectively solves the problems of disordered task scheduling and low efficiency in multi-task execution in traditional control systems, significantly improving the system's task processing efficiency and operational stability. Simultaneously, the independently configured AI vision module can respond to instructions from the main control processing module to complete image acquisition, visual recognition, and tracking processing, and provide feedback on the processing results. The touchscreen interaction module enables local human-machine interaction and real-time display of the robot's operating status and perception data, further endowing the system with comprehensive AI visual perception and local visualization interaction capabilities. Overall, this system possesses strong adaptability, programmability and remote upgradeability, multi-coprocessor collaborative management, efficient concurrent multi-task execution, and integrated perception and interaction, fully meeting the modular, multi-functional, and expandable remote programmable control requirements of modular robots.

[0016] The system also includes a modular driver and multimedia management module. This module performs unified driver adaptation, registration, loading, and configuration management for Bluetooth, audio modules, and various peripherals. It also drives the audio module via a universal serial communication interface to achieve standardized audio output and performs full lifecycle peripheral configuration management based on device tree descriptors and peripheral hot-plug states. Specifically, the modular driver and multimedia management module implements these functions in the following way: S201, a standardized driver library compatible with the MicroPython runtime environment is pre-built. This standardized driver library generates various peripherals with device identifiers, peripheral interface attributes, driver dependencies, configuration parameters, and communication interfaces. The system uses a device tree descriptor for the communication protocol to establish a mapping relationship between peripheral models and corresponding drivers. In step S202, it monitors the peripheral access status of various peripheral interfaces on the main control processing module in real time. When a new peripheral is detected, it reads the peripheral's device identifier, matches the corresponding device tree descriptor and standardized driver, and performs automatic driver registration and loading. This completes the automatic adaptation of the corresponding peripheral interface's pin configuration, communication timing, and interrupt mechanism. In step S203, during peripheral operation, it collects peripheral operating status, communication link quality, and anomaly feedback information according to a preset cycle, quantifies core indicators, and performs dynamic parameter adjustment and disconnection management based on these core indicators. The parameters for dynamic adjustment and disconnection management include peripheral drivers. The system dynamically configures the parameters and corresponding peripheral interface communication control parameters. The specific adjustment steps are as follows: S2031, if the data packet transmission success rate is greater than or equal to the preset high-quality link threshold, and the bit error rate and single communication response latency are both better than the preset optimal standard, then within the hardware security parameter boundaries of the corresponding peripheral interface, the communication interface parameters and interface operating mode are adaptively optimized, the link quality flag in the driver configuration parameters is updated synchronously, and the full-function operating mode of the driver is maintained; S2032, if the data packet transmission success rate is within the preset normal link range, and the bit error rate and retransmission trigger frequency are both within the preset normal threshold range, then the current peripheral driver configuration parameters and corresponding peripheral interface communication control parameters are maintained. The communication control parameters of the port remain unchanged, and the changes in link quality and peripheral operating status are continuously monitored. The preset normal link range is the numerical range formed by the preset lower limit threshold of the normal link and the preset high-quality link threshold. S2033, if the data packet transmission and reception success rate is within the preset poor link range, or the bit error rate and retransmission trigger frequency exceed the preset alarm threshold, then within the hardware security parameter boundary of the corresponding peripheral interface, the performance parameters of the communication link are adaptively reduced, the fault tolerance capability is improved, the fault tolerance configuration parameters of the driver are optimized simultaneously, and the data retransmission verification and abnormal packet replenishment mechanism are enabled. The preset poor link range is the numerical range formed by the preset link critical threshold and the preset lower limit threshold of the normal link.S2034, If the frequency of peripheral error reports exceeds the preset fault threshold, or the single communication response delay exceeds the preset maximum timeout threshold, and the device fails to return to normal operation for multiple consecutive monitoring cycles, the driver abnormality reset procedure is immediately triggered. The driver configuration parameters of the peripheral and the communication control parameters of the corresponding peripheral interface are reset to their initial default values, and the initial configuration of the peripheral and its interface is re-completed. If normal operation cannot be restored after the reset, a peripheral operation abnormality alarm is reported to the host computer and the touchscreen interaction module, and the signal output of the corresponding peripheral interface is simultaneously disabled. S2035, During monitoring, if it is detected that the peripheral communication link is continuously interrupted for more than the preset disconnection judgment time, or if the hardware access status of the peripheral interface changes... When a disconnection occurs, the peripheral device is determined to be disconnected. The corresponding peripheral device's driver execution task is immediately terminated, data transmission and reception on the corresponding peripheral device interface are stopped, and the corresponding driver is deregistered, memory resources are released, and hardware resources on the peripheral device interface are reset and released. The peripheral device access status table and driver loading list are updated synchronously, completing closed-loop management of the peripheral device's entire lifecycle. S204, based on a standardized audio output framework, receives audio output commands from the main control processing module, decodes, converts, and adjusts the gain of the audio data, and transmits the processed audio data to the audio module via the I2S interface in the universal serial communication interface. Simultaneously, it performs real-time monitoring and fault tolerance handling of the audio playback status, ensuring the stability of audio output across all scenarios.

[0017] This invention, through the addition of modular drivers and multimedia management modules, achieves unified driver adaptation, registration and loading, dynamic control, and full lifecycle management for Bluetooth, audio modules, and various peripherals. It also achieves standardized audio output, significantly improving the system's compatibility, flexibility, stability, and intelligent management capabilities. The invention employs tiered adaptive control based on different link qualities and fault levels. Under high-quality links, it optimizes communication interfaces and driver parameters to improve transmission performance; under normal links, it maintains stable operation and continuous monitoring; under low-quality links, it reduces performance parameters, improves fault tolerance, and enables retransmission verification and abnormal packet replacement mechanisms. In case of abnormal faults, it triggers driver reset and reinitialization; if the reset fails, it reports an alarm and closes the corresponding interface. When a peripheral disconnects, it automatically terminates the driver task, unregisters the driver, releases memory and hardware resources, and updates the peripheral status. The system establishes a status list, forming a closed-loop management system covering the entire lifecycle from peripheral access, stable operation, dynamic optimization, fault self-healing to disconnection and deregistration. This ensures the reliability and anti-interference capability of peripheral communication, while also achieving efficient utilization and dynamic release of system hardware resources, preventing peripheral malfunctions from affecting the overall system operation. Simultaneously, relying on a standardized audio output framework, the system decodes, converts, adjusts gain, and stably transmits audio data via the I2S interface, and monitors audio playback status in real time with fault tolerance. This achieves stable and standardized audio output across all scenarios, further enhancing the system's multimedia interaction capabilities. The resulting control system boasts greater practicality and reliability in modular expansion, intelligent peripheral management, fault tolerance and self-healing, and multimedia interaction, better meeting the complex application requirements of modular robots for multi-peripheral access, flexible expansion, and stable operation.

[0018] The system also includes a battery status monitoring module, which communicates with the fuel gauge chip via an external interface to collect comprehensive battery status data, complete battery health status assessment, provide battery status information and assessment results to the host computer or touch screen interaction module, and perform dynamic power consumption adjustment and charge / discharge safety management based on the comprehensive battery status data. The battery status monitoring module specifically achieves the above functions in the following way: S301, according to a preset sampling period, it reads the raw battery data collected by the fuel gauge chip in real time through the corresponding external interface, performs filtering calibration and outlier removal on the raw data, generates standardized comprehensive battery status data, and synchronously updates the battery status database. The raw battery data includes the actual full charge capacity. The battery's measured DC internal resistance and cycle count are calculated as follows: S302, the difference between the battery's factory-specified initial rated capacity and its actual full-charge capacity, expressed as the percentage of the initial rated capacity, is recorded as the battery's capacity decay rate; the difference between the battery's measured DC internal resistance and its factory-specified initial nominal DC internal resistance under standard operating conditions, expressed as the percentage of the initial nominal DC internal resistance, is recorded as the battery's internal resistance change rate. Predefined weighting coefficients are used for the capacity decay rate, internal resistance change rate, and cycle count. A battery health score is calculated by weighting these factors, and a battery health status grading assessment is performed according to preset health level classification rules, generating a battery health assessment report. The health level classification rules are as follows: Health Rating... A battery rating between 85-100 is considered healthy, 60-84 is sub-healthy, 30-59 is deteriorated, and below 30 is considered failed. S303: The battery's full-dimensional status data and health status assessment results are synchronized in real-time to the main control processing module, asynchronous task scheduling module, and touchscreen interaction module. The asynchronous task scheduling module predefines the battery remaining capacity threshold range, battery health score threshold range, initial priority of each type of task, baseline power consumption quota, and adjustment rules. Based on the battery remaining capacity and battery health score, it dynamically adjusts the scheduling priority and power consumption quota of each task. Specifically, S3031: Obtain the current battery remaining capacity and battery health score. The battery remaining capacity is the battery's... The percentage of the current remaining capacity to the actual full charge capacity after calibration in step S3021 is used to determine the battery health score, which is the score value within the range of 0-100 calculated in step S3023. In step S3032, if the remaining battery capacity is greater than or equal to the preset high power baseline limit, it indicates that the current battery power is sufficient and the power supply capacity is adequate. The highest priority and baseline power consumption quota of real-time control tasks are maintained unchanged. The priority of vision processing and data acquisition tasks are maintained within the preset normal working priority range, and their power consumption quota is increased to the preset power consumption limit value. The priority of human-computer interaction and background operation and maintenance tasks are maintained at the initial priority, and their normal power consumption quota is not restricted to ensure the normal operation of the robot's full functions.S3033, if the remaining battery capacity is within the preset normal power baseline range, it indicates that the current battery power is within the normal working range and can stably support the robot's normal operation. The preset normal power baseline range is a left-closed and right-open interval formed by the preset normal power baseline lower limit and the preset high power baseline upper limit. The highest priority and baseline power consumption quota of real-time control tasks remain unchanged; the normal priority and baseline power consumption quota of vision processing and data acquisition tasks remain unchanged, and current limiting is only performed when instantaneous peak power consumption occurs; the priority and power consumption quota of human-computer interaction tasks remain unchanged, and the execution cycle of non-urgent background maintenance tasks is extended to limit their unnecessary power output. S3034: If the remaining battery capacity is within the preset low battery baseline range, it indicates that the current battery power is low. Priority should be given to ensuring the power supply and operation of core control functions. The preset low battery baseline range is a left-closed, right-open interval formed by the preset low battery critical threshold and the preset normal battery baseline lower limit. Real-time control tasks are locked and elevated to the highest priority to ensure their baseline power consumption quota is not limited. The priority of visual processing and data acquisition tasks is lowered by 1-2 levels, reducing their power consumption quota to the preset low-power mode upper limit, and unnecessary visual recognition and high-frequency data acquisition functions are disabled. The priority of human-computer interaction tasks is lowered, limiting screen brightness, audio output, and other non-functional functions. Necessary power consumption; suspend the execution of non-urgent background maintenance tasks to release computing and power resources; S3035, if the remaining battery capacity is less than the preset low battery threshold, it indicates that the current battery level is in a critical alarm state. Priority should be given to ensuring the robot's safety and controllability, locking real-time control tasks as the sole highest priority, retaining only the core tasks of basic robot motion control, safety protection, and status reporting, and ensuring their minimum necessary power consumption quota; suspend the execution of all non-safety-related tasks in vision processing and data acquisition; disable unnecessary display and audio functions for human-machine interaction, retaining only the low battery alarm prompt; terminate the execution of all background maintenance tasks, comprehensively restricting non-core functions. S3036: Within any of the above-mentioned power ranges, if the battery health score is less than or equal to the preset degradation level benchmark upper limit, it indicates that the battery itself has experienced significant performance degradation, with a decrease in high-rate charge / discharge capability and power supply stability. Based on the adjustment rules for the corresponding power range, the priority and power consumption quota of real-time control tasks remain unchanged; the peak power consumption quota upper limit of vision processing and data acquisition tasks is further reduced to limit instantaneous high-load output; the execution interval of non-urgent tasks is extended to avoid power consumption spikes caused by multi-task concurrency and ensure the stability of battery power supply; the preset degradation level benchmark upper limit is consistent with the threshold of the health level classification rules in step S3024.S3037, Within any of the above-mentioned power ranges, if the battery health score is less than the preset failure-level critical threshold, it indicates that the battery has severely deteriorated and poses a risk to power supply safety. Immediately, the priority of all non-safety control tasks is lowered to the lowest level, and the execution of all unnecessary functions is suspended. Only the core tasks of battery status monitoring, emergency shutdown control, and fault reporting are retained. Simultaneously, a severe battery fault alarm is reported to the main control processing module, the touchscreen interaction module, and the host computer. The preset failure-level critical threshold is consistent with the threshold in the health level classification rules in step S3024. S3038, The main control processing module... Based on the battery's remaining capacity, battery health score, and priority power consumption adjustment results, the system adaptively switches between operating modes. These modes include full-function normal mode, regular energy-saving mode, low-power protection mode, and emergency safety mode. The S304 monitors the battery's charging / discharging status, voltage, current, and temperature parameters in real time, and presets multiple safety thresholds. When a parameter exceeds the corresponding safety threshold, the corresponding level of safety protection mechanism is immediately triggered, including current limiting in the charging / discharging circuit, charging / discharging pause, forced system power consumption degradation, and emergency shutdown warning. The abnormal information is also reported to the host computer and touchscreen interaction module in real time.

[0019] This invention, by adding a battery status monitoring module, achieves comprehensive battery status acquisition, accurate health assessment, hierarchical dynamic adjustment of system power consumption, and safe management of the entire charging and discharging process. It forms a complete closed loop from power supply perception, performance evaluation, intelligent energy saving to safety protection, significantly improving the endurance, power supply stability, and overall operational safety of modular robots during mobile operation. The system possesses outstanding advantages such as monitorable battery status, assessable health level, adaptive power consumption strategy, and controllable power supply safety, better meeting the power supply management needs of modular robots for modular, mobile, and long-term stable operation.

[0020] The main control processing module performs the following steps for adapting, configuring, and managing the peripheral interfaces of the target main control chip: S401, pre-constructing an interface hardware abstraction layer adapted to the MicroPython runtime environment, encapsulating the underlying registers and driver interfaces of the target main control chip, and establishing a mapping relationship between peripheral interface types and underlying drivers; S402, obtaining the hardware manual parameters of the target main control chip, user-defined interface configuration parameters, and hardware parameters and communication protocol specifications of the connected peripherals, and performing dynamic adaptation configuration of the corresponding peripheral interfaces based on the peripheral interface type, peripheral hardware parameters, communication protocol specifications, and user-defined configuration parameters. Specifically, S4021, identifying the type of the target peripheral interface, where the type is... Universal serial communication interface, universal input / output interface, or storage peripheral interface; S4022, if the user-defined interface configuration parameters are complete and conform to the safety range of the parameters in the target main control chip hardware manual, it indicates that the user configuration is clear and compliant, and the user-defined interface configuration parameters are used as the initial configuration; S4023, if the user-defined interface configuration parameters are incomplete or exceed the safety range of the parameters in the target main control chip hardware manual, it indicates that the user configuration is missing or has risks. Based on the hardware parameters and communication protocol specifications of the access peripheral, combined with the recommended range of the parameters in the target main control chip hardware manual, a compliant initial configuration is generated; S403, based on the determined initial configuration, specific procedures are performed for different types of peripheral interfaces. The body parameter configuration steps are as follows: S4031, for the general serial communication interface, perform the following configuration: If the communication protocol specification of the connected peripheral explicitly specifies the data bit, stop bit, and parity bit parameters, it indicates that the peripheral communication format is fixed, and the specified parameters are used to complete the configuration of the data bit, stop bit, and parity bit; if the communication protocol specification of the connected peripheral supports the flow control mechanism, and the hardware manual parameters of the target main control chip support the corresponding flow control function, it indicates that flow control can be enabled to ensure communication stability, and the flow control mechanism configuration is completed; based on the communication baud rate in the initial configuration, complete the setting of the communication baud rate, and at the same time complete the initialization of the transmit and receive buffers and the registration of the interrupt callback function; S4032, for the analog input in the general input / output interface... For the interface, perform the following configuration: If the hardware parameters of the connected peripheral explicitly specify the input range, it indicates that the sensor output range is fixed, and the specified parameters are used to complete the input range configuration; if the user-defined interface configuration parameters explicitly specify the sampling accuracy level, it indicates that the accuracy requirement is clear, and the specified level is used to complete the sampling accuracy configuration; based on the sampling frequency in the initial configuration, complete the sampling frequency setting, and at the same time, combine the calibration process of the target main control chip hardware manual parameters to complete the calibration parameter configuration; For S4033, for the GPIO interface in the general input / output interface, perform the following configuration: If the hardware parameters of the connected peripheral explicitly specify the input or output requirements, it indicates that the interface direction is fixed, and the input / output mode configuration is completed;If the hardware parameters of the connected peripheral explicitly specify pull-up / pull-down requirements, it indicates that the initial state of the interface level is fixed, and the pull-up / pull-down configuration is completed; based on the interrupt triggering method and level mapping rules in the initial configuration, the interrupt triggering method and level mapping configuration are completed; S4034, for the Flash interface in the storage peripheral interface, the following configuration is performed: if the hardware manual parameters of the Flash chip explicitly specify the communication mode, it indicates that the communication protocol is fixed, and the specified parameters are used to complete the communication mode configuration; if the user-defined interface configuration parameters explicitly specify the operating frequency range, it indicates that the performance requirements are clear, and the clock frequency is configured within the safe frequency range of the Flash chip hardware manual parameters; based on the address mapping rules in the initial configuration, the address mapping configuration is completed, and combined with the timing requirements of the Flash chip hardware manual parameters, the erase / write timing parameters are configured, and the initialization management of the storage partition is completed based on the user-defined partition table; S404, for the completed The configured peripheral interface performs connectivity verification. Connectivity verification refers to the hardware-level detection of link continuity and physical connection validity for the configured peripheral interface. Specifically, the main control processing module sends a preset low-level test signal, handshake command, or hardware response frame to the corresponding peripheral interface to monitor whether feedback signals from the peripheral or interface hardware loop can be received normally. This determines whether the physical link, pin connection, and communication hardware path between the peripheral interface and the external peripheral are in a normal connectivity state, and troubleshoots hardware connection faults such as loose connections, short circuits, and incorrect pin configurations. It only verifies the continuity of the hardware link and does not involve the validity detection of data interaction functions. If the connectivity verification passes, it indicates that the hardware connection between the peripheral interface and the peripheral is normal, and functional verification continues. If the connectivity verification fails, it indicates that there is an abnormality in the hardware connection between the peripheral interface and the peripheral, returns hardware connection abnormality information, prompts the user to check the hardware connection, and performs interface resource reset and release.S405: Perform functional verification on peripheral interfaces that have passed connectivity verification. Functional verification refers to testing the functional compatibility and operational effectiveness of the configured core parameters of the peripheral interface based on the successful connectivity verification. According to the type and configuration parameters of the corresponding peripheral interface, standard test data, control commands, or acquisition commands are sent in a simulated actual working scenario to verify whether the core functions of the general serial communication interface (GPIO) data transmission and reception, analog input interface analog signal acquisition, GPIO interface level control and interrupt response, and Flash interface storage read / write are operating normally, and to determine whether the configuration parameters are compatible with the peripheral hardware. The communication protocol must conform to the main control chip's hardware operating specifications. The peripheral interface must be confirmed to stably execute preset control and data interaction functions, eliminating software configuration faults such as parameter configuration errors, protocol mismatches, and functional abnormalities. If the functional verification passes, it indicates that the peripheral interface configuration parameters are correct and can normally interact with the peripheral. The configuration parameters of this peripheral interface are then fixed in the interface configuration table and made available for use by the MicroPython runtime environment. If the functional verification fails, it indicates a problem with the peripheral interface configuration parameters. An error message is returned, prompting the user to reconfigure, and the interface resources are reset and released.

[0021] This invention, through the construction of a hardware abstraction layer, dynamic adaptive configuration, categorized fine-grained parameter settings, and a two-level verification mechanism for connectivity and functionality, achieves standardized and automated management of the entire process of peripheral interfaces, from underlying encapsulation, intelligent configuration, functional verification to resource solidification and release. This significantly improves the flexibility, compatibility, accuracy, and operational reliability of the system's peripheral interface configuration. After successful verification, the compliant configuration is solidified into the interface configuration table and made available for use by the MicroPython runtime environment. If verification fails, error information is promptly fed back, and interface resources are reset and released. This forms a complete closed loop of intelligent configuration, hardware verification, functional verification, solidified application, and exception handling. This process significantly reduces the error rate of manual configuration, improves the efficiency of peripheral access and deployment for modular robots, and provides stable, reliable, and standardized hardware interface support for multi-peripheral collaborative work and concurrent execution of multiple tasks, further enhancing the overall stability and scalability of the system.

[0022] Dynamic adaptation configuration is performed based on the peripheral interface type and corresponding parameters. It also includes interface resource conflict detection and dynamic remapping mechanisms, specifically including the following steps: S501, before executing the peripheral interface configuration, the currently effective interface configuration table is read to obtain the hardware resource usage, pin multiplexing relationships, interrupt number allocation, and clock resource configuration information of the enabled peripheral interfaces. The resource usage status of the target peripheral interface is detected, as well as the hardware resource conflicts between the current configuration parameters and the enabled peripheral interfaces. Hardware resource conflicts include pin multiplexing conflicts, interrupt number conflicts, and clock resource conflicts. S502: If no hardware resource conflict is detected, it indicates that the hardware resources of the target peripheral interface are available and the configuration parameters are conflict-free. The subsequent peripheral interface dynamic adaptation configuration process is then executed directly. S503: If a hardware resource conflict is detected, conflict grading and remapping configuration are performed based on the preset interface priority rules, the user-configured interface weights, and the main control chip's reusable pin mapping table. The specific steps are: S5031: If the detected conflict is a non-core pin reuse conflict and there are alternative idle reused pins, a conflict-free alternative peripheral interface is generated. The interface configuration scheme is pushed to the user for confirmation and then remapping configuration is executed. Non-core pin multiplexing conflicts refer to pin resource conflicts that do not involve the core functions of the main control chip and have alternative multiplexing pins. S5032, if the detected conflict is an interrupt number or clock resource conflict, and there are free and allocable interrupt numbers and clock resources, it indicates that the conflict can be resolved through resource reallocation. The allocation of free resources and the update of configuration parameters are automatically completed, and a conflict-free alternative configuration scheme is generated. S5033, if the detected conflict is a core resource conflict and there are no available alternative pins and hardware resources, a resource conflict exception information is immediately returned, clearly indicating the conflict type and the occupied resources, prompting the user to adjust the configuration parameters or release the occupied resources. Core resource conflicts refer to hardware resource conflicts that involve the core functions of the main control chip and have no available alternative resources. S504, after completing the peripheral interface remapping configuration and resource reallocation, the interface configuration table and the interface call mapping relationship of the MicroPython runtime environment are updated to ensure that the user control script can call the remapped peripheral interface through a unified interface identifier without modifying the script logic, thus achieving cross-hardware compatibility of the control script.

[0023] This invention improves the overall management of peripheral interface configuration by adding interface resource conflict detection and dynamic remapping mechanisms to the dynamic adaptation and configuration of peripheral interfaces. This effectively solves problems such as configuration failures, interface malfunctions, and hardware damage caused by hardware resource conflicts in multi-peripheral access scenarios, significantly enhancing the stability, flexibility, intelligence, and cross-hardware compatibility of the system's peripheral interface configuration. The overall system forms a complete closed loop of early conflict detection, hierarchical and precise handling, remapping configuration, and call relationship updates, further optimizing the peripheral interface adaptation and configuration process. This improves the system's adaptability to concurrent access of multiple peripherals and complex hardware environments, avoiding interference from resource conflicts. It provides reliable interface resource management support for modular expansion of modular robots and collaborative work of multiple peripherals, while also enhancing the system's usability and maintainability, making peripheral interface configuration under different hardware configurations more efficient and stable.

[0024] The steps of the script update module to perform integrity verification on the sent data include: S601, receiving the data packet sent by the host computer, monitoring the frame header identifier in the data stream in real time, and triggering the data packet parsing process when a preset valid frame header is identified; if a valid frame header is not identified within the preset timeout period, it is judged as a timeout exception, and the integrity verification fails. The data packet parsing process refers to the standardized processing flow in which the script update module performs length parsing, valid data extraction, check code comparison, and frame tail confirmation on the data packet sent by the host computer after identifying a valid frame header. This is used to verify whether the data packet is complete, has not been tampered with, and has a valid format during transmission, ensuring that only valid data that meets the frame structure, length specification, correct check, and frame tail matching can be parsed to generate a control script and written to the buffer area, eliminating anomalies such as transmission packet loss, format errors, and data truncation; S602, after completing the frame header identification, parsing the length field in the data packet to obtain the nominal total length of the data packet. If the actual received data length does not match the nominal total length, it is determined to be a length abnormality and the integrity check fails. S603: After receiving the full data packet, the checksum field in the data packet is extracted. Based on a preset checksum algorithm, a checksum calculation is performed on the valid data segments in the data packet to generate an actual checksum value. The actual checksum value is compared with the checksum in the data packet. If they do not match, it is determined to be a checksum abnormality and the integrity check fails. S604: After the checksum comparison passes, the frame tail identifier of the data packet is identified to confirm the integrity of the data packet. If a preset valid frame tail is not identified, it is determined to be a frame tail abnormality and the integrity check fails. S605: If frame header identification, length parsing, checksum comparison, and frame tail confirmation all pass without timeout abnormalities, the integrity check is determined to pass. If any of the above steps fail, it indicates that the sent data packet has been lost, tampered with, or has a transmission abnormality, and the integrity check fails.

[0025] This invention, through a script update module, performs a full-process integrity verification process, including frame header identification, length parsing, verification comparison, frame tail confirmation, and timeout judgment. This constructs a multi-layered, comprehensive remote data transmission verification system, effectively solving potential anomalies such as packet loss, data tampering, format errors, transmission timeouts, and data truncation during remote data transmission from the host computer. This significantly improves the security, reliability, and accuracy of remote script updates, providing robust data protection for programmable remote control systems. Furthermore, it ensures that only valid, complete, and properly transmitted data is parsed to generate control scripts and written to the buffer, avoiding system malfunctions and control command errors caused by abnormal script writing. It also provides precise criteria for subsequent safe rollback control through clear anomaly judgment standards, further enhancing the security and controllability of the remote script update process, improving the stability and reliability of remote programmable control systems, and meeting the high-precision and high-security requirements of remote operation and maintenance and script upgrades for modular robots.

[0026] The coprocessor management module dynamically adjusts the communication timing of the universal serial communication interface based on real-time communication status and link quality. The steps for data interaction between the main control processing module and each coprocessor include: S701, assigning an independent communication link identifier and communication status monitoring unit to each coprocessor connected to the main control processing module via the reserved UART interface in the universal serial communication interface; predefining the initial timing parameters, parameter adjustment thresholds, and security parameter boundaries for each coprocessor's UART communication; the initial timing parameters include baud rate, transmit / receive timeout threshold, retransmission count, and frame interval duration; S702, during communication between the main control processing module and the coprocessors, the communication status monitoring unit dynamically adjusts the communication timing according to a preset period. Real-time communication status data of the corresponding communication link is collected, including data packet transmission and reception success rate, single communication response delay, bit error rate, and retransmission count; S703, based on the collected real-time communication status data, the comprehensive link quality score of the corresponding communication link is calculated. The comprehensive link quality score is obtained by weighted calculation of transmission and reception success rate, bit error rate, and response delay; S704, based on the comprehensive link quality score and real-time communication status data, the UART communication timing parameters are dynamically adjusted. The specific steps are as follows: S7041, if the comprehensive link quality score is greater than or equal to the preset high-quality link threshold, and the response delay and bit error rate are both better than the preset optimal standard, it indicates that the current communication link quality is excellent and the data transmission is stable. If an anomaly occurs within the safety parameter boundaries, the system adaptively increases the communication baud rate, shortens the frame interval, reduces the number of retransmissions and the transmit / receive timeout threshold, thereby improving the communication efficiency between the main controller and the coprocessor. S7042: If the overall link quality score is within the preset normal link range, and the bit error rate and retransmission count are both within the preset normal threshold range, it indicates that the current communication link quality is stable and can meet normal communication needs. The preset normal link range is a left-closed, right-open interval formed by the preset lower limit threshold for normal links and the preset high-quality link threshold. The current UART communication timing parameters remain unchanged, and link quality changes are continuously monitored. S7043: If the overall link quality score is less than or equal to the preset low-quality link threshold... If the bit error rate or retransmission count exceeds the preset alarm threshold, it indicates that the current communication link quality has deteriorated, and there is a risk of data transmission packet loss and errors. Within the safety parameter boundaries, the communication baud rate is adaptively reduced, the frame interval duration is extended, the retransmission count and the transmit / receive timeout threshold are increased to improve the communication anti-interference capability and data transmission stability. S7044 If the data packet transmission and reception success rate is 0 for several consecutive monitoring periods, or no response data is received from the coprocessor, it indicates that the communication link has a serious abnormality. The communication link reset process is immediately triggered to reset the UART interface configuration and the coprocessor communication status. If normal communication cannot be restored after the reset, a coprocessor communication abnormality alarm is reported to the host computer and the touch screen interaction module.After completing timing parameter adjustment, the S705 sends a parameter synchronization command to the corresponding coprocessor. Once the coprocessor confirms that it has completed parameter synchronization, it uses the updated timing parameters to perform subsequent communication interactions. Simultaneously, it continuously monitors changes in link quality after parameter adjustment, forming a closed-loop dynamic adjustment mechanism.

[0027] This invention, through a coprocessor management module, executes a dynamic adjustment process for UART communication timing based on real-time communication status and link quality. This further optimizes the communication interaction performance of the hierarchical control architecture of the main controller and coprocessors, effectively solving problems such as link quality fluctuations, low transmission efficiency, and weak anti-interference capabilities in multi-coprocessor concurrent communication scenarios. It significantly improves the stability, real-time performance, and reliability of data interaction between the main controller and each coprocessor, providing efficient communication support for the collaborative work of multiple hardware units in modular robots. It not only achieves adaptive optimization of communication timing, balancing communication efficiency and transmission stability, but also effectively avoids link interference problems during multi-coprocessor concurrent communication through independent link management, precise status monitoring, and hierarchical anomaly handling. This ensures the real-time performance and accuracy of data interaction between the main controller and each coprocessor, further strengthening the system's multi-coprocessor collaborative management capabilities. This allows the modular robot's multi-functional collaborative tasks to be executed more smoothly and stably, improving the overall system's operational reliability and scalability.

[0028] The asynchronous task scheduling module dynamically adjusts the scheduling priority of each task and executes the multi-functional collaborative tasks of the combined robot concurrently. The steps include: S801, pre-building a unified asynchronous scheduling core, based on the business scenario of the combined robot, pre-defining task type classification, initial priority level, priority adjustment rules and task execution resource quotas. Task types include real-time control tasks, data acquisition tasks, vision processing tasks, human-computer interaction tasks, and background operation and maintenance tasks; S802, receiving the control logic of the main control processing module, the interaction data of the coprocessor management module, the running status data of each functional module, and the tasks to be executed generated by the user control script, assigning a unique task identifier to each task to be executed, and completing the initial task based on the task type. Priority mapping to resource quotas; S803, real-time monitoring of the system's operating status, execution progress, execution time, time urgency, resource usage, and the robot's core control requirements, peripheral operating status, and battery status data, calculating the dynamic priority adjustment factor for each task; S804, based on the dynamic priority adjustment factor, dynamically adjusting the scheduling priority and resource quota of each task according to preset priority adjustment rules, the specific steps are: S8041, for real-time control tasks involving robot motion control and safety protection, if an emergency control command, safety anomaly alarm, or battery criticality alarm is detected, it indicates that the robot needs to prioritize core safety and control capabilities, immediately elevating this type of task to the highest priority, locking... The core resource quota is set to be unlimited to ensure the real-time performance and security of task execution. If no urgent instructions or abnormal alarms are detected, the preset high priority of real-time control tasks remains unchanged to ensure the stable execution of the robot's basic control logic. For AI vision processing and data acquisition tasks, if user-triggered visual recognition or target tracking instructions are detected, or the urgency of sensor data acquisition exceeds the preset threshold, it indicates that the current execution demand for this type of task is high. Without affecting the execution of real-time control tasks, its priority is increased by 1-2 levels, and its computing resource quota is appropriately increased to ensure task processing efficiency. If this type of task is in an idle state, a non-essential execution state, or a state of low system resources and battery power, the priority is increased. If the system resource utilization rate is higher than the preset high load threshold, or the remaining battery capacity is lower than the preset low battery threshold, then the system needs to prioritize the execution of core tasks, lower the priority of non-real-time tasks, limit their unnecessary resource utilization, suspend the execution of non-urgent background maintenance tasks, and only retain the basic status reporting function.The S805, based on adjusted task priorities, employs a combination of time-slice round-robin and preemptive scheduling to concurrently schedule task execution. It also implements synchronization and mutual exclusion management between tasks, exception handling, and fault tolerance, ensuring the stability and real-time performance of multi-task collaborative execution.

[0029] This invention, through the dynamic priority adjustment and multi-task concurrent scheduling process executed by the asynchronous task scheduling module, constructs an intelligent scheduling system adapted to multiple business scenarios of modular robots. It effectively solves the problems of disordered multi-task scheduling, poor real-time performance, unreasonable resource allocation, and low collaborative efficiency in traditional control systems. It significantly improves the stability, real-time performance, and resource utilization of the system's multi-task concurrent execution, providing core scheduling support for the smooth execution of multi-functional collaborative tasks of modular robots. The system forms a complete closed loop encompassing initial configuration, dynamic monitoring, precise adjustment, concurrent execution, and fault tolerance. This not only improves the system's multi-task processing efficiency and resource utilization but also adaptively adjusts the scheduling strategy according to different robot operating scenarios, task requirements, and system states. This ensures that core tasks are executed first and non-core tasks are appropriately adapted, further strengthening the multi-functional collaborative capabilities of modular robots. This allows robots to smoothly complete multi-task parallel operations in complex work scenarios, improving the overall reliability, flexibility, and intelligence level of the machine.

[0030] The steps for the script update module to perform security rollback control include: S901, when the integrity verification of the issued data fails, immediately terminate the current script update process, lock the write permission of the script cache, record the exception type, exception data and timestamp of this update, and generate an exception log; S902, read the pre-stored historical valid control scripts in the system storage area. The historical valid control scripts are the control scripts that have completed full verification and run successfully in the last time. Perform a second integrity verification on the historical valid control scripts to confirm the availability of the scripts; S903, if the integrity verification of the historical valid control scripts passes, it indicates that the script can be loaded and run normally. Perform a secure switch of the script execution environment, terminate the loading process of the invalid scripts that have not yet been updated, and load the historical valid control scripts into Micr. The system uses a Python runtime environment to restore the robot's normal control capabilities, preventing loss of control due to script update failures. In step S904, if a historically valid control script fails to load and run, it indicates the historical backup script is unavailable. The system immediately loads a pre-stored safety backup script. This safety backup script only includes basic safety control, status reporting, and human-machine interaction alarm functions, without executing any complex motion control logic, ensuring the robot remains in a controllable and safe state and preventing loss of control. In step S905, after completing the safety rollback operation, the update error information, rollback execution status, and current script running status are reported to the host computer in real time. An error message is displayed on the touchscreen interaction module, and read / query permissions for the error log are granted to facilitate user troubleshooting of update failures.

[0031] This invention, through the safety rollback control steps executed by the script update module, constructs a multi-level safety fallback and fault self-healing mechanism after a remote script update failure. This forms a complete closed loop from abnormal termination, backup verification, tiered rollback to status reporting, fundamentally eliminating safety risks such as robot control failure and operational instability caused by script update anomalies and data transmission errors. This significantly improves the security, fault tolerance, and operational stability of the system's remote script updates. After completing the safety rollback, the module reports the update anomaly information, rollback execution status, and current script running status to the host computer in real time, and provides visual anomaly prompts on the touchscreen interaction module. Simultaneously, it grants access to read and query anomaly logs, facilitating users to quickly locate the cause of script update failure. This enables anomalies to be perceived, problems to be traced, and faults to be quickly investigated and handled, further enhancing the system's security, usability, and maintainability, providing a solid safety net for the stable and safe operation of remote programmable control of modular robots.

[0032] Figure 2This is a flowchart of a programmable remote control method for a modular robot provided in an embodiment of the present invention, including the following steps: adapting and configuring the peripheral interfaces of the target main control chip and managing its resources. The target main control chip is a control chip equipped with a main control processing module. The peripheral interfaces include a universal serial communication interface, a universal input / output interface, and a storage peripheral interface; receiving data remotely sent from a host computer and performing integrity verification on the sent data. Integrity verification includes frame header identification, length parsing, verification comparison, frame tail confirmation, and timeout judgment. If the integrity verification passes, the sent data is parsed to generate a control script, which is written to a buffer. During the script startup phase, the target execution script is switched and transmitted to the target main control chip. If the integrity verification fails, a safety rollback control is executed; dynamically adjusting the communication timing of the universal serial communication interface based on real-time communication status and link quality to achieve data interaction between the main control processing module and each coprocessor; dynamically adjusting the scheduling priority of each task based on the control logic of the main control processing module, the interaction data of the coprocessor management module, and the operating status of each functional module, and concurrently executing the multi-functional collaborative tasks of the modular robot.

Claims

1. A programmable remote control system for a modular robot, characterized in that, include: The system comprises a main control processing module, a script update module, a coprocessor management module, and an asynchronous task scheduling module. The main control processing module is ported with the MicroPython runtime environment, which is used to adapt and configure the peripheral interfaces of the target main control chip and manage resources. The target main control chip is a control chip equipped with the main control processing module. The peripheral interfaces include a general serial communication interface, a general input / output interface and a storage peripheral interface. The script update module is used to receive data remotely sent by the host computer and perform integrity verification on the sent data. The integrity verification includes frame header recognition, length parsing, verification comparison, frame tail confirmation and timeout judgment. If the integrity verification passes, the sent data is parsed to generate a control script and written to the buffer area. During the script startup phase, the target execution script is switched and transmitted to the target main control chip. If the integrity verification fails, a safety rollback control is executed. The coprocessor management module is used to dynamically adjust the communication timing of the general serial communication interface based on the real-time communication status and link quality, so as to realize data interaction between the main control processing module and each coprocessor. The asynchronous task scheduling module is used to dynamically adjust the scheduling priority of each task based on the control logic of the main control processing module, the interactive data of the coprocessor management module, and the running status of each functional module, and to concurrently execute the multi-functional collaborative tasks of the combined robot.

2. The programmable remote control system for a modular robot as described in claim 1, characterized in that, It also includes modular driver and multimedia management modules; The modular driver and multimedia management module is used for unified driver adaptation, registration, loading, and configuration management of Bluetooth, audio modules, and various peripherals. It also drives the audio module through a universal serial communication interface to achieve standardized audio output and performs full lifecycle peripheral configuration management based on device tree descriptors and peripheral hot-plug status. The modular driver and multimedia management module implements these functions in the following ways: S201, a standardized driver library compatible with the MicroPython runtime environment is pre-built. The standardized driver library generates a device tree descriptor for various peripherals, which includes device identifier, peripheral interface attributes, driver dependencies, configuration parameters and communication protocols, and establishes a mapping relationship between peripheral models and corresponding drivers. S202 monitors the peripheral access status of various peripheral interfaces of the main control processing module in real time. When a new peripheral is detected, it reads the device identifier of the peripheral, matches the corresponding device tree descriptor and standardized driver, executes automatic driver registration and loading, and completes the automatic adaptation of the pin configuration, communication timing and interrupt mechanism of the corresponding peripheral interface. S203, during the operation of the peripheral device, collect the peripheral device operating status, communication link quality and abnormal feedback information according to a preset cycle, quantify the core indicators, and perform dynamic adjustment of parameters and disconnection management based on the core indicators. The parameters for dynamic adjustment and disconnection management include peripheral device driver configuration parameters and communication control parameters of the corresponding peripheral device interface. S204, based on a standardized audio output framework, receives audio output commands from the main control processing module, decodes, converts, and adjusts the gain of audio data, transmits the processed audio data to the audio module, and simultaneously monitors the audio playback status in real time and handles fault tolerance.

3. The programmable remote control system for a modular robot as described in claim 1, characterized in that, It also includes a battery status monitoring module, which communicates with the fuel gauge chip via an external interface to collect comprehensive battery status data, complete battery health status assessment, provide battery status information and assessment results to the host computer or touch screen interaction module, and perform dynamic power consumption adjustment and charge / discharge safety management operations based on the comprehensive battery status data. The battery status monitoring module specifically achieves the above functions in the following ways: S301, according to the preset sampling period, reads the original battery data in real time through the corresponding peripheral interface, performs filtering calibration and outlier removal on the original data, generates standardized full-dimensional battery status data, and updates the battery status database synchronously. The original battery data includes the actual full charge capacity, the measured DC internal resistance of the battery, and the number of cycles. S302, the difference between the initial rated capacity and the actual full-charge capacity is recorded as the battery capacity decay rate as a percentage of the initial rated capacity. The difference between the measured DC internal resistance of the battery and the initial nominal DC internal resistance under standard operating conditions is recorded as the battery internal resistance change rate as a percentage of the initial nominal DC internal resistance. Predefined weighting coefficients are used for the capacity decay rate, internal resistance change rate, and cycle number. The battery health score is calculated by weighting the capacity decay rate, internal resistance change rate, and current cycle number. The battery health status is then graded and evaluated according to the preset health level classification rules, and a battery health evaluation report is generated. S303 dynamically adjusts the scheduling priority and power consumption quota of each task based on the remaining battery capacity and battery health score. The S304 monitors the battery's charging and discharging status, voltage, current, and temperature parameters in real time. It presets multiple safety thresholds. When the monitored parameters exceed the corresponding safety threshold, it immediately triggers the corresponding level of safety protection mechanism, including current limiting of the charging and discharging circuit, charging and discharging suspension, forced degradation of system power consumption, and emergency shutdown warning. It also reports the abnormal information to the host computer and touch screen interaction module in real time.

4. The programmable remote control system for a modular robot as described in claim 1, characterized in that, The steps for the main control processing module to adapt, configure, and manage the resources of the peripheral interfaces of the target main control chip include: S401 pre-builds an interface hardware abstraction layer adapted to the MicroPython runtime environment, completes the encapsulation of the target main control chip's underlying registers and driver interfaces, and establishes the mapping relationship between peripheral interface types and underlying drivers. S402: Obtain the hardware manual parameters of the target main control chip, the user-defined interface configuration parameters, and the hardware parameters and communication protocol specifications of the connected peripherals. Based on the peripheral interface type, peripheral hardware parameters, communication protocol specifications, and user-defined configuration parameters, execute the dynamic adaptation configuration of the corresponding peripheral interface. S403 performs specific parameter configuration for different types of peripheral interfaces based on a defined initial configuration. S404 performs connectivity verification on the configured peripheral interface. If the connectivity verification passes, it continues to perform functional verification. If the connectivity verification fails, it returns hardware connection error information, prompts the user to check the hardware connection, and performs interface resource reset and release. S405: Perform functional verification on peripheral interfaces that pass connectivity verification. If the functional verification passes, the configuration parameters of the peripheral interface are fixed to the interface configuration table. If the functional verification fails, an error message for the configuration parameters is returned, prompting the user to reconfigure, and the interface resources are reset and released.

5. The programmable remote control system for a modular robot as described in claim 4, characterized in that, The dynamic adaptation configuration based on peripheral interface type and corresponding parameters also includes an interface resource conflict detection and dynamic remapping mechanism, specifically including the following steps: S501 Before executing the peripheral interface configuration, first read the currently effective interface configuration table, obtain the hardware resource occupancy status, pin multiplexing relationship, interrupt number allocation and clock resource configuration information of the enabled peripheral interface, detect the resource occupancy status of the target peripheral interface, and the hardware resource conflict between the current configuration parameters and the enabled peripheral interface. The hardware resource conflict includes pin multiplexing conflict, interrupt number conflict and clock resource conflict. S502: If no hardware resource conflict is detected, the subsequent peripheral interface dynamic adaptation configuration process will be executed directly. If a hardware resource conflict is detected, the S503 will perform conflict classification processing and remapping configuration based on the preset interface priority rules, the user-configured interface weights, and the reusable pin mapping table of the main control chip. After completing the peripheral interface remapping configuration and resource reallocation, S504 updates the interface configuration table and the interface call mapping relationship of the MicroPython runtime environment, ensuring that user control scripts can call the remapped peripheral interfaces through a unified interface identifier without modifying the script logic, thus achieving cross-hardware compatibility of the control scripts.

6. The programmable remote control system for a modular robot as described in claim 1, characterized in that, The steps by which the script update module performs integrity verification on the distributed data include: S601 receives data packets from the host computer and monitors the frame header identifier in the data stream in real time. When a preset valid frame header is detected, the data packet parsing process is triggered. If a valid frame header is not detected within the preset timeout period, it is judged as a timeout exception and the integrity check fails. S602, after completing frame header recognition, parse the length field in the data packet to obtain the nominal total length of the data packet, and receive the subsequent data stream based on the nominal total length. If the actual received data length does not match the nominal total length, it is determined to be a length abnormality and the integrity check fails. S603: After receiving the full data packet, extract the check code field from the data packet, perform check calculation on the valid data segment in the data packet based on the preset check algorithm, generate the actual check value, compare the actual check value with the check code in the data packet, and if the two are inconsistent, it is determined that the check is abnormal and the integrity check fails. S604, after the verification and comparison pass, the frame tail identifier of the data packet is identified to confirm the integrity of the data packet. If the preset valid frame tail is not identified, it is determined that the frame tail is abnormal and the integrity verification fails. S605: If frame header recognition, length parsing, verification comparison, and frame tail confirmation all pass without timeout, the integrity check is deemed to have passed; if any of the above steps fail, the integrity check is deemed to have failed.

7. The programmable remote control system for a modular robot as described in claim 1, characterized in that, The coprocessor management module dynamically adjusts the communication timing of the general serial communication interface based on real-time communication status and link quality, and the steps for data interaction between the main control processing module and each coprocessor include: S701 assigns an independent communication link identifier and communication status monitoring unit to each coprocessor connected to the main control processing module through the reserved UART interface in the general serial communication interface. It predefines the initial timing parameters, parameter adjustment thresholds, and security parameter boundaries for each coprocessor's UART communication. The initial timing parameters include baud rate, transmit / receive timeout threshold, retransmission count, and frame interval duration. S702, during the communication process between the main control processing module and the coprocessor, the communication status monitoring unit collects real-time communication status data of the corresponding communication link according to a preset cycle, including data packet transmission and reception success rate, single communication response delay, bit error rate and retransmission count. S703, based on the collected real-time communication status data, calculates the comprehensive link quality score of the corresponding communication link. The comprehensive link quality score is obtained by weighted calculation of transmission and reception success rate, bit error rate and response delay. S704 dynamically adjusts UART communication timing parameters based on the comprehensive link quality score and real-time communication status data; After completing the timing parameter adjustment, the S705 sends a parameter synchronization command to the corresponding coprocessor. After confirming that the coprocessor has completed the parameter synchronization update, it uses the updated timing parameters to perform subsequent communication interactions. At the same time, it continuously monitors the changes in link quality after parameter adjustment, forming a closed-loop dynamic adjustment mechanism.

8. The programmable remote control system for a modular robot as described in claim 1, characterized in that, The asynchronous task scheduling module dynamically adjusts the scheduling priority of each task and executes the multi-functional collaborative tasks of the combined robot concurrently, including the following steps: S801, pre-built unified asynchronous scheduling core, based on the business scenario of combined robots, pre-defined task type classification, initial priority level, priority adjustment rules and task execution resource quota, the task types include real-time control tasks, data acquisition tasks, vision processing tasks, human-computer interaction tasks and background operation and maintenance tasks. S802 receives the control logic of the main control processing module, the interaction data of the coprocessor management module, the running status data of each functional module, and the tasks to be executed generated by the user control script. It assigns a unique task identifier to each task to be executed and completes the mapping between the initial priority and resource quota based on the task type. S803 monitors the system's operating status, the execution progress of each task, execution time, time urgency, resource usage, as well as the robot's core control requirements, peripheral operating status, and battery status data in real time, and calculates the priority adjustment factor for each task. S804, based on the priority dynamic adjustment factor, dynamically adjusts the scheduling priority and resource quota of each task according to the preset priority adjustment rules; Based on the adjusted task priorities, the S805 adopts a combination of time-slice round-robin and preemptive scheduling to concurrently schedule the execution of each task. At the same time, it realizes synchronous mutual exclusion management, exception capture and fault tolerance handling between tasks, ensuring the stability and real-time performance of multi-task collaborative execution.

9. The programmable remote control system for a modular robot as described in claim 1, characterized in that, The steps for the script update module to perform security rollback control include: S901: When the integrity verification of the data being sent fails, immediately terminate the current script update process, lock the write permission of the script cache, record the exception type, exception data and timestamp of this update, and generate an exception log. S902, Read the pre-stored historical valid control scripts in the system storage area. The historical valid control scripts are the control scripts that have completed full verification and run successfully in the last time. Perform a second integrity verification on the historical valid control scripts to confirm the availability of the scripts. S903, if the integrity verification of the historical valid control script passes, the script runtime environment is switched safely, the loading process of the invalid script that has not been updated is terminated, the historical valid control script is loaded into the MicroPython runtime environment, the robot's normal control capability is restored, and the robot is prevented from going out of control due to script update failure. S904, if the historical valid control script verification is abnormal and cannot be loaded and run normally, then the system pre-stored safety backup script is loaded. The safety backup script only includes the robot's basic safety control, status reporting and human-machine interaction alarm functions, and does not execute any complex motion control logic to ensure that the robot is in a controllable and safe state and avoid the risk of loss of control. After completing the safe rollback operation, the S905 will report the update error information, rollback execution status, and current script running status to the host computer in real time, and provide error prompts on the touch screen interaction module. At the same time, it will grant read and query permissions for the error log to facilitate users in troubleshooting the reasons for update failure.

10. A programmable remote control method for a modular robot, characterized in that, The method of application in a programmable remote control system for a modular robot as described in any one of claims 1-9 includes the following steps: The peripheral interfaces of the target main control chip are adapted, configured, and managed for resources. The target main control chip is a control chip equipped with the main control processing module. The peripheral interfaces include a general serial communication interface, a general input / output interface, and a storage peripheral interface. The system receives data remotely sent from the host computer and performs integrity verification on the sent data. The integrity verification includes frame header identification, length parsing, verification comparison, frame tail confirmation, and timeout judgment. If the integrity verification passes, the system parses the sent data to generate a control script and writes it to the buffer. During the script startup phase, the system switches to the target execution script and transmits it to the target main control chip. If the integrity verification fails, the system performs a safety rollback control. Based on real-time communication status and link quality, the communication timing of the general serial communication interface is dynamically adjusted to enable data interaction between the main control processing module and each coprocessor. Based on the control logic of the main control processing module, the interactive data of the coprocessor management module, and the operating status of each functional module, the scheduling priority of each task is dynamically adjusted, and the multi-functional collaborative tasks of the combined robot are executed concurrently.

Citation Information

Patent Citations

  • A robot remote control platform and its design method

    CN109213306B

  • Robot Remote Control System and Control Method Based on Multimodal Interaction Technology

    CN113821108B

  • Electronic information data association method and system based on Internet of Things

    CN120547252A

  • Control system and control method of battery measuring instrument

    CN120779247A

  • Unmanned workshop equipment collaborative intelligent optimization method

    CN121329352A