Embedded device debugging method and system based on real-time environment

By constructing a real-time embedded device debugging platform, and combining intelligent gateways and debugging value representation data standards, the problems of unreliable response time and low efficiency in embedded device debugging are solved, achieving efficient and reliable debugging and fault recovery, and optimizing real-time task execution.

CN120973652APending Publication Date: 2025-11-18SOUTHERN POWER GRID DIGITAL GRID RESEARCH INSTITUTE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510841079.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing embedded device debugging methods lack simulation in real-time environments, resulting in unreliable response times, increased hardware risks, and low debugging efficiency.

Method used

We build an embedded device debugging platform based on a real-time environment. It seamlessly connects with embedded devices through a smart gateway, uses device profiling and debugging value representation data standards to screen high-reliability data, performs real-time data analysis and visualization, and combines the compilation module for simulation and modeling to optimize the debugging process.

Benefits of technology

Significantly improves debugging efficiency and equipment reliability, reduces resource burden, ensures rapid fault recovery, prevents security vulnerabilities, optimizes real-time task execution, improves response time reliability, and achieves intelligent and efficient debugging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973652A_ABST
    Figure CN120973652A_ABST
Patent Text Reader

Abstract

The invention discloses an embedded device debugging method and system based on a real-time environment, and belongs to the technical field of embedded systems. The invention discloses an embedded equipment debugging method based on a real-time environment. The method comprises the following steps: S1, constructing a compiling environment; s2, obtaining an embedded equipment debugging platform based on a real-time environment; s3, deploying an intelligent gateway; s4, debugging the embedded equipment; and S5, carrying out analysis and visual display on the debugging data of the embedded equipment. According to the invention, the problems of unreliable response time, increased hardware risk and low debugging efficiency in the prior art are solved. According to the method, the debugging efficiency is remarkably improved, the burden on resource-limited equipment is reduced, the real-time task execution efficiency is optimized, the development efficiency and reliability of embedded equipment are improved, the reliability of response time is improved, potential security holes can be prevented from being utilized, and it is ensured that cache service can automatically capture and cache hot data; and the debugging efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of embedded systems, in particular to an embedded device debugging method and system based on a real-time environment. BACKGROUND

[0002] An embedded device generally refers to an embedded system, which is composed of hardware and software and can operate independently. The software content only includes a software running environment and an operating system. The hardware content includes signal processors, memories, communication modules, and other aspects. Compared with general computer processing systems, embedded systems have great differences. They cannot realize large-capacity storage functions because there is no large-capacity medium to match them. Most storage media used are E-PROM, EEPROM, etc. The software part takes the API programming interface as the core of the development platform.

[0003] A Chinese patent with publication number CN117093492A discloses a debugging method, device, equipment and medium for an embedded system, which includes: obtaining an XCP debugging command sent by a preset bus analysis tool; writing a script file based on debugging information extracted from the XCP debugging command, and calling the Lauterbach script file to debug the measured embedded system to obtain a debugging result; encapsulating the debugging result sent by the Lauterbach into first XCP frame data, and sending the first XCP frame data to the preset bus analysis tool, so that the preset bus analysis tool performs data analysis on the debugging result represented by the first XCP frame data. The embedded system is debugged by combining the Lauterbach and the XCP protocol, which has the versatility of multi-platform application, improves the debugging efficiency, and reduces the debugging difficulty and complexity.

[0004] The above-mentioned patent lacks real-time environment simulation during embedded device debugging, which may easily lead to unreliable response time, increased hardware risk, and low debugging efficiency, thus failing to meet the existing requirements. Therefore, the present application proposes an embedded device debugging method and system based on a real-time environment. SUMMARY

[0005] The application aims to provide a real-time environment-based embedded device debugging method and system, which can directly diagnose problems in hardware activities, significantly improve debugging efficiency, effectively diagnose hardware driver or interface communication failures, reduce the burden on resource-constrained devices, adapt to different hardware platforms, reduce the requirements on embedded device resources, optimize real-time task execution efficiency, significantly improve the development efficiency and reliability of embedded devices, ensure that database services can be quickly restored in the event of a failure, improve the reliability of response time, prevent potential security vulnerabilities from being exploited, ensure that cache services can automatically capture and cache popular data, reduce access pressure on backend storage, improve debugging efficiency, and solve the problems raised in the above background art.

[0006] To achieve the above-mentioned purpose, the application provides the following technical scheme: a real-time environment-based embedded device debugging method, comprising the following steps:

[0007] S1: constructing a compilation environment for real-time environment-based embedded device debugging;

[0008] S2: performing general scenario debugging on the interface of the embedded device, and obtaining a real-time environment-based embedded device debugging platform by using the compilation environment and the general scenario debugging result of the interface after the debugging is completed;

[0009] S3: deploying an intelligent gateway, testing the intelligent gateway, and ensuring that it can be seamlessly connected with the embedded device;

[0010] S4: connecting the embedded device with the real-time environment-based embedded device debugging platform by using the intelligent gateway, and debugging the embedded device;

[0011] S5: obtaining real-time environment-based embedded device debugging data and performing analysis, and visually displaying the analysis result after the analysis is completed.

[0012] Preferably, the obtaining of the real-time environment-based embedded device debugging data and the analysis thereof specifically comprises:

