Method and apparatus for automatically locating abnormal components, electronic device, and storage medium

CN117609024BActive Publication Date: 2026-10-23INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311541420.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-17
Publication Date
2026-10-23
Estimated Expiration
2043-11-17

AI Technical Summary

Technical Problem

但ARM处理器可以在系统下的dmesg文件中记录所有的CPU错误类型但均以二进制数值进行记录,包括但不限于Mesh总线错误、SMpro错误信息、PMpro错误信息、GIC中断错误、SMMU错误信息、CPM错误信息、OCM错误信息等ARM架构内部总线及组件的错误信息,而dmesg记录的也是错误来源等级、错误类型等一些基本的信息和一些错误数据结构体,与x86架构处理器管理原件抓取的错误数据类型,仍需要按照规范文档进行解析,虽然ARM架构不需要外部管理软件进行处理器的错误寄存器数据抓取,但其对处理器的错误数据寄存器解析一样需要人为按照规范文档进行造成了人力及问题定位时间的浪费

Benefits of technology

[0130]首先,根据用户设置的查询周期遍历操作系统中是否存在ARM处理器相关的错误信息日志;若是,则根据所述错误信息日志从所述ARM处理器中的寄存器中获取错误状态寄存器值并确定所述错误状态寄存器值中的前四个故障定位字节,其中所述错误状态寄存器值包含多个二进制的故障定位字节;然后根据前四个故障定位字节和所述操作系统中的字节故障关系映射表定位处理器对应的故障部件;最后根据所述错误信息日志确定所述故障部件中的异常部件。通过解析出的错误寄存器值的前四位字节和对应的字节故障关系映射表快速定位处理器相关的故障类型和故障部件的具体位置;根据统计的故障部件对应的故障信息计算出每个周期各个故障部件的损耗率并确定这些故障部件中是否存在异常部件,通过更换异常部件避免处理器功能经常宕机。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117609024B_ABST
    Figure CN117609024B_ABST
Patent Text Reader

Abstract

The application provides a method and device for automatically locating an abnormal component, electronic equipment and a storage medium, and is characterized in that the method comprises: according to a query period set by a user, traversing an operating system to check whether there is error information log related to an ARM processor; if yes, obtaining an error state register value from a register according to the error information log and determining the first four fault locating bytes in the error state register value, wherein the error state register value comprises a plurality of binary fault locating bytes; locating a fault component corresponding to the processor according to the first four fault locating bytes and a byte fault relationship mapping table; generating fault information of the fault component according to the error information log and clearing the error information log; and determining whether there is an abnormal component in the fault component according to the fault information. The first four bytes of the error register value obtained by analysis and the corresponding byte fault relationship mapping table are used to quickly locate the fault type related to the processor and the specific position of the fault component.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fault location technology, and in particular to a method, apparatus, electronic device, and storage medium for automatically locating abnormal components. Background Technology

[0002] With the development of science and technology and the innovation of chip manufacturing processes, more and more chip architectures are being applied to related fields of the electronics industry. For example, the automotive and IoT sectors use CPUs based on the ARM architecture, while PCs and data center servers mostly use Intel and AMD processors based on the x86 architecture. However, with breakthroughs in chip tape-out technology, it is now possible to tape out processor chips using 5nm or even 2nm process tools. Improving the process flow can significantly enhance processor performance. However, this performance improvement also leads to increased power consumption. Therefore, ARM architecture servers are increasingly favored by various internet and data center systems because ARM processors offer the best energy efficiency and are now widely used in mobile phones, computers, and servers. While x86 architecture processors have a longer history and higher application maturity, their RAS (Recovery, Aid, and Service) capabilities are also the most comprehensive. Their system error localization and management software's data capture and parsing of internal processor registers are industry-leading. However, ARM architecture servers also need to support the parsing and localization of errors encountered during server operation. Therefore, we use the standard system dmesg file to record ARM processor error information. Unlike x86 processors, which can only record a small portion of CPU error information and rely heavily on management software to capture CPU register errors and then parse them according to specifications—a highly inefficient process—ARM processors can record all CPU error types in the system's dmesg file, all in binary values. This includes, but is not limited to, errors related to Mesh bus errors, SMpro, PMpro, GIC interrupt errors, SMMU errors, CPM errors, and OCM errors—errors from ARM's internal buses and components. The dmesg file records basic information such as error source level and type, along with some error data structures. Unlike x86 processors, which require manual parsing according to specifications, ARM processors still require manual error data capture from management software, resulting in wasted time and resources for problem localization. Summary of the Invention

[0003] Based on this, it is necessary to provide a method, apparatus, electronic device, and storage medium for automatically locating abnormal components of a processor, capable of locating related faulty components and identifying abnormal components among the faulty components, in order to address the aforementioned technical problems.

[0004] In a first aspect, a method for automatically locating abnormal components is provided, characterized in that the method includes:

[0005] Based on the query cycle set by the user, iterate through the operating system to check for ARM processor-related error logs.

[0006] If so, the error status register value is obtained from the register in the ARM processor according to the error information log, and the first four fault location bytes in the error status register value are determined, wherein the error status register value contains multiple binary fault location bytes;

[0007] The faulty component corresponding to the processor is located based on the first four fault location bytes and the byte fault relationship mapping table in the operating system.

