Relay adhesion detection method and device, storage medium and electronic equipment

By collecting and analyzing the sample voltage value of the relay, combining the proportion and pressure difference value, combined with the median filtering algorithm and the timer mechanism, the problem of low accuracy of relay adhesion detection is solved, and more accurate detection results are achieved.

CN119044750APending Publication Date: 2024-11-29EVE ENERGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411394133.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The accuracy of adhesion detection of prior art relays is low, and the sampling voltage fluctuates due to the influence of electric device insulation and other electrical components, resulting in misdiagnosis.

Method used

When the relay is detected to be powered off, the corresponding sampling voltage value is collected, the number of voltage values ​​accounts for and the maximum pressure difference value is counted, and the median filtering algorithm and timer mechanism are combined to determine whether the relay is in an adhesion state. Improve detection accuracy.

Benefits of technology

It effectively overcomes the impact of voltage fluctuations, improves the accuracy of relay adhesion detection, and ensures accurate feedback on the working status of relays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119044750A_ABST
    Figure CN119044750A_ABST
Patent Text Reader

Abstract

The invention discloses a relay adhesion detection method and device, a storage medium and electronic equipment. The method comprises the steps that under the condition that power failure of the relay is detected, sampling voltage values corresponding to the relay are collected within a target time range according to a first collection frequency, a sampling voltage value set is obtained, the relay is connected to a battery pack loop, and the sampling voltage values refer to voltage values of sampling points relative to the negative electrode of a battery pack; the sampling point is located in a voltage injection circuit, and the voltage injection circuit is used for injecting a voltage signal at a load current input end of the relay; counting the number proportion of the first voltage values in the sampling voltage value set and the maximum voltage difference value in the sampling voltage value set; and detecting whether the relay is in an adhesion state or not according to the number proportion of the first voltage values and the maximum voltage difference value. According to the invention, the technical problem of low accuracy of relay adhesion detection in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of relays, and in particular to a method, device, storage medium and electronic equipment for detecting relay adhesion. Background Art

[0002] High-voltage relays are the core components for controlling the on / off of high-voltage circuits in electric devices (such as new energy vehicles). In order to ensure the normal operation and high-voltage safety of electric devices, high-voltage relays must be accurately controlled and their functional responsiveness must be diagnosed. In actual use, the safety issues caused by the uncontrolled high-voltage battery due to the adhesion of high-voltage relays are particularly prominent, so it is necessary to accurately detect the working status of the relays.

[0003] At present, the relay sticking detection scheme in the related art is easily affected by the insulation of the electric device (such as: vehicle insulation) and other electrical components, which can easily cause sampling voltage fluctuations, thereby causing misdiagnosis of high-voltage relay sticking, resulting in low accuracy of relay sticking detection.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a method, device, storage medium and electronic device for detecting relay adhesion, so as to at least solve the technical problem of low accuracy in detecting relay adhesion in the related art.

[0006] According to one aspect of an embodiment of the present invention, a method for detecting relay adhesion is provided, comprising: when a power failure of the relay is detected, collecting a sampled voltage value corresponding to the relay within a target time range according to a first acquisition frequency to obtain a set of sampled voltage values, wherein the relay is connected to a battery pack circuit, the sampled voltage value refers to the voltage value of a sampling point relative to a negative electrode of the battery pack, the sampling point is located in a voltage injection circuit, and the voltage injection circuit is used to inject a voltage signal into a load current input terminal of the relay; counting the proportion of the first voltage value in the sampled voltage value set and the maximum voltage difference value in the sampled voltage value set, wherein the first voltage value refers to a voltage value within a preset voltage range; and detecting whether the relay is in a adhesion state based on the proportion of the first voltage value and the maximum voltage difference value.

[0007] Furthermore, the method for detecting relay adhesion also includes: when the maximum pressure difference value is greater than or equal to a preset pressure difference value, or the quantity proportion is less than or equal to a preset ratio, determining that the relay is not in a adhesion state; when the maximum pressure difference value is less than the preset pressure difference value, and the quantity proportion is greater than the preset ratio, using a median filtering algorithm to process the sampled voltage value set to obtain a second voltage value; and detecting whether the relay is in a adhesion state based on the second voltage value.

[0008] Furthermore, the relay sticking detection method also includes: when the second voltage value is not within the preset voltage range, determining that the relay is not in a sticking state; when the second voltage value is within the preset voltage range, judging whether the value of the first counter is greater than a preset first value; when the value of the first counter is less than or equal to the preset first value, increasing the value of the first counter by a preset value, and repeatedly executing the steps of collecting the sampled voltage value corresponding to the relay within the updated target time range according to the first collection frequency to obtain an updated set of sampled voltage values, until it is detected that the relay is not in a sticking state based on the updated set of sampled voltage values, or, until the value of the first counter is greater than the first value, determining that the relay is in a sticking state.

[0009] Furthermore, the relay adhesion detection method also includes: removing the maximum voltage value and the minimum voltage value in the sampled voltage value set to obtain a target sampled voltage value set; and averaging the voltage values ​​in the target sampled voltage value set to obtain a second voltage value.

[0010] Furthermore, the relay adhesion detection method also includes: collecting a sampled voltage value corresponding to the relay according to a second acquisition frequency, and during the acquisition process, judging whether the probability value of the relay being in a adhesion state is greater than a preset probability value based on the collected sampled voltage value; when the probability value of the relay being in a adhesion state is greater than the preset probability value, collecting the sampled voltage value corresponding to the relay within the target time range according to the first acquisition frequency to obtain a set of sampled voltage values.

[0011] Furthermore, the relay adhesion detection method also includes: detecting whether the sampled voltage values ​​collected during the acquisition process are not continuously within the preset voltage range within a first time length, and detecting whether the sampled voltage values ​​collected during the acquisition process are continuously within the preset voltage range within a second time length; if it is detected that the collected sampled voltage values ​​are not continuously within the preset voltage range within the first time length, determining that the probability value is less than or equal to the preset probability value; if it is detected that the collected sampled voltage values ​​are continuously within the preset voltage range within the second time length, determining that the probability value is greater than the preset probability value.

[0012] Furthermore, the relay adhesion detection method further includes: before collecting the sampled voltage value corresponding to the relay according to the second collection frequency, starting the first timer and the second timer. Detecting whether the collected sampled voltage value is not within the preset voltage range continuously for a first time length according to the first timer, wherein the value of the first timer is updated to the first initial value when the collected sampled voltage value is within the preset voltage range; detecting whether the collected sampled voltage value is within the preset voltage range continuously for a second time length according to the second timer, wherein the value of the second timer is updated to the second initial value when the collected sampled voltage value is not within the preset voltage range.

