Fault data storage method and device of controller, electronic equipment and storage medium

By deploying an auxiliary system in the controller to monitor and back up fault data in real time, the problem of controller fault data loss is solved, timely storage of fault data and support for subsequent analysis are achieved, and the accuracy of fault diagnosis and processing efficiency are improved.

CN118733401APending Publication Date: 2024-10-01INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410804406.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

When a controller fails, fault data is easily lost, making subsequent fault analysis difficult. It is difficult to effectively save fault data with existing technology.

Method used

By deploying an auxiliary system in the controller, the operating status of the main control system is monitored in real time, and the image file is automatically backed up when a fault occurs and saved to a preset location, including flash memory or external memory, using the dog feeding mechanism and exceptions The error handling mechanism transmits fault signals and realizes timely storage of fault data.

Benefits of technology

Effectively save the fault data formed by the controller during the fault process, improve the accuracy and efficiency of fault diagnosis, shorten fault processing time, and ensure system stability and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733401A_ABST
    Figure CN118733401A_ABST
Patent Text Reader

Abstract

The invention provides a fault data storage method and device of a controller, electronic equipment and a storage medium, the method is applied to the controller, the controller is provided with a main control system and an auxiliary system, and the auxiliary system is used for monitoring the running state of the main control system; the method comprises the following steps: calling the auxiliary system to monitor the running state of the main control system in real time; and under the condition that the operation state of the main control system is monitored to fail based on the auxiliary system, controlling the auxiliary system to backup a mirror image file of the controller to obtain a backed-up mirror image file, and storing the backed-up mirror image file to a preset position. The fault data formed in the fault occurrence process of the controller can be effectively stored, so that a foundation is laid for improving the accuracy and efficiency of fault diagnosis and shortening the fault processing time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fault data storage, and in particular to a method, device, electronic device and storage medium for storing fault data of a controller. Background Art

[0002] It is known from the related art that a controller, such as a baseboard management controller (MBC), may experience program crashes or system restarts during operation due to software errors, hardware failures, etc. However, the failure data is often lost during the failure process, which makes subsequent failure analysis extremely difficult.

[0003] Therefore, finding a fault data preservation method that can effectively preserve the fault data generated by the controller during a fault has become a current research hotspot. Summary of the invention

[0004] The present invention provides a method, device, electronic device and storage medium for storing fault data of a controller, which can effectively store fault data generated by the controller during a fault, thereby laying a foundation for improving the accuracy and efficiency of fault diagnosis and shortening fault processing time.

[0005] The present invention provides a method for preserving fault data of a controller, the method being applied to a controller, the controller being deployed with a main control system and an auxiliary system, wherein the auxiliary system is used to monitor the operating status of the main control system; the method comprising: calling the auxiliary system to monitor the operating status of the main control system in real time; in the case where the auxiliary system monitors that a fault occurs in the operating status of the main control system, controlling the auxiliary system to back up the image file of the controller to obtain a backed-up image file, and saving the backed-up image file to a preset location.

[0006] According to a controller fault data preservation method provided by the present invention, based on the auxiliary system monitoring the operating status of the main control system to have a fault, the method is implemented in the following manner: controlling the main control system to write mark information to the register of the auxiliary system in real time based on a dog feeding mechanism, wherein the mark information is used to indicate that the main control system is operating normally; when the auxiliary system monitors that the register is not written with the mark information within a preset time period, determining that the operating status of the main control system has a fault, or when the main control system is a Linux operating system, monitoring the operating status of the Linux operating system in real time through an abnormal error handling mechanism based on the kernel module of the Linux operating system; when an abnormal error is detected in the Linux operating system, sending a fault signal instruction to the auxiliary system; when the auxiliary system receives the fault signal instruction, determining that the operating status of the main control system has a fault.

[0007] According to a method for saving fault data of a controller provided by the present invention, the preset location includes an unused space of a flash memory where the image file of the controller is located; saving the backup image file to the preset location specifically includes: saving the backup image file to an unused space of a flash memory where the image file of the controller is located.

[0008] According to a method for saving fault data of a controller provided by the present invention, the preset location includes a storage space of an external memory; saving the backup image file to the preset location specifically includes: controlling the auxiliary system to establish a communication connection with the external memory, wherein the external memory is a memory located outside the controller; calling the auxiliary system to transfer the backup image file to the storage space of the external memory for saving based on communication transmission.

