Equipment electric leakage detection method and device, storage medium and electronic equipment

By acquiring and processing voltage signals and accurately calculating the effective value of leakage current, the problem of misjudgment of leakage detection in the existing technology is solved, and the accurate detection of equipment leakage phenomena is achieved, and the detection accuracy and reliability are improved.

CN119165402APending Publication Date: 2024-12-20GRG INTELLIGENT TECH SOLUTION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art is prone to misjudgment when detecting electrical leakage phenomena in electrical equipment, resulting in abnormal shutdown of the equipment and inability to accurately detect leakage phenomena, affecting the safety and reliability of the equipment.

Method used

By obtaining the reference leakage voltage and real-time leakage voltage of the target device, combining the total input AC voltage, determining the AC voltage cycle, using the median average filtering method to process the voltage signal, calculate the effective value of the leakage current, and then determining whether there is leakage in the equipment to achieve accurate Test.

Benefits of technology

It improves the accuracy of leakage detection, avoids false detection and missed detection, improves the reliability of equipment leakage detection, and ensures the safety and normal operation of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119165402A_ABST
    Figure CN119165402A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment electric leakage detection method and device, a storage medium and electronic equipment, and belongs to the technical field of power electronics, and the equipment electric leakage detection method comprises the steps: obtaining a reference electric leakage voltage of target equipment, and a plurality of real-time electric leakage voltages and a plurality of total input AC voltages collected in a plurality of target time periods; according to the total input AC voltage, determining the time of an AC voltage period from the time corresponding to the plurality of target time periods as a period time period; according to the real-time leakage voltage and the reference leakage voltage in the period, determining a leakage current effective value of the corresponding period; and determining the electric leakage detection result of the target equipment according to the leakage current effective value, thereby realizing accurate detection of the electric leakage phenomenon of the equipment, improving the detection accuracy of the electric leakage, avoiding false detection and missing detection, and being high in reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of power electronics technology, and in particular, relates to a method, device, storage medium and electronic equipment for detecting leakage of equipment. Background Art

[0002] During the use of electrical equipment, insulation damage or other reasons may cause current leakage, resulting in leakage, which may cause some hazards, such as electric shock accidents, fires, equipment damage, and increased maintenance costs. These hazards not only pose a threat to personnel safety, but may also lead to property losses and equipment scrapping. In order to reduce these risks, it is very necessary to take appropriate preventive measures and regular inspections.

[0003] At present, most of the detection methods are to determine whether the total current collected is too large or whether the leakage current collected reaches a certain threshold to detect whether the device has leakage. Once it is determined that leakage occurs, the leakage protection switch is turned off to protect the device. However, during the actual use of the device, the leakage current may change with the surrounding environment, especially on rainy days, which may lead to misjudgment of leakage and cause abnormal shutdown of the device. Therefore, a solution that can accurately detect leakage of the device is urgently needed. Summary of the invention