[0013] The real-time environment-based embedded device debugging data is obtained and preprocessed, and the preprocessing includes data cleaning and accurate data screening;

[0014] The real-time environment-based embedded device debugging data is sorted according to the acquisition time, and the data obtained by preprocessing is combined with the time sequence of data acquisition to find real-time problems of the embedded device;

[0015] Real-time logs are output by using the interface of the embedded device, the execution process of the embedded device is monitored, the instruction execution cycle of the embedded device is collected in real time, the key path code of the embedded device is optimized, and the memory usage and interrupt delay data of the embedded device are analyzed.

[0016] Preferably, the deployment of the intelligent gateway, the intelligent gateway is tested, specifically including:

[0017] The deployment of the intelligent gateway, the compatibility of the intelligent gateway is tested, to ensure that it can be seamlessly connected with embedded devices and embedded device debugging platform based on real-time environment;

[0018] Concurrent debugging of intelligent gateway under multi-task, simulating the multi-task concurrent situation that intelligent gateway may face in actual environment, testing the performance and stability of intelligent gateway.

[0019] Preferably, the interface of the embedded device is debugged in a general scene, specifically including:

[0020] In the asynchronous transceiving scene of serial communication device, the embedded device exchanges data through asynchronous serial communication protocol;

[0021] In the full-duplex communication scene of serial peripheral interface, the embedded devices realize bidirectional simultaneous communication through SPI protocol;

[0022] In the communication scene of serial data bus between chips on the same board, the chips communicate through serial data bus;

[0023] In the debugging scene of audio codec and digital audio processor, the serial communication interface is used to connect the debugging device and the target system.

[0024] Preferably, S4: using the intelligent gateway to connect the embedded device with the embedded device debugging platform based on real-time environment, and debugging the embedded device, including:

[0025] Based on the device image of the embedded device, generating the standard of the characterization data of the debugging value;

[0026] Based on the standard of the characterization data of the debugging value, tracing the characterization data of the debugging value of the embedded device;

[0027] The characterization credibility of each target data in the characterization data of the debugging value is calculated by the following formula:

[0028]

[0029] Wherein, Rep i is the characterization credibility of the i-th target data in the characterization data of the debugging value, i=1,2,3,…,n, n is the total number of target data in the characterization data of the debugging value, A i,t is the characterization degree of the characterization credible basis of the t-th modal of the i-th target data, k i,t is the preset weight corresponding to the characterization degree of the characterization credible basis of the t-th modal of the i-th target data, m ia total number of modalities representing a trustworthiness of the ith target data;

[0030] analyzing a distribution of representation debugging values of the target data whose representation trustworthiness exceeds the threshold value;

[0031] sequentially matching the distribution of representation debugging values with a plurality of standard distribution of representation debugging values in a standard distribution of representation debugging value library respectively, and calculating a utilization value degree by the following formula each time of matching:

[0032] val j =f(s j )

[0033] wherein, val j is the utilization value degree when matching the distribution of representation debugging values with the jth standard distribution of representation debugging values in the standard distribution of representation debugging value library, f(…) is a preset utilization value degree conversion function, S j is a matching degree of matching the distribution of representation debugging values with the jth standard distribution of representation debugging values in the standard distribution of representation debugging value library;

[0034] based on the debugging value decision knowledge corresponding to the standard distribution of representation debugging values with the maximum utilization value degree, deciding a debugging value according to the target data whose representation trustworthiness exceeds the threshold value;

[0035] based on the debugging value, continuously guiding a process of debugging the embedded device.

[0036] Preferably, the analysis result is visualized after the analysis is completed, including:

[0037] generating a visualized display model based on the analysis result;

[0038] speculating a pre-attention point distribution of the user in the visualized display model;

[0039] merging each pre-attention point in the pre-attention point distribution into a plurality of pre-attention blocks according to the association relationship between each two pre-attention points in the pre-attention point distribution by comparing with an association relationship-merging rule library;

[0040] sequentially traversing each pre-attention block;

[0041] each time of traversing, based on the block characteristics, decision-making ideas, idea waiting time and triggering ideas of the traversed pre-attention block;

[0042] after sequentially traversing each pre-attention block, outputting the visualized display model to the user;

[0043] when the idea of the user viewing the visualized display model completely matches any triggering idea, displaying the corresponding pre-attention block to the user after the corresponding idea waiting time.

[0044] The embedded device debugging system based on real-time environment is applied in the embedded device debugging method based on real-time environment, and comprises:

[0045] A compiling module is configured to build a compiling environment for the embedded device debugging based on real-time environment;

[0046] A building module is configured to obtain an embedded device debugging platform based on real-time environment by using the compiling environment and the general scene debugging result of the interface;

[0047] A debugging module is configured to perform code debugging on the internal part of the embedded device by using the embedded device debugging platform based on real-time environment, and simulate the running conditions of the embedded device in different scenes during the debugging process;

[0048] A visualizing module is configured to store and backup data and perform visualized display on the data.

[0049] Preferably, the compiling module comprises:

[0050] An environment linker is configured to combine a plurality of target files and related library functions into a single executable file;

[0051] An environment compiler is configured to convert the written source code into machine language or binary code that can be executed by the device environment hardware;

[0052] An environment simulator is configured to simulate the running and interaction of the device environment hardware, and simulate and test the functions, performance and system behavior of the device environment hardware in the absence of actual hardware;

