Abnormal information processing method and device, electronic equipment and medium

By triggering the exception information processing program when a preset situation occurs in the target device and generating a processing program based on the timing characteristics of the external memory, the problem of inability to effectively store and read the exception information in the prior art is solved, and stable storage and reading of the abnormal information of the target device is achieved.

CN120196498APending Publication Date: 2025-06-24ZHEJIANG UNIVIEW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311785081.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-22
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

The prior art fails to effectively store and read abnormal information when the device system executes the setting program, resulting in difficulty in failure analysis and equipment recovery.

Method used

When a preset situation occurs in the target device, the exception information processing program is triggered, and the pins connected to the target device and the external memory are set to the input and output mode corresponding to the exception information processing program, and the processing of the exception information is performed with the external memory. The exception information processing program is generated based on the timing characteristics of the external memory to ensure that the input and output signals meet the timing requirements of the external memory storage and reading.

Benefits of technology

It realizes that when an abnormality occurs in the target device or returns to normal, it can effectively store and read exception information, avoiding the loss of abnormal information caused by insufficient storage space and the bus interface being occupied by other functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120196498A_ABST
    Figure CN120196498A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an abnormal information processing method and device, electronic equipment and a medium. The method comprises the following steps: if a preset condition occurs in target equipment, triggering the target equipment to execute an abnormal information processing program corresponding to the preset condition; a pin, communicated with the external memory, of the target equipment is set to be in an input and output mode corresponding to the abnormal information processing program; the abnormal information processing program comprises an abnormal information storage program and an abnormal information reading program; processing the abnormal information by means of the external memory; the abnormal information processing program is generated according to the time sequence characteristics of the external memory. According to the scheme, persistent storage of the abnormal information can be guaranteed when the target equipment is abnormal, the problems that the abnormal information cannot be stored due to the fact that an interface is occupied and the storage space of a built-in memory is insufficient and the abnormal information is lost due to the fact that the memory space is refreshed are solved, and the abnormal information can be read when the target equipment returns to normal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information processing technologies, and in particular, to an abnormal information processing method, apparatus, electronic device, and medium. Background Art

[0002] When a device system crashes during the execution of a set program, abnormal information will be generated. The abnormal information can reflect the pointer of the position where the program gets stuck and the stack information. Generally, it is necessary to store the abnormal information to facilitate subsequent fault analysis or to determine where to continue execution after the device restarts.

[0003] Currently, the solutions for processing abnormal information include using a non-volatile memory that communicates with the SPI bus interface provided by the main control chip of the device to store the abnormal information. However, when the SPI interface of the main control chip is occupied by other necessary functions, it is impossible to store the abnormal information. It is also possible to save the abnormal log information in the memory space, but the main control chip does not have an algorithm to retain information after the memory is initialized. After the device undergoes a soft restart, the entire memory space will be refreshed, and the abnormal information will be lost. In addition, when the internal memory particles of the main control chip are relatively small, there is not enough storage space to save the abnormal information. Summary of the Invention

[0004] Embodiments of this application provide an abnormal information processing method, apparatus, electronic device, and medium to store abnormal information when a target device has an abnormality and to read the abnormal information when the target device returns to normal.

[0005] According to one aspect of this application, an abnormal information processing method is provided. The method includes:

[0006] If a target device has a preset situation, trigger the target device to execute an abnormal information processing program corresponding to the preset situation; where the preset situation includes an abnormality occurring during the execution of a function program and returning to normal;

[0007] Set the pin connecting the target device to an external memory to an input / output mode corresponding to the abnormal information processing program; where the abnormal information processing program includes an abnormal information storage program and an abnormal information reading program;

[0008] Execute the processing of abnormal information with the help of an external memory; where the abnormal information processing program is generated according to the timing characteristics of the external memory.

[0009] According to one aspect of this application, an abnormal information processing apparatus is provided. The apparatus includes:

[0010] A trigger execution module, configured to trigger the target device to execute an exception information processing program corresponding to the preset situation if the target device has a preset situation; wherein, the preset situation includes an exception occurring when executing a function program and returning to normal;

[0011] A mode setting module, configured to set the pin connecting the target device to an external memory to an input / output mode corresponding to the exception information processing program; wherein, the exception information processing program includes an exception information storage program and an exception information reading program;

[0012] An execution module, configured to execute the processing of exception information by means of an external memory; wherein, the exception information processing program is generated according to the timing characteristics of the external memory.

