A method for testing a battery backup unit, a computing device, and a storage medium

By monitoring the communication interface and status analysis of the battery backup unit, fault commands are automatically injected and fault classification is performed using machine learning models. This solves the problem of time-consuming manual testing, achieves efficient and reliable battery backup unit testing, and improves product stability and testing efficiency.

CN121164915BActive Publication Date: 2026-04-14SHUGUANG INFORMATION IND (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In the existing technology, the testing process of battery backup units relies on manual operation, which is time-consuming, inefficient, and prone to overlooking faults, thus extending the product development and verification cycle, increasing after-sales service costs, and reducing product stability and reliability.

Method used

By monitoring the communication interface of the battery backup unit, the target signal is analyzed to determine the status. Based on the status and the number of connected battery interaction units, the command injection frequency and method are determined, fault commands are automatically injected and test results are obtained. A machine learning model is used for fault classification and maintenance.

Benefits of technology

It enables rapid automated testing of battery backup units, avoids ignoring faults, improves testing efficiency and product stability and reliability, and reduces development verification cycle and after-sales costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121164915B_ABST
    Figure CN121164915B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a battery backup unit test method, a computing device and a storage medium, by monitoring each communication interface in the battery backup unit, obtaining a target signal received by each communication interface, determining at least one state corresponding to the battery backup unit, determining an instruction injection frequency and an instruction injection mode based on the at least one state corresponding to the battery backup unit and the number of battery interaction units connected to the battery backup unit, injecting a preset fault instruction into the battery backup unit based on the instruction injection frequency and the instruction injection mode, and obtaining a test result after the battery backup unit executes the fault instruction, thereby realizing automatic fault testing of the battery backup unit, avoiding the neglect of faults caused by manual testing of the battery backup unit, improving product stability and reliability, and improving the testing efficiency of the battery backup unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage, and in particular to a test method for a battery backup unit, a computing device, and a storage medium. Background Technology

[0002] As servers are used more frequently in various fields, in order to avoid data loss due to power failure, a battery backup unit (BBU) is usually added to the server to provide temporary power support for the system in the event of an unexpected power outage or power failure, thereby ensuring data integrity and system reliability.

[0003] In existing technologies, the testing process for BBUs is usually carried out manually. However, manual testing is time-consuming and inefficient, and cannot quickly test BBUs. Furthermore, manual testing of BBUs is prone to overlooking BBU faults, which prolongs the product design, development and verification cycle, increases after-sales service costs, and reduces product stability and reliability. Summary of the Invention

[0004] To address the problems in the prior art, this application provides a testing method, computing device, and storage medium for a battery backup unit.

[0005] In a first aspect, embodiments of this application provide a method for testing a battery backup unit, comprising:

[0006] Monitor each communication interface of the battery backup unit; the battery backup unit is connected to different battery interaction units through each communication interface;

[0007] The battery backup unit is determined to be at least one state based on the target signals received by each communication interface; the target signals are sent by the battery interaction unit connected to the communication interface; the battery backup unit performs different operations in different states;

[0008] Based on at least one state corresponding to the battery backup unit and the number of battery interaction units connected to the battery backup unit, the instruction injection frequency and instruction injection method are determined.

[0009] Based on the instruction injection frequency and the instruction injection method, a preset fault instruction is injected into the battery backup unit, and the test result is obtained after the battery backup unit executes the fault instruction.

[0010] The above methods enable rapid automated testing of battery backup units, avoiding the risk of overlooking faults that can easily occur when testing battery backup units manually. This reduces product design, development, and verification cycles, after-sales service costs, and improves product stability and reliability, as well as increasing the testing efficiency of battery backup units.

[0011] In one possible implementation, determining at least one state corresponding to the battery backup unit based on the target signals received from each communication interface includes:

[0012] The target signal is analyzed to obtain at least one target instruction contained in the target signal; the target instruction is used to instruct the battery backup unit to perform a corresponding operation;

[0013] Based on the current direction within the battery backup unit and each of the target instructions, it is determined whether the battery backup unit is in a state of current interaction with the battery interaction unit.

[0014] Based on the log information generated by the battery backup unit and each of the target instructions, it is determined whether the battery backup unit is in a state of component debugging with the battery interaction unit.

[0015] By employing the above method, at least one target instruction from the target signal can be acquired. This allows for the determination of whether the battery backup unit is in a state of current interaction with the battery interaction unit, or in a state of component debugging with the battery interaction unit, based on the current direction within the battery backup unit, the log information generated by the battery backup unit, and each target instruction. Automating the determination of the battery backup unit's state effectively reduces manual operation steps and lays the groundwork for subsequent processes that determine the instruction injection frequency and method based on the battery backup unit's state, thereby improving the testing efficiency of the battery backup unit.

[0016] In one possible implementation, the instruction injection method is determined through the following steps:

[0017] If the battery backup unit is in a state of current interaction with the battery interaction unit, then the instruction injection method corresponding to the battery backup unit is determined to be random injection.

[0018] If the battery backup unit is in the first state, then the instruction injection method corresponding to the battery backup unit is determined to be traversal injection;

[0019] If the battery backup unit is in the second state, then the instruction injection method corresponding to the battery backup unit is determined to be parallel injection; both the first state and the second state are states of component debugging with the battery interaction unit; the components debugged by the battery backup unit in the first state and the battery backup unit in the second state are different.

[0020] The above method enables the determination of the corresponding instruction injection method based on the state of the battery backup unit. Different instruction injection methods can be adopted for different states, making the testing process more targeted and improving the efficiency and accuracy of the test.

[0021] In one possible implementation, the instruction injection frequency is determined through the following steps:

[0022] If the number of battery interaction units connected to the battery backup unit is less than or equal to the first threshold, then the instruction injection frequency is determined to be the first frequency.

[0023] If the number of battery interaction units connected to the battery backup unit is greater than the first threshold and less than or equal to the second threshold, then the instruction injection frequency is determined to be the second frequency; the second frequency is greater than the first frequency.

[0024] If the number of battery interaction units connected to the battery backup unit is greater than the second threshold, then the instruction injection frequency is determined to be the third frequency; the third frequency is greater than the second frequency.

[0025] By means of the above method, the corresponding instruction injection frequency can be determined according to the number of battery interaction units connected to the battery backup unit. The more battery interaction units connected to the battery backup unit, the higher the instruction injection frequency, which enables the present application to implement the testing process in a more targeted manner, thereby improving the efficiency and accuracy of the test.

[0026] In one possible implementation, it is determined whether the battery backup unit has completed the execution process for the fault command by:

[0027] If the fault alarm level of the battery backup unit is the first level, it is determined that the battery backup unit has completed the execution of the fault command;

[0028] The step of obtaining test results after the battery backup unit executes the fault command includes:

[0029] After the battery backup unit executes the fault instruction, the first fault condition in the log file generated by the battery backup unit is obtained;

[0030] If the first fault condition is the same as the second fault condition corresponding to the injected fault command, then the test result is determined to be that the battery backup unit is normal.

[0031] If the first fault condition is different from the second fault condition corresponding to the injected fault command, then the test result is determined to be a fault of the battery backup unit.

[0032] Using the above method, it is possible to automatically determine whether the battery backup unit has completed the execution of the fault command based on the fault alarm level. After the determination is completed, the battery backup unit can be determined to be normal based on the fault information in the log file and the fault information corresponding to the injected fault command, thereby improving the efficiency and accuracy of testing.

[0033] In one possible implementation, after determining that the test result indicates a failure of the battery backup unit, the method further includes:

[0034] The test results are classified using a trained machine learning model to generate processing instructions for the battery backup unit.

[0035] The machine learning model is trained in the following manner:

[0036] Historical data is input into the machine learning model as a training set according to different categories until the loss value of the machine learning model reaches the target threshold and the loss value is within the target range within a set time period; the historical data includes multiple historical fault information and solutions for each historical fault information; each historical fault information includes at least one fault condition in either the first fault condition or the second fault condition.

[0037] Using the above methods, test results can be classified based on historical data. Different solutions can be used to repair the battery backup unit's faults depending on the specific situation. The trained machine learning model can effectively improve the efficiency of the repair strategy provision process.

[0038] In one possible implementation, after obtaining the test results after the battery backup unit executes the fault command, the method further includes:

[0039] Update the total number of failures that occurred during the battery backup unit within a set number of tests;

[0040] If the total number of times exceeds the target threshold, the battery backup unit is fully charged and discharged to the cutoff voltage with a set current, and then the discharge capacity corresponding to the battery backup unit is determined.

[0041] Based on the discharge capacity and the initial capacity of the battery backup unit, the degree of wear of the battery backup unit is determined, and the battery maintenance unit is instructed to maintain the battery backup unit based on the degree of wear.

[0042] Using the above method, the degree of wear of the battery backup unit can be determined based on its discharge capacity and initial capacity, and maintenance can be carried out on the battery backup unit based on the degree of wear. Automating the maintenance of the battery backup unit can effectively improve the efficiency of the repair strategy provision process.

[0043] In one possible implementation, determining the degree of wear of the battery backup unit based on the discharge capacity and the initial capacity of the battery backup unit includes:

[0044] If the difference between the initial capacity and the discharge capacity of the battery backup unit is less than or equal to the capacity difference threshold, then the degree of loss of the battery backup unit is determined to be the first degree of loss.

[0045] If the difference between the initial capacity and the discharge capacity of the battery backup unit is greater than the capacity difference threshold, then the degree of wear of the battery backup unit is determined to be a second degree of wear; if the second degree of wear is greater than the first degree of wear.

[0046] The battery maintenance unit performs maintenance on the battery backup unit based on the degree of wear, including:

[0047] If the degree of wear of the battery backup unit is the second degree of wear and the discharge capacity is higher than the set voltage threshold, then the battery maintenance unit is instructed to reduce the voltage of the battery backup unit during the current interaction with the battery interaction unit.

[0048] If the wear level of the battery backup unit is the second wear level and the discharge capacity is lower than or equal to the set voltage threshold, the battery maintenance unit is instructed to deactivate the battery backup unit and prompts for replacement of the battery backup unit.

[0049] The above methods allow for different maintenance processes based on the varying degrees of wear and tear on the battery backup unit. For units with significant wear, the voltage can be reduced to prevent further damage. For units with extremely high wear, the user can be prompted to replace the battery, thus preventing potential accidents during subsequent use of the battery backup unit.

[0050] Secondly, embodiments of this application provide a computing device, including:

[0051] Memory, used to store program instructions;

[0052] A processor is configured to invoke program instructions stored in the memory and execute the steps included in the method described in the first aspect according to the obtained program instructions.

[0053] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method described in the first aspect.

[0054] This application provides a testing method, computing device, and storage medium for a battery backup unit. By monitoring each communication interface in the battery backup unit and acquiring the target signal received by each communication interface, at least one state corresponding to the battery backup unit is determined. Based on the at least one state corresponding to the battery backup unit and the number of battery interaction units connected to the battery backup unit, the instruction injection frequency and instruction injection method are determined. Based on the instruction injection frequency and instruction injection method, a preset fault instruction is injected into the battery backup unit. After the battery backup unit executes the fault instruction, the test result is obtained. This achieves rapid automated fault testing of the battery backup unit, avoiding the possibility of overlooking faults when manually testing the battery backup unit, improving product stability and reliability, and increasing the testing efficiency of the battery backup unit. Attached Figure Description

[0055] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0056] Figure 1 An application scenario diagram illustrating a testing method for a battery backup unit provided in an embodiment of this application;

