Equipment electric leakage identification method and system, electronic equipment and storage medium
Through the equipment leakage identification model and Skyhawk hunting algorithm, the limitations of traditional leakage protectors in identifying water-related accidents and living body electric shocks are solved, and accurate identification and processing of multiple fault conditions are achieved, improving the safety and security of the equipment. reliability.
Patent Information
- Application Number
- CN202410740180.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-10-15
AI Technical Summary
Traditional leakage protectors have limitations in their ability to detect water-related accidents in facilities, water-related faults, leakage, and live electric shock accidents in real time. They cannot effectively identify electric shock branch current signals that may pose a life-threatening hazard to the person receiving an electric shock, resulting in malfunction or The phenomenon of refusal to move reduces the reliability and correct operation rate of the leakage protector.
By obtaining the real-time operation data of the equipment, using the trained equipment leakage identification model, normalization processing and model training are carried out based on the equipment's historical operation data, and the support vector machine classification model and Skyhawk hunting algorithm are used to predict the operating status of the equipment, including future It can accurately identify and handle situations such as normal water wading, living body electric shock without wading, normal wading, water wading fault operation, water leakage due to water fault, and water leakage due to water fault and electric shock to living beings.
It improves the ability of the leakage protector to distinguish different operating states, enhances the real-time detection capability of water-related accidents and living body electric shock accidents, reduces misoperation or refusal to operate, and improves the reliability and correct operation rate of the leakage protector.
Smart Images