[0013] According to another aspect of an embodiment of the present invention, a relay adhesion detection device is also provided, including: an acquisition module, which is used to acquire a sampled voltage value corresponding to the relay within a target time range according to a first acquisition frequency when a power failure of the relay is detected, to obtain a set of sampled voltage values, wherein the relay is connected to a battery pack circuit, the sampled voltage value refers to the voltage value of the sampling point relative to the negative electrode of the battery pack, the sampling point is located in a voltage injection circuit, and the voltage injection circuit is used to inject a voltage signal at the load current input terminal of the relay; a statistical module, which is used to count the proportion of the first voltage value in the sampled voltage value set and the maximum voltage difference value in the sampled voltage value set, wherein the first voltage value refers to a voltage value within a preset voltage range; a detection module, which is used to detect whether the relay is in a adhesion state based on the proportion of the first voltage value and the maximum voltage difference value.

[0014] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned relay adhesion detection method when running.

[0015] According to another aspect of an embodiment of the present invention, an electronic device is also provided, the electronic device comprising one or more processors; a memory for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the above-mentioned relay adhesion detection method when running.

[0016] In an embodiment of the present invention, a method of detecting whether a relay is in a sticking state according to the voltage magnitude and pressure difference value of multiple sampled voltage values ​​corresponding to the relay is adopted. When the relay is detected to be powered off, the sampled voltage values ​​corresponding to the relay are collected within a target time range according to a first collection frequency to obtain a sampled voltage value set, and then the number ratio of the first voltage value in the sampled voltage value set and the maximum pressure difference value in the sampled voltage value set are counted, thereby detecting whether the relay is in a sticking state according to the number ratio of the first voltage value and the maximum pressure difference value. Wherein, the relay is connected to the battery pack circuit, the sampled voltage value refers to the voltage value of the sampling point relative to the negative electrode of the battery pack, the sampling point is located in the voltage injection circuit, the voltage injection circuit is used to inject a voltage signal at the load current input terminal of the relay, and the first voltage value refers to a voltage value within a preset voltage range.

[0017] In the above process, since the voltage size of the sampled voltage value corresponding to the relay can effectively feedback the working state of the relay, the sampled voltage value corresponding to the relay is collected to obtain a sampled voltage value set, and the proportion of the first voltage value within the preset voltage range in the sampled voltage value set and the maximum pressure difference value in the sampled voltage value set are counted, thereby realizing the effective acquisition of voltage data that can characterize the working state of the relay. Since the sampled voltage value may fluctuate due to the influence of the insulation of the electric device and other electrical components, the relative floating range of the sampled voltage value is determined by counting the maximum pressure difference value, thereby effectively overcoming the influence of voltage fluctuations, and then, when detecting whether the relay is in a sticking state based on the proportion of the first voltage value and the maximum pressure difference value, the accuracy of relay sticking detection can be effectively improved.

[0018] It can be seen that the solution provided in the present application achieves the purpose of detecting whether the relay is in a sticking state based on the voltage magnitude and pressure difference value of multiple sampled voltage values ​​corresponding to the relay, thereby achieving the technical effect of improving the accuracy of relay sticking detection, and further solving the technical problem of low accuracy of relay sticking detection in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0020] Figure 1 The following is a flow chart of an optional relay adhesion detection method according to an embodiment of the present invention. Figure 1 ;

[0021] Figure 2is a connection diagram of an optional battery pack circuit and a voltage injection circuit according to an embodiment of the present invention;

[0022] Figure 3 The following is a flow chart of an optional relay adhesion detection method according to an embodiment of the present invention. Figure 2 ;

[0023] Figure 4 is a schematic diagram of an optional relay adhesion detection device according to an embodiment of the present invention;

[0024] Figure 5 is a schematic diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, 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 clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards in the relevant regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0028] Example 1

[0029] According to an embodiment of the present invention, an embodiment of a method for detecting relay adhesion is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0030] Figure 1 The following is a flow chart of an optional relay adhesion detection method according to an embodiment of the present invention. Figure 1 ,like Figure 1 As shown, the method comprises the following steps:

[0031] Step S101, when it is detected that the relay is powered off, the sampling voltage value corresponding to the relay is collected within the target time range according to the first collection frequency to obtain a set of sampling voltage values, wherein the relay is connected in the battery pack loop, the sampling voltage value refers to the voltage value of the sampling point relative to the negative electrode of the battery pack, the sampling point is located in the voltage injection circuit, and the voltage injection circuit is used to inject a voltage signal at the load current input terminal of the relay.

[0032] Optionally, electronic devices, application systems, servers and other devices may be used as execution entities. In this embodiment, a BMS (Battery Management System) in a vehicle is used as an execution entity to execute the relay adhesion detection method.

[0033] In some embodiments, the battery management system may perform a sticking detection on the relay before the relay is powered on and / or after the relay is powered off, that is, when it is detected that the relay is powered off, the battery management system may perform a sticking detection on the relay.

[0034] In some embodiments, the battery management system may directly sample and obtain the above-mentioned set of sampled voltage values ​​after detecting that the relay is powered off.

[0035] In some embodiments, the battery management system may also wait for a certain period of time after detecting that the relay is powered off, and after a certain period of time, collect the sampled voltage value corresponding to the relay within the target time range according to the first collection frequency to obtain a set of sampled voltage values, so as to minimize the voltage fluctuations when the relay working state changes.