[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a device leakage detection method, device, storage medium and electronic device, which can accurately detect the device leakage phenomenon with high reliability.

[0005] In a first aspect, the present application provides a device leakage detection method, comprising:

[0006] Acquire a reference leakage voltage of a target device, and a plurality of real-time leakage voltages and a plurality of total input AC voltages collected in a plurality of target time periods;

[0007] According to the total input AC voltage, determine a time of an AC voltage cycle from the times corresponding to the multiple target time periods as a cycle time period;

[0008] Determining the effective value of the leakage current in the corresponding period according to the real-time leakage voltage and the reference leakage voltage in the period;

[0009] A leakage detection result of the target device is determined according to the effective value of the leakage current.

[0010] In some embodiments, determining a time of an AC voltage cycle from times corresponding to the multiple target time periods according to the total input AC voltage to obtain a cycle time period includes:

[0011] According to the median average filtering method, all the total input AC voltages collected in each target time period are processed to obtain a filtered AC voltage, and each target time period corresponds to one filtered AC voltage;

[0012] Comparing each of the filtered AC voltages with the external reference voltage in sequence in time, and setting a count value of a timer according to the comparison result;

[0013] According to the count value, the time of an AC voltage cycle is determined from the times corresponding to the multiple target time periods to obtain the cycle time period.

[0014] In some embodiments, determining the effective value of the leakage current in the corresponding cycle period according to the real-time leakage voltage and the reference leakage voltage in the cycle period includes:

[0015] According to the median average filtering method, the real-time leakage voltage of each target time period in the cycle time period is processed to obtain a plurality of filtered leakage voltages, each target time period in the cycle time period corresponds to one filtered leakage voltage;

[0016] determining a plurality of waveform voltages according to the plurality of filtered leakage voltages;

[0017] Determine a plurality of waveform currents according to the plurality of waveform voltages and the reference leakage voltage, each of the waveform voltages corresponding to one of the waveform currents;

[0018] The effective value of the leakage current in the corresponding cycle period is determined according to the multiple waveform currents.

[0019] In some embodiments, determining the leakage detection result of the target device according to the leakage current effective value includes:

[0020] Determine a leakage detection result of the target device according to a preset maximum leakage current value and the leakage current effective value of at least one of the cycle periods; or

[0021] The leakage detection result of the target device is determined according to the preset maximum instantaneous current change value, all recorded historical leakage current effective values ​​and the leakage current effective value of at least one of the cycle periods.

[0022] In some embodiments, determining the leakage detection result of the target device according to the preset maximum instantaneous current change value, all recorded historical leakage current effective values, and the leakage current effective value of at least one of the cycle periods includes:

[0023] Calculate the average value of all historical leakage current effective values ​​recorded, and use the difference between the leakage current effective value and the average value as the leakage current instantaneous change value, each leakage current effective value corresponds to one leakage current instantaneous change value;

[0024] The leakage detection result of the target device is determined according to the leakage current instantaneous change value and a preset maximum instantaneous current change value during at least the cycle period.

[0025] In some embodiments, the device leakage detection method further includes:

[0026] When the leakage detection result indicates that a leakage event occurs in the target device, a relay between the target device and a power source is disconnected to stop the power source from supplying power to the target device.

[0027] In some embodiments, the device leakage detection method further includes:

[0028] After disconnecting the relay between the target device and the power supply, updating the real-time switch state of the relay stored in the memory to a disconnected state;

[0029] When a non-power-off restart event occurs to the target device, obtaining the current real-time switch state of the relay stored in the memory, and controlling the opening and closing of the relay according to the current real-time switch state;

[0030] When a power-off restart event occurs in the target device, the default switch state of the relay stored in the memory is acquired, and the relay is controlled to be opened and closed according to the default switch state.

[0031] In a second aspect, the present application provides a device for detecting leakage of an equipment, comprising:

[0032] An acquisition module, used to acquire a reference leakage voltage of a target device, and a plurality of real-time leakage voltages and a plurality of total input AC voltages collected in a plurality of target time periods;

[0033] A cycle determination module, configured to determine, according to the total input AC voltage, a time at which an AC voltage cycle is located from the times corresponding to the multiple target time periods as a cycle period;

[0034] A current determination module, used to determine the effective value of the leakage current in the corresponding cycle period according to the real-time leakage voltage and the reference leakage voltage in the cycle period;

[0035] The leakage determination module is used to determine the leakage detection result of the target device according to the effective value of the leakage current.

[0036] In some embodiments, the period determination module is specifically used to:

[0037] According to the median average filtering method, all the total input AC voltages collected in each target time period are processed to obtain a filtered AC voltage, and each target time period corresponds to one filtered AC voltage;

[0038] Comparing each of the filtered AC voltages with the external reference voltage in sequence in time, and setting a count value of a timer according to the comparison result;

[0039] According to the count value, the time of an AC voltage cycle is determined from the times corresponding to the multiple target time periods to obtain the cycle time period.

[0040] In some embodiments, the current determination module is specifically used to:

[0041] According to the median average filtering method, the real-time leakage voltage of each target time period in the cycle time period is processed to obtain a plurality of filtered leakage voltages, each target time period in the cycle time period corresponds to one filtered leakage voltage;

[0042] determining a plurality of waveform voltages according to the plurality of filtered leakage voltages;

[0043] Determine a plurality of waveform currents according to the plurality of waveform voltages and the reference leakage voltage, each of the waveform voltages corresponding to one of the waveform currents;

[0044] The effective value of the leakage current in the corresponding cycle period is determined according to the multiple waveform currents.

[0045] In some embodiments, the root leakage determination module is specifically used to:

[0046] Determine a leakage detection result of the target device according to a preset maximum leakage current value and the leakage current effective value of at least one of the cycle periods; or

[0047] The leakage detection result of the target device is determined according to the preset maximum instantaneous current change value, all recorded historical leakage current effective values ​​and the leakage current effective value of at least one of the cycle periods.

[0048] In some embodiments, the root leakage determination module is specifically used to:

[0049] Calculate the average value of all historical leakage current effective values ​​recorded, and use the difference between the leakage current effective value and the average value as the leakage current instantaneous change value, each leakage current effective value corresponds to one leakage current instantaneous change value;

[0050] The leakage detection result of the target device is determined according to the leakage current instantaneous change value and the preset maximum instantaneous current change value in at least one of the cycle periods.

[0051] In some embodiments, the leakage determination module further includes a switch control module, which is used to:

[0052] When the leakage detection result indicates that a leakage event occurs in the target device, a relay between the target device and a power source is disconnected to stop the power source from supplying power to the target device.

[0053] In some embodiments, the switch control module is further configured to:

[0054] After disconnecting the relay between the target device and the power supply, updating the real-time switch state of the relay stored in the memory to a disconnected state;

[0055] When a non-power-off restart event occurs to the target device, obtaining the current real-time switch state of the relay stored in the memory, and controlling the opening and closing of the relay according to the current real-time switch state;

[0056] When a power-off restart event occurs in the target device, the default switch state of the relay stored in the memory is acquired, and the relay is controlled to be opened and closed according to the default switch state.

[0057] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the above-mentioned methods for detecting leakage of an apparatus.

[0058] In a fourth aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-described methods for detecting leakage of an apparatus when executing the program.

[0059] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned device leakage detection methods.

[0060] The device leakage detection method, apparatus, storage medium, electronic device and computer program product provided in the embodiments of the present application obtain a reference leakage voltage of the target device, as well as multiple real-time leakage voltages and multiple total input AC voltages collected within multiple target time periods; according to the total input AC voltage, determine the time of an AC voltage cycle from the times corresponding to the multiple target time periods as the cycle period; according to the real-time leakage voltage and the reference leakage voltage within the cycle period, determine the effective value of the leakage current of the corresponding cycle period; determine the leakage detection result of the target device according to the effective value of the leakage current, that is, determine the effective value of the leakage current based on the real-time leakage voltage within a cycle, and determine whether the device has leakage according to the effective value of the leakage current, thereby achieving accurate detection of device leakage, improving the accuracy of leakage detection, avoiding false detection and missed detection, and having high reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0062] Figure 1 It is a flow chart of a device leakage detection method provided in an embodiment of the present application;