[0013] According to another aspect of the present application, an electronic device is provided, and the electronic device includes:

[0014] At least one processor; and

[0015] A memory that is connected to the at least one processor for exception information processing; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the exception information processing method of any embodiment of the present application.

[0017] According to another aspect of the present application, a computer-readable storage medium is provided, and the computer-readable storage medium stores computer instructions for causing a processor to implement the exception information processing method of any embodiment of the present application when executed.

[0018] In the technical solution of the embodiment of the present application, if the target device has a preset situation, the target device is triggered to execute an exception information processing program corresponding to the preset situation; wherein, the preset situation includes an exception occurring when executing a function program and returning to normal; the pin connecting the target device to an external memory is set to an input / output mode corresponding to the exception information processing program; wherein, the exception information processing program includes an exception information storage program and an exception information reading program; the processing of exception information by means of an external memory is executed; wherein, the exception information processing program is generated according to the timing characteristics of the external memory. The above solution can, when the target device has an exception or needs to process exception information after returning to normal, set the input / output mode of the pin connecting the target device to the external memory by executing the exception information processing program to meet the requirements of signal transmission when the external memory works normally, and execute the code generated according to the timing characteristics of the external memory in the exception information processing program, so that the input / output signals meet the timing requirements for storing and reading by the external memory, and realize the processing of exception information by means of the external memory.

[0019] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0021] Figure 1 is a flowchart of an abnormal information processing method provided in Embodiment 1 of the present application;

[0022] Figure 2 is a flowchart of an abnormal information processing method provided in Embodiment 2 of the present application;

[0023] Figure 3 is a timing diagram of an external memory provided in Embodiment 2 of the present application;

[0024] Figure 4 is a flowchart of an abnormal information processing method provided in Embodiment 3 of the present application;

[0025] Figure 5 is a schematic structural diagram of an abnormal information processing device provided in Embodiment 4 of the present application;

[0026] Figure 6 is a schematic structural diagram of an electronic device provided in Embodiment 5 of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0027] In order to enable those skilled in the art to better understand the solutions of the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0028] It should be noted that the terms "first", "second", "third", "fourth", "actual", "preset", etc. in the description, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0029] Embodiment 1

[0030] Figure 1 FIG. is a flowchart of an abnormal information processing method provided for Embodiment 1 of this application. The embodiments of this application are applicable to the situation of processing abnormal information of a target device. Typically, the embodiments of this application are applicable to the situation of processing abnormal information after the target device has an abnormality and generates abnormal information. This method can be executed by an abnormal information processing device, which can be implemented in the form of hardware and / or software, and the abnormal information processing device can be configured in an electronic device. As Figure 1 shown, this method includes:

[0031] S110. If a preset situation occurs in the target device, trigger the target device to execute an abnormal information processing program corresponding to the preset situation; wherein, the preset situation includes an abnormality occurring when executing a function program and returning to normal.

[0032] Among them, the target device can be any device including a processor that can execute a program, such as a computer, a video recorder, a server, etc. The preset situation includes the situation where an abnormality occurs when the target device executes a function program and returns to normal. The function program is a program executed when the target device realizes its own inherent function. For example, if a computer has an image recognition function, the function program is the image recognition program. The target device may get stuck and unable to continue executing when executing the function program, that is, an abnormality occurs. When the target device restarts, it will return to normal. The abnormal information processing program is a pre-generated program, different from the function program of the target device itself. The abnormal information processing program is used to process the abnormal information after the target device generates abnormal information when an abnormality occurs when executing the function program. The abnormal information can be the pointer and stack information when the target device gets stuck in executing the function program.

[0033] Exemplarily, if a preset situation occurs in the target device, the target device is triggered to start executing an exception information processing program corresponding to the preset situation. When an exception occurs during the execution of the function program by the target device, the target device generates exception information, and it is necessary to store the exception information. Therefore, the exception information processing program corresponding to the occurrence of the exception in the target device is executed, that is, the exception information storage program. If the target device returns to normal, it is necessary to read the exception information. Therefore, the exception information processing program corresponding to the target device returning to normal is executed, that is, the exception information reading program.

[0034] In an embodiment of the present application, the entry function of the exception information processing program can be added to the linked list structure, and each function in the exception information processing program is executed by traversing the linked list structure. The linked list contains a series of programs that need to be executed when an exception occurs in the target device, or a series of programs that need to be executed when the target device returns to normal.