[0036] Optional, Figure 2 is a connection diagram of an optional battery pack circuit and a voltage injection circuit according to an embodiment of the present invention. Figure 2 The sampled voltage value corresponding to the relay is described. The relay to be tested for adhesion is Figure 2 The main negative relay in Figure 2As shown, the main negative relay is connected to the battery pack circuit (i.e., the high-voltage circuit). In the battery pack circuit, the positive electrode of the battery pack (i.e. Figure 2 Bat+ in the input terminal (i.e. Figure 2 The negative terminal of the battery pack (i.e. Figure 2 Bat-) and the output end of the load release current (i.e. Figure 2 The relay is connected to the battery pack circuit, and one end of the contact switch of the main negative relay (i.e., the negative output end of the battery) is connected to the negative electrode of the battery pack, and the other end of the contact switch (i.e., the load current input end) is connected to the output end of the load release current. Optionally, the relay is used to control the on and off of the battery pack circuit, that is, to control whether the battery pack supplies power to the load.

[0037] In some embodiments, the battery pack circuit can be applied to electric vehicles, and the loads connected to the battery pack include but are not limited to components required for use in vehicles such as motors. In other embodiments, the battery pack circuit can also be applied to other electric devices, and the loads connected to the battery pack include but are not limited to electric components used in the electric devices.

[0038] Furthermore, if Figure 2 As shown, in Figure 2 In the method, a voltage signal is injected into the load current input terminal of the relay through a voltage injection circuit, and a sampling point is determined from the voltage injection circuit, and the sampling reference ground is set to the negative electrode of the battery pack, so that the voltage value of the sampling point relative to the negative electrode of the battery pack is determined as the sampling voltage value corresponding to the relay.

[0039] In some embodiments, the voltage injection circuit includes a voltage injection power supply and at least one voltage-dividing resistor, the output end of the voltage injection power supply is connected to the load current input end of the relay through at least one voltage-dividing resistor, and the sampling point can be the injection current input end of one of the at least one voltage-dividing resistors, and the injection current input end refers to the end of the voltage-dividing resistor that receives the current of the voltage injection power supply. Optionally, the voltage injection circuit can also be understood as a low-voltage injection circuit in a low-voltage injection diagnostic method in relay adhesion detection, which, compared to the high-voltage diagnostic method in relay adhesion detection, avoids the use of a high-voltage sampling loop composed of devices such as an isolation optocoupler, an isolation amplifier, an isolation power supply, and a differential amplifier to perform adhesion detection on the relay, thereby effectively reducing the adhesion detection cost.

[0040] In some embodiments, the battery management system may collect sampled voltage values ​​corresponding to the relay within a target time range according to a first collection frequency to obtain a set of sampled voltage values.

[0041] Optionally, the target time range has a preset length of T1. ′The starting time point of the target time range may be the time point when the battery management system determines that the sampled voltage value set needs to be collected. For example, the starting time point of the target time range may be the time point when the relay is detected to be powered off, or the time point after a certain period of time after the relay is detected to be powered off, or the time point determined according to other rules. In some embodiments, the sampled voltage value set may be represented as U all ={U0,U1,···,U i}.

[0042] For example, the battery management system can obtain a set of sampled voltage values ​​by sampling in the following way:

[0043] (1) Initialize the third timer T1;

[0044] (2) Detect and store the sampled voltage value U of the relay according to the first acquisition frequency i ;

[0045] (3) Determine whether the third timer T1 is greater than T1 ′ , if T1≤T1 ′ , return to step (2); if T1>T1 ′ , then the sampled voltage value set is determined.

[0046] Step S102, counting the proportion of the first voltage value in the sampled voltage value set and the maximum voltage difference value in the sampled voltage value set, wherein the first voltage value refers to a voltage value within a preset voltage range.

[0047] In some embodiments, after obtaining the sampled voltage value set, the battery management system may determine, for each sampled voltage value in the sampled voltage value set, whether the sampled voltage value is within a preset voltage range, thereby achieving statistics on the number of first voltage values.

[0048] In some embodiments, the battery management system may also count the number of first voltage values ​​in the process of acquiring the sampled voltage value set. For example, the battery management system may adjust the above steps (1)-(3) to the following steps (1)-(6):

[0049] (1) Initialize the third timer T1;

[0050] (2) Detect and store the sampled voltage value U of the relay according to the first acquisition frequency i , the value of the second counter N0 is updated, wherein the initial value of the second counter is 0, and its value is increased by 1 each time it is updated;

[0051] (3) Determine U i Whether the voltage value falls within U m and Un Between, among which, U m is the minimum voltage value of the preset voltage range, U n is the maximum voltage value of the preset voltage range;

[0052] (4), if U i The voltage value falls on U m and U n If the value of the third counter N is updated, the process goes to step (6), wherein the initial value of the third counter is 0, and its value is increased by 1 each time it is updated;

[0053] (5), if U i Voltage value is not at U m and U n If , then go to step (6);

[0054] (6) Determine whether the third timer T1 is greater than T1 ′ , if T1≤T1 ′ , return to step (2); if T1>T1 ′ , then determine to obtain a set of sampled voltage values, and record the current value of the second counter N0 and the current value of the third counter N.

[0055] Optionally, the current value of the third counter N is the number of first voltage values.

[0056] In some embodiments, after determining the number of first voltage values, the battery management system may divide the current value of the second counter N0 by the current value of the third counter N to obtain a proportion α of the number of first voltage values ​​in the sampled voltage value set.

[0057] In some embodiments, the battery management system can filter out the maximum voltage value U from the sampled voltage value set. max =max{U all}, and filter out the minimum voltage value U from the sampled voltage value set min =min{U all}, thereby calculating the maximum voltage difference value in the sampled voltage value set according to the maximum voltage value and the minimum voltage value in the sampled voltage value set, and the calculation formula is as follows:

[0058] U diff =U max -U min =max{U all}-min{U all}

[0059] Among them, U diff Indicates the maximum voltage difference value in the sampled voltage value set.

[0060] Step S103: detecting whether the relay is in a sticking state according to the quantity ratio of the first voltage values ​​and the maximum voltage difference value.

[0061] Optionally, in this embodiment, when the contact switch of the relay is closed, the sampled voltage value is within the preset voltage range, and the sampled voltage value obtained by sampling is in a relatively stable state, that is, the maximum pressure difference value in the sampled voltage value set is relatively small; when the contact switch of the relay is disconnected, the sampled voltage value is outside the preset voltage range, and the sampled voltage value obtained by sampling is in a relatively unstable state, that is, the maximum pressure difference value in the sampled voltage value set is relatively large.

[0062] Therefore, the battery management system can detect whether the relay is in a sticking state based on the quantity ratio of the first voltage values ​​and the maximum voltage difference value.

[0063] In some embodiments, the battery management system can input the number percentage of the first voltage value and the maximum voltage difference value into a pre-trained first neural network model, and process the number percentage of the first voltage value and the maximum voltage difference value through the first neural network model to obtain a first processing result, wherein the first processing result is used to characterize whether the relay is in a sticking state. Optionally, the first neural network model can be trained based on a first training sample set, each training sample in the first training sample set includes the number percentage of the first voltage value in the sample sampling voltage value set and the maximum voltage difference value in the sample sampling voltage value set, the sample sampling voltage value set is obtained by collecting the sampling voltage value corresponding to the sample relay within the sample time range according to the first collection frequency when the sample relay is detected to be powered off, and the real label in the first training sample set characterizes whether the sample relay is in a sticking state.

[0064] In some embodiments, the battery management system may also determine whether the relay is in a sticking state based on the numerical relationship between the quantity ratio of the first voltage value and the preset pressure difference value, and the numerical relationship between the quantity ratio and the preset ratio. For example, when the maximum pressure difference value is greater than or equal to the preset pressure difference value, or the quantity ratio of the first voltage value is less than or equal to the preset ratio, it is directly determined that the relay is not in a sticking state; when the maximum pressure difference value is less than the preset pressure difference value, and the quantity ratio of the first voltage value is greater than the preset ratio, it is directly determined that the relay is in a sticking state.

[0065] For another example, when the maximum differential pressure value is greater than or equal to the preset differential pressure value, or the proportion of the number of first voltage values ​​is less than or equal to the preset ratio, it is determined that the relay is not in a sticking state. When the maximum differential pressure value is less than the preset differential pressure value, and the proportion of the number of first voltage values ​​is greater than the preset ratio, the relay is subjected to a supplementary test, and whether the relay is in a sticking state is determined based on the supplementary test result. Among them, the supplementary test may refer to calculating the average value of a set of sampled voltage values ​​using a median filter algorithm, and the supplementary test may also refer to re-collecting a new set of sampled voltage values, and judging whether the relay is in a sticking state based on the new set of sampled voltage values.

[0066] Based on the scheme defined by the above steps S101 to S103, it can be known that in an embodiment of the present invention, a method of detecting whether the relay is in a sticking state according to the voltage magnitude and pressure difference value of multiple sampled voltage values ​​corresponding to the relay is adopted. When the relay is detected to be powered off, the sampled voltage values ​​corresponding to the relay are collected within the target time range according to the first collection frequency to obtain a sampled voltage value set, and then the number ratio of the first voltage value in the sampled voltage value set and the maximum pressure difference value in the sampled voltage value set are counted, so as to detect whether the relay is in a sticking state according to the number ratio of the first voltage value and the maximum pressure difference value. Wherein, the relay is connected to the battery pack circuit, the sampled voltage value refers to the voltage value of the sampling point relative to the negative electrode of the battery pack, the sampling point is located in the voltage injection circuit, the voltage injection circuit is used to inject a voltage signal at the load current input terminal of the relay, and the first voltage value refers to a voltage value within a preset voltage range.

[0067] It is easy to notice that in the above process, since the voltage magnitude of the sampled voltage value corresponding to the relay can effectively feedback the working state of the relay, a set of sampled voltage values ​​is obtained by collecting the sampled voltage values ​​corresponding to the relay, and the proportion of the first voltage values ​​within the preset voltage range in the sampled voltage value set and the maximum pressure difference value in the sampled voltage value set are counted, thereby realizing effective acquisition of voltage data that can characterize the working state of the relay. Since the sampled voltage values ​​may fluctuate due to the influence of the insulation of the electric device and other electrical components, the relative floating range of the sampled voltage values ​​is determined by counting the maximum pressure difference value, thereby effectively overcoming the influence of voltage fluctuations, and further, when detecting whether the relay is in a sticking state based on the proportion of the first voltage values ​​and the maximum pressure difference value, the accuracy of relay sticking detection can be effectively improved.

[0068] It can be seen that the solution provided in the present application achieves the purpose of detecting whether the relay is in a sticking state based on the voltage magnitude and pressure difference value of multiple sampled voltage values ​​corresponding to the relay, thereby achieving the technical effect of improving the accuracy of relay sticking detection, and further solving the technical problem of low accuracy of relay sticking detection in the related technology.

[0069] In an optional embodiment, in the process of detecting whether the relay is in a sticking state based on the quantitative proportion of the first voltage value and the maximum pressure difference value, the battery management system can determine that the relay is not in a sticking state when the maximum pressure difference value is greater than or equal to the preset pressure difference value, or the quantitative proportion is less than or equal to the preset ratio. When the maximum pressure difference value is less than the preset pressure difference value and the quantitative proportion is greater than the preset ratio, a median filtering algorithm is used to process the sampled voltage value set to obtain a second voltage value, and then detect whether the relay is in a sticking state based on the second voltage value.

[0070] Optionally, when the maximum voltage difference value is less than a preset voltage difference value and the quantity ratio is greater than a preset ratio, the battery management system may use a median filtering algorithm to average the sampled voltage value set to obtain a second voltage value.

[0071] Afterwards, the battery management system can detect whether the relay is in a sticking state based on the second voltage value. In some embodiments, the battery management system can input the second voltage value into a pre-trained second neural network model, and process the second voltage value through the second neural network model to obtain a second processing result. The second processing result represents whether the relay is in a sticking state. The second neural network model can be obtained by training with a second training sample set, and each training sample in the second training sample set includes a sample second voltage value corresponding to the sample relay. The true label in the second training sample set represents whether the sample relay is in a sticking state, and the method for determining the sample second voltage value is the same as the method for determining the second voltage value, so it will not be repeated here.

[0072] In some embodiments, the battery management system may also determine whether the relay is in a sticking state based on the numerical relationship between the second voltage value and the preset voltage range. For example, if the second voltage value is not within the preset voltage range, it is determined that the relay is not in a sticking state, and if the second voltage value is within the preset voltage range, it is determined that the relay is in a sticking state.

[0073] For another example, when the second voltage value is not within the preset voltage range, it is determined that the relay is not in a sticking state; and when the second voltage value is within the preset voltage range, a new set of sampled voltage values ​​is re-collected, and whether the relay is in a sticking state is determined based on the new set of sampled voltage values.

[0074] It should be noted that since the sampled voltage value may fluctuate due to the influence of the insulation of the electric device and other electrical components, when the maximum pressure difference value is less than the preset pressure difference value and the quantity ratio is greater than the preset ratio, it is not directly determined that the relay is in a sticking state. Instead, a median filtering algorithm is used to process the sampled voltage value set to obtain a second voltage value, thereby eliminating unstable voltage values ​​in the sampled voltage value set. The obtained second voltage value can more accurately feedback the working state of the relay, thereby effectively improving the detection accuracy when detecting whether the relay is in a sticking state based on the second voltage value.

[0075] In an optional embodiment, in the process of detecting whether the relay is in a sticking state according to the second voltage value, the battery management system can determine that the relay is not in a sticking state when the second voltage value is not within the preset voltage range, and judge whether the value of the first counter is greater than the preset first value when the second voltage value is within the preset voltage range, and increase the value of the first counter by the preset value when the value of the first counter is less than or equal to the preset first value, and repeat the steps of collecting the sampled voltage value corresponding to the relay within the updated target time range according to the first collection frequency to obtain an updated set of sampled voltage values, until it is detected that the relay is not in a sticking state according to the updated set of sampled voltage values, or, until the value of the first counter is greater than the first value, it is determined that the relay is in a sticking state.

[0076] Optionally, when the second voltage value is within the preset voltage range, it is determined that the relay may be in a sticking state. In this case, the battery management system may determine whether the value of the first counter is greater than a preset first value. The initial value of the first counter is a first preset initial value, and the first preset initial value may be 0.

[0077] Optionally, the preset first numerical value is greater than the first preset initial value. When the value of the first counter is less than or equal to the preset first numerical value, the battery management system may increase the value of the first counter by the preset numerical value, and then repeat the step of collecting the sampled voltage values ​​corresponding to the relay within the updated target time range according to the first collection frequency, obtaining an updated sampled voltage value set, and detecting whether the relay is in a sticky state based on the proportion of the first voltage value in the updated sampled voltage value set and the maximum pressure difference value in the updated sampled voltage value set, until it is detected that the relay is not in a sticky state according to the updated sampled voltage value set, or, until the value of the first counter is greater than the first numerical value, it is determined that the relay is in a sticky state.

[0078] For example, the first preset initial value may be 0. When the value of the first counter N1 is less than or equal to 3 (i.e., the preset first value), the battery management system may add one to the value of the first counter, and then execute the above steps (1) to (6) to obtain an updated sampled voltage value set, and then detect whether the relay is in a sticky state based on the proportion of the first voltage value in the updated sampled voltage value set and the maximum differential pressure value in the updated sampled voltage value set, so that when the maximum differential pressure value in the updated sampled voltage value set is greater than or equal to the preset differential pressure value or the proportion of the number is less than or equal to the preset ratio, it is determined that the relay is not in a sticky state, or, when the maximum differential pressure value is less than the preset differential pressure value and the proportion of the number is greater than the preset ratio, the updated sampled voltage value set is processed using a median filtering algorithm to obtain an updated second voltage value. Afterwards, when the updated second voltage value is not within the preset voltage range, it is determined that the relay is not in a sticky state.

[0079] Optionally, if the updated second voltage value is within the preset voltage range, continue to determine whether the value of the first counter N1 is greater than 3, and when the value of the first counter N1 is less than or equal to 3, continue to add one to the value of the first counter, and then continue to determine the next updated sampled voltage value set, and repeat this process until it is detected that the relay is not in a sticky state based on the updated sampled voltage value set, or, until the value of the first counter is greater than the first value, it is determined that the relay is in a sticky state.

[0080] It should be noted that since the sampled voltage value may fluctuate due to the influence of the insulation of the electric device and other electrical components, when the second voltage value is within the preset voltage range, it is not directly determined that the relay is in a sticking state, but an updated set of sampled voltage values ​​is determined for supplementary detection, and then whether the relay is in a sticking state is determined based on the supplementary detection results, thereby further improving the accuracy of relay sticking detection.

[0081] In an optional embodiment, in the process of processing the sampled voltage value set using a median filtering algorithm to obtain a second voltage value, the battery management system can remove the maximum voltage value and the minimum voltage value in the sampled voltage value set to obtain a target sampled voltage value set, thereby averaging the voltage values ​​in the target sampled voltage value set to obtain a second voltage value.

[0082] For example, the battery management system can calculate the second voltage value by the following formula:

[0083]

[0084] Among them, U sumIt can be understood as the sum of the voltage values ​​in the target sampling voltage value set, U mean Indicates the second voltage value.

[0085] It should be noted that, through the above method, the median filtering algorithm is effectively used to process the sampled voltage value set, that is, the unstable voltage values ​​in the sampled voltage value set are effectively eliminated, and the average value of the target sampled voltage value set is used to represent the average value of the sampled voltage value set, thereby improving the accuracy of the average value calculation.

[0086] In an optional embodiment, in the process of collecting the sampled voltage values ​​corresponding to the relay within the target time range according to the first collection frequency to obtain a set of sampled voltage values, the battery management system can collect the sampled voltage values ​​corresponding to the relay according to the second collection frequency, and in the collection process, judge whether the probability value of the relay being in a sticking state is greater than a preset probability value based on the collected sampled voltage values, so that when the probability value of the relay being in a sticking state is greater than the preset probability value, the sampled voltage values ​​corresponding to the relay are collected within the target time range according to the first collection frequency to obtain a set of sampled voltage values.

[0087] Optionally, before acquiring a set of sampled voltage values, the battery management system may determine whether the probability value of the relay being in a sticking state is greater than a preset probability value, that is, determine whether the relay is suspected to be in a sticking state.

[0088] In some embodiments, the battery management system can wait for a target time T after detecting that the relay is powered off. int , at the target duration T int Then, the sampling voltage value corresponding to the relay is collected according to the second collection frequency, and during the collection process, it is determined whether the probability value of the relay being in the sticking state is greater than the preset probability value based on the collected sampling voltage value.

[0089] In some embodiments, the target processing system can determine whether the probability value of the relay being in the sticking state is greater than a preset probability value based on the frequency of the sampled voltage value not being within the preset voltage range within the first preset time range. For example, if the frequency of the sampled voltage value not being within the preset voltage range within the first preset time range is greater than the preset frequency, it is determined that the probability value is less than or equal to the preset probability value, and if the frequency of the sampled voltage value not being within the preset voltage range within the first preset time range is less than or equal to the preset frequency, it is determined that the probability value is greater than the preset probability value.

[0090] In some embodiments, the target processing system can determine whether the probability value of the relay being in the sticking state is greater than a preset probability value based on the number of sampled voltage values ​​that are not within the preset voltage range within the second preset time range. For example, if the number of sampled voltage values ​​that are not within the preset voltage range within the second preset time range is greater than a preset number, it is determined that the probability value is less than or equal to the preset probability value; if the number of sampled voltage values ​​that are not within the preset voltage range within the second preset time range is less than or equal to a preset number, it is determined that the probability value is greater than the preset probability value.

[0091] In some embodiments, the target processing system can determine whether the probability value of the relay being in the sticking state is greater than a preset probability value based on the continuous time during which the collected sampled voltage value is not within the preset voltage range. For example, if it is detected that the collected sampled voltage value is not within the preset voltage range for a first time length, it is determined that the probability value is less than or equal to the preset probability value, and if it is detected that the collected sampled voltage value is within the preset voltage range for a second time length, it is determined that the probability value is greater than the preset probability value.

[0092] Optionally, if the probability value of the relay being in a sticking state is greater than a preset probability value, a sampled voltage value set is collected to further detect whether the relay is in a sticking state according to the sampled voltage value set. If the probability value of the relay being in a sticking state is less than or equal to the preset probability value, it is determined that the relay is not in a sticking state.

[0093] In some embodiments, the first acquisition frequency and the second acquisition frequency may be the same or different. During the acquisition process, the battery management system may detect the duration of time that the sampled voltage value is continuously within the preset voltage range, and detect the duration of time that the sampled voltage value is continuously not within the preset voltage range, thereby determining whether the probability value of the relay being in a sticking state is greater than a preset probability value based on the duration of time that the sampled voltage value is continuously within the preset voltage range and the duration of time that the sampled voltage value is continuously not within the preset voltage range.

[0094] In some embodiments, the starting time point of the above-mentioned target time range is the time point when the probability value of determining that the relay is in the sticking state is greater than a preset probability value.

[0095] It should be noted that by collecting a set of sampled voltage values ​​when the sampled voltage value corresponding to the relay meets certain conditions, on the one hand, it is possible to more quickly determine whether the relay is in a sticking state, thereby improving the efficiency of detecting whether the relay is in a sticking state. On the other hand, it is possible to combine multiple means to detect whether the relay is in a sticking state, thereby improving the accuracy of relay detection.

[0096] In an optional embodiment, in the process of determining whether the probability value of the relay being in a sticking state is greater than a preset probability value based on the collected sampled voltage value, the battery management system can detect whether the sampled voltage value collected during the collection process is not continuously within the preset voltage range within a first time length, and detect whether the sampled voltage value collected during the collection process is continuously within the preset voltage range within a second time length. If it is detected that the collected sampled voltage value is not continuously within the preset voltage range within the first time length, it is determined that the probability value is less than or equal to the preset probability value. If it is detected that the collected sampled voltage value is continuously within the preset voltage range within the second time length, it is determined that the probability value is greater than the preset probability value.

[0097] For example, in the above-mentioned collection process, the battery management system can detect the duration that the collected sampled voltage value is continuously out of the preset voltage range through the timer, and detect the duration that the collected sampled voltage value is continuously within the preset voltage range through the timer.

[0098] Therefore, when it is detected that the time length during which the collected sampled voltage value is continuously out of the preset voltage range is greater than the first time length, it is determined that the sampled voltage value is continuously out of the preset voltage range for the first time length, and the probability value that the relay is in a sticky state is less than or equal to the preset probability value, and it is determined that the relay is not in a sticky state.

[0099] When it is detected that the collected sampled voltage value is continuously within the preset voltage range for a period longer than the second time length, it is determined that the collected sampled voltage value is continuously within the preset voltage range for the second time length, and the probability value is greater than the preset probability value.

[0100] It should be noted that, since when the contact switch of the relay is closed, the sampled voltage value is within the preset voltage range, and when the contact switch of the relay is disconnected, the sampled voltage value is outside the preset voltage range, therefore, by determining whether the probability value of the relay being in a sticking state is greater than the preset probability value based on the time length of the sampled voltage value being within the preset voltage range and the time length of the sampled voltage value being within the unpreset voltage range, on the one hand, the accuracy of determining whether the probability value is greater than the preset probability value is improved. On the other hand, compared with the detection of the sampled voltage value set, relatively complex calculations are avoided, thereby effectively improving the efficiency of determining that the relay is not in a sticking state.

[0101] In an optional embodiment, before collecting the sampled voltage value corresponding to the relay according to the second collection frequency, the battery management system may start the first timer and the second timer. In the process of detecting whether the sampled voltage value collected during the collection process is not within the preset voltage range for a continuous first time length, and detecting whether the sampled voltage value collected during the collection process is within the preset voltage range for a continuous second time length, the battery management system may detect whether the sampled voltage value collected is not within the preset voltage range for a continuous first time length according to the first timer, and detect whether the sampled voltage value collected is within the preset voltage range for a continuous second time length according to the second timer. Wherein, the value of the first timer is updated to the first initial value when the sampled voltage value collected is within the preset voltage range, and the value of the second timer is updated to the second initial value when the sampled voltage value collected is not within the preset voltage range.

[0102] Optionally, the battery management system can wait for a target time T after detecting that the relay is powered off. int , at the target duration T int Then, the first timer and the second timer are started, so as to detect the duration of time when the sampled voltage value is within the preset voltage range and the duration of time when the sampled voltage value is not within the preset voltage range by using the first timer and the second timer.

[0103] For example, in the process of using the first timer and the second timer to detect the duration of time that the sampled voltage value is within the preset voltage range and the duration of time that the sampled voltage value is not within the preset voltage range, the battery management system may perform the following steps:

[0104] (1) Start the first timer T and the second timer T0, wherein the initial values ​​of the first timer T and the second timer T0 are both 0;

[0105] (2) Collect the sampled voltage value U corresponding to the relay according to the second acquisition frequency bak ;

[0106] (3) Determine the sampling voltage value U bak Whether it falls in U m and U n Between, among which, U m is the minimum voltage value of the preset voltage range, U n is the maximum voltage value of the preset voltage range;

[0107] (4), if U bak Value is not in U m and U n If T≤T ′ , then return to step (2); if continuous T ′ Within time, Ubak Value is not in U m and U n It is judged that the relay has no adhesion, among which, T ′ is the first time length;

[0108] (5), if U bak Value falls in U m and U n If the first timer T value is reset, it is judged that T0≤T0 ′ , then return to step (2); determine T0>T0 ′ , then go to step (6), where T0 ′ is the second time length;

[0109] (6) Sampling to obtain a set of sampled voltage values.

[0110] It should be noted that by using the above method to detect the time duration that the sampled voltage value is within the preset voltage range and the time duration that it is not within the preset voltage range, the accuracy and convenience of detection are improved, thereby further improving the accuracy and efficiency of relay adhesion detection.

[0111] In an optional embodiment, Figure 3 The following is a flow chart of an optional relay adhesion detection method according to an embodiment of the present invention. Figure 2 ,like Figure 3 As shown, the battery management system can perform the following steps to implement relay sticking detection:

[0112] 1. Initialize the battery management system;

[0113] 2. Battery management system initialization T int After a certain time, the sampling voltage value U corresponding to the relay is collected according to the second collection frequency. bak , and determine the calculation formula of coefficient α, where coefficient α represents the proportion of the number of voltage values ​​falling within the preset voltage range in the total number of voltage counts during the real-time diagnosis process, initialize the values ​​of the first timer T, the second timer T0 and the third timer T1 to 0, and initialize the values ​​of the first counter N1, the second counter N0 and the third counter N to 0;

[0114] 3. Determine the sampling voltage value U bak Whether it falls in U m and U n Between, among which, U m is the minimum voltage value of the preset voltage range, U n is the maximum voltage value of the preset voltage range;

[0115] 4. If U bak Value is not in U mand U n If T≤T ′ , then return to step 3; if continuous T ′ Within time, U bak Value is not in U m and U n It is judged that the relay has no adhesion, among which, T ′ is the first time length;

[0116] 5. If U bak Value falls in U m and U n If the first timer T value is reset, it is judged that T0≤T0 ′ , then return to step 3; judge T0>T0 ′ , then go to step 6, where T0 ′ is the second time length;

[0117] 6. The third timer T1 is cleared, and the second counter N0 and the third counter N are set to 0;

[0118] 7. Detect and store the sampled voltage value U of the relay according to the first acquisition frequency i The value of the second counter N0 changes with U i Quantity update, wherein the initial value of the second counter is 0, and its value increases by 1 each time it is updated;

[0119] 8. Judge U i Whether the voltage value falls within U m and U n between;

[0120] 9. If U i The voltage value falls on U m and U n The value of the third counter N is updated, and the process goes to step 11, wherein the initial value of the third counter is 0, and its value is increased by 1 each time it is updated;

[0121] 10. If U i Voltage value is not at U m and U n If , go to step 11;

[0122] 11. Determine whether the third timer T1 is greater than T1 ′ , if T1≤T1 ′ , return to step 8; if T1>T1 ′ , it is determined that a set of sampled voltage values ​​is obtained, and the process goes to step 12, and the current value of the second counter N0 and the current value of the third counter N are recorded;

[0123] 12. Filter out the U in the 7 steps iThe maximum and minimum values ​​of the pressure difference between the maximum and minimum values ​​(i.e. the maximum pressure difference) are respectively obtained as U max and U min and U diff ; and calculate the ratio α between the third counter N and the second counter N0;

[0124] 13. If U diff ≥U ′ , or the ratio α≤α ′ , then it is judged that the relay has no adhesion; if U diff <U ′ , and α>α ′ The relay is suspected to be stuck, and the process goes to step 14, where U ′ Indicates the preset pressure difference value, α ′ Indicates a preset ratio;

[0125] 14. Eliminate U i The maximum value of U i The average value (i.e. the second voltage value) U mean ;

[0126] 15. Judge U i The average value U mean , if U mean Not in U m and U n If the relay is between , it is judged that the relay is not stuck; the relay sticking diagnosis ends;

[0127] 16. If U mean Falling on the sticky U m and U n The value of the first counter N1 is determined, if N1>3, it is determined that the relay is stuck; if N1<3, return to step 6 and repeat the above steps.

[0128] It can be seen that the solution provided in the present application achieves the purpose of detecting whether the relay is in a sticking state based on the voltage magnitude and pressure difference value of multiple sampled voltage values ​​corresponding to the relay, thereby achieving the technical effect of improving the accuracy of relay sticking detection, and further solving the technical problem of low accuracy of relay sticking detection in the related technology.

[0129] Example 2

[0130] According to an embodiment of the present invention, an embodiment of a device for detecting relay adhesion is provided, wherein: Figure 4 is a schematic diagram of an optional relay adhesion detection device according to an embodiment of the present invention, such as Figure 4 As shown, the device comprises:

[0131] The acquisition module 401 is used to acquire a sampled voltage value corresponding to the relay within a target time range according to a first acquisition frequency when a power failure of the relay is detected, and obtain a set of sampled voltage values, wherein the relay is connected to a battery pack circuit, the sampled voltage value refers to a voltage value of a sampling point relative to a negative electrode of the battery pack, and the sampling point is located in a voltage injection circuit, and the voltage injection circuit is used to inject a voltage signal into a load current input terminal of the relay;

[0132] A statistics module 402 is used to count the proportion of the first voltage value in the sampled voltage value set and the maximum voltage difference value in the sampled voltage value set, wherein the first voltage value refers to a voltage value within a preset voltage range;

[0133] The detection module 403 is used to detect whether the relay is in a sticking state according to the quantity ratio of the first voltage values ​​and the maximum voltage difference value.

[0134] It should be noted that the above-mentioned acquisition module 401, statistics module 402 and detection module 403 correspond to steps S101 to S103 in the above-mentioned embodiment, and the examples and application scenarios implemented by the three modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1.

[0135] Optionally, the detection module also includes: a first determination submodule, used to determine that the relay is not in a sticky state when the maximum pressure difference value is greater than or equal to a preset pressure difference value, or the quantity proportion is less than or equal to a preset ratio; a processing submodule, used to process the sampled voltage value set using a median filtering algorithm to obtain a second voltage value when the maximum pressure difference value is less than the preset pressure difference value and the quantity proportion is greater than a preset ratio; a detection submodule, used to detect whether the relay is in a sticky state based on the second voltage value.

[0136] Optionally, the detection submodule also includes: a first determination unit, used to determine that the relay is not in a sticking state when the second voltage value is not within a preset voltage range; a judgment unit, used to determine whether the value of the first counter is greater than a preset first value when the second voltage value is within the preset voltage range; a second determination unit, used to increase the value of the first counter by a preset value when the value of the first counter is less than or equal to the preset first value, and repeatedly execute the step of collecting the sampled voltage value corresponding to the relay within the updated target time range according to the first collection frequency to obtain an updated sampled voltage value set, until it is detected that the relay is not in a sticking state based on the updated sampled voltage value set, or, until the value of the first counter is greater than the first value, it is determined that the relay is in a sticking state.

[0137] Optionally, the processing submodule also includes: a processing unit, used to remove the maximum voltage value and the minimum voltage value in the sampled voltage value set to obtain a target sampled voltage value set; and a calculation unit, used to average the voltage values ​​in the target sampled voltage value set to obtain a second voltage value.

[0138] Optionally, the acquisition module also includes: a judgment submodule, which is used to collect the sampled voltage value corresponding to the relay according to the second acquisition frequency, and during the acquisition process, judge whether the probability value of the relay being in a sticking state is greater than a preset probability value based on the collected sampled voltage value; an acquisition submodule, which is used to collect the sampled voltage value corresponding to the relay within the target time range according to the first acquisition frequency when the probability value of the relay being in a sticking state is greater than the preset probability value, so as to obtain a set of sampled voltage values.

[0139] Optionally, the judgment submodule also includes: a detection unit, used to detect whether the sampled voltage value collected during the acquisition process is not within the preset voltage range continuously within the first time length, and detect whether the sampled voltage value collected during the acquisition process is within the preset voltage range continuously within the second time length; a third determination unit, used to determine that the probability value is less than or equal to the preset probability value if it is detected that the collected sampled voltage value is not within the preset voltage range continuously within the first time length; a fourth determination unit, used to determine that the probability value is greater than the preset probability value if it is detected that the collected sampled voltage value is within the preset voltage range continuously within the second time length.

[0140] Optionally, the relay adhesion detection device further includes: a starting module, which is used to start a first timer and a second timer. The detection unit also includes: a first detection subunit, which is used to detect whether the sampled voltage value collected is not within a preset voltage range for a first time length according to the first timer, wherein the value of the first timer is updated to a first initial value when the sampled voltage value collected is within the preset voltage range; a second detection subunit, which is used to detect whether the sampled voltage value collected is within a preset voltage range for a second time length according to the second timer, wherein the value of the second timer is updated to a second initial value when the sampled voltage value collected is not within the preset voltage range.

[0141] Example 3

[0142] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned relay adhesion detection method when running.

[0143] Example 4

[0144] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, wherein: Figure 5 is a schematic diagram of an optional electronic device according to an embodiment of the present invention, such as Figure 5 As shown, the electronic device includes one or more processors; a memory for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the above-mentioned relay adhesion detection method when running.

[0145] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0146] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0147] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0148] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0149] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

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