[0009] According to a method for saving fault data of a controller provided by the present invention, after saving the backup image file to a preset location, the method further includes: obtaining a reference image file obtained by running the controller under normal operating conditions; comparing the reference image file with the backup image file to obtain a comparison result, and determining the fault type of the controller based on the comparison result.

[0010] According to a method for preserving fault data of a controller provided by the present invention, the backed-up image file includes the running status information of the controller, the running log information of the controller, and the hardware monitoring data information of the controller; the reference image file includes the reference running status information of the controller, the reference running log information of the controller, and the reference hardware monitoring data information of the controller; before determining the fault type of the controller according to the comparison result, the method also includes: pre-maintaining a mapping table, wherein the mapping table includes a correspondence between different comparison results and different fault types, wherein the comparison result includes at least a first comparison result, a second comparison result and a third comparison result, the first comparison result is used to characterize a comparison result in which the difference between the running status information and the reference running status information is greater than a difference threshold; the second comparison result is used to characterize a comparison result in which the difference between the running log information and the reference running log information is greater than a difference a comparison result of a degree threshold; the third comparison result is used to characterize that the difference between the hardware monitoring data information and the reference hardware monitoring data information is greater than the comparison result of the difference degree threshold; the determining the fault type of the controller according to the comparison result specifically includes: when the comparison result is the first comparison result, obtaining the fault type corresponding to the first comparison result based on the mapping table, and using the fault type corresponding to the first comparison result as the fault type of the controller; when the comparison result is the second comparison result, obtaining the fault type corresponding to the second comparison result based on the mapping table, and using the fault type corresponding to the second comparison result as the fault type of the controller; when the comparison result is the third comparison result, obtaining the fault type corresponding to the third comparison result based on the mapping table, and using the fault type corresponding to the third comparison result as the fault type of the controller.

[0011] The present invention also provides a fault data saving device for a controller, the device is applied to the controller, the controller is deployed with a main control system and an auxiliary system, the auxiliary system is used to monitor the operating status of the main control system; the device includes: a monitoring module, which is used to call the auxiliary system to monitor the operating status of the main control system in real time; a processing module, which is used to control the auxiliary system to back up the image file of the controller based on the auxiliary system monitoring that the operating status of the main control system has a fault, obtain the backup image file, and save the backup image file to a preset location.

