A relay life detection method, system, device, and storage medium

By dynamically adjusting the operational amplifier gain coefficient to extend the upper limit of current detection, the actual contact current of the relay can be accurately detected and its lifespan can be evaluated. This solves the problem of inaccurate relay lifespan detection in the prior art and enables safe and stable operation of the circuit loop and timely early warning.

CN122330675APending Publication Date: 2026-07-03LIGOO (SHAN DONG) NEW ENERGY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610771365.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-01
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing relay life testing methods cannot accurately assess the remaining life, leading to operational risks in circuit loops. This is mainly because existing testing methods fail to quantify the cumulative damage to contacts caused by inrush currents of different amplitudes, and large inrush currents are saturated and cannot be sampled to obtain the true current magnitude.

Method used

By dynamically extending the upper limit of current detection by adjusting the operational amplifier gain coefficient, the actual contact current can be accurately determined, and the remaining life of the relay can be evaluated based on the number of switching cycles at different current levels, thus achieving accurate life detection of the relay.

Benefits of technology

It significantly improves the accuracy of relay life testing, ensures the safe and stable operation of circuit loops, and provides a timely failure early warning mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122330675A_ABST
    Figure CN122330675A_ABST
Patent Text Reader

Abstract

This application discloses a method, system, device, and storage medium for relay life testing. The method includes: adjusting the operational amplifier gain coefficient to increase the initial current detection upper limit when the initial contact current equals the initial current detection upper limit; determining the actual contact current based on the adjusted operational amplifier gain coefficient; determining the current level corresponding to the contact current; and counting the number of switching operations of the target relay at different current levels. Based on the number of switching operations, the remaining service life of the target relay is evaluated. The technical solution provided in this application can dynamically adjust the operational amplifier gain coefficient when the current exceeds the detection upper limit, effectively expanding the current detection upper limit and fully detecting the true current magnitude. Furthermore, the technical solution of this application can also count the number of switching operations separately based on the current level, quantifying and distinguishing the cumulative damage to the relay caused by current surges of different intensities, significantly improving the accuracy of life testing, and ensuring the safe and stable operation of the circuit in which the relay is located.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of electrical engineering technology, and in particular relates to a relay life detection method, system, device and storage medium. Background Technology

[0002] In the field of modern electrical engineering, relays are core components for performing normal switching and emergency disconnection of circuit circuits. For example, high-voltage DC relays in the high-voltage main circuit of an Energy Storage System (ESS) are crucial. The reliability of relays determines whether the system can operate safely and is one of the important lines of defense against serious circuit accidents such as fires and explosions.

[0003] As mentioned above, accurately detecting the remaining lifespan of relays in a circuit has a significant impact on the stable operation of power systems or devices such as energy storage systems. Most existing detection methods only count the number of times the relay is switched on and off to roughly estimate its remaining lifespan. Furthermore, their detection range for inrush current is limited, and the accuracy and scope of current detection are also relatively limited. This results in low accuracy in estimating the actual remaining lifespan of relays, with a significant deviation from the actual lifespan of the components. Consequently, timely warnings of relay failure cannot be provided, leading to serious operational risks in the circuit.

[0004] Therefore, how to conduct more accurate and effective life testing for relays is an important problem that urgently needs to be solved. Summary of the Invention

[0005] This application provides a relay life detection method, system, device, and storage medium, which can accurately detect the relay life and ensure the safe operation of the circuit in which the relay is located.

[0006] In a first aspect, embodiments of this application provide a relay life detection method, including: Detect the initial contact current when the target relay is switched on and off; Given that the initial contact current is equal to the upper limit of the initial current detection, the op-amp gain coefficient corresponding to the upper limit of the initial current detection is adjusted to increase the upper limit of the initial current detection, and the actual contact current is determined based on the adjusted op-amp gain coefficient. Determine the current level corresponding to the actual contact current or the initial contact current, and count the number of times the target relay switches on and off at different current levels. The remaining service life of the target relay is determined based on the number of times the target relay switches on and off at different current levels.

[0007] Secondly, embodiments of this application provide a battery management system, including: The sampling circuit is used to detect the initial contact current when the target relay is switched on or off. The controller is used to adjust the operational amplifier gain coefficient corresponding to the initial current detection upper limit when the initial contact current is determined to be equal to the initial current detection upper limit, so as to increase the initial current detection upper limit; and to determine the actual contact current based on the adjusted operational amplifier gain coefficient; to determine the current level corresponding to the actual contact current or the initial contact current; to count the number of times the target relay is switched on and off at different current levels; and to determine the remaining service life of the target relay based on the number of times the target relay is switched on and off at different current levels.

[0008] Thirdly, embodiments of this application provide a battery device, including a battery and a battery management system as described in the second aspect.

[0009] Fourthly, embodiments of this application provide a terminal device, the device including: a processor and a memory storing computer program instructions; When the processor executes computer program instructions, it implements a relay life detection method as described in the first aspect.

[0010] Fifthly, embodiments of this application provide a computer storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, they implement the relay life detection method as described in the first aspect.

[0011] Sixthly, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform the relay life detection method as described in the first aspect.

[0012] The technical solutions provided by the embodiments of this application bring at least the following beneficial effects: This application provides a relay life prediction method, comprising: when the detected initial contact current is equal to the upper limit of the initial current detection, adjusting the operational amplifier gain coefficient corresponding to the upper limit of the initial current detection to increase the upper limit of the initial current detection. Based on the adjusted operational amplifier gain coefficient, the actual contact current of the target relay can be determined. Then, the current level corresponding to the actual contact current or the initial contact current is determined, and the number of switching operations of the target relay at different current levels is counted. Furthermore, the remaining lifespan of the target relay can be evaluated based on the number of switching operations of the target relay at different current levels.