[0151] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for detecting relay adhesion, It is characterized in that include: In the case where a relay is detected to be powered off, a sampled voltage value corresponding to the relay is collected within a target time range according to a first collection frequency to obtain a set of sampled voltage values, wherein the relay is connected to a battery pack circuit, the sampled voltage value refers to a voltage value of a sampling point relative to a negative electrode of the battery pack, the sampling point is located in a voltage injection circuit, and the voltage injection circuit is used to inject a voltage signal into a load current input terminal of the relay; Counting the proportion of the first voltage value in the sampled voltage value set and the maximum voltage difference value in the sampled voltage value set, wherein the first voltage value refers to a voltage value within a preset voltage range; Whether the relay is in a sticking state is detected according to the quantity ratio of the first voltage values ​​and the maximum voltage difference value.

2. The method according to claim 1, It is characterized in that Detecting whether the relay is in a sticking state according to the quantity ratio of the first voltage values ​​and the maximum voltage difference value includes: When the maximum pressure difference value is greater than or equal to the preset pressure difference value, or the quantity proportion is less than or equal to the preset ratio, determining that the relay is not in the sticking state; When the maximum voltage difference value is less than the preset voltage difference value and the number ratio is greater than the preset ratio, a median filtering algorithm is used to process the sampled voltage value set to obtain a second voltage value; Whether the relay is in the sticking state is detected according to the second voltage value.