[0057] Figure 2 A flowchart illustrating a testing method for a battery backup unit provided in an embodiment of this application;

[0058] Figure 3 A detailed flowchart of a testing method for a battery backup unit provided in an embodiment of this application;

[0059] Figure 4 A structural block diagram of a test device for a battery backup unit provided in an embodiment of this application;

[0060] Figure 5 This is a structural block diagram of a computing device provided in an embodiment of this application. Detailed Implementation

[0061] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0062] It should be noted that the terms "comprising" and "having" and their variations used in this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.

[0063] The terms "first" and "second" used in this document are for descriptive purposes only and should not be construed as indicating relative importance or implying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0064] The word “exemplary” as used below means “serving as an example, embodiment, or illustration.” Any embodiment illustrated as an “exemplary” need not be construed as superior to or better than other embodiments.

[0065] The present application will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0066] As servers are used more frequently in various fields, in order to avoid data loss due to power failure, a battery backup unit (BBU) is usually added to the server to provide temporary power support for the system in the event of an unexpected power outage or power failure, thereby ensuring data integrity and system reliability.

[0067] Figure 1 This illustration shows an application scenario diagram of a battery backup unit testing method provided in an embodiment of this application. (See attached diagram.) Figure 1As shown, the application scenario includes a battery backup unit 100, which includes communication interfaces 110, 120, and 130, battery interaction units 210, 220, and 230, and a battery maintenance unit 300. The battery backup unit 100 can be connected to the battery interaction unit 210 through the communication interface 110, the battery backup unit 100 can be connected to the battery interaction unit 220 through the communication interface 120, the battery backup unit 100 can be connected to the battery interaction unit 230 through the communication interface 130, and the battery maintenance unit 300 is directly connected to the battery backup unit 100.

