Network fault prediction method, prediction model generation method, storage medium and device

Through the network fault prediction model based on support vector regression and the particle swarm algorithm optimization parameters, the problem of insufficient network fault prediction accuracy in the existing technology is solved, more efficient fault prediction and monitoring are achieved, and the impact on steel production is reduced.

CN118449842BActive Publication Date: 2024-09-17BENXI IRON & STEEL (GROUP) INFORMATION AUTOMATION CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410874713.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-09-17
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

Existing network fault prediction methods rely on manual experience and are insufficiently accurate, making it difficult to effectively prevent network faults.

Method used

A network fault prediction model based on support vector regression is used to generate a factor set by obtaining log information, and the particle swarm algorithm is used to optimize the initial parameters to form an optimized prediction model and improve prediction accuracy.

Benefits of technology

The accuracy of network fault prediction is improved, network faults can be prevented and monitored more effectively, and the impact on steel production is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118449842B
    Figure CN118449842B
Patent Text Reader

Abstract

The present application provides a network fault prediction method, a prediction model generation method, a storage medium and a device, which belong to the field of network security technology. The model generation method includes: obtaining first log information, generating a first set of factors affecting network faults; forming a first input information of a training set and a second input information of a verification set of a network fault prediction model based on support vector regression based on the first factor set; obtaining a third input information of a first weight corresponding to the first factor set; calling a particle swarm algorithm to optimize the initial parameters in the prediction model in combination with the first input information, and outputting the optimized parameters; inputting the second input information and the third input information into the network fault prediction model after updating the initial parameters, and outputting the fault prediction result set; when the fault prediction result set meets the consistency requirements, the trained network fault prediction model is output. The present application can improve the accuracy of network fault prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to a network fault prediction method, a prediction model generation method, a storage medium and a device. Background Art

[0002] Modern steel enterprises usually introduce complex and advanced network systems to support daily operations, production control, supply chain management, financial management, human resource management and other aspects in their production activities such as ironmaking, steelmaking and steel rolling. These network systems include but are not limited to one or more of the Industrial Automation Network, Enterprise Resource Planning (ERP) system, Manufacturing Execution System (MES), Internet of Things (IoT) system, etc. Despite the use of highly advanced network systems, network failures may still occur. These network failures include hardware failures such as switches and routers, as well as software failures such as operating systems, databases, and applications, and even failures caused by external attacks such as hackers and viruses. Once a network failure occurs, it will affect the company's steel production efficiency.

[0003] At present, network system failures are usually manually checked by network operation and maintenance personnel based on the real-time network operation status, which relies more on manual experience and is difficult to effectively prevent network failures. With the development of artificial intelligence models, some models have begun to be used in network system failure prediction, but the accuracy of current prediction methods needs to be improved. Summary of the invention

[0004] Based on this, the purpose of the present application is to provide a network fault prediction method, a prediction model generation method, a storage medium and a device to solve at least one of the above problems.

[0005] In a first aspect of the present application, a method for generating a network fault prediction model is provided, the method comprising:

[0006] Acquire first log information, perform first preprocessing on the first log information, and generate a first factor set that affects the network failure;

[0007] Based on the first factor set, forming first input information of a training set and second input information of a validation set as a network fault prediction model based on support vector regression, wherein the network fault prediction model includes at least one initial parameter;

[0008] Acquire a first weight set corresponding to the first factor set as third input information of the network fault prediction model;

[0009] Invoke a particle swarm algorithm to optimize the initial parameters in combination with the first input information, and output optimized parameters;

[0010] Update the initial parameters according to the optimized parameters, input the second input information and the third input information into the network fault prediction model after the initial parameters are updated, and output a fault prediction result set corresponding to the second input information;

[0011] Determine whether the fault prediction result set meets the consistency requirement of the fault evaluation result set corresponding to the verification set. When the consistency requirement is met, terminate the training of the network fault prediction model and output the trained network fault prediction model.

[0012] In one embodiment, the initial parameters include slack variables, kernel parameters and penalty factors.

[0013] In one embodiment, the calling of the particle swarm algorithm to optimize the initial parameters in combination with the first input information and outputting the optimized parameters includes:

[0014] According to the first input information, an initial position and an initial velocity are set for each particle in the particle swarm algorithm, wherein each particle contains the slack variable, the kernel parameter and the penalty factor;

[0015] The fitness of each particle in each iteration is calculated, and the position and velocity of each particle are iteratively updated based on the fitness until the update stop condition is reached, and the final position of each particle after the update is stopped is output, and the optimized relaxation variables, kernel parameters and penalty factors are output according to the final position of each particle.

[0016] In one of the embodiments, the iterative updating of the position and speed of each particle based on the fitness includes: determining the updating method of the position and speed of the particle according to the fitness value of each particle.

[0017] In one of the embodiments, when the number of iterations reaches a preset number of iterations, it is determined that the update stop condition is met.

[0018] In one of the embodiments, determining whether the fault prediction result set meets the consistency requirement of the fault evaluation result set corresponding to the verification set includes: comparing whether the proportion of data consistency between the fault prediction result set and the fault evaluation result set exceeds a first preset proportion; if so, determining that the consistency requirement is met.