[0053] An environment debugger is configured to perform single-step execution, view variable values and set breakpoints during program running.

[0054] Preferably, the visualizing module comprises:

[0055] A database is configured to store and backup data, and configure access permissions, connection numbers and cache strategies;

[0056] A monitoring unit is configured to configure corresponding monitoring rules and alarm thresholds, and monitor the debugging process of the embedded device;

[0057] An analysis unit is configured to analyze various performance data of the embedded device collected by the embedded device debugging platform based on real-time environment, such as CPU usage, memory occupation, network bandwidth, fault events and log information. By analyzing these data, potential performance bottlenecks and fault points can be identified, which provides a basis for optimization and maintenance.

[0058] The visualization unit is used for visualizing the data monitored by the monitoring unit and the debugging process and result of the embedded device by using a chart.

[0059] Preferably, the analysis unit comprises:

[0060] The annular buffer is used for covering the historical data of the embedded device, so that the real-time updating of the debugging data of the embedded device based on the real-time environment is ensured.

[0061] The time stamp of the debugging data of the embedded device based on the real-time environment is added, and the sampling point is marked, so that the time sequence of the acquired data is aligned.

[0062] The time sequence of the interruption to the task execution is captured by the logic analyzer, and the real-time problem of the embedded device is analyzed and investigated.

[0063] The real-time log is output by using the interface of the embedded device, and the priority inversion or resource competition of the embedded device is analyzed.

[0064] The execution flow of the embedded device is monitored, the instruction execution cycle of the embedded device is collected in real time, the communication error of the embedded device is located, the key path code of the embedded device is optimized, and the CPU utilization and memory leakage of the embedded device are counted.

[0065] Compared with the prior art, the present application has the following beneficial effects:

[0066] The present application can directly diagnose problems in hardware activities through online debugging, significantly improves the debugging efficiency, supports real-time signal capture and analysis by closely combining the hardware environment, effectively diagnoses hardware driver or interface communication faults, reduces the burden on resource-constrained devices, can adapt to different hardware platforms, reduces the requirements on the resources of the embedded device, identifies code hotspots, memory leakage and response delay through the analysis of the debugging data of the embedded device, optimizes the real-time task execution efficiency, significantly improves the development efficiency and reliability of the embedded device through the simulation and emulation of the environment by the compiling module, ensures the rapid recovery of the database service when a fault occurs through the backup and recovery of the database, improves the reliability of the response time, prevents potential security vulnerabilities from being exploited through the strengthening of the security protection of the database, ensures that the cache service can automatically capture and cache hot data, reduces the access pressure on the backend storage, and improves the debugging efficiency.

[0067] By combining the device image and the debugging value characterization data standard, high credibility data can be effectively screened as a debugging reference, ensuring the comprehensiveness and effectiveness of the debugging activity. Based on the debugging value decision, the platform can continuously guide the debugging process, avoid irrelevant interference, and significantly improve the debugging efficiency and device performance. Finally, the long-term stability and efficiency of the device are ensured, the manual intervention is reduced, and the debugging quality is improved. The intelligent level is improved and the device performance is optimized, which meets the deep debugging needs of embedded devices.

[0068] By constructing a visual display model to show the analysis results to the user, the user's pre-attention point distribution is speculated, and the pre-attention points are merged into multiple pre-attention blocks. When the user's viewing idea of the visual display model completely matches any trigger idea, the corresponding pre-attention block is displayed to the user after the corresponding idea waiting time, ensuring that the user has enough independent thinking time, improving the decision-making efficiency, and greatly improving the humanization, comprehensiveness and intelligence of the visual output of the analysis results. BRIEF DESCRIPTION OF DRAWINGS

[0069] Fig. 1 The figure is a schematic diagram of the embedded device debugging method based on the real-time environment of the present application.

[0070] Fig. 2 The figure is a schematic diagram of the embedded device debugging system based on the real-time environment of the present application. DETAILED DESCRIPTION

[0071] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0072] In order to solve the problem of lack of real-time environment simulation in the prior art during the actual use of embedded device debugging, which easily leads to unreliable response time, increased hardware risk and low debugging efficiency, please refer to Figs. 1-2 The technical solutions of the present application are as follows:

[0073] The embedded device debugging method based on the real-time environment comprises the following steps:

[0074] S1: Construct a compilation environment for embedded device debugging based on the real-time environment;

[0075] S2: Perform general scene debugging on the interface of the embedded device, and obtain an embedded device debugging platform based on the real-time environment by using the compilation environment and the general scene debugging result of the interface after the debugging is completed;

[0076] S3: Deploying the intelligent gateway and testing the intelligent gateway to ensure that it can seamlessly interface with the embedded device. During the debugging process, comparative testing of the hardware, software interface, communication protocol, data format, etc. of different versions of the gateway will be conducted to verify their compatibility and interoperability;

[0077] S4: Using the intelligent gateway to connect the embedded device to the real-time environment-based embedded device debugging platform to debug the embedded device;

[0078] S5: Obtaining real-time environment-based embedded device debugging data and analyzing it, and then visualizing the analysis results.

[0079] Obtaining real-time environment-based embedded device debugging data and analyzing it, specifically including:

[0080] Obtaining real-time environment-based embedded device debugging data and preprocessing the obtained data, which includes data cleaning and accurate data filtering to ensure the accuracy and usability of the data;