[0013] The technical solution provided in this application can dynamically adjust the operational amplifier gain coefficient when the current exceeds the detection limit, effectively expanding the current detection limit. This allows for complete detection of the true current magnitude when the relay encounters a large inrush current exceeding its normal range. Furthermore, this technical solution can also statistically analyze the number of on / off cycles based on the corresponding current level of the contact current, quantifying and differentiating the cumulative damage to the relay caused by current surges of varying intensities. This significantly improves the accuracy of lifespan testing and ensures the safe and stable operation of the circuit containing the relay.

[0014] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

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

[0016] Figure 1 A flowchart illustrating a relay life prediction method provided in one embodiment of this application; Figure 2 This is a schematic diagram of an example circuit corresponding to a relay lifetime prediction method provided in one embodiment of this application; Figure 3 This is a schematic diagram of a battery management system provided in another embodiment of this application; Figure 4 This is a schematic diagram of the structure of a terminal device provided in another embodiment of this application. Detailed Implementation

[0017] The features and exemplary embodiments of various aspects of this application will be described in detail below. 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 and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0018] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0019] It should be noted that the acquisition, storage, use, and processing of data in this application embodiment all comply with the relevant provisions of national laws and regulations.

[0020] Furthermore, it should be noted that in the embodiments of this application, certain software, components, models, and other existing solutions in the industry may be mentioned. These should be considered as exemplary, and their purpose is only to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.

[0021] In the field of modern electrical engineering, relays are core components for performing normal switching and emergency disconnection of circuit circuits. For example, high-voltage DC relays in the high-voltage main circuit of an Energy Storage System (ESS) are crucial. The reliability of relays determines whether the system can operate safely and is one of the important lines of defense against serious circuit accidents such as fires and explosions.

[0022] As mentioned above, accurately detecting the remaining lifespan of relays in a circuit has a significant impact on the stable operation of power systems or devices such as energy storage systems. Current relay lifespan detection methods mainly rely on deploying current sensors in the relay's circuit and using a battery management system (BMS) to count the number of relay switching cycles, thus roughly estimating the relay's remaining lifespan. This method does not quantify the cumulative damage to the contacts caused by inrush currents of different amplitudes, resulting in a significant discrepancy between the lifespan estimate and the actual degradation state, failing to provide effective early warning of relay failure.

[0023] Furthermore, existing solutions mostly use a fixed operational amplifier gain ratio when collecting loop current through devices such as shunts. Due to the fixed gain and the range of the shunt itself, large inrush currents exceeding the detection range are forcibly clipped and saturated, making it impossible to collect the true magnitude of the inrush current. This results in a lack of real and complete current data for life assessment, leading to low accuracy in estimating the remaining life of the relay and a significant deviation from the actual life of the device. Consequently, it is impossible to provide timely failure warnings for the relay, resulting in serious operational risks to the circuit loop.

[0024] To address the aforementioned technical problems, embodiments of this application provide a relay life detection method, system, device, and storage medium. The method includes: when it is determined that the detected initial contact current is equal to the initial current detection upper limit, adjusting the operational amplifier gain coefficient corresponding to the initial current detection upper limit to increase the initial current detection upper limit. Based on the adjusted operational amplifier gain coefficient, the actual contact current of the target relay can be determined. Then, the current level corresponding to the actual contact current or the initial contact current is determined, and the number of switching operations of the target relay at different current levels is counted. Further, the remaining service life of the target relay can be evaluated based on the number of switching operations of the target relay at different current levels.

[0025] The technical solution provided in this application can dynamically adjust the operational amplifier gain coefficient when the current exceeds the detection limit, effectively expanding the current detection limit. This allows for complete detection of the true current magnitude when the relay encounters a large inrush current exceeding its normal range. Furthermore, this technical solution can also statistically analyze the number of on / off cycles based on the corresponding current level of the contact current, quantifying and differentiating the cumulative damage to the relay caused by current surges of varying intensities. This significantly improves the accuracy of lifespan testing and ensures the safe and stable operation of the circuit containing the relay.

[0026] Regarding the execution entity used in the embodiments of this application, it can specifically be a battery management system capable of monitoring relay contact current or other terminal devices capable of controlling the battery management system, such as desktop computers, laptops, etc., or servers, etc. In addition, the execution entity in the embodiments of this application can also be a software entity, such as a client or software program installed in the battery management system. The specific type of execution entity corresponding to the relay life detection method, system, device, and storage medium provided in the embodiments of this application is not strictly limited here; it can be flexibly selected and set according to the application scenario and actual needs.

[0027] It should be noted that the embodiments provided in this application do not limit the specific application scenarios of the relay life detection method, system, device and storage medium provided above. The technical solutions provided in the embodiments of this application can be flexibly applied to various actual scenarios that require relay remaining service life assessment according to actual needs.