[0008] Based on the error information log, generate the fault information corresponding to the faulty component and clear the error information log;

[0009] Based on the fault information, determine whether there are any abnormal components among the faulty components.

[0010] In one embodiment, locating the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system includes:

[0011] The processor fault type is determined based on the first fault location byte and the byte fault relationship mapping table;

[0012] The processor fault subtype is determined based on the processor fault type, the second fault location byte, and the byte fault relationship mapping table;

[0013] The location information of the faulty component is located based on the fault subtype, the third fault location byte, the fourth fault location byte, and the byte fault relationship mapping table.

[0014] In one embodiment, the step of locating the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system includes:

[0015] The remaining fault bytes are parsed from the error status register value, and the faulty component is determined to be recoverable based on the remaining fault bytes and the byte fault relationship mapping table.

[0016] If so, then determine the recovery method corresponding to the faulty component based on the remaining fault bytes;

[0017] If not, an alarm message is sent to the user, wherein the alarm message includes the fault component number corresponding to the faulty component, the processor fault type, and the processor fault subtype.

[0018] In one embodiment, determining whether there is an abnormal component among the faulty components based on the fault information includes:

[0019] The fault information includes the number of times the faulty component failed and the fault interval time.

[0020] The wear rate of the faulty component is calculated based on the fault information and the detection cycle set by the user.

[0021] Determine whether the loss rate is greater than the loss threshold corresponding to the detection cycle;

[0022] If so, the faulty component is identified as an abnormal component, and the user is reminded to replace the abnormal component.

[0023] In one embodiment, calculating the wear rate of the faulty component based on the fault information of the faulty component and the detection cycle set by the user includes:

[0024] A first loss coefficient is calculated based on the number of failures and the first weight set by the user.

[0025] The second loss coefficient is calculated based on the fault interval time and the second weight set by the user.

[0026] The loss rate for each detection cycle is calculated based on the first loss coefficient and the second loss coefficient.

[0027] In one embodiment, the step of traversing the operating system's error logs according to the user-defined query period includes:

[0028] The user inputs the byte fault relationship mapping table into the operating system, wherein the byte fault relationship mapping table includes the mapping relationship between the first fault location byte and the processor fault type, the mapping relationship between the second fault location byte and the processor fault subtype, and the mapping relationship between the third fault location byte, the fourth fault location byte and the faulty component.

[0029] In one embodiment, the method further includes:

[0030] In response to the presence of multiple error message logs in the operating system, determine whether the number of error logs corresponding to the error message logs is greater than the log number threshold set by the user;

[0031] If so, then determine that the processor is malfunctioning and alert the user;

[0032] If not, locate the faulty component based on the error status register value in the error message log.

[0033] On the other hand, an apparatus for automatically locating faulty components is also provided, characterized in that the apparatus comprises:

[0034] The traversal module is used to traverse the operating system's error logs to check for ARM processor-related errors based on a user-defined query period.

[0035] If so, the acquisition module retrieves the error status register value from the registers in the ARM processor according to the error information log and determines the first four fault location bytes in the error status register value, wherein the error status register value contains multiple binary fault location bytes.

[0036] The positioning module is used to locate the faulty component corresponding to the processor based on the first four fault positioning bytes and the byte fault relationship mapping table in the operating system;

[0037] The generation module is used to generate fault information corresponding to the faulty component based on the error information log and clear the error information log;

[0038] The determination module is used to determine whether there is an abnormal component among the faulty components based on the fault information.

[0039] In one embodiment, the location module locates the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system, including:

[0040] The processor fault type is determined based on the first fault location byte and the byte fault relationship mapping table;

[0041] The processor fault subtype is determined based on the processor fault type, the second fault location byte, and the byte fault relationship mapping table;

[0042] The location information of the faulty component is located based on the fault subtype, the third fault location byte, the fourth fault location byte, and the byte fault relationship mapping table.

[0043] In one embodiment, after locating the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system, the positioning module includes:

[0044] The remaining fault bytes are parsed from the error status register value, and the faulty component is determined to be recoverable based on the remaining fault bytes and the byte fault relationship mapping table.

[0045] If so, then determine the recovery method corresponding to the faulty component based on the remaining fault bytes;

[0046] If not, an alarm message is sent to the user, wherein the alarm message includes the fault component number corresponding to the faulty component, the processor fault type, and the processor fault subtype.

[0047] In one embodiment, the determining module determines whether there is an abnormal component among the faulty components based on the fault information, including:

[0048] The fault information includes the number of times the faulty component failed and the fault interval time.

[0049] The wear rate of the faulty component is calculated based on the fault information and the detection cycle set by the user.

[0050] Determine whether the loss rate is greater than the loss threshold corresponding to the detection cycle;

[0051] If so, the faulty component is identified as an abnormal component, and the user is reminded to replace the abnormal component.

[0052] In one embodiment, the determining module calculates the wear rate of the faulty component based on the fault information of the faulty component and the detection cycle set by the user, including:

[0053] A first loss coefficient is calculated based on the number of failures and the first weight set by the user.

[0054] The second loss coefficient is calculated based on the fault interval time and the second weight set by the user.

[0055] The loss rate for each detection cycle is calculated based on the first loss coefficient and the second loss coefficient.

[0056] In one embodiment, the traversal module includes the following steps before traversing the operating system's error logs according to the user-defined query period:

[0057] The user inputs the byte fault relationship mapping table into the operating system, wherein the byte fault relationship mapping table includes the mapping relationship between the first fault location byte and the processor fault type, the mapping relationship between the second fault location byte and the processor fault subtype, and the mapping relationship between the third fault location byte, the fourth fault location byte and the faulty component.

[0058] In one embodiment, the determining module is further configured to include:

[0059] In response to the presence of multiple error message logs in the operating system, determine whether the number of error logs corresponding to the error message logs is greater than the log number threshold set by the user;

[0060] If so, then determine that the processor is malfunctioning and alert the user;

[0061] If not, locate the faulty component based on the error status register value in the error message log.

[0062] In another aspect, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0063] Based on the query cycle set by the user, iterate through the operating system to check for ARM processor-related error logs.

[0064] If so, the error status register value is obtained from the register in the ARM processor according to the error information log, and the first four fault location bytes in the error status register value are determined, wherein the error status register value contains multiple binary fault location bytes;

[0065] The faulty component corresponding to the processor is located based on the first four fault location bytes and the byte fault relationship mapping table in the operating system.

[0066] Based on the error information log, generate the fault information corresponding to the faulty component and clear the error information log;

[0067] Based on the fault information, determine whether there are any abnormal components among the faulty components.

[0068] In one embodiment, the processor performs the following steps when executing the computer program:

[0069] The step of locating the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system includes:

[0070] The processor fault type is determined based on the first fault location byte and the byte fault relationship mapping table;

[0071] The processor fault subtype is determined based on the processor fault type, the second fault location byte, and the byte fault relationship mapping table;

[0072] The location information of the faulty component is located based on the fault subtype, the third fault location byte, the fourth fault location byte, and the byte fault relationship mapping table.

[0073] In one embodiment, the processor performs the following steps when executing the computer program:

[0074] After locating the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system, the following steps are included:

[0075] The remaining fault bytes are parsed from the error status register value, and the faulty component is determined to be recoverable based on the remaining fault bytes and the byte fault relationship mapping table.

[0076] If so, then determine the recovery method corresponding to the faulty component based on the remaining fault bytes;

[0077] If not, an alarm message is sent to the user, wherein the alarm message includes the fault component number corresponding to the faulty component, the processor fault type, and the processor fault subtype.

[0078] In one embodiment, the processor performs the following steps when executing the computer program:

[0079] Determining whether there is an abnormal component among the faulty components based on the fault information includes:

[0080] The fault information includes the number of times the faulty component failed and the fault interval time.

[0081] The wear rate of the faulty component is calculated based on the fault information and the detection cycle set by the user.

[0082] Determine whether the loss rate is greater than the loss threshold corresponding to the detection cycle;

[0083] If so, the faulty component is identified as an abnormal component, and the user is reminded to replace the abnormal component.

[0084] In one embodiment, the processor performs the following steps when executing the computer program:

[0085] The calculation of the wear rate of the faulty component based on the fault information of the faulty component and the detection cycle set by the user includes:

[0086] A first loss coefficient is calculated based on the number of failures and the first weight set by the user.

[0087] The second loss coefficient is calculated based on the fault interval time and the second weight set by the user.

[0088] The loss rate for each detection cycle is calculated based on the first loss coefficient and the second loss coefficient.

[0089] In one embodiment, the processor performs the following steps when executing the computer program:

[0090] Before iterating through the operating system's error logs according to the user-defined query period, the following steps are included:

[0091] The user inputs the byte fault relationship mapping table into the operating system, wherein the byte fault relationship mapping table includes the mapping relationship between the first fault location byte and the processor fault type, the mapping relationship between the second fault location byte and the processor fault subtype, and the mapping relationship between the third fault location byte, the fourth fault location byte and the faulty component.

[0092] In one embodiment, the processor performs the following steps when executing the computer program:

[0093] In response to the presence of multiple error message logs in the operating system, determine whether the number of error logs corresponding to the error message logs is greater than the log number threshold set by the user;

[0094] If so, then determine that the processor is malfunctioning and alert the user;

[0095] If not, locate the faulty component based on the error status register value in the error message log.

[0096] In another aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0097] Based on the query cycle set by the user, iterate through the operating system to check for ARM processor-related error logs.

[0098] If so, the error status register value is obtained from the register in the ARM processor according to the error information log, and the first four fault location bytes in the error status register value are determined, wherein the error status register value contains multiple binary fault location bytes;

[0099] The faulty component corresponding to the processor is located based on the first four fault location bytes and the byte fault relationship mapping table in the operating system.

[0100] Based on the error information log, generate the fault information corresponding to the faulty component and clear the error information log;

[0101] Based on the fault information, determine whether there are any abnormal components among the faulty components.

[0102] In one embodiment, the computer program performs the following steps when executed by a processor:

[0103] The step of locating the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system includes:

[0104] The processor fault type is determined based on the first fault location byte and the byte fault relationship mapping table;

[0105] The processor fault subtype is determined based on the processor fault type, the second fault location byte, and the byte fault relationship mapping table;

[0106] The location information of the faulty component is located based on the fault subtype, the third fault location byte, the fourth fault location byte, and the byte fault relationship mapping table.

[0107] In one embodiment, the computer program performs the following steps when executed by a processor:

[0108] After locating the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system, the following steps are included:

[0109] The remaining fault bytes are parsed from the error status register value, and the faulty component is determined to be recoverable based on the remaining fault bytes and the byte fault relationship mapping table.

[0110] If so, then determine the recovery method corresponding to the faulty component based on the remaining fault bytes;

[0111] If not, an alarm message is sent to the user, wherein the alarm message includes the fault component number corresponding to the faulty component, the processor fault type, and the processor fault subtype.

[0112] In one embodiment, the computer program performs the following steps when executed by a processor:

[0113] Determining whether there is an abnormal component among the faulty components based on the fault information includes:

[0114] The fault information includes the number of times the faulty component failed and the fault interval time.

[0115] The wear rate of the faulty component is calculated based on the fault information and the detection cycle set by the user.

[0116] Determine whether the loss rate is greater than the loss threshold corresponding to the detection cycle;

[0117] If so, the faulty component is identified as an abnormal component, and the user is reminded to replace the abnormal component.

[0118] In one embodiment, the computer program performs the following steps when executed by a processor:

[0119] The calculation of the wear rate of the faulty component based on the fault information of the faulty component and the detection cycle set by the user includes:

[0120] A first loss coefficient is calculated based on the number of failures and the first weight set by the user.

[0121] The second loss coefficient is calculated based on the fault interval time and the second weight set by the user.

[0122] The loss rate for each detection cycle is calculated based on the first loss coefficient and the second loss coefficient.

[0123] In one embodiment, the computer program performs the following steps when executed by a processor:

[0124] Before iterating through the operating system's error logs according to the user-defined query period, the following steps are included:

[0125] The user inputs the byte fault relationship mapping table into the operating system, wherein the byte fault relationship mapping table includes the mapping relationship between the first fault location byte and the processor fault type, the mapping relationship between the second fault location byte and the processor fault subtype, and the mapping relationship between the third fault location byte, the fourth fault location byte and the faulty component.

[0126] In one embodiment, the computer program performs the following steps when executed by a processor:

[0127] In response to the presence of multiple error message logs in the operating system, determine whether the number of error logs corresponding to the error message logs is greater than the log number threshold set by the user;

[0128] If so, then determine that the processor is malfunctioning and alert the user;

[0129] If not, locate the faulty component based on the error status register value in the error message log.

[0130] First, the system iterates through the operating system to check for ARM processor-related error logs according to the user-defined query cycle. If so, it retrieves the error status register value from the ARM processor's registers based on the error log and determines the first four fault location bytes within that value. The error status register value contains multiple binary fault location bytes. Then, it locates the corresponding faulty component of the processor using the first four fault location bytes and the byte-fault relationship mapping table in the operating system. Finally, it identifies the abnormal component among the faulty components based on the error log. By parsing the first four bytes of the error register value and the corresponding byte-fault relationship mapping table, the system quickly locates the processor-related fault type and the specific location of the faulty component. Based on the statistical fault information corresponding to the faulty components, it calculates the wear rate of each faulty component in each cycle and determines whether there are abnormal components among these faulty components. By replacing abnormal components, it avoids frequent processor crashes. Attached Figure Description

[0131] Figure 1 A flowchart illustrating the method for automatically locating abnormal components;

[0132] Figure 2 A schematic diagram illustrating the steps of a method for automatically locating faulty components;

[0133] Figure 3 A system example diagram for an automatic fault location system;

[0134] Figure 4 A timing example diagram for a method to automatically locate faulty components;

[0135] Figure 5 This is a schematic diagram of the processor structure under the ARM architecture;

[0136] Figure 6 Example diagram of the mapping representation of the byte fault relationship mapping table;

[0137] Figure 7 This is a schematic diagram of the automatic locator for abnormal components.

[0138] Figure 8 This is an internal structural diagram of a computer device in an embodiment of the present invention. Detailed Implementation

[0139] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0140] In one embodiment, such as Figure 1 As shown, firstly, the system iterates through the operating system to check for ARM processor-related error logs according to the user-set query cycle. If so, it retrieves the error status register value from the registers in the ARM processor based on the error log and determines the first four fault location bytes in the error status register value, where the error status register value contains multiple binary fault location bytes. Then, it locates the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system. Next, it calculates the wear rate of the faulty component based on the fault information and the user-set detection cycle. Then, it determines whether the wear rate is greater than the wear threshold corresponding to the detection cycle. If so, it determines that the faulty component is an abnormal component and reminds the user to replace the abnormal component.

[0141] In one embodiment, such as Figure 2 As shown, the present invention provides a method for automatically locating faulty components, characterized in that the method includes:

[0142] S201. Based on the query cycle set by the user, iterate through the operating system to check whether there are error logs related to the ARM processor.

[0143] S202. If so, then obtain the error status register value from the register in the ARM processor according to the error information log and determine the first four fault location bytes in the error status register value, wherein the error status register value contains multiple binary fault location bytes.

[0144] S203. Locate the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system.

[0145] S204. Generate fault information corresponding to the faulty component based on the error information log and clear the error information log;

[0146] S205. Determine whether there is an abnormal component among the faulty components based on the fault information.

