Remote real-time debugging method for MCU (Microprogrammed Control Unit)
By initializing the API management module and designing communication protocols on the MCU, combining machine learning model and encrypted communication protocols, the flexibility and security of remote MCU debugging are achieved, and the remote debugging, real-time and data security of traditional MCU debugging methods are solved. Problem, improving debugging efficiency and system reliability.
Patent Information
- Application Number
- CN202411136095.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-10
AI Technical Summary
Traditional MCU debugging methods have limitations in remote debugging, real-time, flexibility and data security, and it is difficult to meet the needs of modern MCU development and maintenance, especially in distributed environments of IoT devices.
Remote real-time debugging method is adopted, and data is securely transmitted and automatic response operations are realized by initializing the API management module on the MCU, designing communication protocols, and using machine learning models to perform intelligent filtering and encrypting communication protocols.
It improves debugging flexibility and efficiency, ensures data security and system reliability, supports remote update of API functions, dynamically adjusts the priority of monitoring variables, promptly responds to system problems, and extends the product's usage cycle.
Smart Images

Figure CN119105961A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of microcontroller units, in particular to a remote real-time debugging method for an MCU. Background Art
[0002] In the development and maintenance of modern microcontroller units (MCUs), real-time debugging and monitoring are indispensable links to ensure the normal operation and performance optimization of the system. Traditional MCU debugging methods mainly rely on physically connecting devices, such as using the JTAG (Joint Test Action Group) interface for online debugging or recording system parameters through running logs. These methods have obvious limitations in practical applications.
[0003] First, although traditional debugging technologies such as JTAG interface debugging can provide low-level control and access, they usually require debuggers or engineers to have physical contact with the device, limiting the flexibility of debugging work. This physical dependence is particularly inconvenient in remote or distributed development environments, especially in environments involving large-scale deployment or in geographically distributed environments, such as the maintenance and upgrade of Internet of Things (IoT) devices.
[0004] Secondly, although the debugging method that relies on running logs can collect information without interrupting the operation of the device, this method can usually only record information passively and lacks real-time and active intervention capabilities. When a system failure or performance bottleneck occurs, developers and engineers often cannot obtain enough information in real time to respond quickly, resulting in longer system recovery time and even affecting the stability of the entire system.
[0005] In addition, security issues are also a common concern in traditional MCU debugging methods. During data transmission, the lack of effective security protection measures may lead to illegal access or tampering of sensitive information, especially when using wireless transmission or Internet connection, data security and privacy protection face severe challenges.
[0006] Therefore, a new debugging method is urgently needed to solve the above problems in order to improve the flexibility and efficiency of debugging while ensuring data security and system reliability. Summary of the invention
[0007] In view of the deficiencies in the prior art, the present invention provides an MCU remote real-time debugging method to solve the limitations of traditional MCU debugging methods in terms of remote debugging, real-time performance, flexibility and data security, and to provide an efficient, secure and automated remote real-time debugging method.
[0008] To achieve the above purpose, the present invention is implemented by the following technical scheme: a MCU remote real-time debugging method, comprising the following steps:
[0009] Initialize the API management module on the MCU and load the API functions for reading multiple memory addresses;
[0010] Design and implement communication protocols for real-time transmission of variable addresses and their corresponding variable values to be viewed;
[0011] The external device parses the map file generated after the program is compiled to obtain the mapping relationship between the variable name and its memory address;
[0012] The external device sends the variable address to the MCU in real time through the communication protocol, and the MCU calls the API function to read the corresponding variable value from the MCU memory, encapsulates it and sends it back to the external device;
[0013] Using machine learning models, intelligent filtering is implemented based on the variable change frequency Freq, change amplitude Amp, and historical importance Imp, where the priority P(V i ) is calculated as:
[0014] P(V i )=α×Freq(V i )+β×Amp(V i )+γ×Imp(V i )
[0015] Among them, α, β, γ are weight coefficients;
[0016] When a variable meets the preset trigger conditions, the response action is automatically executed, including but not limited to sending an alarm, recording a log, or returning the variable value to the requested external device.
[0017] Preferably, the API function supports remote updating, comprising the following steps:
[0018] Receiving an API function update request sent by an external device through a secure communication protocol, wherein the request includes an updated API function code and metadata thereof;
[0019] Perform security audits on the MCU, including but not limited to code signature verification to ensure the authenticity and integrity of the update code source;
[0020] Conduct code compatibility and security vulnerability scans to assess whether new API codes comply with predetermined security standards and operating specifications;
[0021] Perform performance tests on API function codes, including but not limited to memory usage and execution speed tests, to ensure that the new API runs effectively in a resource-constrained MCU environment;
[0022] Based on the results of performance testing and security audits, decide whether to deploy new API code to the MCU;
[0023] After the API is successfully updated, the update event is recorded to the system log, and the external device is optionally notified of the update status for subsequent monitoring and management.
[0024] Preferably, the communication protocol includes using encryption technology to encrypt the transmitted data packets to ensure the security of the data transmission process, including the following steps:
[0025] Generate encryption keys and use a secure key generation algorithm to securely share keys between the MCU and external devices;
[0026] Use encryption standards to encrypt data that needs to be transmitted, including variable addresses, variable values, and any related metadata;
[0027] Add a timestamp and sequence number to each encrypted data packet to prevent replay attacks and ensure the integrity and order of the data packets;
[0028] Add a message authentication code at the end of the data packet and use HMAC technology to ensure that the data packet has not been tampered with during transmission;
[0029] After the MCU receives the encrypted data packet, it verifies the correctness of the message authentication code before decrypting it to confirm the integrity and authenticity of the data packet;
[0030] Decrypt the data packet to extract variable addresses and values, decrypting them using the previously shared key via the AES-256 decryption algorithm;
[0031] After completing the secure transmission of data, a data integrity check is performed to ensure that the received data is consistent with the original data before sending.
[0032] Preferably, the communication protocol includes but is not limited to CAN bus, Ethernet, Modbus, and PROFIBUS.
[0033] Preferably, the step of the external device parsing the map file generated after compilation and extracting the variable name and the corresponding memory address mapping comprises:
[0034] The external device loads the map file through the file reading operation, which contains the symbols of all static and global variables in the compiled program and their corresponding memory addresses;
[0035] The external device executes the parsing script or uses the software tool to analyze the data structure in the map file and extract the variable name and the corresponding memory address;
[0036] Store the parsed variable names and memory address information in a hash table or key-value pair set;
[0037] Enter the variable name you want to view, and the external device will convert the variable name into the corresponding memory address and send it to the MCU through the designed communication protocol, ensuring that the MCU can access the correct memory address as needed to obtain the variable data.
[0038] Preferably, the step of receiving the variable address sent by the external device in real time through the communication protocol, and reading the corresponding variable value from the MCU memory using the API function according to the received variable address includes:
[0039] Real-time monitoring of the communication interface to detect whether there is data incoming from external devices. The data format includes but is not limited to variable address list and request identifier;
[0040] Parse received data using secure protocols to ensure that the data has not been tampered with or corrupted in transit, including verifying the checksum or digital signature of the data;
[0041] Extract variable addresses from the parsed data and locate corresponding variable values in the MCU memory based on these addresses;
[0042] Call the API function loaded in the MCU in advance, pass in the extracted variable address list, and the function is responsible for reading the variable values corresponding to these addresses from the MCU's memory;
[0043] The API function returns the requested variable value and passes it to the communication protocol function;
[0044] The communication protocol function packages the variable values returned by the API into a response data packet, including relevant metadata;
[0045] The response data packet is returned to the requesting external device through the configured communication interface, using the same security protocol for data encryption and integrity protection;
[0046] After the data transfer is completed, the detailed log information of this operation is recorded, including the operation time, variable address, data read, and any communication errors.
[0047] Preferably, the trigger condition includes the variable value exceeding a preset threshold value T 1 Or the rate of change exceeds the preset threshold T 2 , specifically including the following steps:
[0048] During system initialization, a preset threshold T is set 1 and T 2 ,The threshold is adjusted according to the debugging requirements through the remote configuration interface;
[0049] Real-time monitoring of each target variable V i The current value and the previously recorded value V prevCompare and calculate the difference between the two |V i -V prev |;
[0050] Calculate the rate of change of the variable, that is, the difference in change divided by the time interval Δt, the formula is:
[0051] Check whether the calculated difference and change rate exceed the preset threshold T 1 and T 2 , the trigger condition formula is:
[0052]
[0053] If any trigger condition is met, automatically execute the predetermined response action, including but not limited to sending an alarm, recording the variable status to the system log, or executing the preset repair or security protocol;
[0054] The detailed information of the triggering event and its related response is recorded in the debugging system log, including the triggering time, the triggered variable, the triggering value, and the response measures taken.
[0055] The present invention also provides an MCU remote real-time debugging device, comprising:
[0056] An API management module, configured on the MCU, is used to load and manage API functions for reading multiple memory addresses;
[0057] Communication interface module, which implements a communication protocol for real-time transmission of variable addresses and their corresponding variable values based on CAN bus or Ethernet;
[0058] The map parsing module is configured to parse the map file generated after compilation and extract the variable name and the corresponding memory address mapping;
[0059] The data receiving module receives the variable address sent by the external device in real time through the communication interface module, and transmits the received address to the API management module;
[0060] The data reading module works in conjunction with the API management module to read the corresponding variable value from the MCU memory according to the variable address received from the data receiving module;
[0061] The intelligent filtering module uses a machine learning model to calculate the priority of each variable based on the variable's change frequency Freq, change amplitude Amp, and historical importance Imp;
[0062] The trigger condition module is configured to monitor the variable priority output by the intelligent filtering module and automatically activate a response action when the variable value meets a preset trigger condition, including sending an alarm, recording a log, or returning the variable value to a requested external device.
[0063] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the above method is implemented.
[0064] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.
[0065] The present invention provides a MCU remote real-time debugging method, which has the following beneficial effects:
[0066] 1. The present invention allows users to perform system diagnosis and performance optimization without physically approaching the hardware by implementing a remote real-time debugging method for MCU. This remote debugging capability greatly improves the flexibility and efficiency of debugging work, allowing developers to quickly respond to system changes and needs and make adjustments and optimizations in real time.
[0067] 2. The present invention ensures that the data transmitted between the MCU and the external device maintains a high degree of security and confidentiality through the encrypted communication protocol. The use of security standards such as AES-256 and HMAC effectively prevents the data from being stolen or tampered with during transmission, providing a strong layer of protection to ensure the security of the debugging data.
[0068] 3. The present invention uses machine learning technology to implement intelligent filtering, dynamically adjust the priority of monitored variables, and effectively manage large amounts of data streams. This not only improves processing efficiency, but also ensures that debugging resources are focused on the most critical data points, thereby optimizing system performance and response speed.
[0069] 4. By setting trigger conditions and automatically executing response operations, the present invention can quickly respond to problems when they first occur, promptly repair the system or execute security protocols, and minimize potential system damage. This automated problem handling mechanism significantly improves the reliability and stability of the system.
[0070] 5. The present invention supports the remote update capability of API functions, so that the system can continuously adapt to new technical requirements and functional updates, and can maintain and upgrade system functions without manual intervention in hardware or system. This flexible update mechanism greatly facilitates system maintenance and extends the product life cycle.
[0071] 6. The present invention provides an efficient, safe and intelligent MCU remote real-time debugging method, which greatly improves the debugging efficiency and reliability of the system by introducing remote control, intelligent data processing, automatic response mechanism and security protocol technologies. This method makes system debugging more flexible and intelligent, while ensuring data security and system stability, meeting the efficiency and flexibility requirements of debugging work in modern electronic equipment during rapid development and technological upgrading. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0073] Figure 2 This is a flow chart of MCU remote control of the present invention;
[0074] Figure 3 It is a schematic diagram of the structure of the device of the present invention;
[0075] Figure 4 It is a schematic diagram of the computer device structure of the present invention.
[0076] Among them, 100, API management module; 200, communication interface module; 300, map analysis module; 400, data receiving module; 500, data reading module; 600, intelligent filtering module; 700, trigger condition module; 40, computer equipment; 41, processor; 42, memory; 43, storage medium. DETAILED DESCRIPTION
[0077] The following will be combined with the drawings in the specification of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0078] Please see attached Figure 1 -Attached Figure 2 The embodiment of the present invention provides a MCU remote real-time debugging method, which significantly improves the data processing efficiency and response speed in the debugging process by introducing intelligent filtering and conditional triggering mechanisms.
[0079] Specifically, the method comprises the following steps:
[0080] S1. Initialize the API management module on the MCU and load the API function for reading multiple memory addresses.
[0081] For step S1, the MCU remote real-time debugging method of the present invention first initializes the API management module on the MCU and loads the API function for reading multiple memory addresses to ensure that subsequent variable monitoring and data acquisition can be carried out efficiently. This step is the basis of the entire debugging process, and is intended to provide necessary technical support and resource guarantees for real-time data transmission, intelligent filtering and conditional triggering. The advantage of this step is that the interface API function is simple and universal, and there is no need to modify the API function and communication protocol to monitor different variables, and there is no need to repeatedly update the program.
[0082] In this embodiment, the process of initializing the API management module on the MCU is as follows:
[0083] 1. Hardware interface configuration:
[0084] During the initialization phase, the various hardware interfaces of the MCU need to be correctly configured to support the functions of the API management module. This includes the configuration of the CAN bus and Ethernet interfaces to facilitate efficient data transmission.
[0085] In the embedded development environment, hardware interface configuration is completed by setting relevant registers. The system first enables the necessary peripheral modules (such as GPIO, ADC, etc.) and ensures that these modules run at the lowest power consumption to meet the requirements of real-time debugging.
[0086] 2. Loading API functions:
[0087] API functions are the core tool for accessing data at multiple addresses in the MCU memory. In this step, the API management module will load a set of predefined API functions that are designed to read the variable values at specified addresses in the MCU memory.
[0088] The specific implementation includes storing the executable code of the API function in the MCU's flash memory and loading it into RAM for fast access. The API function usually exists in the form of a dynamic link library (DLL) or a static library to ensure modularity and scalability.
[0089] 3. Memory allocation:
[0090] The initialization process needs to allocate necessary memory resources for the API management module. The MCU's memory allocation strategy should take into account the memory usage of the API function and the cache space that may be required during subsequent debugging.
[0091] Memory allocation can be done in two ways: static and dynamic. Static allocation is usually defined at compile time, while dynamic allocation can be adjusted at runtime to adapt to changing needs during debugging.
[0092] 4. Security and permission settings:
[0093] On the MCU, the necessary security and permission control must be set when initializing the API management module. This includes setting different permission levels for API function access to ensure that only authenticated users and programs can call these API functions.
[0094] The security settings use a two-way authentication mechanism to ensure that there is no unauthorized access during the initialization process. The security protocol usually uses the Advanced Encryption Standard (AES) or similar encryption algorithms to protect the confidentiality of the data.
[0095] 5. Log system startup:
[0096] Start the logging system to record the initialization process of the API management module. This includes recording the loading time, configuration parameters, and any possible error information of each API function to facilitate subsequent debugging and optimization.
[0097] The log system not only helps locate problems, but also provides debuggers with detailed operation records, supporting more accurate performance analysis and debugging decisions.
[0098] By initializing the API management module on the MCU, the method of the present invention can efficiently manage and read variables at multiple addresses in the memory, providing a solid technical foundation for subsequent real-time data transmission and intelligent filtering. The successful implementation of this step ensures the stability and accuracy of the entire remote debugging process, improves the debugging efficiency of the system, and reduces possible risks during the debugging process.
[0099] S2. Design and implement a communication protocol for real-time transmission of the variable addresses and their corresponding variable values to be viewed.
[0100] For step S2, the key of the MCU remote real-time debugging method of the present invention is to design and implement a universal and flexible communication protocol for real-time transmission of variable addresses and their corresponding variable values that need to be viewed. The communication protocol supports multiple communication modes, both wired and wireless, and can adapt to various transmission requirements, including but not limited to CAN bus, Ethernet, Modbus, PROFIBUS, etc. It is the core of realizing efficient and secure data transmission between MCU and external devices, and ensures the correct reception and processing of data in subsequent steps by providing a reliable communication channel.
[0101] In this embodiment, the design and implementation of the communication protocol includes the following steps:
[0102] 1. Protocol framework design:
[0103] First, the overall framework of the communication protocol is defined, including CAN bus, Ethernet, Modbus, PROFIBUS, etc. Therefore, it is necessary to consider the characteristics of the communication method, including bandwidth, data packet size, transmission delay and other factors.
[0104] The protocol design needs to include data packet format, synchronization mechanism, error detection and correction strategy, and encryption measures.
[0105] 2. Data packet structure definition:
[0106] Packet header: Design the header information of the packet, including the synchronization byte, source address, destination address, and data type identifier.
[0107] Synchronization byte: used to identify the starting position of the data packet to ensure that the receiver can correctly identify and parse the data packet.
[0108] Source address and destination address: Used to identify the device IDs of the sender and receiver to ensure accurate routing of data packets.
[0109] Data packet body: contains the variable address and variable value actually transmitted.
[0110] Variable address: identifies the specific location in memory that needs to be debugged.
[0111] Variable value: the memory data read, used for debugging and analysis.
[0112] Data packet tail: includes a checksum or cyclic redundancy check (CRC) code, which is used to verify the integrity and correctness of the data packet.
[0113] 3. Transmission encryption and security mechanism:
[0114] Implement AES-256 or similar encryption technology to encrypt data packets to protect the confidentiality of data during transmission.
[0115] Set up security protocols, including message authentication codes (MACs) to ensure the integrity and source authenticity of data packets.
[0116] The two-way authentication mechanism ensures that only authorized devices can exchange data. The specific implementation includes using digital certificates or pre-shared keys for identity authentication on the communication link.
[0117] 4.Multi-protocol support and configuration:
[0118] CAN bus configuration: configure the node's baud rate, frame format (such as standard frame or extended frame), filter settings, etc. Ensure that the bus load is suitable for real-time data transmission requirements.
[0119] Ethernet configuration: Set network parameters such as IP address, subnet mask, default gateway, and optimize transmission rate and error detection mechanism to meet high bandwidth requirements.
[0120] Modbus configuration: supports the configuration of Modbus protocol, including setting the communication rate, slave address, register mapping, etc., to ensure adaptation to different industrial control scenarios.
[0121] PROFIBUS configuration: supports configuration of PROFIBUS protocol, setting bus speed, node address and data frame format to meet the needs of high-performance industrial automation applications.
[0122] Wireless communication configuration: Support wireless communication methods such as Wi-Fi, ZigBee, etc., and ensure efficient data transmission in a wireless environment by setting parameters such as transmission rate and channel selection.
[0123] 5. Error detection and correction strategy:
[0124] Implement multi-layer error detection mechanisms, using methods such as cyclic redundancy check (CRC) codes to detect data errors that may occur during transmission.
[0125] Design an automatic retransmission mechanism to automatically request retransmission of packets when errors are detected to ensure data integrity.
[0126] By designing and implementing a communication protocol supported by multiple protocols, the present invention can achieve efficient and secure data transmission between the MCU and external devices. The implementation of this protocol greatly improves the accuracy and response speed of debugging, reduces the error rate in data transmission, and enhances the security of the system. These improvements make the debugging process more flexible and reliable, and effectively improve the performance and user experience of the overall system.
[0127] S3. The external device parses the map file generated after compilation and extracts the variable name and the corresponding memory address mapping
[0128] With respect to step S3, in the MCU remote real-time debugging method of the present invention, the external device is responsible for parsing the map file generated after compilation to extract the variable name and the corresponding memory address mapping, so that in the subsequent debugging process, the specified variable value can be accurately accessed and read. Through this step, the external device can associate the compiled program structure with the physical storage address, providing necessary support for the debugging operation of the MCU. The core purpose of this step is to allow the user to debug by simply entering the variable name without knowing or caring about the actual address of the variable in the memory. Since the update of the program may cause the change of the memory address, these address mappings are updated by automatically parsing the map file to ensure the accuracy and practicality of the debugging. This step ensures that when the MCU performs the debugging task, it can accurately locate the relevant variables according to the request of the external device, thereby improving the accuracy and efficiency of the debugging.
[0129] In this embodiment, the specific steps of S3 are as follows:
[0130] 1. Load the map file:
[0131] The external device loads the map file through the file read operation. This file is generated by the compiler and contains the symbols of all static and global variables in the compiled program and their corresponding memory addresses. This file is an important source of the mapping relationship between variable names and physical addresses.
[0132] 2. Parse the file content:
[0133] The external device executes a pre-written parsing script or uses a specialized software tool to analyze the data structure in the map file and extract the name of each variable and the corresponding memory address. This parsing process requires accurate identification of the symbol definition part and address allocation part in the file to ensure the integrity and accuracy of the data.
[0134] 3. Storage mapping relationship:
[0135] The parsed variable names and memory address information are stored in the memory of the external device, using efficient data structures such as hash tables or key-value pairs to quickly retrieve and access these mapping relationships. This storage process provides basic data support for subsequent debugging operations.
[0136] 4. Convert variable names to memory addresses:
[0137] The user enters or selects the variable name to be viewed through a user interface. The external device immediately accesses a pre-stored mapping table to find the memory address corresponding to the variable name specified by the user. This conversion process is automatic and is achieved using a fast search function in a hash table or key-value pair collection to ensure response speed and accuracy.
[0138] The conversion process also includes an exception handling mechanism. If the input variable name does not exist in the mapping table, the system will provide an error prompt or suggestion to guide the user to re-enter or check the variable name. This increases the robustness of the system and reduces debugging failures caused by input errors.
[0139] 5. Send memory address to MCU:
[0140] Once the memory address is correctly extracted from the mapping table, the address information is encapsulated into a message format defined by the communication protocol, which includes adding necessary header information, address type identification, request identifier and security check code to ensure the integrity and security of the data packet during network transmission.
[0141] The data packet is sent to the MCU through the network or a directly connected communication interface. After receiving the data packet, the communication interface on the MCU side will parse it according to the communication protocol, identify the memory address, and read the corresponding variable value based on these addresses.
[0142] After receiving the memory addresses, the MCU directly accesses the memory locations of these addresses through internal API calls to obtain the required variable values. Then, this data is repackaged and sent back to the external device through the same secure communication protocol for the user to view and further analyze.
[0143] Through this step, the external device can effectively associate the compiled program variables with their physical addresses, ensuring that the MCU can correctly identify and process the variable data in the remote debugging request. This process provides a reliable data foundation for the implementation of the entire debugging method.
[0144] S4. Receive the variable address sent by the external device in real time through the communication protocol, and read the corresponding variable value from the MCU memory using the API function according to the received variable address.
[0145] For step S4, the MCU remote real-time debugging method of the present invention receives the variable address sent by the external device in real time through the communication protocol, and uses the API function to read the corresponding variable value from the MCU memory according to the received variable address. This step is the core link to ensure real-time monitoring and debugging of the MCU memory state, involving key technical operations such as data reception, analysis, memory reading and response data transmission.
[0146] In this embodiment, the specific steps of S4 are as follows:
[0147] 1. Communication interface monitoring:
[0148] Monitor the MCU's communication interface in real time to detect whether there is data coming in from external devices. Interface monitoring includes analyzing network status and identifying data packet types (such as variable requests or status updates) to ensure that the system can respond to external requests in a timely manner.
[0149] The data format includes but is not limited to variable address list, request identifier, priority information, etc. to support diverse debugging requirements.
[0150] 2. Data analysis and security verification:
[0151] Parse received data packets using predefined security protocols to ensure data integrity and authenticity. The parsing process requires verifying the checksum or digital signature of the data packet to confirm that the data has not been tampered with or damaged during transmission.
[0152] The parsed data should be consistent with the sender's request and meet the system's security policy. Only verified data will be further processed.
[0153] 3. Extract variable address:
[0154] Extract variable addresses from the parsed data, which are used to locate specific variable locations in the MCU memory. The extraction process may require processing address offsets and data alignment to ensure that the read data is accurate.
[0155] The resolution of variable addresses supports flexible address representation methods, including direct memory addresses, relative offset addresses, etc., to adapt to different memory layouts and data structures.
[0156] 4. Call the API function to read the variable value:
[0157] Call the API function that has been loaded in the MCU and pass in the extracted variable address list. The API function is responsible for reading the variable values corresponding to these addresses from the MCU memory.
[0158] API functions should support batch reading to improve data access efficiency and reduce performance loss caused by multiple readings.
[0159] 5.API function returns variable value:
[0160] The API function returns the requested variable value and passes it to the communication protocol function. This step ensures that the data can be processed and packaged correctly.
[0161] 6. Packaging response data:
[0162] The communication protocol function packages the variable values returned by the API and any related metadata (such as timestamp, read status) into a response data packet. The packaging process needs to ensure the consistency of the data format and support extended metadata fields to facilitate subsequent analysis and processing.
[0163] The response data packet must also contain verification information to ensure the integrity of the data during the return process.
[0164] 7. Return response data packet:
[0165] The response data packet is returned to the requesting external device through the configured communication interface. The return process uses the same security protocol for data encryption and integrity protection to ensure that the data will not be interfered with or tampered with during the return process.
[0166] The communication interface must support bidirectional data flow to ensure that new requests can be received during the data return process to achieve parallel processing and fast response.
[0167] 8. Operation log records:
[0168] After the data transfer is completed, the detailed log information of this operation is recorded, including the operation time, variable address, read data and any communication errors. The log record provides important data support for subsequent debugging and system optimization.
[0169] Log information should be stored in a secure storage medium and support retrieval by time and event type to help debuggers quickly locate problems and analyze system status.
[0170] Through the detailed steps in this embodiment, the MCU remote real-time debugging method realizes efficient and reliable data reception and processing. By receiving and parsing external requests in real time, the system can accurately read the variable values in the MCU memory and return the results to the external device safely and quickly. This mechanism not only improves the accuracy and real-time performance of debugging, but also enhances the security and stability of the system, providing a reliable remote debugging solution for debuggers.
[0171] S5. Use machine learning models to implement intelligent filtering based on the frequency, magnitude, and historical importance of variables.
[0172] For step S5, the MCU remote real-time debugging method of the present invention dynamically adjusts the priority of the monitoring variable through intelligent filtering technology. The key to intelligent filtering is to use a machine learning model to analyze the frequency of change, the amplitude of change, and the historical importance of the variable, and calculate the priority of each variable, so as to better allocate resources and attention during the debugging process. In addition, this step also sets the function of automatically adjusting the acquisition frequency, and provides a configurable debugging option to make the debugging process more flexible and efficient. This step is the core link to improve data processing efficiency and optimize the debugging strategy, and is closely related to the previous variable data receiving and reading steps.
[0173] In this embodiment, intelligent filtering is achieved through the following steps:
[0174] 1. Data collection and preprocessing:
[0175] The system first collects all variable data from the MCU memory, including current values, change history, and related metadata. These data are read through the previous API function and are ready for analysis.
[0176] Data preprocessing includes removing noise, filling missing values, and standardizing data to ensure that subsequent machine learning analysis can be performed on accurate data.
[0177] 2. Feature extraction:
[0178] Key features are extracted for each variable, including change frequency Freq, change amplitude Amp and historical importance Imp.
[0179] Change frequency Freq: Calculates the number of times a variable changes within a specific time window, which is used to evaluate the dynamic characteristics of the variable.
[0180] Amp: Evaluates the maximum change in a variable within a given period of time and measures its influence.
[0181] Historical Importance Imp: Based on historical data, evaluate the importance of variables in past debugging processes.
[0182] Feature extraction can be achieved using sliding windows, signal processing and other technical methods to ensure that the features accurately reflect the true behavior of the variables.
[0183] 3. Priority calculation:
[0184] Use machine learning models (such as decision trees, random forests, or neural networks) to calculate the priority P(V i ). The model weights different features based on preset weight coefficients α, β, γ:
[0185] P(V i)=α×Freq(Vx)+β×Amp(V i )+γ×Imp(V i )
[0186] α, β, and γ are adjustable weight coefficients used to dynamically adjust the priority according to specific debugging requirements.
[0187] Priority calculations need to be adjusted based on the system's current debugging strategy and resource allocation requirements to ensure that important variables receive sufficient attention.
[0188] 4. Machine learning model training and optimization:
[0189] Train the machine learning model using past debugging data to improve the model's prediction accuracy for variable priorities.
[0190] Improve the generalization ability of the model through cross-validation and hyperparameter optimization to ensure the applicability of the model in different debugging scenarios.
[0191] 5. Dynamic adjustment and strategy optimization:
[0192] Monitor system resources and debugging requirements in real time, and dynamically adjust intelligent filtering strategies.
[0193] Variables with higher priority will be set to be monitored in real time, while variables with lower priority may be updated less frequently or under certain conditions.
[0194] According to the actual performance of the target system, the machine learning model automatically performs response operations, dynamically adjusts the collection frequency, optimizes the use of system resources, and allows the debugger or the host computer to adjust the collection frequency of debugging data according to the actual working conditions by reserving configuration options in the communication protocol.
[0195] The logic of dynamic adjustment can be based on a feedback loop to regularly evaluate the effect of intelligent filtering and adjust the weight coefficients and feature extraction strategies.
[0196] 6. Filter result application:
[0197] The results of intelligent filtering are applied to subsequent variable monitoring and response steps. The system allocates debugging resources based on the filtering results to ensure high-priority processing of key variables.
[0198] Through intelligent filtering, the system can automatically generate variable monitoring reports, point out possible risks and abnormal situations, and provide more targeted debugging suggestions.
[0199] Through intelligent filtering, the MCU remote real-time debugging method of the present invention realizes efficient resource allocation and intelligent optimization of debugging strategies. Through the dynamic adjustment of variable priorities by machine learning models, the system can automatically identify and focus on key changes in massive variable data, greatly improving the efficiency and effect of debugging. This intelligent technology makes the debugging process not only more accurate, but also more forward-looking, helping debuggers to discover potential problems earlier and take corresponding measures.
[0200] S6. When the variable meets the preset trigger condition, the response operation is automatically executed
[0201] With respect to step S6, the MCU remote real-time debugging method of the present invention automatically executes the response operation through the preset trigger conditions. When the monitored variables meet the specific conditions, the system will trigger the corresponding response measures so as to deal with the problem as soon as it occurs. This step ensures the efficient automation and timely response to the problem in the debugging process, and forms an organic combination with the previous intelligent filtering and data monitoring process.
[0202] In this embodiment, the conditional triggering and response operation includes the following steps:
[0203] 1.Threshold setting and adjustment:
[0204] During system initialization, for each target variable V i Set the preset threshold T 1 and the change rate threshold T 2 These thresholds are set by the debugger according to specific application requirements to ensure their rationality and effectiveness.
[0205] The threshold can be adjusted through the remote configuration interface to flexibly adapt to different debugging stages and system states. For example, a lower threshold may be required in the debugging stage to capture more information, while a higher threshold may be required in the production stage to avoid too many false positives.
[0206] 2. Real-time monitoring and difference calculation:
[0207] The system monitors each target variable V in real time i The current value and the previously recorded value V prev By calculating the absolute difference between the two |V i -V prev |, to assess the degree of change in the variable.
[0208] Difference calculation is a key step in identifying abnormal changes in variables, and its results directly affect subsequent trigger judgments and response operations.
[0209] 3. Change rate calculation:
[0210] Calculate the rate of change of a variable using the formula: Where Δt is the time interval. The rate of change provides a quantitative assessment of how quickly a variable changes, helping to identify abnormal conditions that change rapidly.
[0211] In the calculation of the rate of change, the consistency of the sampling time and the continuity of the data must be considered to ensure the accuracy of the calculation results.
[0212] 4. Trigger condition judgment:
[0213] Check whether the calculated difference and change rate exceed the preset threshold T 1 and T 2 , the trigger condition formula is:
[0214]
[0215] In the formula, the logical OR operator ∨ ensures that the response action is triggered as long as any condition is met, providing a more flexible and accurate exception identification mechanism.
[0216] 5. Perform response actions:
[0217] If any trigger condition is met, the system automatically executes the predetermined response operation. These operations include:
[0218] Send alarm: Send an alarm signal to the debugger or related systems to indicate possible problems.
[0219] Record variable status: record the current variable status in the system log to provide data support for subsequent analysis.
[0220] Execute pre-set protocols: If an immediate response is required, execute pre-set repair or safety protocols to quickly restore system stability.
[0221] The execution strategy of response actions can be customized according to different debugging scenarios to improve the robustness and automation level of the system.
[0222] 6. Event Logging:
[0223] The detailed information of the triggering event and its related response is recorded in the debugging system log, including the triggering time, the triggered variable, the triggering value, and the response measures taken.
[0224] Logging is not only an important means of problem tracking, but also an important reference for subsequent optimization of debugging strategies and system design.
[0225] By setting preset trigger conditions and automatic response mechanisms, the MCU remote real-time debugging method of the present invention realizes a high degree of automation and intelligence in the debugging process. The system can respond immediately when an abnormal situation occurs, reducing the need for human intervention and improving the speed and accuracy of problem handling. This method effectively improves the stability and security of the system and provides debuggers with more comprehensive debugging support and more powerful system protection.
[0226] The method of the present invention provides an efficient, flexible and safe way to perform remote real-time debugging of MCU. Through intelligent filtering and conditional triggering mechanism, not only the efficiency of data processing is improved, but also the real-time and accuracy of the debugging process are ensured. In addition, the method reduces manual intervention, enhances the automation level of the system, and significantly improves the speed of problem location and resolution during the debugging process.
[0227] In a preferred embodiment of the present invention, the API function supports remote updating, so that the functions of the MCU system can be flexibly adjusted and expanded according to requirements.
[0228] Through remote updates, users can update APIs in a timely manner based on system requirements or the introduction of new features without physically touching the device. This approach ensures the security of the update process and the reliability of the code through secure communication protocols and strict verification steps.
[0229] In this embodiment, the remote update of the API function includes the following steps:
[0230] 1. Receive update request:
[0231] The system monitors update requests from external devices in real time and receives update instructions through a secure communication protocol. The request contains the new code of the API function and its metadata, such as version number, developer information, and update log.
[0232] The communication protocol should support TLS (Transport Layer Security) or other encryption technologies to ensure data security and integrity during transmission.
[0233] 2. Perform security audits:
[0234] Perform a security audit on the received API code on the MCU, first verify the code signature to ensure the authenticity and integrity of the code source.
[0235] The signature is verified using a public key infrastructure (PKI) to prevent the code from being tampered with or forged.
[0236] Check the metadata in the update request in detail and compare it with the existing system configuration to ensure the legitimacy and rationality of the update.
[0237] 3. Code compatibility and vulnerability scanning:
[0238] Use static analysis tools and dynamic analysis methods to check the compatibility of new API codes to ensure their compatibility with existing systems and dependent libraries.
[0239] Scan the code for potential security vulnerabilities, such as buffer overflows, unhandled exceptions, and unauthorized access, to ensure that the code meets system security standards.
[0240] During this process, tools such as Coverity and SonarQube can be used for automated analysis to improve scanning efficiency and accuracy.
[0241] 4. Performance testing:
[0242] Perform performance tests on new API functions in a sandbox environment to evaluate their memory usage, CPU usage, and execution speed.
[0243] Use benchmarking methods to measure the execution efficiency of your APIs and ensure that new code runs efficiently in resource-constrained MCU environments.
[0244] Record test results, compare with existing versions, and evaluate the performance improvements and resource consumption of the new API.
[0245] 5. Decide on deployment:
[0246] The results of comprehensive performance testing and security audits are used to determine whether to deploy the new API to the MCU.
[0247] If the new API passes all tests and reviews, the system will deploy it to the runtime environment and replace the old version.
[0248] If any issues or security risks are found, the update will be aborted and the relevant information will be logged for analysis and correction.
[0249] 6. Update event records and notifications:
[0250] After a successful update, the system automatically records the update event to the system log, including the update time, update content, executor information, and result status.
[0251] The system can optionally notify external devices of the update status and provide detailed update reports and log files for subsequent monitoring and management.
[0252] This step ensures that all update events are logged for future auditing and issue tracking.
[0253] By remotely updating API functions, the present invention significantly improves the flexibility and maintainability of the MCU system. Users can introduce new functions or fix vulnerabilities in a timely manner without actually operating the hardware, reducing maintenance costs and operational risks. Secure communication protocols and strict code audit processes ensure the security of the update process, preventing the injection of malicious code and the generation of potential security threats.
[0254] This preferred embodiment provides powerful functional expansion capabilities for MCU applications, enabling developers to better manage and optimize system performance in complex and ever-changing environments. This update mechanism is suitable for a wide range of embedded system applications and promotes continuous improvement and stable operation of the system.
[0255] In a preferred embodiment of the present invention, the communication protocol uses encryption technology to protect the transmission security of data packets, ensuring that the data maintains integrity and confidentiality during transmission between the MCU and the external device.
[0256] The protocol protects the transmission security of data packets through encryption and authentication technology to prevent unauthorized access and data tampering. The encrypted communication protocol ensures that every data packet transmitted is safe and reliable through steps such as secure key sharing, data encryption, integrity verification, and message authentication code.
[0257] In this embodiment, the encryption and transmission process of the communication protocol includes the following steps:
[0258] 1. Generate encryption keys:
[0259] A shared encryption key is generated between the MCU and the external device using a secure key generation algorithm such as Diffie-Hellman key exchange. This process ensures that the key cannot be stolen by a third party.
[0260] The key generation process uses a random number generator to generate high-strength keys, enhancing the security of communications.
[0261] The specific steps are:
[0262] 1) The MCU and the external device each generate a pair of public and private keys.
[0263] 2) By exchanging public keys, both parties calculate a shared key, ensuring that the same key can be securely generated even in an insecure network environment.
[0264] 2. Data encryption:
[0265] Use the AES-256 encryption standard to encrypt the data to be transmitted, including variable addresses, variable values, and related metadata. AES-256 is a symmetric encryption algorithm that provides high security strength.
[0266] The encryption steps include:
[0267] 1) Divide the data to be encrypted into blocks to adapt to the block encryption mode of the AES algorithm.
[0268] 2) Apply the key to encrypt each data block to generate an encrypted data packet.
[0269] 3. Append timestamp and sequence number:
[0270] Append a timestamp and sequence number to each encrypted data packet to prevent replay attacks and ensure the integrity and order of the data packets.
[0271] The timestamp is used to identify the time when the data packet was generated, helping the receiver to verify the timeliness of the data.
[0272] Sequence numbers ensure that data packets arrive and are processed in the correct order, preventing packet loss or duplication.
[0273] 4. Message Authentication Code (MAC) added:
[0274] A message authentication code (MAC) is added to the end of the data packet, and HMAC (hash-based message authentication code) technology is used to verify the integrity and source authenticity of the data packet.
[0275] The MAC calculation steps are:
[0276] 1) Calculate a hash value using the shared key and the packet contents.
[0277] 2) The calculated MAC is appended to the packet as part of the data integrity verification.
[0278] 5. Message Authentication Code Verification:
[0279] After receiving the encrypted data packet, the MCU verifies the correctness of the message authentication code before decrypting it to confirm the integrity and authenticity of the data packet.
[0280] The verification steps include:
[0281] 1) Recalculate the MAC of the received packet using the shared key.
[0282] 2) Compare the calculated MAC with the MAC attached to the data packet. If they are consistent, it is confirmed that the data packet has not been tampered with.
[0283] 6. Data decryption:
[0284] The data packet is decrypted using the previously shared key through the AES-256 decryption algorithm to extract the variable address and variable value.
[0285] The decryption process is:
[0286] 1) Use the shared key to decrypt the data block by block and restore the original variable address and value.
[0287] 2) Check whether the decrypted data conforms to the expected format and content to ensure that the data is not damaged.
[0288] 7. Data integrity check:
[0289] After completing the secure transmission of data, a data integrity check is performed to ensure that the received data is consistent with the original data before sending.
[0290] The verification process may include additional verification and validation steps, such as using CRC or other verification methods, to ensure that the data has not been accidentally altered during transmission.
[0291] Through the above secure communication protocol, the present invention effectively ensures the security of data transmission between the MCU and external devices. Each data packet is encrypted and integrity verified during transmission, preventing potential man-in-the-middle attacks and data tampering. This not only improves the security and stability of the system, but also makes the debugging process more reliable.
[0292] This encrypted communication protocol provides strong security protection and is particularly suitable for embedded systems and IoT device applications that require high security and high integrity. This implementation not only protects sensitive data, but also enhances the system's resistance to network attacks, providing users with a safer operating environment.
[0293] The MCU remote real-time debugging device described below and the MCU remote real-time debugging method described above can refer to each other.
[0294] Please see attached Figure 3 The present invention also provides a MCU remote real-time debugging device, comprising:
[0295] The API management module 100 is configured on the MCU and is used to load and manage API functions for reading multiple memory addresses;
[0296] The communication interface module 200 implements a communication protocol for transmitting variable addresses and their corresponding variable values in real time;
[0297] A map parsing module 300 is configured to parse the map file generated after compilation and extract variable names and corresponding memory address mappings;
[0298] The data receiving module 400 receives the variable address sent by the external device in real time through the communication interface module, and transmits the received address to the API management module;
[0299] The data reading module 500 works in cooperation with the API management module to read the corresponding variable value from the MCU memory according to the variable address received from the data receiving module;
[0300] The intelligent filtering module 600 uses a machine learning model to calculate the priority of each variable according to the variable's change frequency Freq, change amplitude Amp, and historical importance Imp;
[0301] The trigger condition module 700 is configured to monitor the variable priority output by the intelligent filtering module, and automatically activate a response operation when the variable value meets a preset trigger condition, including sending an alarm, recording a log, or returning the variable value to a requested external device.
[0302] The device of this embodiment can be used to execute the above method embodiment, and its principles and technical effects are similar, which will not be repeated here.
[0303] Please see attached Figure 4 The present invention further provides a computer device 40, comprising: a processor 41 and a memory 42, wherein the memory 42 stores a computer program executable by the processor, and when the computer program is executed by the processor, the above method is executed.
[0304] The present invention further provides a storage medium 43 on which a computer program is stored. When the computer program is run by the processor 41, the above method is executed.
[0305] Among them, the storage medium 43 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.
[0306] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A remote real-time debugging method for MCU, It is characterized in that The following steps are involved: Initialize the API management module on the MCU and load the API functions for reading multiple memory addresses; Design and implement communication protocols for real-time transmission of variable addresses and their corresponding variable values to be viewed; The external device parses the map file generated after the program is compiled to obtain the mapping relationship between the variable name and its memory address; The external device sends the variable address to the MCU in real time through the communication protocol, and the MCU calls the API function to read the corresponding variable value from the MCU memory, encapsulates it and sends it back to the external device; Using machine learning models, intelligent filtering is implemented based on the variable change frequency Freq, change amplitude Amp, and historical importance Imp, where the priority P(V i ) is calculated as: P(V i )=α×Freq(V i )+β×Amp(V i )+γ×Imp(V i ) Among them, α, β, γ are weight coefficients; When a variable meets the preset trigger conditions, the response action is automatically executed, including but not limited to sending an alarm, recording a log, or returning the variable value to the requested external device.
2. The MCU remote real-time debugging method according to claim 1, It is characterized in that The API function supports remote update and includes the following steps: Receiving an API function update request sent by an external device through a secure communication protocol, wherein the request includes an updated API function code and metadata thereof; Perform security audits on the MCU, including but not limited to code signature verification to ensure the authenticity and integrity of the update code source; Conduct code compatibility and security vulnerability scans to assess whether new API codes comply with predetermined security standards and operating specifications; Perform performance tests on API function codes, including but not limited to memory usage and execution speed tests, to ensure that the new API runs effectively in a resource-constrained MCU environment; Based on the results of performance testing and security audits, decide whether to deploy new API code to the MCU; After the API is successfully updated, the update event is recorded to the system log, and the external device is optionally notified of the update status for subsequent monitoring and management.
3. The MCU remote real-time debugging method according to claim 1, It is characterized in that The communication protocol includes using encryption technology to encrypt the transmitted data packets to ensure the security of the data transmission process, including the following steps: Generate encryption keys and use a secure key generation algorithm to securely share keys between the MCU and external devices; Use encryption standards to encrypt data that needs to be transmitted, including variable addresses, variable values, and any related metadata; Add a timestamp and sequence number to each encrypted data packet to prevent replay attacks and ensure the integrity and order of the data packets; Add a message authentication code at the end of the data packet and use HMAC technology to ensure that the data packet has not been tampered with during transmission; After the MCU receives the encrypted data packet, it verifies the correctness of the message authentication code before decrypting it to confirm the integrity and authenticity of the data packet; Decrypt the data packet to extract variable addresses and values, decrypting them using the previously shared key via the AES-256 decryption algorithm; After completing the secure transmission of data, a data integrity check is performed to ensure that the received data is consistent with the original data before sending.
4. The MCU remote real-time debugging method according to claim 1, It is characterized in that The communication protocols include but are not limited to CAN bus, Ethernet, Modbus, and PROFIBUS.
5. The MCU remote real-time debugging method according to claim 1, It is characterized in that The step of the external device parsing the map file generated after compilation and extracting the variable name and the corresponding memory address mapping includes: The external device loads the map file through the file reading operation, which contains the symbols of all static and global variables in the compiled program and their corresponding memory addresses; The external device executes the parsing script or uses the software tool to analyze the data structure in the map file and extract the variable name and the corresponding memory address; Store the parsed variable names and memory address information in a hash table or key-value pair set; Enter the variable name you want to view, and the external device will convert the variable name into the corresponding memory address and send it to the MCU through the designed communication protocol, ensuring that the MCU can access the correct memory address as needed to obtain the variable data.
6. The MCU remote real-time debugging method according to claim 1, It is characterized in that The step of receiving the variable address sent by the external device in real time through the communication protocol, and reading the corresponding variable value from the MCU memory using the API function according to the received variable address includes: Real-time monitoring of the communication interface to detect whether there is data incoming from external devices. The data format includes but is not limited to variable address list and request identifier; Parse received data using secure protocols to ensure that the data has not been tampered with or corrupted in transit, including verifying the checksum or digital signature of the data; Extract variable addresses from the parsed data and locate corresponding variable values in the MCU memory based on these addresses; Call the API function loaded in the MCU in advance, pass in the extracted variable address list, and the function is responsible for reading the variable values corresponding to these addresses from the MCU's memory; The API function returns the requested variable value and passes it to the communication protocol function; The communication protocol function packages the variable values returned by the API into a response data packet, including relevant metadata; The response data packet is returned to the requesting external device through the configured communication interface, using the same security protocol for data encryption and integrity protection; After the data transfer is completed, the detailed log information of this operation is recorded, including the operation time, variable address, data read, and any communication errors.
7. The MCU remote real-time debugging method according to claim 1, It is characterized in that The trigger condition includes the variable value exceeding the preset threshold value T 1 Or the rate of change exceeds the preset threshold T 2 , specifically including the following steps: During system initialization, a preset threshold T is set 1 and T 2 ,The threshold is adjusted according to the debugging requirements through the remote configuration interface; Real-time monitoring of each target variable V i The current value and the previously recorded value V prev Compare and calculate the difference between the two |V i -V prev |; Calculate the rate of change of the variable, that is, the difference in change divided by the time interval Δt, the formula is: Check whether the calculated difference and change rate exceed the preset threshold T 1 and T 2 , the trigger condition formula is: If any trigger condition is met, automatically execute the predetermined response action, including but not limited to sending an alarm, recording the variable status to the system log, or executing the preset repair or security protocol; The detailed information of the triggering event and its related response is recorded in the debugging system log, including the triggering time, the triggered variable, the triggering value, and the response measures taken.
8. An MCU remote real-time debugging device, used to implement the MCU remote real-time debugging method according to any one of claims 1 to 7, It is characterized in that include: An API management module, configured on the MCU, is used to load and manage API functions for reading multiple memory addresses; The communication interface module implements a communication protocol for real-time transmission of variable addresses and their corresponding variable values; The map parsing module is configured to parse the map file generated after compilation and extract the variable name and the corresponding memory address mapping; The data receiving module receives the variable address sent by the external device in real time through the communication interface module, and transmits the received address to the API management module; The data reading module works in conjunction with the API management module to read the corresponding variable value from the MCU memory according to the variable address received from the data receiving module; The intelligent filtering module uses a machine learning model to calculate the priority of each variable based on the variable's change frequency Freq, change amplitude Amp, and historical importance Imp; The trigger condition module is configured to monitor the variable priority output by the intelligent filtering module and automatically activate a response action when the variable value meets a preset trigger condition, including sending an alarm, recording a log, or returning the variable value to a requested external device.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Equipment debugging system based on serial port
CN121434049A
Embedded processor natural language debugging system and method based on JTAG real-time data exchange channel
CN122414132A
