Information processing method and device, equipment and medium

By recording and storing the software and hardware operation trajectories at critical moments in real time in the SoC system, the insufficient information and reproduction difficulties in occasional fault location are solved, and efficient fault analysis and positioning are achieved.

CN120508431APending Publication Date: 2025-08-19SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510652474.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The prior art is difficult to effectively locate occasional failures in SoC systems, especially due to insufficient information, difficulty in reproducing and low analysis efficiency.

Method used

During the operation of the SoC system, the operation trajectory of software and hardware is recorded in real time, including business operation trajectory, software and hardware interaction information and real-time operating system information, and stored in non-volatile memory in a preset format for analysis and visual display of the upper computer equipment.

Benefits of technology

The efficiency and accuracy of fault positioning are improved. Through the display of system status information of multi-dimensional and multi-module, the host computer supports the rapid reproduction of system behavior in complex scenarios, significantly improving the efficiency of fault positioning and performance analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508431A_ABST
    Figure CN120508431A_ABST
Patent Text Reader

Abstract

The invention relates to the field of SOC information processing, in particular to an information processing method, device and equipment and a medium, and the method comprises the steps: recording the running track of software and hardware at a critical moment in real time in the running process of a system on chip, and integrating the business running track, software and hardware interaction information, interruption information and real-time operating system information; complete system state information is formed; performing structured storage on the system state information according to a preset format; when a request of an upper computer is received, the system state information is fed back as required, so that visual display is facilitated, technicians can conveniently know the multi-dimensional and multi-module participated high-integrity and real-time system state information at a critical moment, the upper computer is supported to rapidly reproduce system behaviors in a complex scene, and the system performance is improved. And the efficiency of fault positioning and performance analysis is obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of SOC information processing, and in particular to an information processing method, device, equipment and medium. Background Art

[0002] As the scale of SoC (System on Chip) integration becomes larger and larger, the SoC hardware and software architecture becomes more and more complex. Generally speaking, the common SoC hardware and software architecture block diagram is as follows: Figure 1 As shown in the figure, the SoC hardware architecture generally includes: CPU (Central Processing Unit), general peripherals, such as UART (Universal Asynchronous Receiver / Transmitter) / Timer / DMA (Direct Memory Access) / SPI (Serial Peripheral Interface) / I2C (Inter-Integrated Circuit), etc., which provide the basic hardware operating environment for the system; a large number of self-developed IPs, hardened implementation of key modules in specific business areas, which are used to accelerate business performance and enhance SoC competitiveness, such as self-developed IP1, self-developed IP2, self-developed IP3, etc. in the figure; external non-volatile memory, such as Flash, disk, etc., is generally used to store SoC firmware images and other data that need to be saved when power is off. The SoC firmware architecture generally includes: general peripheral drivers, such as UART / Timer / DMA / SPI / I2C, interrupt management, memory management, RTOS (Real-Time Operating System), and other firmware infrastructure modules to provide the system with a basic software operating environment; self-developed IP drivers, used to drive self-developed IP to work independently or in conjunction to complete critical path business execution; business modules, generally pure software modules, call general peripheral drivers, RTOS, self-developed IP drivers, etc. to implement complete SoC business logic and provide system functions to users.

[0003] The more complex the SoC system, the more difficult it is to locate the fault. Generally speaking, by adding logs, printing the call stack when an exception occurs, and connecting to the Lauderbach simulation tool when an exception occurs, technicians can observe the system status near the fault point and other information to assist in locating the fault, thereby identifying the cause of the fault. However, for occasional system-level problems, the above methods are powerless. Therefore, how to assist in locating occasional system-level problems has become a technical problem that technicians in this field urgently need to solve. Summary of the Invention

[0004] The present invention aims to provide an information processing method, apparatus, device and medium that can assist in fault location of occasional system-level problems.

[0005] In a first aspect, a method for processing information is provided, comprising:

[0006] During the operation of the SoC, the operation trajectory of the SoC software and hardware at critical moments is recorded in real time to obtain system status information; the system status information includes: business operation trajectory at critical moments, software and hardware interaction information, interrupt information, and real-time operating system information;

[0007] Storing the system status information according to a preset format;

[0008] When a data request is received from a host device, status information corresponding to the data request is sent to the host device, so that the host device parses and visually displays the status information corresponding to the data request.

[0009] In a preferred embodiment, the present invention can be further configured to record the running trajectory of the system-on-chip hardware and software at critical moments in real time to obtain system status information, including:

[0010] Monitor business trajectories and obtain business operation trajectories;

[0011] Monitor the interaction between software and hardware and obtain information about the interaction between software and hardware;

[0012] Monitor system interruptions and obtain interruption information;

[0013] Monitor the real-time operating system status and obtain real-time operating system information;

[0014] If the current moment is a critical moment, the business operation trajectory, software and hardware interaction information, interrupt information and real-time operating system information of the system-on-chip hardware and software at the critical moment are recorded to obtain system status information.

[0015] In a preferred example, the present invention can be further configured as follows: the business operation trajectory includes: the starting point, the ending point, each milestone point, the abnormal point of the business identifier, and the starting point, the ending point, and the abnormal point of the called submodule;

[0016] The software and hardware interaction information includes: each hardware IP starting working point, key parameters and working mode, hardware working status, abnormal status, and end status;