[0068] In one possible embodiment, the battery backup unit 100 can be in different states, and in different states, different battery interaction units can interact with the battery backup unit 100. For example, in the first state, battery interaction unit 210 can interact with the battery backup unit 100; in the second state, battery interaction unit 220 can interact with the battery backup unit 100, and so on. The battery backup unit 100 can also be in different states of wear and tear, and the battery maintenance unit 300 can perform different maintenance operations on the battery backup unit 100 for different states of wear and tear.

[0069] In the existing technology, the testing process for battery backup units is usually carried out manually. However, manual testing is time-consuming and inefficient, and cannot quickly test the battery backup unit. Furthermore, manual testing of battery backup units is prone to overlooking faults, which prolongs the product design, development and verification cycle, increases after-sales service costs, and reduces product stability and reliability.

[0070] The following describes a test method for a battery backup unit provided by an exemplary embodiment of this application, in conjunction with the application scenarios described above and with reference to the accompanying drawings. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way in this respect.

[0071] Figure 2 A flowchart illustrating a testing method for a battery backup unit provided in an embodiment of this application is shown, as follows: Figure 2 As shown, the method may include the following steps:

[0072] Step S201: Monitor each communication interface of the battery backup unit.

[0073] In one possible embodiment, the battery backup unit is connected to different battery interaction units through various communication interfaces. The communication interface may include an interface for the battery backup unit to receive various commands, or it may include interfaces such as power input interface, power output interface, and sensor interface to implement different functions. Therefore, by monitoring each communication interface of the battery backup unit, the target signal transmitted by each battery interaction unit received by the battery backup unit can be determined.