[0035] S120. Set the pin connecting the target device to the external memory to the input / output mode corresponding to the exception information processing program; wherein, the exception information processing program includes an exception information storage program and an exception information reading program.

[0036] Among them, the external memory can refer to a storage device other than the memory and cache of the target device. Generally, the external memory can still store data after power-off. The external memory can be a hard disk, a floppy disk, an optical disc, a USB flash drive, etc. In an embodiment of the present application, the external memory can be an M24C32 memory. The pins connecting the target device to the external memory can be determined according to the requirements of the external memory. If the external memory needs to communicate with the target device through two signals, the number of pins to be set is two. If the external memory needs to communicate with the target device through n signals, the number of pins to be set is n.

[0037] Exemplarily, the input / output model setting program of the pins connecting the target device to the external memory can be placed in the exception information processing program in advance according to the signal requirements during the operation of the external memory. Different exception information processing programs contain different input / output mode settings for the pins. For example, when the external memory stores exception information, it requires one clock signal and one data signal to be input. Therefore, the pins connecting the target device to the external memory are set to the output mode. During the process of reading exception information from the external memory, one clock signal needs to be input, and for the other data signal, it is necessary to first notify the external memory to read the exception information. Therefore, two pins of the target device need to be set to the output model first. Subsequently, when one clock signal needs to be input and the other outputs the exception information to the target device, one pin of the target device needs to be set to the output mode and the other pin needs to be set to the input mode. The subsequent changes in the input / output mode of the pins are set according to the specific requirements during the operation of the external memory. The input / output mode of the pins can be set by operating the register.

[0038] S130. Execute the processing of the exception information with the help of the external memory; wherein, the exception information processing program is generated according to the timing characteristics of the external memory.

[0039] Exemplarily, the exception information processing program may include timing codes generated according to the timing characteristics of the external memory. When the timing codes are executed, the target device forms digital signals by generating high and low levels to simulate the normal interaction process with the external memory, stores the exception information in the external memory or reads the exception information from the external memory, so as to process the exception information with the help of the external memory, avoiding the problem that the storage space is occupied by other data when using the internal storage space and there is not enough storage space to store the exception information, and avoiding the problem that the bus interface is occupied by other functions resulting in the failure of storing the exception information. In addition, the external memory can perform persistent storage of the exception information, and even if the target device is powered off and restarted, the external memory will not be refreshed and the exception information will not be lost.

[0040] In the technical solution of the embodiment of the present application, if a preset situation occurs in the target device, the target device is triggered to execute an exception information processing program corresponding to the preset situation; wherein, the preset situation includes an exception occurring when executing a function program and returning to normal; the pin connecting the target device to the external memory is set to an input / output mode corresponding to the exception information processing program; wherein, the exception information processing program includes an exception information storage program and an exception information reading program; the processing of the exception information is performed by means of the external memory; wherein, the exception information processing program is generated according to the timing characteristics of the external memory. The above solution can, when the target device has an exception or returns to normal and needs to process the exception information, set the input / output mode of the pin connecting the target device to the external memory by executing the exception information processing program to meet the requirements of signal transmission when the external memory works normally, and execute the code generated according to the timing characteristics of the external memory in the exception information processing program, so that the input / output signals meet the timing requirements for storage and reading of the external memory, and realize the processing of the exception information by means of the external memory.

[0041] Embodiment 2

[0042] Figure 2 The flowchart of an exception information processing method provided by Embodiment 2 of the present application is based on the above embodiment for optimization. For the solutions not described in detail in the embodiment of the present application, refer to the above embodiment. As Figure 2 shown, the method of the embodiment of the present application specifically includes the following steps:

[0043] S210. If a preset situation occurs in the target device, the target device is triggered to execute an exception information processing program corresponding to the preset situation; wherein, the preset situation includes an exception occurring when executing a function program and returning to normal.

[0044] S220. If an exception occurs when the target device executes the function program, determine that the exception information processing method is exception information storage, and set the clock signal pin and data transmission pin connecting the target device to the external memory to the output mode.

[0045] Exemplarily, if an exception occurs when the target device executes the function program, the target device generates exception information and needs to store the exception information. Determine that the exception information processing method is exception information storage. When the target device stores the exception information in the external memory, it needs to output a clock signal to the external memory and output a data signal to the external memory. Therefore, the clock signal pin and data transmission pin connecting the target device to the external memory are set to the output mode to output signals to the external memory.