[0081] Sorting the real-time environment-based embedded device debugging data according to the time of acquisition, and using the preprocessed data combined with the time sequence of data acquisition to find real-time problems of the embedded device;

[0082] Using the interface of the embedded device to output real-time logs, monitoring the execution flow of the embedded device, collecting the instruction execution period of the embedded device in real time, optimizing the key path code of the embedded device, and analyzing the memory usage and interrupt delay data of the embedded device.

[0083] Deploying the intelligent gateway and testing the intelligent gateway, specifically including:

[0084] Deploying the intelligent gateway and testing the compatibility of the intelligent gateway to ensure that it can seamlessly interface with the embedded device and the real-time environment-based embedded device debugging platform;

[0085] During the debugging process, comparative testing of the hardware, software interface, communication protocol, data format, etc. of different versions of the gateway will be conducted to verify their compatibility and interoperability.

[0086] Concurrent debugging of the intelligent gateway under multiple tasks, simulating the multiple task concurrency that the intelligent gateway may face in the actual environment, testing the performance and stability of the intelligent gateway. During the debugging process, various task scenarios will be designed, including high-concurrency data transmission, multi-device connection management, real-time data processing, etc. to test the processing capacity and response speed of the intelligent gateway under multiple task concurrency.

[0087] General scenario debugging of the interface of the embedded device, specifically including:

[0088] In the asynchronous transceiving scenario of serial communication devices, embedded devices exchange data through asynchronous serial communication protocols. The asynchronous communication feature is that the sender and receiver each have independent clock sources, so data transmission and reception do not need to be strictly synchronized;

[0089] In the full-duplex communication scenario of serial peripheral interface, embedded devices realize bidirectional simultaneous communication through the SPI protocol. SPI is a high-speed, full-duplex, and synchronous communication bus used to connect microcontrollers and peripheral devices (such as memories, sensors, etc.). In full-duplex mode, devices can simultaneously send and receive data, improving communication efficiency;

[0090] In the communication scenario of serial data bus between chips on the same board card, chips communicate through a serial data bus to share data and control. The bus protocol allows chips to communicate efficiently and at low cost within the board card. Through the serial data bus, chips can transmit control commands, read status information, or exchange data to achieve the cooperative work of various components on the board card;

[0091] In the debugging scenario of audio codec and digital audio processor, a serial communication interface is used to connect a debugging device and a target system. The debugging device sends debugging commands and receives status information through the serial interface to verify the functionality, analyze the performance, and troubleshoot faults of the audio codec and digital audio processor.

[0092] The S4: using an intelligent gateway to connect embedded devices to an embedded device debugging platform based on a real-time environment to debug embedded devices, comprising:

[0093] Based on the device image of the embedded device, generate a debugging value representation data standard. The device image at least includes: hardware configuration, software architecture, performance indicators, and application scenarios, etc. The debugging value representation data standard refers to the standard of data that can represent the debugging value of the debugging of the embedded device reflected by the device image, for example: the comparison data of other embedded devices with a similarity of more than 80% with the device image before and after being debugged in history, long-term debugging effect data, etc. These standards;

[0094] Based on the debugging value representation data standard, trace back the debugging value representation data of the embedded device. When tracing back, directly search for data that meets the debugging value representation data standard as the debugging value representation data of the embedded device;

[0095] The representation credibility of each target data in the debugging value representation data is calculated by the following formula:

[0096]

[0097] wherein, Rep i is a representation credibility of the i-th target data in the debugging value representation data, i = 1, 2, 3, …, n, n is the total number of target data in the debugging value representation data, A i,t is a representation degree of the representation credible basis of the t-th modality of the i-th target data, k i,t is a preset weight corresponding to the representation degree of the representation credible basis of the t-th modality of the i-th target data, m i is the total number of modalities of the representation credible basis of the i-th target data;

[0098] analyzing the representation debugging value distribution of the target data whose representation credibility exceeds the threshold value; wherein, the debugging value representation data is divided into n target data, in order to improve the comprehensiveness, accuracy and effectiveness of the debugging value representation data used for decision-making debugging value, the representation credibility of each target data is calculated, the representation credibility represents the credibility of the representation of the target data debugging value, only the representation debugging value distribution (including the representation of multiple debugging values and their respective representation degrees) of the target data whose representation credibility exceeds the threshold value (a threshold value representing a larger credibility set in advance) is analyzed, which is used for subsequent decision-making of the adjustment value; in the calculation formula of the representation credibility, the target data has multiple modalities of representation credible basis, each modality of representation credible basis has a representation degree, the representation degree is the degree of credibility of the representation credible basis representing the target data, for example: the multiple modalities of representation credible basis can be data source authenticity proof data, historical data volume of the data source, etc., the higher the authenticity proved by the authenticity proof data, the greater the corresponding representation degree, the more the historical data volume of the data source, the greater the corresponding representation degree; the weights are set in advance according to the influence degree of the representation degree of different modalities of representation credible basis on the final calculated representation credibility, the representation degrees of different modalities of representation credible basis are weighted and calculated, and then the average value is obtained, to obtain the representation credibility, and the value representing the credibility of the representation of the target data debugging value is calculated comprehensively;