[0074] Step S202: Determine at least one state corresponding to the battery backup unit based on the target signal received from each communication interface.

[0075] In one possible embodiment, after receiving the target signal, step S202 can be executed through the following steps: First, the target signal can be parsed to obtain at least one target instruction contained in the target signal, wherein the target instruction is used to instruct the battery backup unit to perform a corresponding operation. Then, based on the current direction within the battery backup unit and each target instruction, it can be determined whether the battery backup unit is in a state of current interaction with the battery interaction unit. Finally, based on the log information generated by the battery backup unit and each target instruction, it can be determined whether the battery backup unit is in a state of component debugging with the battery interaction unit. The states corresponding to the battery backup unit can include charging state, discharging state, self-test state, and self-learning state.

[0076] Specifically, the target signal may include: charging circuit enable signal, discharging circuit enable signal, self-test signal, self-learning signal, etc. However, if the state of the battery backup unit is determined solely by the target signal, misjudgment may occur. For example, even if the battery backup unit receives the charging circuit enable signal, if there is no corresponding external power source as a battery interaction unit to charge the battery backup unit, it cannot be considered that the battery backup unit is in a charging state. Therefore, when determining whether the battery backup unit is in a state of current interaction with the battery interaction unit, in addition to determining based on the target command, it is also necessary to determine based on the current direction within the battery backup unit. For example, if the battery backup unit receives the charging circuit enable signal and receives current provided by the battery interaction unit, it can be determined that the battery backup unit is in a charging state; if the battery backup unit receives the discharging circuit enable signal and provides current to the battery interaction unit, it can be determined that the battery backup unit is in a discharging state.

[0077] Similarly, when determining whether the battery backup unit is in a component debugging state with the battery interaction unit, in addition to determining based on the target instruction, it is also necessary to determine based on the log information generated by the battery backup unit. For example, if the battery backup unit receives a self-test signal and the log information generated by the battery backup unit contains the first component such as the internal detection circuit and the management controller (BMC / management software), it can be determined that the battery backup unit is in a self-test state; if the battery backup unit receives a self-learning signal and the log information generated by the battery backup unit contains the second component such as the battery management chip (e.g., fuel gauge) and the historical data storage unit, it can be determined that the battery backup unit is in a self-learning state.

[0078] It should be noted that the battery backup unit can exist in two or more of the above states simultaneously. For example, the battery backup unit can perform a self-test periodically during the charging process, that is, it can be in the charging state and the self-test state at the same time; the battery backup unit can perform a rapid self-test during the power supply process, that is, it can be in the discharging state and the self-test state at the same time; the battery backup unit can also charge and discharge at the same time, that is, it can be in the discharging state and the charging state at the same time. This application does not limit the number of states that the battery backup unit can be in.

[0079] Step S203: Based on at least one state corresponding to the battery backup unit and the number of battery interaction units connected to the battery backup unit, determine the instruction injection frequency and instruction injection method.

[0080] In one possible embodiment, if at least one state corresponding to the battery backup unit is determined by step S202, the instruction injection frequency and instruction injection method can be determined based on at least one state corresponding to the battery backup unit and the number of battery interaction units connected to the battery backup unit.

[0081] In one possible embodiment, the instruction injection method can be determined through the following steps: If the battery backup unit is in a state of current interaction with the battery interaction unit, the instruction injection method corresponding to the battery backup unit is determined to be random injection. When the battery backup unit is in a charging state, random instruction injection is suitable for long-term reliability testing, simulating occasional failures that may occur in actual operation (such as protection circuit activation due to excessive charging time); when the battery backup unit is in a discharging state, random instruction injection is suitable for simulating occasional anomalies in the real environment (such as abnormal discharge current caused by load fluctuations). If the battery backup unit is in a first state, the instruction injection method corresponding to the battery backup unit is determined to be traversal injection, where the first state is a self-test state. The traversal injection instruction injection method can simulate sensor failure, communication anomalies, etc., to verify the robustness of the self-test logic. If the battery backup unit is in a second state, the instruction injection method corresponding to the battery backup unit is determined to be parallel injection. The parallel injection instruction injection method is suitable for high-reliability systems, testing the fault tolerance capability of the self-learning program when multiple sensors fail simultaneously.

[0082] In one possible embodiment, the instruction injection frequency is determined through the following steps: if the number of battery interaction units connected to the battery backup unit is less than or equal to a first threshold, then the instruction injection frequency is determined to be a first frequency; if the number of battery interaction units connected to the battery backup unit is greater than the first threshold and less than or equal to a second threshold, then the instruction injection frequency is determined to be a second frequency; if the number of battery interaction units connected to the battery backup unit is greater than the second threshold, then the instruction injection frequency is determined to be a third frequency. Wherein, the second threshold is greater than the first threshold, and the third frequency is greater than the second frequency, which is greater than the first frequency.

