Fault early warning method of alternating current charging pile and related product
The fault diagnosis system built through the random forest prediction model solves the problem of low accuracy in fault diagnosis of charging piles, achieves more accurate fault identification and early warning, and improves the safety and reliability of charging piles.
Patent Information
- Application Number
- CN202411311355.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-09-19
AI Technical Summary
The fault diagnosis of existing charging piles relies on manually set thresholds, resulting in low diagnostic accuracy and the inability to fully identify the electrical faults and safety hazards of charging piles.
The random forest prediction model is adopted to obtain and preprocess the working data of the charging pile, build training sets and test sets, generate fault diagnosis results, and perform early warning operations through an intelligent early warning system to improve the accuracy of fault diagnosis.
It improves the accuracy of charging pile fault diagnosis, enhances the safety and reliability of charging piles, and reduces the risk of overfitting.
Smart Images

Figure CN119272147A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of charging piles in data identification, and in particular to a fault warning method for an AC charging pile and related products. Background Art
[0002] In recent years, the electric vehicle market has continued to grow. In order to support the popularization and use of electric vehicles, the construction of charging pile infrastructure has received more attention, and more and more charging piles have been installed in urban roads, commercial buildings, residential areas and other places to meet the charging needs of electric vehicles.
[0003] According to the research data of the charging pile market, the damage rate of public charging piles has reached 20%, and the equipment failure rate is close to 1 / 3. Charging pile failures may involve electrical failures, overloads or other safety hazards. At present, the fault diagnosis of charging piles mainly relies on manually preset thresholds. As long as a charging pile is found to exceed the threshold, it is judged to be faulty. The consideration factors are single and not comprehensive, resulting in low accuracy of fault diagnosis. Therefore, the problem of how to improve the accuracy of charging pile fault diagnosis needs to be solved urgently. Summary of the invention
[0004] The embodiments of the present application provide a fault warning method for an AC charging pile and related products, which improve the accuracy of charging pile fault diagnosis.
[0005] In a first aspect, an embodiment of the present application provides a fault warning method for an AC charging pile, which is applied to a server of an intelligent warning system, and the method includes:
[0006] Acquire first working data of a target AC charging pile within a first preset time period to obtain n first working data sets, where n is a positive integer;
[0007] Determine the fault data and the normal data of each of the n first working data sets to obtain n first fault data sets and n first normal data sets;
[0008] Preprocessing the n first fault data sets according to a preset preprocessing algorithm to obtain target fault data;
[0009] Preprocessing the n first normal data sets according to the preset preprocessing algorithm to obtain target normal data;
[0010] Dividing the target normal data and the target fault data into a training set and a test set according to a target ratio value;
[0011] Construct a target random forest prediction model according to the training set and the test set;
[0012] Acquire the second working data of the target AC charging pile at the current moment, and obtain n second working data;
[0013] Inputting the n second working data into the target random forest prediction model to obtain a target diagnosis result;
[0014] Determine a target fault corresponding to the target diagnosis result;
[0015] A corresponding fault control instruction is generated according to the target fault, and the intelligent early warning system is controlled by the fault control instruction to perform a corresponding early warning operation.
[0016] In a second aspect, an embodiment of the present application provides a fault warning device for an AC charging pile, which is applied to a server of an intelligent warning system. The device includes: an acquisition unit, a control unit, and a warning unit, wherein:
[0017] The acquisition unit is used to acquire first working data of the target AC charging pile within a first preset time period to obtain n first working data sets; n is a positive integer;
[0018] The control unit is used to determine the first fault data and the first normal data of each of the n first working data sets to obtain n first fault data sets and n first normal data sets; preprocess the n first fault data sets according to a preset preprocessing algorithm to obtain target fault data; preprocess the n first normal data sets according to the preset preprocessing algorithm to obtain target normal data; divide the target normal data n first normal data and the target fault data into a training set and a test set according to a target ratio value; and construct a target random forest prediction model according to the training set and the test set;
[0019] The acquisition unit is further used to acquire the second working data of the target AC charging pile at the current moment, and obtain n second working data; the second preset time is later than the end time of the first preset time period; input the n second working data into the target random forest prediction model to obtain a target diagnosis result; determine the target fault corresponding to the target diagnosis result;
[0020] The early warning unit is used to generate a corresponding fault control instruction according to the target fault, and control the intelligent early warning system to perform a corresponding early warning operation through the fault control instruction.
[0021] In a third aspect, the present application provides an electronic device comprising: a processor and a memory, wherein the memory is used to store one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the present application.
[0022] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in the first aspect of the present application.
[0023] In a fifth aspect, the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the present application. The computer program product may be a software installation package.
[0024] The implementation of this application has the following beneficial effects:
[0025] It can be seen that the fault warning method of an AC charging pile described in the present application is applied to a server of an intelligent warning system, and the method includes: obtaining the first working data of a target AC charging pile within a first preset time period to obtain n first working data sets; determining the fault data and normal data of each first working data set in the n first working data sets to obtain n first fault data sets and n first normal data sets; preprocessing the n first fault data sets according to a preset preprocessing algorithm to obtain target fault data; preprocessing the n first normal data sets according to a preset preprocessing algorithm to obtain target normal data; dividing the target normal data and the target fault data into a training set and a training set according to a target ratio value. test set; construct a target random forest prediction model based on the training set and the test set; obtain the second working data of the target AC charging pile at the current moment, and obtain n second working data; input the n second working data into the target random forest prediction model to obtain the target diagnosis result; determine the target fault corresponding to the target diagnosis result; generate a corresponding fault control instruction according to the target fault, and control the intelligent early warning system to perform corresponding early warning operations through the fault control instruction. The random forest prediction model is adopted, which combines the advantages of multiple decision trees, can handle complex nonlinear relationships, reduce the risk of overfitting, and can more accurately diagnose the working data of the target AC charging pile, effectively improving the accuracy of fault diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.
[0027] Figure 1 It is a structural diagram of an intelligent early warning system provided in an embodiment of the present application;
[0028] Figure 2It is a flow chart of a fault warning method for an AC charging pile provided in an embodiment of the present application;
[0029] Figure 3 This is a block diagram of the functional units of a fault warning device for an AC charging pile provided in an embodiment of the present application;
[0030] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0032] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. 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 limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0033] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0034] The electronic device described in the embodiments of the present application may be a server, for example, a cloud server.
[0035] The following is an explanation of some professional terms involved in this application:
[0036] Decision tree: A tree structure similar to a flowchart, used for data classification and prediction. It makes decisions by performing a series of logical judgments on data features (for example, "greater than" or "less than", etc.), and ultimately obtains classification results or prediction values.
[0037] Random forest prediction model: It is an integrated learning method that consists of multiple decision trees. Multiple training subsets are generated through random sampling (bootstrap sampling), and a decision tree is built on each subset. When predicting, the results of multiple decision trees are voted or averaged to obtain more accurate and stable predictions. The random forest prediction model can handle high-dimensional data and has good anti-overfitting and generalization capabilities.
[0038] CEEMDAN decomposition: Also known as "Adaptive Complete Ensemble Empirical Mode Decomposition", it is a signal decomposition method used to decompose complex non-stationary signals into multiple intrinsic mode functions (IMFs) and a residual term. This decomposition method can adaptively process signals with different frequency components, which is of great significance for analyzing and processing complex data.
[0039] Mahalanobis distance: It is a measure of the similarity between samples. The Mahalanobis distance takes into account the distribution and covariance structure of the data, which can eliminate the influence of the correlation between variables and more accurately reflect the true distance between samples.
[0040] SG filtering (Savitzky-Golay Filtering) algorithm: is an algorithm used to smooth and filter data. It achieves smoothing by fitting polynomials to local data points, which can better preserve the shape, width and trend of the signal while removing noise.
[0041] Singular Spectrum Analysis (SSA): is an analysis method based on time series data. In terms of noise reduction, it removes noise and retains useful information by decomposing the time series into different components and screening and reconstructing them according to their importance.
[0042] See also Figure 1 , Figure 1 is a structural diagram of an intelligent early warning system provided in an embodiment of the present application; Figure 1 As shown, the intelligent early warning system (referred to as the system) may include: a data acquisition module, a system database, a data preprocessing module, a prediction model training module, a server, a fault early warning module, etc., which are not limited here.
[0043] Among them, the data acquisition module can be physically or communicatively connected to the AC charging pile, and is responsible for collecting relevant data of the AC charging pile. These data may include the working voltage, working current, ambient temperature, ambient humidity, etc. of the AC charging pile, which are not limited here. It is the entrance for the entire system to obtain raw data.
[0044] It needs to be explained that the AC charging pile can be used to charge electric vehicles. During the charging process of the electric vehicle, the data acquisition module can be started to collect data from the AC charging pile to obtain the original working data of the AC charging pile.
[0045] Among them, the system database is used to store the data collected by the data acquisition module and various intermediate data and result data generated during the operation of the system, providing data support for subsequent data processing, analysis and query.
[0046] Among them, the data preprocessing module is used to perform preprocessing operations such as cleaning, screening, and normalization on the data of the AC charging pile, and process the data into a form suitable for subsequent analysis and modeling.
[0047] Among them, the prediction model training module is used to use the preprocessed data to build a random forest prediction model, and the random forest prediction model is used to predict the operating status of the AC charging pile to determine whether the AC charging pile has a fault.
[0048] Among them, the server is used to provide computing and storage resources for the entire system, ensure the normal operation of each module, and process and distribute data and instructions.
[0049] Among them, the fault warning module is used to determine whether there is a potential fault risk based on the output results of the prediction model and the preset warning rules, and to issue an alarm in time to notify relevant personnel to take measures.
[0050] In this way, the fault of the AC charging pile can be discovered in advance through the intelligent early warning system, and corresponding early warning operations can be performed, thereby improving the reliability and safety of the AC charging pile during use.
[0051] See also Figure 2 , Figure 2 is a flow chart of a fault warning method for an AC charging pile provided in an embodiment of the present application. The method can be applied to Figure 1 The server in the intelligent early warning system shown in the figure, the method includes but is not limited to the following steps:
[0052] S201. Acquire first working data of a target AC charging pile within a first preset time period to obtain n first working data sets; n is a positive integer.
[0053] In the embodiment of the present application, the first preset time period can be preset in advance or defaulted.
[0054] In a specific embodiment, data can be collected from the target AC charging pile through the data collection module in the intelligent early warning system to obtain n first working data. Specifically, the data collection module can include: voltage sensors, current sensors, temperature sensors, humidity sensors and other collection devices. These collection devices are placed inside or around the target AC charging pile to monitor the target AC charging pile in real time, thereby obtaining n first working data.
[0055] It should be explained that, in some embodiments, the data acquisition module can also monitor whether the target AC charging pile is charging other devices (for example, electric vehicles), that is, whether the target AC charging pile is in a working state. When the target AC charging pile is in a working state, data can be collected from it through the data acquisition module. Conversely, if the target AC charging pile is not in a working state, data will not be collected from it to save system resources.
[0056] S202 . Determine the fault data and the normal data of each of the n first working data sets to obtain n first fault data sets and n first normal data sets.
[0057] In an embodiment of the present application, the fault type of the fault data can be determined first. During the operation of the target AC charging pile, the main fault types include overcurrent fault, overvoltage fault, overtemperature fault, etc. Then, corresponding fault thresholds can be set for these fault types to obtain multiple fault thresholds, such as fault current threshold, fault voltage threshold, and fault temperature threshold.
[0058] Furthermore, the n first working data sets can be checked in turn according to the multiple fault thresholds. If the voltage, current, or temperature of a certain data in the n first working data sets exceeds any of the multiple fault thresholds mentioned above, it will be marked as fault data and included in the corresponding first fault data set. Otherwise, it will be included in the corresponding first normal data set. In this way, n first fault data sets and n first normal data sets can be obtained.
[0059] S203 . Preprocess the n first fault data sets according to a preset preprocessing algorithm to obtain target fault data.
[0060] In the embodiment of the present application, the preset preprocessing algorithm can be preset in advance or default.
[0061] In a specific embodiment, a preset preprocessing algorithm may be used to process the n first fault data sets, thereby obtaining target fault data.
[0062] Optionally, step S203, preprocessing the n first fault data sets according to a preset preprocessing algorithm to obtain target fault data, may include the following steps:
[0063] A1. Extract data corresponding to the voltage data type and the current data type from the n first fault data sets to obtain target monitoring data;
[0064] A2. Decompose the target monitoring data according to a preset modal decomposition formula to obtain k modal components; k is a positive integer; the modal decomposition formula is as follows:
[0065]
[0066] in, represents the target monitoring data, the superscript 0 represents the original data, the subscript q represents the data type label corresponding to the target monitoring data, and each data type label corresponds to a data type; t represents time; c j (t) represents the j-th modal component among the k modal components, j is a positive integer less than or equal to k; R(t) represents the residual term;
[0067] A3. Calculate each of the k modal components according to a preset Mahalanobis distance calculation formula to obtain k similarities; the Mahalanobis distance calculation formula is as follows:
[0068]
[0069] Wherein, S(j) represents the similarity between the jth modal component among the k modal components and the corresponding jth original signal in the n first fault data sets; D M represents the Mahalanobis distance; X represents the probability density function of the j-th modal component; Y represents the probability density function of the j-th original signal; (XY) T represents the transposed matrix of XY; ∑ -1 (XY) represents the inverse matrix of the covariance matrix of XY;
[0070] A4. Determine the similarities among the k similarities that are greater than a preset similarity threshold, and obtain a similarities; a is a natural number less than or equal to k;
[0071] A5. Determine that the modal components corresponding to the a similarities in the k modal components are valid modal components, and obtain a valid modal components;
[0072] A6. Determine the similarity that is equal to the similarity threshold among the k similarities, and obtain b similarities; b is a natural number less than or equal to k, and the sum of a and b is not greater than k;
[0073] A7, determining that the modal components corresponding to the b similarities in the k modal components are aliased modal components, and obtaining b aliased modal components;
[0074] A8. Filtering the b aliasing modal components according to a preset filtering algorithm to obtain b filtered modal components;
[0075] A9. Determine the target fault data according to the a effective modal components and the b filtered modal components.
[0076] In an embodiment of the present application, the similarity threshold can be preset or defaulted in advance; each of the n first fault data sets corresponds to a data type, and the data type includes one of the following: voltage data type, current data type, temperature data type, humidity data type, that is, n can be equal to 4.
[0077] In a specific embodiment, data corresponding to the voltage data type and the current data type can be extracted from n first fault data sets to obtain two first fault data sets, that is, the target monitoring data includes two first fault data sets; then, the target monitoring data can be decomposed by CEEMDAN. Specifically, the target monitoring data can be decomposed according to a preset modal decomposition formula to obtain k modal components (modal components can be referred to as IMFs for short); the modal decomposition formula is as follows:
[0078]
[0079] in, represents the target monitoring data. The superscript 0 indicates that the number of data processing operations it has undergone is 0, that is, the target monitoring data is the unprocessed raw data. The subscript q indicates the data type label corresponding to the target monitoring data. Each data type label corresponds to a data type. For example, q = 1 indicates the voltage data type, and q = 2 indicates the current data type. t indicates time. c j (t) represents the j-th modal component among k modal components, j is a positive integer less than or equal to k; r(t) represents the residual term.
[0080] According to the above formula, the target monitoring data can be decomposed into k modal components. Then, each of the k modal components can be calculated according to the preset Mahalanobis distance calculation formula to obtain k similarities. The Mahalanobis distance calculation formula is as follows:
[0081]
[0082] Where S(j) represents the similarity between the jth modal component among the k modal components and the corresponding jth original signal in the n first fault data sets; D Mrepresents the Mahalanobis distance; X represents the probability density function of the jth modal component; Y represents the probability density function of the jth original signal; (XY) T represents the transposed matrix of XY; ∑ -1 (XY) represents the inverse matrix of the covariance matrix of XY.
[0083] Next, the magnitude relationship between each of the k similarities and the similarity threshold can be compared to obtain all similarities greater than the similarity threshold, that is, a similarities; since the a similarities are all greater than the similarity threshold, it means that the noise component is small, and the modal component corresponding to the a similarities in the k modal components can be determined as a valid modal component, thereby obtaining a valid modal components;
[0084] Furthermore, the similarities that are equal to the similarity threshold among the k similarities can be found to obtain b similarities; generally, b is equal to 1; then, the modal components corresponding to the b similarities in the k modal components can be determined as aliased modal components to obtain b aliased modal components; then, the b aliased modal components can be filtered according to a preset filtering algorithm to filter out the noise therein to obtain b filtered modal components; finally, the target fault data can be determined based on a valid modal components and b filtered modal components.
[0085] In this way, by extracting target monitoring data from n first fault data sets; decomposing the target monitoring data according to a preset modal decomposition formula to obtain k modal components; calculating the k modal components according to a preset Mahalanobis distance calculation formula to obtain k similarities; determining a similarities greater than a similarity threshold among the k similarities; determining the modal components corresponding to a similarities among the k modal components as valid modal components, and obtaining a valid modal components; determining b similarities equal to the similarity threshold among the k similarities; determining the modal components corresponding to b similarities among the k modal components as aliased modal components, and obtaining b aliased modal components. Components; b aliasing modal components are filtered according to a preset filtering algorithm to obtain b filtered modal components; target fault data is determined according to a valid modal components and b filtered modal components. On the one hand, by extracting specific voltage and current data types, it is possible to focus on parameters closely related to electrical faults, analyze fault conditions more specifically, reduce interference from irrelevant information, and improve the accuracy of fault location. On the other hand, by using the Mahalanobis distance to calculate similarity, it is possible to objectively quantify the degree of difference between each modal component and the original signal, quickly identify fault features that are significantly deviated from the original signal, and provide a clear basis for fault diagnosis.
[0086] Optionally, in step A8, the preset filtering algorithm includes an SG filtering algorithm, and filtering the b aliasing modal components according to the preset filtering algorithm to obtain b filtered modal components may include the following steps:
[0087] B1. Acquire a target aliasing modal component; the target aliasing modal component is any aliasing modal component among the b aliasing modal components;
[0088] B2. Obtain the first window length 2L+1 corresponding to the SG filtering algorithm; L is a positive integer;
[0089] B3. Obtain a preset polynomial corresponding to the SG filtering algorithm; the preset polynomial is specifically as follows:
[0090]
[0091] Wherein, N1 is the power of the preset polynomial, and N1 is less than or equal to 2L+1; a j For x j The coefficient of ; x is the independent variable;
[0092] B4. Calculate the target aliasing modal component according to a preset polynomial approximation calculation formula to obtain a polynomial approximation deviation value; the polynomial approximation calculation formula is specifically as follows:
[0093]
[0094] Among them, ε N Represents the polynomial approximation deviation value; represents the target aliased modal component;
[0095] B5. When the polynomial approximation deviation value is less than or equal to a preset value, determine the filtered modal component corresponding to the target aliasing modal component according to the preset polynomial.
[0096] In the embodiment of the present application, the preset polynomial and the preset value may be preset or defaulted in advance. For example, the preset value may be 10 -3 .
[0097] In a specific embodiment, a target aliasing modal component can be obtained from b aliasing modal components; then, a first window length 2L+1 corresponding to the SG filtering algorithm can be obtained. Specifically, a target data type corresponding to the target aliasing modal component can be obtained, and a mapping relationship between a preset data type and a window length can be pre-stored. Based on the mapping relationship, the first window length 2L+1 corresponding to the target data type is determined; then, a preset polynomial corresponding to the SG filtering algorithm can be obtained, and the preset polynomial is specifically as follows:
[0098]
[0099] Wherein, N1 is the power of the preset polynomial, and N1 is less than or equal to 2L+1; a j For x j The coefficient of ; x is the independent variable; the target aliasing modal component is calculated according to the preset polynomial approximate calculation formula to obtain the polynomial approximate deviation value; the polynomial approximate calculation formula is as follows:
[0100]
[0101] Among them, ε N Represents the polynomial approximation deviation value; represents the target aliased modal component, the superscript 1 indicates that it is an aliased modal component, and the subscript j indicates that it is the jth aliased modal component among b aliased modal components;
[0102] In ε N When it is less than or equal to the preset value, it means that p(x) is highly similar to the target aliasing modal component, and p(x) can be used to replace the target aliasing modal component, that is, p(x) is used as the filtering modal component: specifically as follows:
[0103]
[0104] On the contrary, if ε N If it is greater than the preset value, the value of N1 is increased to obtain a new N1, and ε is recalculated based on the new N1. N , if the new ε N If it is still greater than the preset value, continue to increase N1 until ε N is less than or equal to a preset value, and a preset polynomial is used to replace the target aliased modal component to obtain a filtered modal component;
[0105] Thus, by obtaining the target aliasing modal component; obtaining the first window length 2L+1 corresponding to the SG filtering algorithm; obtaining the preset polynomial corresponding to the SG filtering algorithm; calculating the target aliasing modal component according to the preset polynomial approximation calculation formula to obtain the polynomial approximation deviation value; in ε N When it is less than or equal to the preset value, the filtering modal component corresponding to the target aliasing modal component is determined according to p(x), and the ε N Whether it is less than or equal to the preset value can ensure the accuracy and reliability of the filtering result. The filtering modal component is determined only when the error requirement is met, which helps to improve the quality of data processing.
[0106] Optionally, step A9, determining the target fault data according to the a effective modal components and the b filtered modal components, may include the following steps:
[0107] C1. Reconstruct the a effective modal components and the b filtered modal components according to a preset signal reconstruction formula to obtain reference fault data; the preset signal reconstruction formula is as follows:
[0108]
[0109] in, is the reference fault data, is the i-th filtering modal component among the b filtering modal components, is the jth effective modal component among the a effective modal components;
[0110] C2. Determine a first time series corresponding to the reference fault data;
[0111] C3, determining a target sequence length N2 and a second window length M corresponding to the first time series;
[0112] C4, calculating a third window length Z according to the second window length M and the target sequence length N2;
[0113] C5. Converting the first time series into a target trajectory matrix according to the second window length M and the third window length Z;
[0114] C6. Perform singular value decomposition on the target trajectory matrix according to a preset singular value decomposition formula to obtain a diagonal matrix; the singular value decomposition formula is as follows:
[0115]
[0116] in, represents the target trajectory matrix; U represents the left matrix; ∑ represents the diagonal matrix, and the elements on the diagonal are singular values; V represents the right matrix; V T represents the transposed matrix of the right matrix;
[0117] C7. Obtain singular values in the diagonal matrix to obtain target singular value data;
[0118] C8. Reconstruct the first time series according to the target singular value data to obtain the target fault data.
[0119] In the embodiment of the present application, the preset signal reconstruction formula and the singular value decomposition formula can be preset or defaulted in advance.
[0120] In a specific embodiment, the a effective modal components and b filtered modal components can be reconstructed according to a preset signal reconstruction formula, thereby obtaining reference fault data; the preset signal reconstruction formula is as follows:
[0121]
[0122] in, For reference fault data, the superscript 1 indicates that the number of data processing operations it has undergone is 1, and the subscript q indicates its corresponding data type label; is the i-th filter modal component among the b filter modal components, and the superscript 1 indicates that it is a filter modal component; is the jth effective modal component among a effective modal components, and the superscript 2 indicates that it is a valid modal component.
[0123] Next, singular value decomposition is performed on the reference fault data to determine the first time series corresponding to the reference fault data. Specifically, the acquisition time of each data in the reference fault data can be obtained to obtain multiple acquisition times. The data in the reference fault data are sorted and combined according to the sequence of the multiple acquisition times to obtain the first time series. Then, the target sequence length N2 and the second window length M corresponding to the first time series can be determined. Specifically, the number of data in the first time series, that is, the target sequence length N2, can be obtained first. Then, the second window length M can be determined according to the size of the target sequence length N2. The mapping relationship between the preset sequence length and the window length can be pre-stored, and the second window length corresponding to the target sequence length can be determined based on the mapping relationship. In addition, M and N2 satisfy the size relationship of M<N2 / 2;
[0124] Furthermore, the third window length Z is calculated according to the second window length M and the target sequence length N2, and the specific calculation formula is Z=N2-M+1; then, the first time series can be converted into a target trajectory matrix according to the second window length M and the third window length Z.
[0125] Let's take an example to illustrate. Suppose the first time series is Then, the first time series is converted into a target trajectory matrix according to the second window length M and the third window length Z. The target trajectory matrix is as follows:
[0126]
[0127] It can be seen that the target trajectory matrix is a matrix of M rows and Z columns.
[0128] Then, the target trajectory matrix can be subjected to singular value decomposition according to a preset singular value decomposition formula to obtain target singular vectors and target singular values; the singular value decomposition formula is as follows:
[0129]
[0130] in, represents the target trajectory matrix; U represents the left matrix; ∑ represents the diagonal matrix, the elements on the diagonal are singular values, the singular values are arranged in order from large to small, and all elements except the diagonal are zero; V T represents the transposed matrix of the right matrix; according to the above singular value decomposition formula, the target trajectory matrix can be decomposed into three matrices. Since the singular value decomposition is a prior art, the specific decomposition process is not described here.
[0131] Next, we can directly obtain all the elements on the diagonal of the diagonal matrix, that is, the singular values, and obtain the target singular value data; for example, assuming that the diagonal matrix is:
[0132]
[0133] Then, the target singular value data is [1140, 19.6, 14.9, 13.1].
[0134] Finally, the first time series can be reconstructed according to the target singular value data to obtain target fault data.
[0135] In this way, by reconstructing the signals of a effective modal components and b filtered modal components according to the preset signal reconstruction formula, reference fault data is obtained; the first time series corresponding to the reference fault data is determined; the target sequence length N2 and the second window length M corresponding to the first time series are determined; the third window length Z is calculated according to the second window length M and the target sequence length N2; the first time series is converted into a target trajectory matrix according to the second window length M and the third window length Z; the target trajectory matrix is singularly decomposed according to the preset singular value decomposition formula to obtain a diagonal matrix; the singular values in the diagonal matrix are obtained to obtain target singular value data; the first time series is reconstructed according to the target singular value data to obtain target fault data. On the one hand, by reconstructing the signals of the effective modal components and the filtered modal components to obtain the reference fault data, the essential characteristics of the fault can be captured more accurately, which is helpful to separate the key information related to the fault from the complex data and improve the pertinence of the subsequent analysis. On the other hand, by performing singular value decomposition on the reference fault data, the complexity of the data is reduced, and part of the noise and interference can also be removed, so that the processed target fault data is clearer and more reliable, thereby improving the accuracy of fault diagnosis.
[0136] Optionally, step C8, reconstructing the first time series according to the target singular value data to obtain the target fault data, may include the following steps:
[0137] D1. Grouping the target singular value data according to a preset singular value grouping method to obtain multiple groups of singular values;
[0138] D2. grouping the first time series according to the multiple groups of singular values to obtain multiple groups of time series;
[0139] D3. Sort the multiple groups of time series according to the multiple groups of singular values to obtain a first time series order; the larger the singular value, the higher the order;
[0140] D4, selecting c time series with the highest order in the first time series, and combining the c time series into a new time series to obtain a second time series; c is a positive integer;
[0141] D5. Reconstruct the second time series according to a preset sequence reconstruction formula to obtain the target fault data; the sequence reconstruction formula is as follows:
[0142]
[0143] in, represents the target fault data, the superscript 2 represents the number of data processing operations it has undergone is 2, and the subscript q represents the corresponding data type label; represents the second time series.
[0144] In the embodiment of the present application, the singular value grouping method can be preset or defaulted in advance.
[0145] In a specific embodiment, the target singular value data can be grouped according to a preset singular value grouping method to obtain multiple groups of singular values. For example, the preset singular value grouping method can be equidistant grouping, and the target singular value data can be divided into several groups according to the size range of the singular values. For example, assuming that the target singular value data is [1140, 19.6, 14.9, 13.1], the range of the singular value can be 0-1200, and it can be divided into 3 groups, then the range of each group is 0-400, 400-800, 800-1200, then the target singular value data can be divided into 2 groups of singular values, the first group of singular values includes 19.6, 14.9, 13.1, and the second group of singular values only includes 1140.
[0146] Next, the first time series can be grouped according to the multiple groups of singular values to obtain multiple groups of time series. Specifically, the correspondence between each singular value in the multiple groups of singular values and the data in the first time series can be obtained to obtain the singular value correspondence. Then, the data corresponding to each group of singular values in the multiple groups of singular values can be determined according to the singular value correspondence to obtain multiple groups of data, that is, multiple groups of time series. For example, assuming that the first time series is [12, 45, 70, 20], 12, 45, and 70 correspond to the above first group of singular values, then these three data will be divided into one group of time series, and 20 corresponds to the above second group of singular values and is divided into another group of time series. In this way, two groups of time series can be obtained.
[0147] Further, multiple groups of time series can be sorted according to multiple groups of singular values to obtain a first time series order. Specifically, multiple groups of time series can be sorted according to the size of the singular values. The larger the singular value, the closer the time series is to the front, thereby obtaining the first time series order; then, the c time series that are at the front of the first time series order can be selected, and these c time series can be combined into a new time series in time order to obtain a second time series; finally, the second time series can be reconstructed according to a preset sequence reconstruction formula to obtain target fault data; the sequence reconstruction formula is as follows:
[0148]
[0149] in, represents target fault data; Represents the second time series.
[0150] In this way, the target singular value data is grouped according to a preset singular value grouping method to obtain multiple groups of singular values; the first time series is grouped according to the multiple groups of singular values to obtain multiple groups of time series; the multiple groups of time series are sorted according to the multiple groups of singular values to obtain a first time series order; the top c time series in the first time series order are selected, and the c time series are combined into a new time series to obtain a second time series; the second time series is reconstructed according to a sequence reconstruction formula to obtain target fault data, and by grouping singular values, grouping and sorting time series, the time series part with important characteristics can be screened out, and the top time series are preferentially selected for reconstruction, thereby improving data processing efficiency.
[0151] S204 , preprocessing the n first normal data sets according to the preset preprocessing algorithm to obtain target normal data.
[0152] In the embodiment of the present application, n first normal data sets can be preprocessed according to a preset preprocessing algorithm to obtain target normal data. Specifically, the method for obtaining the target normal data is the same as the method for obtaining the target fault data.
[0153] S205 . Divide the target normal data and the target fault data into a training set and a test set according to a target ratio value.
[0154] In the embodiment of the present application, the target ratio value=the data volume of the training set / the data volume of the test set.
[0155] In a specific embodiment, the data in the target normal data and the target fault data can be divided into a training set or a test set according to the target ratio value, thereby obtaining a training set and a test set. For example, assuming that the target ratio value = 4, then for every data divided from the target normal data or the target fault data into the test set, 4 data need to be divided into the training set.
[0156] Optionally, the method may further include the following steps:
[0157] S51, obtaining a target AC charging pile type corresponding to the target AC charging pile;
[0158] S52, determining a reference ratio value corresponding to the target AC charging pile type;
[0159] S53, obtaining a target failure rate corresponding to the target AC charging pile type;
[0160] S54, determining a first influence coefficient corresponding to the target failure rate;
[0161] S55, obtaining the working data of the target AC charging pile in a second preset time period to obtain historical working data; the end time of the second preset time period is earlier than the start time of the first preset time period;
[0162] S56, determining the proportion of fault data in the historical working data to all working data, and obtaining a historical fault proportion;
[0163] S57, determining a target optimization factor corresponding to the historical failure ratio;
[0164] S58, optimizing the first influence coefficient according to the target optimization factor to obtain a second influence coefficient;
[0165] S59: Adjust the reference ratio value according to the second influence coefficient to obtain the target ratio value.
[0166] In the embodiment of the present application, the target AC charging pile type may include one of the following: a household AC charging pile, a public AC charging pile, a fast AC charging pile, etc., which are not limited here;
[0167] In a specific embodiment, the target AC charging pile type corresponding to the target AC charging pile can be obtained. Specifically, the identification information of the target AC charging pile can be collected by the data acquisition module, and the corresponding target AC charging pile type can be determined according to the representation information; then, the reference proportion value corresponding to the target AC charging pile type can be determined. Specifically, a mapping relationship between a preset AC charging pile type and a proportion value can be pre-stored, and the reference proportion value corresponding to the target AC charging pile type is determined based on the mapping relationship; then, the target failure rate corresponding to the target AC charging pile type can be obtained. Specifically, the manufacturer of the target AC charging pile can be determined first, and the target failure rate can be obtained by visiting the manufacturer's website, or the target failure rate of the target AC charging pile type can be directly searched on the Internet; then, the first influence coefficient corresponding to the target failure rate can be determined. For example, the mapping relationship between the preset failure rate and the influence coefficient can be pre-stored, and the first influence coefficient corresponding to the target failure rate can be determined based on the mapping relationship. The value range of the first influence coefficient can be -0.2 to 0.2.
[0168] Furthermore, the working data of the target AC charging pile in the second preset time period can be obtained through the data acquisition module to obtain historical working data; then, the number of occurrences of fault data in the historical working data can be determined, and the proportion of the fault data to all working data can be calculated, as follows:
[0169] Historical fault ratio = number of occurrences of fault data / total number of occurrences of historical working data;
[0170] According to the above formula, the historical fault ratio can be calculated; then, the target optimization factor corresponding to the historical fault ratio can be determined. Specifically, the mapping relationship between the preset fault ratio and the optimization factor can be pre-stored, and the target optimization factor corresponding to the historical fault ratio can be determined based on the mapping relationship. The value range of the target optimization factor can be -0.12 to 0.12; the first influence coefficient is optimized according to the target optimization factor to obtain the second influence coefficient, which is as follows:
[0171] Second influence coefficient = first influence coefficient × (1 + target optimization factor);
[0172] Finally, the reference ratio value can be adjusted according to the second influence coefficient to obtain the target ratio value, as follows:
[0173] Target ratio value = reference ratio value × (1 + second influence coefficient);
[0174] The target ratio value can be calculated according to the above formula.
[0175] In this way, by obtaining the target AC charging pile type corresponding to the target AC charging pile; determining the reference proportion value corresponding to the target AC charging pile type; obtaining the target failure rate corresponding to the target AC charging pile type; determining the first influence coefficient corresponding to the target failure rate; obtaining the working data of the target AC charging pile within the second preset time period to obtain the historical working data; determining the proportion of failure data in the historical working data to all working data to obtain the historical failure proportion; determining the target optimization factor corresponding to the historical failure proportion; optimizing the first influence coefficient according to the target optimization factor to obtain the second influence coefficient; adjusting the reference proportion value according to the second influence coefficient to obtain the target proportion value, by obtaining the specific type of the target AC charging pile, the reference proportion value and failure rate and other parameters related thereto can be determined in a targeted manner, so that the subsequent analysis and processing are more in line with the characteristics of this type of charging pile, thereby improving the accuracy and pertinence of the processing.
[0176] S206. Construct a target random forest prediction model according to the training set and the test set.
[0177] Optionally, step S206, constructing a target random forest prediction model according to the training set and the test set, may include the following steps:
[0178] S61, processing the training set and the test set by a preset normalization method to obtain a first training set and a first test set;
[0179] S62, sampling the first training set according to a preset resampling method to obtain h sub-training sets; h is an integer greater than 1;
[0180] S63, according to the decision tree generation method in steps S1-S2 below, h decision trees are generated, each decision tree corresponds to a sub-training set, to obtain a reference random forest prediction model, the reference random forest prediction model includes the h decision trees, specifically:
[0181] S1. Generate a first reference decision tree according to the first sub-training set, randomly extract d features from a preset feature set, and use the d features as feature subsets of the first reference decision tree to obtain a first feature subset; d is a positive integer less than or equal to q; the first sub-training set is any sub-training set among the h sub-training sets;
[0182] S2. Based on the principle of minimizing the Gini index, select partition attributes from the first feature subset, and partition the first reference decision tree according to the partition attributes to obtain a first target decision tree.
[0183] S64, testing the reference random forest prediction model using the first test set to obtain a first accuracy rate;
[0184] S65. When the first accuracy rate is greater than or equal to a preset accuracy rate threshold, determine the target random forest prediction model according to the reference random forest prediction model.
[0185] In the embodiment of the present application, the normalization method can be preset or defaulted in advance.
[0186] In a specific embodiment, the training set and the test set can be processed by a preset normalization method to obtain a first training set and a first test set. Assume that the training set is data Q i ={p1, p2, ···, p i ,···,p N3}, data Q i There are N3 data, N3 is a positive integer, and the normalization formula of the normalization method is as follows:
[0187]
[0188] in, is the i-th data after normalization; p i For data Q i The i-th data in p max The above data Q i The maximum data in p min The above data Q i In this way, the training set is processed according to the normalization formula to obtain the first training set. Similarly, the test set can also be processed according to the normalization formula to obtain the first test set.
[0189] Then, the first training set can be randomly sampled with replacement h times according to a preset resampling method (for example, a bootstrap resampling method) to obtain h sub-training sets; then, the decision tree generation method in the following steps S1-S2 can be used to generate h decision trees, that is, to refer to the random forest prediction model, specifically:
[0190] S1. Generate a first reference decision tree according to the first sub-training set, randomly extract d features from the preset feature set, use the d features as the feature subset of the first reference decision tree, and obtain a first feature subset; the first sub-training set is any sub-training set among the h sub-training sets;
[0191] Specifically, all the data in the first sub-training set can be placed on a root node to obtain a first reference decision tree, that is, the first reference decision tree only includes the root node, and then, the preset feature set can include four elements such as voltage, current, temperature, and humidity. d can be equal to 2, and d features can be randomly extracted from the preset feature set through a random number generator, and these d features are used as the first feature subset.
[0192] S2. Based on the principle of minimizing the Gini index, select partition attributes from the first feature subset, and partition the first reference decision tree according to the partition attributes to obtain a first target decision tree;
[0193] Specifically, for each feature in the first feature subset, its corresponding Gini index can be calculated, and the feature with the smallest Gini index is used as the partition attribute. According to the selected partition attribute and its value, the node data in the first reference decision tree is divided into different subsets. A new child node is created for each subset, thereby completing the partition of the first reference decision tree and obtaining the first target decision tree.
[0194] Furthermore, the reference random forest prediction model can be tested by the first test set to obtain a first accuracy rate. Specifically, the reference random forest prediction model can be used to make a decision, and the decision formula is:
[0195]
[0196] Where H(x) is the reference random forest prediction model; arg max Y It means that among all possible values of the output variable Y, find the value of Y that makes the expression given later reach the maximum value; h i (x) is the i-th decision tree among the h decision trees; x is any test sample in the first test set; V is the output variable of the reference random forest prediction model, that is, the classification label; I is the indicative function, when h i When (x) = V, I = 1, otherwise, h i (x)≠V, then I=0.
[0197] It should be explained that the value of V is any one of 1, 2, 3, and 4, 1 represents normal, 2 represents overvoltage, 3 represents overcurrent, and 4 represents overtemperature.
[0198] By making a decision on each test sample in the first test set through the above decision formula, a diagnosis result table can be obtained. The diagnosis result table is as follows:
[0199]
[0200] In the table, TP represents the number of positive samples correctly predicted as positive, that is, Ai (i = 1, 2, 3, 4) represents the number of samples predicted as fault type i and actually fault i;
[0201] FP represents the number of negative samples that are incorrectly predicted as positive, that is, Bi (i = 1, 2, 3, 4) represents the number of faults predicted as fault type i and actually fault j;
[0202] FN represents the number of positive samples that are incorrectly predicted as negative, that is, Ci (i = 1, 2, 3, 4) represents the number of samples that are diagnosed and predicted as fault type j and the actual fault is i;
[0203] F1 score is an evaluation indicator that comprehensively considers precision and recall, that is:
[0204] Di(i=1, 2, 3, 4)=Ai / (Ai+0.5×(Bi+Ci));
[0205] Next, the first accuracy can be calculated using the following formula:
[0206]
[0207] Among them, A cc Represents the first accuracy rate; the first accuracy rate can be calculated according to the above formula. When the first accuracy rate is greater than or equal to the preset accuracy rate threshold (for example, 90%), it means that the accuracy rate of the reference random forest prediction model is high and can meet the use requirements. The reference random forest prediction model can be used as the target random forest prediction model.
[0208] When the first accuracy is less than the preset accuracy threshold, it means that the accuracy of the reference random forest prediction model is low and cannot meet the usage requirements. It is necessary to adjust the reference random forest prediction model, or to re-establish a random forest prediction model and test it again until the first accuracy is greater than or equal to the preset accuracy threshold to obtain the target random forest prediction model.
[0209] In this way, the training set and the test set are processed by a preset normalization method to obtain a first training set and a first test set; the first training set is sampled according to a preset resampling method to obtain h sub-training sets; according to the decision tree generation method in steps S1-S2, h decision trees are generated to obtain a reference random forest prediction model; the reference random forest prediction model is tested by the first test set to obtain a first accuracy rate; when the first accuracy rate is greater than or equal to the preset accuracy rate threshold, the target random forest prediction model is determined according to the reference random forest prediction model. On the one hand, the normalized data fluctuation is relatively small, which reduces the impact of extreme values on the target random forest prediction model, making the target random forest prediction model more stable during the training process and not prone to large deviations due to individual abnormal data points. On the other hand, by resampling the first training set, multiple different sub-training sets can be obtained, each of which contains a part of the original data, but is not exactly the same, which increases the diversity of the data, makes the generated decision trees more diverse, and can improve the generalization ability of the target random forest prediction model finally generated.
[0210] S207: Acquire the second working data of the target AC charging pile at the current moment, and obtain n second working data.
[0211] In the embodiment of the present application, the second working data of the target AC charging pile at the current moment can be collected by the data collection module, thereby obtaining n second working data.
[0212] S208. Input the n second working data into the target random forest prediction model to obtain a target diagnosis result.
[0213] In an embodiment of the present application, the above-mentioned n second working data can be input into a target random forest prediction model, and the working state of the target AC charging pile can be diagnosed through the target random forest prediction model to obtain a target diagnosis result.
[0214] S209: Determine a target fault corresponding to the target diagnosis result.
[0215] In the embodiment of the present application, the target diagnostic result is a classification label V. Specifically, the value of V is any one of 1, 2, 3, and 4, where 1 indicates that the target AC charging pile is in a normal state, 2 indicates that the target fault is overvoltage, 3 indicates that the target fault is overcurrent, and 4 indicates that the target fault is overtemperature.
[0216] Optionally, the method further includes:
[0217] Obtaining a fault type corresponding to the target fault to obtain a target fault type;
[0218] Determine a fault threshold corresponding to the target fault type to obtain a target fault threshold;
[0219] Determine the working data corresponding to the target fault type in the n second working data to obtain target working data;
[0220] Sampling the target working data to obtain a plurality of sample working data, each of which corresponds to a sampling time;
[0221] Perform straight line fitting according to the plurality of sample working data and their corresponding sampling times to obtain a target straight line, wherein the horizontal axis of the target straight line is time and the vertical axis is working data;
[0222] Determine a portion of the target straight line that is greater than the target fault threshold value to obtain a first portion of the straight line;
[0223] Determine a duration ratio between the first portion of straight lines and the target straight line to obtain a target duration ratio;
[0224] Determine the fault degree value corresponding to the target duration ratio to obtain a reference fault degree value;
[0225] Obtaining a target slope corresponding to the target straight line;
[0226] Determining a target adjustment parameter corresponding to the target slope;
[0227] Adjusting the reference fault degree value according to the target adjustment parameter to obtain a target fault degree value;
[0228] When the target fault degree value is less than a preset fault degree value, the steps of generating a corresponding fault control instruction according to the target fault, and controlling the intelligent early warning system to perform a corresponding early warning operation through the fault control instruction are executed.
[0229] In the embodiment of the present application, the target fault type may include one of the following: voltage fault type, current fault type, temperature fault type, etc., which are not limited here; the fault degree value is used to indicate the fault severity of the target AC charging pile, and its value range can be 1 to 100.
[0230] In a specific embodiment, the fault type corresponding to the target fault can be obtained to obtain the target fault type. Specifically, it can be judged according to the target diagnosis result V, V=2 indicates that the target fault type is a voltage fault type, V=3 indicates that the target fault type is a current fault type, and V=4 indicates that the target fault type is a temperature fault type; then, the fault threshold corresponding to the target fault type can be determined to obtain the target fault threshold. For example, assuming that the target fault type is a voltage fault type, then the target fault threshold is the fault voltage threshold; then, the working data corresponding to the target fault type in the n second working data can be determined to obtain the target working data. For example, assuming that the target fault type is a voltage fault type, then the target working data is the voltage working data in the n second working data.
[0231] Next, the target working data can be sampled. The sampling method can be equidistant sampling. The target working data can be sampled at fixed time intervals to obtain multiple sample working data. Then, the multiple sample working data can be fitted with a straight line. The fitting method can be the least square method to obtain the target straight line. Then, the part of the straight line whose ordinate is greater than the target fault threshold in the target straight line can be determined to obtain the first part of the straight line. Specifically, a threshold straight line parallel to the horizontal axis can be drawn according to the target fault threshold. The part of the target straight line above the threshold straight line is the first part of the straight line. Then, the starting point coordinates and the end point coordinates of the first part of the straight line can be obtained first. The abscissa of the end point coordinates minus the abscissa of the starting point coordinates can obtain the first duration. Then, the duration of the target straight line can be obtained to obtain the second duration and the target duration ratio. The specific calculation formula is as follows:
[0232] Target duration ratio = first duration / second duration;
[0233] According to the above formula, the target duration ratio can be obtained. Then, the fault degree value corresponding to the target duration ratio can be determined to obtain the reference fault degree value. Specifically, a mapping relationship between a preset duration ratio and a fault degree value can be pre-stored, and the reference fault degree value corresponding to the target duration ratio can be determined based on the mapping relationship. Then, the target slope corresponding to the target straight line can be obtained. The linear equation y=ax+b of the target straight line can be obtained first, where y is the value of the working data, x is the time point, a is the target slope, and b is the intercept. The target slope can be obtained according to the linear equation. Further, the target adjustment parameter corresponding to the target slope is determined. Specifically, a mapping relationship between a preset slope and an adjustment parameter can be pre-stored, and the target adjustment parameter corresponding to the target slope can be determined based on the mapping relationship. The value range of the target adjustment parameter can be -0.3 to 0.3. Then, the reference fault degree value can be adjusted according to the target adjustment parameter to obtain the target fault degree value, as follows:
[0234] Target fault level value = reference fault level value × (1 + target adjustment parameter);
[0235] According to the above formula, the target fault degree value can be calculated. When the target fault degree value is less than the preset fault degree value, it means that the fault degree of the target AC charging pile is not very serious at this time. The corresponding fault control instruction can be generated according to the target fault, and the intelligent early warning system can be controlled by the fault control instruction to perform the corresponding early warning operation.
[0236] When the target fault degree value is greater than or equal to the preset fault degree value, it means that the fault degree of the target AC charging pile is very serious. The target AC charging pile can be directly controlled to stop working. Then, the intelligent early warning system can be used to perform early warning operations and notify staff to inspect and repair the target AC charging pile to prevent accidents, thereby improving the safety of the target AC charging pile.
[0237] S210: Generate a corresponding fault control instruction according to the target fault, and control the intelligent early warning system to perform a corresponding early warning operation through the fault control instruction.
[0238] In an embodiment of the present application, a corresponding fault control instruction can be generated according to the target fault, and a mapping relationship between a preset fault and a control instruction can be pre-stored. Based on the mapping relationship, a fault control instruction corresponding to the target fault is determined. Then, the intelligent early warning system can be controlled by the fault control instruction to perform a corresponding early warning operation, and the early warning operation can include at least one of the following: overvoltage warning, overcurrent warning, and overtemperature warning.
[0239] The implementation of this application has the following beneficial effects:
[0240] It can be seen that the fault warning method of an AC charging pile described in the present application is applied to a server of an intelligent warning system, and the method includes: obtaining the first working data of a target AC charging pile within a first preset time period to obtain n first working data sets; determining the fault data and normal data of each first working data set in the n first working data sets to obtain n first fault data sets and n first normal data sets; preprocessing the n first fault data sets according to a preset preprocessing algorithm to obtain target fault data; preprocessing the n first normal data sets according to a preset preprocessing algorithm to obtain target normal data; dividing the target normal data and the target fault data into a training set and a training set according to a target ratio value. test set; construct a target random forest prediction model based on the training set and the test set; obtain the second working data of the target AC charging pile at the current moment, and obtain n second working data; input the n second working data into the target random forest prediction model to obtain the target diagnosis result; determine the target fault corresponding to the target diagnosis result; generate a corresponding fault control instruction according to the target fault, and control the intelligent early warning system to perform corresponding early warning operations through the fault control instruction. The random forest prediction model is adopted, which combines the advantages of multiple decision trees, can handle complex nonlinear relationships, reduce the risk of overfitting, and can more accurately diagnose the working data of the target AC charging pile, effectively improving the accuracy of fault diagnosis.
[0241] See also Figure 3 , Figure 3 The functional unit composition block diagram of a fault warning device 300 for an AC charging pile provided in an embodiment of the present application is applied to a server of an intelligent warning system. The fault warning device 300 for an AC charging pile includes: an acquisition unit 301, a control unit 302, and a warning unit 303, wherein:
[0242] The acquisition unit 301 is used to acquire first working data of a target AC charging pile within a first preset time period to obtain n first working data sets; n is a positive integer;
[0243] The control unit 302 is used to determine the first fault data and the first normal data of each of the n first working data sets to obtain n first fault data sets and n first normal data sets; preprocess the n first fault data sets according to a preset preprocessing algorithm to obtain target fault data; preprocess the n first normal data sets according to the preset preprocessing algorithm to obtain target normal data; divide the target normal data n first normal data and the target fault data into a training set and a test set according to a target ratio value; and construct a target random forest prediction model according to the training set and the test set;
[0244] The acquisition unit 301 is further used to acquire the second working data of the target AC charging pile at the current moment, and obtain n second working data; the second preset time is later than the end time of the first preset time period; input the n second working data into the target random forest prediction model to obtain a target diagnosis result; determine the target fault corresponding to the target diagnosis result;
[0245] The early warning unit 303 is used to generate a corresponding fault control instruction according to the target fault, and control the intelligent early warning system to perform a corresponding early warning operation through the fault control instruction.
[0246] Optionally, each of the n first fault data sets corresponds to a data type, and the data type includes one of the following: a voltage data type, a current data type, a temperature data type, and a humidity data type; in terms of preprocessing the n first fault data sets according to a preset preprocessing algorithm to obtain target fault data, the control unit 302 is specifically used to:
[0247] Extracting data corresponding to the voltage data type and the current data type from the n first fault data sets to obtain target monitoring data;
[0248] The target monitoring data is decomposed according to a preset modal decomposition formula to obtain k modal components; k is a positive integer; the modal decomposition formula is as follows:
[0249]
[0250] in, represents the target monitoring data, the superscript 0 represents the original data, the subscript q represents the data type label corresponding to the target monitoring data, and each data type label corresponds to a data type; t represents time; c j (t) represents the j-th modal component among the k modal components, j is a positive integer less than or equal to k; R(t) represents the residual term;
[0251] Each of the k modal components is calculated according to a preset Mahalanobis distance calculation formula to obtain k similarities; the Mahalanobis distance calculation formula is specifically as follows:
[0252]
[0253] Wherein, S(j) represents the similarity between the jth modal component among the k modal components and the corresponding jth original signal in the n first fault data sets; D M represents the Mahalanobis distance; X represents the probability density function of the j-th modal component; Y represents the probability density function of the j-th original signal; (XY)T represents the transposed matrix of XY; ∑ -1 (XY) represents the inverse matrix of the covariance matrix of XY;
[0254] Determine the similarities among the k similarities that are greater than a preset similarity threshold, and obtain a similarities; a is a natural number less than or equal to k;
[0255] Determine that the modal components corresponding to the a similarities in the k modal components are valid modal components, and obtain a valid modal components;
[0256] Determine a similarity among the k similarities that is equal to the similarity threshold, and obtain b similarities; b is a natural number less than or equal to k, and the sum of a and b is not greater than k;
[0257] Determine that the modal components corresponding to the b similarities in the k modal components are aliased modal components, and obtain b aliased modal components;
[0258] Filtering the b aliasing modal components according to a preset filtering algorithm to obtain b filtered modal components;
[0259] The target fault data is determined according to the a effective modal components and the b filtered modal components.
[0260] Optionally, the preset filtering algorithm includes an SG filtering algorithm. In filtering the b aliasing modal components according to the preset filtering algorithm to obtain b filtered modal components, the control unit 302 is specifically configured to:
[0261] Acquire a target aliased modal component; the target aliased modal component is any aliased modal component among the b aliased modal components;
[0262] Obtain a first window length 2L+1 corresponding to the SG filtering algorithm; L is a positive integer;
[0263] Obtain a preset polynomial corresponding to the SG filtering algorithm; the preset polynomial is specifically as follows:
[0264]
[0265] Wherein, N1 is the power of the preset polynomial, and N1 is less than or equal to 2L+1; a j For x j The coefficient of ; x is the independent variable;
[0266] The target aliasing modal component is calculated according to a preset polynomial approximation calculation formula to obtain a polynomial approximation deviation value; the polynomial approximation calculation formula is specifically as follows:
[0267]
[0268] Among them, ε N Represents the polynomial approximation deviation value; represents the target aliased modal component;
[0269] When the polynomial approximation deviation value is less than or equal to a preset value, a filtered modal component corresponding to the target aliased modal component is determined according to the preset polynomial.
[0270] Optionally, in determining the target fault data according to the a effective modal components and the b filtered modal components, the control unit 302 is specifically configured to:
[0271] Signal reconstruction is performed on the a effective modal components and the b filtered modal components according to a preset signal reconstruction formula to obtain reference fault data; the preset signal reconstruction formula is specifically as follows:
[0272]
[0273] in, is the reference fault data, is the i-th filtering modal component among the b filtering modal components, is the jth effective modal component among the a effective modal components;
[0274] Determine a first time series corresponding to the reference fault data;
[0275] Determine a target sequence length N2 and a second window length M corresponding to the first time series;
[0276] Calculate a third window length Z according to the second window length M and the target sequence length N2;
[0277] Converting the first time series into a target trajectory matrix according to the second window length M and the third window length Z;
[0278] The target trajectory matrix is subjected to singular value decomposition according to a preset singular value decomposition formula to obtain a diagonal matrix; the singular value decomposition formula is specifically as follows:
[0279]
[0280] in, represents the target trajectory matrix; U represents the left matrix; Σ represents the diagonal matrix, and the elements on the diagonal are singular values; V represents the right matrix; V T represents the transposed matrix of the right matrix;
[0281] Obtaining singular values in the diagonal matrix to obtain target singular value data;
[0282] The first time series is reconstructed according to the target singular value data to obtain the target fault data.
[0283] Optionally, in the aspect of reconstructing the first time series according to the target singular value data to obtain the target fault data, the control unit 302 is specifically configured to:
[0284] The target singular value data are grouped according to a preset singular value grouping method to obtain multiple groups of singular values;
[0285] Grouping the first time series according to the multiple groups of singular values to obtain multiple groups of time series;
[0286] Sorting the multiple groups of time series according to the multiple groups of singular values to obtain a first time series order; the larger the singular value, the higher the order;
[0287] Selecting c time series with the highest order in the first time series, and combining the c time series into a new time series to obtain a second time series; c is a positive integer;
[0288] The second time series is reconstructed according to a preset sequence reconstruction formula to obtain the target fault data; the sequence reconstruction formula is specifically as follows:
[0289]
[0290] in, represents the target fault data; represents the second time series.
[0291] Optionally, in the aspect of constructing the target random forest prediction model according to the training set and the test set, the control unit 302 is specifically used to:
[0292] Processing the training set and the test set by a preset normalization method to obtain a first training set and a first test set;
[0293] The first training set is sampled according to a preset resampling method to obtain h sub-training sets; h is an integer greater than 1;
[0294] According to the decision tree generation method in steps S1-S2 below, h decision trees are generated, each decision tree corresponds to a sub-training set, to obtain a reference random forest prediction model, the reference random forest prediction model includes the h decision trees, specifically:
[0295] S1. Generate a first reference decision tree according to the first sub-training set, randomly extract d features from a preset feature set, and use the d features as feature subsets of the first reference decision tree to obtain a first feature subset; d is a positive integer less than or equal to q; the first sub-training set is any sub-training set among the h sub-training sets;
[0296] S2. Based on the principle of minimizing the Gini index, select a partition attribute from the first feature subset, and partition the first reference decision tree according to the partition attribute to obtain a first target decision tree;
[0297] Testing the reference random forest prediction model using the first test set to obtain a first accuracy rate;
[0298] When the first accuracy is greater than or equal to a preset accuracy threshold, the target random forest prediction model is determined according to the reference random forest prediction model.
[0299] Optionally, the AC charging pile fault warning device 300 is further specifically used for:
[0300] Obtaining a target AC charging pile type corresponding to the target AC charging pile;
[0301] Determine a reference ratio value corresponding to the target AC charging pile type;
[0302] Obtaining a target failure rate corresponding to the target AC charging pile type;
[0303] Determining a first influence coefficient corresponding to the target failure rate;
[0304] Acquire the working data of the target AC charging pile in a second preset time period to obtain historical working data; the end time of the second preset time period is earlier than the start time of the first preset time period;
[0305] Determine the ratio of fault data in the historical working data to all working data to obtain a historical fault ratio;
[0306] Determine a target optimization factor corresponding to the historical failure ratio;
[0307] Optimizing the first influence coefficient according to the target optimization factor to obtain a second influence coefficient;
[0308] The reference ratio value is adjusted according to the second influence coefficient to obtain the target ratio value.
[0309] In a specific implementation, the fault warning device 300 for the AC charging pile described in the embodiment of the present invention may also execute other implementations described in the fault warning method for the AC charging pile provided in the above embodiment of the present invention, which will not be described in detail here.
[0310] See also Figure 4 , Figure 4 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device includes a processor, a memory, and one or more programs, the electronic device may also include a communication interface, the processor, the memory and the communication interface are interconnected via a bus. The one or more programs are stored in the memory and are configured to be executed by the processor, the one or more programs include some or all steps for executing any method described in the above method embodiment, which will not be repeated here.
[0311] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments, and the above computer includes an electronic device.
[0312] The embodiment of the present application also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes an electronic device.
[0313] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0314] In the above embodiments, 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.
[0315] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as 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, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0316] The units described above 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.
[0317] In addition, each functional unit in each embodiment of the present application 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.
[0318] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially 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 memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.
[0319] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A fault warning method for an AC charging pile, characterized in that: The method is applied to a server of an intelligent early warning system, and comprises: Acquire first working data of a target AC charging pile within a first preset time period to obtain n first working data sets, where n is a positive integer; Determine the fault data and the normal data of each of the n first working data sets to obtain n first fault data sets and n first normal data sets; Preprocessing the n first fault data sets according to a preset preprocessing algorithm to obtain target fault data; Preprocessing the n first normal data sets according to the preset preprocessing algorithm to obtain target normal data; Dividing the target normal data and the target fault data into a training set and a test set according to a target ratio value; Construct a target random forest prediction model according to the training set and the test set; Acquire the second working data of the target AC charging pile at the current moment, and obtain n second working data; Inputting the n second working data into the target random forest prediction model to obtain a target diagnosis result; Determine a target fault corresponding to the target diagnosis result; A corresponding fault control instruction is generated according to the target fault, and the intelligent early warning system is controlled by the fault control instruction to perform a corresponding early warning operation.
2. The method according to claim 1, characterized in that Each of the n first fault data sets corresponds to a data type, and the data type includes one of the following: a voltage data type, a current data type, a temperature data type, and a humidity data type; The preprocessing of the n first fault data sets according to a preset preprocessing algorithm to obtain target fault data includes: Extracting data corresponding to the voltage data type and the current data type from the n first fault data sets to obtain target monitoring data; The target monitoring data is decomposed according to a preset modal decomposition formula to obtain k modal components; k is a positive integer; the modal decomposition formula is as follows: in, represents the target monitoring data, the superscript 0 represents the original data, the subscript q represents the data type label corresponding to the target monitoring data, and each data type label corresponds to a data type; t represents time; c j (t) represents the j-th modal component among the k modal components, j is a positive integer less than or equal to k; R(t) represents the residual term; Each of the k modal components is calculated according to a preset Mahalanobis distance calculation formula to obtain k similarities; the Mahalanobis distance calculation formula is specifically as follows: Wherein, S(j) represents the similarity between the j-th modal component among the k modal components and the corresponding j-th original signal among the n first fault data sets; D M represents the Mahalanobis distance; X represents the probability density function of the j-th modal component; Y represents the probability density function of the j-th original signal; (XY) T represents the transposed matrix of XY; ∑ -1 (XY) represents the inverse matrix of the covariance matrix of XY; Determine the similarities among the k similarities that are greater than a preset similarity threshold, and obtain a similarities; a is a natural number less than or equal to k; Determine that the modal components corresponding to the a similarities in the k modal components are valid modal components, and obtain a valid modal components; Determine a similarity that is equal to the similarity threshold among the k similarities, and obtain b similarities; b is a natural number less than or equal to k, and the sum of a and b is not greater than k; Determine that the modal components corresponding to the b similarities in the k modal components are aliased modal components, and obtain b aliased modal components; Filtering the b aliasing modal components according to a preset filtering algorithm to obtain b filtered modal components; The target fault data is determined according to the a effective modal components and the b filtered modal components.
3. The method according to claim 2, characterized in that The preset filtering algorithm includes an SG filtering algorithm, and filtering the b aliasing modal components according to the preset filtering algorithm to obtain b filtered modal components includes: Acquire a target aliased modal component; the target aliased modal component is any aliased modal component among the b aliased modal components; Obtain a first window length 2L+1 corresponding to the SG filtering algorithm; L is a positive integer; Obtain a preset polynomial corresponding to the SG filtering algorithm; the preset polynomial is specifically as follows: Wherein, N1 is the power of the preset polynomial, and N1 is less than or equal to 2L+1; a j For x j The coefficient of ; x is the independent variable; The target aliasing modal component is calculated according to a preset polynomial approximation calculation formula to obtain a polynomial approximation deviation value; the polynomial approximation calculation formula is specifically as follows: Among them, ε N Represents the polynomial approximation deviation value; represents the target aliased modal component; When the polynomial approximation deviation value is less than or equal to a preset value, a filtered modal component corresponding to the target aliased modal component is determined according to the preset polynomial.
4. The method according to claim 2, characterized in that The determining the target fault data according to the a effective modal components and the b filtered modal components comprises: Signal reconstruction is performed on the a effective modal components and the b filtered modal components according to a preset signal reconstruction formula to obtain reference fault data; the preset signal reconstruction formula is specifically as follows: in, is the reference fault data, is the i-th filtering modal component among the b filtering modal components, is the jth effective modal component among the a effective modal components; Determine a first time series corresponding to the reference fault data; Determine a target sequence length N2 and a second window length M corresponding to the first time series; Calculate a third window length Z according to the second window length M and the target sequence length N2; Converting the first time series into a target trajectory matrix according to the second window length M and the third window length Z; The target trajectory matrix is subjected to singular value decomposition according to a preset singular value decomposition formula to obtain a diagonal matrix; the singular value decomposition formula is specifically as follows: in, represents the target trajectory matrix; U represents the left matrix; ∑ represents the diagonal matrix, and the elements on the diagonal are singular values; V represents the right matrix; V T represents the transposed matrix of the right matrix; Obtaining singular values in the diagonal matrix to obtain target singular value data; The first time series is reconstructed according to the target singular value data to obtain the target fault data.
5. The method according to claim 4, characterized in that The step of reconstructing the first time series according to the target singular value data to obtain the target fault data includes: The target singular value data are grouped according to a preset singular value grouping method to obtain multiple groups of singular values; Grouping the first time series according to the multiple groups of singular values to obtain multiple groups of time series; Sorting the multiple groups of time series according to the multiple groups of singular values to obtain a first time series order; the larger the singular value, the higher the order; Selecting c time series with the highest order in the first time series, and combining the c time series into a new time series to obtain a second time series; c is a positive integer; The second time series is reconstructed according to a preset sequence reconstruction formula to obtain the target fault data; the sequence reconstruction formula is specifically as follows: in, represents the target fault data; represents the second time series.
6. The method according to any one of claims 1 to 5, characterized in that: The step of constructing a target random forest prediction model according to the training set and the test set includes: Processing the training set and the test set by a preset normalization method to obtain a first training set and a first test set; The first training set is sampled according to a preset resampling method to obtain h sub-training sets; h is an integer greater than 1; According to the decision tree generation method in steps S1-S2 below, h decision trees are generated, each decision tree corresponds to a sub-training set, to obtain a reference random forest prediction model, the reference random forest prediction model includes the h decision trees, specifically: S1. Generate a first reference decision tree according to the first sub-training set, randomly extract d features from a preset feature set, and use the d features as feature subsets of the first reference decision tree to obtain a first feature subset; d is a positive integer less than or equal to q; the first sub-training set is any sub-training set among the h sub-training sets; S2. Based on the principle of minimizing the Gini index, select a partition attribute from the first feature subset, and partition the first reference decision tree according to the partition attribute to obtain a first target decision tree; Testing the reference random forest prediction model using the first test set to obtain a first accuracy rate; When the first accuracy is greater than or equal to a preset accuracy threshold, the target random forest prediction model is determined according to the reference random forest prediction model.
7. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Obtaining a target AC charging pile type corresponding to the target AC charging pile; Determine a reference ratio value corresponding to the target AC charging pile type; Obtaining a target failure rate corresponding to the target AC charging pile type; Determining a first influence coefficient corresponding to the target failure rate; Acquire the working data of the target AC charging pile in a second preset time period to obtain historical working data; the end time of the second preset time period is earlier than the start time of the first preset time period; Determine the ratio of fault data in the historical working data to all working data to obtain a historical fault ratio; Determine a target optimization factor corresponding to the historical failure ratio; Optimizing the first influence coefficient according to the target optimization factor to obtain a second influence coefficient; The reference ratio value is adjusted according to the second influence coefficient to obtain the target ratio value.
8. A fault warning device for an AC charging pile, characterized in that: A server applied to an intelligent early warning system, the device comprises: an acquisition unit, a control unit, and an early warning unit, wherein: The acquisition unit is used to acquire first working data of the target AC charging pile within a first preset time period to obtain n first working data sets; n is a positive integer; The control unit is used to determine the first fault data and the first normal data of each of the n first working data sets to obtain n first fault data sets and n first normal data sets; preprocess the n first fault data sets according to a preset preprocessing algorithm to obtain target fault data; preprocess the n first normal data sets according to the preset preprocessing algorithm to obtain target normal data; divide the target normal data n first normal data and the target fault data into a training set and a test set according to a target ratio value; and construct a target random forest prediction model according to the training set and the test set; The acquisition unit is further used to acquire the second working data of the target AC charging pile at the current moment, and obtain n second working data; the second preset time is later than the end time of the first preset time period; input the n second working data into the target random forest prediction model to obtain a target diagnosis result; determine the target fault corresponding to the target diagnosis result; The early warning unit is used to generate a corresponding fault control instruction according to the target fault, and control the intelligent early warning system to perform a corresponding early warning operation through the fault control instruction.
9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is used to store one or more programs and is configured to be executed by the processor, wherein the program includes instructions for executing the steps in the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program for electronic data exchange is stored, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Charging pile state evaluation method and device based on CNN and random forest
CN115619271A
Direct current charging pile fault early warning method based on soft classification
CN115659236A
Fault identification method, device and equipment of target power distribution network and medium
CN117407747A
Charging pile fault identification method and device based on self-coding and random forest
CN117633662A
DC charging pile monitoring method and device, electronic equipment and storage medium
CN118306249A