[0017] Interrupt information includes: the interruption starting point, interruption processing key results, and interruption processing end status of all self-developed IP interrupts, as well as the interruption starting point, interruption processing key results, and interruption processing end status of timer interrupts;

[0018] Real-time operating system information includes: the program currently being executed by each core, multi-core locks, spin locks, mutex locks, semaphores, message queues, timers, memory management, as well as the application and release of each lock, semaphore, and memory, the entry and exit of the message queue, and the entry and exit of the timer processing function.

[0019] In a preferred embodiment, the present invention can be further configured to store the system status information in a preset format, including:

[0020] The system status information is stored in a non-volatile memory according to a preset format.

[0021] In a preferred embodiment, the present invention can be further configured to record the running trajectory of the system-on-chip software and hardware at critical moments to obtain system status information, including:

[0022] Use user threads to record the running trajectory of the system-on-chip hardware and software at critical moments to obtain system status information;

[0023] Accordingly, storing the system status information in a non-volatile memory according to a preset format includes:

[0024] The system status information is stored in a non-volatile memory using a background thread according to a preset format.

[0025] In a preferred embodiment, the present invention can be further configured to store the system status information in a non-volatile memory according to a preset format, including:

[0026] Querying whether the remaining storage capacity of the non-volatile memory is greater than a preset storage capacity threshold;

[0027] If it is greater than, the running trajectory information of the current business scenario is stored in the non-volatile memory;

[0028] If not, the historical operation trajectory information in the non-volatile memory is discarded, and when the remaining storage capacity of the non-volatile memory is greater than the preset storage capacity threshold, the operation trajectory information of the current business scenario is stored in the non-volatile memory.

[0029] In a preferred example, the present invention can be further configured to discard the historical running trajectory information in the non-volatile memory, including:

[0030] Determine the storage duration, storage volume, and number of accesses of historical operation trajectory information in non-volatile memory;

[0031] Determining, based on the storage duration, whether there is first historical running trajectory information in the non-volatile memory having a storage duration greater than a preset storage duration;

[0032] If it exists, then if the first historical operation trajectory information includes second historical operation trajectory information that has been accessed more than a preset number of times, then any second historical operation trajectory information with a larger storage volume than the operation trajectory information at the current business scenario moment is discarded; if it does not include, then the second historical operation trajectory information with the longest storage time is discarded, so that the sum of the storage volumes of the discarded second historical operation trajectory information is not less than the storage volume of the operation trajectory information at the current business scenario moment;

[0033] If not, determine whether there is third historical operation trajectory information in the historical operation trajectory information in the non-volatile memory that has been accessed more than a preset number of times; if so, discard the third historical operation trajectory information that has been accessed the most times in the third historical operation trajectory information, so that the sum of the storage volumes of the discarded third historical operation trajectory information is not less than the storage volume of the operation trajectory information at the current business scenario moment.

[0034] In a second aspect, an information processing device is provided, comprising:

[0035] A recording module is used to record the operation trajectory of the SoC software and hardware at critical moments in real time during the operation of the SoC to obtain system status information; the system status information includes: business operation trajectory at critical moments, software and hardware interaction information, interrupt information, and real-time operating system information;

[0036] A storage module, configured to store the system status information in a preset format;

[0037] The sending module is used to send status information corresponding to the data request to the host device when receiving a data request from the host device, so that the host device parses and visually displays the status information corresponding to the data request.

[0038] According to a third aspect, an electronic device is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor executes any one of the methods described in the first aspect when running the computer program.

[0039] In a fourth aspect, a computer-readable storage medium is provided, wherein at least one program code is stored in the computer-readable storage medium, and the program code is loaded and executed by a processor to implement any method as described in the first aspect.

[0040] In a fifth aspect, a computer program product is provided, comprising a computer program or instructions, which, when executed by a processor, implements any method described in the first aspect.

[0041] In summary, the information processing method provided by the present invention has the following beneficial technical effects:

[0042] During the operation of the on-chip system, the operation trajectory of the software and hardware at critical moments is recorded in real time, and the business operation trajectory, software and hardware interaction information, interrupt information and real-time operating system information are integrated to form complete system status information; the system status information is structured and stored in a preset format; when a request is received from the host computer, the system status information is fed back on demand for visual display, so that technical personnel can understand the multi-dimensional, multi-module participation, high-integrity and real-time system status information at critical moments, support the host computer to quickly reproduce the system behavior in complex scenarios, and significantly improve the efficiency of fault location and performance analysis.

[0043] In addition, the present invention also provides an information processing device, equipment and medium, all of which have the above-mentioned beneficial technical effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0045] Figure 1 It is a SoC hardware and software architecture provided by related technologies;

[0046] Figure 2 This is a schematic diagram of a scenario in which an information processing method provided by an embodiment of the present invention is applied;

[0047] Figure 3 This is a schematic diagram of the overall architecture, recording, and playback mechanisms of an electronic device provided by an embodiment of the present invention;

[0048] Figure 4 This is a flow chart of an information processing method provided by an embodiment of the present invention;

[0049] Figure 5 This is a schematic diagram of an abstract block diagram of a software and hardware architecture provided by an embodiment of the present invention;

[0050] Figure 6 is a schematic diagram of a data format of each record provided by an embodiment of the present invention;

[0051] Figure 7 This is a schematic diagram of a process flow for visual display by a host computer provided by an embodiment of the present invention;