[0046] S230. If the target device returns to normal, determine that the abnormal information processing method is abnormal information reading. Set the clock signal pin and data transmission pin connecting the target device to the external memory to the output mode, and output a signal through the data transmission pin to notify the external memory that abnormal information reading will be performed soon.

[0047] Exemplarily, if the target device returns to normal, it is necessary to read the abnormal information previously stored in the external memory to analyze the cause of the abnormality based on the abnormal information or determine where to continue executing the function program. In this case, it is necessary to first set the data transmission pin and clock signal pin connecting the target device to the external memory to the output mode, output a signal through the data transmission pin to notify the external memory that abnormal information reading will be performed soon, and output a clock signal through the clock signal pin.

[0048] S240. Modify the data transmission pin to the input mode to perform abnormal information reading.

[0049] Exemplarily, after notifying the external memory that abnormal data reading will be performed soon and starting the reading process, it is necessary to set the data transmission pin connecting the target device to the external memory to the input mode, transmit a clock signal through the clock signal pin, and receive the abnormal information transmitted by the external memory through the data transmission pin to implement the reading of the abnormal information.

[0050] S250. Execute the processing of the abnormal information with the help of the external memory; wherein, the abnormal information processing program is generated according to the timing characteristics of the external memory.

[0051] The embodiment of the present application provides an abnormal information processing method. If an abnormality occurs when the target device executes a function program, determine that the abnormal information processing method is abnormal information storage, and set the pin connecting the target device to the external memory to the output mode; if the target device returns to normal, determine that the abnormal information processing method is abnormal information reading, set the pin connecting the target device to the external memory to the output mode, and notify the external memory that abnormal information reading will be performed soon; set the data transmission pin connecting the target device to the external memory to the input mode. The above solution sets the input / output mode of the pin connecting the target device to the external memory according to the abnormal information processing method, so that the pin meets the signal input / output requirements when the external memory works, and thus interacts with the external memory normally.

[0052] In the embodiment of the present application, the generation process of the abnormal information processing program includes:

[0053] Determine the timing characteristics when the external memory works;

[0054] Generate an abnormal information storage program and an abnormal information reading program according to the timing characteristics.

[0055] Exemplarily, if the external memory is different, the timing characteristics during the operation of the external memory are different. In order to enable the abnormal information processing program to provide a timing that meets the working requirements of the external memory during execution, it is necessary to determine the timing characteristics during the operation of the external memory, and generate an abnormal information storage program and an abnormal information reading program according to the timing characteristics to simulate the timing of the normal operation of the external memory and achieve normal interaction with the external memory. Exemplarily, the timing characteristics during the operation of the external memory are as Figure 3 shown. During the abnormal information storage process, the storage requirement of the external memory is that for each received high-level pulse, it corresponds to the digital signal 1, and 1 bit of abnormal information is received. After receiving 8 bits of abnormal information, it is necessary to receive the feedback of the response result. Therefore, the abnormal information storage program can be to output a high level to the external memory through the clock signal pin according to the clock cycle and delay for a certain period, then output a low level and delay for a certain period, then output a high level and delay for a certain period, then output a low level and delay for a certain period, and so on to obtain a clock signal in a loop. When outputting a high level through the clock signal pin, send 1 bit of abnormal information through the signal transmission pin, so that the external memory thinks that the current timing meets the requirements of normal storage and receives 1 bit of abnormal information transmitted by the signal transmission pin when receiving a high level. Among them, the low level corresponds to the digital signal 0. After the transmission of 8 bits of abnormal information is completed, transmit a preset signal through the data transmission pin at the 9th pulse, so that the external memory thinks that the target device responds successfully. The preset signal is the signal specified by the external memory indicating that the target device responds successfully. The abnormal information reading program is the same, and generates the code for sending digital signals according to the timing characteristics to simulate the timing.

[0056] In the embodiment of the present application, the method further includes:

[0057] If the abnormal information processing program includes a target program, replace the functional program with another program having the same function as the target program or delete the functional program; where the target programs include a sleep program, a scheduling program, and a file processing program.

[0058] In the embodiment of the present application, if an exception occurs when the target device executes the function program, when the target device is scheduled to execute the target program during the execution of the exception information processing program, situations such as dormancy and suspension will occur. During this period, it will be scheduled out by other programs to execute other programs and cannot be scheduled back to execute the normal exception information storage and reading program. Therefore, when generating the exception information processing program, if there is a target program, it is replaced with another program with the same function or the target program is deleted. For example, assuming that a dormancy program is required in the exception information processing program, it is replaced with a "delay" program to prevent the target device from being scheduled by other programs when it is dormant.