[0099] sequentially matching the representation debugging value distribution with multiple standard representation debugging value distributions in the standard representation debugging value distribution library respectively, each time matching, the utilization value degree is calculated by the following formula:

[0100] val j = f(S j )

[0101] wherein, val j is the utilization value degree when the representation debugging value distribution is matched with the j-th standard representation debugging value distribution in the standard representation debugging value distribution library, f(…) is a preset utilization value degree conversion function, S jTo represent the matching degree when the debugging value distribution is matched with the jth standard representation debugging value distribution in the standard representation debugging value distribution library;

[0102] Based on the debugging value decision knowledge corresponding to the standard representation debugging value distribution with the maximum utilization value degree, the debugging value is decided according to the target data with a representation credibility exceeding a threshold; wherein, a plurality of standard representation debugging value distributions are pre-set in the standard representation debugging value distribution library, which correspond to debugging value decision knowledge, and the debugging value decision knowledge is a pre-set rule, experience or the like for deciding the final debugging value suitable for use when the target data has the standard representation debugging value distribution. However, the target data is relatively complex, and its representation debugging value distribution is not matched with the standard representation debugging value distribution at 100%, and the utilization value degree needs to be quantified. A utilization value degree conversion function is pre-set, which can convert different matching degrees into utilization value degrees. The greater the matching degree is, the more suitable the debugging value decision knowledge corresponding to the standard representation debugging value distribution is, and the greater the utilization value degree is. The utilization value degree conversion function can also query a preset reference table containing utilization value degrees corresponding to different matching degrees when used to determine the corresponding utilization value degree. The finally calculated utilization value degree represents the utilization value degree of the debugging value decision knowledge corresponding to the standard representation debugging value distribution. Finally, based on the debugging value decision knowledge corresponding to the standard representation debugging value distribution with the maximum utilization value degree, the debugging value is decided according to the target data with a representation credibility exceeding a threshold;

[0103] Based on the debugging value, the process of debugging the embedded device is continuously guided. After the final debugging value is decided, the process of debugging the embedded device is continuously guided based on the final debugging value, so as to ensure that only the debugging related to the debugging value is performed.

[0104] The above technical solutions effectively screen out high credibility data as debugging reference through the combination of device portraits and debugging value representation data standards, ensuring the comprehensiveness and effectiveness of the debugging activities. Based on the decision of the debugging value, the platform can continuously guide the debugging process, avoid irrelevant interference, and significantly improve the debugging efficiency and device performance. Finally, the long-term stability and efficiency of the device are ensured, manual intervention is reduced, and the debugging quality is improved. The intelligent level is also improved and the device performance is optimized, which meets the deep debugging needs of the embedded device.

[0105] After the analysis is completed, the analysis results are visually displayed, including:

[0106] Based on the analysis results, a visual display model is generated; wherein, the generated visual display model can visually display the analysis results, and different data model templates can be pre-set, and the model is generated directly based on the templates when generated;

[0107] speculating a pre-attention point distribution of the user in the visualized presentation model; wherein, the pre-attention point distribution refers to a distribution of multiple data location points that the user will focus on in the visualized presentation model, which is speculated based on user preferences, personal responsibilities, etc.

[0108] merging each pre-attention point in the pre-attention point distribution into multiple pre-attention sub-blocks according to the association relationship between each pair of pre-attention points in the pre-attention point distribution, against an association relationship-merging rule library; wherein, the association relationship-merging rule library contains merging rules corresponding to different association relationships, such as the association relationship is that each pre-attention point reflects the same analysis type, then the corresponding merging rule is to merge these pre-attention points to form a pre-attention sub-block; then directly based on the library, according to the association relationship between each pair of pre-attention points in the pre-attention point distribution, each pre-attention point in the pre-attention point distribution is merged into multiple pre-attention sub-blocks;

[0109] sequentially traversing each pre-attention sub-block;

[0110] each time, based on the sub-block characteristics, decision-making thought latency, and trigger thought of the traversed pre-attention sub-block; wherein, the sub-block characteristics at least include: information type, information distribution location, and information amount in the pre-attention sub-block, etc.; the trigger thought refers to a thought that represents that the user needs to view the pre-attention sub-block, for example: the trigger thought is a thought that the user wants to make a decision related to the information in the pre-attention sub-block; the decision-making thought latency is the time that needs to be reserved for the user to think independently, which is determined by the complexity of the information in the pre-attention sub-block, the higher the information complexity, the more independent thinking the user needs (the user further expands the original thought more), and the longer the corresponding decision-making thought latency when the user views the pre-attention sub-block to make a new thought decision;

[0111] after sequentially traversing each pre-attention sub-block, outputting the visualized presentation model to the user;

[0112] when the user's viewing thought of the visualized presentation model completely matches any trigger thought, after the corresponding thought latency, displaying the corresponding pre-attention sub-block to the user; wherein, each time the user's viewing thought of the visualized presentation model completely matches any trigger thought, after the corresponding thought latency, the corresponding pre-attention sub-block is displayed to the user; the user's viewing thought of the visualized presentation model refers to the thought represented by his / her behavior of viewing the model, which can be obtained based on behavior analysis technology.

[0113] The technical solution above shows the analysis result to the user by constructing a visual display model, infers the user's pre-concern point distribution, and merges the pre-concern points into multiple pre-concern blocks, when the user's viewing idea of the visual display model completely matches any trigger idea, displays the corresponding pre-concern block to the user after the corresponding idea waiting time, ensures that the user has enough independent thinking time, improves the decision-making efficiency, and greatly improves the humanization, comprehensiveness and intelligence of the visual output of the analysis result.