[0052] Figure 8 This is a schematic diagram of a system trajectory that is visualized and displayed by a host computer according to an embodiment of the present invention;

[0053] Figure 9 This is a schematic diagram of a two-thread data processing flow provided by an embodiment of the present invention;

[0054] Figure 10 is a structural diagram of an information processing device provided by an embodiment of the present invention;

[0055] Figure 11 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0057] The terms "including" and "having," as used in the present description and accompanying drawings, and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements and may include steps or elements that are not listed.

[0058] In order to enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0059] In order to better understand and illustrate the solutions of the embodiments of the present invention, some technical terms involved in the embodiments of the present invention are briefly explained below.

[0060] SoC: It is called system-on-chip, also known as system on chip, which means it is a product, an integrated circuit with a dedicated purpose, which contains all the contents of a complete system and embedded software.

[0061] CPU: Central Processing Unit, the core component of the computer, is mainly responsible for interpreting and executing computer instructions and processing data.

[0062] SRAM: Static Random-Access Memory. As long as the power is on, the data stored in it can be retained permanently.

[0063] UART: Universal Asynchronous Receiver / Transmitter is a serial, asynchronous, full-duplex communication protocol widely used in the embedded field.

[0064] Timer: A counter that counts up or down according to the clock frequency. It generates an interrupt when a given threshold is reached.

[0065] Flash: Flash is a non-volatile memory that retains data even when power is off. Flash is mainly divided into two types: NAND Flash and NOR Flash. NAND Flash is suitable for high-capacity data storage due to its fast data write and erase speeds and low price. Most solid-state drives and USB flash drives use NAND Flash. NOR Flash, on the other hand, is commonly used to store firmware because it supports code execution, for example, as read-only memory (ROM) in many embedded devices.

[0066] At present, the more complex the SoC system is, the more difficult it is to locate the fault. Generally speaking, the cause of the fault can be found by adding logs, printing the call stack when an exception occurs, connecting to the Lauderbach simulation tool when an exception occurs, and other methods to assist in observing the system status near the fault point and other information.

[0067] However, the above methods are powerless to solve occasional system-level problems. The specific reasons are as follows:

[0068] 1) Insufficient effective information. System-level problems are often not caused by a single module, but by multiple software and hardware modules working together to cause a system failure. For such problems, effective information to assist in locating the problem after it occurs is often insufficient because it is difficult to add sufficient debugging information to all operating paths in advance.

[0069] 2) Difficulty in reproduction and low location efficiency. Occasional problems often occur at uncertain times with extremely low probability. Due to insufficient effective information, additional debugging information is often required to occupy hardware resources to reproduce the fault. Since the probability of the fault is extremely low, the location time period will be difficult to control.

[0070] 3) Low analysis efficiency. System-level business operations often go through multiple modules, with paths running serially, in parallel, or alternately. This process generates a large amount of logs, including key operating states, key module interactions, and key data flows. This information requires manual analysis, which is inefficient and prone to errors.

[0071] Based on this, the present invention proposes a method for locating occasional SoC faults, which can effectively solve the above-mentioned problems such as insufficient effective information, difficulty in reproduction, and low analysis efficiency.

[0072] First, the present invention proposes a recording and playback mechanism for SoC system operation trajectories. This mechanism records the SoC system's software and hardware operation trajectories in real time during system operation, persistently storing key trajectories, key states, key interactions, and other system states. At any moment, this persistent data can be replayed through the host computer's software, allowing technicians to directly and accurately observe the system status at the scene of occasional problems, effectively resolving issues such as insufficient effective location information and difficulty reproducing them.

[0073] Second, the present invention proposes a mechanism for recording SoC system status. By abstracting the SoC's hardware and software architecture, this mechanism extracts key status data, including system hardware, system software, system interactions, and business trajectories. This data is persistently stored according to a specific protocol format, and ultimately parsed and visualized using host computer software. This effectively addresses issues such as insufficient information and inefficient analysis and positioning.

[0074] In order to better understand the solution provided by the embodiment of the present invention, the solution is described below in conjunction with a specific application scenario.

[0075] In one embodiment, please refer to Figure 2 , Figure 2 A schematic diagram of an application scenario of an information processing method provided by an embodiment of the present invention. The information processing method can be applied to an information processing system.

[0076] In some embodiments, the information processing includes electronic devices and host devices. The host devices include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. The electronic devices are used to implement the steps of the information processing method.

[0077] See also Figure 3 , Figure 3 This is a structural diagram of the overall architecture, recording, and playback mechanisms of an electronic device provided by an embodiment of the present invention.

[0078] The overall architecture is divided into three parts:

[0079] SoC hardware and non-volatile memory. The use of non-volatile memory is the basic abstraction and requirement of the SoC hardware architecture of this invention. The recording and playback mechanism relies on the persistent storage of data in non-volatile memory.

[0080] Monitoring and persistence modules. Add monitoring and persistence modules to the SoC firmware. The monitoring module is responsible for recording the system status in real time, and the persistence module is responsible for persisting the recorded data. When the host device obtains persistent data, the persistence module is responsible for reading the data from the non-volatile memory and transmitting it to the host device.

[0081] Host computer device. The host computer device is responsible for obtaining persistent data, parsing and visualizing the system status for use by debuggers.