[0083] Step S204: Based on the instruction injection frequency and instruction injection method, a preset fault instruction is injected into the battery backup unit, and the test result is obtained after the battery backup unit executes the fault instruction.

[0084] In one possible embodiment, at least one state corresponding to the battery backup unit, the corresponding instruction injection frequency, and the instruction injection method have been determined in steps S202 and S203. Therefore, preset fault instructions can be injected into the battery backup unit according to the determined instruction injection frequency and instruction injection method. The fault instructions include two categories: hardware faults and software faults. If the fault instruction to be injected is a hardware fault instruction, the circuit or signal of the BBU can be directly interfered with by physical means, such as using a programmable power supply to simulate overvoltage (e.g., increasing the charging voltage from 12V to 15V), undervoltage (suddenly dropping to 5V), or overcurrent (short-circuiting the load). If the fault instruction to be injected is a software fault instruction, the simulated logic abnormality is modified through protocol or firmware modification, such as faking a "battery full" state and observing whether the battery backup unit erroneously stops charging.

[0085] In one possible embodiment, it can be determined whether the battery backup unit has completed processing the fault command by determining the fault alarm level of the battery backup unit. If the fault alarm level is the first level, it can be determined that the battery backup unit has completed processing the fault command.

[0086] In one possible embodiment, after determining that the battery backup unit has completed processing the fault command, the test result can be obtained, that is, the first fault condition can be obtained from the log file generated by the battery backup unit. Since the injected command is a fault command, each fault command also corresponds to a second fault condition. If the first fault condition is the same as the second fault condition, that is, the battery backup unit can generate the expected fault so that no other errors will occur during the subsequent fault resolution, then the test result can be determined to be that the battery backup unit is normal. If the first fault condition is different from the second fault condition, that is, the battery backup unit cannot generate the expected fault, and may not be able to take corrective measures during the fault handling process, then the test result can be determined to be that the battery backup unit is faulty.

[0087] In one possible embodiment, after determining that the battery backup unit cannot produce the expected fault and the test result is a battery backup unit fault, a trained machine learning model can be used to classify the test result to generate processing instructions for the battery backup unit. The machine learning model can be trained in the following way: historical data is input into the machine learning model as a training set according to different categories until the loss value of the machine learning model reaches the target threshold and the loss value is within the target range within a set time period. The machine learning model can be a decision tree or an LSTM, which is not limited in this application. The machine learning model can learn different processing methods corresponding to different categories of faults from historical data, thereby generating corresponding processing instructions. The historical data includes multiple historical fault information and solutions for each historical fault information. Each historical fault information includes at least one fault condition in either a first fault condition or a second fault condition.

[0088] In one possible embodiment, after the battery backup unit executes the fault command and obtains the test results, the total number of faults that occurred during the test within a set number of times can be updated. If the total number of faults is greater than the target threshold, it can be determined that the battery backup unit is more prone to failure. Therefore, it can be further determined whether the battery backup unit needs maintenance. That is, after fully charging and discharging to the cutoff voltage with a set current, the discharge capacity corresponding to the battery backup unit is determined. It can be understood that the discharge capacity is the actual capacity of the battery backup unit. Based on the discharge capacity and the initial capacity of the battery backup unit, the degree of wear of the battery backup unit is determined, and the battery maintenance unit is instructed to maintain the battery backup unit based on the degree of wear.

[0089] In one possible embodiment, if the difference between the initial capacity and the discharge capacity of the battery backup unit is less than or equal to a capacity difference threshold, the degree of wear of the battery backup unit is determined to be a first degree of wear. If the degree of wear of the battery backup unit is the first degree of wear, it can be considered that the wear of the battery backup unit is not significant and is still within an acceptable range, so maintenance is not required for the time being. If the difference between the initial capacity and the discharge capacity of the battery backup unit is greater than the capacity difference threshold, the degree of wear of the battery backup unit is determined to be greater than the first degree of wear, which is a second degree of wear. After determining the degree of wear of the battery backup unit, maintenance can be performed on the battery backup unit for the second degree of wear using the following method: If the degree of wear of the battery backup unit is the second degree of wear and the discharge capacity is higher than a set voltage threshold, the battery maintenance unit can be instructed to reduce the voltage of the battery backup unit during the current interaction process with the battery interaction unit. If the degree of wear of the battery backup unit is the second degree of wear and the discharge capacity is lower than or equal to the set voltage threshold, the battery maintenance unit can be instructed to deactivate the battery backup unit and prompt for replacement of the battery backup unit.

