Electric shock fault identification method and device for wading power equipment
By combining lightweight gradient enhancement machine learning and Tianying algorithm fault recognition model, the problem of difficult to accurately distinguish between leakage and electric shock detection of water wading equipment in traditional methods is solved, achieving higher recognition accuracy and lower misjudgment Rate.
Patent Information
- Application Number
- CN202411200648.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-27
AI Technical Summary
Traditional water-bearing equipment leakage and electric shock detection methods are difficult to accurately distinguish different situations such as normal equipment leakage, fault leakage and human body electric shock, resulting in a high misjudgment rate.
A fault recognition model combined with lightweight gradient enhancement machine learning and the Skyhawk algorithm is adopted to identify fault types of water-bearing power equipment by collecting current signal data, and a multi-set of training data is used to build and iterate the training model to improve recognition accuracy.
It improves the accuracy of identification of electric shock failures of water-bearing power equipment, reduces the rate of misjudgment, and can more accurately distinguish different types of leakage situations.
Smart Images

Figure CN119202924A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric shock fault diagnosis, and in particular to a method and device for identifying electric shock faults of water-related electrical equipment. Background Art
[0002] The water-related equipment electric shock identification method is a diagnostic identification technology used to detect whether electric shock to human body occurs when electrical equipment is in water-related state. Due to the accelerated urbanization process in recent years, more and more electrical equipment has been installed in public places. Under severe weather conditions, such as waterlogging caused by heavy rain, these electrical equipment are prone to water leakage, causing the water to be electrified, and pedestrians passing by are prone to water-related electric shock risks.
[0003] However, the current traditional methods for detecting leakage and electric shock in water-related equipment have some limitations.
[0004] For example, traditional methods for detecting electric shock in water-related equipment usually include the following: 1) Simple current detection: relying solely on the current value output by the measuring device to determine whether electric shock has occurred. This method may not be able to distinguish between normal leakage and fault leakage or electric shock to the human body; 2) Resistance detection: measuring the resistance between the device and the ground. If the resistance value is lower than a certain threshold, it may be judged as electric shock, but this method may not be able to distinguish between different types of leakage; 3) Voltage detection: judging the electric shock by detecting the change in voltage around the device. However, a small change in voltage may not be enough to accurately reflect the electric shock status; 4) Single parameter detection: relying only on one parameter ( 5) Manual inspection: In some cases, manual inspections may be relied upon to regularly check whether electrical equipment has the risk of electric shock. This method is inefficient and prone to omissions. 6) Fixed threshold judgment: A fixed current or voltage threshold is used to determine whether an electric shock has occurred. However, this method cannot adapt to changes in equipment status under different environments and conditions. When these methods are used to detect leakage and electric shock in water-related electrical equipment, it is usually impossible to accurately distinguish between normal leakage, fault leakage, and electric shock to the human body, and the misjudgment rate is high.
[0005] The traditional methods for detecting leakage and electric shock of water-related equipment in the above-mentioned related technologies are difficult to accurately distinguish between normal leakage of equipment, fault leakage and electric shock to the human body, resulting in a high misjudgment rate. No effective solution has been proposed yet. Summary of the invention
[0006] The embodiments of the present invention provide a method and device for identifying electric shock faults of water-related electrical equipment, so as to at least solve the technical problem that the traditional methods for detecting leakage and electric shock of water-related equipment in the related art are difficult to accurately distinguish between different situations such as normal leakage of equipment, fault leakage and electric shock to the human body, resulting in a high misjudgment rate.
[0007] According to one aspect of an embodiment of the present invention, a method for identifying electric shock faults of water-related power equipment is provided, comprising: collecting current current signal data of the water-related power equipment, wherein the current signal data is used to identify the fault type of the water-related power equipment when an electric shock fault occurs; inputting the current signal data into a fault identification model, so as to use the fault identification model to identify the current signal data to obtain the electric shock fault type of the current signal data, wherein the fault identification model is trained using multiple groups of training data through a combination of lightweight gradient boosting machine learning and Sky Eagle algorithm, and each of the multiple groups of training data includes: sample current signal data, and a sample electric shock fault type corresponding to the sample current signal data; determining the electric shock fault type as the identification result of electric shock fault identification for the water-related power equipment.
[0008] Optionally, before inputting the current signal data into a fault identification model to use the fault identification model to identify the current signal data and obtain the electric shock fault type of the current signal data, the electric shock fault identification method of water-related power equipment also includes: obtaining multiple groups of labeled sample current signal data, wherein the labeled sample current signal data are sample current signal data with corresponding electric shock fault type labels; dividing the multiple groups of labeled sample current signal data to obtain labeled training current signal data sets and labeled test current signal data sets, wherein the labeled training current signal data sets include multiple groups of labeled training current signal data, the labeled test current signal data sets include multiple groups of labeled test current signal data, the labeled training current signal data sets are used to train the fault identification model, and the labeled test current signal data are used to train all the trained The fault identification model is tested; the lightweight gradient boosting machine learning is used to construct an initial fault identification model; the initial fault identification model is continuously iteratively trained using the labeled training current signal data set until the convergence condition is reached, and the current initial fault identification model is determined to be an intermediate fault identification model, wherein the convergence condition is at least one of the following: the number of iterations of iterative training of the initial fault identification model reaches a preset number of iterations, and the current initial fault identification model meets the accuracy requirement; the intermediate fault identification model is tested using the labeled test current signal data set to obtain a test result; when the test result indicates that the test electric shock fault type output by the intermediate fault identification model is the same as the first actual electric shock fault type corresponding to the label in the labeled test current signal data, the intermediate fault identification model is determined to be the fault identification model.
[0009] Optionally, using the lightweight gradient boosting machine learning to construct an initial fault identification model includes: using the lightweight gradient boosting machine learning to construct the initial fault identification model according to a first formula, wherein the first formula is: f r ∈Θ, r represents the number of decision trees, R represents the total number of decision trees, f r represents the rth decision tree, f R represents the initial fault recognition model approximated by the R decision trees, Θ represents the set of all the decision trees, and X represents the labeled training current signal data set.
[0010] Optionally, the initial fault identification model is continuously iteratively trained using the labeled training current signal data set until the convergence condition is reached, and the current initial fault identification model is determined to be an intermediate fault identification model, including: determining the parameter range of each model parameter in the model parameter group of the initial fault identification model, wherein the model parameters in the model parameter group include at least: decision tree depth, leaf nodes of each decision tree, learning rate, and sample sampling ratio; using the Sky Eagle algorithm to iteratively solve the initial fault identification model using the labeled training current signal data set until the convergence condition is reached, and determining that the candidate model parameter group currently solved is the optimal model parameter group, wherein each of the model parameters in the candidate model parameter group and the optimal model parameter group are within the corresponding parameter range; using the optimal model parameter group to replace the initial model parameter group in the initial fault identification model, and determining that the replaced initial fault identification model is the intermediate fault identification model.
[0011] Optionally, the Sky Eagle algorithm is used to iteratively solve the initial fault identification model using the labeled training current signal data set until the convergence condition is reached, and the candidate model parameter group currently solved is determined to be the optimal model parameter group, including: using the Sky Eagle algorithm to randomly generate a Sky Eagle population, wherein the Sky Eagle population includes multiple Sky Eagles, and the Sky Eagle position of each Sky Eagle represents a model parameter group; using cubic chaotic mapping to initialize the Sky Eagle population in the solution space, wherein the solution space is the combination range of all the model parameter groups; using the labeled training current signal data set to iteratively update the Sky Eagle position of each Sky Eagle in the Sky Eagle population until the convergence condition is reached, and determining that the model parameter group corresponding to each current Sky Eagle position is the candidate model parameter group; sorting the fitness values of each Sky Eagle in descending order to obtain a sorting result; determining that the Sky Eagle corresponding to the smallest fitness value is the optimal Sky Eagle according to the sorting result; determining that the candidate model parameter group corresponding to the Sky Eagle position of the optimal Sky Eagle is the optimal model parameter group.
[0012] Optionally, the eagle position of each eagle in the eagle population is iteratively updated using the labeled training current signal data set until the convergence condition is reached, and the model parameter group corresponding to each current eagle position is determined as the candidate model parameter group, including: a calculation step, using the labeled training current signal data set to calculate the fitness value of each eagle position according to a second formula, wherein the second formula is: i represents the number of the labeled training current signal data in the labeled training current signal data set, n represents the total number of the labeled training current signal data in the labeled training current signal data set, x represents the number of the labeled training current signal data in the labeled training current signal data set, i represents the labeled training current signal data of the i-th item, y i represents the second actual electric shock fault type corresponding to the i-th labeled training current signal data, It represents the predicted electric shock fault type output by the initial fault identification model according to the i-th labeled training current signal data, f represents the fitness value, and the fitness value is used to represent the error between the predicted electric shock fault type and the second actual electric shock fault type; an updating step, when the fitness value does not meet the accuracy requirement or the number of iterations does not reach the preset number of iterations, the position of each of the Eagles in the Eagle population is updated; the calculation step and the updating step are repeated until the fitness value meets the accuracy requirement or the number of iterations reaches the preset number of iterations, and the model parameter group corresponding to the Eagle position of each of the current Eagles is determined as the candidate model parameter group.
[0013] Optionally, the intermediate fault identification model is tested using the labeled test current signal data set to obtain a test result, including: obtaining the first actual electric shock fault type corresponding to each labeled test current signal data in the labeled test current signal data set; inputting the labeled test current signal data set into the intermediate fault identification model for processing to obtain the test electric shock fault type corresponding to each labeled test current signal data in the labeled test current signal data set; comparing the test electric shock fault type corresponding to each labeled test current signal data with the first actual electric shock fault type to obtain a comparison result; and determining the comparison result as the test result.
[0014] According to another aspect of an embodiment of the present invention, there is also provided an electric shock fault identification device for water-related power equipment, comprising: an acquisition unit, for acquiring current current signal data of the water-related power equipment, wherein the current signal data is used to identify the fault type when an electric shock fault occurs in the water-related power equipment; a first acquisition unit, for inputting the current signal data into a fault identification model, so as to identify the current signal data using the fault identification model to obtain the electric shock fault type of the current signal data, wherein the fault identification model is trained using multiple groups of training data through a combination of lightweight gradient boosting machine learning and the Sky Eagle algorithm, and each of the multiple groups of training data includes: sample current signal data, and a sample electric shock fault type corresponding to the sample current signal data; a first determination unit, for determining the electric shock fault type as the identification result of electric shock fault identification for the water-related power equipment.
[0015] Optionally, the electric shock fault identification device of water-related power equipment also includes: a second acquisition unit, which is used to obtain multiple groups of labeled sample current signal data before inputting the current signal data into a fault identification model to use the fault identification model to identify the current signal data and obtain the electric shock fault type of the current signal data, wherein the labeled sample current signal data is sample current signal data with corresponding electric shock fault type labels; a third acquisition unit, which is used to divide the multiple groups of labeled sample current signal data to obtain labeled training current signal data sets and labeled test current signal data sets, wherein the labeled training current signal data sets include multiple groups of labeled training current signal data, the labeled test current signal data sets include multiple groups of labeled test current signal data, the labeled training current signal data sets are used to train the fault identification model, and the labeled test current signal data are used to test the trained fault identification model. A test is performed; a construction unit is used to construct an initial fault identification model using the lightweight gradient boosting machine learning; a second determination unit is used to use the labeled training current signal data set to continuously iteratively train the initial fault identification model until a convergence condition is reached, and then determine that the current initial fault identification model is an intermediate fault identification model, wherein the convergence condition is at least one of the following: the number of iterations of iterative training of the initial fault identification model reaches a preset number of iterations, and the current initial fault identification model meets the accuracy requirement; a fourth acquisition unit is used to test the intermediate fault identification model using the labeled test current signal data set to obtain a test result; a third determination unit is used to determine that the intermediate fault identification model is the fault identification model when the test result indicates that the test electric shock fault type output by the intermediate fault identification model is the same as the first actual electric shock fault type corresponding to the label in the labeled test current signal data.
[0016] Optionally, the construction unit includes: a construction module, configured to use the lightweight gradient boosting machine learning to construct the initial fault identification model according to a first formula, wherein the first formula is: f r ∈Θ, r represents the number of decision trees, R represents the total number of decision trees, f r represents the rth decision tree, f R represents the initial fault recognition model approximated by the R decision trees, Θ represents the set of all the decision trees, and X represents the labeled training current signal data set.
[0017] Optionally, the second determination unit includes: a first determination module, used to determine the parameter range of each model parameter in the model parameter group of the initial fault identification model, wherein the model parameters in the model parameter group include at least: decision tree depth, leaf nodes of each decision tree, learning rate, and sample sampling ratio; a second determination module, used to adopt the Sky Eagle algorithm to iteratively solve the initial fault identification model using the labeled training current signal data set until the convergence condition is reached, and determine that the candidate model parameter group currently solved is the optimal model parameter group, wherein each of the model parameters in the candidate model parameter group and the optimal model parameter group are within the corresponding parameter range; a third determination module, used to replace the initial model parameter group in the initial fault identification model with the optimal model parameter group, and determine that the replaced initial fault identification model is the intermediate fault identification model.
[0018] Optionally, the second determination module includes: a generation submodule, which is used to randomly generate a population of eagles using the eagle algorithm, wherein the eagle population includes multiple eagles, and the eagle position of each eagle represents a model parameter group; an initialization submodule, which is used to initialize the eagle population in the solution space using cubic chaotic mapping, wherein the solution space is the combination range of all the model parameter groups; a first determination submodule, which is used to iteratively update the eagle position of each eagle in the eagle population using the labeled training current signal data set until the convergence condition is reached, and determine that the model parameter group corresponding to each current eagle position is the candidate model parameter group; an acquisition submodule, which is used to sort the fitness values of each eagle in descending order to obtain a sorting result; a second determination submodule, which is used to determine that the eagle corresponding to the smallest fitness value is the optimal eagle according to the sorting result; and a third determination submodule, which is used to determine that the candidate model parameter group corresponding to the eagle position of the optimal eagle is the optimal model parameter group.
[0019] Optionally, the first determination submodule includes: a calculation submodule, configured to calculate the fitness value of each of the Skyhawk positions according to a second formula using the labeled training current signal data set, wherein the second formula is: i represents the number of the labeled training current signal data in the labeled training current signal data set, n represents the total number of the labeled training current signal data in the labeled training current signal data set, x represents the number of the labeled training current signal data in the labeled training current signal data set, i represents the labeled training current signal data of the i-th item, y i represents the second actual electric shock fault type corresponding to the i-th labeled training current signal data, It represents the predicted electric shock fault type output by the initial fault identification model according to the i-th labeled training current signal data, f represents the fitness value, and the fitness value is used to represent the error between the predicted electric shock fault type and the second actual electric shock fault type; an updating submodule is used to update the position of each of the eagles in the eagle population when the fitness value does not meet the accuracy requirement or the number of iterations does not reach the preset number of iterations; an execution submodule is used to repeatedly execute the calculation step and the updating step until the fitness value meets the accuracy requirement or the number of iterations reaches the preset number of iterations, and determine that the model parameter group corresponding to the eagle position of each current eagle is the candidate model parameter group.
[0020] Optionally, the fourth acquisition unit includes: a first acquisition module, used to acquire the first actual electric shock fault type corresponding to each labeled test current signal data in the labeled test current signal data set; a second acquisition module, used to input the labeled test current signal data set into the intermediate fault identification model for processing, and obtain the test electric shock fault type corresponding to each labeled test current signal data in the labeled test current signal data set; a third acquisition module, used to compare the test electric shock fault type corresponding to each labeled test current signal data with the first actual electric shock fault type to obtain a comparison result; a fourth determination module, used to determine that the comparison result is the test result.
[0021] According to another aspect of an embodiment of the present invention, a system for identifying electric shock faults of water-related electrical equipment is further provided. The system for identifying electric shock faults of water-related electrical equipment uses any one of the above-mentioned methods for identifying electric shock faults of water-related electrical equipment.
[0022] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored program, wherein the program executes any one of the above-mentioned methods for identifying electric shock faults of water-related electrical equipment.
[0023] According to another aspect of an embodiment of the present invention, a processor is further provided, wherein the processor is used to run a program, wherein when the program is run, any one of the above-mentioned methods for identifying electric shock faults of water-related electrical equipment is executed.
[0024] According to another aspect of an embodiment of the present invention, there is also provided a computer program product, comprising computer instructions, which, when executed by a processor, execute any one of the above-mentioned methods for identifying electric shock faults of water-related electrical equipment.
[0025] In an embodiment of the present invention, current current signal data of water-related power equipment is collected, wherein the current signal data is used to identify the fault type when an electric shock fault occurs in the water-related power equipment; the current signal data is input into a fault identification model, so as to use the fault identification model to identify the current signal data and obtain the electric shock fault type of the current signal data, wherein the fault identification model is trained using multiple sets of training data through a combination of lightweight gradient boosting machine learning and the Sky Eagle algorithm, wherein each of the multiple sets of training data includes: sample current signal data, and a sample electric shock fault type corresponding to the sample current signal data; determining the electric shock fault type is the identification result of electric shock fault identification for the water-related power equipment. Through the above technical scheme, the purpose of using the fault identification model obtained by training through the combination of lightweight gradient boosting machine learning and the Eagle algorithm to process the power signal data of water-related power equipment is achieved, so as to identify the electric shock faults occurring in water-related power equipment. The technical effect of using the IAO-LightGBM model to identify the type of electric shock faults occurring in water-related power equipment is achieved, and the accuracy of identification is improved, thereby solving the technical problem that the traditional water-related equipment leakage and electric shock detection methods in related technologies are difficult to accurately distinguish between different situations such as normal equipment leakage, fault leakage and electric shock to the human body, resulting in a high misjudgment rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] 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:
[0027] Figure 1 It is a hardware structure block diagram of a mobile terminal of a method for identifying electric shock faults of water-related power equipment according to an embodiment of the present invention;
[0028] Figure 2 is a flow chart of a method for identifying electric shock faults of water-related electrical equipment according to an embodiment of the present invention;
[0029] Figure 3 is a flowchart of a training fault identification model according to an embodiment of the present invention;
[0030] Figure 4 is a flowchart of an optional training fault identification model according to an embodiment of the present invention;
[0031] Figure 5 is a schematic diagram of comparison between the SVM recognition result and the true value according to an embodiment of the present invention;
[0032] Figure 6 is a schematic diagram of comparison between the XGBoost recognition result and the true value according to an embodiment of the present invention;
[0033] Figure 7 It is a schematic diagram of comparison between the LightGBM recognition result and the true value according to an embodiment of the present invention;
[0034] Figure 8 is a schematic diagram of comparison between the IAO-LightGBM recognition result and the true value according to an embodiment of the present invention;
[0035] Fig. 9 is a schematic diagram of an electric shock fault identification device for water-related electrical equipment according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] 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.
[0037] 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.
[0038] As introduced in the background technology, the conventional detection methods of leakage and electric shock of water-related equipment in the related technology are difficult to accurately distinguish between normal leakage of equipment, fault leakage and electric shock of human body, resulting in a high misjudgment rate. In view of the above defects, an electric shock fault identification method and device for water-related power equipment are provided in the embodiments of the present invention.
[0039] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0040] The method embodiments provided in the embodiments of the present invention can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 11 is a hardware structure block diagram of a mobile terminal for a method for identifying electric shock faults of water-related power equipment according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0041] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the electric shock fault identification method of the water-related power equipment in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0042] According to an embodiment of the present invention, a method embodiment of a method for identifying electric shock faults of water-related electrical equipment 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 the 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.
[0043] Figure 2 is a flow chart of a method for identifying electric shock faults of water-related electrical equipment according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0044] Step s202, collecting current signal data of the water-related power equipment, wherein the current signal data is used to identify the fault type when an electric shock fault occurs in the water-related power equipment.
[0045] In this embodiment, the current signal data of the water-related power equipment can be collected in real time, so as to use the trained fault recognition to accurately identify the possible leakage, electric shock faults, etc. of the water-related power equipment based on the collected data, so as to propose targeted solutions.
[0046] Step S204, input the current signal data into the fault identification model to use the fault identification model to identify the current signal data and obtain the electric shock fault type of the current signal data, wherein the fault identification model is trained using multiple sets of training data through a combination of lightweight gradient boosting machine learning and the Sky Eagle algorithm, and each of the multiple sets of training data includes: sample current signal data, and a sample electric shock fault type corresponding to the sample current signal data.
[0047] In this embodiment, the fault identification model (IAO-LightGBM model) can be trained by combining lightweight gradient boosting machine learning (Light Gradient Boosting Machine, LightGBM) with the Improved Algorithm based on Eagle Optimization (IAO). The model trained in this way has higher accuracy in identifying electric shock faults of water-related power equipment than some existing identification models. The verification of accuracy is elaborated in detail below and will not be repeated here.
[0048] Step S206, determining the electric shock fault type is the identification result of electric shock fault identification for water-related electrical equipment.
[0049] In this embodiment, after the collected current signal data of the water-related power equipment is identified by using the IAO-LightGBM model, the identified electric shock fault type is the identification result of the electric shock fault identification of the water-related power equipment.
[0050] Specifically, the types of electric shock faults that may occur in water-related power equipment usually include normal leakage, fault leakage and living body electric shock. The current signal data corresponding to these three types of electric shock faults have the following characteristics: 1) Normal leakage: The normal leakage that exists in water-related power equipment during normal operation has the characteristic of changing very slowly; 2) Fault leakage: When the power equipment is wading through water, the water-related power equipment may generate a fault leakage current that flows from the power circuit through the water body into the earth. At this time, the resistive component and capacitive component of the leakage current in the line will mutate; 3) Living body electric shock: When living body electric shock occurs in water-related power equipment, the leakage current will mutate due to the increase of living body impedance between the leakage point of the equipment and the ground; The trained IAO-LightGBM model can be used to more accurately identify the characteristics of the collected current signal data, so as to identify the fault types of electric shock faults that may currently exist in water-related power equipment, so as to facilitate the proposal of targeted solutions.
[0051] From the above, it can be seen that through the technical solution provided by the above embodiment of the present invention, the current signal data of the water-related power equipment can be collected, wherein the current signal data is used to identify the fault type when the water-related power equipment has an electric shock fault; the current signal data is input into the fault identification model to use the fault identification model to identify the current signal data to obtain the electric shock fault type of the current signal data, wherein the fault identification model is trained using multiple groups of training data by combining lightweight gradient boosting machine learning with the Eagle algorithm, and each of the multiple groups of training data includes: sample current signal data, and sample electric shock fault types corresponding to the sample current signal data; determining the electric shock fault type is the identification result of electric shock fault identification for the water-related power equipment, and achieving the purpose of using the fault identification model obtained by training by combining lightweight gradient boosting machine learning with the Eagle algorithm to process the power signal data of the water-related power equipment to identify the electric shock fault occurring in the water-related power equipment, and achieving the technical effect of using the IAO-LightGBM model to identify the type of electric shock fault occurring in the water-related power equipment, and improving the accuracy of identification.
[0052] Therefore, the technical solution provided by the above-mentioned embodiments of the present invention solves the technical problem that the traditional method of detecting leakage and electric shock of water-related equipment in the related technology is difficult to accurately distinguish different situations such as normal leakage of equipment, fault leakage and electric shock to the human body, resulting in a high misjudgment rate.
[0053] Combine the following Figure 3 and Figure 4 The training process of the fault identification model (IAO-LightGBM model) in the above embodiment of the present invention is described in detail. Figure 3 is a flowchart of a training fault identification model according to an embodiment of the present invention, Figure 4is a flowchart of an optional training fault identification model according to an embodiment of the present invention.
[0054] According to the above-mentioned embodiment of the present invention, before inputting the current signal data into the fault identification model to identify the current signal data using the fault identification model to obtain the electric shock fault type of the current signal data, the electric shock fault identification method of the water-related power equipment also includes: obtaining multiple groups of labeled sample current signal data, wherein the labeled sample current signal data are sample current signal data with corresponding electric shock fault type labels; dividing the multiple groups of labeled sample current signal data to obtain labeled training current signal data sets and labeled test current signal data sets, wherein the labeled training current signal data sets include multiple groups of labeled training current signal data, the labeled test current signal data sets include multiple groups of labeled test current signal data, the labeled training current signal data are used to train the fault identification model, and the labeled test current signal data are used to The method is to test the trained fault identification model; use lightweight gradient boosting machine learning to build an initial fault identification model; use a labeled training current signal data set to iteratively train the initial fault identification model until the convergence condition is reached, and determine that the current initial fault identification model is an intermediate fault identification model, wherein the convergence condition is at least one of the following: the number of iterations of iterative training of the initial fault identification model reaches a preset number of iterations, and the current initial fault identification model meets the accuracy requirements; use a labeled test current signal data set to test the intermediate fault identification model to obtain a test result; when the test result indicates that the test electric shock fault type output by the intermediate fault identification model is the same as the first actual electric shock fault type corresponding to the label in the labeled test current signal data, determine that the intermediate fault identification model is a fault identification model.
[0055] As above Figure 3 As shown, multiple groups of labeled sample current signal data can be collected, and these multiple groups of labeled sample current signal data include data of the above three contact types to ensure the universality of training data and the accuracy of the IAO-LightGBM model when training the IAO-LightGBM model; here each group of labeled sample current signal data includes sample current signal data and a label of the electric shock fault type corresponding to the sample current signal data.
[0056] In addition, during the specific training process, the collected multiple groups of labeled sample current signal data can be divided into two parts, one part is used as training data to train the IAO-LightGBM model, and the other part is used as test data to test the preliminarily trained IAO-LightGBM model to ensure the accuracy of the IAO-LightGBM model.
[0057] According to the above embodiment of the present invention, the initial fault identification model is constructed by using lightweight gradient boosting machine learning, including: constructing the initial fault identification model according to the first formula by using lightweight gradient boosting machine learning, wherein the first formula is: f r ∈Θ, r represents the number of decision trees, R represents the total number of decision trees, f r represents the rth decision tree, f R represents the initial fault recognition model approximated by R decision trees, Θ represents the set of all decision trees, and X represents the labeled training current signal dataset.
[0058] Specifically, as above Figure 3 And on Figure 4 As shown, we can first build a LightGBM model (i.e., the initial fault identification model), which is an integrated regression tree approximation model based on the gradient boosting decision tree. R , the expression is as follows: Where R means that the LightGBM model is approximated by R decision trees; f r represents the rth decision tree; Θ is the set space of all trees.
[0059] In a specific embodiment of the present invention, the initial fault identification model is continuously iteratively trained using a labeled training current signal data set until a convergence condition is reached, and the current initial fault identification model is determined to be an intermediate fault identification model, including: determining a parameter range of each model parameter in a model parameter group of the initial fault identification model, wherein the model parameters in the model parameter group include at least: decision tree depth, leaf nodes of each decision tree, learning rate, and sample sampling ratio; adopting the Sky Eagle algorithm to iteratively solve the initial fault identification model using a labeled training current signal data set until a convergence condition is reached, and determining that the candidate model parameter group currently solved is the optimal model parameter group, wherein each model parameter in the candidate model parameter group and the optimal model parameter group is within the corresponding parameter range; and replacing the initial model parameter group in the initial fault identification model with the optimal model parameter group, and determining that the replaced initial fault identification model is the intermediate fault identification model.
[0060] Specifically, as above Figure 3 And on Figure 4As shown in the figure, in the LightGBM model architecture, max-dept, num_leaves, learning_rate and subsample are four important parameters. The parameter max-depth represents the depth of the tree. Reasonable adjustment can avoid generating too deep a tree. num_leaves represents the number of leaf nodes on a tree. learning_rate represents the learning rate. If it is set too small, the gradient will descend very slowly. If it is set too large, it will cross the optimal value and produce oscillation. subsample is used to train weak learners. If the value is too small, overfitting may occur easily. The four main parameters of LightGBM (max_depth, num_leaves, learning_rate and subsample) have a very important impact on the accuracy of the model. In this embodiment, the Eagle algorithm (IAO) can be used to optimize the optimal values of the four parameters. That is, the Eagle algorithm can be used to iteratively solve the initial fault recognition model using a labeled training current signal data set to obtain a set of optimal solutions, that is, to find a set of optimal combinations of four parameters in the parameter optimization range shown in Table 1 below, and then use this set of optimal parameters as the parameters of the initial LightGBM model to obtain the final fault recognition model. Table 1 shows the four parameter optimization ranges in the LightGBM model.
[0061] Table 1
[0062] Parameter name Optimization range max_depth [3,10] num_leaves {1,2,…,4000} Learning_rate (0,1] subsample (0,1]
[0063] In the above embodiment of the present invention, the initial fault identification model is iteratively solved using a labeled training current signal data set using the Eagle algorithm until the convergence condition is reached, and the candidate model parameter group currently solved is determined to be the optimal model parameter group, including: randomly generating an Eagle population using the Eagle algorithm, wherein the Eagle population includes multiple Eagles, and the Eagle position of each Eagle represents a model parameter group; initializing the Eagle population in the solution space using a cubic chaotic map, wherein the solution space is the combination range of all model parameter groups; iteratively updating the Eagle position of each Eagle in the Eagle population using the labeled training current signal data set until the convergence condition is reached, and determining the model parameter group corresponding to each current Eagle position as the candidate model parameter group; sorting the fitness values of each Eagle in descending order to obtain a sorting result; determining the Eagle corresponding to the smallest fitness value as the optimal Eagle according to the sorting result; and determining the candidate model parameter group corresponding to the Eagle position of the optimal Eagle as the optimal model parameter group.
[0064] Specifically, as above Figure 4As shown in the figure, we can first create a swarm of N eagles, the maximum number of iterations T, the search upper bound (UB) and the search lower bound (LB), and randomly generate a population of eagles. The position of each eagle represents a set of values of the four main parameters of LightGBM, that is, the position u of the i-th eagle i Represents a set of values of the four main parameters of LightGBM, namely: i =[max_depth i num_leaves i learning_rate i subsample i ].
[0065] In order to enable the individual eagles to have a higher global search ability at the beginning of the algorithm, the positions of the eagle population need to be evenly distributed in the solution space of the entire problem. The cubic chaos map can be used to initialize the eagle population. The mathematical expression of the cubic chaos map is: s(n+1)=4s(n) 3 -3s(n)(2), where -1≤s(n)≤1, s(n)≠0, n=1,2,3,…,N-1; randomly generate a D-dimensional individual of [-1,1] in the search space; iterate the first generated individual according to formula (2) to generate the chaotic sequence of other individuals; after all the Sky Eagle individuals are iterated, they are mapped to the original search space according to formula (3); the formula is as follows: In the formula, H ubj , H lbj H is the upper and lower boundaries of each individual in the jth dimension, j = 1, 2, ..., D, D is the dimension of the problem; ij is the position of the i-th eagle individual in the j-th dimension.
[0066] Then, the labeled training current signal dataset can be used to iteratively update the position of each eagle in the eagle population. The fitness value of each eagle is calculated during the iteration process. When the convergence condition is reached, a set of model parameters corresponding to the current position of the eagle with the smallest fitness value is selected as the optimal set of model parameters. This optimal set of model parameters is used as the parameters of the initial LightGBM model to obtain a preliminary trained fault recognition model (i.e., the intermediate fault recognition model).
[0067] In the above embodiment of the present invention, the eagle position of each eagle in the eagle population is iteratively updated using a labeled training current signal data set until a convergence condition is reached, and the model parameter group corresponding to each current eagle position is determined as a candidate model parameter group, including: a calculation step, using the labeled training current signal data set to calculate the fitness value of each eagle position according to the second formula, wherein the second formula is: i represents the number of labeled training current signal data in the labeled training current signal dataset, n represents the total number of labeled training current signal data in the labeled training current signal dataset, and x represents the total number of labeled training current signal data in the labeled training current signal dataset. i represents the i-th labeled training current signal data, y i represents the second actual electric shock fault type corresponding to the i-th labeled training current signal data, It represents the predicted electric shock fault type output by the initial fault recognition model according to the i-th labeled training current signal data, f represents the fitness value, and the fitness value is used to represent the error between the predicted electric shock fault type and the second actual electric shock fault type; the updating step, when the fitness value does not meet the accuracy requirement or the number of iterations does not reach the preset number of iterations, the position of each eagle in the eagle population is updated; the calculation step and the updating step are repeated until the fitness value meets the accuracy requirement or the number of iterations reaches the preset number of iterations, and the model parameter group corresponding to the eagle position of each current eagle is determined as the candidate model parameter group.
[0068] Specifically, as above Figure 4 As shown, the fitness function f corresponding to the eagle position of each eagle is used to characterize the quality of the eagle position, that is, the LightGBM model training error under the training sample set in Step 1, and its calculation formula is as follows: Where n represents the total number of labeled training current signal data in the labeled training current signal dataset, and x i represents the i-th labeled training current signal data, y i represents the second actual electric shock fault type corresponding to the i-th labeled training current signal data, It represents the predicted electric shock fault type output by the initial fault recognition model according to the i-th labeled training current signal data. f represents the fitness value. The smaller the value of f, the smaller the prediction error, the higher the fit between the true value and the predicted value, and the better the model performance.
[0069] As above Figure 4 As shown, when updating the position of each eagle in the eagle population, it can be updated according to four different methods. Eagle hunting can be divided into four methods, among which method 1) and method 2) are the exploration stage, method 3) and method 4) are the utilization stage, and the exploration stage is from (t represents the number of iterations) and the specific process is as follows:
[0070] 1) Identify the prey area, select the best hunting area by bending vertically and flying high, and attack. This behavior can be specifically expressed as: In the formula, u i (t+1) is the next iterative solution of t; u best(t) is the optimal solution of the tth iteration; t and T are the current iteration number and the maximum iteration number respectively; u M (t) is calculated according to formula (6), which represents the average position of the population at the tth iteration; rand is a random value in [0, 1], In formula (5) As u best The coefficient of (t) represents the generation weight of the optimal solution under the current strategy. At this time, the linear reduction method will significantly reduce the local search ability, so the Sigmoid nonlinear convergence factor can be introduced into it, and the range of the target prey can be determined by adaptive weight. The improved formula is shown in formula (7):
[0071] 2) Discover the prey area from high altitude, hover above the prey area, and use the outline of a short glide attack. This behavior can be specifically expressed as: i (t+1)=u best (t)×Levy(D)+u R (t)+(bq)×rand (8), where Levy(D) represents the Levy flight distribution strategy, s is taken as a constant of 0.01, α is taken as a constant of 1.5, u and v represent random numbers between [0, 1], Γ is the gamma function; u R (t) is a random solution obtained in the range of [1, N] at the tth iteration; b and q are used to simulate the spiral shape, b = l×cos(θ), q = l×sin(θ), where l is the search step size, that is, the spiral radius, l = l1+U×D1, l1 ranges from 1 to 20, U is 0.00565, D1 is an integer matrix from 1 to the length of the search space, θ is the spiral angle, θ = -ω×D1+θ1, θ1 is the initial spiral angle, ω is taken as 0.005.
[0072] 3) Determine the prey area, prepare for landing and attack, and then use low-flying and slow-descent attack. This behavior can be specifically expressed as: i (t+1)=(u best (t)-u M (t))×a-rand+((UB-LB)×rand+LB)×δ (9), where a and δ represent adjustment coefficients and are constants of 0.1; the introduction of the golden sine algorithm (Golden-SA) in this step can not only improve the convergence speed, but also balance the global search capability and the local search capability, thus improving the accuracy of the solution. The position update formula (10) integrating the golden sine algorithm is as follows: u i (t+1)=u i(t)×a×|sin(r1)|+r2sin(r1)×|z1×ubes t (t)-z2×u i (t)|-rand+((UB-LB)×rand+LB)×δ (10), where r1 and r2 are random numbers, r1∈[0,2π], r2∈[0,π], z1 and z2 are coefficients generated by the golden section method, which narrow the search space and make the individual gradually approach the optimal value, ensuring the convergence of the algorithm, z1=k×(1-T)+m×T(11), z2=k×T+m×(1-τ) (12), in formula (11) and formula (12), τ is the golden section number, which is taken as An irrational number, k and m are the ranges of the golden section search method. In this patent, k = 2-2(2×t) / T, and the value of m is 1.
[0073] 4) When the eagle approaches its prey, it will walk on land and catch the prey according to the random movement pattern of the prey. This behavior can be specifically expressed as: i (t+1)=QF(t)×u best (t)-(G1×u i (t)×rand)-G2×Levy(D)+rand×G1(13), where QF(t) is the function of the balanced search strategy, that is, G1 represents the trajectory of the eagle when catching prey, that is, G1 = 2 × rand-1; G2 represents the slope between the first and last positions of the eagle during the catching period, that is u i (t) is the current solution at the tth iteration.
[0074] In another specific embodiment of the present invention, an intermediate fault identification model is tested using a labeled test current signal data set to obtain a test result, including: obtaining a first actual electric shock fault type corresponding to each labeled test current signal data in the labeled test current signal data set; inputting the labeled test current signal data set into the intermediate fault identification model for processing to obtain a test electric shock fault type corresponding to each labeled test current signal data in the labeled test current signal data set; comparing the test electric shock fault type corresponding to each labeled test current signal data with the first actual electric shock fault type to obtain a comparison result; and determining the comparison result as the test result.
[0075] As above Figure 3 And Figure 4As shown, the test data reserved in advance in the previous multiple groups of labeled sample current signal data can be input into the intermediate fault recognition model obtained through preliminary training to verify the accuracy of the intermediate fault recognition model. When the electric shock fault type recognition result output by the intermediate fault recognition model is the same as the actual electric shock fault type of the label carried by the test data, it can be considered that the intermediate fault recognition model obtained through preliminary training has passed the accuracy verification, and the intermediate fault recognition model currently obtained can be used as a fault recognition model in the actual process of identifying the electric shock fault type of water-related power equipment.
[0076] Combine the following Figure 5 , Figure 6 , Figure 7 and Figure 8 The IAO-LightGBM model trained in the above embodiment of the present invention has higher accuracy. Figure 5 is a schematic diagram of comparison between the SVM recognition result and the true value according to an embodiment of the present invention, Figure 6 is a schematic diagram of the comparison between the XGBoost recognition result and the true value according to an embodiment of the present invention, Figure 7 is a schematic diagram of the comparison between the LightGBM recognition result and the true value according to an embodiment of the present invention, Figure 8 It is a schematic diagram of the comparison between the IAO-LightGBM recognition result and the true value according to an embodiment of the present invention.
[0077] Specifically, SVM, XGBoost, LightGBM, and IAO-LightGBM can be selected to compare the accuracy of fault identification. Figure 5 , Figure 6 , Figure 7 and Figure 8 The results shown can easily lead to the comparison results shown in Table 2 below. Table 2 shows the recognition accuracy of the four models: SVM, XGBoost, LightGBM and IAO-LightGBM. It can be seen from Table 2 that the IAO-LightGBM model trained in the above embodiment of the present invention has better accuracy in identifying the types of electric shock faults that may exist in water-related power equipment.
[0078] Table 2
[0079] Identification Model Accuracy / % SVM 85.54 XGBoost 88.52 LightGBM 92.57 IAO-LightGBM 95.27
[0080] It should be noted that the initial fault identification model, intermediate fault identification model and fault identification model mentioned in the above embodiments of the present invention actually all refer to fault identification models, which only represent fault identification models at different stages of the training process. For example, the initial fault identification model refers to the initially constructed fault identification model, the intermediate fault identification model refers to the fault identification model that has been preliminarily trained, and the fault identification model obtained after testing the intermediate fault identification model with test data is the final trained model; of course, the fault identification model finally obtained through training can also be continuously optimized during actual application to improve the accuracy of fault identification model recognition.
[0081] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0082] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment 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 this 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 software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0083] According to an embodiment of the present invention, there is also provided a device for identifying electric shock faults of water-related electric power equipment for implementing the above-mentioned method for identifying electric shock faults of water-related electric power equipment. Fig. 9 is a schematic diagram of an electric shock fault identification device for water-related electrical equipment according to an embodiment of the present invention. Fig. 9 As shown, the device includes: a collection unit 91, a first acquisition unit 93 and a first determination unit 95. The electric shock fault identification device for water-related electrical equipment is described in detail below.
[0084] The collection unit 91 is used to collect current signal data of the water-related power equipment, wherein the current signal data is used to identify the fault type when an electric shock fault occurs in the water-related power equipment.
[0085] The first acquisition unit 93 is used to input the current signal data into the fault identification model to identify the current signal data using the fault identification model to obtain the electric shock fault type of the current signal data, wherein the fault identification model is trained using multiple sets of training data through a combination of lightweight gradient boosting machine learning and the Sky Eagle algorithm, and each of the multiple sets of training data includes: sample current signal data, and a sample electric shock fault type corresponding to the sample current signal data.
[0086] The first determination unit 95 is used to determine the type of electric shock fault as an identification result of electric shock fault identification for water-related electrical equipment.
[0087] It should be noted here that the above-mentioned collection unit 91, the first acquisition unit 93 and the first determination unit 95 correspond to steps S202 to S206 in the above-mentioned embodiment, and the three units and the corresponding steps implement the same instances and application scenarios, but are not limited to the contents disclosed in the above-mentioned embodiment.
[0088] It can be seen from the above that in the scheme recorded in the above-mentioned embodiment of the present invention, the acquisition unit can be used to collect the current current signal data of the water-related power equipment, wherein the current signal data is used to identify the fault type when the water-related power equipment has an electric shock fault; then the first acquisition unit is used to input the current signal data into the fault identification model, so as to use the fault identification model to identify the current signal data and obtain the electric shock fault type of the current signal data, wherein the fault identification model is obtained by training multiple groups of training data by combining lightweight gradient boosting machine learning with the Sky Eagle algorithm, and each group in the multiple groups of training data includes: sample current signal data, and a sample electric shock fault type corresponding to the sample current signal data; finally, the first determination unit is used to determine that the electric shock fault type is the identification result of the electric shock fault identification of the water-related power equipment, so as to achieve the purpose of processing the power signal data of the water-related power equipment by the fault identification model obtained by training by combining lightweight gradient boosting machine learning with the Sky Eagle algorithm, so as to identify the electric shock fault occurring in the water-related power equipment, and realize the technical effect of using the IAO-LightGBM model to identify the type of electric shock fault occurring in the water-related power equipment, thereby improving the accuracy of identification.
[0089] Therefore, the technical solution provided by the above-mentioned embodiments of the present invention solves the technical problem that the traditional method of detecting leakage and electric shock of water-related equipment in the related technology is difficult to accurately distinguish different situations such as normal leakage of equipment, fault leakage and electric shock to the human body, resulting in a high misjudgment rate.
[0090] Optionally, the electric shock fault identification device for water-related power equipment also includes: a second acquisition unit, which is used to obtain multiple groups of labeled sample current signal data before inputting the current signal data into the fault identification model to identify the current signal data using the fault identification model to obtain the electric shock fault type of the current signal data, wherein the labeled sample current signal data is sample current signal data with corresponding electric shock fault type labels; a third acquisition unit, which is used to divide the multiple groups of labeled sample current signal data to obtain labeled training current signal data sets and labeled test current signal data sets, wherein the labeled training current signal data sets include multiple groups of labeled training current signal data, the labeled test current signal data sets include multiple groups of labeled test current signal data, the labeled training current signal data are used to train the fault identification model, and the labeled test current signal data are used to test the trained fault identification model. type for testing; a construction unit, used to use lightweight gradient boosting machine learning to construct an initial fault identification model; a second determination unit, used to use a labeled training current signal data set to continuously iteratively train the initial fault identification model until a convergence condition is reached, and determine that the current initial fault identification model is an intermediate fault identification model, wherein the convergence condition is at least one of the following: the number of iterations of iterative training of the initial fault identification model reaches a preset number of iterations, and the current initial fault identification model meets the accuracy requirement; a fourth acquisition unit, used to test the intermediate fault identification model using a labeled test current signal data set to obtain a test result; a third determination unit, used to determine that the intermediate fault identification model is a fault identification model when the test result indicates that the test electric shock fault type output by the intermediate fault identification model is the same as the first actual electric shock fault type corresponding to the label in the labeled test current signal data.
[0091] Optionally, the construction unit includes: a construction module, which is used to use lightweight gradient boosting machine learning to construct an initial fault identification model according to a first formula, wherein the first formula is: f r ∈Θ, r represents the number of decision trees, R represents the total number of decision trees, f r represents the rth decision tree, f R represents the initial fault recognition model approximated by R decision trees, Θ represents the set of all decision trees, and X represents the labeled training current signal dataset.
[0092] Optionally, the second determination unit includes: a first determination module, used to determine the parameter range of each model parameter in the model parameter group of the initial fault identification model, wherein the model parameters in the model parameter group include at least: decision tree depth, leaf nodes of each decision tree, learning rate, and sample sampling ratio; a second determination module, used to use the Sky Eagle algorithm to iteratively solve the initial fault identification model using a labeled training current signal data set until the convergence condition is reached, and determine that the candidate model parameter group currently solved is the optimal model parameter group, wherein each model parameter in the candidate model parameter group and the optimal model parameter group is within the corresponding parameter range; a third determination module, used to replace the initial model parameter group in the initial fault identification model with the optimal model parameter group, and determine that the replaced initial fault identification model is an intermediate fault identification model.
[0093] Optionally, the second determination module includes: a generation submodule for randomly generating a population of eagles using the eagle algorithm, wherein the eagle population includes multiple eagles, and the eagle position of each eagle represents a model parameter group; an initialization submodule for initializing the eagle population in the solution space using a cubic chaotic map, wherein the solution space is the combination range of all model parameter groups; a first determination submodule for iteratively updating the eagle position of each eagle in the eagle population using a labeled training current signal data set until convergence conditions are reached, and determining the model parameter groups corresponding to the current eagle positions as candidate model parameter groups; an acquisition submodule for sorting the fitness values of each eagle in descending order to obtain a sorting result; a second determination submodule for determining, based on the sorting result, the eagle corresponding to the smallest fitness value as the optimal eagle; and a third determination submodule for determining the candidate model parameter group corresponding to the eagle position of the optimal eagle as the optimal model parameter group.
[0094] Optionally, the first determination submodule includes: a calculation submodule, configured to calculate the fitness value of each Skyhawk position according to a second formula using a labeled training current signal data set, wherein the second formula is: i represents the number of labeled training current signal data in the labeled training current signal dataset, n represents the total number of labeled training current signal data in the labeled training current signal dataset, and x represents the total number of labeled training current signal data in the labeled training current signal dataset. i represents the i-th labeled training current signal data, y i represents the second actual electric shock fault type corresponding to the i-th labeled training current signal data, It represents the predicted electric shock fault type output by the initial fault recognition model according to the i-th labeled training current signal data, f represents the fitness value, and the fitness value is used to represent the error between the predicted electric shock fault type and the second actual electric shock fault type; the updating submodule is used to update the position of each eagle in the eagle population when the fitness value does not meet the accuracy requirement or the number of iterations does not reach the preset number of iterations; the executing submodule is used to repeatedly execute the calculation steps and the updating steps until the fitness value meets the accuracy requirement or the number of iterations reaches the preset number of iterations, and the model parameter group corresponding to the eagle position of each current eagle is determined as the candidate model parameter group.
[0095] Optionally, the fourth acquisition unit includes: a first acquisition module, used to acquire the first actual electric shock fault type corresponding to each labeled test current signal data in the labeled test current signal data set; a second acquisition module, used to input the labeled test current signal data set into the intermediate fault identification model for processing, and obtain the test electric shock fault type corresponding to each labeled test current signal data in the labeled test current signal data set; a third acquisition module, used to compare the test electric shock fault type corresponding to each labeled test current signal data with the first actual electric shock fault type to obtain a comparison result; a fourth determination module, used to determine that the comparison result is a test result.
[0096] According to another aspect of an embodiment of the present invention, a system for identifying electric shock faults of water-related electrical equipment is further provided. The system for identifying electric shock faults of water-related electrical equipment uses any one of the above-mentioned methods for identifying electric shock faults of water-related electrical equipment.
[0097] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, the computer-readable storage medium comprising a stored program, wherein the program executes any one of the above-mentioned methods for identifying electric shock faults of water-related electrical equipment.
[0098] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the communication devices in a communication device group.
[0099] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for performing the following steps: collecting current current signal data of water-related power equipment, wherein the current signal data is used to identify the fault type when an electric shock fault occurs in the water-related power equipment; inputting the current signal data into a fault identification model to use the fault identification model to identify the current signal data to obtain the electric shock fault type of the current signal data, wherein the fault identification model is trained using multiple sets of training data through a combination of lightweight gradient boosting machine learning and the Sky Eagle algorithm, and each of the multiple sets of training data includes: sample current signal data, and a sample electric shock fault type corresponding to the sample current signal data; determining the electric shock fault type is the identification result of electric shock fault identification for the water-related power equipment.
[0100] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: obtaining multiple groups of labeled sample current signal data, wherein the labeled sample current signal data are sample current signal data with corresponding electric shock fault type labels; dividing the multiple groups of labeled sample current signal data to obtain labeled training current signal data sets and labeled test current signal data sets, wherein the labeled training current signal data sets include multiple groups of labeled training current signal data, the labeled test current signal data sets include multiple groups of labeled test current signal data, the labeled training current signal data are used to train the fault recognition model, and the labeled test current signal data are used to test the trained fault recognition model; using lightweight gradient Improve machine learning to build an initial fault identification model; use a labeled training current signal data set to iteratively train the initial fault identification model continuously until the convergence condition is reached, and determine that the current initial fault identification model is an intermediate fault identification model, wherein the convergence condition is at least one of the following: the number of iterations of iterative training of the initial fault identification model reaches a preset number of iterations, and the current initial fault identification model meets the accuracy requirements; use a labeled test current signal data set to test the intermediate fault identification model to obtain a test result; when the test result indicates that the test electric shock fault type output by the intermediate fault identification model is the same as the first actual electric shock fault type corresponding to the label in the labeled test current signal data, determine that the intermediate fault identification model is a fault identification model.
[0101] Optionally, in this embodiment, the computer-readable storage medium is configured to store a program code for executing the following steps: constructing an initial fault identification model according to a first formula using lightweight gradient boosting machine learning, wherein the first formula is: f r ∈Θ, r represents the number of decision trees, R represents the total number of decision trees, f r represents the rth decision tree, fR represents the initial fault recognition model approximated by R decision trees, Θ represents the set of all decision trees, and X represents the labeled training current signal dataset.
[0102] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining a parameter range of each model parameter in a model parameter group of an initial fault identification model, wherein the model parameters in the model parameter group include at least: a decision tree depth, leaf nodes of each decision tree, a learning rate, and a sample sampling ratio; using the Sky Eagle algorithm to iteratively solve the initial fault identification model using a labeled training current signal data set until convergence conditions are reached, and determining that the candidate model parameter group currently solved is the optimal model parameter group, wherein each model parameter in the candidate model parameter group and the optimal model parameter group is within the corresponding parameter range; replacing the initial model parameter group in the initial fault identification model with the optimal model parameter group, and determining that the replaced initial fault identification model is an intermediate fault identification model.
[0103] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: using the Eagle algorithm to randomly generate an Eagle population, wherein the Eagle population includes multiple Eagles, and the Eagle position of each Eagle represents a model parameter group; using cubic chaos mapping to initialize the Eagle population in the solution space, wherein the solution space is the combination range of all model parameter groups; using a labeled training current signal data set to iteratively update the Eagle position of each Eagle in the Eagle population until the convergence condition is reached, and determining the model parameter group corresponding to each current Eagle position as the candidate model parameter group; sorting the fitness value of each Eagle in descending order to obtain a sorting result; determining the Eagle corresponding to the smallest fitness value as the optimal Eagle according to the sorting result; determining the candidate model parameter group corresponding to the Eagle position of the optimal Eagle as the optimal model parameter group.
[0104] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: a calculation step, using the labeled training current signal data set to calculate the fitness value of each Skyhawk position according to a second formula, wherein the second formula is: i represents the number of labeled training current signal data in the labeled training current signal dataset, n represents the total number of labeled training current signal data in the labeled training current signal dataset, and x represents the total number of labeled training current signal data in the labeled training current signal dataset. i represents the i-th labeled training current signal data, y i represents the second actual electric shock fault type corresponding to the i-th labeled training current signal data, It represents the predicted electric shock fault type output by the initial fault recognition model according to the i-th labeled training current signal data, f represents the fitness value, and the fitness value is used to represent the error between the predicted electric shock fault type and the second actual electric shock fault type; the updating step, when the fitness value does not meet the accuracy requirement or the number of iterations does not reach the preset number of iterations, the position of each eagle in the eagle population is updated; the calculation step and the updating step are repeated until the fitness value meets the accuracy requirement or the number of iterations reaches the preset number of iterations, and the model parameter group corresponding to the eagle position of each current eagle is determined as the candidate model parameter group.
[0105] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for performing the following steps: obtaining a first actual electric shock fault type corresponding to each labeled test current signal data in a labeled test current signal data set; inputting the labeled test current signal data set into an intermediate fault identification model for processing to obtain a test electric shock fault type corresponding to each labeled test current signal data in the labeled test current signal data set; comparing the test electric shock fault type corresponding to each labeled test current signal data with the first actual electric shock fault type to obtain a comparison result; and determining the comparison result as a test result.
[0106] According to another aspect of an embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein when the program is run, any one of the above-mentioned methods for identifying electric shock faults of water-related electrical equipment is executed.
[0107] According to another aspect of an embodiment of the present invention, there is also provided a computer program product, comprising computer instructions, which, when executed by a processor, execute any one of the above-mentioned methods for identifying electric shock faults of water-related electrical equipment.
[0108] 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.
[0109] 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.
[0110] 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 the 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.
[0111] 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 on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0112] 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.
[0113] 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 method described in 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.
[0114] The above is only a preferred embodiment 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 principle 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 identifying electric shock faults of water-related electrical equipment, characterized in that: include: Collecting current signal data of water-related electrical equipment, wherein the current signal data is used to identify the fault type when an electric shock fault occurs in the water-related electrical equipment; The current signal data is input into a fault identification model, so as to use the fault identification model to identify the current signal data and obtain the electric shock fault type of the current signal data, wherein the fault identification model is obtained by training multiple sets of training data by combining lightweight gradient boosting machine learning with the Sky Eagle algorithm, and each of the multiple sets of training data includes: sample current signal data, and a sample electric shock fault type corresponding to the sample current signal data; Determining the type of electric shock fault is an identification result of electric shock fault identification of the water-related electrical equipment.
2. The method for identifying electric shock faults of water-related electrical equipment according to claim 1, characterized in that: Before inputting the current signal data into a fault identification model to identify the current signal data using the fault identification model to obtain the electric shock fault type of the current signal data, the method further includes: Acquire multiple groups of labeled sample current signal data, wherein the labeled sample current signal data is sample current signal data with labels corresponding to electric shock fault types; Dividing a plurality of groups of labeled sample current signal data to obtain a labeled training current signal data set and a labeled test current signal data set, wherein the labeled training current signal data set includes a plurality of groups of labeled training current signal data, the labeled test current signal data set includes a plurality of groups of labeled test current signal data, the labeled training current signal data is used to train the fault identification model, and the labeled test current signal data is used to test the trained fault identification model; Using the lightweight gradient boosting machine learning to build an initial fault identification model; The initial fault identification model is continuously iteratively trained using the labeled training current signal data set until a convergence condition is reached, and the current initial fault identification model is determined to be an intermediate fault identification model, wherein the convergence condition is at least one of the following: the number of iterations of iterative training of the initial fault identification model reaches a preset number of iterations, and the current initial fault identification model meets the accuracy requirement; Using the labeled test current signal data set to test the intermediate fault identification model, to obtain a test result; When the test result indicates that the test electric shock fault type output by the intermediate fault identification model is the same as the first actual electric shock fault type corresponding to the label in the labeled test current signal data, the intermediate fault identification model is determined to be the fault identification model.
3. The method for identifying electric shock faults of water-related electrical equipment according to claim 2, characterized in that: The lightweight gradient boosting machine learning is used to build an initial fault identification model, including: The initial fault identification model is constructed according to the first formula using the lightweight gradient boosting machine learning, wherein the first formula is: f r ∈Θ, r represents the number of decision trees, R represents the total number of decision trees, f r represents the rth decision tree, f R represents the initial fault recognition model approximated by the R decision trees, Θ represents the set of all the decision trees, and X represents the labeled training current signal data set.
4. The method for identifying electric shock faults of water-related electrical equipment according to claim 2, characterized in that: The initial fault identification model is continuously iteratively trained using the labeled training current signal data set until a convergence condition is reached, and the current initial fault identification model is determined to be an intermediate fault identification model, including: Determine a parameter range of each model parameter in a model parameter group of the initial fault identification model, wherein the model parameters in the model parameter group include at least: a decision tree depth, a leaf node of each decision tree, a learning rate, and a sample sampling ratio; The initial fault identification model is iteratively solved using the labeled training current signal data set using the Sky Eagle algorithm until the convergence condition is reached, and the candidate model parameter group currently solved is determined to be the optimal model parameter group, wherein each of the model parameters in the candidate model parameter group and the optimal model parameter group is within the corresponding parameter range; The initial model parameter group in the initial fault identification model is replaced by the optimal model parameter group, and the replaced initial fault identification model is determined as the intermediate fault identification model.
5. The method for identifying electric shock faults of water-related electrical equipment according to claim 4, characterized in that: The initial fault identification model is iteratively solved using the labeled training current signal data set using the Sky Eagle algorithm until the convergence condition is reached, and the candidate model parameter group currently solved is determined to be the optimal model parameter group, including: The eagle algorithm is used to randomly generate an eagle population, wherein the eagle population includes a plurality of eagles, and the eagle position of each eagle represents one of the model parameter groups; Initializing the eagle population in a solution space using a cubic chaos map, wherein the solution space is a combination range of all the model parameter groups; Iteratively updating the eagle position of each eagle in the eagle population using the labeled training current signal data set until the convergence condition is reached, and determining the model parameter group corresponding to each current eagle position as the candidate model parameter group; Sort the fitness values of the eagles in descending order to obtain a sorting result; Determine, according to the sorting result, that the eagle corresponding to the smallest fitness value is the optimal eagle; Determine that the candidate model parameter group corresponding to the eagle position of the optimal eagle is the optimal model parameter group.
6. The method for identifying electric shock faults of water-related electrical equipment according to claim 5, characterized in that: Iteratively updating the eagle position of each eagle in the eagle population by using the labeled training current signal data set until the convergence condition is reached, and determining the model parameter group corresponding to each current eagle position as the candidate model parameter group, including: The calculation step uses the labeled training current signal data set to calculate the fitness value of each of the Sky Eagle positions according to a second formula, wherein the second formula is: i represents the number of the labeled training current signal data in the labeled training current signal data set, n represents the total number of the labeled training current signal data in the labeled training current signal data set, x represents the number of the labeled training current signal data in the labeled training current signal data set, i represents the labeled training current signal data of the i-th item, y i represents the second actual electric shock fault type corresponding to the i-th labeled training current signal data, represents the predicted electric shock fault type output by the initial fault recognition model according to the i-th labeled training current signal data, and f represents the fitness value, which is used to represent the error between the predicted electric shock fault type and the second actual electric shock fault type; An updating step, in which, when the fitness value does not meet the accuracy requirement or the number of iterations does not reach the preset number of iterations, the position of each of the eagles in the eagle population is updated; Repeat the calculation step and the update step until the fitness value meets the accuracy requirement or the number of iterations reaches the preset number of iterations, and determine that the model parameter group corresponding to the current eagle position of each eagle is the candidate model parameter group.
7. The method for identifying electric shock faults of water-related electrical equipment according to claim 2, characterized in that: The intermediate fault identification model is tested using the labeled test current signal data set to obtain a test result, including: Acquire the first actual electric shock fault type corresponding to each labeled test current signal data in the labeled test current signal data set; Inputting the labeled test current signal data set into the intermediate fault identification model for processing to obtain the test electric shock fault type corresponding to each labeled test current signal data in the labeled test current signal data set; Compare the test electric shock fault type corresponding to each piece of the labeled test current signal data with the first actual electric shock fault type to obtain a comparison result; The comparison result is determined to be the test result.
8. A device for identifying electric shock faults of water-related electrical equipment, characterized in that: include: A collection unit, used to collect current signal data of water-related power equipment, wherein the current signal data is used to identify the fault type when an electric shock fault occurs in the water-related power equipment; A first acquisition unit is used to input the current signal data into a fault identification model, so as to identify the current signal data using the fault identification model to obtain the electric shock fault type of the current signal data, wherein the fault identification model is obtained by training multiple sets of training data by combining lightweight gradient boosting machine learning with the Sky Eagle algorithm, and each of the multiple sets of training data includes: sample current signal data, and a sample electric shock fault type corresponding to the sample current signal data; The first determination unit is used to determine the electric shock fault type as an identification result of electric shock fault identification for the water-related electrical equipment.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method for identifying electric shock faults of water-related electrical equipment as described in any one of claims 1 to 7.
10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by the processor, the method for identifying electric shock faults of water-related electrical equipment as described in any one of claims 1 to 7 is performed.
Citation Information
Patent Citations
Blower motor fault diagnosis method based on genetic algorithm and LightGBM
CN116861260A
Pedestrian wading electric shock prevention intelligent alarm device based on near field communication and application
CN117423208A
Electric power facility wading electric leakage identification method and device, cloud equipment and computer device
CN118332419A