[0019] In one of the embodiments, the fault prediction result set includes a comprehensive probability value of network faults and probability values ​​of at least two fault types.

[0020] In a second aspect of the present application, a network fault prediction method is provided, the method comprising:

[0021] Obtain second log information, perform second preprocessing on the second log information, and generate a second set of factors affecting the network failure as fourth input information of a network failure prediction model, wherein the network failure prediction model is the network failure prediction model described in any one of the embodiments of the present application;

[0022] Acquire a second weight set corresponding to the second factor set as fifth input information of the network fault prediction model;

[0023] The network fault prediction model is run based on the fourth input information and the fifth input information, and a network fault prediction result is output.

[0024] In one of the embodiments, the network fault prediction result includes a comprehensive network fault probability value and probability values ​​of at least two fault types.

[0025] In a third aspect of the present application, a computer-readable storage medium is provided, on which executable instructions are stored. When the executable instructions are executed by a processor, the processor executes a network fault prediction model generation method or a network fault prediction method described in any embodiment of the present application.

[0026] In a fourth aspect of the present application, an electronic device is provided, including: one or more processors;

[0027] A memory for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors execute a network fault prediction model generation method or a network fault prediction method described in any embodiment of the present application.

[0028] The above-mentioned network fault prediction model generation method, network fault prediction method, storage medium and electronic device optimize the initial parameters in the network fault prediction model based on support vector regression by using particle swarm to obtain optimized initial parameters, and obtain the final network fault prediction model based on the optimized initial parameters, so that the prediction model can improve the accuracy of network fault prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope of the present application.

[0030] Figure 1A schematic diagram of a flow chart of a method for generating a network fault prediction model in one embodiment;

[0031] Figure 2 A flow chart of calculating the fitness of each particle in each iteration and iteratively updating the position and velocity of each particle based on the fitness until an update stop condition is reached in one embodiment;

[0032] Figure 3 The figure is a flowchart of a network fault prediction method in one embodiment. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0034] All terms (including technical and scientific terms) used in this application have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used here should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0035] For example, the terms "first", "second", etc. used in this application may be used in this article to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, the first input information may be referred to as the second input information, and similarly, the second input information may be referred to as the first input information. Both the first input information and the second input information are input information, but they are not the same input information.

[0036] For another example, the terms “include”, “comprising”, etc. used in this application indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0037] In one embodiment, Figure 1 As shown, a method for generating a network fault prediction model is provided, the method comprising:

[0038] Step 102: Obtain first log information, perform first preprocessing on the first log information, and generate a first set of factors that affect the network failure.

[0039] In this embodiment, log information is information recorded during the operation of the network system, which records various states and events of the system or device during operation. For network fault prediction, each data in the log information may become a key clue to predict the fault. The log information includes one or more of the user log, operation and maintenance log, diagnostic log and security log of the network device.