[0090] This application provides a testing method, computing device, and storage medium for a battery backup unit. By monitoring each communication interface in the battery backup unit and acquiring the target signal received by each communication interface, at least one state corresponding to the battery backup unit is determined. Based on the at least one state corresponding to the battery backup unit and the number of battery interaction units connected to the battery backup unit, the instruction injection frequency and instruction injection method are determined. Based on the instruction injection frequency and instruction injection method, a preset fault instruction is injected into the battery backup unit. After the battery backup unit executes the fault instruction, the test result is obtained. This achieves rapid automated fault testing of the battery backup unit, avoiding the possibility of overlooking faults when manually testing the battery backup unit, improving product stability and reliability, and increasing the testing efficiency of the battery backup unit.

[0091] In one specific embodiment, Figure 3 A detailed flowchart of a testing method for a battery backup unit provided in an embodiment of this application is shown, as follows: Figure 3 As shown, the method may include the following steps:

[0092] Step S301: Monitor each communication interface of the battery backup unit.

[0093] Step S302: Analyze the target signals received by each communication interface to obtain at least one target instruction contained in the target signal.

[0094] Step S303: Determine whether the battery backup unit is in a state of current interaction with the battery interaction unit based on the current direction within the battery backup unit and each target instruction.

[0095] Step S304: Based on the log information generated by the battery backup unit and each target instruction, determine whether the battery backup unit is in the state of component debugging with the battery interaction unit.

[0096] Step S305: Determine whether the battery backup unit is in the first state. If yes, proceed to step S306; otherwise, proceed to step S307.

[0097] Step S306: Determine that the instruction injection method corresponding to the battery backup unit is traversal injection. Then execute step S308.

[0098] Step S307: Determine that the instruction injection method corresponding to the battery backup unit is parallel injection.

[0099] Step S308: Determine whether the number of battery interaction units connected to the battery backup unit is less than or equal to the first threshold. If yes, proceed to step S309; ​​otherwise, proceed to step S310.

[0100] Step S309: Determine the instruction injection frequency as the first frequency.

[0101] Step S310: Determine whether the number of battery interaction units connected to the battery backup unit is greater than the second threshold. If yes, proceed to step S311; otherwise, proceed to step S312.

[0102] Step S311: Determine the instruction injection frequency as the third frequency.

[0103] Step S312: Determine the instruction injection frequency as the second frequency.

[0104] Step S313: Based on the instruction injection frequency and instruction injection method, a preset fault instruction is injected into the battery backup unit.

[0105] Step S314: After the battery backup unit executes the fault command, obtain the first fault condition from the log file generated by the battery backup unit.

[0106] Step S315: Determine whether the first fault condition is the same as the second fault condition. If yes, proceed to step S316; otherwise, proceed to step S317.

[0107] Step S316: Confirm that the test result shows the battery backup unit is normal.

[0108] Step S317: Determine the test result as a battery backup unit failure.

[0109] Based on the same inventive concept Figure 4 A structural block diagram of a test device for a battery backup unit provided in an embodiment of this application is shown below. Figure 4 As shown, the test apparatus 400 for the battery backup unit may include:

[0110] The interface monitoring unit 401 is used to monitor each communication interface of the battery backup unit; the battery backup unit is connected to different battery interaction units through each communication interface.

[0111] The state determination unit 402 is used to determine at least one state corresponding to the battery backup unit based on the target signals received by each communication interface; the target signals are sent by the battery interaction unit connected to the communication interface; the battery backup unit performs different operations in different states;

[0112] The injection determination unit 403 is used to determine the instruction injection frequency and instruction injection method based on at least one state corresponding to the battery backup unit and the number of battery interaction units connected to the battery backup unit.

[0113] The result acquisition unit 404 is used to inject a preset fault instruction into the battery backup unit based on the instruction injection frequency and the instruction injection method, and to acquire the test result after the battery backup unit executes the fault instruction.

[0114] In one possible implementation, the state determination unit 402 is specifically used to parse the target signal to obtain at least one target instruction contained in the target signal; the target instruction is used to instruct the battery backup unit to perform a corresponding operation;

[0115] Based on the current direction within the battery backup unit and each of the target instructions, it is determined whether the battery backup unit is in a state of current interaction with the battery interaction unit.

[0116] Based on the log information generated by the battery backup unit and each of the target instructions, it is determined whether the battery backup unit is in a state of component debugging with the battery interaction unit.

[0117] In one possible implementation, the state determination unit 402 is specifically used to determine that the instruction injection method corresponding to the battery backup unit is random injection if the battery backup unit is in a state of current interaction with the battery interaction unit.

[0118] If the battery backup unit is in the first state, then the instruction injection method corresponding to the battery backup unit is determined to be traversal injection;

[0119] If the battery backup unit is in the second state, then the instruction injection method corresponding to the battery backup unit is determined to be parallel injection; both the first state and the second state are states of component debugging with the battery interaction unit; the components debugged by the battery backup unit in the first state and the battery backup unit in the second state are different.

[0120] In one possible implementation, the injection determination unit 403 is specifically used to determine the instruction injection frequency as a first frequency if the number of battery interaction units connected to the battery backup unit is less than or equal to a first threshold.