[0063] Figure 2 is another flow chart of the device leakage detection method provided in an embodiment of the present application;

[0064] Figure 3 A schematic diagram of the structure of a device leakage detection device provided in an embodiment of the present application;

[0065] Figure 4 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0066] Figure 5 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0067] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.

[0068] Embodiments of the present application provide a method, apparatus, storage medium, electronic device, and computer program product for detecting leakage of an equipment.

[0069] See also Figure 1 , Figure 1 1 is a flow chart of a device leakage detection method provided in an embodiment of the present application. The device leakage detection method is applied to an electronic device, and can be executed by the electronic device or a functional module or functional entity in the electronic device. The device leakage detection method includes the following steps 101-104, wherein:

[0070] 101. Obtain a reference leakage voltage of a target device, and a plurality of real-time leakage voltages and a plurality of total input AC voltages collected in a plurality of target time periods;

[0071] 102. According to the total input AC voltage, determine a time of an AC voltage cycle from the times corresponding to the multiple target time periods as the cycle time period;

[0072] 103. Determine the effective value of the leakage current in the corresponding period according to the real-time leakage voltage and the reference leakage voltage in the period;

[0073] 104. Determine the leakage detection result of the target device according to the effective value of the leakage current.

[0074] The device leakage detection method provided in the embodiment of the present application obtains a reference leakage voltage of the target device, as well as multiple real-time leakage voltages and multiple total input AC voltages collected within multiple target time periods; according to the total input AC voltage, determines the time of an AC voltage cycle from the times corresponding to the multiple target time periods as the cycle period; according to the real-time leakage voltage and the reference leakage voltage within the cycle period, determines the effective value of the leakage current of the corresponding cycle period, that is, determines the effective value of the leakage current based on the real-time leakage voltage within a cycle, and determines whether the device has leakage according to the effective value of the leakage current, thereby achieving accurate detection of device leakage, improving the detection accuracy of leakage, avoiding false detection and missed detection, and having high reliability.

[0075] The above steps 101 - 104 will be further described in detail below.

[0076] 101. Obtain a reference leakage voltage of a target device, and a plurality of real-time leakage voltages and a plurality of total input AC voltages collected in a plurality of target time periods.

[0077] Among them, the total input AC voltage is mainly collected from the power supply end in the circuit, such as 220V AC voltage. The reference leakage voltage and real-time leakage voltage are collected from the same point between the target device and the power supply in the circuit. The reference leakage voltage is collected when the circuit is not connected to the load (that is, the load corresponding to the target device). It can be collected every time the target device is powered on. The real-time leakage voltage and total input AC voltage are collected based on the set sampling rate. The number of target time periods is set manually, such as 50, and the duration of the target time period is much shorter than the cycle duration of the AC power.