[0028] For example, in an energy storage system, when the main positive relay (target relay) in the high-voltage main circuit interrupts a short-circuit fault or other abnormal condition, the contact current instantly surges to the original detection limit. By applying the solution in this application, once it is determined that the initial contact current equals the current detection limit, it means that the actual current can exceed the detection limit. Therefore, the operational amplifier gain coefficient is dynamically adjusted to improve the current detection range and accurately detect the actual contact current. Furthermore, based on the actual current, the number of times the main positive relay switches on and off at different current levels is statistically analyzed. Based on the number of switching operations corresponding to different current levels, the remaining lifespan of the relay is accurately assessed, providing accurate data reference for circuit maintenance and component replacement, ensuring the safe and stable operation of the energy storage system.

[0029] It should be noted that the application scenarios described in the above embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will understand that with the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0030] Figure 1 This is a schematic diagram of a relay life detection process provided in one embodiment of this application.

[0031] like Figure 1 As shown, the relay life prediction method provided in this application includes steps S101 to S104.

[0032] S101: Detects the initial contact current when the target relay is switched on or off.

[0033] S102: Given that the initial contact current is equal to the upper limit of the initial current detection, adjust the gain coefficient of the operational amplifier corresponding to the upper limit of the initial current detection to increase the upper limit of the initial current detection, and determine the actual contact current based on the adjusted gain coefficient of the operational amplifier.

[0034] As shown in step S101, in the embodiments provided in this application, the initial contact current can be determined by detecting the contact current of the target relay in the pre-set shunt detection circuit when it is switched on or off. The shunt has a corresponding detection range, and the actual contact current may exceed or even far exceed the shunt's detection range. For example, the shunt's detection range may be 300A (Amperes), while the actual inrush current received by the contacts on the target relay can be as high as 500A.

[0035] In this situation, before actively adjusting the gain of the shunt amplifier, the contact current detected by the shunt is only the maximum upper limit. For example, the actual contact current of 500A mentioned above will only result in a detected output of 300A. If the damage to the target relay under this impact is determined based on the initial contact current, the significant difference between this data and the actual current data will severely affect the accuracy of the target relay's lifespan detection.

[0036] Based on this, as shown in step S102, in the embodiments provided in this application, when the detected initial contact current is equal to the initial current detection upper limit, it indicates that the actual contact current on the target relay may be exactly equal to the initial current detection upper limit, or it may indicate that the actual contact current has exceeded the initial current detection upper limit. Therefore, it is necessary to adjust the operational amplifier gain coefficient to increase the detection upper limit in order to determine the actual contact current of the target relay. Determining the actual contact current can accurately represent the true contact current of the target relay, providing accurate and effective data support for subsequent current level matching and remaining life analysis.

[0037] Regarding the specific process of determining the initial contact current, in the embodiments provided in this application, the initial contact current of the target relay under the upper limit of the initial current detection can be efficiently detected by using a shunt circuit, an operational amplifier circuit, and an analog-to-digital converter (ADC) connected in succession with the relay.

[0038] Specifically, a shunt can be connected in series in the contact circuit of the target relay. When the target relay switches on and off, the current in the contact circuit can pass through the shunt, generating a corresponding voltage signal, which is then output as the output voltage signal. The shunt is essentially composed of precision low-impedance resistors, with a specific impedance of, for example, 75μΩ (micro-ohms). When contact current passes through, it outputs a corresponding voltage. For example, when the shunt impedance is 75μΩ and the contact current is 300A, the output voltage signal can correspond to 22.5mV (millivolts). It can be seen that the voltage signal output by the shunt is relatively small, belonging to the millivolt level. Therefore, it needs to be amplified by an operational amplifier circuit to accurately detect the contact current.

[0039] Then, the output voltage signal can be input to an operational amplifier circuit, which can be connected to the output of the shunt to amplify the output voltage signal generated by the shunt to a level that can be recognized by the subsequent fuzzy converter, for example, amplifying a millivolt-level voltage signal to the volt level. The operational amplifier circuit can be preset with an operational amplifier gain coefficient. By multiplying the operational amplifier gain coefficient with the output voltage signal of the shunt, signal amplification can be achieved to obtain an amplified voltage signal.

[0040] The op-amp gain corresponds to the preset initial current detection limit for the shunt. Assuming the initial current detection limit is 300A, the full-scale range of the analog-to-digital converter corresponds to 3.3V. If the shunt impedance is 75μΩ, when the contact current reaches the initial current detection limit of 300A, the corresponding output voltage signal is 22.5mV. In this example, the op-amp gain is approximately 3.3V / 22.5mV ≈ 146.7.

[0041] When the actual contact current exceeds the initial current detection limit, calculations using a fixed op-amp gain can amplify the voltage signal representing the actual contact current. However, due to the limitations of the analog-to-digital converter's range, the final detected signal is still the initial current detection limit, making it impossible to determine the actual contact current. Therefore, this application can adjust the op-amp gain coefficient in step S102 to accurately determine the actual contact current. It should be noted that the specific values ​​in the above examples are for illustrative purposes only and do not represent strict limitations. The preset parameters can be flexibly set according to actual needs and application scenarios.

[0042] Furthermore, the amplified voltage signal can be output to an analog-to-digital converter (ADC), which can be connected to the output of an operational amplifier (op-amp) circuit. The ADC converts the amplified voltage signal into a corresponding digital code. Based on this digital code, the voltage corresponding to the digital code within the ADC's range can be determined. Based on this determined voltage value, the initial contact current can be calculated. Specifically, the initial contact current can be calculated by dividing the voltage value sequentially by the op-amp gain and the shunt resistance.

