Railway transportation scheduling risk level identification method and system based on GA-LSSVM
Through a GA-LSSVM-based method, combined with a condition-generating adversarial network and an autoencoder to process risk factors in railway transportation scheduling, a risk level identification model is built and parameter tuning is performed, which solves the problem that traditional methods are difficult to meet the real-time and accuracy requirements in complex railway systems, and achieves efficient risk identification and classification.
Patent Information
- Application Number
- CN202411875222.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-25
AI Technical Summary
The traditional railway transportation scheduling risk identification method relies on expert experience and historical accident analysis, which is difficult to meet the comprehensive assessment needs of multiple risk factors in complex railway systems, and the calculation complexity is high and the training speed is slow, making it difficult to meet the real-time needs.
The railway transportation scheduling risk level identification method based on GA-LSSVM is adopted to process risk factor samples through conditional generation adversarial networks and autoencoders, build a risk level identification model, and use genetic algorithms to tune the model parameters to form a GA-LSSVM model.
It improves the accuracy and efficiency of risk identification, can quickly identify potential risks in scheduling, and improves the response speed and risk level classification accuracy of the railway transportation scheduling system.
Smart Images

Figure CN119886808A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of railway transportation dispatching safety technology, and in particular to a railway transportation dispatching risk level identification method and system based on GA-LSSVM. Background Art
[0002] In the modern railway transportation system, railway transportation scheduling is a complex process involving the coordinated action of multiple factors, including personnel operation, equipment status, environmental conditions, etc. The safety and efficiency of the scheduling process are crucial. Mistakes or failures in any link may lead to serious consequences, such as train delays, traffic accidents and even personal injury.
[0003] Traditional risk identification methods mainly rely on expert experience and historical accident analysis. With the development of technology and the increase in data volume, relying solely on experience and historical accident data can no longer meet the risk identification needs of the current complex railway system. Therefore, considering multiple risk factors and using advanced data analysis and modeling techniques, potential risks can be more accurately identified and their severity assessed.
[0004] With the development of artificial intelligence, data-driven intelligent risk identification methods have gradually become a hot research topic. Support vector machines, as a classic machine learning algorithm, are widely used in risk identification and classification problems. However, when faced with large-scale data and complex scheduling environments, traditional support vector machine algorithms have high computational complexity and slow training speed, making it difficult to meet real-time requirements. Therefore, it is of great significance to propose a more efficient risk identification method in combination with machine learning algorithms for more accurate risk identification in modern railway transportation systems. Summary of the invention
[0005] In order to solve the problems existing in the above-mentioned background technology, the present invention proposes a railway transportation scheduling risk level identification method and system based on GA-LSSVM. Based on various risk factors in transportation scheduling, the feature data is processed by conditional generative adversarial network and autoencoder, and then a risk level identification model is constructed based on the LSSVM algorithm. The GA algorithm is used to complete parameter tuning of the model, and finally the classification of various risk factors of railway transportation scheduling is completed, thereby improving the accuracy of risk identification.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0007] The technical solution of the first aspect disclosed in the present invention is: a method for identifying railway transportation scheduling risk level based on GA-LSSVM, comprising the following steps:
[0008] S1: Obtain multi-source risk data from historical accidents in railway transportation scheduling;
[0009] S2: Extract the features to be identified from the multi-source risk data, construct a risk factor sample set, obtain the risk level of each risk factor sample according to the scoring results, use the conditional generative adversarial network to deal with the imbalance problem of risk factor samples, and then use the autoencoder to perform data dimensionality reduction on the risk factor sample set;
[0010] S3: construct a risk level identification model based on the LSSVM algorithm, use the GA algorithm to tune the parameters in the risk level identification model to obtain a GA-LSSVM model, input the processed risk factor sample set into the GA-LSSVM model for training and testing, and obtain an optimized GA-LSSVM model;
[0011] S4: Input data into the optimized GA-LSSVM model for prediction to obtain the corresponding risk level.
[0012] A further preferred solution is: in step S2, data preprocessing is performed on the constructed risk factor sample set. In order to improve the accuracy of risk identification, the data is represented in the form of interval data, that is, in, represents the assessment data of the j-th risk in the i-th risk factor in the k-th risk event, and and are the minimum and maximum values of the evaluation data respectively. The steps of data preprocessing are as follows:
[0013] S21: In interval data, the decision maker penalty factor ε is introduced to accurately quantify the uncertainty of risk. The processing method is as follows:
[0014]
[0015] S22: The data processed in step S21 is normalized using the maximum and minimum value method, and the expression is as follows:
[0016]
[0017] Where: x ijk is the data after interval data processing, Represents the corresponding original data, is the minimum data value after interval data processing, is the maximum data value after interval data processing, is the normalized data, ε is the decision maker penalty factor;
[0018] S23: The initial risk matrix is obtained after normalization;
[0019]
[0020] Where: R i represents the risk matrix corresponding to the i-th risk factor, and M represents the number of risk characteristics of the i-th risk factor, that is, the number of risk events.
[0021] A further preferred solution is: in step S2, the risk level of each risk factor sample is obtained according to the expert's scoring result, and then the conditional generative adversarial network is used to deal with the imbalance problem of risk factor samples; the conditional generative adversarial network uses adversarial training between a generator and a discriminator to generate realistic data samples, the generator accepts random noise as input, generates fake samples similar to the real data distribution, and the discriminator accepts real data and fake samples generated by the generator as input, and outputs a probability value, indicating the probability that the input data is real data. The steps are:
[0022] (1) Score each risk factor and calculate the risk factor v according to the score of each risk factor. k Get the corresponding risk level s k ,s k The range is {1,2,3,4,5}, and the scoring range is set to 0-100 points. The higher the score, the greater the risk level. 0-20 points are level 1 risk, 21-40 points are level 2 risk, 41-60 points are level 3 risk, 61-80 points are level 4 risk, and 81-100 points are level 5 risk.
[0023] (2) The objective function of the conditional generative adversarial network is constructed based on the risk level, and its expression is as follows:
[0024]
[0025] In the formula: G, D represent the generator and discriminator respectively, b represents the noise vector input to the generator, and c is the conditional variable, which represents the risk level s k , min G max D V(D,G) represents the adversarial process between the generator and the discriminator. Representation sample From the real data distribution Randomly selected from Represents the probability distribution The random noise vector b is obtained by sampling. is the prediction result of the discriminator on the real data, is the prediction result of the discriminator on the generated data, G(b,c) and They represent the samples generated by the generator under condition c and the samples judged by the discriminator under given condition c. Whether it is a real sample;
[0026] (3) Determine the loss functions of the discriminator and the generator respectively;
[0027] 1) The loss function of the discriminator is defined as:
[0028]
[0029] Where: Γ D is the loss function of the discriminator, is the real sample sampled from the real data distribution, that is, the normalized data, For real data Distribution of
[0030] 2) The loss function of the generator is defined as:
[0031]
[0032] Where: Γ G is the loss function of the generator, From the noise distribution The noise vector randomly sampled from ;
[0033] (4) By alternately training the generator and the discriminator, realistic sample data is generated, and the number of samples changes from k to k'.
[0034] As a further preferred solution of the above solution: in step S2, the autoencoder first compresses the input risk factor sample set into a low-dimensional space using an encoder, and then reconstructs the original risk factor sample set through a decoder. The specific steps are as follows:
[0035] (1) Using autoencoders to reduce data dimensionality, the number of risk features is reduced from I × M to U;
[0036] (2) After dimensionality reduction, the final risk matrix is obtained:
[0037]
[0038] Where: I represents the number of risk categories, which is 4 in this invention; M represents the number of risk features of the i-th risk category; U represents the number of risk features after data dimensionality reduction; z k'u represents the u-th risk feature data of the k'th risk event after feature processing by the conditional generative adversarial network and the autoencoder method, s k' Indicates the risk level corresponding to k'.
[0039] A further preferred solution is: in step S3, the step of obtaining the GA-LSSVM model includes:
[0040] S31: Based on the LSSVM regression framework, the expression of the risk level identification model is:
[0041]
[0042] The constraints are:
[0043] Where: w is the weight vector, b is the bias term, e k'u is the error variable, γ represents the kernel parameter in the Gaussian radial basis kernel function, φ(z k'u ) is the nonlinear mapping of the input features, s k' ={1,2,3,4,5} represents the output label, i.e., the risk level;
[0044] S32: The risk level identification model is transformed into a dual problem through the Lagrange multiplier method, namely:
[0045]
[0046] Taking partial derivatives of w, b, and e and setting them to 0, we get the linear equation system:
[0047]
[0048] Where: Ω ij represents the similarity matrix between training samples i and j, I represents the identity matrix, α represents the Lagrange multiplier vector, s k' Indicates the risk level.
[0049] S33: The GA algorithm is used to tune the regularization parameter δ and the kernel parameter γ in the Gaussian kernel function to obtain the best parameter combination with the best risk level identification effect.
[0050] A further preferred solution is: in step S33, the steps of tuning the regularization parameter δ and the kernel parameter γ in the Gaussian kernel function are specifically as follows:
[0051] S331: Encode the regularization parameter δ and the kernel parameter γ as the chromosome in the GA algorithm and represent it as a vector (δ,γ);
[0052] S332: Randomly generate a set of parameter combinations in the range (δ,γ) to represent the population, and each chromosome corresponds to a different δ and γ value;
[0053] S333: Use the classification accuracy of 5-fold cross validation as the evaluation criterion of the fitness function to perform selection, crossover and mutation operations on chromosomes;
[0054] S334: When the preset maximum number of iterations T is reached or the optimal fitness value does not increase for five consecutive generations, the iteration is stopped. At this time, the individual with the highest fitness value is selected in the last generation, and its corresponding δ and γ are the optimal regularization parameters and kernel parameters.
[0055] In a second aspect, the present invention further discloses a railway transportation scheduling risk level identification system based on GA-LSSVM, which uses the identification system to perform risk identification on any of the above-mentioned railway transportation scheduling risk level identification methods based on GA-LSSVM, comprising:
[0056] Data collection module, used to obtain multi-source risk data from historical accidents in railway transportation scheduling;
[0057] Data preprocessing module, used to preprocess multi-source risk data;
[0058] The feature extraction module is used to extract the features to be identified in the multi-source risk data, and process the features to be identified respectively through the conditional generative adversarial network and the autoencoder;
[0059] The model building module is used to build a risk level identification model and perform parameter tuning and optimization on it to obtain the optimized GA-LSSVM model;
[0060] The risk identification module uses the optimized GA-LSSVM model to predict the risk of real-time data and identify the potential scheduling risk level;
[0061] The risk warning module provides risk handling suggestions based on the scheduling risk level identification results.
[0062] Based on the above technical solution, further: the model building module includes:
[0063] The basic modeling submodule builds a risk level identification model based on the LSSVM algorithm;
[0064] The model parameter tuning submodule uses the GA algorithm to tune the parameters in the risk level identification model to obtain the GA-LSSVM model;
[0065] Model training submodule, used to train the GA-LSSVM model;
[0066] The model testing submodule is used to test the trained GA-LSSVM model to obtain the optimized GA-LSSVM model.
[0067] In a third aspect, the present invention further discloses an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of a method for identifying risk levels of railway transport scheduling based on GA-LSSVM as described above are implemented.
[0068] In a fourth aspect, the present invention further discloses a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a method for identifying risk levels of railway transportation scheduling based on GA-LSSVM as described in any one of the above items.
[0069] Compared with the prior art, the present invention has the following beneficial effects:
[0070] 1. The risk level identification model constructed based on the LSSVM algorithm in the present invention requires less computational processing and has higher efficiency compared to the traditional SVM algorithm.
[0071] 2. The optimized GA-LSSVM model of the present invention uses a conditional generative adversarial network to deal with the problem of unbalanced sample data, realizes feature fusion through the autoencoder method, reduces redundant information between features, improves the prediction accuracy and generalization ability of the model, and can more quickly identify risks of input real-time data, timely identify and evaluate potential risks in scheduling, thereby improving the response speed of the railway transportation scheduling system and the accuracy of risk level classification.
[0072] 3. The optimized GA-LSSVM model of the present invention can process railway transportation scheduling data of different types and scales, and can effectively process and analyze large-scale data and high-dimensional feature data.
[0073] 4. Based on the risk level identified by the optimized GA-LSSVM model, the system can generate early warning information in real time to help dispatchers take measures early to avoid potential risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the technical solution in this embodiment, the drawings required for describing the technical solution are briefly introduced below.
[0075] Figure 1 It is a flow chart of a railway transportation scheduling risk level identification method based on GA-LSSVM of the present invention;
[0076] Figure 2 A flowchart for implementing the conditional generation adversarial network in the present invention;
[0077] Figure 3This is a flow chart of optimizing the regularization parameter δ and the kernel parameter γ in the Gaussian kernel function using the GA algorithm in the present invention;
[0078] Figure 4 It is a structural framework diagram of the railway transportation scheduling risk level identification system based on GA-LSSVM in the present invention;
[0079] Figure 5 It is a fitness curve diagram based on the least squares support vector machine in the present invention;
[0080] Figure 6 It is a ROC curve diagram based on the least squares support vector machine in the present invention;
[0081] Figure 7 This is a flow chart for implementing the autoencoder method in the present invention. DETAILED DESCRIPTION
[0082] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions 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.
[0083] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application; unless otherwise specified, all technical and scientific terms used herein have the same meanings as commonly understood by ordinary technicians in the technical field to which the present application belongs.
[0084] Embodiment 1:
[0085] Reference Figure 1-7 The present invention provides a railway transportation scheduling risk level identification method based on GA-LSSVM. Based on multi-source risk data in historical accidents of railway transportation scheduling, a conditional generative adversarial network is used to process the problem of sample data imbalance, an autoencoder method is used to reduce the dimension of feature data, a least squares support vector machine (LSSVM) algorithm is used to construct a risk level identification model for railway transportation scheduling, a genetic algorithm (GA) is used to tune the parameters in the risk level identification model to obtain a GA-LSSVM model, and the GA-LSSVM model is trained and iterated multiple times, and then tested and verified to obtain an optimized GA-LSSVM model, and then the optimized GA-LSSVM model is used to test the real-time data of railway transportation scheduling to obtain the risk level of each real-time data, thereby realizing accurate identification of the risk level of railway transportation scheduling.
[0086] Specifically, the present invention first collects historical data related to railway transportation scheduling. The historical data is multi-source risk data. By analyzing a large number of railway transportation scheduling accidents and combining expert opinions, the multi-source risk data is divided into four categories: personnel factors, equipment factors, train factors and natural environment factors. The four categories of multi-source risk data are subdivided into various secondary risk factors. The indicator statistics of each risk factor are shown in Table 1 below.
[0087] Table 1 Statistics of indicators of various risk factors
[0088]
[0089] As one or more implementation methods, by extracting the features to be identified from the multi-source risk data, a risk factor sample set is constructed, and the risk factor sample set is preprocessed by using data cleaning, missing value processing, and normalization methods to remove noise and outliers and eliminate differences between different dimensions; wherein the data cleaning process is:
[0090] 1) Check whether there are duplicate records in the data set and remove duplicate records to ensure that each risk factor sample appears only once to avoid the impact of duplicate data on model training;
[0091] 2) Use statistical methods or visualization tools to identify outliers in the data, and use the mean and standard deviation method to filter out data points that are beyond 3 times the standard deviation of numerical data. For extreme outliers, delete them directly, and for outliers within a reasonable range, replace them with the mean or median of the column.
[0092] The missing value processing process is as follows:
[0093] 1) Detect the missingness of each column in the data set, calculate the missing rate of each column of data, and generate a missing value report;
[0094] 2) Group the data columns according to the missing rate. If the missing rate is less than 20%, the mean filling is given priority. If the missing rate is greater than or equal to 20%, the column is deleted.
[0095] In order to improve the accuracy of risk identification, the present invention represents the data in the form of interval data. in, represents the assessment data of the j-th risk in the i-th risk factor in the k-th risk event, and and are the minimum and maximum values of the evaluation data respectively, and the normalization process is as follows:
[0096] S21: Process the interval data in the following way:
[0097]
[0098] S22: Normalization using the maximum and minimum method:
[0099]
[0100] Where: x ijk is the data after interval data processing, Represents the corresponding original data, is the minimum data value after interval data processing, is the maximum data value after interval data processing, is the normalized data, ε is the decision maker penalty factor;
[0101] In some preferred embodiments, a conditional generative adversarial network is used to process the imbalance problem of risk factor samples. The present invention simulates risk events that may occur in railway transportation scheduling in recent years, selects 1,000 driving scheduling risk events as data samples, wherein there are 240 data samples with a risk level of 1, 400 data samples with a risk level of 2, 250 data samples with a risk level of 3, 80 data samples with a risk level of 4, and 30 data samples with a risk level of 5. A conditional generative adversarial network method (CGANs) is used to generate 150 samples with a risk level of 4 and 200 samples with a risk level of 5. The conditional generative adversarial network (CGAN) is a deep learning model whose main idea comes from game theory and is an extended version of a generative adversarial network (GAN). It guides data generation by introducing additional conditional information and generates realistic data samples by adversarial training between a generator and a discriminator. The generator accepts random noise as input and generates false samples similar to the real data distribution. The discriminator accepts real data and false samples generated by the generator as input and outputs a probability value indicating the probability that the input data is real data. Figure 2 ,The steps of using conditional generative adversarial networks to deal with the imbalance problem of risk factor samples are:
[0102] 1) Construct the objective function of the conditional generative adversarial network and set the condition variable c as the risk level. The risk is divided into five different levels from 1 to 5. The higher the level, the more serious the risk and the more risk control measures need to be taken. The expression of the objective function is as follows:
[0103]
[0104] In the formula: G, D represent the generator and discriminator respectively, b represents the noise vector input to the generator, and c is the conditional variable, which represents the risk level s k , min G max DV(D,G) represents the adversarial process between the generator and the discriminator. The generator generates realistic samples as much as possible, while the discriminator distinguishes between real samples and generated samples as much as possible. Representation sample From the real data distribution Randomly selected from Represents the probability distribution The random noise vector z is obtained by sampling, is the prediction result of the discriminator on the real data, is the prediction result of the discriminator on the generated data, G(b,c) and They represent the samples generated by the generator under condition c and the samples judged by the discriminator under given condition c. Whether it is a real sample;
[0105] 2) Determine the loss functions of the discriminator and the generator respectively;
[0106] (1) The function of the discriminator is to distinguish between real samples and generated samples. The loss function of the discriminator is used to maximize the correct judgment of real samples and minimize the wrong judgment of generated samples. The loss function of the discriminator is defined as:
[0107]
[0108] Where: Γ D is the loss function of the discriminator, is the real sample sampled from the real data distribution, that is, the normalized data, For real data Distribution of
[0109] (2) The function of the generator is to generate realistic sample data, so that the discriminator can think that these samples are real as much as possible. The loss function of the generator is defined as:
[0110]
[0111] Where: Γ G is the loss function of the generator, From the noise distribution The noise vector randomly sampled from ;
[0112] 3) By alternately training the generator and the discriminator, the capabilities of the generator and the discriminator can be improved in constant confrontation, and ultimately realistic sample data can be generated.
[0113] As a preferred embodiment, the present invention uses an autoencoder in a neural network to perform data dimensionality reduction processing on a risk factor sample set to reduce redundant information, thereby realizing coupled risk identification and improving the generalization and prediction capabilities of the model. The autoencoder is mainly used for unsupervised learning tasks and performs well in data dimensionality reduction, feature extraction and denoising. The autoencoder first uses an encoder to compress the input risk factor sample set into a low-dimensional space, and then reconstructs the original data through a decoder. The feature data of these low-dimensional risk factor sample sets are compressed representations of the risk factor sample sets, contain the main information of the original risk factor sample sets, and have a low dimension, so they can be used for various machine learning tasks, such as classification, clustering, visualization, etc., and the reconstructed data obtained by the decoder can be used to evaluate the performance of the autoencoder. The implementation process is as follows: Figure 7 As shown, the LSSVM method is used to judge the effect of feature dimensionality reduction on the feature data after dimensionality reduction. The results are shown in Table 2:
[0114] Table 2 Feature fusion effect
[0115]
[0116] From the feature fusion results in Table 2, it can be found that when the dimension is reduced to 14 features, the evaluation indicators predicted by the LSSVM model are the best. Therefore, the present invention uses the feature data reduced to 14 dimensions as the input data of the subsequent risk level identification model.
[0117] Furthermore, the characteristic data and risk level of the processed risk factor sample set are used as initial parameters to construct a risk matrix, as follows:
[0118] 1) In order to improve the accuracy of risk identification, the present invention expresses data with large uncertainty and volatility in the form of intervals. Among them, x ijk represents the assessment data of the j-th risk in the i-th risk factor in the k-th accident, and
[0119] 2) The actual assessment data for each risk factor is: Among them, ε is the decision maker penalty factor; if the feature data is expressed in digital form, then
[0120] 3) Process the characteristic data of each risk factor to obtain the initial risk matrix:
[0121]
[0122] 4) Then analyze the risk level of each risk event and the expert's advice to make a comprehensive risk score for the risk event and get the risk score v i , the obtained vi According to the risk level classification standard, it is divided into different levels. Let s k ={1,2,3,4,5} represents the risk level of each risk event. k There is an s k Correspondingly, after feature processing by the conditional generative adversarial network and the autoencoder method, the final risk matrix is:
[0123] After feature extraction using the autoencoder method, the final risk matrix is:
[0124]
[0125] Where: I represents the number of risk categories, which is 4 in this invention; M represents the number of risk features of the i-th risk category; U represents the number of risk features after data dimensionality reduction; z k'u represents the u-th risk feature data of the k'th risk event after feature processing by the conditional generative adversarial network and the autoencoder method, s k' Indicates the risk level corresponding to k'.
[0126] As a preferred embodiment, the present invention constructs a risk level identification model based on the regression framework of the least squares support vector machine (LSSVM), and the specific processing process is as follows:
[0127] 1) The risk feature data after data preprocessing, sample data imbalance processing, and feature data dimension reduction are used as the feature value of the model input data. The risk level of each sample is the corresponding label value. The feature value provides the input information for the model to predict, and the label value is the output target of the model. The objective function of the risk level recognition model is constructed, and its expression is:
[0128]
[0129] The constraints of the above objective function are:
[0130]
[0131] Where: w is the weight vector, b is the bias term, e k'u is the error variable, γ represents the kernel parameter in the Gaussian radial basis kernel function, φ(z k'u ) is the nonlinear mapping of the input features, s k' ={1,2,3,4,5} represents the output label, i.e., the risk level;
[0132] 2) Through the Lagrange multiplier method, the above risk level identification model is transformed into a dual problem, namely:
[0133]
[0134] By taking partial derivatives of w, b, e and setting them to 0, we get the linear equation system:
[0135]
[0136] Where: Ω ij represents the similarity matrix between training samples i and j, I represents the identity matrix, α represents the Lagrange multiplier vector, s k' Indicates the risk level.
[0137] 3) The decision hyperplane is determined by maximizing the classification interval of samples of different risk levels, and plays the role of classification boundary. The risk factor sample set can be accurately divided into risk levels 1, 2, 3, 4 and 5 through this hyperplane. When predicting a new sample, its risk level can be determined according to the position of the sample on different sides of the hyperplane. In addition, the position of the decision hyperplane (determined by the weight vector w and the bias term b) can reveal the relative importance of each feature to different risk levels, and assist in identifying the key factors affecting risks from level 1 to level 5. The position of the decision hyperplane can be obtained by solving the above set of equations.
[0138] 4) In order to achieve accurate classification of risk levels, the Gaussian kernel function is used to expand the feature space of the sample, so as to obtain linear separability in high-dimensional space. The Gaussian radial basis kernel function is a commonly used kernel function with smoothness and locality. It converts data into high-dimensional space through nonlinear mapping, so that it can maintain a good distinction effect in complex feature relationships. Its mathematical form is:
[0139]
[0140] Where: z i and z j They represent two different samples respectively, and γ is the kernel parameter, which is used to control the range of the Gaussian kernel.
[0141] 5) In order to improve the classification accuracy of the risk level identification model, the present invention uses a genetic algorithm (GA) to tune the regularization parameters δ and γ in the Gaussian kernel function to find the best parameter combination that can maximize the performance of the risk level identification model. The specific implementation method is as follows: Figure 3 As shown, the implementation steps are as follows:
[0142] 1) Encode the regularization parameter δ and the kernel parameter γ as chromosomes in the genetic algorithm and represent them as a vector (δ,γ);
[0143] 2) Randomly generate a set of parameter combinations in the range (δ, γ) to represent the population, and each individual, i.e., chromosome, corresponds to a different δ and γ value;
[0144] 3) Using the classification accuracy of 5-fold cross validation as the evaluation criterion of the fitness function, the chromosomes are selected, crossed, and mutated;
[0145] 4) When the preset maximum number of iterations T is reached or the optimal fitness value does not improve for 5 consecutive generations, the iteration is stopped. At this time, the individual with the highest fitness value is selected in the last generation, and its corresponding δ and γ are the optimal regularization parameters and kernel parameters.
[0146] Furthermore, the processed risk factor sample set is divided into a training set and a test set according to an 8:2 ratio. The GA-LSSVM model is trained and tested in turn. After verification, the optimized GA-LSSVM model is obtained. The optimized GA-LSSVM model is used to predict the risk level of each risk event and identify the potential scheduling risk level. The basis for the division of scheduling risk levels is based on key scheduling risk quantitative indicators. The risk level is divided by comprehensively analyzing personnel factors, equipment factors, train factors and environmental factors. Then, according to the scheduling risk level identification results, corresponding risk handling suggestions are given. The risk level division standards are shown in Table 3:
[0147] Table 3 Risk level classification standards
[0148]
[0149] In this implementation, the performance of the GA-LSSVM model of the present invention is evaluated and verified to ensure that it has good performance and generalization ability in practical applications. The evaluation indicators include accuracy, precision, recall, F1 score and AUC-ROC curve, where the accuracy, precision, recall and F1 score are calculated using the four indicators TP, TN, FP and FN respectively. In view of the imbalance problem of sample data, the accuracy, precision, recall and F1 score are calculated using the weighted average method, which are expressed as follows:
[0150] Accuracy:
[0151] Accuracy:
[0152] Recall:
[0153] F1 score:
[0154] The calculation result after weighted average is:
[0155] Among them: TN represents the number of correctly identified negative labels, TP represents the number of correctly identified positive labels, FP represents the number of incorrectly identified negative labels, FN represents the number of incorrectly identified positive labels, and Metric ijrepresents the jth evaluation index of the i-th risk (such as Precision, Recall, F1-Score), S i Represents the number of samples of the i-th risk category.
[0156] The optimized GA-LSSVM model is used to predict the risk level of railway transportation scheduling risk events. In order to ensure the stability and generalization ability of the model under different data set divisions, a 5-fold cross validation is used for comprehensive evaluation. The specific implementation steps are as follows:
[0157] 1) The data set consists of multiple risk factor data in the railway transportation system, including characteristic variables such as personnel factors, equipment factors, train factors and environmental factors. By recording risk events, the data set is marked as 1 to 5 according to risk levels for training and evaluating models;
[0158] 2) The data set was divided into 5 subsets to ensure that the number of samples in each subset was equal and the data of each risk level was evenly distributed in the subsets to maintain the representativeness of the data set. In each round of validation, one subset was selected from the 5 subsets as the validation set and the remaining 4 subsets were used as the training set to train and validate the GA-LSSVM model.
[0159] 3) In each round, the data of the four subsets are input into the GA-LSSVM model, where the GA algorithm is used to optimize the regularization parameters of the LSSVM and the kernel parameters of the Gaussian kernel function to obtain the optimal classification hyperplane. The model learns the risk level classification pattern based on the samples of the four training subsets. After the model training is completed, the model is predicted and verified using the validation set of the current round, and the model evaluation indicators (such as accuracy, F1-score, etc.) of the validation round are calculated to measure the implementation effect of the model;
[0160] 4) By repeating 5 rounds of training and validation, we obtain independent evaluation results for each round, including accuracy, F1-score, etc. The final model evaluation index is the average of the 5 validation results. By averaging the evaluation index of the 5-fold cross-validation, we obtain the overall performance of the model under multiple data set divisions, thus more accurately reflecting the stability and generalization ability of the GA-LSSVM model.
[0161] Furthermore, the optimized GA-LSSVM model of the present invention is compared with the support vector machine algorithm (SVM), GA-SVM algorithm, linear LSSVM algorithm, and polynomial LSSVM algorithm, and the evaluation index comparison results are shown in Table 4.
[0162] Table 4 Comparison of prediction results of each algorithm model
[0163]
[0164] The parameters of the optimized GA-LSSVM model of the present invention are set as follows: the population size is 20, the number of iterations is 100, the value range of γ is [0.01, 100], and the value range of δ is [0.001, 10].
[0165] From the comparison results in Table 2, it can be seen that the optimized GA-LSSVM model of the present invention has obvious advantages over the other four algorithms and can accurately predict the risk level of each risk event.
[0166] The fitness curve and ROC curve of the optimized GA-LSSVM model are as follows: Figure 5 , Figure 6 As shown, where:
[0167] Figure 5 The curve graph showing the fitness changing with the number of iterations, from Figure 5 It can be seen that as the number of iterations increases, the model gradually converges and the fitness value gradually stabilizes, indicating that the model gradually finds a better solution;
[0168] Figure 6 The performance of five different types of classifiers in distinguishing different categories is shown. The true positive rate indicates the proportion of positive samples correctly identified by the model to all positive samples, and the false positive rate indicates the proportion of negative samples incorrectly identified as positive samples by the model to all negative samples. Figure 6 The five curves of different colors correspond to the ROC curve of a category respectively. The closer the curve is to the upper left corner, the better the classifier performance is, and the better it can distinguish positive and negative examples. The AUC value is the area under the curve, which is an important indicator to measure the performance of the classifier. The closer the AUC value is to 1, the better the performance of the classifier is. Figure 6 It can be seen that the model has a strong ability to distinguish risk levels 1 and 5, and the AUC value is close to 1.
[0169] from Figure 5-Figure 6 It can be seen that the prediction effect of the LSSVM algorithm is better; the GA-LSSVM model optimized by the present invention can effectively improve the accuracy of classification, provide a systematic and operational solution for various risk management in railway transportation scheduling, and also provide a reference for risk assessment in other fields.
[0170] Embodiment 2:
[0171] The present invention provides a railway transportation scheduling risk level identification system based on GA-LSSVM, which completes the risk level identification of the risk factors in the above identification method through the identification system, and includes:
[0172] Data collection module, used to obtain multi-source risk data from historical accidents in railway transportation scheduling;
[0173] Data preprocessing module, used to preprocess multi-source risk data;
[0174] The feature extraction module is used to extract the features to be identified in the multi-source risk data, and process the features to be identified respectively through the conditional generative adversarial network and the autoencoder;
[0175] A model building module, which includes a basic modeling submodule, a model parameter tuning submodule, a model training submodule, a model testing submodule and a model verification submodule, constructs a risk level identification model through the basic modeling submodule, performs parameter tuning on the risk level identification model through the model parameter tuning submodule to obtain a GA-LSSVM model, and then sequentially trains, tests and verifies the GA-LSSVM model through the model training submodule, the model testing submodule and the model verification submodule to obtain an optimized GA-LSSVM model;
[0176] The risk identification module uses the optimized GA-LSSVM model to predict the risk of real-time data and identify the potential scheduling risk level;
[0177] The risk warning module provides risk handling suggestions based on the scheduling risk level identification results.
[0178] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A railway transportation scheduling risk level identification method based on GA-LSSVM, characterized in that: The following steps are involved: S1: Obtain multi-source risk data from historical accidents in railway transportation scheduling; S2: Extract the features to be identified from the multi-source risk data, construct a risk factor sample set, obtain the risk level of each risk factor sample according to the scoring results, use the conditional generative adversarial network to deal with the imbalance problem of risk factor samples, and then use the autoencoder to perform data dimensionality reduction on the risk factor sample set; S3: Construct a risk level identification model based on the LSSVM algorithm, use the GA algorithm to tune the parameters in the risk level identification model to obtain a GA-LSSVM model, input the risk factor sample set after dimensionality reduction into the GA-LSSVM model for training and testing, and obtain an optimized GA-LSSVM model; S4: Input the real-time data into the optimized GA-LSSVM model for prediction to obtain the risk level of the real-time data.
2. According to claim 1, a railway transportation scheduling risk level identification method based on GA-LSSVM is characterized in that: In step S2, data preprocessing is performed on the constructed risk factor sample set. In order to improve the accuracy of risk identification, the data is represented in the form of interval data, that is, in, represents the assessment data of the j-th risk in the i-th risk factor in the k-th risk event, and and are the minimum and maximum values of the evaluation data respectively. The steps of data preprocessing are as follows: S21: Introduce the decision maker penalty factor ε in the interval data to accurately quantify the uncertainty of risk. The processing method is as follows: S22: The data processed in step S21 is normalized using the maximum and minimum value method, and the expression is as follows: Where: x ijk is the data after interval data processing, Represents the corresponding original data, is the minimum data value after interval data processing, is the maximum data value after interval data processing, is the normalized data, ε is the decision maker penalty factor; S23: The initial risk matrix is obtained after normalization; Where: R i represents the risk matrix corresponding to the i-th risk factor, and M represents the number of risk characteristics of the i-th risk factor, that is, the number of risk events.
3. The railway transportation scheduling risk level identification method based on GA-LSSVM according to claim 2 is characterized in that: In step S2, the steps of processing the imbalance problem of risk factor samples include: (1) Score each risk factor and calculate the risk factor v according to the score of each risk factor. k Get the corresponding risk level s k ; (2) The objective function of the conditional generative adversarial network is constructed based on the risk level, and its expression is as follows: Where: G, D represent the generator and discriminator respectively, b represents the noise vector input to the generator, and c is the conditional variable, which represents the risk level s k , min G max D V(D,G) represents the adversarial process between the generator and the discriminator. Representation sample From the real data distribution Randomly selected from Represents the probability distribution The random noise vector b is obtained by sampling. is the prediction result of the discriminator on the real data, is the prediction result of the discriminator on the generated data, G(b,c) and They represent the samples generated by the generator under condition c and the samples judged by the discriminator under given condition c. Whether it is a real sample; (3) Determine the loss functions of the discriminator and the generator respectively; 1) The loss function of the discriminator is defined as: Where: Γ D is the loss function of the discriminator, is the real sample sampled from the real data distribution, that is, the normalized data, For real data Distribution of 2) The loss function of the generator is defined as: Where: Γ G is the loss function of the generator, From the noise distribution The noise vector randomly sampled from ; (4) By alternately training the generator and the discriminator, realistic sample data is generated, and the number of samples changes from k to k'.
4. The method for identifying railway transportation scheduling risk level based on GA-LSSVM according to claim 3 is characterized in that: In step S2, the autoencoder first compresses the input risk factor sample set into a low-dimensional space using an encoder, and then reconstructs the original risk factor sample set through a decoder. The specific steps are as follows: (1) Using autoencoders to reduce data dimensionality, the number of risk features is reduced from I × M to U; (2) After dimensionality reduction, the final risk matrix is obtained: Where: I represents the number of risk categories, M represents the number of risk characteristics of the i-th risk category, U represents the number of risk characteristics after data dimensionality reduction, and z k'u represents the risk feature data of the uth risk event of the kth risk event after feature processing by the conditional generative adversarial network and the autoencoder method, s k' Indicates the risk level corresponding to k'.
5. The method for identifying railway transportation scheduling risk level based on GA-LSSVM according to claim 4 is characterized in that: In step S3, the steps of constructing the GA-LSSVM model include: S31: Based on the LSSVM regression framework, the expression of the risk level identification model is: The constraints are: k' (w T φ(z k'u )+b)=1-e k'u , k'=1,2…K'; Where: w is the weight vector, b is the bias term, e k'u is the error variable, γ represents the kernel parameter in the Gaussian radial basis kernel function, φ(z k'u ) is the nonlinear mapping of the input features, s k' ={1,2,3,4,5} represents the output label, i.e., the risk level; S32: The risk level identification model is transformed into a dual problem through the Lagrange multiplier method, namely: Taking partial derivatives of w, b, and e and setting them to 0, we get the linear equation system: Where: Ω ij represents the similarity matrix between training samples i and j, I represents the identity matrix, α represents the Lagrange multiplier vector, s k' Indicates the risk level. S33: The GA algorithm is used to tune the regularization parameter δ and the kernel parameter γ in the Gaussian kernel function to obtain the best parameter combination with the best risk level identification effect.
6. The method for identifying railway transportation scheduling risk level based on GA-LSSVM according to claim 5 is characterized in that: In step S33, the steps of tuning the regularization parameter δ and the kernel parameter γ are as follows: S331: Encode the regularization parameter δ and the kernel parameter γ as the chromosome in the GA algorithm and represent it as a vector (δ,γ); S332: Randomly generate a set of parameter combinations in the range (δ,γ) to represent the population, and each chromosome corresponds to a different δ and γ value; S333: Use the classification accuracy of 5-fold cross validation as the evaluation criterion of the fitness function to perform selection, crossover and mutation operations on chromosomes; S334: When the preset maximum number of iterations T is reached or the optimal fitness value does not increase for five consecutive generations, the iteration is stopped. At this time, the individual with the highest fitness value is selected in the last generation, and its corresponding δ and γ are the optimal regularization parameters and kernel parameters.
7. A railway transportation scheduling risk level identification system based on GA-LSSVM, characterized in that: The identification system is used to perform risk identification on a railway transportation scheduling risk level identification method based on GA-LSSVM according to any one of claims 1 to 6, which includes: Data collection module, used to obtain multi-source risk data from historical accidents in railway transportation scheduling; Data preprocessing module, used to preprocess multi-source risk data; The feature extraction module is used to extract the features to be identified from the multi-source risk data, and process the features to be identified through the conditional generative adversarial network and the autoencoder respectively; The model building module is used to build a risk level identification model and perform parameter tuning and optimization to obtain an optimized GA-LSSVM model; The risk identification module uses the optimized GA-LSSVM model to predict the risk of real-time data and identify the potential scheduling risk level; The risk warning module provides risk handling suggestions based on the scheduling risk level identification results.
8. According to claim 7, a railway transportation scheduling risk level identification system based on GA-LSSVM is characterized in that: Model building modules include: The basic modeling submodule builds a risk level identification model based on the LSSVM algorithm; The model parameter tuning submodule uses the GA algorithm to tune the parameters in the risk level identification model to obtain the GA-LSSVM model; Model training submodule, used to train the GA-LSSVM model; The model testing submodule is used to test the trained GA-LSSVM model to obtain the optimized GA-LSSVM model.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the railway transportation scheduling risk level identification method based on GA-LSSVM as described in any one of claims 1 to 6 are implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a railway transportation scheduling risk level identification method based on GA-LSSVM as described in any one of claims 1 to 6 are implemented.