[0114] The embedded device debugging system based on a real-time environment is applied in an embedded device debugging method based on a real-time environment, and includes:

[0115] The compiling module is configured to construct a compiling environment for the embedded device debugging based on the real-time environment.

[0116] The constructing module is configured to obtain an embedded device debugging platform based on a real-time environment by using the compiling environment and the general scene debugging result of the interface.

[0117] The debugging module is configured to perform code debugging on the internal embedded device by using the embedded device debugging platform based on the real-time environment, and simulate the running conditions of the embedded device in different scenes during the debugging process.

[0118] The visualizing module is configured to store and back up data and visually display the data.

[0119] The compiling module includes:

[0120] The environment linker is configured to combine multiple target files and related library functions into a single executable file, and the executable file contains the code, data and referenced external libraries required for program running, ensures the correctness and integrity of the program, and provides a guarantee for the stable operation of the embedded device.

[0121] The environment compiler is configured to convert the written source code into machine language or binary code that can be executed by the device environment hardware, and through the combination with the device, ensures the correctness and efficiency of the source code, and converts it into hardware executable instructions.

[0122] The environment simulator is configured to simulate the running and interaction of the device environment hardware, and in the absence of actual hardware, simulates and tests the functions, performance and system behavior of the device environment hardware, and through the use of the environment simulator, the developer can accelerate the development process, reduce the hardware cost, and discover and solve potential problems in the early stage.

[0123] Environment debuggers are used to perform operations such as single-step execution, viewing variable values, and setting breakpoints during program runtime, thereby enabling the observation of program behavior and the identification of potential problems;

[0124] An environment debugger can be used to obtain key information about the execution path of a device program and its memory usage, which facilitates the optimization of program performance and resource utilization.

[0125] The visualization module includes:

[0126] Databases are used to store and back up data, and to configure access permissions, connection limits, and caching policies to ensure database performance and security.

[0127] Backup and recovery: Develop a database backup strategy, back up database data regularly to prevent data loss or corruption, test the recoverability of backup data, and ensure that database services can be quickly restored in the event of a failure.

[0128] Security maintenance: Strengthen database security protection, including using strong passwords, restricting access permissions, encrypting data transmission and storage, regularly updating database security patches and versions to prevent potential security vulnerabilities from being exploited, and ensuring that the caching service can automatically capture and cache popular data to reduce access pressure on the backend storage.

[0129] The monitoring unit is used to configure corresponding monitoring rules and alarm thresholds to monitor the debugging process of embedded devices. This ensures that the monitoring service covers all critical components and processes, establishes an effective alarm and notification mechanism, and promptly sends alarm information to relevant personnel when abnormal situations are detected or preset thresholds are exceeded. This helps to identify and resolve problems in a timely manner, preventing the escalation of faults.

[0130] The analysis unit is used to analyze various performance data of embedded devices collected by the embedded device debugging platform based on a real-time environment, such as CPU utilization, memory usage, network bandwidth, as well as fault events and log information. Analyzing this data can identify potential performance bottlenecks and fault points, providing a basis for optimization and maintenance.

[0131] The visualization unit is used to visualize the data monitored by the monitoring unit and the debugging process and results of embedded devices using charts. This allows managers to have a more intuitive understanding of the system's operating status and performance, facilitating decision-making and optimization.

[0132] By deploying intelligent gateways, ensure that the correct processing of data transmission and reception, and inter-platform communication requests, the debugging process of embedded devices are monitored, network connections can be optimized to ensure the stability and real-time data transmission, including adjusting the network bandwidth, optimizing routing, using load balancing and other technologies, at the same time, pay attention to network delay and packet loss, timely adjustment of network configuration, through the backup and configuration access permissions, the number of connections and cache strategy, can strengthen the embedded device and based on real-time environment embedded device debugging platform connection security, using encryption technology to protect the transmission of data and inter-platform communication data.

[0133] The analysis unit comprises:

[0134] The ring buffer is used to cover the historical data of the embedded device to ensure real-time updating of the embedded device debugging data based on the real-time environment.

[0135] The timestamp of the embedded device debugging data based on the real-time environment is added and the sampling point is marked to align the data timing.

[0136] The timing of interrupt to task execution is captured by the logic analyzer to analyze and troubleshoot the real-time problems of the embedded device.

[0137] The real-time log is output using the interface of the embedded device to analyze the priority inversion or resource competition of the embedded device.

[0138] The embedded device execution flow is monitored, the embedded device instruction execution cycle is collected in real time, the embedded device communication error is located, the key path code of the embedded device is optimized, and the CPU utilization and memory leakage of the embedded device are counted.