[0082] It is understood that the above is only an example and is not limited to this embodiment.

[0083] The embodiment of the present invention provides an information processing method, such as Figure 4 As shown, the method provided in the embodiment of the present invention can be executed by an electronic device, which is a server. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smartphone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to these. The terminal device and the electronic device can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present invention. The method includes:

[0084] S101. During the operation of the system on chip, the operation trajectory of the system on chip software and hardware at key moments is recorded in real time to obtain system status information; the system status information includes: business operation trajectory at key moments, software and hardware interaction information, interrupt information, and real-time operating system information;

[0085] In an embodiment of the present invention, monitoring is added to the SoC firmware to record system status information in real time.

[0086] Key moments represent critical points in the operational process, such as service start and end times, exception times, interruption times, and queue activation times. Operational traces represent the sequence of operations, status parameters, and interaction data generated at these critical moments. System status information can include: service operation traces at these critical moments, software and hardware interaction information, interruption information, and real-time operating system information.

[0087] This step is executed throughout the entire life cycle of the SOC system. The business operation trajectory represents the key moments of the business and the task execution path of the called sub-modules (such as the calling time of each sub-module in the processing flow to obtain the calling order of each sub-module); the software and hardware interaction information records the communication details of each hardware IP, such as the starting working point, key parameters and working mode, hardware working status, abnormal status, end status, etc. of each hardware IP, which is used to represent the timing parameters of each hardware IP; the interrupt information covers all self-developed IP interrupts and timer interrupts; the real-time operating system information includes the information currently being executed by each core, etc.

[0088] See also Figure 5 , Figure 5 This is a schematic diagram of an abstract block diagram of the software and hardware architecture provided by an embodiment of the present invention. The SoC hardware abstract architecture includes the following elements: several CPUs, which can be heterogeneous or homogeneous; an interrupt controller for managing peripheral interrupt scheduling and priority; a timer for providing a unified time base for the system; and self-developed IP, which must include basic controls and states such as startup control, working mode, working status, and abnormal indication.

[0089] The SoC firmware abstract architecture includes the following elements: multi-core management, interrupt management, time management, inter-core communication, self-developed drivers, etc., which provide the system with core ID, multi-core locks, interrupt processing function scheduling, unified time, remote communication between heterogeneous cores, self-developed IP control, etc.; RTOS and its components, including thread management, mutex locks, semaphores, event management, memory management, queue management, timer management, etc.; business components, including business processing procedures, external interactions, driver calls, RTOS calls, etc.

[0090] The embodiment of the present invention predefines a system trajectory, and the corresponding system status information includes:

[0091] Monitor business trajectories and obtain business operation trajectories, including the business scenario starting point (starting timestamp), ending point, each milestone point (key node execution timestamp), exception point (timestamp when the exception occurs), the starting point, ending point, and exception point of the called sub-modules, etc., and record the business trajectory in a tree format;

[0092] Monitor the interaction between software and hardware and obtain information about the interaction between software and hardware. Record each key hardware IP's starting working point, key parameters and working mode, hardware working status, abnormal status, end status, etc.

[0093] Monitor system interrupts and obtain interrupt information. Monitor all self-developed IP interrupts and timer interrupts, including the starting point of the interrupt, key results of interrupt processing, and the end status of interrupt processing.

[0094] Monitor the status of the real-time operating system and obtain real-time operating system information. Monitor multi-core and RTOS status. Monitor each core's currently executing program, multi-core locks, spin locks, mutex locks, semaphores, message queues, timers, memory management, etc., and record the application and release of each lock, semaphore, and memory, message queue entry and exit, and timer processing function entry and exit.

[0095] Furthermore, if the current moment is a critical moment, the business operation trajectory, hardware and software interaction information, interrupt information and real-time operating system information of the system-on-chip hardware and software at the critical moment are recorded to obtain system status information.

[0096] It can be seen that in the embodiment of the present invention, by recording the business operation trajectory, software and hardware interaction information, interruption information, and real-time operating system information at critical moments, multi-dimensional status information of the system at critical moments can be provided, so that technical personnel can clearly understand the complete process of the system status, so as to facilitate fault location in the event of a fault.

[0097] S102, storing system status information according to a preset format;

[0098] The preset format is user-defined and is used to record and store system status information. The preset format is not limited in the embodiment of the present invention and can be set by the user according to actual needs.

[0099] Specifically, each piece of system status information corresponds to a record. For example, the preset format of the data of each record is as follows: Figure 5 : Each record includes the following elements at the top level:

[0100] a) Timestamp: A globally unique timestamp that indicates the time when the record occurred, which can correspond to key moments in the business trajectory.

[0101] b) CPU core ID, indicating which CPU core the monitored program is running on.

[0102] c) Thread ID, indicating which thread the monitored program is running on.

[0103] d) Track ID, the running track of the program. Track ID contains two fields: i. Business type number, each business type is numbered independently by the user, see Figure 6 , interrupts, spin locks, mutex locks, etc. reserve a number respectively; ii. Milestone number, including start, end, application, release, milestone number.

[0104] e) Display level: the display level in the visualization tool. The user can set the display level according to actual needs, and the embodiment of the present invention does not limit it.

[0105] Of course, the reserved interruption number or the number corresponding to other dimensions can also be set in the service type number, and the embodiment of the present invention is not limited thereto.