Figure CN118779733A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electric power safety, and in particular, relates to a method and system for identifying leakage of equipment, an electronic device and a storage medium. Background Art
[0002] In recent years, there have been frequent incidents of electric shock casualties caused by water leakage in public power facilities. After the power facilities have waded through water, the neutral and live wires may be connected through the water. At this time, the water around the facilities is charged. When pedestrians pass by and accidentally touch the charged water, they may not be able to get rid of the charged water, resulting in electric shock casualties. In order to prevent electrical accidents, a protector with certain functions needs to be installed at the front end of the power supply facilities. The setting value of the action current of the traditional leakage protector has nothing to do with the electric shock current of the organism, and the effective value of the total residual current is usually the only action criterion. This type of criterion cannot effectively identify the electric shock branch current signal that may pose a life-threatening hazard to the person who is electrocuted. There are inherent deficiencies and defects in the action principle, which often lead to false operation or refusal to operate, greatly reducing the reliability and correct commissioning rate of the leakage protector device.
[0003] In summary, traditional leakage protectors have certain limitations in their ability to detect in real time water-related accidents, water-related fault leakage, and electric shock accidents involving living beings. Summary of the invention
[0004] The embodiments of the present invention provide a method, system, electronic device and storage medium for identifying leakage of equipment, so as to at least solve the technical problem that traditional leakage protectors in the prior art have certain limitations in their ability to detect water-related accidents, water-related fault leakage and electric shock accidents of living beings in real time.
[0005] According to a first aspect of an embodiment of the present invention, there is provided a method for identifying leakage of an equipment, which is applied to a leakage protector, and includes: obtaining real-time operation data of the equipment; determining a leakage identification result according to the real-time operation data of the equipment and a leakage identification model of the equipment, wherein the leakage identification model of the equipment is trained according to the historical operation data of the equipment, and the leakage identification model of the equipment is used to predict the operation status of the equipment according to the real-time operation data of the equipment, wherein the operation status of the equipment includes normal operation of the equipment without wading in water, electric shock to living beings caused by the equipment without wading in water, faulty operation of the equipment without wading in water, normal operation of the equipment wading in water, faulty operation of the equipment wading in water, and faulty leakage of the equipment wading in water and electric shock to living beings.
[0006] Optionally, the historical operation data of the equipment includes normal operation data of the equipment without water involvement, data of electric shock to living beings caused by the equipment without water involvement, operation data of the equipment without water involvement faults, normal operation data of the equipment involving water involvement, operation data of the equipment involving water involvement faults, and operation data of the equipment involving water involvement faults resulting in leakage and electric shock to living beings.
[0007] Optionally, the equipment leakage identification model is trained based on the equipment historical operation data, including: normalizing the equipment historical data according to a preset normalization formula to obtain a normalized data set; and training a preset model based on the normalized data set to obtain the equipment leakage identification model.
[0008] Optionally, the preset model is a support vector machine classification model.
[0009] Optionally, according to a normalized data set, a preset model is trained to obtain a device leakage identification model, including: initializing parameters of the Sky Eagle algorithm, where the parameters include the Sky Eagle group, the maximum number of iterations, the search upper bound and the search lower bound; using a chaotic cubic mapping method to initialize the Sky Eagle group to obtain a target Sky Eagle group; according to the target Sky Eagle group, initializing a preset model to obtain a model to be trained; according to the parameters and the normalized data set, the model to be trained is trained to obtain a leakage identification model.
[0010] Optionally, the model to be trained is trained according to the parameters and the normalized data set to obtain a leakage identification model, including: obtaining the current number of iterations; determining the eagle hunting method according to the current number of iterations and the maximum number of iterations, wherein the eagle hunting method is used to determine the position of the eagle in the eagle group, and the position of each eagle represents a set of tuning parameters, and the tuning parameters include a penalty coefficient, a relaxation factor and function parameters in a preset model; determining the position of the eagle group according to the eagle hunting method, wherein the position of the eagle group includes the position of each eagle; determining the best eagle position in the eagle group according to the preset fitness algorithm; and training the model to be trained according to the best eagle position to obtain a leakage identification model.
[0011] Optionally, the Sky Eagle hunting mode is determined according to the current number of iterations and the maximum number of iterations, including: in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the first preset condition, and the generated random number is less than or equal to the preset value, determining that the Sky Eagle hunting mode is the first preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the first preset condition, and the generated random number is greater than the preset value, determining that the Sky Eagle hunting mode is the second preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the second preset condition, and the generated random number is less than or equal to the preset value, determining that the Sky Eagle hunting mode is the third preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the second preset condition, and the generated random number is greater than the preset value, determining that the Sky Eagle hunting mode is the fourth preset mode.
[0012] Optionally, the device leakage identification method also includes: controlling the leakage protector according to a preset fault handling strategy based on the leakage identification result.
[0013] According to a second aspect of an embodiment of the present invention, a device leakage identification system is also provided, including: an acquisition module, used to acquire real-time operation data of the device; an identification module, used to determine the leakage identification result according to the real-time operation data of the device and the device leakage identification model, wherein the device leakage identification model is trained according to the historical operation data of the device, and the device leakage identification model is used to predict the operation status of the device according to the real-time operation data of the device, wherein the operation status of the device includes normal operation of the device without wading in water, electric shock to living beings caused by the device without wading in water, faulty operation of the device without wading in water, normal operation of the device wading in water, faulty operation of the device wading in water, and faulty leakage of the device wading in water and electric shock to living beings.
[0014] Optionally, the historical operation data of the equipment in the identification module includes normal operation data of the equipment without water involvement, electric shock data of the equipment without water involvement, fault operation data of the equipment without water involvement, normal operation data of the equipment with water involvement, fault operation data of the equipment with water involvement, and operation data of the equipment with water involvement, fault leakage and electric shock to living beings.
[0015] Optionally, the identification module is also used to: normalize the historical data of the equipment according to a preset normalization formula to obtain a normalized data set; and train a preset model based on the normalized data set to obtain a device leakage identification model.
[0016] Optionally, the preset model in the recognition module is a support vector machine classification model.
[0017] Optionally, the identification module is also used to: initialize the parameters of the Sky Eagle algorithm, where the parameters include the Sky Eagle group, the maximum number of iterations, the search upper bound and the search lower bound; use the chaotic cubic mapping method to initialize the Sky Eagle group to obtain the target Sky Eagle group; initialize the preset model according to the target Sky Eagle group to obtain the model to be trained; train the model to be trained according to the parameters and the normalized data set to obtain the leakage identification model.
[0018] Optionally, the identification module is also used to: obtain the current number of iterations; determine the eagle hunting method based on the current number of iterations and the maximum number of iterations, wherein the eagle hunting method is used to determine the position of the eagle in the eagle group, and the position of each eagle represents a set of tuning parameters, and the tuning parameters include a penalty coefficient, relaxation factor and function parameters in a preset model; determine the position of the eagle group according to the eagle hunting method, wherein the position of the eagle group includes the position of each eagle; determine the best eagle position in the eagle group according to a preset fitness algorithm; and train the model to be trained based on the best eagle position to obtain a leakage identification model.
[0019] Optionally, the identification module is also used to: in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the first preset condition, and the generated random number is less than or equal to the preset value, determine that the Sky Eagle hunting mode is the first preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the first preset condition, and the generated random number is greater than the preset value, determine that the Sky Eagle hunting mode is the second preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the second preset condition, and the generated random number is less than or equal to the preset value, determine that the Sky Eagle hunting mode is the third preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the second preset condition, and the generated random number is greater than the preset value, determine that the Sky Eagle hunting mode is the fourth preset mode.
[0020] Optionally, the equipment leakage identification system also includes a control module, and the control module is used to control the leakage protector according to the leakage identification result and a preset fault handling strategy.
[0021] According to a third aspect of an embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the device leakage identification method described in any embodiment of the first aspect above.
[0022] According to a fourth aspect of an embodiment of the present invention, a non-volatile storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the device leakage identification method described in any embodiment of the first aspect when running on a computer or a processor.
[0023] According to a fifth aspect of an embodiment of the present invention, a computer program product is also provided, including a computer program, which, when executed by a processor, implements the device leakage identification method described in any embodiment of the first aspect above.
[0024] In an embodiment of the present invention, real-time operation data of the equipment is obtained; according to the real-time operation data of the equipment and the leakage identification model of the equipment, the leakage identification result is determined, wherein the leakage identification model of the equipment is obtained by training according to the historical operation data of the equipment, and the leakage identification model of the equipment is used to predict the operation state of the equipment according to the real-time operation data of the equipment, wherein the operation state of the equipment includes normal operation of the equipment without wading in water, electric shock of living body caused by the equipment without wading in water, fault operation of the equipment without wading in water, normal operation of the equipment wading in water, fault operation of the equipment wading in water, and electric shock of living body caused by the equipment wading in water. The present invention can identify a variety of fault conditions through the leakage identification model of the equipment, and improves the ability of the leakage protector to distinguish between normal operation without wading in water, fault operation without wading in water, electric shock of living body caused by the equipment without wading in water, normal operation with wading in water, leakage with fault with wading in water, and electric shock of living body caused by fault with wading in water, thereby solving the technical problem that the traditional leakage protector in the prior art has certain limitations in the ability to detect water-related accidents, water-related fault leakage and electric shock of living body caused by facilities in real time. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] 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:
[0026] Figure 1 is a flow chart of a method for identifying leakage of equipment according to one embodiment of the present invention;
[0027] Figure 2 is a schematic flow chart of a method for identifying leakage current of equipment according to one embodiment of the present invention;
[0028] Figure 3 is a schematic diagram of the first accuracy rate of leakage identification using the first model;
[0029] Figure 4 is a schematic diagram of a second accuracy rate of leakage identification using a second model;
[0030] Figure 5 is a schematic diagram of a third accuracy rate of leakage identification according to one embodiment of the present invention;
[0031] Figure 6 4 is a structural block diagram of a device leakage identification system according to one embodiment of the present invention. DETAILED DESCRIPTION
[0032] 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.
[0033] 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 terms used in this way can be interchangeable 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.
[0034] According to an embodiment of the present invention, an embodiment of a method for identifying leakage of a device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system containing at least one set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0035] The method embodiment can also be executed in an electronic device including a memory and a processor, a similar control device or a cloud. Taking an electronic device as an example, the electronic device may include one or more processors and a memory for storing data. Optionally, the electronic device may also include a communication device and a display device for communication functions. It can be understood by those of ordinary skill in the art that the above structural description is only illustrative and does not limit the structure of the above electronic device. For example, the electronic device may also include more or fewer components than the above structural description, or have a configuration different from the above structural description.
[0036] The processor may include one or more processing units. For example, the processor may include a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a field-programmable gate array (FPGA), a neural network processor (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, and the like. Among them, different processing units may be independent components or integrated into one or more processors. In some instances, the electronic device may also include one or more processors.
[0037] The memory can be used to store computer programs, such as storing a computer program corresponding to the device leakage identification method in the embodiment of the present invention. The processor implements the above-mentioned device leakage identification method by running the computer program stored in the memory. The memory 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 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the electronic device via 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 combinations thereof.
[0038] The communication device is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the communication device includes a network adapter (network interface controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the communication device can be a radio frequency (radio frequency, RF) module, which is used to communicate with the Internet wirelessly. In some embodiments of the present solution, the communication device is used to connect to mobile devices such as mobile phones and tablets, and instructions can be sent to electronic devices through the mobile device.
[0039] The display device may be a touch screen type liquid crystal display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the electronic device. In some embodiments, the electronic device has a graphical user interface (GUI), and a user may interact with the GUI by touching a finger release and / or gestures on a touch-sensitive surface, and executable instructions for executing the above-mentioned human-computer interaction functions are configured / stored in a computer program product or a readable storage medium executable by one or more processors.
[0040] Figure 1 is a flow chart of a method for identifying leakage current of equipment according to one embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0041] Step S101, obtaining real-time operation data of the device.
[0042] Specifically, the device is an electrical device that needs to be identified for leakage, and the real-time operating data is the residual current of the device.
[0043] Step S102, determining a leakage identification result according to the real-time operation data of the equipment and the equipment leakage identification model, wherein the equipment leakage identification model is trained according to the historical operation data of the equipment, and the equipment leakage identification model is used to predict the operation status of the equipment according to the real-time operation data of the equipment, wherein the operation status of the equipment includes normal operation of the equipment without wading in water, electric shock to living beings caused by the equipment without wading in water, faulty operation of the equipment without wading in water, normal operation of the equipment wading in water, faulty operation of the equipment wading in water, and faulty leakage of the equipment wading in water and electric shock to living beings.
[0044] Specifically, after the real-time operation data of the device is collected in step S101, the real-time operation data of the device is input into the device leakage identification model. The device leakage identification model can determine the operation status of the device according to the real-time operation data of the device to obtain the leakage identification result.
[0045] It can be understood that the determined leakage identification result can be one of the following: the equipment does not waive normal operation, the equipment does not waive electric shock to living beings, the equipment does not waive fault operation, the equipment waives normal operation, the equipment waives fault operation, and the equipment waives fault leakage and electric shock to living beings.
[0046] In an embodiment of the present invention, real-time operation data of the equipment is obtained; according to the real-time operation data of the equipment and the leakage identification model of the equipment, the leakage identification result is determined, wherein the leakage identification model of the equipment is obtained by training according to the historical operation data of the equipment, and the leakage identification model of the equipment is used to predict the operation state of the equipment according to the real-time operation data of the equipment, wherein the operation state of the equipment includes normal operation of the equipment without wading in water, electric shock of living body caused by the equipment without wading in water, fault operation of the equipment without wading in water, normal operation of the equipment wading in water, fault operation of the equipment wading in water, and electric shock of living body caused by the equipment wading in water. The present invention can identify a variety of fault conditions through the leakage identification model of the equipment, and improves the ability of the leakage protector to distinguish between normal operation without wading in water, fault operation without wading in water, electric shock of living body caused by the equipment without wading in water, normal operation with wading in water, leakage with fault with wading in water, and electric shock of living body caused by fault with wading in water, thereby solving the technical problem that the traditional leakage protector in the prior art has certain limitations in the ability to detect water-related accidents, water-related fault leakage and electric shock of living body caused by facilities in real time.
[0047] Optionally, the historical operation data of the equipment includes normal operation data of the equipment without water involvement, data of electric shock to living beings caused by the equipment without water involvement, operation data of the equipment without water involvement faults, normal operation data of the equipment involving water involvement, operation data of the equipment involving water involvement faults, and operation data of the equipment involving water involvement faults resulting in leakage and electric shock to living beings.
[0048] For example, the historical operation data of the equipment is collected in real time on the laboratory platform and the power facility operation site with 64 data as a cycle, and the leakage current data of the equipment under different operating conditions for 1.5 consecutive cycles are recorded, that is, 96 leakage current data. If the facility is under abnormal operating conditions, such as wading or failure, the leakage current data before and after the abnormality occurs are recorded.
[0049] Optionally, the equipment leakage identification model is trained based on the equipment historical operation data, including: normalizing the equipment historical data according to a preset normalization formula to obtain a normalized data set; and training a preset model based on the normalized data set to obtain the equipment leakage identification model.
[0050] Specifically, in order to eliminate the influence of large differences in the magnitude of different feature data, all feature data are mapped to the interval [0, 1]. The feature normalization formula is as follows:
[0051]
[0052] Among them, f represents a parameter value in the same feature, f min represents the minimum value in this feature, f maxrepresents the maximum value of the feature, and f′ represents the normalized feature parameter, thus the normalized feature data set F′=[F′ 1 ,F' 2 ,...,F' m ], whose dimension is 96×m.
[0053] Optionally, the preset model is a support vector machine classification model.
[0054] Optionally, according to a normalized data set, a preset model is trained to obtain a device leakage identification model, including: initializing parameters of the Sky Eagle algorithm, where the parameters include the Sky Eagle group, the maximum number of iterations, the search upper bound and the search lower bound; using a chaotic cubic mapping method to initialize the Sky Eagle group to obtain a target Sky Eagle group; according to the target Sky Eagle group, initializing a preset model to obtain a model to be trained; according to the parameters and the normalized data set, the model to be trained is trained to obtain a leakage identification model.
[0055] For example, a support vector machine classification model, namely an SVM model, is constructed, the essence of which is to find an optimal hyperplane to separate samples of different categories. The objective function is as follows:
[0056]
[0057] In the formula, c is the penalty coefficient, ε is the relaxation factor, and x i ,y i is the feature of sample data i and its category label, ω refers to the plane ω T x i +b=0 normal vector, b is the displacement term.
[0058] In the SVM model architecture, the penalty coefficient c, relaxation factor ε, and kernel function parameter g are three important parameters. The penalty coefficient c represents the tolerance for error samples. When c is too large, the tolerance for error is small, and it is easy to overfit. Otherwise, it is easy to fall into underfitting. The relaxation factor ε represents the tolerance for error. Introducing the relaxation factor ε can avoid the influence of outliers on the classification results. g is a parameter that selects the Gaussian kernel function as the kernel function. g can control the scope of the Gaussian kernel function. If the value is too small, it is easy to cause overfitting.
[0059] The three main parameters of SVM (penalty coefficient c, relaxation factor ε and kernel function parameter g) have a very important impact on the accuracy of the model. This embodiment uses the improved Eagle algorithm (IAO) to optimize the values of these three parameters, and the optimization ranges of the three parameters are shown in Table 1.
[0060] Table 1 Parameter optimization range
[0061] Parameter name Optimization range Penalty coefficient c [0,100] Relaxation factor ε [0,1] Kernel function parameter g [0,1000]
[0062] Initialize the parameters of the Eagle algorithm including creating an Eagle group containing N Eagles, the maximum number of iterations T, the search upper bound (UB) and the search lower bound (LB), and randomly generate the Eagle population. The position U of the i-th Eagle i =(u i1 ,u i2 ,…,u iD ), represents the parameters that the SVM needs to optimize, where D is the dimension of the problem to be solved. In this embodiment, there are 3 parameters that the SVM needs to optimize, so D=3, that is:
[0063] U i =(c i , ε i , g i )
[0064] The cubic chaos mapping is further used to initialize the population in the space. In order to further improve the local optimization and convergence accuracy capabilities of the Sky Eagle search algorithm in the initialization phase, this embodiment uses the chaotic cubic mapping method to initialize the population. The mathematical expression of the chaotic cubic mapping is:
[0065] s(n+1)=4s(n) 3 -3s(n)
[0066] In the formula, -1≤s(n)≤1, s(n)≠0, n=1,2,3,…,N-1.
[0067] In the search space, a D-dimensional vector with each dimension in the interval [-1,1] is randomly generated as the first individual; the generated first individual is iterated according to the above formula to generate other individual chaotic sequences; after all the eagle individuals are iterated, they are mapped to the solution space according to the following formula:
[0068]
[0069] In the formula, z dmax 、z dmin is the upper and lower boundaries of each individual in the dth dimension, d = 1, 2, ..., D, that is, the optimization range of the three parameters that SVM needs to optimize; z id is the position of the i-th eagle individual in the d-th dimension.
[0070] Finally, according to the parameters and normalized data set, the training model is iteratively trained to obtain the leakage recognition model.
[0071] Optionally, the model to be trained is trained according to the parameters and the normalized data set to obtain a leakage identification model, including: obtaining the current number of iterations; determining the eagle hunting method according to the current number of iterations and the maximum number of iterations, wherein the eagle hunting method is used to determine the position of the eagle in the eagle group, and the position of each eagle represents a set of tuning parameters, and the tuning parameters include a penalty coefficient, a relaxation factor and function parameters in a preset model; determining the position of the eagle group according to the eagle hunting method, wherein the position of the eagle group includes the position of each eagle; determining the best eagle position in the eagle group according to the preset fitness algorithm; and training the model to be trained according to the best eagle position to obtain a leakage identification model.
[0072] Specifically, the position information of each eagle represents a set of three parameter values of SVM. The fitness function f corresponding to the eagle position represents the quality of the eagle position, that is, the training error of the SVM model under the training sample set in Step 1. Its calculation formula (preset fitness algorithm) is as follows:
[0073]
[0074] Where n is the number of samples in the training set; y i is the actual value of the i-th sample; k i is the predicted value of the i-th sample.
[0075] 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.
[0076] Optionally, the Sky Eagle hunting mode is determined according to the current number of iterations and the maximum number of iterations, including: in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the first preset condition, and the generated random number is less than or equal to the preset value, determining that the Sky Eagle hunting mode is the first preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the first preset condition, and the generated random number is greater than the preset value, determining that the Sky Eagle hunting mode is the second preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the second preset condition, and the generated random number is less than or equal to the preset value, determining that the Sky Eagle hunting mode is the third preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the second preset condition, and the generated random number is greater than the preset value, determining that the Sky Eagle hunting mode is the fourth preset mode.
[0077] Specifically, Eagle Hunting can be divided into four methods, of which Method 1 and Method 2 are exploration steps, and Method 3 and Method 4 are development steps. Where t and T are the current iteration number and the maximum iteration number respectively, then the exploration step is executed; otherwise, the development step is executed. The specific process is as follows:
[0078] Method 1, i.e. the first preset method: identify the prey area, use the vertical bending and high flying method to select the best hunting area and attack. This behavior is mathematically expressed as:
[0079]
[0080] Where U i (t+1) is the next iterative solution of t; U best (t) is the optimal solution of the tth iteration; U M (t) represents the average position of the population at the tth iteration, rand is a random value in the range [0, 1].
[0081] In the above formula As U best The coefficient of (t) represents the weight of generating the optimal solution under the current strategy. At this time, the linear reduction method will significantly reduce the local search capability, so this embodiment introduces an exponential function to determine the range of the target prey through adaptive weights. The improved formula is shown in the following formula:
[0082]
[0083] Method 2, the second preset method: discover the prey area from high altitude, hover above the prey area, and use the outline flight of short glide attack. This behavior is mathematically expressed as:
[0084] U i (t+1)=U best (t)×Levy(D)+U R (t)+(bq)×rand
[0085] Where U i (t+1) is the next iteration solution of t; 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, μ and v represent random numbers between [0, 1], Γ(x) is the gamma function; u R (t) is the random solution obtained in the range [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 = l 1 +R×D 1 , l 1 The value range is between 1 and 20, R is 0.00565, D 1 is an integer matrix from 1 to D, θ is the spiral angle, θ = -ω × D 1 +θ 1 ,θ 1is the initial helical angle, ω is taken as 0.005.
[0086] Mode 3, the third preset mode: determine the prey area, prepare for landing and attack, and then use low-flying and slow-descent attack. This behavior is mathematically expressed as:
[0087] U i (t+1)=(U best (t)-U M (t))×a-rand+((UB-LB)×rand+LB)×δ
[0088] Where U i (t+1) is the next iterative solution of t; a and δ represent adjustment coefficients and are constants of 0.1.
[0089] In the above formula, a and δ are fixed values, which will also reduce the optimization tendency and convergence accuracy of the population. In the early stage, a should be ensured to be greater than δ so as to determine the optimal solution range as soon as possible; in the later stage, a should be ensured to be less than δ to prevent the optimal solution from breaking through the problem boundary. In this embodiment, the inverse tangent function is used to correct a and δ to ensure that a and δ can be adaptively adjusted to a greater than δ in the early stage and a less than δ in the later stage. The corrected formulas of a and δ are as follows:
[0090]
[0091] Mode 4, the fourth preset mode: 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 is mathematically expressed as:
[0092] U i (t+1)=QF(t)×U best (t)-(G1×U i (t)×rand)-G2×Levy(D)+rand×
[0093] G1
[0094] Where U i (t+1) is the next iterative solution of t; 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.
[0095] Optionally, the device leakage identification method also includes: controlling the leakage protector according to a preset fault handling strategy based on the leakage identification result.
[0096] Specifically, the model can derive the numerical categories of various fault predictions, which are then converted into the names of equipment water-related fault leakage types. The leakage type corresponding to category 1 is that the facility operates normally without water and the circuit breaker does not operate. The leakage type corresponding to category 2 is that the facility operates without water-related faults and the circuit breaker generates an alarm signal according to the leakage level. The leakage type corresponding to category 3 is that the living body is electrocuted without water-related faults and the circuit breaker is disconnected. The leakage type corresponding to category 4 is that the facility operates normally with water and the circuit breaker does not operate. The leakage type corresponding to category 5 is that the circuit breaker generates an alarm signal and an action signal according to the leakage level when the facility operates with water-related faults. The leakage type corresponding to category 6 is that the facility operates with water-related faults and leakage and the living body is electrocuted, and the circuit breaker generates an alarm signal and disconnects.
[0097] For example, refer to Figure 2 The implementation steps of the leakage identification method of the present invention are as follows:
[0098] Step 1: Collection of facility leakage data:
[0099] In the laboratory platform and the power facility operation site, the leakage current data of the facility is collected in real time with 64 data as one cycle, and the leakage current data of the facility under different operating conditions for 1.5 consecutive cycles, that is, 96 leakage current data, are recorded. If the facility is under abnormal operating conditions, such as wading or failure, the leakage current data of the first cycle and the last 0.5 cycle when the abnormality occurs are recorded.
[0100] The leakage current data of facilities under different conditions such as normal operation without water involvement, operation without water involvement, electric shock to living beings without water involvement, normal operation with water involvement, operation with water involvement, and leakage caused by water involvement and electric shock to living beings were recorded in the above method, and the corresponding labels were noted. The data set was divided into a training sample set and a test sample set.
[0101] Step 2: Data normalization:
[0102] A total of 96 leakage current data collected under different conditions in Step 1 are used as feature data. In order to eliminate the influence of large differences in numerical magnitude between different feature data, all feature data are mapped to the interval [0,1], and the feature normalization formula is shown in formula (1).
[0103]
[0104] Where f represents a parameter value in the same feature, f min represents the minimum value in this feature, f max represents the maximum value of the feature, and f′ represents the normalized feature parameter, thereby obtaining a normalized feature data set F′=[F′1, F′2, ..., F′m] with a dimension of 96×m.
[0105] Step 3: SVM model initialization:
[0106] The essence of building a support vector machine classification model, namely the SVM model, is to find an optimal hyperplane to separate samples of different categories. The objective function is as follows:
[0107]
[0108] In the formula, c is the penalty coefficient, ε is the relaxation factor, and x i ,y i is the feature of sample data i and its category label, ω refers to the plane ω T x i +b=0 normal vector, b is the displacement term.
[0109] In the SVM model architecture, the penalty coefficient c, relaxation factor ε, and kernel function parameter g are three important parameters. The penalty coefficient c represents the tolerance for error samples. When c is too large, the tolerance for error is small, and it is easy to overfit. Otherwise, it is easy to fall into underfitting. The relaxation factor ε represents the tolerance for error. Introducing the relaxation factor ε can avoid the influence of outliers on the classification results. g is a parameter that selects the Gaussian kernel function as the kernel function. g can control the scope of the Gaussian kernel function. If the value is too small, it is easy to cause overfitting.
[0110] The three main parameters of SVM (penalty coefficient c, relaxation factor ε and kernel function parameter g) have a very important impact on the accuracy of the model. The patent of the present invention uses the improved Eagle algorithm (IAO) to optimize the values of these three parameters. The optimization ranges of these three parameters in this embodiment are shown in Table 1 above.
[0111] Step 4: Initialize the parameters of the Skyhawk algorithm:
[0112] 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 U of the i-th eagle i =(u i1 ,u i2 ,…,u iD ), represents the parameters that need to be optimized by SVM, where D is the dimension of the problem to be solved. In this embodiment, there are 3 parameters that need to be optimized by SVM, so D=3, that is:
[0113] U i =(c i , ε i , g i )
[0114] Step 5: Use cubic chaos mapping to initialize the population in space:
[0115] In order to further improve the local optimization and convergence accuracy capabilities of the Sky Eagle search algorithm in the initialization phase, this embodiment uses a chaotic cubic mapping method to initialize the population. The mathematical expression of chaotic cubic mapping is:
[0116] s(n+1)=4s(n) 3 -3s(n) (3)
[0117] In the formula, -1≤s(n)≤1, s(n)≠0, n=1,2,3,…,N-1.
[0118] In the search space, a D-dimensional vector with each dimension in the interval [-1,1] is randomly generated as the first individual; the generated first individual is iterated according to formula (3) to generate other individual chaotic sequences; after all the eagle individuals are iterated, they are mapped to the solution space according to formula (4), which is as follows:
[0119]
[0120] In the formula, z dmax 、z dmin is the upper and lower boundaries of each individual in the dth dimension, d = 1, 2, ..., D, that is, the optimization range of the three parameters that SVM needs to optimize; z id is the position of the i-th eagle individual in the d-th dimension.
[0121] Step 6: Calculate the fitness function:
[0122] The position information of each eagle represents a set of three parameter values of SVM. The fitness function f corresponding to the eagle position represents the quality of the eagle position, that is, the training error of the SVM model under the training sample set in Step 1. The calculation formula is as follows:
[0123]
[0124] Where n is the number of samples in the training set; y i is the actual value of the i-th sample; k i is the predicted value of the i-th sample.
[0125] 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.
[0126] Step 7: Update the population position according to four different methods:
[0127] Eagle hunting can be divided into four methods, of which method 1 and method 2 are exploration steps, and method 3 and method 4 are development steps. Where t and T are the current iteration number and the maximum iteration number respectively, then the exploration step is executed; otherwise, the development step is executed. The specific process is as follows:
[0128] Method 1: Identify the prey area, use the vertical bending and high flying method to select the best hunting area and attack. This behavior is mathematically expressed as:
[0129]
[0130] Where U i (t+1) is the next iterative solution of t; U best (t) is the optimal solution of the tth iteration; U M (t) represents the average position of the population at the tth iteration, rand is a random value in the range [0, 1].
[0131] In formula (6) As U best The coefficient of (t) represents the weight of generating the optimal solution under the current strategy. At this time, the linear reduction method will significantly reduce the local search capability, so this embodiment introduces an exponential function to determine the range of the target prey through adaptive weights. The improved formula is shown in formula (7):
[0132]
[0133] Method 2, discover the prey area from high altitude, hover above the prey area, and use the contour flight of short glide attack. This behavior is mathematically expressed as:
[0134] U i (t+1)=U best (t)×Levy(D)+U R (t)+(bq)×rand (8)
[0135] Where U i (t+1) is the next iteration solution of t; 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, μ and v represent random numbers between [0, 1], Γ(x) is the gamma function; u R (t) is the random solution obtained in the range [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 = l 1 +R×D 1 , l 1 The value range is between 1 and 20, R is 0.00565, D 1is an integer matrix from 1 to D, θ is the spiral angle, θ = -ω × D 1 +θ 1 ,θ 1 is the initial helical angle, ω is taken as 0.005.
[0136] Method 3, determine the prey area, prepare for landing and attack, and then use low-flying and slow-descent attack. This behavior is mathematically expressed as:
[0137] U i (t+1)=(U best (t)-U M (t))×a-rand+((UB-LB)×rand+LB)×δ (9)
[0138] Where U i (t+1) is the next iterative solution of t; a and δ represent adjustment coefficients and are constants of 0.1.
[0139] In formula (9), a and δ are fixed values, which will also reduce the optimization tendency and convergence accuracy of the population. In the early stage, a should be ensured to be greater than δ so as to determine the optimal solution range as soon as possible; in the later stage, a should be ensured to be less than δ to prevent the optimal solution from breaking through the problem boundary. In this embodiment, the inverse tangent function is used to correct a and δ to ensure that a and δ can be adaptively adjusted to a greater than δ in the early stage and a less than δ in the later stage. The formulas of a and δ after correction are shown in formula (10) and formula (11), respectively:
[0140]
[0141]
[0142] Method 4: When the eagle approaches its prey, it will walk on land according to the random movement pattern of the prey and catch the prey. This behavior is mathematically expressed as:
[0143] U i (t+1)=QF(t)×U best (t)-(G1×U i (t)×rand)-G2×Levy(D)+rand×G1 (12)
[0145] Where U i (t+1) is the next iterative solution of t; 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.
[0146] Step 8: Calculate the fitness and obtain the optimal position of the Eagle:
[0147] Calculate the best individual fitness value of the Sky Eagle and update the position of the best individual Sky Eagle.
[0148] Step nine, determine whether the algorithm stops iterating:
[0149] When the set accuracy is reached or the maximum number of iterations is reached, the algorithm stops iterating. If the stopping condition is not reached, it returns to step 7 to continue iterating.
[0150] Step 10: Obtain the optimal parameters of SVM and output the optimal model:
[0151] After the algorithm stops iterating, the optimal solution output is the optimal parameter set of SVM. Substituting the optimal parameter set into the SVM model, the optimal model for equipment wading fault leakage identification based on IAO-SVM is obtained.
[0152] Step 11: Identification of facility faults and leakage:
[0153] The test samples are input into the optimal model based on IAO-SVM, and the model outputs the leakage type of the facility identified by the model, and then the model identification accuracy is statistically analyzed. At the same time, the optimal model based on IAO-SVM is transplanted into the leakage protector, and the residual current is collected in real time. The model output is used to judge the different situations of the facility, such as normal leakage without water, leakage without water-related faults, electric shock accidents without water-related living beings, normal leakage with water, leakage with water-related faults, and electric shock accidents with water-related faults and leakage with living beings, and then protective measures are adopted under different operating conditions.
[0154] Reference Figure 3 , Figure 4 and Figure 5 ,SVM, AO-SVM and IAO-SVM are selected for comparison to verify the effectiveness of this method.,Different models are used for prediction, and the results are summarized in Table 2 below.
[0155] Table 2 Diagnostic results of different models
[0156] Prediction Model Accuracy % SVM 81.25 AO-SVM 87.5 IAO-SVM 91.25
[0157] As shown in Table 2 and Figure 3 , Figure 4 and Figure 5 As shown in the figure, by comparing the prediction accuracy of different models, it can be seen that IAO-SVM shows the highest accuracy in the diagnosis of equipment wading fault leakage, which proves the effectiveness and superiority of the method of the present invention.
[0158] 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 can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially 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), including 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 invention.
[0159] In this embodiment, a device leakage identification system is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" is a combination of software and / or hardware that can implement a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0160] Figure 6 FIG. 2 is a structural block diagram of a device leakage identification system 200 according to one embodiment of the present invention. Figure 6 As shown, an equipment leakage identification system 200 is taken as an example, including: an acquisition module 201, used to acquire real-time operation data of the equipment; an identification module 202, used to determine the leakage identification result according to the real-time operation data of the equipment and the equipment leakage identification model, wherein the equipment leakage identification model is trained according to the historical operation data of the equipment, and the equipment leakage identification model is used to predict the operation status of the equipment according to the real-time operation data of the equipment, wherein the operation status of the equipment includes normal operation of the equipment without wading in water, electric shock to living beings caused by the equipment without wading in water, faulty operation of the equipment without wading in water, normal operation of the equipment wading in water, faulty operation of the equipment wading in water, and faulty leakage of the equipment wading in water and electric shock to living beings.
[0161] Optionally, the historical operation data of the equipment in the identification module 202 includes normal operation data of the equipment without water involvement, electric shock data of the equipment without water involvement, fault operation data of the equipment without water involvement, normal operation data of the equipment with water involvement, fault operation data of the equipment with water involvement, and operation data of the equipment with water involvement, fault leakage and electric shock to living beings.
[0162] Optionally, the identification module 202 is further used to: normalize the historical data of the equipment according to a preset normalization formula to obtain a normalized data set; and train a preset model based on the normalized data set to obtain a device leakage identification model.
[0163] Optionally, the preset model in the identification module 202 is a support vector machine classification model.
[0164] Optionally, the identification module 202 is also used to: initialize the parameters of the Sky Eagle algorithm, where the parameters include the Sky Eagle group, the maximum number of iterations, the search upper bound and the search lower bound; use the chaotic cubic mapping method to initialize the Sky Eagle group to obtain the target Sky Eagle group; initialize the preset model according to the target Sky Eagle group to obtain the model to be trained; train the model to be trained according to the parameters and the normalized data set to obtain the leakage identification model.
[0165] Optionally, the identification module 202 is also used to: obtain the current number of iterations; determine the eagle hunting mode according to the current number of iterations and the maximum number of iterations, wherein the eagle hunting mode is used to determine the position of the eagle in the eagle group, and the position of each eagle represents a set of tuning parameters, and the tuning parameters include a penalty coefficient, a relaxation factor and function parameters in a preset model; determine the position of the eagle group according to the eagle hunting mode, wherein the position of the eagle group includes the position of each eagle; determine the best eagle position in the eagle group according to a preset fitness algorithm; and train the model to be trained according to the best eagle position to obtain a leakage identification model.
[0166] Optionally, the identification module 202 is also used to: in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the first preset condition, and the generated random number is less than or equal to the preset value, determine that the eagle hunting mode is the first preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the first preset condition, and the generated random number is greater than the preset value, determine that the eagle hunting mode is the second preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the second preset condition, and the generated random number is less than or equal to the preset value, determine that the eagle hunting mode is the third preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the second preset condition, and the generated random number is greater than the preset value, determine that the eagle hunting mode is the fourth preset mode.
[0167] Optionally, the equipment leakage identification system 200 further includes a control module, which is connected to the identification module 202 and is used to control the leakage protector according to the leakage identification result and a preset fault handling strategy.
[0168] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the device leakage identification method described in any of the above embodiments.
[0169] Optionally, in this embodiment, the processor in the above electronic device may be configured to run a computer program to perform the following steps:
[0170] Step S101, obtaining real-time operation data of the device.
[0171] Step S102, determining a leakage identification result according to the real-time operation data of the equipment and the equipment leakage identification model, wherein the equipment leakage identification model is trained according to the historical operation data of the equipment, and the equipment leakage identification model is used to predict the operation status of the equipment according to the real-time operation data of the equipment, wherein the operation status of the equipment includes normal operation of the equipment without wading in water, electric shock to living beings caused by the equipment without wading in water, faulty operation of the equipment without wading in water, normal operation of the equipment wading in water, faulty operation of the equipment wading in water, and faulty leakage of the equipment wading in water and electric shock to living beings.
[0172] Optionally, the historical operation data of the equipment includes normal operation data of the equipment without water involvement, data of electric shock to living beings caused by the equipment without water involvement, operation data of the equipment without water involvement faults, normal operation data of the equipment involving water involvement, operation data of the equipment involving water involvement faults, and operation data of the equipment involving water involvement faults resulting in leakage and electric shock to living beings.
[0173] Optionally, the equipment leakage identification model is trained based on the equipment historical operation data, including: normalizing the equipment historical data according to a preset normalization formula to obtain a normalized data set; and training a preset model based on the normalized data set to obtain the equipment leakage identification model.
[0174] Optionally, the preset model is a support vector machine classification model.
[0175] Optionally, according to a normalized data set, a preset model is trained to obtain a device leakage identification model, including: initializing parameters of the Sky Eagle algorithm, where the parameters include the Sky Eagle group, the maximum number of iterations, the search upper bound and the search lower bound; using a chaotic cubic mapping method to initialize the Sky Eagle group to obtain a target Sky Eagle group; according to the target Sky Eagle group, initializing a preset model to obtain a model to be trained; according to the parameters and the normalized data set, the model to be trained is trained to obtain a leakage identification model.
[0176] Optionally, the model to be trained is trained according to the parameters and the normalized data set to obtain a leakage identification model, including: obtaining the current number of iterations; determining the eagle hunting method according to the current number of iterations and the maximum number of iterations, wherein the eagle hunting method is used to determine the position of the eagle in the eagle group, and the position of each eagle represents a set of tuning parameters, and the tuning parameters include a penalty coefficient, a relaxation factor and function parameters in a preset model; determining the position of the eagle group according to the eagle hunting method, wherein the position of the eagle group includes the position of each eagle; determining the best eagle position in the eagle group according to the preset fitness algorithm; and training the model to be trained according to the best eagle position to obtain a leakage identification model.
[0177] Optionally, the Sky Eagle hunting mode is determined according to the current number of iterations and the maximum number of iterations, including: in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the first preset condition, and the generated random number is less than or equal to the preset value, determining that the Sky Eagle hunting mode is the first preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the first preset condition, and the generated random number is greater than the preset value, determining that the Sky Eagle hunting mode is the second preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the second preset condition, and the generated random number is less than or equal to the preset value, determining that the Sky Eagle hunting mode is the third preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the second preset condition, and the generated random number is greater than the preset value, determining that the Sky Eagle hunting mode is the fourth preset mode.
[0178] Optionally, the device leakage identification method also includes: controlling the leakage protector according to a preset fault handling strategy based on the leakage identification result.
[0179] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0180] An embodiment of the present invention further provides a non-volatile storage medium, in which a computer program is stored, wherein the computer program is configured to execute the device leakage identification method described in any of the above embodiments when running on a computer or a processor.
[0181] Optionally, in this embodiment, the above-mentioned computer program may be configured to store a computer program for performing the following steps:
[0182] Step S101, obtaining real-time operation data of the device.
[0183] Step S102, determining a leakage identification result according to the real-time operation data of the equipment and the equipment leakage identification model, wherein the equipment leakage identification model is trained according to the historical operation data of the equipment, and the equipment leakage identification model is used to predict the operation status of the equipment according to the real-time operation data of the equipment, wherein the operation status of the equipment includes normal operation of the equipment without wading in water, electric shock to living beings caused by the equipment without wading in water, faulty operation of the equipment without wading in water, normal operation of the equipment wading in water, faulty operation of the equipment wading in water, and faulty leakage of the equipment wading in water and electric shock to living beings.
[0184] Optionally, the historical operation data of the equipment includes normal operation data of the equipment without water involvement, data of electric shock to living beings caused by the equipment without water involvement, operation data of the equipment without water involvement faults, normal operation data of the equipment involving water involvement, operation data of the equipment involving water involvement faults, and operation data of the equipment involving water involvement faults resulting in leakage and electric shock to living beings.
[0185] Optionally, the equipment leakage identification model is trained based on the equipment historical operation data, including: normalizing the equipment historical data according to a preset normalization formula to obtain a normalized data set; and training a preset model based on the normalized data set to obtain the equipment leakage identification model.
[0186] Optionally, the preset model is a support vector machine classification model.
[0187] Optionally, according to a normalized data set, a preset model is trained to obtain a device leakage identification model, including: initializing parameters of the Sky Eagle algorithm, where the parameters include the Sky Eagle group, the maximum number of iterations, the search upper bound and the search lower bound; using a chaotic cubic mapping method to initialize the Sky Eagle group to obtain a target Sky Eagle group; according to the target Sky Eagle group, initializing a preset model to obtain a model to be trained; according to the parameters and the normalized data set, the model to be trained is trained to obtain a leakage identification model.
[0188] Optionally, the model to be trained is trained according to the parameters and the normalized data set to obtain a leakage identification model, including: obtaining the current number of iterations; determining the eagle hunting method according to the current number of iterations and the maximum number of iterations, wherein the eagle hunting method is used to determine the position of the eagle in the eagle group, and the position of each eagle represents a set of tuning parameters, and the tuning parameters include a penalty coefficient, a relaxation factor and function parameters in a preset model; determining the position of the eagle group according to the eagle hunting method, wherein the position of the eagle group includes the position of each eagle; determining the best eagle position in the eagle group according to the preset fitness algorithm; and training the model to be trained according to the best eagle position to obtain a leakage identification model.
[0189] Optionally, the Sky Eagle hunting mode is determined according to the current number of iterations and the maximum number of iterations, including: in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the first preset condition, and the generated random number is less than or equal to the preset value, determining that the Sky Eagle hunting mode is the first preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the first preset condition, and the generated random number is greater than the preset value, determining that the Sky Eagle hunting mode is the second preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the second preset condition, and the generated random number is less than or equal to the preset value, determining that the Sky Eagle hunting mode is the third preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the second preset condition, and the generated random number is greater than the preset value, determining that the Sky Eagle hunting mode is the fourth preset mode.
[0190] Optionally, the device leakage identification method also includes: controlling the leakage protector according to a preset fault handling strategy based on the leakage identification result.
[0191] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0192] An embodiment of the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the device leakage identification method described in any of the above embodiments is implemented.
[0193] Optionally, in this embodiment, the above computer program implements the following steps when executed by a processor:
[0194] Step S101, obtaining real-time operation data of the device.
[0195] Step S102, determining a leakage identification result according to the real-time operation data of the equipment and the equipment leakage identification model, wherein the equipment leakage identification model is trained according to the historical operation data of the equipment, and the equipment leakage identification model is used to predict the operation status of the equipment according to the real-time operation data of the equipment, wherein the operation status of the equipment includes normal operation of the equipment without wading in water, electric shock to living beings caused by the equipment without wading in water, faulty operation of the equipment without wading in water, normal operation of the equipment wading in water, faulty operation of the equipment wading in water, and faulty leakage of the equipment wading in water and electric shock to living beings.
[0196] Optionally, the historical operation data of the equipment includes normal operation data of the equipment without water involvement, data of electric shock to living beings caused by the equipment without water involvement, operation data of the equipment without water involvement faults, normal operation data of the equipment involving water involvement, operation data of the equipment involving water involvement faults, and operation data of the equipment involving water involvement faults resulting in leakage and electric shock to living beings.
[0197] Optionally, the equipment leakage identification model is trained based on the equipment historical operation data, including: normalizing the equipment historical data according to a preset normalization formula to obtain a normalized data set; and training a preset model based on the normalized data set to obtain the equipment leakage identification model.
[0198] Optionally, the preset model is a support vector machine classification model.
[0199] Optionally, according to a normalized data set, a preset model is trained to obtain a device leakage identification model, including: initializing parameters of the Sky Eagle algorithm, where the parameters include the Sky Eagle group, the maximum number of iterations, the search upper bound and the search lower bound; using a chaotic cubic mapping method to initialize the Sky Eagle group to obtain a target Sky Eagle group; according to the target Sky Eagle group, initializing a preset model to obtain a model to be trained; according to the parameters and the normalized data set, the model to be trained is trained to obtain a leakage identification model.
[0200] Optionally, the model to be trained is trained according to the parameters and the normalized data set to obtain a leakage identification model, including: obtaining the current number of iterations; determining the eagle hunting method according to the current number of iterations and the maximum number of iterations, wherein the eagle hunting method is used to determine the position of the eagle in the eagle group, and the position of each eagle represents a set of tuning parameters, and the tuning parameters include a penalty coefficient, a relaxation factor and function parameters in a preset model; determining the position of the eagle group according to the eagle hunting method, wherein the position of the eagle group includes the position of each eagle; determining the best eagle position in the eagle group according to the preset fitness algorithm; and training the model to be trained according to the best eagle position to obtain a leakage identification model.
[0201] Optionally, the Sky Eagle hunting mode is determined according to the current number of iterations and the maximum number of iterations, including: in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the first preset condition, and the generated random number is less than or equal to the preset value, determining that the Sky Eagle hunting mode is the first preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the first preset condition, and the generated random number is greater than the preset value, determining that the Sky Eagle hunting mode is the second preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the second preset condition, and the generated random number is less than or equal to the preset value, determining that the Sky Eagle hunting mode is the third preset mode; or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the second preset condition, and the generated random number is greater than the preset value, determining that the Sky Eagle hunting mode is the fourth preset mode.
[0202] Optionally, the device leakage identification method also includes: controlling the leakage protector according to a preset fault handling strategy based on the leakage identification result.
[0203] 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.
[0204] In some embodiments provided in the present 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 modules can be a logical function division. There may be other division methods in actual implementation. For example, multiple modules 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, modules or indirect coupling or communication connection of modules, which can be electrical or other forms.
[0205] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0206] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.
[0207] If the integrated module is implemented in the form of a software function module 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, disk or optical disk and other media that can store program codes.
[0208] 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 leakage of equipment, applied to leakage protector, characterized in that: include: Obtain real-time operation data of equipment; A leakage current identification result is determined according to the real-time operation data of the device and the leakage current identification model of the device, wherein the leakage current identification model of the device is trained according to the historical operation data of the device, and the leakage current identification model of the device is used to predict the operation status of the device according to the real-time operation data of the device, wherein the operation status of the device includes normal operation of the device without wading into water, electric shock to living beings caused by the device without wading into water, faulty operation of the device without wading into water, normal operation of the device wading into water, faulty operation of the device wading into water, and faulty leakage of the device wading into water and electric shock to living beings.
2. The device leakage identification method according to claim 1, characterized in that: The historical operation data of the equipment includes normal operation data of the equipment without water involvement, data of electric shock to living beings caused by the equipment without water involvement, operation data of the equipment without water involvement failure, normal operation data of the equipment with water involvement, operation data of the equipment with water involvement failure, and operation data of the equipment with water involvement failure leakage and electric shock to living beings.
3. The device leakage identification method according to claim 1, characterized in that: The equipment leakage identification model is trained based on the historical operation data of the equipment, and includes: Normalizing the historical data of the device according to a preset normalization formula to obtain a normalized data set; According to the normalized data set, a preset model is trained to obtain the equipment leakage identification model.
4. The method for identifying leakage of equipment according to claim 3, characterized in that: The preset model is a support vector machine classification model.
5. The method for identifying equipment leakage according to claim 4, characterized in that: The step of training a preset model according to the normalized data set to obtain the device leakage identification model includes: Initialize the parameters of the Skyhawk algorithm, wherein the parameters include the Skyhawk group, the maximum number of iterations, the search upper bound, and the search lower bound; A chaotic cubic mapping method is used to initialize the eagle group to obtain a target eagle group; Initializing the preset model according to the target eagle group to obtain a model to be trained; The model to be trained is trained according to the parameters and the normalized data set to obtain the leakage identification model.
6. The method for identifying equipment leakage according to claim 5, characterized in that: The step of training the model to be trained according to the parameters and the normalized data set to obtain the leakage identification model includes: Get the current iteration number; Determine a hawk hunting mode according to the current number of iterations and the maximum number of iterations, wherein the hawk hunting mode is used to determine the position of the hawks in the hawk group, each position of the hawk represents a set of tuning parameters, and the tuning parameters include a penalty coefficient, a relaxation factor and a function parameter in the preset model; Determine the position of a flock of eagles according to the eagle hunting method, wherein the position of the eagle flock includes the position of each eagle; Determine the best eagle position among the eagle group positions according to a preset fitness algorithm; The model to be trained is trained according to the optimal eagle position to obtain the leakage identification model.
7. The method for identifying equipment leakage according to claim 6, characterized in that: The step of determining the sky eagle hunting mode according to the current number of iterations and the maximum number of iterations includes: In response to the relationship between the current number of iterations and the maximum number of iterations satisfying a first preset condition, and the generated random number is less than or equal to a preset value, determining that the Sky Eagle hunting mode is a first preset mode; Or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying the first preset condition, and the generated random number is greater than the preset value, determining that the Sky Eagle hunting mode is the second preset mode; Or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying a second preset condition, and the generated random number is less than or equal to the preset value, determining that the Sky Eagle hunting mode is a third preset mode; Or, in response to the relationship between the current number of iterations and the maximum number of iterations satisfying a second preset condition, and the generated random number is greater than the preset value, the Sky Eagle hunting mode is determined to be a fourth preset mode.
8. The method for identifying equipment leakage according to claim 1, characterized in that: Also includes: According to the leakage identification result and the preset fault handling strategy, the leakage protector is controlled.
9. A device leakage identification system, characterized in that: include: Acquisition module, used to obtain real-time operation data of the equipment; An identification module is used to determine a leakage identification result according to the real-time operation data of the device and the leakage identification model of the device, wherein the leakage identification model of the device is trained according to the historical operation data of the device, and the leakage identification model of the device is used to predict the operation status of the device according to the real-time operation data of the device, wherein the operation status of the device includes normal operation of the device without wading in water, electric shock to living beings caused by the device without wading in water, faulty operation of the device without wading in water, normal operation of the device wading in water, faulty operation of the device wading in water, and faulty leakage of the device wading in water and electric shock to living beings.
10. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to run the computer program to execute the device leakage identification method as described in any one of claims 1 to 8.
11. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, wherein the computer program is configured to execute the device leakage identification method described in any one of claims 1 to 8 when running on a computer or a processor.
12. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the device leakage identification method according to any one of claims 1 to 8.
Citation Information
Cited By
Electric leakage detection method and electric leakage detection system of electric power system
CN119044828A