[0121] If the number of battery interaction units connected to the battery backup unit is greater than the first threshold and less than or equal to the second threshold, then the instruction injection frequency is determined to be the second frequency; the second frequency is greater than the first frequency.

[0122] If the number of battery interaction units connected to the battery backup unit is greater than the second threshold, then the instruction injection frequency is determined to be the third frequency; the third frequency is greater than the second frequency.

[0123] In one possible implementation, the result acquisition unit 404 is specifically used to determine that the battery backup unit has completed the execution of the fault command if the fault alarm level of the battery backup unit is a first level.

[0124] The step of obtaining test results after the battery backup unit executes the fault command includes:

[0125] After the battery backup unit executes the fault instruction, the first fault condition in the log file generated by the battery backup unit is obtained;

[0126] If the first fault condition is the same as the second fault condition corresponding to the injected fault command, then the test result is determined to be that the battery backup unit is normal.

[0127] If the first fault condition is different from the second fault condition corresponding to the injected fault command, then the test result is determined to be a fault of the battery backup unit.

[0128] In one possible implementation, the result acquisition unit 404 is further configured to classify the test results using a trained machine learning model to generate processing instructions for the battery backup unit.

[0129] The machine learning model is trained in the following manner:

[0130] Historical data is input into the machine learning model as a training set according to different categories until the loss value of the machine learning model reaches the target threshold and the loss value is within the target range within a set time period; the historical data includes multiple historical fault information and solutions for each historical fault information; each historical fault information includes at least one fault condition in either the first fault condition or the second fault condition.

[0131] In one possible implementation, the result acquisition unit 404 is also used to update the total number of times the battery backup unit has failed during the test within a set number of times;

[0132] If the total number of times exceeds the target threshold, the battery backup unit is fully charged and discharged to the cutoff voltage with a set current, and then the discharge capacity corresponding to the battery backup unit is determined.

[0133] Based on the discharge capacity and the initial capacity of the battery backup unit, the degree of wear of the battery backup unit is determined, and the battery maintenance unit is instructed to maintain the battery backup unit based on the degree of wear.

[0134] In one possible implementation, the result acquisition unit 404 is further configured to determine the degree of loss of the battery backup unit as a first degree of loss if the difference between the initial capacity of the battery backup unit and the discharge capacity is less than or equal to a capacity difference threshold.

[0135] If the difference between the initial capacity and the discharge capacity of the battery backup unit is greater than the capacity difference threshold, then the degree of wear of the battery backup unit is determined to be a second degree of wear; if the second degree of wear is greater than the first degree of wear.

[0136] The battery maintenance unit performs maintenance on the battery backup unit based on the degree of wear, including:

[0137] If the degree of wear of the battery backup unit is the second degree of wear and the discharge capacity is higher than the set voltage threshold, then the battery maintenance unit is instructed to reduce the voltage of the battery backup unit during the current interaction with the battery interaction unit.

[0138] If the wear level of the battery backup unit is the second wear level and the discharge capacity is lower than or equal to the set voltage threshold, the battery maintenance unit is instructed to deactivate the battery backup unit and prompts for replacement of the battery backup unit.

[0139] Based on the same inventive concept, embodiments of this application provide a computing device that can implement the testing method for the battery backup unit described above. Please refer to... Figure 5 The computing device 500 includes a memory 501, a processor 502, and a bus 503.

[0140] The memory 501 is used to store computer programs executed by the processor 502. The memory 501 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and programs required to run instant messaging functions, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.

[0141] Memory 501 may be volatile memory, such as random-access memory (RAM); memory 501 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 501 may be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 501 may be a combination of the above-mentioned memories.

[0142] The processor 502 may include one or more central processing units (CPUs) or digital processing units, etc. The processor 502 is used to implement the test method of the battery backup unit in the above embodiments when it calls the computer program stored in the memory 501.

[0143] This application embodiment does not limit the specific connection medium between the memory 501 and the processor 502 described above. This application embodiment... Figure 5 The memory 501 and the processor 502 are connected via a bus 503, and the bus 503 is in Figure 5 The connections between other components are shown in thick lines only and are not intended to be limiting. The 503 bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0144] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium. The computer program product includes computer program code, which, when executed on a computer, causes the computer to perform a test method for any of the battery backup units discussed above. Since the principle by which the above-described computer-readable storage medium solves the problem is similar to the test method for a battery backup unit, the implementation of the above-described computer-readable storage medium can be found in the implementation of the method; repeated details will not be elaborated further.