[0040] Specifically, the log information includes one or more of the following information: the status of hardware components of the system within a specific time period (such as the status of hardware components such as the mainboard, power supply, and fan), CPU status (such as usage rate or idle rate, etc.), memory status (such as memory leakage, excessive memory usage, memory error, etc.), port status (interface physical status, link connection status, port policy abnormality, etc.), temperature status (such as the temperature of the frame and single board), interface traffic status (such as the interface's receiving and sending traffic), security event records (such as login failure, illegal access, permission change, etc.), fault alarm records (such as hardware fault alarm, software fault alarm, temperature abnormality alarm, protocol abnormality alarm), etc.

[0041] The first log information indicates the log information in the first time period, and the first time period may be any suitable time period such as nearly one year or half a year, and the first log information is the source of sample data for model training. The electronic device may collect the log information in the network system or network device in the first time period through the corresponding network management protocol (such as SNMP, NetFlow, etc.) or log collection tool as the first log information.

[0042] The preprocessing in the first log information is used to generate a first factor set for training and verifying the prediction model. The preprocessing process includes one or more processing processes such as data cleaning, data standardization, and feature extraction. Through data cleaning, invalid or duplicate data can be eliminated and valid data can be retained. Specific methods of data cleaning may include deduplication, format conversion, field screening, etc. Through standardization processing, data of different dimensions are converted into data of the same dimension. Through feature extraction, features related to network failures can be extracted. For example, the above-mentioned CPU status, memory status, port status, temperature status and security event records, fault alarm records and other related features can be extracted as a unified feature representation.

[0043] Furthermore, the preprocessing process also includes converting the log data. For example, the log data stored in text form can be converted into numerical data. The specific methods of conversion may include text classification, word embedding, etc. For example, natural language processing technology can be used to classify and annotate log text and convert it into numerical features that can be understood by the machine.

[0044] The first factor set includes a variety of factors that may reflect the impact of network failures. The factors may be the above-mentioned CPU status, memory status, port status, temperature status, security event records, fault alarm records, etc., and serve as the training data set and verification data set of the prediction model.

[0045] Step 104 : forming first input information of a training set and second input information of a validation set of a network fault prediction model based on support vector regression based on the first factor set, wherein the network fault prediction model includes at least one initial parameter.

[0046] In this embodiment, the prediction model can be a network fault prediction model based on support vector regression. The model fits the relationship between input and output in the training data by finding a hyperplane, and its output information can reflect the prediction result of the network fault, which can be the occurrence probability and / or fault type of the network fault.

[0047] The first factor set contains a large amount of data, and the data in the first factor set can be split to form training set data for training the prediction model and verification set data for verifying it. The training set data serves as input information (i.e., first input information) when training the model; the verification set data serves as input information (i.e., second input information) for verifying the trained model. Optionally, the electronic device can group the data in the first factor set according to a certain ratio, such as using 90% of the data as training set data and 10% of the data as verification set data.

[0048] The electronic device also presets the evaluation result data (risk evaluation value) of the network failure corresponding to each piece of data. The evaluation result data is used to reflect the risk level and / or risk type of the network failure. The risk type may include hardware failure, software failure, abnormal temperature failure, abnormal protocol failure, etc. For example, it can be specifically divided into hardware component failure, CPU failure, memory failure, port connection failure, abnormal temperature failure, abnormal flow failure, abnormal protocol failure, etc. The risk level may include various types of risk levels, as well as the comprehensive probability of network failure, etc. The higher the risk level, the higher the probability or the greater the severity of the corresponding network failure.

[0049] During the model training process, the evaluation result data can be used to verify the accuracy of the network fault prediction output by the model, and the parameters therein can be iteratively optimized. During model verification, the accuracy of the network fault prediction output by the model can be verified based on the evaluation result data corresponding to the verification set. The evaluation result data corresponding to the second input information forms a network fault evaluation result set.

[0050] Specifically, the regression function of the fault prediction model is expressed as:

[0051] ,0≤ α i ,α i * ≤C formula (1)

[0052] In the formula, α i and α i * are Lagrange multipliers, which are the parameters that need to be solved when the original problem is transformed into the Lagrange dual function problem, and solving this parameter requires determining the slack variable; C is the penalty factor, and its parameter value needs to be customized. The purpose is to balance the maximization of the interval and the minimization of the slack variable. Its value range can be [0.1, 100]; K(x i ,x) is the kernel function, which can be used to map the nonlinear regression data into the linear regression space to realize the linear regression representation of the data; in addition, the kernel function also contains kernel parameters, which are also parameters that need to be defined manually. a is a constant, which can be a weight vector, corresponding to the second input information described below, or any other suitable value. m represents the sample size under each factor.

[0053] Optionally, the kernel function may be a combination of one or more of a linear kernel function, a radial basis function, a polynomial kernel function, etc. Different kernel functions contain corresponding different parameters, and the parameter may be one of the above initial parameters. In addition, the initial parameters may also include one or more of a penalty factor, a slack variable, etc.

[0054] Among the various parameters contained in the model, the defined parameters or variables need to be considered as initial parameters, and the values ​​of the defined parameters directly affect the quality of the model. Therefore, in order to determine the optimal initial parameters, the corresponding model can be used to train and optimize them. Before or during training, the initial parameters to be optimized can be set with corresponding initial values, and they can be continuously adjusted and optimized during the training process to obtain the optimized initial parameters, so that the prediction model can be trained according to the initial parameters, and finally a trained prediction model is obtained, so that it can accurately obtain the prediction results of network failures.

[0055] Through the above steps, a set of key factors suitable for network fault prediction is extracted from the log information and used as the first input information of the model to provide strong support for subsequent fault prediction.

[0056] Step 106: Acquire a first weight set corresponding to the first factor set as third input information of the network fault prediction model.

[0057] In this embodiment, the contribution of each factor to the impact of network failure is different. Some factors may have an absolute impact on the network failure, while the impact of some factors is relatively small. Therefore, the present application further sets a corresponding weight for each factor. Among them, the first weight set contains the weights corresponding to each factor, and the weight values ​​of different factors are not necessarily the same. The value of the weight is positively correlated with the contribution of the corresponding factor to the impact of the network failure. The greater the contribution, the greater the corresponding weight value.

[0058] Optionally, the weights can be pre-set based on expert experience, or can be optimized based on the pre-set initial weight values ​​using relevant machine learning algorithms, and the optimized values ​​are used as the final weight values ​​to form a first weight set. The first weight set obtained can be used as the second input information of the prediction model.

[0059] The first input information is the sample set U={u1,u2,u3……u n},u i represents the input data corresponding to one of the factors. The third input information is the weight set A={a1,a2,a3……a n}, where a i Indicates that for u i The sum of the weight values ​​set is 1.

[0060] Step 108, calling the particle swarm algorithm to optimize the initial parameters in combination with the first input information, and outputting the optimized parameters.

[0061] In this embodiment, the setting of the initial parameters in the prediction model has a great influence on the training effect of the model. In order to obtain appropriate initial parameters, the initial parameters can be optimized by using a particle swarm algorithm.

[0062] For the particle swarm algorithm, a first number of particles can be randomly generated according to the first input information to form a particle swarm, each particle swarm contains a selection scheme of the parameters to be optimized corresponding to the initial parameters, and the parameters to be optimized include one or more of the above-mentioned initial parameters. By optimizing the moving speed and moving position of each particle in the particle swarm, the position of the particle is optimized, and based on the optimized particles, the corresponding optimized initial parameters can be decoded.

[0063] The moving position may include the individual position of the particle and the global position of the particle. There is a mapping relationship between the parameter to be optimized and the initial parameter. After the iterative training of the particle swarm algorithm is completed to obtain the optimized value of the parameter to be optimized, the parameter after the initial parameter is optimized can be determined based on the mapping relationship. For example, the optimized value can be directly used as the parameter after the initial parameter is optimized.

[0064] The specific optimization process is as follows: each time the position of a particle changes, the fitness value corresponding to each particle is calculated, the position of the particle is updated based on the fitness value, and the position with a larger fitness value in this iteration and the previous iteration is selected as the new position of the particle. When the number of iterations reaches the set maximum number of iterations and / or other stop conditions (such as fitness value convergence) are met, the iteration is terminated and the optimized parameters are output. The final output parameters include the optimal position, and the optimized parameters for the initial parameters in the prediction model are determined according to the optimal position.

[0065] Among them, the position and velocity of each particle can be iterated according to the following formula:

[0066] Formula (2)

[0067] Formula (3)

[0068] Where t represents the tth iteration, t+1 represents the t+1th iteration; t=1,2…T, T represents the maximum number of iterations; i=1,2,…n; j=1,2…D; n represents the number of particles; D represents the dimension of the search space; v ij represents the velocity of particle i in the jth dimension; x ij represents the position of particle i in the jth dimension; ω represents the inertia weight, which can be set to a suitable value as needed; c1 and c2 represent learning factors, which can be set to suitable values ​​as needed, such as c1=1.5 and c2=1.8; R1 and R2 are random numbers, such as suitable values ​​within [0,1]; p ij (t) represents the optimal individual position of particle i in the jth dimension at the tth iteration; p gj (t) represents the optimal global position of the particle group in the entire j-th dimension. The values ​​of the inertia weight ω at different iteration numbers can be the same or different. For example, ω can be fixed to 0.7, or the value of the inertia weight can be set according to the number of iterations, so that the size of the inertia weight decays with the number of iterations.

[0069] Every time the position of a particle changes, the corresponding fitness needs to be calculated and the calculated new particle is compared with p ij 、p gjThese three fitness values ​​are compared and the position is updated. Specifically, when the fitness of particle i at the current position is better than its optimal individual position fitness, the optimal individual position of the particle is updated to the current position of particle i; when the fitness of particle i at the current position is better than the optimal global position fitness, the optimal global position is updated to the current position of particle i, and the particle speed corresponding to the optimal global position is updated to the current speed of particle i.

[0070] After the iteration is completed, the optimal position information of the particle is output, and based on the position information, the output parameters in the prediction function can be determined.

[0071] Among them, decoding is performed for each particle to obtain optimized parameters for the initial parameters, which will be applied to the prediction model and the model will be trained. Based on the trained prediction model, the fitness of each particle is calculated. The fitness is linearly related to the inverse of the sum of square errors of all sample sizes. Specifically, the fitness is characterized by:

[0072] Formula (4)

[0073] Among them, k and d are constants; H is the number of samples; y i It represents the corresponding risk prediction value of the i-th fault prediction result set output by the prediction model; t i It is represented as the actual risk evaluation value (evaluation result data) corresponding to the ith risk prediction value. It can be understood that the smaller the error, the larger the corresponding fitness value, that is, the higher the adaptability, and the higher the accuracy of the model prediction.

[0074] In one embodiment, the initial parameters include slack variables, kernel parameters and penalty factors. Step 108 includes: setting an initial position and initial velocity for each particle in the particle swarm algorithm according to the first input information, wherein each particle includes slack variables, kernel parameters and penalty factors; calculating the fitness of each particle in each iteration, iteratively updating the position and velocity of each particle based on the fitness until the update stop condition is reached, and outputting the final position of each particle after the update is stopped, and outputting the optimized slack variables, kernel parameters and penalty factors according to the final position of each particle.

[0075] Optionally, the kernel function mentioned above may be a radial basis function, and the kernel parameters are parameters in the radial basis function. Kernel parameters and penalty factors have a significant impact on the performance of the prediction model. Each particle represents a set of possible parameter values ​​(kernel parameters, penalty factors, slack variables). The position of the particle can be encoded into a vector of the corresponding number of dimensions according to the number of initial parameters that need to be optimized, and each dimension maps one of the initial parameters. For example, the individual position is mapped to the kernel parameter, and the global position is mapped to the penalty factor. When the optimal position of the particle is determined, the kernel parameters and penalty factors can be correspondingly determined based on the two dimensions. The optimal position includes the optimal individual position p i and the optimal global position p g .

[0076] In one embodiment, the updating method of the position and speed of each particle is determined according to the fitness value of each particle.

[0077] When the fitness of particle i at the current position is better than its optimal individual position fitness, the optimal individual position of the particle is updated to the current position of particle i; when the fitness of particle i at the current position is better than the optimal global position fitness, the optimal global position is updated to the current position of particle i, and the particle speed corresponding to the optimal global position is updated to the current speed of particle i. The fitness can be calculated according to the above formula (4), and for particles corresponding to better fitness, their positions and speeds can be updated according to the above formulas (2) and (3).

[0078] Optionally, the position and velocity of the particle may also be updated in a manner determined according to the relationship between the fitness value of the particle and the fitness threshold.

[0079] The fitness threshold is used to determine the critical value of the update method of the position and speed of the corresponding particle, and can be dynamically determined according to the fitness of the particle calculated in each iteration. The fitness threshold may include one or more. When the fitness threshold is one, the particles exceeding the fitness threshold use the first update method to update their position and speed, and the particles below the fitness threshold use the second update method to update their position and speed.

[0080] When there are multiple fitness thresholds, different updating methods are adopted for those in different fitness threshold ranges. The fitness threshold includes the first fitness threshold F b and a second fitness threshold F lower than the first fitness threshold c Take the example to illustrate that for the fitness F≥F b The particle set U1 uses the first updating method to update its position and velocity; for F c ≤F <F b The particle set U2 uses the third updating method to update the position and velocity; for F <Fc The particle set U3 adopts the fourth updating method to update the position and speed.

[0081] Among them, the first updating method can be the replacement operation of the position and speed of the above formula (2) and formula (3), the second updating method can be one or a combination of several methods such as the cross and / or variation operation on the position and / or speed of the particle; the third updating method can be the cross operation on the position and / or speed of the particle; the fourth updating method can be the variation operation on the position and / or speed of the particle.

[0082] Specifically, the formula for performing crossover operation on the positions of particles i and j in the particle swarm is as follows:

[0083] Formula (5)

[0084] The formula for crossover operation on the speed of particles i and j in the particle swarm is as follows:

[0085] Formula (6)

[0086] Among them, θ1 and θ2 are random values ​​between [0,1]. After the crossover operation, the fitness of the particles of the offspring and the parent are compared, and the particles with higher fitness are selected for subsequent iterations.

[0087] For the mutation operation of particles in the particle swarm, the mutation probability p can be set m , a corresponding random number is generated for each particle in each particle group. If the random number is less than the set mutation probability, the particle is mutated. After the mutation operation, the fitness of the offspring and parent particles is also compared, and the particles with higher fitness are selected for subsequent iterations.

[0088] For particles that use mutation, mutation can be performed according to a combination of one or more mutation modes such as random mutation, Gaussian mutation, or neighborhood-based mutation.

[0089] Random mutation means randomly adjusting the position and / or velocity components of a particle to update the position and / or velocity of the particle; Gaussian mutation means performing Gaussian perturbations on the position and / or velocity of a particle to update the position and / or velocity of the particle; neighborhood-based mutation means adjusting the position of a particle to be close to the position of a particle in its neighborhood.

[0090] Furthermore, the mutation can also be performed on the speed of particles in the particle group, so that the speed direction of the mutated particles is opposite to the direction before the mutation. For example, the mutation formula of the speed of particle j is as follows:

[0091] Formula (7)

[0092] where γ j Represents the mutation weight for particle j, which can be any suitable value randomly generated in [0,1]. The weights corresponding to different particles can be the same or different, for example, they can be uniformly set to 1, or set according to the size of their fitness. The smaller the fitness of the particle, the larger its mutation weight.

[0093] Optionally, for each iteration, when the fitness threshold is one, the mean fitness value F of the entire particle swarm can be a As the fitness threshold, or select the fitness value of a certain percentage of the reciprocal as the fitness threshold, such as selecting the fitness value of the reciprocal g1% as the fitness threshold. Similarly, when there are two, the fitness value of the reciprocal g2% can also be selected as the second fitness threshold; the fitness value of the top g3% can be selected as the first fitness threshold. Among them, g1, g2, and g3 can be the same or different values, such as g1, g2, and g3 are any suitable values ​​such as 20, 25, 30, etc.

[0094] In one embodiment, after each update, the average fitness value F of the particle swarm is calculated. a , the fitness value is greater than or equal to F a The fitness value F is the average value of b As the first fitness threshold mentioned above. Set the fitness value less than F a The fitness value F is the average value of c As the second fitness threshold mentioned above.

[0095] In one embodiment, the updating method of the particle position and velocity is determined according to the current iteration number and the fitness value of each particle.

[0096] Optionally, in addition to determining the update method according to the fitness value, the current iteration number of the particle swarm algorithm is further considered. Optionally, when the current iteration exceeds the iteration number threshold, the update method of the particle position and speed is determined according to the relationship between the above-mentioned particle fitness value and the fitness threshold.

[0097] For example, when the current number of iterations is less than the iteration number threshold, the fitness threshold is not considered, and the update is uniformly performed according to the first update method to make it converge quickly; when the number of iterations reaches the iteration number threshold, in order to avoid the particles falling into the local optimal solution, the particle group U is updated according to the above F b and F cIt is divided into three sub-particle groups U1, U2, and U3, and the first updating method is used to update the position and velocity of particle group U1; the third updating method is used to update the position and velocity of U2; and the fourth updating method is used to update the position and velocity of U3, so that the particles can escape from the local optimal solution, thereby finally obtaining the optimized initial parameters.

[0098] The iteration number threshold may be set to a suitable value according to actual needs, and may be set according to the maximum iteration number T, such as 0.6T or 0.7T. When the iteration number reaches the preset maximum iteration number, it is determined that the update stop condition is met.

[0099] When the particle swarm algorithm completes the iteration and outputs the optimized parameters, the training of the prediction model can be completed based on the optimized parameters.

[0100] Step 110, updating the initial parameters according to the optimized parameters, inputting the second input information and the third input information into the network fault prediction model after the initial parameters are updated, and outputting a fault prediction result set corresponding to the second input information.

[0101] In this embodiment, for the prediction model that has completed training, the accuracy of its prediction can be verified based on the second input information and the third input information. The second input information and the third input information are input into the prediction model that has completed training to run the operation, so that the prediction model outputs a set of fault prediction results corresponding to the second input information.

[0102] The fault prediction results in the fault prediction result set are used to represent the fault prediction result data corresponding to each verification data in the second input information. The fault prediction result data can reflect whether the network represented by the corresponding verification data has a fault, and / or the probability of a fault, and / or the type of fault that exists.

[0103] Optionally, the second input information and the third input information may be multiplied, and the product data may be input into the prediction model for operation, and the corresponding fault prediction result set may be output. Alternatively, the two types of information may be independently input into the prediction model, and the prediction model may perform corresponding processing and output the corresponding fault prediction result set.

[0104] In one embodiment, the fault prediction result set includes a comprehensive probability value of network faults and probability values ​​of at least two fault types.

[0105] The comprehensive probability value of network failure indicates the probability of failure of the entire network system. For example, the output failure types may include port failure, router failure, memory failure, etc. For the second input information corresponding to one of the verification data, the corresponding output failure prediction result can be expressed as its comprehensive failure probability is 0.2, and the failure probability of port failure is 25%; the probability of router failure is 10%, and the probability of memory failure is 43%.

[0106] Step 112, determining whether the fault prediction result set meets the consistency requirement of the fault evaluation result set corresponding to the verification set. When the consistency requirement is met, the training of the network fault prediction model is terminated, and the trained network fault prediction model is output.

[0107] In this embodiment, the electronic device can verify the fault prediction result set with the corresponding fault evaluation result set, compare the consistency of the two, and determine whether to terminate the training of the prediction model based on the comparison result. When the consistency meets the requirements, it is determined that the prediction accuracy of the prediction model can meet the prediction requirements, the model training can be terminated, and network fault prediction can be performed based on the prediction model in the future.

[0108] In one embodiment, determining whether the fault prediction result set meets the consistency requirement of the fault evaluation result set corresponding to the verification set includes: comparing whether the proportion of data consistency between the fault prediction result set and the fault evaluation result set exceeds a first preset proportion; if so, determining that the consistency requirement is met.

[0109] Optionally, the relative error between the prediction result and the evaluation result corresponding to each verification data can be compared. When the relative error is less than a preset error threshold, it means that the corresponding verification data meets the data consistency. Statistics are conducted to see whether the proportion of consistency in the verification set exceeds a first preset proportion. If so, it is determined that the consistency requirement is met. Otherwise, it is determined that the consistency requirement is not met.

[0110] The error threshold and the first preset ratio can be set to any appropriate values. The closer the prediction result and the evaluation result are, the smaller the relative error is. Optionally, the relative error of the i-th verification data can be expressed as .

[0111] When the consistency does not meet the requirement, the process returns to step 108 to step 110 to continue optimizing the prediction model using the particle swarm algorithm.

[0112] Optionally, when reusing the particle swarm algorithm to optimize the prediction model, one or more parameter values ​​in the particle swarm can be adjusted, the initial parameters can be re-optimized according to the adjusted parameter values, and the initial parameters in the prediction model can be re-updated according to the parameters obtained after the re-optimization, the prediction model can be obtained again, and the consistency check can be performed again. If it still fails, it returns to steps 108 and 110 again until the consistency check position is completed.

[0113] Among them, the parameters in the particle swarm that can be adjusted include any one or more of the above-mentioned inertia weight ω, learning factors c1, c2, random numbers R1, R2, etc.

[0114] The network fault prediction model generation method in the present application optimizes the initial parameters in the network fault prediction model based on support vector regression by using a particle swarm, thereby obtaining better parameters, and then obtaining a network fault prediction model based on support vector regression based on the better parameters, thereby achieving accurate prediction of network faults.

[0115] In one embodiment, in combination Figure 2 As shown, the fitness of each particle in each iteration is calculated, and the position and velocity of each particle are iteratively updated based on the fitness until the update stop condition is reached, including the following steps:

[0116] Step 202 , enter the current t+1 iteration. If the current iteration number reaches the preset maximum iteration number, the iteration is terminated. Otherwise, step 204 is executed.

[0117] Step 204, calculating the fitness of each particle at the position at the t+1th iteration.

[0118] Specifically, according to the parameter values ​​in the prediction model obtained in the t+1 iteration, the prediction model is trained to output the risk prediction value corresponding to the first input information, and then according to the risk evaluation value corresponding to the first input information, the above formula (4) is called to calculate to obtain the fitness of the position of each particle in the t+1 iteration.

[0119] Step 206 , compare whether the current number of iterations reaches a preset iteration number threshold, if not, execute step 208 , if so, execute step 210 .

[0120] In this embodiment, the iteration number threshold may be set according to the maximum iteration number T, for example, it may be set to 0.6T, or 0.7T, etc.

[0121] Step 208 , selecting a position with a larger fitness value in the current iteration and the previous iteration to update the position of the particle.

[0122] Specifically, if its current fitness is better than the fitness corresponding to its optimal individual position, then its current position is used to update the optimal individual position p of the particle. i ; If the current fitness of a particle is better than the fitness corresponding to the optimal global position, the position of this particle is used to update the optimal global position p of the particle g .

[0123] The position and velocity of the particle can be updated according to the above formula (2) and formula (3). After the update is completed, the process proceeds to step 214, where t=t+1, and the process returns to step 202 for the next iteration.

[0124] Step 210, determining the corresponding first fitness threshold and second fitness threshold according to the fitness of each particle at the current iteration number, and dividing the particle group according to the first fitness threshold and the second fitness threshold to form multiple sub-particle groups.

[0125] Optionally, the corresponding mean fitness F is calculated based on the fitness of each particle at the current iteration number a , for particles in the swarm greater than or equal to F a The particles are averaged for their fitness and the calculated mean F b As the first fitness threshold; for particles in the swarm with a fitness value less than F a The particles are averaged for their fitness and the calculated mean F c As the second fitness threshold.

[0126] The fitness of the particles in the particle group U in the current iteration is greater than or equal to F b The particles with a fitness less than F in the current generation are used as the first sub-particle group U1; c The particles are taken as the third sub-particle group U3; the remaining particles are taken as the second sub-particle group U2.

[0127] Step 212: For each particle sub-group, different updating methods are used to update the position and speed of the particles, and the updated particle sub-groups are merged to restore the particle group.

[0128] Optionally, for particles in the first particle sub-group U1, the position and velocity of the particles are updated according to the above formulas (2) and (3). For particles in the second particle sub-group U2, the above formulas (5) and (6) are used for cross-update. For particles in the third particle sub-group U3, the velocity is updated by mutation using formula (7), and / or the position is updated by neighborhood-based mutation.

[0129] After the update of particles in each sub-particle group is completed, each sub-particle group is merged to restore the particle group.

[0130] By updating particles in different sub-particle groups in different ways, the situation where particles fall into local optimal solutions can be reduced, so that the parameters finally optimized can accurately predict network failures.

[0131] Step 214, after completing the update, set t=t+1 and return to step 202.

[0132] In one embodiment, in combination Figure 3 As shown, a network fault prediction method is provided, the method comprising:

[0133] Step 302: Acquire second log information, perform second preprocessing on the second log information, and generate a second set of factors affecting the network failure as fourth input information of the network failure prediction model.

[0134] Step 304: Acquire a second weight set corresponding to the second factor set as fifth input information of the network fault prediction model.

[0135] Step 306: Run the network fault prediction model based on the fourth input information and the fifth input information, and output a network fault prediction result.

[0136] In this embodiment, the network fault prediction model is the network fault prediction model based on support vector regression in the above network fault prediction model generation method. After the training of the prediction model is completed, it is possible to predict whether a network fault exists based on the collected second log information.

[0137] The second log information may be log information within a second time period, and the second time period may be real-time log information within the last month, week, or 24 hours. The length of the second time period may be determined according to the frequency of the required prediction. For example, when the prediction is set to be performed once a day, the log information of the previous day may be used as the second log information.

[0138] The second preprocessing process for the second log information is the same as the first preprocessing process for the first log information, and may include one or more processing processes such as data cleaning, data standardization, and feature extraction.

[0139] Each weight value in the second weight set corresponds to the contribution of each dimension of the factor in the fourth input information to the impact of the network failure. Optionally, the second weight set is the same as the first weight set. By assigning different weights to different factors, it can be ensured that the prediction model is more consistent with the actual network operation status, thereby improving the practicality of the prediction results.

[0140] After the fourth input information and the fifth input information are obtained, they can be used as inputs of the trained prediction model, and the prediction model is run to output a network fault prediction result.

[0141] Optionally, the network fault prediction result includes a comprehensive network fault probability value and probability values ​​of at least two fault types, so that relevant personnel can understand the actual risk situation of the current network and the magnitude of various types of risks, and then take corresponding preventive measures based on the prediction result.

[0142] The network failure comprehensive probability value reflects the probability of failure of the entire network in the current or future period of time. The larger the value, the higher the probability of failure. For example, the network failure comprehensive probability value can be a value between [0,1].

[0143] In addition to the comprehensive probability value of network failures, the model also outputs probability values ​​for at least two types of failures. These types of failures may include hardware failures, software failures, temperature abnormality failures, protocol abnormality failures, etc. The probability value of each type of failure reflects the probability of that type of failure occurring in the current or future period of time. In this way, relevant personnel can not only understand the overall failure risk, but also formulate more specific preventive measures for different types of failures.

[0144] Furthermore, in order to facilitate relevant personnel to understand and use these fault probability values, the electronic device can also visualize the predicted fault probability values. For example, different types of fault probability values ​​and their proportion in the overall risk can be displayed using bar charts, pie charts, or heat maps. In addition, a threshold or warning mechanism can be set to automatically issue a warning when the probability value of a certain type of fault exceeds the preset threshold, and notify the corresponding management personnel.

[0145] By using the above prediction model, this application can support real-time monitoring and prediction of network failures, so that relevant staff can timely discover and solve network problems and ensure stable network operation. And through accurate network failure prediction, relevant staff can understand potential problems and risks in advance, so as to formulate corresponding prevention and response measures, which will help reduce the probability and scope of network failures, improve the efficiency and effectiveness of network management, and reduce the impact on the company's steel production.

[0146] In one embodiment, a computer-readable storage medium is provided, on which executable instructions are stored, and when the instructions are executed by a processor, the processor executes the steps in the above-mentioned method embodiments. Among them, the above-mentioned methods can be a network fault prediction model generation method or a network fault prediction method.

[0147] In one embodiment, an electronic device is also provided, comprising one or more processors; a memory, wherein one or more programs are stored in the memory, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the steps in the above-mentioned method embodiments. The above-mentioned methods may be a network fault prediction model generation method or a network fault prediction method.

[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0149] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, in the above claims, any one of the claimed embodiments may be used in any combination. The information disclosed in this background technology section is intended only to deepen the understanding of the overall background technology of the present application and should not be regarded as an admission or in any form of implication that the information constitutes prior art known to those skilled in the art.

Claims

1. A method for generating a network fault prediction model, characterized in that: The method comprises: Acquire first log information, perform first preprocessing on the first log information, and generate a first factor set that affects the network failure; Based on the first factor set, forming first input information of a training set and second input information of a validation set as a network fault prediction model based on support vector regression, wherein the network fault prediction model includes at least one initial parameter; Acquire a first weight set corresponding to the first factor set as third input information of the network fault prediction model; Invoke a particle swarm algorithm to optimize the initial parameters in combination with the first input information, and output optimized parameters, wherein the initial parameters include slack variables, kernel parameters, and penalty factors; Update the initial parameters according to the optimized parameters, input the second input information and the third input information into the network fault prediction model after the initial parameters are updated, and output a fault prediction result set corresponding to the second input information; Determining whether the fault prediction result set meets the consistency requirement of the fault evaluation result set corresponding to the verification set, and when the consistency requirement is met, terminating the training of the network fault prediction model, and outputting the trained network fault prediction model; The calling of the particle swarm algorithm optimizes the initial parameters in combination with the first input information and outputs the optimized parameters, including: setting an initial position and an initial velocity for each particle in the particle swarm algorithm according to the first input information, each particle contains the slack variables, kernel parameters and penalty factors, calculating the fitness of each particle in each iteration, iteratively updating the position and velocity of each particle based on the fitness until an update stop condition is reached, and outputting the final position of each particle after stopping the update, and outputting the optimized slack variables, kernel parameters and penalty factors according to the final position of each particle.

2. A network fault prediction model generation method according to claim 1, characterized in that: The iterative updating of the position and velocity of each particle based on the fitness comprises: The update method of the particle position and speed is determined according to the fitness value of each particle.

3. A network fault prediction model generation method according to claim 2, characterized in that: When the number of iterations reaches the preset number of iterations, it is determined that the update stop condition is met.

4. A network fault prediction model generation method according to claim 1, characterized in that: The determining whether the fault prediction result set meets the consistency requirement of the fault evaluation result set corresponding to the verification set includes: Compare whether the proportion of data consistency between the fault prediction result set and the fault evaluation result set exceeds a first preset proportion, and if so, determine that the consistency requirement is met.

5. A network fault prediction model generation method according to claim 1, characterized in that: The fault prediction result set includes a comprehensive probability value of network faults and probability values ​​of at least two fault types.

6. A network fault prediction method, characterized in that: The method comprises: Acquire second log information, perform second preprocessing on the second log information, and generate a second set of factors affecting the network failure as fourth input information of a network failure prediction model generated by the network failure prediction model generation method according to any one of claims 1 to 5; Acquire a second weight set corresponding to the second factor set as fifth input information of the network fault prediction model; The network fault prediction model is run based on the fourth input information and the fifth input information, and a network fault prediction result is output.

7. A network fault prediction method according to claim 6, characterized in that: The network fault prediction result includes a comprehensive network fault probability value and probability values ​​of at least two fault types.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores executable instructions, and when the executable instructions are executed by the processor, the processor executes a network fault prediction model generation method as described in any one of claims 1 to 5, or a network fault prediction method as described in any one of claims 6 to 7.

9. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to execute a network fault prediction model generation method as described in any one of claims 1 to 5, or a network fault prediction method as described in any one of claims 6 to 7.

Citation Information

Patent Citations

  • Network fault prediction method and system based on pigeon swarm algorithm optimization support vector machine

    CN109391515A

  • Electronic equipment fault prediction method based on improved SVR algorithm

    CN113887571A

  • Early monitoring method for nonlinear transformer area power failure based on Internet of Things table

    CN116467648A