[0043] In the above embodiments, a signal detection link consisting of a shunt, operational amplifier circuit, and analog-to-digital converter enables precise step-by-step conversion and quantization of the contact current. This embodiment can accurately capture minute changes in the contact current before it exceeds the detection limit and convert them into corresponding digital signals. This provides a reliable data foundation for subsequent current rating and lifespan calculation, ensuring the accuracy and reliability of the data required for relay lifespan assessment.

[0044] Regarding the specific processing procedure for adjusting the operational amplifier gain coefficient to determine the actual contact current when the initial contact current equals the upper limit of the initial current detection, in the embodiments provided in this application, when it is determined that the initial contact current detected through the above embodiments equals the upper limit of the initial current detection, it indicates that the initial contact current may exceed the upper limit of the initial current detection.

[0045] In this situation, since the range of the analog-to-digital converter (ADC) cannot be easily changed, the operational amplifier (op-amp) gain coefficient can be adjusted to determine the actual contact current exceeding the initial current detection upper limit within the same ADC range. Specifically, the initial op-amp gain coefficient can be reduced based on a preset reduction ratio. Then, the output voltage signal of the shunt can be amplified using the adjusted op-amp gain coefficient, and the amplified voltage signal can be output to the ADC.

[0046] In some embodiments, the operational amplifier gain coefficient can be adjusted by regulating the value of the feedback resistor in the operational amplifier circuit. Specifically, multiple feedback branches consisting of precision resistors and analog switches connected in series can be connected in parallel between the inverting input and output terminals of the operational amplifier circuit. When the initial contact current is less than the upper limit of the initial current detection, the analog switch in the operational amplifier circuit can select the feedback resistor corresponding to the initial operational amplifier gain coefficient, enabling the operational amplifier circuit to operate in a higher operational amplifier gain mode.

[0047] When it's necessary to reduce the op-amp gain to increase the current detection limit (i.e., the initial contact current equals the initial current detection limit), an analog switch can be used to connect a feedback resistor with the adjusted op-amp gain value. This adjusts the op-amp circuit to a lower gain mode, thereby increasing the current detection range within the limited range of the analog-to-digital converter. This embodiment enables real-time and rapid adjustment of the op-amp gain, improving the overall efficiency of the relay life detection process.

[0048] The amplified voltage signal can then be adjusted using an analog-to-digital converter to determine the corresponding adjusted digital code. Next, the voltage value corresponding to the adjusted digital code is determined, and this voltage value is divided sequentially by the adjusted operational amplifier gain and the shunt resistance to calculate the actual contact current of the target relay.

[0049] For example, if the actual contact current is 1500A, the initial current detection limit is 300A, the full-scale range of the analog-to-digital converter corresponds to 3.3V, the shunt impedance is 75μΩ, and the initial op-amp gain is approximately 146.7. Based on the above, it can be seen that the initial contact current detected in this example is only the detection limit of 300A, which is far from the actual contact current of 1500A. To accurately detect the true contact current of the target relay, the op-amp gain can be reduced using the above embodiment. For example, the op-amp gain can be reduced from 146.7 to 29.3 or even less. If the op-amp gain is 29.3, it can be calculated that the voltage output of the analog-to-digital converter for an actual contact current of 1500A is approximately 3.3V, thus accurately calculating the actual contact current.

[0050] It should be noted that the specific value of the aforementioned preset reduction ratio is not strictly limited in this embodiment of the application, and can be flexibly set according to actual needs and the specific models and ranges of each device in the circuit testing. Furthermore, during the adjustment of the operational amplifier gain coefficient, the coefficient can be reduced once or multiple times to determine the operational amplifier gain coefficient suitable for detecting the actual contact current of the target relay.

[0051] Specifically, after reducing the op-amp gain coefficient by a preset reduction ratio, it can be determined whether the upper limit of current detection corresponding to the adjusted op-amp gain coefficient is equal to the actual contact current determined after this adjustment. If they are equal, it means that the accurate actual contact current of the target relay may still be greater than the adjusted upper limit of current detection after adjusting the op-amp gain coefficient.

[0052] In this case, the op-amp gain coefficient can be adjusted a second or even more times based on the preset reduction ratio, until the upper limit of the current detection corresponding to the adjusted op-amp gain coefficient is greater than the actual contact current determined after adjustment. This embodiment can effectively ensure that the determined actual contact current is consistent with the actual contact current of the target relay when it is switched on and off, providing accurate data support for subsequent current level determination and life assessment.

[0053] It should be noted that, in the embodiments provided in this application, after determining the actual contact current based on the adjusted operational amplifier gain coefficient, the operational amplifier gain coefficient can be adjusted back during subsequent detection of the target relay contact current. Specifically, when the actual contact current is detected to be less than the initial current detection upper limit, the adjusted operational amplifier gain coefficient of the operational amplifier circuit at this time can be adjusted back to the operational amplifier gain coefficient corresponding to the initial current detection upper limit. This embodiment allows for flexible and dynamic adjustment of the operational amplifier gain coefficient, effectively preventing the maintenance of a high current detection upper limit for a long time, which would lead to a decrease in the detection accuracy of contact currents below the initial current detection upper limit.

[0054] In the above embodiments, the operational amplifier gain coefficient is dynamically reduced by a preset reduction ratio, so that the inrush current exceeding the initial current detection upper limit does not experience clipping saturation during amplification, thus fully preserving the true current information. Through the adjustment of the operational amplifier gain coefficient in this embodiment, the actual contact current value is accurately determined based on the adjusted gain coefficient, ensuring the integrity and accuracy of the target relay contact current, and providing a true and effective data basis for subsequent current grading and lifespan degradation assessment.