[0078] In some embodiments, the reference leakage voltage, the real-time leakage voltage and the total input AC voltage can be collected by an ADC (analog-to-digital converter), and before the collection, the ADC reading can be calibrated to ensure the accuracy of the collection result. Specifically, the AD value collected by the ADC is calibrated or verified by an internal reference AD ​​value, which is usually generated by a stable voltage source inside the ADC, and the voltage source is converted by the ADC to obtain a digital value, for example, the internal reference AD ​​value can be a reference AD ​​value of 1.2v.

[0079] 102. According to the total input AC voltage, determine a time period of an AC voltage cycle from times corresponding to a plurality of target time periods as a cycle period.

[0080] Among them, the total input AC voltage is a voltage that changes periodically with time, and its magnitude and direction change periodically with time. The waveform of the total input AC voltage is usually a sine wave, but it can also be other waveforms, such as square waves, triangle waves, etc. The AC voltage cycle T refers to the time required for the voltage to complete a complete change cycle. The AC voltage cycle T is an important parameter to describe its waveform change characteristics.

[0081] In some embodiments, see Figure 2 , Figure 2 1 is another flow chart of the device leakage detection method provided in the embodiment of the present application, wherein the above step 102 specifically includes:

[0082] 1021. According to the median average filtering method, all the total input AC voltages collected in each target time period are processed to obtain a filtered AC voltage, and each target time period corresponds to a filtered AC voltage;

[0083] 1022. Compare each filtered AC voltage with the external reference voltage in sequence in time order, and set a count value of a timer according to the comparison result;

[0084] 1023. According to the count value, determine a time of an AC voltage cycle from times corresponding to multiple target time periods to obtain a cycle time period.

[0085] Among them, filtering the voltage is an important part of signal processing, especially in scenarios where the stability and accuracy of the voltage signal need to be improved. The main purpose of filtering is to remove noise and interference in the voltage signal, so as to obtain a smoother and more reliable voltage value. The median average filtering method can not only effectively remove outliers (such as impulse noise), but also further smooth the signal through averaging processing. Its principle is to sort a set of data (usually data in a queue or sliding window), then remove the maximum and minimum values, and finally calculate the arithmetic mean of the remaining data. The external reference voltage is a voltage value used for calibration or reference, which can be set manually to increase the reference value of the AC voltage after the leakage current is converted. In theory, the reference voltage of the leakage current should be equal to the external reference voltage, but due to factors such as hardware and power supply, the reference voltage of the leakage current may not be equal to it. Therefore, each time the device is restarted, the external reference voltage needs to be calibrated to ensure the accuracy of the subsequent leakage current calculation.

[0086] For the total input AC voltage of a sine wave, the AC voltage period T is the time it takes for the voltage waveform to go from the positive peak through the zero point to the negative peak and then back to the positive peak. The reciprocal of the period T is called the frequency f, which is the number of times the voltage waveform changes per unit time. The length of the period T determines the frequency f of the total input AC voltage, which in turn affects the number of times the voltage waveform changes per unit time.

[0087] Specifically, the voltage comparator function of the ADC can be used to determine the AC voltage cycle T by setting its threshold and interrupt triggering conditions. The filtered AC voltage is connected to the ADC input pin, and the external reference voltage is connected to the reference end of the ADC voltage comparator to set the threshold for triggering the interrupt. The filtered AC voltage is monitored. If it is higher than the external reference voltage, a high voltage monitoring interrupt is generated, and the count value of a specific timer is updated. After the recording is completed, the timer count value is reset, and the filtered AC voltage lower than the external reference voltage is monitored instead. If it is lower than the external reference voltage, a low voltage monitoring interrupt is generated, and the count value of the timer is updated. After the recording is completed, the timer count value is reset, and then the filtered AC voltage higher than the external reference voltage is monitored again. If it is higher than the external reference voltage, a high voltage monitoring interrupt is generated, and the count value of the specific timer is updated, thereby completing a complete cycle of monitoring. The AC voltage cycle T is determined according to the count values ​​of the timers recorded three times.

[0088] 103. Determine the effective value of the leakage current in the corresponding cycle period according to the real-time leakage voltage and the reference leakage voltage in the cycle period.

[0089] In some embodiments, please see Figure 2 , the above step 103 specifically includes:

[0090] 1031. According to the median average filtering method, the real-time leakage voltage of each target time period within the cycle time period is processed to obtain multiple filtered leakage voltages, and each target time period corresponds to one filtered leakage voltage;

[0091] 1032. Determine a plurality of waveform voltages according to a plurality of filtered leakage voltages;

[0092] 1033. Determine a plurality of waveform currents according to the plurality of waveform voltages and the reference leakage voltage, wherein each waveform voltage corresponds to one of the waveform currents;