[0139] In summary, the present application supports real-time observation of variable state, memory data and program flow during device operation, without interrupting the system to obtain runtime key information (such as register values, stack state), through online debugging, problems can be directly diagnosed in hardware activity, significantly improving the debugging efficiency, by closely combining the hardware environment, supporting real-time signal capture and analysis, effectively diagnosing hardware driver or interface communication failure, reducing the burden on resource-limited devices, debugging the interface of embedded devices in a general scenario, which can adapt to different hardware platforms, reduce the requirements for embedded device resources, ensure that high-priority tasks are not disturbed by debugging, support non-intrusive tracking by configuring access permissions, connection number and cache strategy, avoid breaking the timing determinacy of embedded devices due to breakpoint insertion, analyze the debugging data of embedded devices to identify code hotspots, memory leaks and response delays, optimize real-time task execution efficiency, simulate and emulate the environment through the compilation module, which can verify software logic in advance, reduce physical hardware dependence and iteration cost, realize seamless integration of software and hardware diagnosis, minimize resource overhead and ensure real-time performance, significantly improve the development efficiency and reliability of embedded devices, ensure that the database service can be quickly restored in the event of a fault, improve the reliability of response time, and strengthen the security protection of the database, including using strong passwords, limiting access permissions, encrypting data transmission and storage, etc., to prevent potential security vulnerabilities from being exploited, ensure that the cache service can automatically capture and cache popular data, reduce access pressure on the backend storage, and improve the efficiency of debugging.

[0140] By combining device portraits and debugging value representation data standards, high-credibility data can be effectively screened as debugging references, ensuring the comprehensiveness and effectiveness of debugging activities. Based on debugging value-based decision-making, the platform can continuously guide the debugging process, avoiding irrelevant interference and significantly improving debugging efficiency and device performance. Ultimately, it ensures the long-term stability and efficiency of the device, reduces manual intervention, and improves debugging quality. It also improves the level of intelligence and optimizes device performance, meeting the deep-level debugging needs of embedded devices.

[0141] By constructing a visual display model to show the analysis results to the user, predicting the user's pre-focus point distribution, and merging the pre-focus points into multiple pre-focus blocks, when the user's viewing idea of the visual display model completely matches any triggered idea, the corresponding pre-focus block is displayed to the user after the corresponding idea waiting time, ensuring that the user has enough independent thinking time, improving their decision-making efficiency, and greatly improving the humanization, comprehensiveness and intelligence of the visual output of the analysis results.

[0142] It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting, since the scope of the present application will be limited to the appended claims. It must be noted that, as used in the specification and the appended claims, the singular form "a," "an" and "the" include plural referents unless the context clearly dictates otherwise. Thus, for example, reference to "a component" can include a plurality of components. Also, the terms "comprises," "comprising," "includes," "including" or "contains," "containing," or variations thereof, are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus that comprises, includes, or contains a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus.

[0143] While the embodiments of the application have been shown and described herein, it is to be understood that the application is not limited to these embodiments. Rather, many modifications, changes, substitutions, and alterations of the embodiments of the present application can be made without departing from the spirit and scope of the present application.

Claims

1. A method for debugging embedded devices based on a real-time environment, characterized in that, Includes the following steps: S1: Build a compilation environment for debugging embedded devices in a real-time environment; S2: Perform general scenario debugging on the interface of the embedded device. After debugging, use the general scenario debugging results of the compilation environment and interface to obtain an embedded device debugging platform based on the real-time environment. S3: Deploy the smart gateway, test the smart gateway, and ensure that it can seamlessly interface with embedded devices; S4: Use a smart gateway to connect the embedded device to a real-time environment-based embedded device debugging platform for debugging the embedded device; S5: Acquire and analyze embedded device debugging data based on the real-time environment, and then visualize the analysis results after the analysis is completed.

2. The embedded device debugging method based on a real-time environment according to claim 1, characterized in that, The acquisition and analysis of embedded device debugging data based on the real-time environment specifically includes: Acquire embedded device debugging data based on the real-time environment and preprocess the acquired data, including data cleaning and precise data filtering; The debugging data of embedded devices based on the real-time environment is sorted according to the acquisition time, and the real-time problems of embedded devices are checked by combining the pre-processed data with the data acquisition time order. Use the interface of the embedded device to output real-time logs, monitor the execution process of the embedded device, collect the instruction execution cycle of the embedded device in real time, optimize the critical path code of the embedded device, and analyze the memory usage and interrupt latency data of the embedded device.

3. The embedded device debugging method based on a real-time environment according to claim 1, characterized in that, The deployment of the smart gateway and testing of the smart gateway specifically include: Deploy smart gateways and conduct compatibility tests on them to ensure seamless integration with embedded devices and real-time environment-based embedded device debugging platforms. The smart gateway is tested for concurrent multitasking, simulating the multitasking concurrency that the smart gateway may face in a real environment, and its performance and stability are tested.

4. The embedded device debugging method based on a real-time environment according to claim 1, characterized in that, The general scenario debugging of the embedded device interface specifically includes: In asynchronous transmission and reception scenarios of serial communication devices, embedded devices exchange data through asynchronous serial communication protocols; In a full-duplex communication scenario using serial peripheral interfaces, embedded devices achieve bidirectional simultaneous communication via the SPI protocol. In a serial data bus communication scenario between chips on the same board, the chips communicate with each other via a serial data bus. In debugging scenarios for audio codecs and digital audio processors, serial communication interfaces are used to connect debugging equipment and the target system.