[0055] S103: Determine the current level corresponding to the actual contact current or the initial contact current, and count the number of times the target relay is switched on and off at different current levels.

[0056] As shown in step S103, in the embodiments provided in this application, the current level corresponding to the actual contact current or initial contact current of the target relay at each switching can be determined based on the pre-built mapping relationship between contact current and current level for the target relay. Furthermore, the number of switching operations of the target relay at different current levels is counted according to the current level at each switching operation.

[0057] The mapping relationship between contact current and current level can be constructed based on the rated switching frequency of the target relay under different contact currents. In some embodiments, in addition to the different contact current levels, the mapping relationship between contact current and current level may also include attenuation coefficients corresponding to different current levels. The attenuation coefficients are used to represent the degree of influence of different contact currents on the relay lifespan.

[0058] In some embodiments, the mapping relationship between contact current and current level can be specifically referred to in the examples shown in Table 1.

[0059] Table 1. Example of the mapping relationship between contact current and current level. As shown in Table 1, based on the rated switching frequency of the target relay under different contact current ranges, multiple current levels can be defined, and the attenuation coefficient of each current level during a single switching operation of the target relay can be calculated. Table 1 is only used as an example to illustrate the mapping relationship between contact current and current level, and is not strictly limited. The specific mapping can be constructed according to the actual rated switching frequency of the target relay.

[0060] Regarding the matching process of the above current levels, in the embodiments provided in this application, when the initial contact current is equal to the upper limit of the initial current detection and the actual contact current corresponding to the target relay is determined, the corresponding current level and attenuation coefficient can be matched from the mapping relationship between contact current and current level based on the current range in which the actual contact current is located.

[0061] When the initial contact current is less than the upper limit of the initial current detection, it means that there is no need to increase the upper limit of the current detection by adjusting the op-amp gain coefficient, and the detected initial contact current is the true contact current of the target relay. In this case, based on the current range of the initial contact current, the corresponding current level and attenuation coefficient can be matched from the mapping relationship between contact current and current level. The determined current level and attenuation coefficient can be used to accurately assess the remaining service life of the target relay after multiple switching operations, fully considering the damage to the target relay under different contact currents, and achieving accurate determination of the true remaining service life.

[0062] The above embodiments uniformly classify the initial contact current and the actual contact current exceeding the initial current detection limit into the contact current-current level mapping relationship, achieving hierarchical classification of normal switching current and large inrush current. Furthermore, based on the contact current-current level mapping relationship, both normal switching current and large inrush current can be matched to corresponding current levels and attenuation coefficients according to the actual current range, providing refined quantitative input for subsequent life assessment and effectively improving the accuracy of the target relay's remaining life assessment.

[0063] It should be noted that, to further improve the accuracy of remaining service life detection for the target relay, the validity of the initial contact current or the actual contact current can be verified before determining the current level. Specifically, while detecting the contact current using devices such as the shunt mentioned in the above embodiments, a current sensor, such as a Hall effect sensor, can be installed on the circuit where the target relay is located.

[0064] A current sensor can be used to monitor the contact current when a target relay is switched on and off, serving as a verification contact current for the actual or initial contact current. The reason for not directly using the current collected by the current sensor to determine the current level and assess the remaining lifespan of the target relay is that the detection accuracy of current sensors is generally lower than that of the shunt-based contact current detection method described in the above embodiments. Furthermore, the detection accuracy will further decrease as the current sensor's range increases. Therefore, it is suitable as verification data rather than for directly assessing the remaining lifespan.

[0065] Specifically, the verification contact current when the target relay is switched on or off can be detected and determined using a pre-set current sensor in the circuit loop. Then, the current detection deviation between the verification contact current and the actual contact current, or between the verification contact current and the initial contact current that is less than the upper limit of the initial current detection, can be calculated.

[0066] Although the accuracy of the verification contact current collected by the current sensor may not be as high as that of the actual contact current or initial contact current collected by the shunt or other devices in the above embodiments, if the current detection is normal, the verification contact current should be close to the actual contact current (or initial contact current).

[0067] Therefore, the relationship between the current detection deviation and a preset deviation threshold (e.g., 5% of the calibration contact current) can be compared. When the current detection deviation is determined to be greater than the preset deviation threshold, it indicates an anomaly in the current detection, and an anomaly alert can be generated. This anomaly alert can be used to notify relevant personnel that there is an anomaly in the contact current detection of the target relay.

[0068] In the above embodiments, a preset current sensor is used to accurately verify the contact current collected by the shunt, achieving closed-loop verification of the authenticity of the current collection data. This embodiment can promptly trigger an anomaly alert when the detection deviation exceeds a preset range, improving the accuracy and efficiency of current detection anomaly detection and ensuring the accuracy and authenticity of current rating and remaining service life data.

[0069] S104: Determine the remaining service life of the target relay based on the number of times the target relay switches on and off at different current levels.

[0070] As shown in step S104, in the embodiments provided in this application, the remaining service life of the target relay can be calculated by combining the number of times the target relay is switched on and off at different current levels, and the attenuation coefficient corresponding to each current level in the mapping relationship between contact current and current level in the above embodiments.

[0071] Specifically, for each current level corresponding to the target relay, the attenuation coefficient corresponding to each current level can be determined based on the mapping relationship between contact current and current level. For example, in the example shown in Table 1 above, when the current level is 3, the corresponding attenuation coefficient is 0.0001.