[0093] 1034. Determine the effective value of the leakage current in the corresponding cycle period according to the multiple waveform currents.

[0094] Among them, the real-time leakage voltage is first filtered, and then the voltage after filtering of the real-time leakage voltage in the high voltage monitoring interrupt within an AC voltage cycle T (i.e., the filtered leakage voltage) is obtained, and the waveform voltage is determined according to the waveform characteristics of these filtered leakage voltages. For example, these filtered leakage voltages are directly used as waveform voltages. At this time, the waveform voltage is the voltage of the upper half of the sine wave, or considering that high voltage is easy to distort, these filtered leakage voltages can be symmetrically converted to the voltage of the lower half of the sine wave, and the lower half of the waveform is used to symmetrically replace the upper half content, so as to obtain a relatively smooth and stable waveform voltage. Afterwards, the waveform voltage is converted into a waveform current, that is, the difference between each filtered leakage voltage and the reference leakage voltage is first calculated to obtain multiple voltage differences, and then each voltage difference is converted into a corresponding current difference to realize the conversion of voltage waveform to current waveform. Usually, the voltage value is in a positively correlated proportional relationship with its corresponding current value, which belongs to the scope of hardware design and is not limited here. Afterwards, the following formula is used to calculate the effective value of the leakage current,

[0095]

[0096] Wherein, Xrms is the effective value of the leakage current; N represents the total number of waveform currents within the AC voltage cycle T; and Xn represents the nth waveform current within the AC voltage cycle T.

[0097] 104. Determine a leakage detection result of the target device according to the effective value of the leakage current.

[0098] In some embodiments, please see Figure 2 , the above step 104 specifically includes:

[0099] Determine a leakage detection result of the target device according to a preset maximum leakage current value and an effective value of the leakage current in at least one cycle period; or

[0100] Determine the leakage detection result of the target device according to the preset maximum instantaneous current change value, all recorded historical leakage current effective values, and the leakage current effective value in at least one cycle period.

[0101] Among them, there are two ways to detect whether the device has a leakage. One is to judge whether there is a leakage based on whether the instantaneous leakage current effective value meets the conditions, and the other is to judge whether there is a leakage based on whether the change amount of the leakage current effective value meets the conditions. When using the first detection method, the leakage current effective value of 1 or more AC cycles can be used to judge. Specifically, it can be as follows:

[0102] 1) Imax < I and Imax + 30 mA > I;

[0103] Among them, I is the leakage current effective value of a single AC cycle T, and Imax is the preset maximum leakage current value set by humans. When I is between Imax and Imax + 30 mA, I is not large enough. To avoid misjudgment caused by the influence of bad weather such as rain on the leakage current, it is necessary to calculate the leakage current effective value I of 7 AC cycles, and all these Is must meet condition 1) to determine that a leakage event has occurred in the target device.

[0104] 2) Imax < I and Imax + 70 mA > I;

[0105] When I is between Imax and Imax + 70 mA, it is necessary to calculate the leakage current effective value I of 3 AC cycles, and all these Is must meet condition 2) to determine that a leakage event has occurred in the target device.

[0106] 3) Imax < I and Imax + 100 mA > I;

[0107] When I is between Imax and Imax + 100 mA, I is relatively large. It is only necessary to detect that the leakage current effective value I of 1 AC cycle meets condition 3) to determine that a leakage event has occurred in the target device.

[0108] When using the second detection method, the above step "Determine the leakage detection result of the target device according to the preset maximum instantaneous current change value, all recorded historical leakage current effective values, and the leakage current effective value in at least one cycle period" includes:

[0109] Calculate the average value of all recorded historical leakage current effective values, and use the difference between the leakage current effective value and this average value as the instantaneous change value of the leakage current. Each leakage current effective value corresponds to an instantaneous change value of the leakage current;

[0110] Determine the leakage detection result of the target device according to the instantaneous change value of the leakage current in at least one cycle period and the preset maximum instantaneous current change value.

[0111] Among them, the change value of the effective value of the leakage current in one or more AC cycles can be used for judgment, as follows:

[0112] 4) ΔImax<ΔI and ΔImax+30ma>ΔI;

[0113] Among them, ΔI is the instantaneous change value of the leakage current corresponding to a single AC cycle T, and ΔImax is the preset maximum instantaneous current change value set manually. When ΔI is between Imax and Imax+30ma, ΔI is not large enough. In order to avoid misjudgment caused by the influence of bad weather such as rainy days on the leakage current, it is necessary to detect the instantaneous change value ΔI of the leakage current of the historical 7 AC cycles, and these ΔI must all meet condition 4) to determine that the target device has a leakage event.