3. The method according to claim 2, It is characterized in that Detecting whether the relay is in the sticking state according to the second voltage value includes: When the second voltage value is not within the preset voltage range, determining that the relay is not in the sticking state; When the second voltage value is within the preset voltage range, determining whether the value of the first counter is greater than a preset first value; When the value of the first counter is less than or equal to a preset first numerical value, the value of the first counter is increased by the preset numerical value, and the step of collecting the sampled voltage values ​​corresponding to the relay within the updated target time range according to the first collection frequency to obtain an updated sampled voltage value set is repeated until it is detected that the relay is not in the sticking state according to the updated sampled voltage value set, or, when the value of the first counter is greater than the first numerical value, it is determined that the relay is in the sticking state.

4. The method according to claim 2, It is characterized in that The sampled voltage value set is processed using a median filtering algorithm to obtain a second voltage value, including: Removing the maximum voltage value and the minimum voltage value in the sampled voltage value set to obtain a target sampled voltage value set; An average calculation is performed on the voltage values ​​in the target sampled voltage value set to obtain the second voltage value.

5. The method according to claim 1, It is characterized in that The sampled voltage value corresponding to the relay is collected within a target time range according to the first collection frequency to obtain a sampled voltage value set, including: Collecting a sampled voltage value corresponding to the relay at a second collection frequency, and during the collection process, judging whether the probability value of the relay being in the sticking state is greater than a preset probability value based on the collected sampled voltage value; When the probability value that the relay is in the sticking state is greater than the preset probability value, the sampled voltage value corresponding to the relay is collected within the target time range according to the first collection frequency to obtain the sampled voltage value set.