[0059] Embodiment III

[0060] Figure 4 The flowchart of an exception information processing method provided by Embodiment III of the present application is based on the above-mentioned embodiment for optimization. For the solutions not described in detail in the embodiment of the present application, refer to the above-mentioned embodiment. As Figure 4 shown, the method of the embodiment of the present application specifically includes the following steps:

[0061] S310. If a preset situation occurs in the target device, trigger the target device to execute an exception information processing program corresponding to the preset situation; wherein, the preset situation includes an exception occurring when executing the function program and returning to normal.

[0062] S320. Set the pin connecting the target device to the external memory to an input / output mode corresponding to the exception information processing program; wherein, the exception information processing program includes an exception information storage program and an exception information reading program.

[0063] S330. Store or read exception information to / from the external storage device according to the clock signal.

[0064] S340. If it is determined according to the timing characteristics of the external memory that a response result needs to be fed back, when sending the next clock signal after the processing of one byte of exception information is completed, send a preset signal to the external memory; wherein, the preset signal is used to enable the external memory to determine that the target device has responded successfully.

[0065] Exemplarily, an external memory may require the target device to feedback a response result. However, at this time, the target device may be in a crashed state and unable to respond and feedback the response result. If the response result is not timely feedback to the external memory, it will cause the external memory to be unable to continue subsequent storage or reading. In the embodiments of the present application, in order to ensure the continuous storage of abnormal information, when directly sending the next clock signal after the processing of abnormal information in one byte is completed, a preset signal is sent to the external memory to indicate to the external memory that the response is successful and continue to store the abnormal information, so as to achieve the continuous storage of abnormal information. The preset signal may be a signal specified by the external memory that can reflect the successful response of the target device. For example, if the external memory considers that the target device's response is successful when receiving the digital signal 1, the preset signal is the digital signal 1; if the external memory considers that the target device's response is successful when receiving the data signal 0, the preset signal is the digital signal 0. Exemplarily, as Figure 3 shown, after the clock signal corresponding to 8-bit data is transmitted on the SCL clock line, a clock signal is sent again. During this period, the SDA data line sends information indicating successful response to the external memory.

[0066] S350: If the target device receives the information indicating successful response returned by the external memory, it does not process this information.

[0067] Exemplarily, the external memory will also return the information indicating successful response to the target device. After receiving the information indicating successful response, the target device does not process this message to avoid exceptions when the target device processes this message and affect the continuous storage of abnormal information.

[0068] In the embodiments of the present application, the execution of processing abnormal information with the help of an external memory includes:

[0069] If there is an interrupt to be processed in the external memory, control the clock signal pin to output a pause signal to transmit the corresponding clock signal and last for a preset duration to wait for the external memory to process the interrupt.

[0070] Exemplarily, an external memory may need to handle an interruption during which data cannot be continuously stored or read. Therefore, the target device needs to output a corresponding clock signal to stop the storage or reading of abnormal information and wait for the external memory to handle the interruption. Specifically, the target device outputs a pause signal through a clock signal pin to transmit a corresponding clock signal and lasts for a preset duration to meet the time requirement for the external memory to handle the interruption. The clock signal corresponding to the pause signal transmission can be determined according to the actual situation. If the working timing characteristic of the external memory is that data is stored or read when the clock signal is at a high level and no data storage or reading is performed when the clock signal is at a low level, then the clock signal corresponding to the pause signal transmission is a low level. At this time, a low level can be output through the clock signal pin and last for a preset duration until the external memory handles the interruption. Exemplarily, as Figure 4 shown, after transmitting one byte of data and sending an information indicating successful response, the clock signal is pulled low and reaches the preset duration to wait for interruption processing.

[0071] In the embodiment of the present application, the method further includes:

[0072] counting the number of times the target device executes the abnormal information processing program;

[0073] if the number of times is greater than a preset number of times, when the target device is triggered to execute the abnormal information processing program again, it does not enter the execution of the abnormal information processing program.