[0114] 5) ΔImax<ΔI and ΔImax+70ma>ΔI;

[0115] When ΔI is between Imax and Imax+70ma, it is necessary to detect the instantaneous change value ΔI of the leakage current in the past three AC cycles, and these ΔI must all meet condition 5) to determine that a leakage event has occurred in the target device.

[0116] 6) ΔImax<ΔI and ΔImax+100ma>ΔI;

[0117] When ΔI is between Imax and Imax+70ma, ΔI is relatively large. It is only necessary to detect the instantaneous change value ΔI of the leakage current in one historical AC cycle to meet condition 6) to determine that a leakage event has occurred in the target device.

[0118] In addition, the leakage detection method of the device also includes:

[0119] When the leakage detection result indicates that a leakage event occurs in the target device, the relay between the target device and the power supply is disconnected to stop the power supply from supplying power to the target device.

[0120] When a leakage event occurs, the relay between the target device and the power supply can be disconnected immediately, and an alarm can be notified to prevent the leakage event from endangering the user's life safety and preventing the device from causing more serious damage. The MCU can communicate with the IO expansion chip through i2c to control the relay state, so that even if the MCU runs away or is abnormal, it will not affect the main switch. At the same time, the relay uses a magnetic latching relay to ensure that the relay remains in the original connection state when the device is powered off, providing an extra layer of protection for the device.

[0121] In some embodiments, the device leakage detection method further includes:

[0122] After disconnecting the relay between the target device and the power supply, updating the real-time switch state of the relay stored in the memory to a disconnected state;

[0123] When a non-power-off restart event occurs to the target device, the current real-time switch state of the relay stored in the memory is obtained, and the opening and closing of the relay is controlled according to the current real-time switch state;

[0124] When a power-off restart event occurs in the target device, the default switch state of the relay stored in the memory is obtained, and the relay is controlled to be opened and closed according to the default switch state.

[0125] Among them, the default switch state can only be modified through the device switch and network configuration, and the device uses this state when it is powered on by default. The real-time switch state describes the actual state of the current switch, which will change with the change of the actual state of the relay and will also be stored in the device memory in real time. When the device has non-power-off restart events including watchdog reset and software reset, the switch state of the relay will be initialized to the real-time switch state after the device is started, and when a power-off restart event of power-on reset occurs, the switch state of the relay will be initialized to the default switch state, thereby effectively preventing abnormal configuration problems of the switch caused by equipment operation problems and abnormal resets, and effectively improving the stability and reliability of switch control. Through this switch control method, when the power is turned off after a leakage event occurs, it only affects the real-time switch state of the relay. When the staff power off and restart the device, the relay will maintain the default switch state (that is, the closed relay), rather than the disconnected state after the leakage.

[0126] From the above, it can be seen that the device leakage detection method provided in the embodiment of the present application obtains the reference leakage voltage of the target device, as well as multiple real-time leakage voltages and multiple total input AC voltages collected in multiple target time periods; according to the total input AC voltage, determines the time of an AC voltage cycle from the times corresponding to the multiple target time periods as the cycle period; according to the real-time leakage voltage and the reference leakage voltage in the cycle period, determines the effective value of the leakage current of the corresponding cycle period, and determines whether the device has leakage according to the effective value of the leakage current, thereby realizing accurate detection of device leakage phenomenon, improving the detection accuracy of leakage, avoiding false detection and missed detection, and having high reliability.

[0127] According to the method described in the above embodiment, the present application embodiment also provides a device leakage detection device, which is used to perform the steps in the above device leakage detection method. Figure 3 , Figure 32 is a schematic diagram of the structure of a device leakage detection device 200 provided in an embodiment of the present application. The device leakage detection device 200 is applied to an electronic device, and the device leakage detection method can be executed by the electronic device or a functional module or functional entity in the electronic device.

[0128] Specifically, the device leakage detection apparatus 200 includes a voltage detection module 201, a cycle determination module 202, a current determination module 203 and a leakage determination module 204, wherein:

[0129] The voltage detection module 201 is used to obtain a reference leakage voltage of a target device, and a plurality of real-time leakage voltages and a plurality of total input AC voltages collected in a plurality of target time periods;

[0130] The cycle determination module 202 is used to determine, according to the total input AC voltage, a time of an AC voltage cycle from the times corresponding to the multiple target time periods as a cycle period;

[0131] The current determination module 203 is used to determine the effective value of the leakage current in the corresponding cycle period according to the real-time leakage voltage and the reference leakage voltage in the cycle period;

[0132] The leakage determination module 204 is used to determine the leakage detection result of the target device according to the effective value of the leakage current.

[0133] In some embodiments, the period determination module 202 is used to:

[0134] According to the median average filtering method, all the total input AC voltages collected in each target period are processed to obtain a filtered AC voltage, and each target period corresponds to a filtered AC voltage;

[0135] Compare each filtered AC voltage with the external reference voltage in sequence in time, and set the count value of the timer according to the comparison result;

[0136] According to the count value, the time of an AC voltage cycle is determined from the times corresponding to the multiple target time periods to obtain the cycle time period.

[0137] In some embodiments, the current determination module 203 is used to:

[0138] According to the median average filtering method, the real-time leakage voltage of each target period in the cycle period is processed to obtain multiple filtered leakage voltages, and each target period in the cycle period corresponds to a filtered leakage voltage;

[0139] determining a plurality of waveform voltages according to the plurality of filtered leakage voltages;

[0140] Determine a plurality of waveform currents according to a plurality of waveform voltages and the reference leakage voltage, each waveform voltage corresponding to a waveform current;

[0141] The effective value of the leakage current in the corresponding cycle period is determined according to the multiple waveform currents.

[0142] In some embodiments, the leakage determination module 204 is specifically used to:

[0143] Determine a leakage detection result of the target device according to a preset maximum leakage current value and at least one leakage current effective value of the cycle period; or

[0144] The leakage detection result of the target device is determined according to the preset maximum instantaneous current change value, all recorded historical leakage current effective values ​​and at least one leakage current effective value of the cycle period.

[0145] In some embodiments, the root leakage determination module 204 is specifically used to:

[0146] Calculate the average value of all historical leakage current effective values ​​that have been recorded, and use the difference between the leakage current effective value and the average value as the leakage current instantaneous change value, each leakage current effective value corresponds to one leakage current instantaneous change value;

[0147] The leakage detection result of the target device is determined according to the leakage current instantaneous change value and the preset maximum instantaneous current change value in at least one cycle period.

[0148] In some embodiments, the device leakage detection apparatus 200 further includes a switch control module for:

[0149] When the leakage detection result indicates that a leakage event occurs in the target device, the relay between the target device and the power supply is disconnected to stop the power supply from supplying power to the target device.

[0150] In some embodiments, the switch control module is further configured to:

[0151] After disconnecting the relay between the target device and the power supply, updating the real-time switch state of the relay stored in the memory to a disconnected state;

[0152] When a non-power-off restart event occurs to the target device, the current real-time switch state of the relay stored in the memory is obtained, and the opening and closing of the relay is controlled according to the current real-time switch state;

[0153] When a power-off restart event occurs in the target device, the default switch state of the relay stored in the memory is obtained, and the relay is controlled to be opened and closed according to the default switch state.

[0154] It should be noted that the specific details of each module unit in the above-mentioned equipment leakage detection device 200 have been described in detail in the embodiment of the above-mentioned equipment leakage detection method, and will not be repeated here.

[0155] As can be seen from the above, the equipment leakage detection device 200 provided in the embodiment of the present application obtains the reference leakage voltage of the target equipment, as well as multiple real-time leakage voltages and a total input AC voltage collected in multiple target time periods through the voltage detection module 201; the cycle determination module 202 determines the time of an AC voltage cycle from the times corresponding to the multiple target time periods according to the total input AC voltage, as the cycle period; the current determination module 203 determines the effective value of the leakage current of the corresponding cycle period according to the real-time leakage voltage and the reference leakage voltage in the cycle period, and the leakage determination module 204 determines the leakage detection result of the target equipment according to the effective value of the leakage current, thereby realizing accurate detection of equipment leakage phenomenon, improving the accuracy of leakage detection, avoiding false detection and missed detection, and having high reliability.

[0156] In some embodiments, the device leakage detection device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a server, which can be an independent physical server, or 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 communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The embodiments of the present application are not specifically limited.

[0157] In some embodiments, Figure 4 As shown, an embodiment of the present application also provides an electronic device 300, including a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301. When the program is executed by the processor 301, each process of the above-mentioned device leakage detection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0158] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0159] Figure 5 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0160] The electronic device 400 includes but is not limited to: a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, a display unit 406, a user input unit 407, an interface unit 408, a memory 409, a processor 410 and other components.

[0161] Those skilled in the art will appreciate that the electronic device 400 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 410 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0162] It should be understood that in the embodiment of the present application, the input unit 404 may include a graphics processor (Graphics Processing Unit, GPU) 4041 and a microphone 4042, and the graphics processor 4041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 407 includes a touch panel 4071 and at least one of other input devices 4072. The touch panel 4071 is also called a touch screen. The touch panel 4071 may include two parts: a touch detection device and a touch controller. Other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0163] The memory 409 can be used to store software programs and various data. The memory 409 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 409 may include a volatile memory or a non-volatile memory, or the memory 409 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 409 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0164] The processor 410 may include one or more processing units; the processor 410 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 410.