[0147] Specifically, such as Figure 3As shown, the system can periodically traverse the OS (Operating System) dmsg (a program used to detect and control the kernel ring buffer, which helps users understand system startup information, etc.) and obtain error information logs about the CPU (Central Processing Unit). Then, it retrieves a 48-byte binary string from the error value register value of a processor similar to an ARM architecture. The first 4 bytes can be set to identify the component information used to confirm the source of the error, while the remaining 44 bytes are used for further locating the faulty component. The first 4 bytes can include 1 byte for the error type, 1 byte for the error subtype, and 2 bytes for the specific location information of the error. This allows for rapid fault location within the system, enabling efficient and quick identification of processor fault locations. Furthermore, this fault information can also be used to locate potentially abnormal components within the faulty component.

[0148] In one embodiment, locating the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system includes:

[0149] The processor fault type is determined based on the first fault location byte and the byte fault relationship mapping table;

[0150] The processor fault subtype is determined based on the processor fault type, the second fault location byte, and the byte fault relationship mapping table;

[0151] The location information of the faulty component is located based on the fault subtype, the third fault location byte, the fourth fault location byte, and the byte fault relationship mapping table.

[0152] Specifically, such as Figure 4 As shown, by parsing the numerical values ​​of processor error messages generated in the dmesg file, the first byte of the first four bytes is parsed using a byte fault mapping table. The CPU component from which the error originates is then analyzed according to the following table. After the component is parsed, the second byte is further parsed to determine the Subtype type for more accurate location of the error information within the component. After parsing the second byte, the following two bytes are parsed to confirm the specific location information of the specific component from which the error originates, such as... Figure 5 As shown, if the ARM processor has a large number of cores and the memory slots are unique, the specific location of the faulty memory can be accurately located by parsing 3-4 bytes; for example, an uncorrectable memory error may originate from slot 0 of channel 1 of CPU0, or a CPM Snoop-Lgic error may originate from the CPU's CPM1 module group.

[0153] In one embodiment, the step of locating the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system includes:

[0154] The remaining fault bytes are parsed from the error status register value, and the faulty component is determined to be recoverable based on the remaining fault bytes and the byte fault relationship mapping table.

[0155] If so, then determine the recovery method corresponding to the faulty component based on the remaining fault bytes;

[0156] If not, an alarm message is sent to the user, wherein the alarm message includes the fault component number corresponding to the faulty component, the processor fault type, and the processor fault subtype.

[0157] Specifically, the fault of a component can be determined based on the last 44 bytes of the 48 bytes. If it is repairable, the method recorded in the last 44 bytes is translated and sent to the system for the user to handle the fault. If it is not repairable, an alarm needs to be issued to the user. The alarm information includes the fault component number corresponding to the faulty component, the processor fault type, and the processor fault subtype.

[0158] In one embodiment, determining the abnormal component among the faulty components based on the error information log includes:

[0159] The fault information includes the number of times the faulty component failed and the fault interval time.

[0160] The wear rate of the faulty component is calculated based on the fault information and the detection cycle set by the user.

[0161] Determine whether the loss rate is greater than the loss threshold corresponding to the detection cycle;

[0162] If so, the faulty component is identified as an abnormal component, and the user is reminded to replace the abnormal component.

[0163] Specifically, for example, if the user sets the testing cycle to one month, then the number of failures of the same component within that week is counted, say 3 times, and the corresponding failure time for each of the 3 failures is recorded. The failure interval is calculated based on the failure times of the same component before and after each failure. For example, if the 3 failure times are the 10th, 15th, and 30th, then the failure times are 5 days and 15 days respectively. Then, based on these 3 records and the corresponding time intervals, the wear rate of the component in that month is calculated, and it is determined whether the wear rate is greater than the wear threshold for that month. Note that the wear threshold is not constant. As the lifespan of the component increases, the wear threshold of the component also increases. The specific increase can be set by the user. For example, the wear threshold can be increased by 1% every month. As long as the wear rate of the component does not exceed the specified wear threshold, it means that the component is normal.

[0164] In one embodiment, calculating the wear rate of the faulty component based on the fault information of the faulty component and the detection cycle set by the user includes:

[0165] A first loss coefficient is calculated based on the number of failures and the first weight set by the user.

[0166] The second loss coefficient is calculated based on the fault interval time and the second weight set by the user.

[0167] The loss rate for each detection cycle is calculated based on the first loss coefficient and the second loss coefficient.

[0168] Specifically, as mentioned above, it can be based on A similar formula is used to calculate the loss rate, where Y represents the loss rate, k represents the first weight, b represents the second weight, M represents the number of failures, and N represents the failure interval. The user sets the first and second weights, for example, k can be set to 0.1 and b to 1. The first loss threshold is calculated to be 0.3, and the second loss threshold is 0.267, thus Y = 0.567. If the loss threshold for this month is 0.5, the component can be identified as an abnormal component, and the user is reminded to replace the abnormal component. In response to the user replacing the abnormal component with a normal component, the fault record corresponding to the original abnormal component is cleared, and the loss threshold for each period corresponding to the normal component is restored. The loss rate and loss threshold for each period are then compared again.

[0169] In one embodiment, the step of traversing the operating system's error logs according to the user-defined query period includes:

[0170] The user inputs the byte fault relationship mapping table into the operating system, wherein the byte fault relationship mapping table includes the mapping relationship between the first fault location byte and the processor fault type, the mapping relationship between the second fault location byte and the processor fault subtype, and the mapping relationship between the third fault location byte, the fourth fault location byte and the faulty component.

