Electric meter fault classification method, device and electronic equipment based on support vector machine
Through the fault classification method based on support vector machine and iteratively searching for optimization of support vector machine parameters in combination with the population optimization algorithm, the problem of difficult to accurately predict the fault classification of smart meters is solved, and fast and accurate fault classification and resource optimization are achieved.
Patent Information
- Application Number
- CN202210727970.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-23
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2042-06-23
AI Technical Summary
In intelligent power grids, the fault classification of smart meters is difficult to accurately predict, resulting in uneven investment in maintenance forces, excessive maintenance cycle, and serious waste of resources.
Using the fault classification method based on the support vector machine, the operating information of the power meter is obtained and input into the pre-trained support vector machine classification model, and the parameter combination of the support vector machine is iteratively searched for optimization to obtain the optimal parameter combination. And train the Support Vector Machine Classification Model.
It realizes the rapid and accurate classification of smart meter fault types, optimizes the configuration of maintenance resources, and reduces maintenance cycles and resource waste.
Smart Images

Figure CN115081527B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of electric power technology, and in particular relates to an electric meter fault classification method, device and electronic equipment based on a support vector machine. Background Art
[0002] As the establishment of smart grids in my country accelerates, the number of smart meters has exploded, and various problems have emerged. First, a large number of meters in operation have reached the replacement period and are facing the problem of demolition, calibration, and reuse. If all of them are dismantled and replaced with new ones, it will waste resources and consume a lot of manpower. In addition, since most maintenance personnel do not have the ability to handle all fault problems, there are problems such as uneven maintenance force input and long maintenance cycles. Therefore, when a meter fails, it is very important to reasonably predict the type of failure. Assigning relevant technicians according to the type of fault can reduce the manpower and resource costs of power grid companies in the operation and maintenance of smart meters. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides an electric meter fault classification method, device and electronic device based on a support vector machine, so as to reasonably predict the fault type of the electric meter when a fault occurs in the electric meter.
[0004] A first aspect of an embodiment of the present invention provides an electric meter fault classification method based on a support vector machine, comprising:
[0005] Obtaining the operating information of the target faulty electric meter, inputting the operating information into a pre-trained support vector machine classification model, and obtaining the fault type of the target faulty electric meter;
[0006] Among them, the training process of the support vector machine classification model is:
[0007] Obtaining the operating information of different fault types and their corresponding faulty electric meters to obtain training data;
[0008] The parameter combination of the support vector machine is iteratively optimized through the population optimization algorithm to obtain the optimal parameter combination of the support vector machine; wherein, each individual in the population optimization algorithm is a parameter combination, and before reaching the preset number of iterations, the locust algorithm and the firefly algorithm are used to jointly update the individual position, and after reaching the preset number of iterations, the locust algorithm is used to update the individual position, and the preset number of iterations is less than the maximum number of iterations; based on the optimal parameter combination and training data, the support vector machine classification model is trained.
[0009] Optionally, after obtaining the operation information of the target faulty electric meter, the method further includes:
[0010] Normalizing the operation information of the target faulty electric meter;
[0011] And, after obtaining the training data, it also includes:
[0012] Normalize the training data.
[0013] Optionally, the parameter combination of the support vector machine is iteratively optimized by a population optimization algorithm to obtain the optimal parameter combination of the support vector machine, including:
[0014] Set the population optimization algorithm parameters and initialize the individual population through iterative chaos mapping;
[0015] For each individual, an initial support vector machine classification model is trained based on the individual and training data, the accuracy of the model is used as the fitness of the individual, and the individual corresponding to the minimum fitness is determined;
[0016] Update the position of individuals in the population, calculate the fitness value of each new individual, determine and update the individual corresponding to the global minimum fitness, and iterate continuously until the maximum number of iterations is reached;
[0017] The individual corresponding to the global minimum fitness is determined as the optimal parameter combination.
[0018] Optionally, the formula for jointly updating individual positions using the locust algorithm and the firefly algorithm is:
[0019]
[0020]
[0021] In the formula, represents the position of the i-th individual in the t+1 generation; is the optimal position of the tth generation; d represents the dimension of the data feature; i and j represent the number of each individual; β is the attractiveness of the firefly; rand is the function that generates random numbers between (0,1); ub d and lb d Respectively represent the upper and lower limits of the search range; function is the attraction function, which indicates the influence of attraction between two individuals; d ij =|x i -x j | represents the Euclidean distance between the i-th individual and the j-th individual; T d represents the individual position searched by the algorithm so far; c m is the control coefficient; N is the maximum number of iterations.
[0022] Optionally, the formula for updating individual positions using the locust algorithm is:
[0023]
[0024] In the formula, d represents the dimension of the data feature; i and j represent the number of each individual; ub d and lb d Respectively represent the upper and lower limits of the search range; function is the attraction function; it indicates the influence of attraction between two individuals; d ij =|x i -x j | represents the Euclidean distance between the i-th individual and the j-th individual; T d represents the individual position searched by the algorithm so far; c m is the control coefficient; N is the maximum number of iterations.
[0025] Optionally, during each iteration, the control coefficient c m Updated via the inverse trigonometric tangent function;
[0026] Update the control coefficient c by the inverse trigonometric tangent function m The formula is:
[0027] c m =(c max +c min ) / 2+[(c max +c min ) / 2]×[(-arctan(t / T max )-0.5)×k]
[0028] In the formula, c max and c min are the maximum and minimum values of the decreasing interval, t is the current iteration number, T max is the maximum number of iterations, k is a tuning parameter, ranging from 15 to 20.
[0029] Optionally, the preset number of iterations is half of the maximum number of iterations.
[0030] A second aspect of an embodiment of the present invention provides an electric meter fault classification device based on a support vector machine, comprising:
[0031] A classification module is used to obtain the operating information of the target faulty electric meter, input the operating information into a pre-trained support vector machine classification model, and obtain the fault type of the target faulty electric meter;
[0032] The training module is used to obtain the operating information of different fault types and their corresponding faulty electric meters to obtain training data; the parameter combination of the support vector machine is iteratively optimized through the population optimization algorithm to obtain the optimal parameter combination of the support vector machine; wherein each individual in the population optimization algorithm is a parameter combination, and before reaching a preset number of iterations, the locust algorithm and the firefly algorithm are used to jointly update the individual position, and after reaching the preset number of iterations, the locust algorithm is used to update the individual position, and the preset number of iterations is less than the maximum number of iterations; based on the optimal parameter combination and the training data, the support vector machine classification model is trained.
[0033] A third aspect of an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the electric meter fault classification method based on a support vector machine as described in the first aspect above are implemented.
[0034] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the electric meter fault classification method based on a support vector machine as described in the first aspect above are implemented.
[0035] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0036] The embodiment of the present invention iteratively optimizes the parameter combination of the support vector machine through an improved population optimization algorithm. Specifically, in the early stage of iteration, the locust algorithm and the firefly algorithm are used to jointly update the individual positions to improve the global development capability. In the later stage of iteration, the advantages of the locust algorithm are used to perform local development, thereby obtaining the optimal parameter combination of the support vector machine. Then, the support vector machine classification model is trained according to the training data and the optimal parameter combination, and the rapid classification of the fault types of the smart meter is achieved based on the trained model. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0038] Figure 1 It is a schematic diagram of the implementation flow of the electric meter fault classification method based on support vector machine provided in an embodiment of the present invention;
[0039] Figure 2 It is a detailed flow chart of an electric meter fault classification method based on a support vector machine provided in an embodiment of the present invention;
[0040] Figure 3 is a structural schematic diagram of an electric meter fault classification device based on a support vector machine provided in an embodiment of the present invention;
[0041] Figure 4 is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0043] In order to illustrate the technical solution of the present invention, a specific embodiment is provided below for illustration.
[0044] The embodiment of the present invention provides an electric meter fault classification method based on a support vector machine, comprising:
[0045] The operating information of the target faulty electric meter is obtained, and the operating information is input into a pre-trained support vector machine classification model to obtain the fault type of the target faulty electric meter.
[0046] Among them, see Figure 1 As shown in Figure 1, the training process of the support vector machine classification model is as follows:
[0047] Step S101, obtaining operation information of different fault types and their corresponding faulty electric meters to obtain training data.
[0048] In the embodiment of the present invention, the failure data of the electric meter at different stages can be extracted from the metering production scheduling platform, the electricity consumption information collection system, and the marketing business application system. Some of the data are shown in Table 1.
[0049] Table 1 Operation fault data table
[0050]
[0051] In this embodiment, considering that when the order of magnitude of the data differs too much or the dimensions are different, it will affect the result of data analysis, so the original data should be normalized. Assume that the data sample of the energy meter classification is (x i ,y i ), where i = 1, 2, ... l. x i is a vector in the feature set, belonging to the real number range in the n-dimensional vector space, y i It is a classification label, representing the fault type of the electric energy meter.
[0052] Perform min-max normalization on the data used In the formula, x * is the data after standardization, max is the maximum value of a feature in the sample, and min is the minimum value of a feature in the sample. By linearly transforming the original data, the result is mapped to the [0,1] interval, which is convenient for the next step of processing.
[0053] Step S102, iteratively optimizing the parameter combination of the support vector machine by using a population optimization algorithm to obtain the optimal parameter combination of the support vector machine.
[0054] Among them, each individual in the population optimization algorithm is a parameter combination. Before reaching the preset number of iterations, the locust algorithm and the firefly algorithm are used to jointly update the individual position. After reaching the preset number of iterations, the locust algorithm is used to update the individual position. The preset number of iterations is less than the maximum number of iterations.
[0055] As a possible implementation, in step S102, the parameter combination of the support vector machine is iteratively optimized by a population optimization algorithm to obtain the optimal parameter combination of the support vector machine, which can be described in detail as follows:
[0056] S1021, set the population optimization algorithm parameters and initialize the individual population through iterative chaotic mapping.
[0057] In this embodiment, the population optimization algorithm parameters are set including: initializing the maximum number of iterations N, the number of locusts in the population n, the upper and lower limits of the variables, and the control parameter c m The maximum value and other parameters.
[0058] A chaotic system refers to a deterministic system in which there are seemingly random irregular motions, and its behavior is uncertain, non-repeatable, and unpredictable. This is the chaotic phenomenon. In the field of intelligent algorithm optimization, it is usually adopted to directly use a function to directly generate an initial population of approximate pseudo-random numbers. However, using a chaotic map to initialize the population can often achieve better results than the former. Commonly used chaotic systems include Iterative, Chebyshev, Circle, Sine, Gauss / mouse, etc. This embodiment uses an Iterative chaotic map to initialize the population, and its mathematical expression is as follows:
[0059]
[0060] In the formula, b∈[0,1] is called the Iterative parameter. Studies have shown that when X∈[0,1], the chaotic sequence generated by the Iterative mapping is non-periodic, non-convergent, and has good randomness and ergodicity. The generated random sequence can be distributed more evenly in the search space. In this embodiment, b is set to 0.5.
[0061] S1022, for each individual, train an initial support vector machine classification model according to the individual and the training data, use the accuracy of the model as the fitness of the individual, and determine the individual corresponding to the minimum fitness.
[0062] In this embodiment, the fitness of the initialized individuals is calculated, and the minimum fitness value is taken as the target value, and the subsequent populations all follow this target value. During the iteration of the algorithm, the position of the group is continuously updated, and the new fitness value is calculated, compared with the original one, and the best one is selected.
[0063] S1023, update the position of individuals in the population, calculate the fitness value of each new individual, determine and update the individual corresponding to the global minimum fitness, and iterate continuously until the maximum number of iterations is reached.
[0064] In this embodiment, the locust algorithm and the firefly algorithm are used to jointly update individual positions in the early stage of iteration to improve the global development capability, and the advantages of the locust algorithm are used for local development in the later stage of iteration.
[0065] The Grasshopper Optimization Algorithm (GOA) is a new meta-heuristic algorithm that finds patterns from the foraging behavior of locust swarms in nature and uses it in multi-objective optimization problems to optimize the problem better. The role of locust larvae is to conduct local development at a specific location, while adult locusts, because they have wings, are responsible for searching over a large range or even globally to obtain better food source areas. The next search location of the locust is determined by the current location, the global target value, and the locations of other locusts. The position movement formula of the locust swarm in d-dimensional space is:
[0066]
[0067] c m is the control coefficient, which is similar to the inertia weight of the particle swarm and plays a role in transforming the algorithm from global search to local development process during the entire algorithm operation. m It should be slightly larger to increase the global optimization ability of the algorithm, and should be gradually reduced during the operation process, becoming smaller in the later stage of the algorithm to enhance the local optimization ability of the algorithm. Therefore, this embodiment adopts a curve adaptive method to optimize c mThe parameter is the inverse trigonometric tangent function. The inverse trigonometric tangent function is an S-shaped function, and its decreasing curve interval can just meet the above requirements. m The formula is as follows:
[0068] c m =(c max +c min ) / 2+[(c max +c min ) / 2]×[(-arctan(t / T max )-0.5)×k]
[0069] In the formula, c max and c min are the maximum and minimum values of the decreasing interval, t is the current iteration number, T max is the maximum number of iterations, k is a tuning parameter, ranging from 15 to 20.
[0070] In the firefly algorithm, the main purpose of fireflies emitting light is to attract other fireflies. Therefore, the firefly algorithm has the following assumptions: (1) The gender of fireflies can be distinguished. Whether a firefly can attract other fireflies is determined only by its brightness. The firefly that attracts other individuals must be brighter than the firefly that is attracted. (2) The attraction of a firefly is proportional to its own brightness, but its brightness will decrease with the increase of distance. (3) If a firefly cannot find a firefly brighter than itself, it will move its position randomly.
[0071] The firefly position update formula is: i =x i +β×(x j -x i )+α×rand
[0072] From the formulas of the above two algorithms, it can be seen that the position update of GOA is determined by the interaction between its own position and other locusts and the target position, so the local development ability of the GOA algorithm is strong, but the global optimization ability is weak. Therefore, in the early stage of iteration, the update method combining the firefly algorithm and the locust algorithm is used to update the position. As a possible implementation method, the number of iterations P is preset. c is half of the maximum number of iterations, then when the number of iterations is less than P c When , the locust algorithm and firefly algorithm are used to jointly update the individual position, the formula is:
[0073]
[0074]
[0075] In the formula, represents the position of the i-th individual in the t+1 generation; is the optimal position of the tth generation; d represents the dimension of the data feature; i and j represent the number of each individual; β is the attractiveness of the firefly; rand is the function that generates random numbers between (0,1); ub d and lb d Respectively represent the upper and lower limits of the search range; function is the attraction function, which indicates the influence of attraction between two individuals; d ij =|x i -x j | represents the Euclidean distance between the i-th individual and the j-th individual; T d represents the individual position searched by the algorithm so far; c m is the control coefficient; N is the maximum number of iterations.
[0076] When the number of iterations is not less than P c When , the locust algorithm is used to update the individual position, the formula is:
[0077]
[0078] In the formula, d represents the dimension of the data feature; i and j represent the number of each individual; ub d and lb d Respectively represent the upper and lower limits of the search range; function is the attraction function; it indicates the influence of attraction between two individuals; d ij =|x i -x j | represents the Euclidean distance between the i-th individual and the j-th individual; T d represents the individual position searched by the algorithm so far; c m is the control coefficient; N is the maximum number of iterations.
[0079] S1024, determining the individual corresponding to the global minimum fitness as the optimal parameter combination.
[0080] In this embodiment, the optimal individual position and population fitness are continuously searched through iterations until the number of iterations meets the preset maximum number of iterations, and the support vector machine penalty parameter c and the kernel function g are obtained.
[0081] S103, based on the optimal parameter combination and the training data, a support vector machine classification model is trained.
[0082] In this embodiment, the nonlinear support vector machine with the kernel function can process data of higher dimensions. This embodiment uses the radial basis kernel function for calculation.
[0083]
[0084] Where g is the kernel function.
[0085] It can be seen that the embodiment of the present invention iteratively optimizes the parameter combination of the support vector machine through the improved population optimization algorithm. Specifically, in the early stage of iteration, the locust algorithm and the firefly algorithm are used to jointly update the individual positions to improve the global development capability. In the later stage of iteration, the advantages of the locust algorithm are used to perform local development, thereby obtaining the optimal parameter combination of the support vector machine, and then training the support vector machine classification model according to the training data and the optimal parameter combination, and realizing rapid classification of smart meter fault types based on the trained model.
[0086] In one embodiment, the overall implementation process of the electric meter fault classification method based on support vector machine can be seen in Figure 2 As shown in the figure. First, the fault information of the electric energy meter is comprehensively sorted out, which is divided into verification, operation, and disassembly directions, such as the electric energy meter number, manufacturer, region, operation time, output voltage, output current, output power, power factor error, etc. The fault types include error tolerance, DC current open circuit, DC voltage short circuit, control circuit disconnection, appearance fault, clock unit fault, display unit fault, communication module fault, etc. Through the big data processing method, the data with fewer null values in the massive data are interpolated. If the data is seriously missing, the direct deletion method is adopted. The 3σ principle is used to eliminate outliers, and the min-max standardization mentioned above is performed on the data of different dimensions, so that the data of different dimensions have the same dimension, which is helpful to improve the classification accuracy of the model and the convergence speed of the algorithm. Then, the iterative algorithm is used to generate the initial population. First, a random number is randomly generated, and the value of b is taken as 0.5. The initial population is input, and then it is iterated to generate a chaotic initial population, which improves the quality of the initial solution, is conducive to optimizing the global search ability of the locust algorithm, and effectively reduces the iterative oscillation phenomenon of the algorithm when the optimal solution appears. The preprocessed data set is input into the locust optimization support vector machine model. The control parameter c of the locust algorithm is m The update is performed by using a curve adaptive method based on the inverse trigonometric tangent. In the early stage of the optimization, the firefly algorithm is combined to update the locust position to improve the global development capability. In the second half, the advantages of the locust algorithm are used for local development. The improved GOA algorithm is used to find the parameters c and g that make the SVM obtain the global optimality, and the fault types of the electric energy meter are quickly and effectively classified.
[0087] The electric meter fault classification method based on support vector machine proposed in this embodiment also has the following advantages:
[0088] (1) Low cost, no additional equipment investment required.
[0089] (2) It can more accurately identify the fault of the electric energy meter and provide valuable maintenance information to the maintenance personnel, so that they can respond to the faulty electric energy meter in a more targeted manner and save labor costs.
[0090] (3) Quickly and accurately solving problems for electricity users can improve user satisfaction.
[0091] (4) It can guide the selection of electric energy meters to a certain extent, improve the working stability of electric energy meters, and provide a certain reference for electricity procurement.
[0092] (5) It can identify faults in operating electricity meters and develop precise strategies for replacing electricity meters, thus reducing operating costs for the company.
[0093] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0094] An embodiment of the present invention provides an electric meter fault classification device based on a support vector machine, see Figure 3 As shown, the device 30 includes:
[0095] The training module 31 is used to obtain the operating information of different fault types and their corresponding faulty meters to obtain training data; the parameter combination of the support vector machine is iteratively optimized through the population optimization algorithm to obtain the optimal parameter combination of the support vector machine; wherein each individual in the population optimization algorithm is a parameter combination, and before reaching a preset number of iterations, the locust algorithm and the firefly algorithm are used to jointly update the individual position, and after reaching a preset number of iterations, the locust algorithm is used to update the individual position, and the preset number of iterations is less than the maximum number of iterations; based on the optimal parameter combination and the training data, a support vector machine classification model is trained.
[0096] The classification module 32 is used to obtain the operation information of the target faulty electric meter, input the operation information into the pre-trained support vector machine classification model, and obtain the fault type of the target faulty electric meter.
[0097] As a possible implementation, the training module 31 is further used to perform normalization processing on the training data. The classification module 32 is further used to perform normalization processing on the operation information of the target faulty electric meter.
[0098] As a possible implementation, the training module 31 is specifically used for:
[0099] Set the population optimization algorithm parameters and initialize the individual population through iterative chaos mapping;
[0100] For each individual, an initial support vector machine classification model is trained based on the individual and training data, the accuracy of the model is used as the fitness of the individual, and the individual corresponding to the minimum fitness is determined;
[0101] Update the position of individuals in the population, calculate the fitness value of each new individual, determine and update the individual corresponding to the global minimum fitness, and iterate continuously until the maximum number of iterations is reached;
[0102] The individual corresponding to the global minimum fitness is determined as the optimal parameter combination.
[0103] As a possible implementation method, the formula for jointly updating individual positions using the locust algorithm and the firefly algorithm is:
[0104]
[0105]
[0106] In the formula, represents the position of the i-th individual in the t+1 generation; is the optimal position of the tth generation; d represents the dimension of the data feature; i and j represent the number of each individual; β is the attractiveness of the firefly; rand is the function that generates random numbers between (0,1); ub d and lb d Respectively represent the upper and lower limits of the search range; function is the attraction function, which indicates the influence of attraction between two individuals; d ij =|x i -x j | represents the Euclidean distance between the i-th individual and the j-th individual; T d represents the individual position searched by the algorithm so far; c m is the control coefficient; N is the maximum number of iterations.
[0107] As a possible implementation method, the formula for updating individual positions using the locust algorithm is:
[0108]
[0109] In the formula, d represents the dimension of the data feature; i and j represent the number of each individual; ub d and lb d Respectively represent the upper and lower limits of the search range; function is the attraction function; it indicates the influence of attraction between two individuals; d ij =|x i -x j | represents the Euclidean distance between the i-th individual and the j-th individual; T drepresents the individual position searched by the algorithm so far; c m is the control coefficient; N is the maximum number of iterations.
[0110] As a possible implementation method, in each iteration, the control coefficient c m Updated by the inverse trigonometric tangent function. Updated by the inverse trigonometric tangent function. m The formula is:
[0111] c m =(c max +c min ) / 2+[(c max +c min ) / 2]×[(-arctan(t / T max )-0.5)×k]
[0112] In the formula, c max and c min are the maximum and minimum values of the decreasing interval, t is the current iteration number, T max is the maximum number of iterations, k is a tuning parameter, ranging from 15 to 20.
[0113] As a possible implementation manner, the preset number of iterations is half of the maximum number of iterations.
[0114] Figure 4 FIG. 4 is a schematic diagram of an electronic device 40 provided by an embodiment of the present invention. Figure 4 As shown, the electronic device 40 of this embodiment includes: a processor 41, a memory 42, and a computer program 43 stored in the memory 42 and executable on the processor 41, such as an electric meter fault classification program based on a support vector machine. When the processor 41 executes the computer program 43, the steps in the above-mentioned electric meter fault classification method embodiments based on a support vector machine are implemented, such as Figure 1 Alternatively, when the processor 41 executes the computer program 43, the functions of each module in the above-mentioned device embodiments are realized, for example Figure 3 The functions of the modules 31 to 32 shown. Exemplarily, the computer program 43 can be divided into one or more modules / units, one or more modules / units are stored in the memory 42 and executed by the processor 41 to complete the present invention. One or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program 43 in the electronic device 40. For example, the computer program 43 can be divided into a training module 31 and a classification module 32 (modules in the virtual device), and the specific functions of each module are as follows:
[0115] The training module 31 is used to obtain the operating information of different fault types and their corresponding faulty meters to obtain training data; the parameter combination of the support vector machine is iteratively optimized through the population optimization algorithm to obtain the optimal parameter combination of the support vector machine; wherein each individual in the population optimization algorithm is a parameter combination, and before reaching a preset number of iterations, the locust algorithm and the firefly algorithm are used to jointly update the individual position, and after reaching a preset number of iterations, the locust algorithm is used to update the individual position, and the preset number of iterations is less than the maximum number of iterations; based on the optimal parameter combination and the training data, a support vector machine classification model is trained.
[0116] The classification module 32 is used to obtain the operation information of the target faulty electric meter, input the operation information into the pre-trained support vector machine classification model, and obtain the fault type of the target faulty electric meter.
[0117] The electronic device 40 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device 40 may include, but is not limited to, a processor 41 and a memory 42. Those skilled in the art will appreciate that Figure 4 It is only an example of the electronic device 40 and does not constitute a limitation of the electronic device 40. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 40 may also include input and output devices, network access devices, buses, etc.
[0118] The processor 41 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0119] The memory 42 may be an internal storage unit of the electronic device 40, such as a hard disk or memory of the electronic device 40. The memory 42 may also be an external storage device of the electronic device 40, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 40. Further, the memory 42 may also include both an internal storage unit of the electronic device 40 and an external storage device. The memory 42 is used to store computer programs and other programs and data required by the electronic device 40. The memory 42 may also be used to temporarily store data that has been output or is to be output.
[0120] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0121] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0122] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0123] In the embodiments provided by the present invention, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are only schematic. For example, the division of modules or units is only 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 devices or units, which can be electrical, mechanical or other forms.
[0124] 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 network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0125] 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.
[0126] If the integrated module / 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 present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.
[0127] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A method for classifying electric meter faults based on support vector machines, characterized in that: include: Acquire operation information of a target faulty electric meter, input the operation information into a pre-trained support vector machine classification model, and obtain the fault type of the target faulty electric meter; The training process of the support vector machine classification model is as follows: Obtaining the operating information of different fault types and their corresponding faulty electric meters to obtain training data; The parameter combination of the support vector machine is iteratively optimized by a population optimization algorithm to obtain the optimal parameter combination of the support vector machine; wherein each individual in the population optimization algorithm is a parameter combination, and before reaching a preset number of iterations, the locust algorithm and the firefly algorithm are used to jointly update the individual position, and after reaching a preset number of iterations, the locust algorithm is used to update the individual position, and the preset number of iterations is less than the maximum number of iterations; based on the optimal parameter combination and the training data, the support vector machine classification model is trained to obtain; The formula for jointly updating individual positions using the locust algorithm and the firefly algorithm is: In the formula, represents the position of the i-th individual in the t+1 generation; is the optimal position of the tth generation; d represents the dimension of the data feature; i and j represent the number of each individual; β is the attractiveness of the firefly; rand is the function that generates random numbers between (0,1); ub d and lb d Respectively represent the upper and lower limits of the search range; function is the attraction function, which indicates the influence of attraction between two individuals; d ij =|x i -x j |, where d ij represents the Euclidean distance between the i-th individual and the j-th individual; c m is the control coefficient; N is the maximum number of iterations.
2. The electric meter fault classification method based on support vector machine according to claim 1, characterized in that: After obtaining the operation information of the target faulty electric meter, it also includes: Normalizing the operation information of the target faulty electric meter; And, after obtaining the training data, it also includes: The training data is normalized.
3. The electric meter fault classification method based on support vector machine according to claim 1, characterized in that: The optimal parameter combination of the support vector machine is obtained by iteratively optimizing the parameter combination of the support vector machine through the population optimization algorithm, including: Set the population optimization algorithm parameters and initialize the individual population through iterative chaos mapping; For each individual, an initial support vector machine classification model is trained based on the individual and training data, the accuracy of the model is used as the fitness of the individual, and the individual corresponding to the minimum fitness is determined; Update the position of individuals in the population, calculate the fitness value of each new individual, determine and update the individual corresponding to the global minimum fitness, and iterate continuously until the maximum number of iterations is reached; The individual corresponding to the global minimum fitness is determined as the optimal parameter combination.
4. The electric meter fault classification method based on support vector machine according to claim 1, characterized in that: The formula for updating individual positions using the locust algorithm is: In the formula, d represents the dimension of the data feature; i and j represent the number of each individual; ub d and lb d Respectively represent the upper and lower limits of the search range; function is the attraction function; it indicates the influence of attraction between two individuals; d ij =|x i -x j | represents the Euclidean distance between the i-th individual and the j-th individual; T d represents the individual position searched by the algorithm so far; c m is the control coefficient; N is the maximum number of iterations.
5. The electric meter fault classification method based on support vector machine as claimed in claim 4, characterized in that: In each iteration, the control coefficient c m Updated via the inverse trigonometric tangent function; Update the control coefficient c by the inverse trigonometric tangent function m The formula is: c m =(c max +c min ) / 2+[(c max +c min ) / 2]×[(-arctan(t / T max )-0.5)×k] In the formula, c max and c min are the maximum and minimum values of the decreasing interval, t is the current iteration number, T max is the maximum number of iterations, k is a tuning parameter, ranging from 15 to 20.
6. The electric meter fault classification method based on support vector machine according to claim 1, characterized in that: The preset number of iterations is half of the maximum number of iterations.
7. An electric meter fault classification device based on support vector machine, characterized in that: include: A classification module, used to obtain the operation information of the target faulty electric meter, input the operation information into a pre-trained support vector machine classification model, and obtain the fault type of the target faulty electric meter; A training module is used to obtain operation information of different fault types and their corresponding faulty electric meters to obtain training data; iteratively optimize the parameter combination of the support vector machine through a population optimization algorithm to obtain the optimal parameter combination of the support vector machine; wherein each individual in the population optimization algorithm is a parameter combination, and before reaching a preset number of iterations, the locust algorithm and the firefly algorithm are used to jointly update the individual position, and after reaching a preset number of iterations, the locust algorithm is used to update the individual position, and the preset number of iterations is less than the maximum number of iterations; based on the optimal parameter combination and the training data, the support vector machine classification model is trained; The formula for jointly updating individual positions using the locust algorithm and the firefly algorithm is: In the formula, represents the position of the i-th individual in the t+1 generation; is the optimal position of the tth generation; d represents the dimension of the data feature; i and j represent the number of each individual; β is the attractiveness of the firefly; rand is the function that generates random numbers between (0,1); ub d and lb d Respectively represent the upper and lower limits of the search range; function is the attraction function, which indicates the influence of attraction between two individuals; d ij =|x i -x j |, where d ij represents the Euclidean distance between the i-th individual and the j-th individual; c m is the control coefficient; N is the maximum number of iterations.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Economic dispatching method with robust collaborative consistency
CN105429185A
Epicyclic gearbox incipient fault diagnosis method based on VMD-AMCKD
CN109029977A