[0145] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0146] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0147] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0148] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0149] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A test method for a battery backup unit, characterized in that, include: Monitor each communication interface of the battery backup unit; The battery backup unit is connected to different battery interaction units through the various communication interfaces; At least one state corresponding to the battery backup unit is determined based on the target signals received by each communication interface; the target signals are sent by the battery interaction unit connected to the communication interface; The battery backup unit performs different operations under different conditions; Based on at least one state corresponding to the battery backup unit and the number of battery interaction units connected to the battery backup unit, the instruction injection frequency and instruction injection method are determined. Based on the instruction injection frequency and the instruction injection method, a preset fault instruction is injected into the battery backup unit, and the test result is obtained after the battery backup unit executes the fault instruction. The instruction injection method is determined through the following steps: If the battery backup unit is in a state of current interaction with the battery interaction unit, then the instruction injection method corresponding to the battery backup unit is determined to be random injection. If the battery backup unit is in the first state, then the instruction injection method corresponding to the battery backup unit is determined to be traversal injection; If the battery backup unit is in the second state, then the instruction injection method corresponding to the battery backup unit is determined to be parallel injection; both the first state and the second state are states for component debugging with the battery interaction unit. The components being debugged in the battery backup unit in the first state are different from those in the battery backup unit in the second state; The instruction injection frequency is determined through the following steps: If the number of battery interaction units connected to the battery backup unit is less than or equal to the first threshold, then the instruction injection frequency is determined to be the first frequency. If the number of battery interaction units connected to the battery backup unit is greater than the first threshold and less than or equal to the second threshold, then the instruction injection frequency is determined to be the second frequency; the second frequency is greater than the first frequency. If the number of battery interaction units connected to the battery backup unit is greater than the second threshold, then the instruction injection frequency is determined to be the third frequency; the third frequency is greater than the second frequency.

2. The method according to claim 1, characterized in that, Determining at least one state corresponding to the battery backup unit based on the target signals received from each communication interface includes: The target signal is analyzed to obtain at least one target instruction contained in the target signal; the target instruction is used to instruct the battery backup unit to perform a corresponding operation; Based on the current direction within the battery backup unit and each of the target instructions, it is determined whether the battery backup unit is in a state of current interaction with the battery interaction unit. Based on the log information generated by the battery backup unit and each of the target instructions, it is determined whether the battery backup unit is in a state of component debugging with the battery interaction unit.

3. The method according to claim 1, characterized in that, The battery backup unit determines whether it has completed the execution process for the fault command by means of the following method: If the fault alarm level of the battery backup unit is the first level, it is determined that the battery backup unit has completed the execution of the fault command; The step of obtaining test results after the battery backup unit executes the fault command includes: After the battery backup unit executes the fault instruction, the first fault condition in the log file generated by the battery backup unit is obtained; If the first fault condition is the same as the second fault condition corresponding to the injected fault command, then the test result is determined to be that the battery backup unit is normal. If the first fault condition is different from the second fault condition corresponding to the injected fault command, then the test result is determined to be a fault of the battery backup unit.

4. The method according to claim 3, characterized in that, After determining that the test result indicates a failure of the battery backup unit, the method further includes: The test results are classified using a trained machine learning model to generate processing instructions for the battery backup unit. The machine learning model is trained in the following manner: Historical data is input into the machine learning model as a training set according to different categories until the loss value of the machine learning model reaches the target threshold and the loss value is within the target range within a set time period; the historical data includes multiple historical fault information and solutions for each historical fault information; each historical fault information includes at least one fault condition in either the first fault condition or the second fault condition.

5. The method according to claim 1, characterized in that, After obtaining the test results after the battery backup unit executes the fault command, the method further includes: Update the total number of failures that occurred during the battery backup unit within a set number of tests; If the total number of times exceeds the target threshold, the battery backup unit is fully charged and discharged to the cutoff voltage with a set current, and then the discharge capacity corresponding to the battery backup unit is determined. Based on the discharge capacity and the initial capacity of the battery backup unit, the degree of wear of the battery backup unit is determined, and the battery maintenance unit is instructed to maintain the battery backup unit based on the degree of wear.

6. The method according to claim 5, characterized in that, Determining the degree of wear of the battery backup unit based on the discharge capacity and the initial capacity of the battery backup unit includes: If the difference between the initial capacity and the discharge capacity of the battery backup unit is less than or equal to the capacity difference threshold, then the degree of loss of the battery backup unit is determined to be the first degree of loss. If the difference between the initial capacity and the discharge capacity of the battery backup unit is greater than the capacity difference threshold, then the degree of loss of the battery backup unit is determined to be the second degree of loss; the second degree of loss is greater than the first degree of loss. The battery maintenance unit performs maintenance on the battery backup unit based on the degree of wear, including: If the degree of wear of the battery backup unit is the second degree of wear and the discharge capacity is higher than the set voltage threshold, then the battery maintenance unit is instructed to reduce the voltage of the battery backup unit during the current interaction with the battery interaction unit. If the wear level of the battery backup unit is the second wear level and the discharge capacity is lower than or equal to the set voltage threshold, the battery maintenance unit is instructed to deactivate the battery backup unit and prompts for replacement of the battery backup unit.

7. A computing device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method according to any one of claims 1-5.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the method of any one of claims 1-5.

Citation Information

Patent Citations

  • Battery backup unit test method and related equipment

    CN109032320A

  • UPS monitoring method, equipment, storage medium and device based on cloud platform

    CN111443791A