[0072] Then, based on the attenuation coefficient and the number of times the target relay switches on and off at this current level, the single-stage attenuation degree of the target relay at this current level can be calculated. Specifically, the calculation process can be to multiply the number of switching operations by the attenuation coefficient to obtain the single-stage attenuation degree. The single-stage attenuation degree can characterize the reduced service life of the target relay due to the contact current at this current level during historical use.

[0073] The above calculations are performed for each current level to determine the single-stage attenuation degree of the target relay across all corresponding current levels. Next, based on the single-stage attenuation degrees for all current levels, the overall attenuation degree of the target relay up to the present can be determined. Specifically, this can be achieved by summing the single-stage attenuation degrees for all current levels. Further, based on the overall attenuation degree, the remaining service life of the target relay can be determined.

[0074] For example, as shown in Table 1 above, the single attenuation levels of the target relay at up to eight current levels can be summed to obtain the overall attenuation level. In some embodiments, the difference between the overall attenuation level and 1 can be calculated and multiplied by 100% to determine the remaining lifespan percentage of the target relay, which is then used as the remaining service life.

[0075] In the above embodiments, by mapping different current levels to corresponding attenuation coefficients and calculating the comprehensive attenuation degree of the target relay in stages, a refined quantitative assessment of the cumulative damage to relay contacts is achieved. This embodiment effectively integrates the different impacts of smaller initial contact currents and larger actual contact currents on lifespan into the comprehensive attenuation degree, significantly improving the accuracy of remaining service life calculation.

[0076] In the embodiments provided in this application, after determining the remaining service life of the target relay through the above embodiments, it is also possible to determine whether there is a risk of failure of the current target relay based on a preset life threshold, so as to provide timely failure warning and ensure the stable and safe operation of the circuit where the target relay is located.

[0077] Specifically, the remaining service life can be compared with the preset service life threshold. When the remaining service life is lower than the preset service life threshold, it indicates that the target relay has suffered significant damage and has limited remaining working time. It should be replaced or repaired promptly to ensure the safe and stable operation of the circuit or the overall system. In this case, a failure warning message can be generated for the target relay. This warning message can be used to prompt relevant personnel to replace the target relay to prevent potential failure risks.

[0078] The above describes the specific implementation of the relay life prediction method provided in the embodiments of this application. For further understanding, the relay life prediction method is comprehensively introduced below with application examples; please refer to [link / reference needed]. Figure 2 As shown.

[0079] Figure 2 This is a schematic diagram of an example circuit corresponding to a relay life prediction method provided in one embodiment of this application.

[0080] Figure 2 The diagram shows the circuit connection of the high-voltage power distribution unit (PDU) 200 in the energy storage system, including the main positive relay 201, which is connected between the positive terminal of the battery pack and the positive terminal of the load, and can be used to control the on / off state of the main circuit positive terminal. Figure 2 In addition to being connected to the positive terminal of the battery pack and the positive terminal of the load, the main positive relay 201 also includes a main positive relay status detection function on the positive side, a main positive relay drive function, and a connection on the negative side. The relay status detection function can determine whether the relay is properly engaged or stuck, and the relay drive function can be used to input a drive signal to the relay coil to control the closing or opening of the relay.

[0081] The main negative relay 202, connected between the negative terminal of the battery pack and the negative terminal of the load, can be used to control the on / off state of the negative terminal of the main circuit. For example... Figure 2In addition to being connected to the negative terminal of the battery pack and the negative terminal of the load, the main negative relay 202 also includes main negative relay status detection, main negative relay driving, and negative terminal connection on the positive side.

[0082] The pre-charge relay 203, connected in series with the pre-charge resistor 204, controls the on / off state of the pre-charge circuit. In some embodiments, the pre-charge relay 203 is typically closed first, and then the main relay is closed and the pre-charge relay 203 is opened after the load capacitor voltage reaches a certain value. Figure 2 The precharge relay 203 also includes a positive-side precharge relay drive and a negative-side connection.

[0083] Fuse 205 is used for overcurrent or short-circuit protection. It blows when the circuit current exceeds the rated value to disconnect the main circuit. Shunt 206 is used to perform the initial contact current or actual contact current detection mentioned in the above embodiments. Current sensor 207 is used to detect the calibration contact current in the circuit to verify the accuracy of the initial contact current or actual contact current.

[0084] based on Figure 2 As shown in the example, the main control module of the battery management system applying the technical solution provided in this application embodiment can be electrically connected to the shunt 206 and the current sensor 207 to accurately detect the contact current. Furthermore, the battery management system can determine whether to adjust the gain coefficient of the operational amplifier corresponding to the shunt based on the detected initial contact current and output current detection line, thereby issuing an operational amplifier gain coefficient adjustment command.

[0085] Furthermore, the current level and attenuation coefficient of the actual contact current or initial contact current can be determined. By statistically analyzing the number of switching operations under different current registrations and combining this with the attenuation coefficient, the remaining service life of the target relay can be comprehensively determined. Additionally, in some embodiments, the battery management system can be connected to a warning module to generate corresponding prompts and promptly remind relevant users to take appropriate action when an abnormality is detected in the current detection or the remaining service life of the target relay is low.

[0086] In summary, the technical solution provided in this application can dynamically adjust the operational amplifier gain coefficient when the current exceeds the detection limit, effectively expanding the current detection limit. This allows for complete detection of the true current magnitude when the relay encounters a large inrush current exceeding its normal range. Furthermore, this technical solution can also statistically analyze the number of on / off cycles based on the corresponding current level of the contact current, quantifying and differentiating the cumulative damage to the relay caused by current surges of varying intensities. This significantly improves the accuracy of lifespan testing and ensures the safe and stable operation of the circuit containing the relay.