[0074] Exemplarily, if the abnormal information processing program is executed multiple times, it will cause repeated processing of abnormal information, and the final result is inaccurate, resulting in repeated storage or repeated reading. In the embodiment of the present application, a counter is used to count the number of times the target device executes the abnormal information processing program. If the number of times is greater than the preset number of times, when the target device is triggered to execute the abnormal information processing program again, it does not enter the execution of the abnormal information processing program to avoid incorrect abnormal information caused by repeated execution. The preset number of times can be determined according to the actual situation. For example, it can be set to 2 times.

[0075] The embodiment of the present application provides an abnormal information processing method. When sending the next clock signal after the processing of one byte of abnormal information is completed, an information indicating successful response is sent to the external memory; if an information indicating successful response returned by the external memory is received, the information is not processed. Through the simulation of timing signals and responses, the target device can interact with the external memory normally and continuously store or read abnormal information, avoiding other abnormal situations during the abnormal information processing process that may cause processing failure.

[0076] Embodiment 4

[0077] Figure 5FIG. 0 is a schematic structural diagram of an abnormal information processing device provided in the fourth embodiment of the present application. The device can execute the abnormal information processing method provided in any embodiment of the present application, and has corresponding functional modules and beneficial effects for executing the method. As Figure 5 shown, the device includes:

[0078] A trigger execution module 410, configured to trigger the target device to execute an abnormal information processing program corresponding to the preset situation if the target device has a preset situation; wherein, the preset situation includes an abnormality and recovery to normal when executing a function program;

[0079] A mode setting module 420, configured to set the pin connecting the target device to an external memory to an input / output mode corresponding to the abnormal information processing program; wherein, the abnormal information processing program includes an abnormal information storage program and an abnormal information reading program;

[0080] An execution module 430, configured to execute the processing of abnormal information by means of an external memory; wherein, the abnormal information processing program is generated according to the timing characteristics of the external memory.

[0081] In the embodiment of the present application, the mode setting module 420 is specifically configured to:

[0082] If an abnormality occurs when the target device executes a function program, determine that the abnormal information processing method is abnormal information storage, and set the clock signal pin and data transmission pin connecting the target device to the external memory to an output mode;

[0083] If the target device recovers to normal, determine that the abnormal information processing method is abnormal information reading, set the clock signal pin and data transmission pin connecting the target device to the external memory to an output mode, and send a signal through the data transmission pin to notify the external memory that abnormal information reading is about to be performed, and then modify the data transmission pin to an input mode to perform abnormal information reading.

[0084] In the embodiment of the present application, the execution module 430 is specifically configured to:

[0085] If it is determined according to the timing characteristics of the external memory that a response result needs to be fed back, when sending the next clock signal after the processing of one byte of abnormal information is completed, send a preset signal to the external memory; wherein, the preset signal is used to make the external memory determine that the target device has responded successfully;

[0086] If the target device receives the information that the response from the external memory is successful, do not process the information.

[0087] In the embodiment of the present application, the execution module 430 is specifically configured to:

[0088] If there is an interruption in the external memory that needs to be processed, the control clock signal pin outputs a pause signal to transmit the corresponding clock signal and lasts for a preset duration to wait for the external memory to process the interruption.

[0089] In an embodiment of the present application, the device further includes:

[0090] A statistics module, configured to count the number of times the target device executes the exception information processing program;

[0091] A judgment module, configured to, if the number of times is greater than a preset number of times, when the target device is triggered to execute the exception information processing program again, not enter the execution of the exception information processing program.

[0092] In an embodiment of the present application, the device further includes:

[0093] A timing feature determination module, configured to determine the timing features when the external memory is working;

[0094] An exception information processing program generation module, configured to generate an exception information storage program and an exception information reading program according to the timing features.

[0095] In an embodiment of the present application, the device further includes:

[0096] A replacement module, configured to, if the target program is included in the exception information processing program, replace the functional program with another program having the same function as the target program or delete the functional program; wherein, the target program includes a sleep program, a scheduling program, and a file processing program.

[0097] An exception information processing device provided by an embodiment of the present application can execute an exception information processing method provided by any embodiment of the present application, and has corresponding functional modules and beneficial effects for executing the method.

[0098] Embodiment Five

[0099] Figure 6 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present application. The electronic device is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device (such as a helmet, glasses, a watch, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present application described herein and / or claimed.

[0100] As Figure 6As shown, the electronic device 10 includes at least one processor 11 and a memory that is abnormally information - processing connected to the at least one processor 11, such as a read - only memory (ROM) 12, a random - access memory (RAM) 13, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 11 can execute various appropriate actions and processes according to the computer program stored in the read - only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random - access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0101] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disc, etc.; and an abnormal information - processing unit 19, such as a network card, a modem, a wireless abnormal - information - processing transceiver, etc. The abnormal information - processing unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0102] The processor 11 can be various general - purpose and / or special - purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial - intelligence (AI) computing chips, various processors running machine - learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the abnormal information - processing method.