5. The embedded device debugging method based on a real-time environment according to claim 1, characterized in that, S4: Connecting the embedded device to a real-time environment-based embedded device debugging platform using a smart gateway to debug the embedded device, including: Based on the device profile of embedded devices, a debugging value representation data standard is generated; wherein, the device profile includes at least: hardware configuration, software architecture, performance indicators and application scenarios; the debugging value representation data standard refers to the standard of data reflected by the device profile that can represent the debugging value of debugging embedded devices; Based on the debugging value characterization data standard, trace the debugging value characterization data of embedded devices; The representation confidence of each target data in the debugging value representation data is calculated using the following formula: Among them, Rep i This is the representation confidence level of the i-th target data in the debugging value representation data. Representation confidence level represents the degree of credibility of the debugging value represented by the target data, i = 1, 2, 3, ..., n, where n is the total number of target data in the debugging value representation data. i,t The representation degree is the credibility of the representation of the t-th mode of the i-th target data, k. i,t The preset weights corresponding to the representation degree of the credible basis for the representation of the t-th mode of the i-th target data are m. i The total number of modalities representing the credible basis for the i-th target data; Analyze the distribution of representation debugging value of target data whose representation confidence exceeds a threshold; The characterization and debugging value distribution is matched sequentially with multiple standard characterization and debugging value distributions in the standard characterization and debugging value distribution library. For each match, the utilization value is calculated using the following formula: val j =f(S j ) Where, val j To determine the utilization value when matching the representation debugging value distribution with the j-th standard representation debugging value distribution in the standard representation debugging value distribution library, f(...) is a preset utilization value transformation function, S j The degree of matching is used to match the j-th standard characterization and debugging value distribution with the standard characterization and debugging value distribution library. Based on the debugging value decision knowledge corresponding to the debugging value distribution represented by the standard with the highest value, the debugging value is determined according to the target data whose representation credibility exceeds the threshold; wherein, the debugging value decision knowledge is a set of rules and experience that are suitable for determining the final debugging value when the target data has a standard representation of the debugging value distribution. Based on its debugging value, it provides continuous guidance for the debugging process of embedded devices.

6. The embedded device debugging method based on a real-time environment according to claim 1, characterized in that, After the analysis is completed, the analysis results are visualized, including: Based on the analysis results, a visual representation model is generated. Inferring the distribution of users' pre-focused points in the visualization model; By referring to the association and merging rule base, based on the association between each pair of pre-concern points in the pre-concern point distribution, each pre-concern point in the pre-concern point distribution is merged into multiple pre-concern blocks; Iterate through each pre-focused block in turn; Each time it is traversed, the decision-making process is based on the segmentation characteristics, decision-making process waiting time, and triggering process of the pre-watched segment. The segmentation characteristics include at least the information type, information distribution location, and information amount in the pre-watched segment. The triggering process refers to the process that the user needs to traverse to view the pre-watched segment. After iterating through each pre-focused block, a visual display model is output to the user. When a user's visualization of the model perfectly matches any of the triggering ideas, the corresponding pre-focused block is displayed to the user after the corresponding idea's waiting time.

7. An embedded device debugging system based on a real-time environment, applied in the embedded device debugging method based on a real-time environment as described in any one of claims 1-6, characterized in that, include: The compilation module is used to build a compilation environment for debugging embedded devices in a real-time environment. The building blocks are used to obtain a real-time embedded device debugging platform based on the common scenario debugging results of the compilation environment and interfaces; The debugging module is used to debug the code inside the embedded device using an embedded device debugging platform based on a real-time environment. During the debugging process, the embedded device's operating status in different scenarios is simulated. The visualization module is used to store and back up data, and to visualize and display the data.

8. The embedded device debugging system based on a real-time environment according to claim 7, characterized in that, The compilation module includes: The environment linker is used to combine multiple object files and related library functions into a single executable file; An environment compiler is used to convert written source code into machine language or binary code that can be executed by the hardware of the device environment. An environment simulator is used to simulate the operation and interaction of device environment hardware. It simulates and tests the functions, performance, and system behavior of device environment hardware without the actual hardware. An environment debugger is used to perform operations such as single-step execution, viewing variable values, and setting breakpoints during program runtime.

9. The embedded device debugging system based on a real-time environment according to claim 7, characterized in that, The visualization module includes: Databases are used to store and back up data, and to configure access permissions, connection limits, and caching strategies. The monitoring unit is used to configure corresponding monitoring rules and alarm thresholds to monitor the debugging process of embedded devices; The analysis unit is used to analyze various performance data of embedded devices collected by the embedded device debugging platform based on a real-time environment. The visualization unit is used to visualize the data monitored by the monitoring unit, as well as the debugging process and results of the embedded device, using charts and graphs.

10. The embedded device debugging system based on a real-time environment according to claim 9, characterized in that, The analysis unit includes: A circular buffer is used to cover historical data of embedded devices to ensure real-time updates of debugging data for embedded devices in a real-time environment. Add timestamps to embedded device debugging data based on the real-time environment and mark sampling points to align the acquired data timing. By capturing the timing from interrupt to task execution using a logic analyzer, we can analyze and troubleshoot real-time issues in embedded devices. Use the interface of the embedded device to output real-time logs to analyze embedded device priority inversion or resource contention. Monitor the execution process of embedded devices, collect the instruction execution cycle of embedded devices in real time, locate communication errors of embedded devices, optimize the critical path code of embedded devices, and at the same time, analyze the CPU utilization and memory leaks of embedded devices.

Citation Information

Patent Citations

  • Debugging method and device of embedded system, equipment and medium

    CN117093492A