[0165] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned device leakage detection method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0166] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0167] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned device leakage detection method when executed by a processor.

[0168] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0169] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0170] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0171] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0172] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0173] In the description of the present application, “plurality” means two or more.

[0174] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0175] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.

Claims

1. A method for detecting leakage of equipment, characterized in that: include: Acquire a reference leakage voltage of a target device, and a plurality of real-time leakage voltages and a plurality of total input AC voltages collected in a plurality of target time periods; According to the total input AC voltage, determine a time of an AC voltage cycle from the times corresponding to the multiple target time periods as a cycle time period; Determining the effective value of the leakage current in the corresponding period according to the real-time leakage voltage and the reference leakage voltage in the period; A leakage detection result of the target device is determined according to the effective value of the leakage current.

2. The device leakage detection method according to claim 1, characterized in that: The step of determining, according to the total input AC voltage, a time period of an AC voltage cycle from the times corresponding to the multiple target time periods to obtain a cycle time period includes: According to the median average filtering method, all the total input AC voltages collected in each target time period are processed to obtain a filtered AC voltage, and each target time period corresponds to one filtered AC voltage; Comparing each of the filtered AC voltages with the external reference voltage in sequence in time, and setting a count value of a timer according to the comparison result; According to the count value, a time corresponding to an AC voltage cycle is determined from the times corresponding to the multiple target time periods to obtain a cycle time period.

3. The device leakage detection method according to claim 1, characterized in that: The step of determining the effective value of the leakage current in the corresponding period according to the real-time leakage voltage and the reference leakage voltage in the period comprises: According to the median average filtering method, the real-time leakage voltage of each target time period in the cycle time period is processed to obtain a plurality of filtered leakage voltages, each target time period in the cycle time period corresponds to one filtered leakage voltage; determining a plurality of waveform voltages according to the plurality of filtered leakage voltages; Determine a plurality of waveform currents according to the plurality of waveform voltages and the reference leakage voltage, each of the waveform voltages corresponding to one of the waveform currents; The effective value of the leakage current in the corresponding cycle period is determined according to the multiple waveform currents.

4. The device leakage detection method according to claim 1, characterized in that: The step of determining the leakage detection result of the target device according to the leakage current effective value includes: Determine a leakage detection result of the target device according to a preset maximum leakage current value and the leakage current effective value of at least one of the cycle periods; or The leakage detection result of the target device is determined according to the preset maximum instantaneous current change value, all recorded historical leakage current effective values ​​and the leakage current effective value of at least one of the cycle periods.

5. The device leakage detection method according to claim 4, characterized in that: Determining the leakage detection result of the target device according to the preset maximum instantaneous current change value, all recorded historical leakage current effective values, and the leakage current effective value of at least one cycle period includes: Calculate the average value of all historical leakage current effective values ​​recorded, and use the difference between the leakage current effective value and the average value as the leakage current instantaneous change value, each leakage current effective value corresponds to one leakage current instantaneous change value; The leakage detection result of the target device is determined according to the leakage current instantaneous change value and the preset maximum instantaneous current change value in at least one of the cycle periods.

6. The device leakage detection method according to any one of claims 1 to 5, characterized in that: The device leakage detection method also includes: When the leakage detection result indicates that a leakage event occurs in the target device, a relay between the target device and a power source is disconnected to stop the power source from supplying power to the target device.

7. The device leakage detection method according to claim 6, characterized in that: The device leakage detection method also includes: After disconnecting the relay between the target device and the power supply, updating the real-time switch state of the relay stored in the memory to a disconnected state; When a non-power-off restart event occurs to the target device, obtaining the current real-time switch state of the relay stored in the memory, and controlling the opening and closing of the relay according to the current real-time switch state; When a power-off restart event occurs in the target device, the default switch state of the relay stored in the memory is acquired, and the relay is controlled to be opened and closed according to the default switch state.

8. An equipment leakage detection device, characterized in that: include: Acquire a reference leakage voltage of a target device, and a plurality of real-time leakage voltages and a plurality of total input AC voltages collected in a plurality of target time periods; According to the total input AC voltage, determine a time of an AC voltage cycle from the times corresponding to the multiple target time periods as a cycle time period; Determining the effective value of the leakage current in the corresponding period according to the real-time leakage voltage and the reference leakage voltage in the period; A leakage detection result of the target device is determined according to the effective value of the leakage current.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the device leakage detection method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the device leakage detection method according to any one of claims 1 to 7 is implemented.