[0087] Based on the same inventive concept as the relay life prediction method described above, this application also provides a battery management system, which can be found in detail below. Figure 3 As shown.

[0088] Figure 3 This is a schematic diagram of a battery management system provided in another embodiment of this application.

[0089] like Figure 3 As shown in the illustration, this application also provides a battery management system 300, including: The sampling circuit 301 is used to detect the initial contact current when the target relay is switched on or off. The controller 302 is used to adjust the operational amplifier gain coefficient corresponding to the initial current detection upper limit when the initial contact current is determined to be equal to the initial current detection upper limit, so as to increase the initial current detection upper limit; and to determine the actual contact current based on the adjusted operational amplifier gain coefficient; to determine the current level corresponding to the actual contact current or the initial contact current; to count the number of times the target relay is switched on and off at different current levels; and to determine the remaining service life of the target relay based on the number of times the target relay is switched on and off at different current levels.

[0090] In some embodiments, the controller 302 may include a gain adjustment module, an on / off statistics module, and a lifetime detection module.

[0091] The aforementioned gain adjustment module is used to adjust the operational amplifier gain coefficient corresponding to the initial current detection upper limit when the initial contact current is determined to be equal to the initial current detection upper limit, so as to increase the initial current detection upper limit, and to determine the actual contact current based on the adjusted operational amplifier gain coefficient. The aforementioned on / off statistics module is used to determine the current level corresponding to the actual contact current or the initial contact current, and to count the number of times the target relay is switched on and off at different current levels. The aforementioned life detection module is used to determine the remaining lifespan of the target relay based on the number of times the target relay is switched on and off at different current levels.

[0092] In some embodiments, the sampling circuit 301 described above is specifically used for: Determine the output voltage signal of the shunt connected to the target relay when the target relay is switched on and off; The output voltage signal is amplified by the operational amplifier circuit connected to the shunt, based on the operational amplifier gain coefficient, to obtain the amplified voltage signal. The initial contact current is determined based on the amplified voltage signal by an analog-to-digital converter connected to the operational amplifier circuit.

[0093] In some embodiments, the controller 302 described above is specifically used for: Based on the preset reduction ratio, the op-amp gain coefficient is reduced to obtain the adjusted op-amp gain coefficient; The output voltage signal is amplified by the operational amplifier circuit based on the adjusted operational amplifier gain coefficient to obtain the adjusted amplified voltage signal. The actual contact current is determined by using an analog-to-digital converter based on the adjusted amplified voltage signal and the adjusted operational amplifier gain coefficient.

[0094] In some embodiments, the controller 302 described above is specifically used for: Given that the initial contact current is equal to the upper limit of the initial current detection, the current level corresponding to the current range of the actual contact current is determined based on the pre-built mapping relationship between contact current and current level. If the initial contact current is determined to be less than the upper limit of the initial current detection, the current level corresponding to the current range of the initial contact current is determined based on the mapping relationship between the contact current and the current level.

[0095] In some embodiments, the controller 302 described above is specifically used for: For each current level, based on the pre-built mapping relationship between contact current and current level, the attenuation coefficient corresponding to the current level is determined. The attenuation coefficient corresponding to each current level in the mapping relationship between contact current and current level is determined based on the rated switching frequency of the target relay. Based on the attenuation coefficient corresponding to the current level and the number of switching operations corresponding to the current level, determine the single-stage attenuation degree of the target relay at the current level. The overall attenuation level of the target relay is determined based on the single-stage attenuation level corresponding to multiple current levels. The remaining service life is determined based on the overall degree of attenuation.

[0096] In some embodiments, the controller 302 is further configured to: The current at the verification contact is detected when the target relay is switched on and off using a preset current sensor. Determine the current detection deviation between the calibration contact current and the actual contact current or the initial contact current; If the current detection deviation exceeds the preset deviation threshold, an abnormal detection prompt will be issued for the actual contact current or the initial contact current.

[0097] In some embodiments, the controller 302 described above is specifically used for: When the remaining service life is less than the preset service life threshold, a failure warning message is generated for the target relay, which is used to prompt the replacement of the target relay.

[0098] The Battery Management System (BMS) of this application is used to perform at least one of the following functions for individual battery cells: state monitoring, state analysis, charge / discharge control, safety protection, thermal management, high-voltage power distribution, and information management. In addition, the Battery Management System of this application can also implement the functions of a controller in an electrical device, such as a vehicle control unit (VCU) or a motor control unit (MCU), etc., and this application does not impose any limitations on this.

[0099] It should be noted that the battery management system in this application can be integrated as a controller into the battery device, such as into the battery pack or energy storage box. The battery management system in this application can also be integrated as a controller into electrical devices, such as in a vehicle or vehicle chassis. The battery management system in this application can also be integrated into the charging device as a controller, such as into the charging device or the battery swapping device. The battery management system in this application can also be deployed as control software on a server. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, such as vehicle networking cloud, APP backend, etc.

[0100] Based on the same inventive concept, embodiments of this application also provide a battery device, including a battery and a battery management system as described in the above embodiments.

[0101] Figure 4 This is a schematic diagram of the structure of a terminal device provided in another embodiment of this application.

[0102] The terminal device may include a processor 401 and a memory 402 storing computer program instructions.