6. The method according to claim 5, It is characterized in that Judging whether the probability value of the relay being in the sticking state is greater than a preset probability value according to the collected sampled voltage value includes: Detecting whether the sampled voltage values ​​collected during the collection process are not within the preset voltage range continuously for a first time length, and detecting whether the sampled voltage values ​​collected during the collection process are within the preset voltage range continuously for a second time length; If it is detected that the collected sampled voltage value is not within the preset voltage range continuously within the first time length, determining that the probability value is less than or equal to the preset probability value; If it is detected that the collected sampled voltage value is continuously within the preset voltage range within a second time length, it is determined that the probability value is greater than the preset probability value.

7. The method according to claim 6, It is characterized in that Before collecting the sampled voltage value corresponding to the relay according to the second collection frequency, the method further includes: starting a first timer and a second timer; Detecting whether the sampled voltage value collected during the collection process is not within the preset voltage range continuously for a first time length, and detecting whether the sampled voltage value collected during the collection process is within the preset voltage range continuously for a second time length, including: Detecting, according to the first timer, whether the collected sampled voltage value is not within the preset voltage range continuously for a first time length, wherein the value of the first timer is updated to a first initial value when the collected sampled voltage value is within the preset voltage range; The second timer is used to detect whether the collected sampled voltage value is continuously within the preset voltage range within a second time length, wherein the value of the second timer is updated to a second initial value when the collected sampled voltage value is not within the preset voltage range.

8. A relay adhesion detection device, It is characterized in that include: an acquisition module, configured to acquire a sampled voltage value corresponding to the relay within a target time range according to a first acquisition frequency when a power failure of the relay is detected, to obtain a set of sampled voltage values, wherein the relay is connected to a battery pack circuit, the sampled voltage value refers to a voltage value of a sampling point relative to a negative electrode of the battery pack, the sampling point is located in a voltage injection circuit, and the voltage injection circuit is configured to inject a voltage signal into a load current input terminal of the relay; A statistics module, used to count the proportion of the first voltage value in the sampled voltage value set and the maximum voltage difference value in the sampled voltage value set, wherein the first voltage value refers to a voltage value within a preset voltage range; A detection module is used to detect whether the relay is in a sticking state according to the quantity ratio of the first voltage values ​​and the maximum pressure difference value.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the relay adhesion detection method described in any one of claims 1 to 7 when running.

10. An electronic device, It is characterized in that The electronic device includes one or more processors; A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to run the programs, wherein the program is configured to execute the relay adhesion detection method described in any one of claims 1 to 7 when running.