Abnormality detection method and device for charging pile and nonvolatile storage medium
By obtaining abnormal operation data of the charging pile operating system and adjusting the weight of the neural network model, the problem of time-consuming and overfitting of parameters during training of neural network models is solved, and the fitting ability and prediction accuracy of the model are improved.
Patent Information
- Application Number
- CN202411146388.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-11-22
AI Technical Summary
Existing neural network models take a long time to adjust parameters during training and are prone to overfitting, and traditional genetic algorithms are prone to falling into the problems of premature convergence and poor local convergence.
By obtaining abnormal operation data of the charging pile operating system, input it into the initial neural network model, and based on multiple sets of initial network parameters and fitness functions, the target neural network model parameters are determined, and the weight of the initial neural network model is adjusted to obtain the target neural network. model to improve the fitting ability and training speed of the model.
The optimization of neural network model parameters is achieved, the fitting ability and prediction accuracy of the model are improved, and the problem of time-consuming and overfitting of parameters during training is solved.
Smart Images

Figure CN119004480A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of new energy and energy-saving technologies, and in particular to an abnormality detection method and device for a charging pile and a non-volatile storage medium. Background Art
[0002] With the development of hacker technology, the number of software vulnerabilities has steadily increased. Currently, experts discover vulnerabilities by analyzing software. However, it takes a long time to analyze software and find vulnerabilities. In order to solve the technical dependence on experts and reduce the cost of vulnerability detection, research on deep learning-based methods to automatically analyze vulnerabilities and minimize expert intervention has become a new trend in software vulnerability detection.
[0003] However, current neural network models take a long time to adjust parameters during training and are prone to overfitting problems; at the same time, traditional genetic algorithms are prone to problems of premature convergence and poor local convergence.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide an abnormality detection method, device and non-volatile storage medium for a charging pile, so as to at least solve the technical problems in the related art that parameter adjustment is time-consuming and overfitting is easy to occur during training of a neural network model.
[0006] According to one aspect of an embodiment of the present invention, there is provided a method for detecting anomalies in a charging pile, comprising: obtaining abnormal operation data of an operating system of the charging pile, wherein the abnormal operation data characterizes data showing anomalies in the operation of the operating system of the charging pile, wherein the data comprises at least one of the following: abnormal log records, network status, and system configuration information; inputting the abnormal operation data into an initial neural network model to obtain multiple sets of initial network parameters of the initial neural network model, wherein any set of network parameters in the multiple sets of initial network parameters comprises data corresponding to multiple parameter categories; determining target neural network model parameters based on the multiple sets of initial network parameters and a fitness function; adjusting the weights of the initial neural network model based on the target neural network model parameters and the abnormal operation data to obtain a target neural network model, wherein the target neural network model is used to detect abnormal data in the operating system of the charging pile.
[0007] Optionally, the abnormal operation data is input into the initial neural network model to obtain multiple sets of initial network parameters of the initial neural network model, wherein any set of network parameters in the multiple sets of initial network parameters includes data corresponding to multiple parameter categories, including: based on the abnormal operation data, extracting data segments containing abnormal information; when the length of the data segment is greater than a preset fixed length, cutting the data segment to obtain an abnormal data set; inputting the abnormal data set into the initial neural network model to obtain multiple sets of initial network parameters of the initial neural network model.
[0008] Optionally, when the length of the data segment is less than a preset fixed length, the method includes: padding the data segment to obtain an abnormal data set.
[0009] Optionally, based on multiple sets of initial network parameters and fitness functions, target neural network model parameters are determined, including: based on the fitness function, calculating the fitness of parameter values corresponding to multiple parameter categories corresponding to each of the multiple sets of initial network parameters; among the multiple sets of initial network parameters, based on two parameter values with the largest fitness among the parameter values corresponding to each of the multiple parameter categories, determining new parameter values corresponding to each of the multiple parameter categories to obtain first network parameters; adjusting the first network parameters to obtain second network parameters; repeating the above operation of obtaining the second network parameters until a stopping condition is met, stopping the adjustment, and selecting the network parameters with the largest fitness corresponding to each of the multiple parameter categories as the target neural network model parameters.
[0010] Optionally, among multiple groups of initial network parameters, based on two parameter values with the largest fitness among the parameter values corresponding to each of the multiple parameter categories, new parameter values corresponding to each of the multiple parameter categories are determined to obtain the first network parameters, including: calculating the probability of occurrence of the first adjustment operation based on a preset first adjustment operation probability function; generating a random number; when the random number is less than the probability of occurrence of the first adjustment operation, selecting two parameter values with the largest fitness among the parameter values corresponding to each of the multiple parameter categories to perform the first adjustment operation, determining new parameter values corresponding to each of the multiple parameter categories, and obtaining the first network parameters.
[0011] Optionally, when the random number is not less than the probability of occurrence of the first adjustment operation, a parameter value with the largest fitness is selected from parameter values corresponding to each of the multiple parameter categories as a new parameter value corresponding to each of the multiple parameter categories to obtain the first network parameter.
[0012] Optionally, adjusting the first network parameter to obtain the second network parameter includes: calculating the probability of occurrence of the second adjustment operation based on a preset second adjustment operation probability function; generating a random number; and when the random number is less than the probability of occurrence of the second adjustment operation, performing a second adjustment operation on the first network parameter to obtain the second network parameter.
[0013] Optionally, when the random number is not less than the occurrence probability of the second adjustment operation, the first network parameter is used as the second network parameter.
[0014] Optionally, the operating data to be detected in the charging pile operating system is obtained; the operating data to be detected is input into the target neural network model to obtain a detection result, wherein the detection result represents whether the charging pile operating system is operating abnormally.
[0015] According to another aspect of an embodiment of the present invention, there is also provided an abnormality detection device for a charging pile, comprising: an acquisition module for acquiring abnormal operation data of a charging pile operating system, wherein the abnormal operation data characterizes data of abnormalities existing during the operation of the charging pile operating system, wherein the data comprises at least one of the following: abnormal log records, network status and system configuration information; an input module for inputting the abnormal operation data into an initial neural network model to obtain multiple sets of initial network parameters of the initial neural network model, wherein any set of network parameters in the multiple sets of initial network parameters comprises data corresponding to multiple parameter categories; a determination module for determining target neural network model parameters based on the multiple sets of initial network parameters and a fitness function; an adjustment module for adjusting the weights of the initial neural network model based on the target neural network model parameters and the abnormal operation data to obtain a target neural network model, wherein the target neural network model is used to detect abnormal data in the charging pile operating system.
[0016] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided, the non-volatile storage medium including a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute any one of the above-mentioned abnormality detection methods for charging piles.
[0017] According to another aspect of an embodiment of the present invention, a computer device is provided. The computer device includes a processor, and the processor is used to run a program. When the program is running, any one of the above-mentioned abnormality detection methods for charging piles is executed.
[0018] According to yet another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, any one of the above-mentioned abnormality detection methods for a charging pile is implemented.
[0019] In an embodiment of the present invention, an abnormality detection method for a charging pile is adopted, by obtaining abnormal operation data of the charging pile operating system, wherein the abnormal operation data characterizes data with abnormalities in the operation process of the charging pile operating system, wherein the data includes at least one of the following: abnormal log records, network status and system configuration information; the abnormal operation data is input into an initial neural network model to obtain multiple groups of initial network parameters of the initial neural network model, wherein any group of network parameters in the multiple groups of initial network parameters includes data corresponding to multiple parameter categories; based on the multiple groups of initial network parameters and a fitness function, target neural network model parameters are determined; based on the target neural network model parameters and the abnormal operation data, the weights of the initial neural network model are adjusted to obtain a target neural network model, wherein the target neural network model is used to detect abnormal data in the charging pile operating system, thereby achieving the purpose of optimizing the initial parameters of the neural network model, thereby achieving the technical effect of improving the fitting ability, training speed and prediction accuracy of the model, and further solving the technical problems of time-consuming parameter adjustment and easy overfitting during neural network model training in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0021] Figure 1 A hardware structure block diagram of a computer terminal for implementing an abnormality detection method for a charging pile is shown;
[0022] Figure 2 is a flow chart of an abnormality detection method for a charging pile provided according to an embodiment of the present invention;
[0023] Figure 3 is a Transformer model diagram in a method for detecting anomalies of a charging pile according to an optional embodiment of the present invention;
[0024] Figure 4 is a flow chart of an optional abnormality detection method for a charging pile provided according to an optional embodiment of the present invention;
[0025] Figure 5 4 is a structural block diagram of an abnormality detection device for a charging pile provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] According to an embodiment of the present invention, an embodiment of an abnormality detection method for a charging pile is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0029] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal for implementing an abnormality detection method for a charging pile is shown. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0030] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0031] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the abnormality detection method for charging piles in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the abnormality detection method for charging piles of the above-mentioned application is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0032] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0033] Figure 2 is a flow chart of a method for detecting anomalies in a charging pile according to an embodiment of the present invention, such as Figure 2 As shown, the method comprises the following steps:
[0034] Step S201, obtaining abnormal operation data of the charging pile operating system, wherein the abnormal operation data represents data of abnormalities in the operation process of the charging pile operating system, wherein the data includes at least one of the following: abnormal log records, network status and system configuration information.
[0035] In this step, the abnormal operation data is the data with abnormalities in the operation process of the charging pile operating system from multiple service providers, which may include abnormal log records, abnormal network status and system configuration information. These data are connected into a data set, represented as X = {(x1, y1), (x2, y2), …, (x n ,y n)}. Among them, the abnormal log records include abnormal data packets of the charging pile operating system, abnormal access request data, and the time series of abnormal events, such as system crashes, denial of service attacks, etc.; abnormal network status includes data on abnormal delays and abnormal connection status in the network, such as frequent connection attempts, unusual remote access, a large number of invalid login attempts, etc.; system configuration information records the configuration data of the charging pile, including the version of the operating system, installed software, services and their version information.
[0036] Step S202, inputting the abnormal operation data into the initial neural network model to obtain multiple groups of initial network parameters of the initial neural network model, wherein any group of network parameters in the multiple groups of initial network parameters includes data corresponding to multiple parameter categories.
[0037] In this step, the abnormal operation data is input into the initial neural network model to obtain the initial network parameters. The initial neural network model can be a Transformer model, which is a deep learning model based on the self-attention mechanism. Figure 3 is a Transformer model diagram in a method for detecting anomalies in a charging pile according to an optional embodiment of the present invention, such as Figure 3 As shown in the figure, the Transformer model is mainly composed of two components: encoder and decoder. Each component is composed of multiple identical layers stacked together, and each layer contains a self-attention mechanism and a feedforward neural network. The wide application of the Transformer model in the field of natural language processing has promoted the rapid development of this field. It has also been used in a variety of tasks such as text generation, text summarization, language models, and question-answering systems. At the same time, the idea of Transformer has also been extended to other fields such as computer vision and speech processing, showing strong generalization capabilities. In addition, the initial network parameters refer to the parameters that need to be set when training the neural network, such as the ratio of the data set to the training set and the test set, the learning rate, and the regularization parameters.
[0038] Step S203, determining the target neural network model parameters based on multiple sets of initial network parameters and fitness functions.
[0039] In this step, multiple groups of initial network parameters are used as the initial population of the improved genetic algorithm, and the optimal combination of network parameters is obtained through the fireworks process of the genetic algorithm. Among them, the genetic algorithm is an optimization method that simulates natural selection and genetic mechanisms. Its basic process includes: initializing the population, first determining an initial population, which contains a certain number of individuals, and each individual represents a solution to the problem; evaluating fitness, for each individual, it is necessary to use the fitness function to evaluate its fitness in the current environment, and the fitness function can be used to measure the individual's problem-solving ability; selecting individuals, according to the evaluation results of the fitness function, selecting some individuals with higher fitness as parents for crossover and mutation operations; crossover operation, selecting two individuals from the parent generation, and generating new individuals through crossover operation, which can be single-point crossover, multi-point crossover or uniform crossover, etc.; mutation operation, performing mutation operation on the newly generated individuals, introducing a certain degree of randomness to increase the diversity of the population; repeating the selection, crossover and mutation operations until the stopping condition is reached; selecting the optimal solution, in the process of population evolution, it is necessary to continuously update the individuals in the population, and select the individual with the highest fitness as the optimal solution; terminating the update, when the stopping condition is met, the algorithm stops evolving and outputs the optimal solution. Genetic algorithms simulate the process of natural evolution through continuous selection, crossover and mutation operations, and can find the optimal solution in the search space.
[0040] In addition, the fitness function plays a vital role in optimization problems. It is used to evaluate the quality or performance of the solution. Specifically, the fitness function is a mathematical function that maps the solution to a problem into a single real number, the fitness value, which reflects the degree of quality of the solution in the problem space. The definition and form of the fitness function can vary in different fields and applications. In optimization algorithms such as genetic algorithms and evolutionary computing, the fitness function is the key factor driving the algorithm search process. The algorithm iteratively generates new solutions and uses the fitness function to evaluate the quality of these solutions. Based on the evaluation results, the algorithm will select high-quality solutions to retain and further evolve, thereby gradually approaching the optimal solution to the problem.
[0041] Step S204, based on the target neural network model parameters and the abnormal operation data, the weight of the initial neural network model is adjusted to obtain the target neural network model, wherein the target neural network model is used to detect abnormal data in the charging pile operating system.
[0042] In this step, the optimal parameter combination obtained by the improved genetic algorithm is used, and the Transformer model is trained multiple times to adjust the weights of each layer and each neuron of the network to fit and form an IGA-Transformer (Improved genetic algorithm, IGA) model. The training process of the Transformer model can include the following steps:
[0043] First, the processed charging pile data set is input into the Transformer model. Since the Transformer model uses parallel operations, the sequence order of the original input will be disrupted. Therefore, the charging pile data needs to be PE (positional encoding) to represent the sequence order characteristics. Position encoding is generated by using sine and cosine functions of different frequencies, and then added to the word vector of the corresponding position. The dimension of the position vector must be consistent with the dimension of the word vector. The PE calculation formula is as follows:
[0044]
[0045]
[0046] Among them, PE is the position encoding calculation formula, t is the time point when the charging pile data enters the model; d is the dimension of the charging pile data vector; pos is the position index of the charging pile data in the input sequence. Adding the charging pile data set X to the position encoding PE will obtain the charging pile data sequence X' with sequential features added.
[0047] X'=X+PE
[0048] Then, the charging pile data sequence vector X' is input into the encoding module after position encoding. In order to enhance the internal connection between the sequences, the query, key, and value are mapped through multiple different linear transformations, and then different attentions are spliced and output after linear transformation. The calculation process is as follows:
[0049]
[0050]
[0051] Z(Q e ,K e ,V e )=Concat(A1,...,A h )W O
[0052] in are the corresponding linear transformation matrices respectively; A i(Q, K, V) is the transformation result of the output of a self-attention module; Softmax is the normalization function; Q e is the query vector; K e is the key vector; V e is a value vector; T represents transpose; Concat is a connection function; Z(Q e ,K e ,V e ) is the transformation result output by the multi-mode attention module composed of multiple self-attention modules; W O is the weight matrix.
[0053] Then, after the residual connection, normalization layer and point-wise feedforward network, the charging pile data encoding information matrix C is obtained.
[0054] M=LayerNorm(X'+Z)
[0055] C=Relu(M)+M
[0056] LayerNorm means normalizing the output of each layer of neurons; M is the output vector of the residual link and the normalization layer; Relu is the activation function. After N iterations, it is input into the decoding module.
[0057] Finally, in the Transformer model library, the charging pile vulnerability dataset is used for pre-training to obtain the sequence matrix Y, which contains the detection start symbol and the charging pile vulnerability data, and is input into the decoding layer. The pre-trained matrix Y passes through the masked multi-head attention layer, which is similar to the multi-head attention layer calculation mechanism of the decoding matrix, the only difference is that a mask matrix is added to the matrix Y.
[0058] Y M =Y×W MASK
[0059] Among them, Y M represents the masked matrix; W MASK Represents the mask matrix. After masking, the model can only rely on its previous information when processing each position, which helps the model maintain causality when generating sequences. Repeat the multi-mode attention calculation operation to obtain the information matrix Q d .
[0060] Y M W Q =Q,Y M W K =K,Y M W V =V
[0061]
[0062] Q d (Q,K,V)=Concat(A1,...,A h )W O
[0063] Among them, the information matrix Q d It is formed by connecting the query matrix Q, the key vector K and the weight vector V. d As the query vector for the next multi-head attention layer, and extract the key vector K from the encoder's information matrix C e and weight vector V e , and use the Softmax function to decode and get the decoded information R. The calculation formula is as follows:
[0064] K e =C×W Ke
[0065] V e =C×W Ve
[0066]
[0067] Among them, K e and V e are the encoder key vector and weight vector extracted from the encoder information matrix C, d is the charging pile data dimension, W Ke and W Ve They are the key vectors K e and weight vector V e The corresponding linear transformation matrix, T is the transpose. After the decoded information R passes through two fully connected layers, the detection result is output.
[0068] Figure 4 FIG. 1 is a flow chart of an optional abnormality detection method for a charging pile provided according to an optional embodiment of the present invention. Figure 4 As shown in the figure, after data preprocessing, the charging pile vulnerability dataset obtains the optimal parameters through the improved genetic algorithm and uses them in the initial Transformer model. Then the model is trained and the tuned model is saved. Finally, the model is used to detect new charging pile data and output the detection results.
[0069] Through the above steps, the purpose of optimizing the initial parameters of the neural network model is achieved, thereby realizing the technical effect of improving the model's fitting ability, training speed and prediction accuracy, and further solving the technical problems of time-consuming parameter adjustment and easy overfitting during neural network model training in related technologies.
[0070] As an optional embodiment, the abnormal operation data is input into the initial neural network model to obtain multiple sets of initial network parameters of the initial neural network model, wherein any set of network parameters in the multiple sets of initial network parameters includes data corresponding to multiple parameter categories, including: based on the abnormal operation data, extracting data segments containing abnormal information; when the length of the data segment is greater than a preset fixed length, cutting the data segment to obtain an abnormal data set; inputting the abnormal data set into the initial neural network model to obtain multiple sets of initial network parameters of the initial neural network model.
[0071] Optionally, the abnormal operation data is preprocessed to convert it into a data set suitable for deep learning model detection. The abnormal operation data can be a program fragment with vulnerabilities. The data preprocessing process in the present invention can be composed of the following three sub-steps:
[0072] Program slicing, in order to retain important information for detecting vulnerabilities and reduce irrelevant noise in the source code, program slicing is required. First, the API (Application Programming Interface) function list of the abnormal operation data of the charging pile and the modified code statements are set as the slicing criteria. The slicing criteria is a tuple C = (N, V), in (N, V), N is the instruction set, V is the variable set, and the program is sliced forward and backward based on this criterion using the static slicing method. The forward slice obtained refers to the fragment affected by the instruction set N and the variable set V in the program. The calculation direction of the forward slice is the same as the running direction of the program; the calculation direction of the backward slice obtained is opposite to the running direction of the program, and it is composed of all instructions in the program that affect the slicing criteria. Each instruction in the slice is located before the instruction set N. Among them, the modified code is generally more likely to have vulnerabilities. If it can be checked whether the program has been modified, it means that this part of the program can be retained as a code fragment for detection.
[0073] After slicing is completed, the program fragments need to be converted into code snippets. Search for program slices created with the same slicing conditions, delete duplicate slices, and then record the slice type. If there is only one type of slice (forward slice or backward slice), the program is a code snippet; if there are both forward and backward slices, they are combined into a code snippet. These code snippets are marked as 1 (vulnerable) or 0 (benign). Among them, the marking is to distinguish between vulnerable code snippets and non-vulnerable code snippets. Benign snippets are used by deep learning models to learn the characteristics and behavior patterns of normal code, and vulnerable snippets are used to learn specific patterns of vulnerabilities.
[0074] For the Transformer model, fixed-length input data is required. Therefore, the code larger than the fixed length is split. For backward slicing, backward cutting is required because the back of the backward slice is likely to contain information about the origin of the defect; for forward slicing, forward cutting is required; for the fragment composed of backward and forward, it is necessary to perform around the slicing criteria.
[0075] As an optional embodiment, when the length of the data segment is less than a preset fixed length, the method includes: padding the data segment to obtain an abnormal data set.
[0076] Optionally, padding is applied to code segments that are smaller than a fixed length. For backward slicing, padding is applied from the front, since the important information is at the back; for forward slicing, padding is applied from the back; for segments that contain both backward and forward slicing, padding is applied on both sides around the slicing criterion.
[0077] As an optional embodiment, based on multiple sets of initial network parameters and fitness functions, target neural network model parameters are determined, including: based on the fitness function, calculating the fitness of parameter values corresponding to multiple parameter categories corresponding to each of the multiple sets of initial network parameters; among the multiple sets of initial network parameters, based on the two parameter values with the largest fitness among the parameter values corresponding to each of the multiple parameter categories, determining new parameter values corresponding to each of the multiple parameter categories to obtain first network parameters; adjusting the first network parameters to obtain second network parameters; repeating the above operation of obtaining the second network parameters until a stopping condition is met, stopping the adjustment, and selecting the network parameters with the largest fitness corresponding to each of the multiple parameter categories as the target neural network model parameters.
[0078] Optionally, multiple sets of initial network parameters are integer-encoded as the initial population of the genetic algorithm. The encoding length is:
[0079] S=RS1+S1S2+S1+S2
[0080] Among them, S is the encoding length, R is the number of nodes in the input layer of the Transformer model, S1 is the number of nodes in the hidden layer, and S2 is the number of nodes in the output layer. Integer encoding is a common encoding method in genetic algorithms. It can represent the solution of the problem as a string of integers, simplifying the representation and calculation of the problem. The main functions of integer encoding are as follows: simplifying the problem representation, representing the solution of the problem as an integer sequence, can more intuitively represent the solution space of the problem and reduce the complexity of the solution space; facilitating the operation of genetic operators, integer encoding makes the operation of genetic operators such as crossover and mutation simpler and more efficient, because the solution of integer encoding is represented as an integer sequence, and the integer sequence can be directly operated; improving search efficiency, integer encoding can reduce the size of the search space, thereby improving search efficiency and reducing search time; avoiding floating-point calculation errors, using integer encoding in genetic algorithms can avoid the accumulation of floating-point calculation errors and improve the stability and convergence speed of the algorithm.
[0081] Then, the fitness of each parameter value is calculated according to the adaptive fitness function. The reciprocal of the prediction error can be selected as the fitness function, that is, the larger the error, the smaller the reciprocal and the lower the fitness value; the smaller the error, the larger the reciprocal and the higher the fitness value.
[0082]
[0083] Among them, fit is the fitness function; y i is the actual output of the i-th node of the Transformer model; o i The predicted output of the i-th node of the Transformer model; c is any value between (0, 1).
[0084] Then, the selection operation is performed. The selection probability is calculated according to the fitness function. The higher the fitness, the greater the selection probability. The selection probability calculation formula is as follows:
[0085]
[0086] Among them, P i is the selection probability of node i, and n is the total number of nodes.
[0087] Finally, the two parameter values with the largest fitness among the parameter values corresponding to multiple parameter categories are selected as parents, and crossover operations and mutation operations are performed in sequence. The above operations are repeated to continuously evolve and update the population of the genetic algorithm. The updating is stopped after the preset stopping condition is reached, and the parameter values with the largest fitness among the parameter values corresponding to multiple parameter categories are selected to form the optimal parameter value combination.
[0088] As an optional embodiment, among multiple groups of initial network parameters, based on two parameter values with the largest fitness among the parameter values corresponding to each of the multiple parameter categories, new parameter values corresponding to each of the multiple parameter categories are determined to obtain the first network parameters, including: calculating the probability of occurrence of the first adjustment operation based on a preset first adjustment operation probability function; generating a random number; when the random number is less than the probability of occurrence of the first adjustment operation, selecting two parameter values with the largest fitness among the parameter values corresponding to each of the multiple parameter categories to perform the first adjustment operation, determining new parameter values corresponding to each of the multiple parameter categories, and obtaining the first network parameters.
[0089] Optionally, the first adjustment operation may be a crossover operation, and the crossover operation probability formula is as follows:
[0090]
[0091] Among them, p c is the crossover probability, f max is the maximum fitness of the group, f avg is the average fitness value of the group, f is the larger fitness value of the two individuals to be crossed, k1, k2k3, k4 are constants, and k1<k2.
[0092] Then, a random number between 0 and 1 is generated. If the number is less than the crossover operation probability, a crossover operation is performed. The crossover operation refers to selecting certain positions (i.e., crossover points) from two or more parent individuals, and then exchanging or replacing the genes at these positions to generate new offspring individuals. Common crossover operations include one-point crossover, two-point crossover, uniform crossover, arithmetic crossover, simulated binary crossover, and multi-point crossover. The crossover operation plays a vital role in genetic algorithms. It can not only generate new individuals by combining the genes of different individuals to increase the diversity of the population, but also pass on excellent genes to offspring, driving the population to evolve towards a better solution space.
[0093] As an optional embodiment, when the random number is not less than the probability of occurrence of the first adjustment operation, the parameter value with the largest fitness is selected from the parameter values corresponding to each of the multiple parameter categories as the new parameter value corresponding to each of the multiple parameter categories to obtain the first network parameter.
[0094] Optionally, a random number between 0 and 1 may be generated. If the random number is not less than the calculated crossover operation probability, the one with greater fitness among the two initial network parameter values of the parent generation is directly used as the parameter of the child generation.
[0095] As an optional embodiment, adjusting the first network parameter to obtain the second network parameter includes: calculating the probability of occurrence of the second adjustment operation based on a preset second adjustment operation probability function; generating a random number; and when the random number is less than the probability of occurrence of the second adjustment operation, performing a second adjustment operation on the first network parameter to obtain the second network parameter.
[0096] Optionally, the second adjustment operation may be a mutation operation, and the mutation operation probability formula is as follows:
[0097]
[0098] Among them, p m is the mutation probability, f max is the maximum fitness of the group, f avg is the average fitness value of the group, f' is the individual fitness value to be mutated, k1, k2k3, k4 are constants, and k3<k4.
[0099] Next, a random number between 0 and 1 is generated. If the number is less than the probability of the mutation operation, the mutation operation is performed. The mutation operation refers to randomly changing certain gene values in the individual code string with a certain probability. This change can be regarded as a gene mutation in the process of biological evolution, which provides an opportunity for the generation of new individuals and helps the algorithm to jump out of the local optimal solution and explore a wider solution space. Common mutation operations include basic bit mutation, uniform mutation, boundary mutation, non-uniform mutation and Gaussian mutation.
[0100] As an optional embodiment, when the random number is not less than the occurrence probability of the second adjustment operation, the first network parameter is used as the second network parameter.
[0101] Optionally, a random number between 0 and 1 may be generated. If the random number is not less than the calculated probability of the mutation operation, the offspring parameters are not changed.
[0102] As an optional embodiment, the operating data to be detected in the charging pile operating system is obtained; the operating data to be detected is input into the target neural network model to obtain a detection result, wherein the detection result represents whether the charging pile operating system is operating abnormally.
[0103] Optionally, after multiple trainings and using the optimal parameter combination obtained using the improved genetic algorithm, a tuned IGA-Transformer model is obtained. After testing the performance of the model, it is deployed on the charging pile operating system to detect whether there are anomalies in the input operating data, wherein the presence of anomalies indicates that there are loopholes in the operating data.
[0104] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0105] Through the description of the above implementation methods, those skilled in the art can clearly understand that the abnormality detection method for charging piles according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0106] According to an embodiment of the present invention, there is also provided an abnormality detection device for a charging pile for implementing the abnormality detection method for a charging pile. Figure 5 is a structural block diagram of an abnormality detection device for a charging pile according to an embodiment of the present invention, such as Figure 5 As shown, the abnormality detection device for a charging pile includes: an acquisition module 51, an input module 52, a determination module 53 and an adjustment module 54. The abnormality detection device for a charging pile is described below.
[0107] The acquisition module 51 is used to acquire abnormal operation data of the charging pile operating system, wherein the abnormal operation data represents data with abnormalities during the operation of the charging pile operating system, wherein the data includes at least one of the following: abnormal log records, network status and system configuration information.
[0108] The input module 52 is connected to the acquisition module 51, and is used to input the abnormal operation data into the initial neural network model to obtain multiple groups of initial network parameters of the initial neural network model, wherein any group of network parameters in the multiple groups of initial network parameters includes data corresponding to multiple parameter categories.
[0109] The determination module 53 is connected to the input module 52 and is used to determine the target neural network model parameters based on multiple groups of initial network parameters and fitness functions.
[0110] The adjustment module 54 is connected to the determination module 53, and is used to adjust the weight of the initial neural network model based on the target neural network model parameters and abnormal operation data to obtain the target neural network model, wherein the target neural network model is used to detect abnormal data in the charging pile operating system.
[0111] It should be noted that the acquisition module 51, input module 52, determination module 53 and adjustment module 54 correspond to steps S201 to S204 in the embodiment, and the examples and application scenarios implemented by the multiple modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules, as part of the device, can be run in the computer terminal 10 provided in the embodiment.
[0112] An embodiment of the present invention may provide a computer device. Optionally, in this embodiment, the computer device may be located in at least one network device among multiple network devices of a computer network. The computer device includes a memory and a processor.
[0113] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the abnormality detection method and device for charging piles in the embodiments of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, the above-mentioned abnormality detection method for charging piles is realized. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0114] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: obtain abnormal operation data of the charging pile operating system, wherein the abnormal operation data characterizes the data with abnormalities in the operation process of the charging pile operating system, wherein the data includes at least one of the following: abnormal log records, network status and system configuration information; input the abnormal operation data into the initial neural network model to obtain multiple sets of initial network parameters of the initial neural network model, wherein any set of network parameters in the multiple sets of initial network parameters includes data corresponding to multiple parameter categories; determine the target neural network model parameters based on the multiple sets of initial network parameters and the fitness function; adjust the weights of the initial neural network model based on the target neural network model parameters and the abnormal operation data to obtain the target neural network model, wherein the target neural network model is used to detect abnormal data in the charging pile operating system.
[0115] Optionally, the processor may also execute the following program code: inputting abnormal operation data into the initial neural network model to obtain multiple sets of initial network parameters of the initial neural network model, wherein any set of network parameters in the multiple sets of initial network parameters includes data corresponding to multiple parameter categories, including: extracting data segments containing abnormal information based on the abnormal operation data; when the length of the data segment is greater than a preset fixed length, cutting the data segment to obtain an abnormal data set; inputting the abnormal data set into the initial neural network model to obtain multiple sets of initial network parameters of the initial neural network model.
[0116] Optionally, the processor may also execute program code of the following steps: when the length of the data segment is less than a preset fixed length, including: padding the data segment to obtain an abnormal data set.
[0117] Optionally, the processor may also execute program code for the following steps: determining target neural network model parameters based on multiple sets of initial network parameters and fitness functions, including: calculating the fitness of parameter values corresponding to multiple parameter categories corresponding to each of the multiple sets of initial network parameters based on the fitness function; determining new parameter values corresponding to each of the multiple parameter categories based on two parameter values with the largest fitness among the parameter values corresponding to each of the multiple parameter categories among the multiple sets of initial network parameters to obtain first network parameters; adjusting the first network parameters to obtain second network parameters; repeating the above operation of obtaining the second network parameters until a stop condition is met, stopping the adjustment, and selecting the network parameters with the largest fitness corresponding to each of the multiple parameter categories as the target neural network model parameters.
[0118] Optionally, the processor may also execute program code for the following steps: determining, among multiple sets of initial network parameters, new parameter values corresponding to each of the multiple parameter categories based on two parameter values with the greatest fitness among the parameter values corresponding to each of the multiple parameter categories, to obtain first network parameters, including: calculating the probability of occurrence of the first adjustment operation based on a preset first adjustment operation probability function; generating a random number; and when the random number is less than the probability of occurrence of the first adjustment operation, selecting two parameter values with the greatest fitness among the parameter values corresponding to each of the multiple parameter categories to perform the first adjustment operation, determining new parameter values corresponding to each of the multiple parameter categories, and obtaining first network parameters.
[0119] Optionally, the processor may also execute the program code of the following steps: when the random number is not less than the probability of occurrence of the first adjustment operation, selecting the parameter value with the largest fitness from the parameter values corresponding to each of the multiple parameter categories as the new parameter value corresponding to each of the multiple parameter categories, to obtain the first network parameter.
[0120] Optionally, the processor may also execute program code of the following steps: adjusting the first network parameter to obtain the second network parameter, including: calculating the probability of occurrence of the second adjustment operation based on a preset second adjustment operation probability function; generating a random number; and when the random number is less than the probability of occurrence of the second adjustment operation, performing a second adjustment operation on the first network parameter to obtain the second network parameter.
[0121] Optionally, the processor may further execute a program code of the following steps: when the random number is not less than the probability of occurrence of the second adjustment operation, using the first network parameter as the second network parameter.
[0122] Optionally, the processor may also execute the program code of the following steps: obtaining the operating data to be detected in the charging pile operating system; inputting the operating data to be detected into the target neural network model to obtain a detection result, wherein the detection result indicates whether the charging pile operating system is operating abnormally.
[0123] According to an embodiment of the present invention, a method for detecting abnormalities in a charging pile is provided. By acquiring abnormal operation data of a charging pile operating system, wherein the abnormal operation data characterizes data in which abnormalities exist during the operation of the charging pile operating system, wherein the data includes at least one of the following: abnormal log records, network status, and system configuration information; the abnormal operation data is input into an initial neural network model to obtain multiple groups of initial network parameters of the initial neural network model, wherein any group of network parameters in the multiple groups of initial network parameters includes data corresponding to multiple parameter categories; based on the multiple groups of initial network parameters and fitness functions, target neural network model parameters are determined; based on the target neural network model parameters and the abnormal operation data, the weights of the initial neural network model are adjusted to obtain a target neural network model, wherein the target neural network model is used to detect abnormal data in the charging pile operating system, thereby achieving the purpose of optimizing the initial parameters of the neural network model, thereby achieving the technical effect of improving the model's fitting ability, training speed, and prediction accuracy, thereby solving the technical problems of time-consuming parameter adjustment and easy overfitting during neural network model training in related technologies.
[0124] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a non-volatile storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0125] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the abnormality detection method for a charging pile provided in the above embodiment.
[0126] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0127] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining abnormal operation data of the charging pile operating system, wherein the abnormal operation data characterizes data of abnormalities existing during the operation of the charging pile operating system, wherein the data includes at least one of the following: abnormal log records, network status, and system configuration information; inputting the abnormal operation data into the initial neural network model to obtain multiple sets of initial network parameters of the initial neural network model, wherein any set of network parameters in the multiple sets of initial network parameters includes data corresponding to multiple parameter categories; determining target neural network model parameters based on the multiple sets of initial network parameters and the fitness function; adjusting the weights of the initial neural network model based on the target neural network model parameters and the abnormal operation data to obtain the target neural network model, wherein the target neural network model is used to detect abnormal data in the charging pile operating system.
[0128] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: based on abnormal operation data, extracting data segments containing abnormal information; when the length of the data segments is greater than a preset fixed length, cutting the data segments to obtain abnormal data sets; inputting the abnormal data sets into the initial neural network model to obtain multiple sets of initial network parameters of the initial neural network model.
[0129] Optionally, in this embodiment, the non-volatile storage medium is configured to store a program code for executing the following steps: when the length of the data segment is less than a preset fixed length, padding the data segment to obtain an abnormal data set.
[0130] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: based on the fitness function, calculating the fitness of parameter values corresponding to multiple parameter categories corresponding to each of the multiple sets of initial network parameters; among the multiple sets of initial network parameters, based on the two parameter values with the largest fitness among the parameter values corresponding to each of the multiple parameter categories, determining new parameter values corresponding to each of the multiple parameter categories to obtain a first network parameter; adjusting the first network parameter to obtain a second network parameter; repeating the above operation of obtaining the second network parameter until a stop condition is met, stopping the adjustment, and selecting the network parameter with the largest fitness corresponding to each of the multiple parameter categories as the target neural network model parameter.
[0131] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: based on a preset first adjustment operation probability function, calculating the probability of occurrence of the first adjustment operation; generating a random number; when the random number is less than the probability of occurrence of the first adjustment operation, selecting two parameter values with the largest fitness from the parameter values corresponding to each of the multiple parameter categories to perform the first adjustment operation, determine new parameter values corresponding to each of the multiple parameter categories, and obtain the first network parameter.
[0132] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: when the random number is not less than the probability of occurrence of the first adjustment operation, selecting a parameter value with the largest fitness from the parameter values corresponding to each of the multiple parameter categories as a new parameter value corresponding to each of the multiple parameter categories, to obtain a first network parameter.
[0133] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: based on a preset second adjustment operation probability function, calculating the probability of occurrence of a second adjustment operation; generating a random number; and when the random number is less than the probability of occurrence of the second adjustment operation, performing a second adjustment operation on the first network parameter to obtain a second network parameter.
[0134] Optionally, in this embodiment, the non-volatile storage medium is configured to store a program code for executing the following steps: when the random number is not less than the occurrence probability of the second adjustment operation, using the first network parameter as the second network parameter.
[0135] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: obtaining operating data to be detected in the charging pile operating system; inputting the operating data to be detected into the target neural network model to obtain a detection result, wherein the detection result represents whether the charging pile operating system is operating abnormally.
[0136] An embodiment of the present invention also provides a computer program product, including a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, it can achieve: obtaining abnormal operation data of a charging pile operating system, wherein the abnormal operation data characterizes data that is abnormal during the operation of the charging pile operating system, wherein the data includes at least one of the following: abnormal log records, network status, and system configuration information; inputting the abnormal operation data into an initial neural network model to obtain multiple sets of initial network parameters of the initial neural network model, wherein any set of network parameters in the multiple sets of initial network parameters includes data corresponding to multiple parameter categories; determining target neural network model parameters based on the multiple sets of initial network parameters and a fitness function; adjusting the weights of the initial neural network model based on the target neural network model parameters and the abnormal operation data to obtain a target neural network model, wherein the target neural network model is used to detect abnormal data in the charging pile operating system.
[0137] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0138] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0139] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0140] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0141] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0142] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, 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. The computer software product is stored in a storage medium, 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 method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0143] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for detecting abnormality of a charging pile, characterized in that: include: Acquire abnormal operation data of the charging pile operating system, wherein the abnormal operation data represents data of abnormalities in the operation process of the charging pile operating system, wherein the data includes at least one of the following: abnormal log records, network status, and system configuration information; Inputting the abnormal operation data into an initial neural network model to obtain multiple groups of initial network parameters of the initial neural network model, wherein any group of network parameters in the multiple groups of initial network parameters includes data corresponding to multiple parameter categories; Determining target neural network model parameters based on the multiple sets of initial network parameters and fitness functions; Based on the target neural network model parameters and the abnormal operation data, the weight of the initial neural network model is adjusted to obtain a target neural network model, wherein the target neural network model is used to detect abnormal data in the charging pile operating system.
2. The method according to claim 1, characterized in that The abnormal operation data is input into the initial neural network model to obtain multiple groups of initial network parameters of the initial neural network model, wherein any group of network parameters in the multiple groups of initial network parameters includes data corresponding to multiple parameter categories, including: Based on the abnormal operation data, extracting a data segment containing abnormal information; When the length of the data segment is greater than a preset fixed length, cutting the data segment to obtain an abnormal data set; The abnormal data set is input into the initial neural network model to obtain multiple groups of initial network parameters of the initial neural network model.
3. The method according to claim 2, characterized in that When the length of the data segment is less than a preset fixed length, the method includes: The data segments are filled to obtain the abnormal data set.
4. The method according to claim 1, characterized in that: The step of determining target neural network model parameters based on the multiple groups of initial network parameters and fitness functions includes: Based on the fitness function, calculating the fitness of parameter values corresponding to the plurality of parameter categories corresponding to the plurality of groups of initial network parameters; In the multiple groups of initial network parameters, based on two parameter values with the largest fitness among the parameter values corresponding to the multiple parameter categories, new parameter values corresponding to the multiple parameter categories are determined to obtain first network parameters; Adjusting the first network parameter to obtain a second network parameter; Repeat the above operation of obtaining the second network parameter until the stop condition is met, stop adjusting, and select the network parameter with the maximum fitness corresponding to each of the multiple parameter categories as the target neural network model parameter.
5. The method according to claim 4, characterized in that The determining, among the multiple groups of initial network parameters, new parameter values corresponding to each of the multiple parameter categories based on the two parameter values with the largest fitness among the parameter values corresponding to each of the multiple parameter categories, to obtain the first network parameter comprises: Calculating the occurrence probability of the first adjustment operation based on a preset first adjustment operation probability function; Generate random numbers; When the random number is less than the probability of occurrence of the first adjustment operation, two parameter values with the largest fitness are selected from the parameter values corresponding to the multiple parameter categories to perform the first adjustment operation, and new parameter values corresponding to the multiple parameter categories are determined to obtain the first network parameters.
6. The method according to claim 5, characterized in that When the random number is not less than the occurrence probability of the first adjustment operation, a parameter value with the largest fitness is selected from the parameter values corresponding to each of the multiple parameter categories as a new parameter value corresponding to each of the multiple parameter categories to obtain the first network parameter.
7. The method according to claim 4, characterized in that The adjusting the first network parameter to obtain the second network parameter includes: Calculating the occurrence probability of the second adjustment operation based on a preset second adjustment operation probability function; Generate random numbers; When the random number is smaller than the occurrence probability of the second adjustment operation, the second adjustment operation is performed on the first network parameter to obtain the second network parameter.
8. The method according to claim 7, characterized in that When the random number is not less than the occurrence probability of the second adjustment operation, the first network parameter is used as the second network parameter.
9. The method according to any one of claims 1 to 8, characterized in that: include: Obtaining the operating data to be detected in the charging pile operating system; The operating data to be detected is input into the target neural network model to obtain a detection result, wherein the detection result indicates whether the charging pile operating system is operating abnormally.
10. An abnormality detection device for a charging pile, characterized in that: include: An acquisition module, used for acquiring abnormal operation data of the charging pile operating system, wherein the abnormal operation data represents data with abnormalities in the operation process of the charging pile operating system, wherein the data includes at least one of the following: abnormal log records, network status and system configuration information; An input module, used for inputting the abnormal operation data into an initial neural network model to obtain multiple groups of initial network parameters of the initial neural network model, wherein any group of network parameters in the multiple groups of initial network parameters includes data corresponding to multiple parameter categories; A determination module, used to determine target neural network model parameters based on the multiple groups of initial network parameters and fitness functions; An adjustment module is used to adjust the weight of the initial neural network model based on the target neural network model parameters and the abnormal operation data to obtain a target neural network model, wherein the target neural network model is used to detect abnormal data in the charging pile operating system.
11. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the abnormality detection method for a charging pile as described in any one of claims 1 to 9.
12. A computer device, characterized in that: include: Memory and processor, The memory stores a computer program; The processor is used to execute the computer program stored in the memory, and when the computer program is running, the processor executes the abnormality detection method for a charging pile according to any one of claims 1 to 9.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the abnormality detection method for a charging pile described in any one of claims 1 to 9 is implemented.