[0103] Specifically, the processor 401 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0104] Memory 402 may include mass storage for data or instructions. For example, and not limitingly, memory 402 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 402 may include removable or non-removable (or fixed) media. Where appropriate, memory 402 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 402 is non-volatile solid-state memory.

[0105] In a particular embodiment, memory 402 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Thus, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform operations described with reference to any of the relay lifetime prediction methods disclosed in this application.

[0106] The processor 401 reads and executes computer program instructions stored in the memory 402 to implement any of the relay life prediction methods in the above embodiments.

[0107] In one example, the terminal device may also include a communication interface 403 and a bus 410. Wherein, as... Figure 4 As shown, the processor 401, memory 402, and communication interface 403 are connected through bus 410 and complete communication with each other.

[0108] The communication interface 403 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0109] Bus 410 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 410 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.

[0110] Furthermore, in conjunction with the relay life prediction method in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the relay life prediction methods in the above embodiments.

[0111] This application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the relay life prediction methods described in the above embodiments.

[0112] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0113] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0114] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0115] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in 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, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0116] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A method for detecting the lifespan of a relay, characterized in that, include: Detect the initial contact current when the target relay is switched on and off; If the initial contact current is determined to be equal to the upper limit of the initial current detection, the gain coefficient of the operational amplifier corresponding to the upper limit of the initial current detection is adjusted to increase the upper limit of the initial current detection, and the actual contact current is determined based on the adjusted gain coefficient of the operational amplifier. Determine the current level corresponding to the actual contact current or the initial contact current, and count the number of times the target relay is switched on and off at different current levels; The remaining service life of the target relay is determined based on the number of times the target relay is switched on and off at different current levels.

2. The method according to claim 1, characterized in that, Detecting the initial contact current when the target relay is switched on and off includes: Determine the output voltage signal of the shunt connected to the target relay when the target relay is switched on or off; The output voltage signal is amplified by the operational amplifier circuit connected to the shunt, based on the gain coefficient of the operational amplifier, to obtain an amplified voltage signal. The initial contact current is determined based on the amplified voltage signal by an analog-to-digital converter connected to the operational amplifier circuit.

3. The method according to claim 2, characterized in that, Given that the initial contact current is equal to the upper limit of the initial current detection, the operational amplifier gain coefficient corresponding to the initial current detection is adjusted, and the actual contact current is determined based on the adjusted operational amplifier gain coefficient, including: Based on a preset reduction ratio, the operational amplifier gain coefficient is reduced to obtain the adjusted operational amplifier gain coefficient; The output voltage signal is amplified by the operational amplifier circuit based on the adjusted operational amplifier gain coefficient to obtain the adjusted amplified voltage signal. The actual contact current is determined by the analog-to-digital converter based on the adjusted amplified voltage signal and the adjusted operational amplifier gain coefficient.

4. The method according to claim 1, characterized in that, Determining the current level corresponding to the actual contact current or the initial contact current includes: If the initial contact current is determined to be equal to the upper limit of the initial current detection, the current level corresponding to the current range of the actual contact current is determined based on the pre-built mapping relationship between contact current and current level. If the initial contact current is determined to be less than the upper limit of the initial current detection, the current level corresponding to the current range of the initial contact current is determined based on the mapping relationship between the contact current and the current level.

5. The method according to claim 1, characterized in that, The remaining service life of the target relay is determined based on the number of times the target relay switches on and off at different current levels, including: For each current level, based on the pre-built mapping relationship between contact current and current level, the attenuation coefficient corresponding to the current level is determined. The attenuation coefficient corresponding to each current level in the mapping relationship between contact current and current level is determined based on the rated switching frequency of the target relay. Based on the attenuation coefficient corresponding to the current level and the number of switching operations corresponding to the current level, the single-stage attenuation degree of the target relay at the current level is determined. The overall attenuation level of the target relay is determined based on the single-level attenuation level corresponding to the multiple current levels. The remaining service life is determined based on the overall degree of attenuation.

6. The method according to claim 1, characterized in that, Before determining the current level corresponding to the actual contact current or the initial contact current, and counting the number of times the target relay switches on and off at different current levels, the method further includes: The current at the verification contact when the target relay is switched on and off is detected by a preset current sensor. Determine the current detection deviation between the verification contact current and the actual contact current or the initial contact current; If the current detection deviation is greater than a preset deviation threshold, an abnormal detection prompt will be issued for either the actual contact current or the initial contact current.

7. The method according to claim 1, characterized in that, The method further includes: If the remaining service life is lower than a preset service life threshold, a failure warning message is generated for the target relay, and the failure warning message is used to prompt the replacement of the target relay.

8. A battery management system, characterized in that, include: The sampling circuit is used to detect the initial contact current when the target relay is switched on or off. The controller is configured to, when it is determined that the initial contact current is equal to the initial current detection upper limit, adjust the operational amplifier gain coefficient corresponding to the initial current detection upper limit so as to increase the initial current detection upper limit, and determine the actual contact current based on the adjusted operational amplifier gain coefficient; Determine the current level corresponding to the actual contact current or the initial contact current, and count the number of times the target relay is switched on and off at different current levels; The remaining service life of the target relay is determined based on the number of times the target relay is switched on and off at different current levels.

9. A battery device, characterized in that, Includes a battery and a battery management system as described in claim 8.

10. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the relay life detection method as described in any one of claims 1-7.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the relay life detection method as described in any one of claims 1-7.