[0171] Specifically, such as Figure 6 The image shows a byte-based fault mapping table. Because the components associated with each processor may differ, the user needs to configure the mapping relationships between bytes and processor fault types, processor fault subtypes, and the specific locations of the faulty components. This mapping table can also be a node tree structure, allowing users to query sequentially from the first fault location byte to the second, then the third and fourth fault location bytes, until the specific location of the faulty component is determined.

[0172] In one embodiment, the method further includes:

[0173] In response to the presence of multiple error message logs in the operating system, determine whether the number of error logs corresponding to the error message logs is greater than the log number threshold set by the user;

[0174] If so, then determine that the processor is malfunctioning and alert the user;

[0175] If not, locate the faulty component based on the error status register value in the error message log.

[0176] Specifically, within a user-defined query period, such as ten minutes, if multiple error messages are logged in the system within ten minutes, it indicates that the processor has "failed" and its related functions have been significantly affected. At this time, an alarm needs to be issued to the user to investigate what special reason caused the failure of multiple processor-related components. After the investigation is completed, the user can decide whether to record the fault information corresponding to all the faulty components. If the failure of multiple components is not due to external reasons such as human error, then the fault information corresponding to all the faulty components should be recorded, and this fault information should be substituted into the calculation of the loss rate for this detection period.

[0177] The proposed solution has the following beneficial effects:

[0178] 1) Quickly locate the processor-related fault type and the specific location of the faulty component by using the first four bytes of the parsed error register value and the corresponding byte fault relationship mapping table;

[0179] 2) Calculate the wear rate of each faulty component in each cycle based on the fault information corresponding to the statistical faulty components, and determine whether there are abnormal components among these faulty components. Replace abnormal components to avoid frequent processor downtime.

[0180] It should be understood that, although Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0181] In one embodiment, such as Figure 7 As shown, an apparatus for automatically locating faulty components is also provided, characterized in that the apparatus comprises:

[0182] The traversal module 701 is used to traverse the operating system to check for ARM processor-related error logs according to the query period set by the user.

[0183] If the module 702 is correct, it retrieves the error status register value from the registers in the ARM processor according to the error information log and determines the first four fault location bytes in the error status register value, wherein the error status register value contains multiple binary fault location bytes.

[0184] The positioning module 703 is used to locate the faulty component corresponding to the processor based on the first four fault positioning bytes and the byte fault relationship mapping table in the operating system;

[0185] The generation module 704 is used to generate fault information corresponding to the faulty component based on the error information log and clear the error information log;

[0186] The determination module 705 is used to determine whether there is an abnormal component among the faulty components based on the fault information.

[0187] In one embodiment, the location module locates the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system, including:

[0188] The processor fault type is determined based on the first fault location byte and the byte fault relationship mapping table;

[0189] The processor fault subtype is determined based on the processor fault type, the second fault location byte, and the byte fault relationship mapping table;

[0190] The location information of the faulty component is located based on the fault subtype, the third fault location byte, the fourth fault location byte, and the byte fault relationship mapping table.

[0191] In one embodiment, after locating the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system, the positioning module includes:

[0192] The remaining fault bytes are parsed from the error status register value, and the faulty component is determined to be recoverable based on the remaining fault bytes and the byte fault relationship mapping table.

[0193] If so, then determine the recovery method corresponding to the faulty component based on the remaining fault bytes;

[0194] If not, an alarm message is sent to the user, wherein the alarm message includes the fault component number corresponding to the faulty component, the processor fault type, and the processor fault subtype.

[0195] In one embodiment, the determining module determines whether there is an abnormal component among the faulty components based on the fault information, including:

[0196] The fault information includes the number of times the faulty component failed and the fault interval time.

[0197] The wear rate of the faulty component is calculated based on the fault information and the detection cycle set by the user.

[0198] Determine whether the loss rate is greater than the loss threshold corresponding to the detection cycle;

[0199] If so, the faulty component is identified as an abnormal component, and the user is reminded to replace the abnormal component.

[0200] In one embodiment, the determining module calculates the wear rate of the faulty component based on the fault information of the faulty component and the detection cycle set by the user, including:

[0201] A first loss coefficient is calculated based on the number of failures and the first weight set by the user.

[0202] The second loss coefficient is calculated based on the fault interval time and the second weight set by the user.

[0203] The loss rate for each detection cycle is calculated based on the first loss coefficient and the second loss coefficient.

[0204] In one embodiment, the traversal module includes the following steps before traversing the operating system's error logs according to the user-defined query period:

[0205] The user inputs the byte fault relationship mapping table into the operating system, wherein the byte fault relationship mapping table includes the mapping relationship between the first fault location byte and the processor fault type, the mapping relationship between the second fault location byte and the processor fault subtype, and the mapping relationship between the third fault location byte, the fourth fault location byte and the faulty component.

[0206] In one embodiment, the determining module is further configured to include:

[0207] In response to the presence of multiple error message logs in the operating system, determine whether the number of error logs corresponding to the error message logs is greater than the log number threshold set by the user;

[0208] If so, then determine that the processor is malfunctioning and alert the user;

[0209] If not, locate the faulty component based on the error status register value in the error message log.