[0103] In some embodiments, the abnormal information - processing method can be implemented as a computer program that is tangibly contained in a computer - readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the abnormal information - processing unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the abnormal information - processing method described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the abnormal information - processing method in any other appropriate way (e.g., by means of firmware).

[0104] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which may be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.

[0105] The computer programs for implementing the methods of this application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable exceptional information processing device, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine, or entirely on the remote machine or server.

[0106] In the context of this application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0107] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0108] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data exception information processing (e.g., an exception information processing network). Examples of the exception information processing network include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0109] The computing system can include a client and a server. The client and the server are generally remote from each other and typically interact through an exception information processing network. The relationship between the client and the server is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0110] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this application can be executed in parallel, sequentially, or in a different order, as long as the information desired by the technical solution of this application can be achieved, and no limitation is imposed herein.

[0111] The above specific embodiments do not constitute a limitation on the protection scope of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of this application shall be included within the protection scope of this application.

Claims

1. An abnormal information processing method, characterized in that, The method includes: If a preset situation occurs in the target device, trigger the target device to execute an exception information processing program corresponding to the preset situation; wherein, the preset situations include exceptions occurring when executing a function program and returning to normal; Set the pin connecting the target device to the external memory to an input / output mode corresponding to the exception information processing program; wherein, the exception information processing program includes an exception information storage program and an exception information reading program; Execute the processing of the exception information by means of the external memory; wherein, the exception information processing program is generated according to the timing characteristics of the external memory.

2. The method according to claim 1, wherein Setting the pin connecting the target device to the external memory to an input / output mode corresponding to the exception information processing program includes: If an exception occurs when the target device executes the function program, determine that the exception information processing method is exception information storage, and set the clock signal pin and the data transmission pin connecting the target device to the external memory to the output mode; If the target device returns to normal, determine that the exception information processing method is exception information reading, set the clock signal pin and the data transmission pin connecting the target device to the external memory to the output mode, output a signal through the data transmission pin to notify the external memory that exception information reading is about to be performed, and then modify the data transmission pin to the input mode to perform exception information reading.

3. The method according to claim 1, characterized in that, Executing the processing of the exception information by means of the external memory includes: If it is determined according to the timing characteristics of the external memory that a response result needs to be fed back, when sending the next clock signal after the processing of one byte of exception information is completed, send a preset signal to the external memory; wherein, the preset signal is used to enable the external memory to determine that the target device has responded successfully; If the target device receives the information that the response from the external memory is successful, do not process this information.

4. The method according to claim 1, wherein Executing the processing of the exception information by means of the external memory includes: If there is an interrupt in the external memory that needs to be processed, control the clock signal pin to output a clock signal for pausing signal transmission for a preset duration to wait for the external memory to process the interrupt.

5. The method according to claim 1, characterized in that, The method further includes: Count the number of times the target device executes the exception information processing program; If the number is greater than the preset number, when triggering the target device to execute the exception information processing program again, do not enter the execution of the exception information processing program.

6. The method according to claim 1, characterized in that The generation process of the exception information processing program includes: Determine the timing characteristics when the external memory is working; Generate an exception information storage program and an exception information reading program according to the timing characteristics.

7. The method according to claim 6, characterized in that, The method further includes: If the exception information processing program includes a target program, replace the function program with another program having the same function as the target program or delete the function program; wherein, the target programs include a sleep program, a scheduling program, and a file processing program.

8. An abnormal information processing device, characterized in that, The device includes: A trigger execution module, configured to, if a preset situation occurs in the target device, trigger the target device to execute an exception information processing program corresponding to the preset situation; wherein, the preset situations include exceptions occurring when executing a function program and returning to normal; A mode setting module for setting the pins connecting the target device to an external memory to an input / output mode corresponding to an exception information handler; wherein, the exception information handler includes an exception information storage program and an exception information reading program; An execution module for executing the processing of exception information by means of an external memory; wherein, the exception information handler is generated according to the timing characteristics of the external memory.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory that is abnormally information processing connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the exception information processing method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a processor to implement the exception information processing method according to any one of claims 1-7 when executed.