[0106] S103 . When receiving a data request from the host device, sending status information corresponding to the data request to the host device, so that the host device parses and visually displays the status information corresponding to the data request.

[0107] Among them, the host computer equipment is used to obtain data, analyze and visualize the system status for use by debuggers. For the host computer, by analyzing the data, the meaning of each track ID and the corresponding timestamp, core ID, thread ID and other information are obtained, and each track is visualized. Its core workflow is as follows Figure 7 .

[0108] Furthermore, the visualization results are shown in the following diagram: Figure 8 In the figure below, with time as the horizontal axis and the multi-core and corresponding program running status as the vertical axis, the system running trajectory diagram is as follows: The horizontal axis is time, and the vertical axis is the CPU and program status. At time 0, the system starts to start up. After CPU0 performs system initialization, it enters the startup complete state and then enters the scheduler. CPU1 and CPU2 also enter the scheduler after CPU0 enters the scheduler. CPU0 receives the business instruction to start creating RAID, and then sends a message to thread 2. CPU1 runs thread 2 and enters self-developed IP1 for execution after receiving the message. Before self-developed IP1 is completed, a thread switch occurs. Subsequently, thread 1 sends a message that self-developed IP1 has been executed. CPU0 switches to thread 5 for execution during the execution of CPU1, and then switches to thread 1. After receiving the response, it is determined to be successful, and finally RAID is successfully created. During this process, CPU2 did not participate in the creation of RAID business, so it has been executing in thread 3.

[0109] It can be seen that in the embodiment of the present invention, the operation trajectory of the software and hardware at critical moments is recorded in real time during the operation of the SOC system, and the business operation trajectory, software and hardware interaction information, interrupt information and real-time operating system information are integrated to form complete system status information; the system status information is structured and stored in a preset format; when a request from the host computer is received, the system status information is fed back on demand to facilitate visual display, so that technical personnel can understand the multi-dimensional, multi-module participation, high-integrity and real-time system status information at critical moments, support the host computer to quickly reproduce the system behavior in complex scenarios, and significantly improve the efficiency of fault location and performance analysis.

[0110] A possible implementation of the embodiment of the present invention is to store the system status information according to a preset format, including: storing the system status information in a non-volatile memory according to the preset format.

[0111] In this embodiment of the present invention, a persistence module is added to the SoC firmware. This persistence module is responsible for persisting recorded data. When a host computer retrieves the persistent data, the persistence module is responsible for reading the data from non-volatile memory and transmitting it to the host computer. In this embodiment of the present invention, the recording and playback mechanisms rely on persistent data storage in non-volatile memory. Thus, in this embodiment of the present invention, the long-term retention of state information is achieved through non-volatile media, facilitating fault analysis and location by technicians in the event of a fault.

[0112] In order to minimize the impact of the monitoring and persistence modules on the system's own operation, the data recording process is divided into two parts. The upper part is data recording, which runs in the user thread, and the lower part is persistence, which runs in the background thread. The specific process is as follows: Figure 9 Specifically, a possible implementation method of an embodiment of the present invention records the running trajectory of the on-chip system hardware and software at critical moments to obtain system status information, including: using a user thread to record the running trajectory of the on-chip system hardware and software at critical moments to obtain system status information; correspondingly, storing the system status information in a non-volatile memory according to a preset format, including: using a background thread to store the system status information in a non-volatile memory according to a preset format.

[0113] A possible implementation of an embodiment of the present invention stores system status information in a non-volatile memory according to a preset format, including:

[0114] Checking whether the remaining storage capacity of the non-volatile memory is greater than a preset storage capacity threshold;

[0115] If it is greater than, the running trajectory information of the current business scenario is stored in the non-volatile memory;

[0116] If not, the historical operation trajectory information in the non-volatile memory is discarded, and when the remaining storage capacity of the non-volatile memory is greater than the preset storage capacity threshold, the operation trajectory information of the current business scenario is stored in the non-volatile memory.

[0117] Among them, the preset storage capacity threshold can be customized by the user and is no longer limited in the embodiment of the present invention, such as 80% of the total capacity. The preset storage capacity threshold is used to trigger the storage policy adjustment. When the remaining storage capacity is greater than the preset storage capacity threshold, it means that new data can be directly appended and written. Otherwise, the garbage collection mechanism is started to determine the historical operation trajectory information that needs to be recycled and to release space. Specifically, the historical operation trajectory information that needs to be recycled in the storage index table is determined; invalid data is marked and the physical block is erased; the erasing operation is cyclically executed until enough space is released, and finally the operation trajectory information at the current business scenario moment is written into the continuous address space.

[0118] It can be seen that in the embodiment of the present invention, the storage policy adjustment is triggered by the threshold so that new data can be directly appended and written when the remaining storage capacity is greater than the preset storage capacity threshold; when the remaining storage capacity is not greater than the preset storage capacity threshold, the garbage collection mechanism is started to release space to ensure that the data can be written to the non-volatile memory, thereby avoiding the loss of critical data due to exhaustion of storage space.

[0119] A possible implementation of an embodiment of the present invention, in which historical operation trajectory information in a non-volatile memory is discarded, includes:

[0120] Determine the storage duration, storage volume, and number of accesses of historical operation trajectory information in non-volatile memory;

[0121] The historical running trajectory information that can be discarded is determined based on the storage duration, storage volume and number of accesses of the historical running trajectory information.