[0210] Specific limitations regarding the automatic fault location device can be found in the limitations of the automatic fault location method described above, and will not be repeated here. Each module in the aforementioned automatic fault location device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0211] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements an alarm information processing method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0212] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0213] In one embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0214] Based on the query cycle set by the user, iterate through the operating system to check for ARM processor-related error logs.

[0215] If so, the error status register value is obtained from the register in the ARM processor according to the error information log, and the first four fault location bytes in the error status register value are determined, wherein the error status register value contains multiple binary fault location bytes;

[0216] The faulty component corresponding to the processor is located based on the first four fault location bytes and the byte fault relationship mapping table in the operating system.

[0217] Based on the error information log, generate the fault information corresponding to the faulty component and clear the error information log;

[0218] Based on the fault information, determine whether there are any abnormal components among the faulty components.

[0219] In one embodiment, the processor performs the following steps when executing the computer program:

[0220] The step of locating the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system includes:

[0221] The processor fault type is determined based on the first fault location byte and the byte fault relationship mapping table;

[0222] The processor fault subtype is determined based on the processor fault type, the second fault location byte, and the byte fault relationship mapping table;

[0223] The location information of the faulty component is located based on the fault subtype, the third fault location byte, the fourth fault location byte, and the byte fault relationship mapping table.

[0224] In one embodiment, the processor performs the following steps when executing the computer program:

[0225] After locating the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system, the following steps are included:

[0226] The remaining fault bytes are parsed from the error status register value, and the faulty component is determined to be recoverable based on the remaining fault bytes and the byte fault relationship mapping table.

[0227] If so, then determine the recovery method corresponding to the faulty component based on the remaining fault bytes;

[0228] If not, an alarm message is sent to the user, wherein the alarm message includes the fault component number corresponding to the faulty component, the processor fault type, and the processor fault subtype.

[0229] In one embodiment, the processor performs the following steps when executing the computer program:

[0230] Determining whether there is an abnormal component among the faulty components based on the fault information includes:

[0231] The fault information includes the number of times the faulty component failed and the fault interval time.

[0232] The wear rate of the faulty component is calculated based on the fault information and the detection cycle set by the user.

[0233] Determine whether the loss rate is greater than the loss threshold corresponding to the detection cycle;

[0234] If so, the faulty component is identified as an abnormal component, and the user is reminded to replace the abnormal component.

[0235] In one embodiment, the processor performs the following steps when executing the computer program:

[0236] The calculation of the wear rate of the faulty component based on the fault information of the faulty component and the detection cycle set by the user includes:

[0237] A first loss coefficient is calculated based on the number of failures and the first weight set by the user.

[0238] The second loss coefficient is calculated based on the fault interval time and the second weight set by the user.

[0239] The loss rate for each detection cycle is calculated based on the first loss coefficient and the second loss coefficient.

[0240] In one embodiment, the processor performs the following steps when executing the computer program:

[0241] Before iterating through the operating system's error logs according to the user-defined query period, the following steps are included:

[0242] The user inputs the byte fault relationship mapping table into the operating system, wherein the byte fault relationship mapping table includes the mapping relationship between the first fault location byte and the processor fault type, the mapping relationship between the second fault location byte and the processor fault subtype, and the mapping relationship between the third fault location byte, the fourth fault location byte and the faulty component.

[0243] In one embodiment, the processor performs the following steps when executing the computer program:

[0244] In response to the presence of multiple error message logs in the operating system, determine whether the number of error logs corresponding to the error message logs is greater than the log number threshold set by the user;

[0245] If so, then determine that the processor is malfunctioning and alert the user;

[0246] If not, locate the faulty component based on the error status register value in the error message log.

[0247] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0248] Based on the query cycle set by the user, iterate through the operating system to check for ARM processor-related error logs.

[0249] If so, the error status register value is obtained from the register in the ARM processor according to the error information log, and the first four fault location bytes in the error status register value are determined, wherein the error status register value contains multiple binary fault location bytes;

[0250] The faulty component corresponding to the processor is located based on the first four fault location bytes and the byte fault relationship mapping table in the operating system.

[0251] Based on the error information log, generate the fault information corresponding to the faulty component and clear the error information log;

[0252] Based on the fault information, determine whether there are any abnormal components among the faulty components.

[0253] In one embodiment, the computer program performs the following steps when executed by a processor:

[0254] The step of locating the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system includes:

[0255] The processor fault type is determined based on the first fault location byte and the byte fault relationship mapping table;

[0256] The processor fault subtype is determined based on the processor fault type, the second fault location byte, and the byte fault relationship mapping table;

[0257] The location information of the faulty component is located based on the fault subtype, the third fault location byte, the fourth fault location byte, and the byte fault relationship mapping table.

[0258] In one embodiment, the computer program performs the following steps when executed by a processor:

[0259] After locating the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system, the following steps are included:

[0260] The remaining fault bytes are parsed from the error status register value, and the faulty component is determined to be recoverable based on the remaining fault bytes and the byte fault relationship mapping table.

[0261] If so, then determine the recovery method corresponding to the faulty component based on the remaining fault bytes;

[0262] If not, an alarm message is sent to the user, wherein the alarm message includes the fault component number corresponding to the faulty component, the processor fault type, and the processor fault subtype.

[0263] In one embodiment, the computer program performs the following steps when executed by a processor:

[0264] Determining whether there is an abnormal component among the faulty components based on the fault information includes:

[0265] The fault information includes the number of times the faulty component failed and the fault interval time.

[0266] The wear rate of the faulty component is calculated based on the fault information and the detection cycle set by the user.

[0267] Determine whether the loss rate is greater than the loss threshold corresponding to the detection cycle;

[0268] If so, the faulty component is identified as an abnormal component, and the user is reminded to replace the abnormal component.

[0269] In one embodiment, the computer program performs the following steps when executed by a processor:

[0270] The calculation of the wear rate of the faulty component based on the fault information of the faulty component and the detection cycle set by the user includes:

[0271] A first loss coefficient is calculated based on the number of failures and the first weight set by the user.

[0272] The second loss coefficient is calculated based on the fault interval time and the second weight set by the user.

[0273] The loss rate for each detection cycle is calculated based on the first loss coefficient and the second loss coefficient.

[0274] In one embodiment, the computer program performs the following steps when executed by a processor:

[0275] Before iterating through the operating system's error logs according to the user-defined query period, the following steps are included:

[0276] The user inputs the byte fault relationship mapping table into the operating system, wherein the byte fault relationship mapping table includes the mapping relationship between the first fault location byte and the processor fault type, the mapping relationship between the second fault location byte and the processor fault subtype, and the mapping relationship between the third fault location byte, the fourth fault location byte and the faulty component.

[0277] In one embodiment, the computer program performs the following steps when executed by a processor:

[0278] In response to the presence of multiple error message logs in the operating system, determine whether the number of error logs corresponding to the error message logs is greater than the log number threshold set by the user;

[0279] If so, then determine that the processor is malfunctioning and alert the user;

[0280] If not, locate the faulty component based on the error status register value in the error message log.

[0281] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0282] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0283] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for automatically locating abnormal components, characterized in that, The method includes: The system iterates through the operating system to check for ARM processor-related error logs according to the user-defined query cycle. If so, it retrieves the error status register value from the registers in the ARM processor based on the error log and determines the first four fault location bytes in the error status register value, wherein the error status register value contains multiple binary fault location bytes. Locating the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system includes: determining the processor fault type based on the first fault location byte and the byte fault relationship mapping table; determining the processor fault subtype based on the processor fault type, the second fault location byte, and the byte fault relationship mapping table; and locating the location information of the faulty component based on the processor fault subtype, the third fault location byte, the fourth fault location byte, and the byte fault relationship mapping table, wherein the byte fault relationship mapping table is a node tree structure, and the faulty component is located by sequentially querying from the first fault location byte to the second fault location byte and then to the third and fourth fault location bytes until the specific location of the faulty component is determined. Based on the error information log, generate the fault information corresponding to the faulty component and clear the error information log; Determining whether there is an abnormal component among the faulty components based on the fault information includes: The fault information includes the number of times the faulty component failed and the fault interval time. The loss rate of the faulty component is calculated based on the fault information and the detection cycle set by the user, including: calculating a first loss coefficient based on the number of faults and a first weight set by the user; calculating a second loss coefficient based on the fault interval time and a second weight set by the user; and calculating the loss rate for each detection cycle based on the first loss coefficient and the second loss coefficient. Determine whether the loss rate is greater than the loss threshold corresponding to the detection period; If so, the faulty component is identified as an abnormal component, and the user is reminded to replace the abnormal component.

2. The method according to claim 1, characterized in that, After locating the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system, the following steps are included: The remaining fault bytes are parsed from the error status register value, and the faulty component is determined to be recoverable based on the remaining fault bytes and the byte fault relationship mapping table. If so, then determine the recovery method corresponding to the faulty component based on the remaining fault bytes; If not, an alarm message is sent to the user, wherein the alarm message includes the fault component number corresponding to the faulty component, the processor fault type, and the processor fault subtype.

3. The method according to claim 1, characterized in that, Before iterating through the operating system's error logs according to the user-defined query period, the following steps are included: The user inputs the byte fault relationship mapping table into the operating system, wherein the byte fault relationship mapping table includes the mapping relationship between the first fault location byte and the processor fault type, the mapping relationship between the second fault location byte and the processor fault subtype, and the mapping relationship between the third fault location byte, the fourth fault location byte and the faulty component.

4. The method according to claim 1, characterized in that, The method further includes: In response to the presence of multiple error message logs in the operating system, determine whether the number of error logs corresponding to the error message logs is greater than the log number threshold set by the user; If so, then determine that the processor is malfunctioning and alert the user; If not, locate the faulty component based on the error status register value in the error message log.

5. An apparatus for automatically locating faulty components in implementing the method according to any one of claims 1-4, characterized in that, The device includes: The traversal module is used to traverse the operating system's error logs to check for ARM processor-related errors based on a user-defined query period. If so, the acquisition module retrieves the error status register value from the registers in the ARM processor according to the error information log and determines the first four fault location bytes in the error status register value, wherein the error status register value contains multiple binary fault location bytes. The location module is used to locate the faulty component corresponding to the processor based on the first four fault location bytes and the byte fault relationship mapping table in the operating system; The generation module is used to generate fault information corresponding to the faulty component based on the error information log and clear the error information log; The determination module is used to determine whether there is an abnormal component among the faulty components based on the fault information.

6. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Memory fault positioning method and device

    CN112650612A