[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a fault data saving method of any of the controllers described above is implemented.

[0013] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for saving fault data of the controller as described in any one of the above is implemented.

[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for saving fault data of the controller as described above is implemented.

[0015] The controller fault data preservation method, device, electronic device and storage medium provided by the present invention are applied to the controller, and the controller is deployed with a main control system and an auxiliary system, wherein the auxiliary system is used to monitor the operating status of the main control system; the operating status of the main control system is monitored in real time by calling the auxiliary system; when the auxiliary system monitors that the operating status of the main control system fails, the auxiliary system is controlled to back up the image file of the controller to obtain the backup image file, and the backup image file is saved to a preset location. The fault data formed by the controller during the fault process can be effectively saved, thereby laying a foundation for improving the accuracy and efficiency of fault diagnosis and shortening the fault processing time. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 This is one of the flow charts of the method for storing fault data of the controller provided by the present invention.

[0018] Figure 2 This is the second flow chart of the method for storing fault data of the controller provided by the present invention.

[0019] Figure 3 It is a flow chart of determining the fault type of the controller according to the comparison result provided by the present invention.

[0020] Figure 4 It is a schematic diagram of an application scenario of the fault data storage method of the controller provided by the present invention.

[0021] Figure 5 It is a structural schematic diagram of a fault data storage device of a controller provided by the present invention.

[0022] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] The controller fault data preservation method provided by the present invention can monitor the data status in real time during the operation of the controller, and trigger the process of automatically backing up key data when a fault warning is issued, so that key information is stored in a safe and reliable location, which becomes one of the key links to ensure the normal operation and rapid recovery of the system. This method can not only effectively deal with the data loss problem caused by unexpected failures, but also provide reliable data support for troubleshooting, thereby maximizing the stability and reliability of the server system.

[0025] Figure 1 This is one of the flow charts of the method for storing fault data of the controller provided by the present invention.

[0026] The following will be combined Figure 1 The process of the controller's fault data storage method is described below.

[0027] In an exemplary embodiment of the present invention, a method for preserving fault data of a controller can be applied to a controller. The controller can be a baseboard management controller BMC or other types of controllers. During the application process, the controller can be deployed with a main control system and an auxiliary system, wherein the auxiliary system is used to monitor the operating status of the main control system. It should be noted that the main control system refers to the system in which the controller runs, and the main control system can be responsible for the routine management tasks of the controller. In the event of a controller failure, the main control system cannot operate normally either. In other words, the operating status of the main control system can reflect whether there is a fault problem with the controller.

[0028] Combination Figure 1 It can be known that the controller fault data storage method may include steps 110 to 120, and each step will be introduced below.

[0029] In step 110, the auxiliary system is called to monitor the operating status of the main control system in real time.

[0030] In step 120, when the auxiliary system monitors that the operating status of the main control system fails, the auxiliary system is controlled to back up the image file of the controller to obtain a backup image file, and save the backup image file to a preset location.

[0031] In one embodiment, a main control system and an auxiliary system may be deployed in the controller, wherein the main control system may be a main monitoring software; and the auxiliary system may be an RTOS system. In another embodiment, the controller may include a chip with multi-core characteristics, thereby ensuring that the main monitoring software and the RTOS system can run in parallel.

[0032] In another embodiment, the auxiliary system can be called to monitor the operating status of the main control system in real time. When the auxiliary system monitors that the operating status of the main control system fails, the auxiliary system can be controlled to back up the image file of the controller, obtain the backup image file, and save the backup image file to a preset location. It is understandable that the preset location can be a pre-set safe storage location. This can effectively ensure the security and reliability of key data of the controller when a failure occurs, provide strong support for subsequent fault analysis and processing, and ultimately improve the stability and reliability of the server system.

[0033] The controller fault data saving method provided by the present invention is applied to the controller, and the controller is deployed with a main control system and an auxiliary system, wherein the auxiliary system is used to monitor the operating status of the main control system; the operating status of the main control system is monitored in real time by calling the auxiliary system; when the auxiliary system monitors that the operating status of the main control system fails, the auxiliary system is controlled to back up the image file of the controller to obtain the backup image file, and the backup image file is saved to a preset location. The fault data formed by the controller during the fault process can be effectively saved, thereby laying a foundation for improving the accuracy and efficiency of fault diagnosis and shortening the fault processing time.

[0034] In another exemplary embodiment of the present invention, the above-mentioned embodiment is continued to be used as an example for description, wherein, based on the auxiliary system monitoring the operating state of the main control system to fail, the following method can be used to implement: The main control system is controlled to write the marking information to the register of the auxiliary system in real time based on the dog feeding mechanism, wherein the marking information is used to indicate that the main control system is operating normally; When the auxiliary system detects that the register is not written with the mark information within the preset time, it is determined that the operation state of the main control system fails, or

[0035] When the main control system is a Linux operating system, the kernel module based on the Linux operating system monitors the running status of the Linux operating system in real time through an abnormal error handling mechanism; When an abnormal error is detected in the Linux operating system, a fault signal instruction is sent to the auxiliary system; When the auxiliary system receives a fault signal instruction, it determines that the operating state of the main control system fails.

[0036] In one embodiment, the main control system can be controlled to write the mark information to the register of the auxiliary system in real time based on the dog feeding mechanism. It can be understood that when the control system is in a normal operating state, the mark information can be written to the register of the auxiliary system in real time, wherein the mark information is used to indicate that the main control system is operating normally. When the auxiliary system monitors that the register is not written with the mark information within a preset time period, it means that the main control system can no longer operate normally, and thus it can be determined that the operating state of the main control system has failed.

[0037] In another embodiment, when the main control system is a Linux operating system, an interface can be pre-set in the Linux operating system kernel module. During the application process, the operating state of the Linux operating system can be monitored in real time through an abnormal error handling mechanism based on the kernel module of the Linux operating system. When an abnormal error is detected in the Linux operating system, that is, when the system encounters an unknown error and needs to be restarted, a fault signal instruction can be sent to the auxiliary system, so that when the auxiliary system receives the fault signal instruction, it can be determined that the operating state of the main control system has failed. In other words, when the system encounters an unknown error and needs to be restarted, the fault signal is automatically triggered to be sent to the auxiliary system. This design ensures that the fault signal can be transmitted to the auxiliary system in a timely and accurate manner, so as to effectively save the fault data formed by the controller during the fault process, thereby improving the accuracy and efficiency of fault diagnosis and shortening the fault handling time. Lay the foundation.

[0038] In another exemplary embodiment of the present invention, the preset location may include an unused space of a flash memory where the image file of the controller is located; wherein saving the backed-up image file to the preset location may be implemented in the following manner: The backed-up image file is saved to an unused space of the flash memory where the image file of the controller is located.

[0039] In one embodiment, the backup image file can be backed up to a preset safe storage area based on the auxiliary system. The backup image file can be saved to the unused space of the flash memory where the image file of the controller is located. This ensures that even when the system is facing a restart, the key data can be retained to the greatest extent, providing support for subsequent fault analysis and processing.

[0040] In another exemplary embodiment of the present invention, the preset location may also include a storage space of an external memory; wherein, saving the backup image file to the preset location may be implemented in the following manner: The control auxiliary system establishes a communication connection with the external memory, wherein the external memory is a memory located outside the controller; the auxiliary system is called to transfer the backed-up image file to the storage space of the external memory for storage based on the communication transmission.

[0041] In another embodiment, the backup image file can also be encrypted to obtain an encrypted image file, and the encrypted image file can be saved to the storage space of the external memory, thereby avoiding the possibility of the encrypted image file being tampered with and improving the security of key data.

[0042] In another embodiment, the backup image file can also be backed up to an external memory based on the auxiliary system. During the application process, the ability of the network module can be configured for the auxiliary system, and the remote transmission of fault data can be realized. That is, the auxiliary system is controlled to establish a communication connection with the external memory, and the auxiliary system is called to transfer the backup image file to the storage space of the external memory based on the communication transmission for preservation. This means that the fault data can be quickly and safely transmitted to a remote location so that maintenance personnel can obtain the fault data in time for analysis and processing. This remote transmission method can greatly improve the efficiency of fault handling, especially when remote expert support is required, and necessary data information can be quickly obtained for diagnosis and troubleshooting.

[0043] Figure 2 This is the second flow chart of the method for storing fault data of the controller provided by the present invention.

[0044] The following will be combined Figure 2 The process of another controller fault data storage method provided by the present invention is described.

[0045] In an exemplary embodiment of the present invention, Figure 2 It can be seen that the controller's fault data saving method may include steps 210 to 240, wherein steps 210 to 220 are respectively the same or similar to steps 110 to 120. For specific implementation methods and beneficial effects, please refer to the previous description. In this embodiment, no specific limitation is made. Steps 230 and 240 will be introduced below respectively.

[0046] In step 230, a reference image file is obtained when the controller is running in a normal operating state.

[0047] In step 240, the reference image file and the backed-up image file are compared to obtain a comparison result, and the fault type of the controller is determined according to the comparison result.

[0048] In one embodiment, a reference image file obtained when the controller is running in a normal operating state may be obtained. Since the reference image file is an image file of the controller under normal operating conditions, it represents a normal operating state. If the backup image file is inconsistent with the reference image file, it can be determined that the controller has a fault. Furthermore, the fault type can be determined based on the difference between the two, that is, the fault type of the controller can be determined based on the comparison result between the reference image file and the backup image file.

[0049] Figure 3 It is a flow chart of determining the fault type of the controller according to the comparison result provided by the present invention.

[0050] The following will be combined Figure 3 The process of determining the fault type of the controller according to the comparison result is described.

[0051] In an exemplary embodiment of the present invention, Figure 3 It can be seen that determining the fault type of the controller according to the comparison result may include steps 310 to 340, and each step will be introduced below.

[0052] In step 310, a mapping table is maintained in advance, wherein the mapping table includes corresponding relationships between different comparison results and different fault types.

[0053] In one embodiment, a mapping table can be maintained in advance, wherein the mapping table can include the correspondence between different comparison results and different fault types, so that the fault type of the controller can be quickly determined with the help of the mapping table. Among them, the comparison results can include at least a first comparison result, a second comparison result, and a third comparison result. The first comparison result is used to characterize the comparison result that the difference between the running state information and the reference running state information is greater than the difference threshold; the second comparison result is used to characterize the comparison result that the difference between the running log information and the reference running log information is greater than the difference threshold; the third comparison result is used to characterize the comparison result that the difference between the hardware monitoring data information and the reference hardware monitoring data information is greater than the difference threshold. It should be noted that the first comparison result characterizes that a fault has occurred at the running state information; the second comparison result characterizes that a fault has occurred at the running log information; and the third comparison result characterizes that a fault has occurred at the hardware monitoring data information. Then, the corresponding fault can be deduced based on the information at the fault location.

[0054] In step 320 , when the comparison result is the first comparison result, the fault type corresponding to the first comparison result is obtained based on the mapping table, and the fault type corresponding to the first comparison result is used as the fault type of the controller.

[0055] In step 330 , when the comparison result is the second comparison result, the fault type corresponding to the second comparison result is obtained based on the mapping table, and the fault type corresponding to the second comparison result is used as the fault type of the controller.

[0056] In step 340 , when the comparison result is the third comparison result, the fault type corresponding to the third comparison result is obtained based on the mapping table, and the fault type corresponding to the third comparison result is used as the fault type of the controller.

[0057] In one embodiment, when the comparison result is a first comparison result, the fault type corresponding to the first comparison result can be quickly obtained based on the corresponding relationship in the mapping table, and the fault type corresponding to the first comparison result is used as the fault type of the controller. When the comparison result is a second comparison result, the fault type corresponding to the second comparison result can be quickly obtained based on the corresponding relationship in the mapping table, and the fault type corresponding to the second comparison result is used as the fault type of the controller. When the comparison result is a third comparison result, the fault type corresponding to the third comparison result can be quickly obtained based on the corresponding relationship in the mapping table, and the fault type corresponding to the third comparison result is used as the fault type of the controller. Through this embodiment, the fault of the controller can be quickly located.

[0058] Figure 4 It is a schematic diagram of an application scenario of the fault data storage method of the controller provided by the present invention.

[0059] In order to further introduce the fault data storage method of the controller provided by the present invention, the following will be combined with Figure 4 Provide explanation.

[0060] In an exemplary embodiment of the present invention, Figure 4 It can be seen that the controller is a BMC controller as an example for explanation. Among them, the BMC controller is deployed with main monitoring software and RTO auxiliary system. The main monitoring software data can be read and written normally under normal operation. Since the RTO auxiliary system can monitor the running status of the main program, when it detects that the BMC main monitoring software is abnormal, it can send a signal reminder to the RTO auxiliary system, so that the RTO auxiliary system can be controlled to read the main monitoring software data and write the main monitoring software data to the flash, thereby saving the abnormal image file. In another example, the RTOS system can also have the ability to configure a network module, which can realize the sending of abnormal images to remote servers through the network, thereby ensuring that fault data can be quickly and safely transmitted to remote locations, so that maintenance personnel can obtain fault data in time for analysis and processing.

[0061] According to the foregoing description, the controller fault data saving method provided by the present invention is applied to the controller, and the controller is deployed with a main control system and an auxiliary system, wherein the auxiliary system is used to monitor the operating status of the main control system; the operating status of the main control system is monitored in real time by calling the auxiliary system; when the auxiliary system monitors that the operating status of the main control system fails, the auxiliary system is controlled to back up the image file of the controller, obtain the backup image file, and save the backup image file to a preset location. The fault data formed by the controller during the fault process can be effectively saved, thereby laying a foundation for improving the accuracy and efficiency of fault diagnosis and shortening the fault processing time.

[0062] The fault data saving device of the controller provided by the present invention is described below. The fault data saving device of the controller described below and the fault data saving method of the controller described above can be referred to each other.

[0063] Figure 5 It is a structural schematic diagram of a fault data storage device of a controller provided by the present invention.

[0064] The following will be combined Figure 5 The fault data storage device of the controller is described.

[0065] In an exemplary embodiment of the present invention, the controller fault data storage device can be applied to a controller, wherein the controller is deployed with a main control system and an auxiliary system, wherein the auxiliary system is used to monitor the operating status of the main control system. Figure 5 It can be known that the fault data storage device of the controller may include a monitoring module 510 and a processing module 520, and each module will be introduced below.

[0066] The monitoring module 510 may be configured to call the auxiliary system to monitor the operating status of the main control system in real time; The processing module 520 can be configured to control the auxiliary system to back up the image file of the controller, obtain the backup image file, and save the backup image file to a preset location when the auxiliary system monitors that the operating status of the main control system fails.

[0067] In an exemplary embodiment of the present invention, the processing module 520 may implement the following method based on the auxiliary system monitoring the operating state of the main control system to be faulty: Controlling the main control system to write mark information to the register of the auxiliary system in real time based on the dog feeding mechanism, wherein the mark information is used to indicate that the main control system is operating normally; In the case where the auxiliary system monitors that the register is not written with the marking information within a preset time period, it is determined that the operating state of the main control system fails, or

[0068] In the case where the main control system is a Linux operating system, the operating state of the Linux operating system is monitored in real time through an abnormal error handling mechanism based on the kernel module of the Linux operating system; When an abnormal error is detected in the Linux operating system, a fault signal instruction is sent to the auxiliary system; when the auxiliary system receives the fault signal instruction, it is determined that a fault occurs in the operating state of the main control system.

[0069] In an exemplary embodiment of the present invention, the preset location includes an unused space of a flash memory where the image file of the controller is located; the processing module 520 can save the backup image file to the preset location in the following manner: The backed-up image file is saved in an unused space of the flash memory where the image file of the controller is located.

[0070] In an exemplary embodiment of the present invention, the preset location includes a storage space of an external memory; the processing module 520 can save the backup image file to the preset location in the following manner: Controlling the auxiliary system to establish a communication connection with the external memory, wherein the external memory is a memory located outside the controller; The auxiliary system is called to transmit the backed-up image file to the storage space of the external memory for storage based on communication transmission.

[0071] In an exemplary embodiment of the present invention, the processing module 520 may also be configured to: Acquire a reference image file obtained by running the controller in a normal operating state; The reference image file and the backed-up image file are compared to obtain a comparison result, and the fault type of the controller is determined according to the comparison result.

[0072] In an exemplary embodiment of the present invention, the backed-up image file includes the running status information of the controller, the running log information of the controller, and the hardware monitoring data information of the controller; the reference image file includes the reference running status information of the controller, the reference running log information of the controller, and the reference hardware monitoring data information of the controller; the processing module 520 may also be configured to: Maintaining a mapping table in advance, wherein the mapping table includes a correspondence between different comparison results and different fault types, wherein the comparison results include at least a first comparison result, a second comparison result, and a third comparison result, wherein the first comparison result is used to characterize a comparison result in which the difference between the running state information and the reference running state information is greater than a difference threshold; the second comparison result is used to characterize a comparison result in which the difference between the running log information and the reference running log information is greater than a difference threshold; the third comparison result is used to characterize a comparison result in which the difference between the hardware monitoring data information and the reference hardware monitoring data information is greater than a difference threshold; The processing module 520 may also determine the fault type of the controller according to the comparison result in the following manner: when the comparison result is the first comparison result, obtain the fault type corresponding to the first comparison result based on the mapping table, and use the fault type corresponding to the first comparison result as the fault type of the controller; In a case where the comparison result is the second comparison result, obtaining a fault type corresponding to the second comparison result based on the mapping table, and using the fault type corresponding to the second comparison result as the fault type of the controller; In a case where the comparison result is the third comparison result, a fault type corresponding to the third comparison result is obtained based on the mapping table, and the fault type corresponding to the third comparison result is used as the fault type of the controller.

[0073] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 complete mutual communication through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the fault data saving method of the controller, the method is applied to the controller, the controller is deployed with a main control system and an auxiliary system, wherein the auxiliary system is used to monitor the running state of the main control system; the method includes: calling the auxiliary system to monitor the running state of the main control system in real time; in the case that the auxiliary system monitors the running state of the main control system to fail, controlling the auxiliary system to back up the image file of the controller, obtain the backed-up image file, and save the backed-up image file to a preset location.

[0074] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0075] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the fault data saving method of the controller provided by the above methods, and the method is applied to the controller, and the controller is deployed with a main control system and an auxiliary system, wherein the auxiliary system is used to monitor the operating status of the main control system; the method includes: calling the auxiliary system to monitor the operating status of the main control system in real time; when the auxiliary system monitors that the operating status of the main control system fails, controlling the auxiliary system to back up the image file of the controller to obtain the backup image file, and saving the backup image file to a preset location.