[0122] As can be seen, in this embodiment of the present invention, an intelligent discarding algorithm is designed to eliminate low-value historical data by combining three dimensions: storage duration, storage volume, and access count. The longer the storage time, the higher the probability of discarding, facilitating automatic cleanup of old data. Access frequency is weighted: a high number of accesses indicates a high probability that the item has already been analyzed for fault location by technicians, thus increasing the probability of discarding. Furthermore, volume constraints ensure that new data can be written completely. This achieves dynamic optimization of the data distribution structure within limited storage resources, maximizing storage space utilization and analytical value.

[0123] Furthermore, when the user has used a certain operation trajectory information for fault analysis, or found that a certain operation trajectory information is unnecessary through viewing, the data can be marked so that the data can be discarded first; or although the user has accessed a certain operation trajectory information many times but has not determined the fault information, the data can also be marked so that the operation trajectory information can be automatically skipped when the data to be discarded is subsequently screened.

[0124] In one achievable manner, determining the discardable historical operation trajectory information based on the storage duration, storage volume, and number of accesses of the historical operation trajectory information may include: determining, based on the storage duration, whether there is first historical operation trajectory information in the non-volatile memory having a storage duration greater than a preset storage duration;

[0125] If it exists, then if the first historical operation trajectory information includes second historical operation trajectory information that has been accessed more than a preset number of times, then any second historical operation trajectory information with a larger storage volume than the operation trajectory information at the current business scenario moment is discarded; if it does not include it, then the second historical operation trajectory information with the longest storage time is discarded, so that the sum of the storage volumes of the discarded second historical operation trajectory information is not less than the storage volume of the operation trajectory information at the current business scenario moment;

[0126] If not, determine whether there is third historical operation trajectory information in the historical operation trajectory information in the non-volatile memory that has been accessed more than a preset number of times; if so, discard the third historical operation trajectory information that has been accessed the most times in the third historical operation trajectory information, so that the sum of the storage volumes of the discarded third historical operation trajectory information is not less than the storage volume of the operation trajectory information at the current business scenario moment.

[0127] The storage duration represents the length of time since data was written; the storage volume refers to the physical storage space occupied by the data; the number of accesses is counted by a built-in counter, which automatically increments each time data is read; and the preset storage duration is a predefined retention period (e.g., 7 days) used to determine data timeliness. In embodiments of the present invention, historical operation trajectory information can be discarded when insufficient free space is available for writing new data, or during periodic storage maintenance tasks.

[0128] Specifically, the storage controller first traverses the storage index table and counts the storage duration, volume, and access count of each data block. If there is data with a storage duration exceeding a preset value (first historical operation trajectory information), its access popularity is further determined: for data with access times exceeding the threshold (second historical operation trajectory information), the larger data is discarded; for cold data, it is discarded in descending order of storage duration until space is freed up to meet the needs of new data. If all historical data does not exceed the storage duration, then for data with access times exceeding the threshold (third historical operation trajectory information), the most frequently accessed data is discarded; the entire process must ensure atomic operations to avoid data inconsistency.

[0129] In another achievable manner, determining the discardable historical running trajectory information based on the storage duration, storage volume, and access count of the historical running trajectory information may include:

[0130] Get the storage duration weight wt and the access count weight wa, satisfying wt+wa=1.

[0131] Normalized storage time and access times, ti'=(ti-tmin) / (tmax-tmin), ai'=(ai-amin) / (amax-amin), where ti' is the normalized storage time, ti is the storage time, tmin is the minimum storage time of all historical operation trajectory information, and tmax is the maximum storage time of all historical operation trajectory information; ai' is the normalized access time, ai is the access time, amin is the minimum access time of all historical operation trajectory information, and amax is the maximum access time of all historical operation trajectory information.

[0132] Combine the storage time and access times and perform weighted summation: si=wt*ti'+wa*ai';

[0133] Sort in descending order of score. When the scores are the same, the one with the larger volume takes precedence. The sorted sequence is historical running trajectory information (1), historical running trajectory information (2), ..., historical running trajectory information (n), satisfying: s(1) ≥ s(2) ≥ ... ≥ s(n);

[0134] According to the selection of the first m discards, the total discard volume is not less than the volume of the running trajectory information that needs to be written at present;

[0135] Based on any of the above embodiments, the technical solution of the present invention can abstract the SoC hardware and software architecture and classify the system status to be observed; record the system trajectory, and store the system status in an orderly and persistent manner based on the hardware non-volatile storage device through a given data protocol, so that it can be extracted and replayed at any time. It effectively solves the problems of little positioning information for occasional problems, and reliance on the environment for long-term secondary reproduction, which leads to low positioning efficiency. The system trajectory is replayed, persistent data is extracted and parsed by the host computer software, and visualized. The system status at each moment can be accurately observed, including interrupt status, thread switching status, memory application release, etc., to realize the replay mechanism of the system trajectory; and the system operation trajectory is visually displayed, effectively solving the problem of low efficiency of log analysis. The system trajectory status data structure is normalized and defined to effectively avoid customized self-analysis of each business module, standardize the business module trajectory record, and reduce the complexity of the host computer tool.

[0136] The following is an introduction to a device provided by an embodiment of the present invention. The device described below and the method described above can be referenced to each other. The device of this embodiment is set in an electronic device. Figure 10 , Figure 10 1 is a block diagram of a device according to one embodiment of the present invention, comprising:

[0137] The recording module 210 is used to record the operation trajectory of the SoC software and hardware at key moments in real time during the SoC operation to obtain system status information; the system status information includes: business operation trajectory at key moments, software and hardware interaction information, interrupt information, and real-time operating system information;

[0138] The storage module 220 is used to store system status information in a preset format;

[0139] The sending module 230 is configured to send status information corresponding to the data request to the host device when receiving a data request from the host device, so that the host device can parse and visually display the status information corresponding to the data request.

[0140] In a preferred embodiment, the present invention can be further configured as follows: a recording module 210 is configured to:

[0141] Monitor business trajectories and obtain business operation trajectories;

[0142] Monitor the interaction between software and hardware and obtain information about the interaction between software and hardware;

[0143] Monitor system interruptions and obtain interruption information;

[0144] Monitor the real-time operating system status and obtain real-time operating system information;

[0145] If the current moment is a critical moment, the business operation trajectory, software and hardware interaction information, interrupt information and real-time operating system information of the system-on-chip hardware and software at the critical moment are recorded to obtain system status information.

[0146] In a preferred example, the present invention can be further configured as follows: the business operation trajectory includes: the starting point, the ending point, each milestone point, the abnormal point of the business identifier, and the starting point, the ending point, and the abnormal point of the called submodule;

[0147] Software and hardware interaction information includes: each hardware IP starting working point, key parameters and working mode, hardware working status, abnormal status, and end status;

[0148] Interrupt information includes: the interruption starting point, interruption processing key results, and interruption processing end status of all self-developed IP interrupts, as well as the interruption starting point, interruption processing key results, and interruption processing end status of timer interrupts;

[0149] Real-time operating system information includes: the program currently being executed by each core, multi-core locks, spin locks, mutex locks, semaphores, message queues, timers, memory management, as well as the application and release of each lock, semaphore, and memory, the entry and exit of the message queue, and the entry and exit of the timer processing function.

[0150] In a preferred embodiment, the present invention can be further configured as follows: a storage module 220 is configured to:

[0151] The system status information is stored in a non-volatile memory according to a preset format.

[0152] In a preferred embodiment, the present invention can be further configured as follows: a recording module 210 is configured to:

[0153] Use user threads to record the running trajectory of the system-on-chip hardware and software at critical moments to obtain system status information;

[0154] Accordingly, the storage module 220 is used to:

[0155] A background thread is used to store system status information in a non-volatile memory according to a preset format.

[0156] In a preferred embodiment, the present invention can be further configured as follows: a storage module 220 is configured to:

[0157] Checking whether the remaining storage capacity of the non-volatile memory is greater than a preset storage capacity threshold;

[0158] If it is greater than, the running trajectory information of the current business scenario is stored in the non-volatile memory;

[0159] If not, the historical operation trajectory information in the non-volatile memory is discarded, and when the remaining storage capacity of the non-volatile memory is greater than the preset storage capacity threshold, the operation trajectory information of the current business scenario is stored in the non-volatile memory.

[0160] In a preferred embodiment, the present invention can be further configured as follows: a storage module 220 is configured to:

[0161] Determine the storage duration, storage volume, and number of accesses of historical operation trajectory information in non-volatile memory;

[0162] Determining, based on the storage duration, whether there is first historical running trajectory information in the non-volatile memory having a storage duration greater than a preset storage duration;

[0163] If it exists, then if the first historical operation trajectory information includes second historical operation trajectory information that has been accessed more than a preset number of times, then any second historical operation trajectory information with a larger storage volume than the operation trajectory information at the current business scenario moment is discarded; if it does not include it, then the second historical operation trajectory information with the longest storage time is discarded, so that the sum of the storage volumes of the discarded second historical operation trajectory information is not less than the storage volume of the operation trajectory information at the current business scenario moment;

[0164] If not, determine whether there is third historical operation trajectory information in the historical operation trajectory information in the non-volatile memory that has been accessed more than a preset number of times; if so, discard the third historical operation trajectory information that has been accessed the most times in the third historical operation trajectory information, so that the sum of the storage volumes of the discarded third historical operation trajectory information is not less than the storage volume of the operation trajectory information at the current business scenario moment.

[0165] Figure 11 A structural diagram of an electronic device provided by an embodiment of the present invention, such as Figure 11 As shown, the electronic device includes: a memory 60 for storing computer programs;

[0166] The processor 61 is configured to implement the steps of the information processing method of the above embodiment when executing a computer program.

[0167] The processor 61 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 61 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 61 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 61 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing content required to be displayed on the display screen. In some embodiments, the processor 61 may also include an artificial intelligence (AI) processor for handling computational operations related to machine learning.

[0168] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 60 is at least used to store the following computer program 601, wherein, after the computer program is loaded and executed by the processor 61, it can implement the relevant steps of the information processing method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 602 may include Windows, Unix, Linux, etc.

[0169] In some embodiments, the electronic device may further include a display screen 62 , an input / output interface 63 , a communication interface 64 , a power supply 65 , and a communication bus 66 .

[0170] Those skilled in the art will understand that Figure 11 The structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown in the figure.

[0171] It is understood that if the information processing method in the above-mentioned embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the current technology, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and executes all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, a magnetic disk, or an optical disk, etc. Various media that can store program code.