[0076] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the fault data saving method of the controller provided by the above-mentioned methods, wherein the method is applied to a controller, and the controller is deployed with a main control system and an auxiliary system, wherein the auxiliary system is used to monitor the operating status of the main control system; the method comprises: calling the auxiliary system to monitor the operating status of the main control system in real time; in a case where the auxiliary system monitors that the operating status of the main control system fails, controlling the auxiliary system to back up the image file of the controller to obtain the backup image file, and saving the backup image file to a preset location.

[0077] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0078] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for storing fault data of a controller, characterized in that: The method is applied to a controller, wherein the controller is deployed with a main control system and an auxiliary system, wherein the auxiliary system is used to monitor the operating status of the main control system; the method comprises: Calling the auxiliary system to monitor the operating status of the main control system in real time; When the auxiliary system detects that a failure occurs in the operating state of the main control system, the auxiliary system is controlled to back up the image file of the controller to obtain a backup image file, and the backup image file is saved to a preset location.

2. The controller fault data storage method according to claim 1, characterized in that: Based on the auxiliary system monitoring the operating state of the main control system to fail, the following method is adopted: Controlling the main control system to write mark information to the register of the auxiliary system in real time based on the dog feeding mechanism, wherein the mark information is used to indicate that the main control system is operating normally; In the case where the auxiliary system monitors that the register is not written with the marking information within a preset time period, it is determined that the operating state of the main control system fails, or In the case where the main control system is a Linux operating system, the operating state of the Linux operating system is monitored in real time through an abnormal error handling mechanism based on the kernel module of the Linux operating system; When an abnormal error is detected in the Linux operating system, a fault signal instruction is sent to the auxiliary system; when the auxiliary system receives the fault signal instruction, it is determined that a fault occurs in the operating state of the main control system.