[0172] Based on this, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned information processing method are implemented.

[0173] An embodiment of the present invention provides a computer program product, including a computer program or instructions, which implements the corresponding contents of the aforementioned method embodiment when the computer program or instructions are executed by a processor.

[0174] The above describes in detail the information processing method, apparatus, device, and medium provided by the embodiments of the present invention. The various embodiments are described in a progressive manner throughout this specification, with each embodiment focusing on the differences from other embodiments. Reference can be made to the descriptions of the embodiments for similar or identical parts. The devices disclosed in the embodiments are described briefly because they correspond to the methods disclosed in the embodiments. For relevant details, refer to the description of the methods.

[0175] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0176] The above is a detailed introduction to the information processing method, device, equipment and medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.

Claims

1. An information processing method, characterized in that: include: During the operation of the SoC, the running track of the SoC software and hardware at key moments is recorded in real time to obtain system status information; The system status information includes: business operation tracks at critical moments, software and hardware interaction information, interruption information, and real-time operating system information; Storing the system status information according to a preset format; When a data request is received from a host device, status information corresponding to the data request is sent to the host device, so that the host device parses and visually displays the status information corresponding to the data request.

2. The method according to claim 1, characterized in that Real-time recording of the operating trajectory of the SoC hardware and software at critical moments to obtain system status information, including: Monitor business trajectories and obtain business operation trajectories; Monitor the interaction between software and hardware and obtain information about the interaction between software and hardware; Monitor system interruptions and obtain interruption information; Monitor the real-time operating system status and obtain real-time operating system information; If the current moment is a critical moment, the business operation trajectory, software and hardware interaction information, interrupt information and real-time operating system information of the system-on-chip hardware and software at the critical moment are recorded to obtain system status information.

3. The method according to claim 2, characterized in that The business operation trajectory includes: the starting point, end point, each milestone point, abnormal point of the business identifier, and the starting point, end point, and abnormal point of the called submodule; The software and hardware interaction information includes: each hardware IP starting working point, key parameters and working mode, hardware working status, abnormal status, and end status; Interrupt information includes: the interruption starting point, interruption processing key results, and interruption processing end status of all self-developed IP interrupts, as well as the interruption starting point, interruption processing key results, and interruption processing end status of timer interrupts; Real-time operating system information includes: the program currently being executed by each core, multi-core locks, spin locks, mutex locks, semaphores, message queues, timers, memory management, as well as the application and release of each lock, semaphore, and memory, the entry and exit of the message queue, and the entry and exit of the timer processing function.

4. The method according to any one of claims 1 to 3, characterized in that Storing the system status information in a preset format includes: The system status information is stored in a non-volatile memory according to a preset format.

5. The method according to claim 4, characterized in that Record the operation trajectory of the SoC hardware and software at critical moments to obtain system status information, including: Use user threads to record the running trajectory of the system-on-chip hardware and software at critical moments to obtain system status information; Accordingly, storing the system status information in a non-volatile memory according to a preset format includes: The system status information is stored in a non-volatile memory using a background thread according to a preset format.

6. The method according to claim 4, characterized in that Storing the system status information in a non-volatile memory according to a preset format includes: Querying whether the remaining storage capacity of the non-volatile memory is greater than a preset storage capacity threshold; If it is greater than, the running trajectory information of the current business scenario is stored in the non-volatile memory; If not, the historical operation trajectory information in the non-volatile memory is discarded, and when the remaining storage capacity of the non-volatile memory is greater than the preset storage capacity threshold, the operation trajectory information of the current business scenario is stored in the non-volatile memory.

7. The method according to claim 6, characterized in that Discarding the historical running trajectory information in the non-volatile memory includes: Determine the storage duration, storage volume, and number of accesses of historical operation trajectory information in non-volatile memory; According to the storage time, determining whether there is first historical running track information with a storage time longer than a preset storage time in the historical running track information in the non-volatile memory; If it exists, then if the first historical operation trajectory information includes second historical operation trajectory information that has been accessed more than a preset number of times, then any second historical operation trajectory information with a larger storage volume than the operation trajectory information at the current business scenario moment is discarded; if it does not include, then the second historical operation trajectory information with the longest storage time is discarded, so that the sum of the storage volumes of the discarded second historical operation trajectory information is not less than the storage volume of the operation trajectory information at the current business scenario moment; If not, determine whether there is third historical operation trajectory information in the historical operation trajectory information in the non-volatile memory that has been accessed more than a preset number of times; if so, discard the third historical operation trajectory information that has been accessed the most times in the third historical operation trajectory information, so that the sum of the storage volumes of the discarded third historical operation trajectory information is not less than the storage volume of the operation trajectory information at the current business scenario moment.

8. An information processing device, characterized in that include: The recording module is used to record the operation trajectory of the SoC software and hardware at key moments in real time during the SoC operation to obtain system status information; The system status information includes: business operation tracks at critical moments, software and hardware interaction information, interruption information, and real-time operating system information; A storage module, configured to store the system status information in a preset format; The sending module is used to send status information corresponding to the data request to the host device when receiving a data request from the host device, so that the host device parses and visually displays the status information corresponding to the data request.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that At least one program code is stored in the computer-readable storage medium, and the program code is loaded and executed by the processor to implement the method according to any one of claims 1 to 7.