3. The controller fault data storage method according to claim 1 or 2, characterized in that: The preset location includes an unused space of the flash memory where the image file of the controller is located; The step of saving the backup image file to a preset location specifically includes: The backed-up image file is saved in an unused space of the flash memory where the image file of the controller is located.

4. The controller fault data storage method according to claim 1 or 2, characterized in that: The preset location includes a storage space of an external memory; and the step of saving the backup image file to the preset location specifically includes: Controlling the auxiliary system to establish a communication connection with the external memory, wherein the external memory is a memory located outside the controller; The auxiliary system is called to transmit the backed-up image file to the storage space of the external memory for storage based on communication transmission.

5. The controller fault data storage method according to claim 1, characterized in that: After the backup image file is saved to a preset location, the method further includes: Acquire a reference image file obtained by running the controller in a normal operating state; The reference image file and the backed-up image file are compared to obtain a comparison result, and the fault type of the controller is determined according to the comparison result.

6. The controller fault data storage method according to claim 5, characterized in that: The backup image file includes the running status information of the controller, the running log information of the controller, and the hardware monitoring data information of the controller; The reference image file includes reference operation status information of the controller, reference operation log information of the controller, and reference hardware monitoring data information of the controller; Before determining the fault type of the controller according to the comparison result, the method further includes: Maintaining a mapping table in advance, wherein the mapping table includes a correspondence between different comparison results and different fault types, wherein the comparison results include at least a first comparison result, a second comparison result, and a third comparison result, wherein the first comparison result is used to characterize a comparison result in which the difference between the running state information and the reference running state information is greater than a difference threshold; the second comparison result is used to characterize a comparison result in which the difference between the running log information and the reference running log information is greater than a difference threshold; the third comparison result is used to characterize a comparison result in which the difference between the hardware monitoring data information and the reference hardware monitoring data information is greater than a difference threshold; Determining the fault type of the controller according to the comparison result specifically includes: When the comparison result is the first comparison result, the fault type corresponding to the first comparison result is obtained based on the mapping table, and the fault type corresponding to the first comparison result is used as the fault type of the controller; when the comparison result is the second comparison result, the fault type corresponding to the second comparison result is obtained based on the mapping table, and the fault type corresponding to the second comparison result is used as the fault type of the controller; when the comparison result is the third comparison result, the fault type corresponding to the third comparison result is obtained based on the mapping table, and the fault type corresponding to the third comparison result is used as the fault type of the controller.

7. A controller fault data storage device, characterized in that: The device is applied to a controller, and the controller is deployed with a main control system and an auxiliary system, wherein the auxiliary system is used to monitor the operating status of the main control system; the device includes: A monitoring module, used to call the auxiliary system to monitor the operating status of the main control system in real time; The processing module is used to control the auxiliary system to back up the image file of the controller based on the auxiliary system monitoring the operating status of the main control system to obtain the backup image file, and save the backup image file to a preset location.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the fault data saving method of the controller according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the fault data saving method of the controller according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the fault data saving method of the controller according to any one of claims 1 to 6 is implemented.