Power system software risk assessment method based on improved machine learning

By improving machine learning methods and using technologies such as neural networks and recurrent neural networks, the problem of insufficient accuracy of traditional risk assessment methods is solved, the risk assessment accuracy and applicability of the power system software supply chain is improved, and a safer and more reliable evaluation platform is provided. .

CN119203162APending Publication Date: 2024-12-27INTEGRITY TECH GRP INC
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411401974.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Traditional software supply chain risk assessment methods rely on statistical analysis and regular expressions, and there are problems with insufficient model accuracy and applicability.

Method used

Using improved machine learning-based approaches, steps in data acquisition, data preprocessing, feature engineering, improved machine learning model training and risk assessment and prediction, including the use of neural network algorithms, word embedding technology, recurrent neural networks and data augmentation technology , to evaluate and predict component risks in the power system software supply chain.

Benefits of technology

It improves the accuracy and applicability of software supply chain risk assessment, provides a safer and more reliable software supply chain platform for power systems, and provides a reference for software security management in other industries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119203162A_ABST
    Figure CN119203162A_ABST
Patent Text Reader

Abstract

The invention discloses a power system software risk assessment method based on improved machine learning, and relates to the field of power system software security. Through the steps of data acquisition, preprocessing, feature engineering, improved machine learning model training and the like, risk assessment and prediction are carried out on components in the software supply chain. According to the method, the precision and applicability of software supply chain risk assessment can be effectively improved, a safer and more reliable software supply chain platform is provided for a power system, and a reference is provided for software security management in other industries.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power system software supply chain risk assessment, and in particular to a power system software risk assessment method based on improved machine learning. Background Art

[0002] With the digital transformation and informatization of power systems, software is increasingly used in power systems. Under the premise of safety and reliability, the use of a compliant software supply chain is an important guarantee for ensuring system reliability and stability. At present, traditional software supply chain risk assessment methods mostly rely on statistical analysis and rule expressions, which have problems such as insufficient model accuracy and applicability. Summary of the invention

[0003] The purpose of the present invention is to provide a power system software risk assessment method based on improved machine learning. The method realizes risk assessment and prediction of components in the power system software supply chain through the steps of data collection, data preprocessing, feature engineering, improved machine learning model training, risk assessment and prediction, and improves the accuracy and applicability of software supply chain risk assessment.

[0004] Technical Solution

[0005] To achieve the above object, the present invention adopts the following technical solutions:

[0006] 1. Data Collection

[0007] In order to conduct a software supply chain risk assessment for power system software access based on machine learning, it is first necessary to collect data and related information from the software supply chain, including component ID, version number, component source, component domain, and security vulnerabilities. The details are as follows:

[0008] 1.1 Component ID: refers to an identifier for each component in the power system software, generally including the component name or code library name, version number and other information, so that each component can be accurately identified.

[0009] 1.2 Version number: refers to the version of each component in the power system software. Different versions of the same component may have different security vulnerabilities and problems. Therefore, the version number is important information for evaluating the security of components in the supply chain.

[0010] 1.3 Source: refers to the source of each component in the power system software, which may come from a third-party organization or open source library. The source affects the reliability and stability of the component, and will also affect the safety assessment results of the component.

[0011] 1.4 Field: refers to the application field to which the components in the power system software belong, including power generation, transmission, distribution, etc. Different application fields have different security threats and vulnerabilities, and this information can be used together with other component features to train models, predict and assess risks.

[0012] 1.5 Security vulnerabilities: refers to the security vulnerabilities and weaknesses that may exist in each component of the power system software. The vulnerability database that is updated in real time through vulnerability information can more comprehensively assess risks.

[0013] Different data information may need to be collected for different component characteristics and supply chain architectures to ensure the comprehensiveness and accuracy of the evaluation. The collected data is usually obtained through API interfaces and crawler technology, and is cleaned and sorted to ensure the integrity and consistency of the data. In the subsequent data preprocessing stage, the data needs to be normalized and processed so that the data can be used for analysis and prediction by machine learning algorithms.

[0014] 2. Data Preprocessing

[0015] This stage mainly cleans and organizes the collected data, identifies and removes unnecessary data, and converts the data into a format that can be processed by machine learning algorithms. Data preprocessing is an important stage in the software supply chain risk assessment process for power system software access based on machine learning. Its main purpose is to process, organize and convert the collected data to facilitate subsequent machine learning algorithm processing. The following is the detailed implementation process of data preprocessing:

[0016] 2.1 Data cleaning: In this step, you need to check for missing values, duplicate values, erroneous values, etc. in the data set and deal with them accordingly. Missing values ​​can be handled by filling or deleting, duplicate values ​​can be directly deleted, and erroneous values ​​can be corrected or deleted.

[0017] 2.2 Data Arrangement: The collected data is organized in a specific format to unify the data structure and facilitate subsequent analysis and prediction. For example, a unified data table can be set up to organize the feature information of each component in rows and features as columns.

[0018] 2.3 Feature processing: In this step, the features in the dataset need to be processed. It may be necessary to perform operations such as feature selection and feature transformation. Feature selection is to select features that have an important impact on the evaluation target, which can be selected through statistical methods, feature correlation analysis, etc. Feature transformation can be performed through methods such as standardization, normalization, and one-hot encoding.

[0019] 2.4 Data conversion: In order to make data suitable for machine learning algorithms, it is usually necessary to convert it into numerical data. For example, text data can be represented numerically, and categorical data can be encoded using one-hot encoding. This can convert data into a numerical matrix that can be processed by the algorithm.

[0020] 2.5 Dataset division: The processed dataset is divided into training set, validation set and test set. The training set is used to train the machine learning model, the validation set is used for parameter adjustment and model selection, and the test set is used to evaluate the performance and accuracy of the model.

[0021] Through the above steps, the data preprocessing stage can clean, organize and convert the collected data into a format that can be processed by the machine learning algorithm, providing preparation for subsequent model training and prediction. This can improve the effectiveness of the model and accurately estimate and predict the software supply chain risks of power system software access.

[0022] 3. Feature Engineering

[0023] Feature engineering is a very important step in machine learning. At this stage, it is necessary to select appropriate features and perform data transformation to use machine learning algorithms for data analysis and prediction. In the software supply chain risk assessment method for power system software access, the following features can be selected: component domain, component ID, version number, component source, public library dependency, and number of vulnerabilities.

[0024] 4. Improved machine learning model training

[0025] Select a suitable machine learning algorithm, such as support vector machine (SVM), decision tree, neural network, etc., to train the model for analysis and prediction. The present invention selects a neural network algorithm, and its training process is as follows:

[0026] 4.1 Data preparation: Completed by step 1 mentioned above.

[0027] 4.2 Feature Engineering: Completed by step 3 mentioned above.

[0028] 4.3 Network architecture design: Select a suitable neural network architecture. You can consider using a multilayer perceptron, a convolutional neural network, or a recurrent neural network, and select a suitable network structure based on the characteristics of the data set and the problem. According to the characteristics of the data set, the present invention uses an improved recurrent neural network to design the network architecture. The implementation process is as follows:

[0029] 4.3.1 Improved input and output data preprocessing: In the implementation of the traditional recurrent neural network model, word embedding technology can be considered for processing text data. Word embedding is a method of mapping words to a continuous vector space, which can improve the representation ability of input data. The specific implementation process is as follows:

[0030] (1) Build a vocabulary: Based on the text data in the training set, build a vocabulary that maps each word to a unique integer number. You can use an existing vocabulary or build your own.

[0031] (2) Text vectorization: Convert each word in the text data into a corresponding integer number. You can use a vocabulary to map each word in the text data to its corresponding number, and then convert the text data into an integer sequence.

[0032] (3) Sequence padding: Since the length of text data may be inconsistent, in order to ensure the dimensional consistency of the input data, the sequence needs to be padded. The sequence length can be unified by adding a specific padding symbol (such as 0) at the end of the sequence.

[0033] (4) Constructing an embedding matrix: Construct a word embedding matrix based on the word numbers in the vocabulary. Each row of the matrix represents the word embedding vector of a word. You can use a pre-trained word embedding model (such as Word2Vec, GloVe, etc.) to load the trained word embedding vector.

[0034] (5) Embedding layer: Add an embedding layer to the neural network model to convert the input integer sequence into a sequence of word embedding vectors. You can set parameters such as the word embedding dimension and the input sequence length.

[0035] Through the above improvements, the use of word embedding technology can improve the model's ability to understand and represent words, thereby improving the performance and generalization ability of the model.

[0036] 4.3.2 Improved model building: In the implementation process of the traditional recurrent neural network model, the model building stage is a very critical step. Different model building may affect the performance and generalization ability of the model. In addition to selecting LSTM as the RNN unit and ReLU as the activation function, the present invention selects the GRU (Gated Recurrent Unit) recurrent unit to improve the memory capacity of the neural network and the modeling ability of long-term dependencies. The specific implementation process is as follows:

[0037] (1) Import related libraries: Before building the model, you need to import related libraries and modules, such as keras, tensorflow, etc.

[0038] (2) Define the model architecture: Using the Keras tool, you can define the model architecture through the Sequential or Model function, including adding embedding layers, recurrent layers, fully connected layers, etc.

[0039] (3) Adding a recurrent layer: In addition to using LSTM as a recurrent unit, other types of recurrent units such as GRU can also be selected. The construction of the recurrent layer requires setting parameters such as the number of neurons in the recurrent layer and the dimension of the input data. In the scenario of "Software Supply Chain Risk Assessment for Power System Software Access", the number of neurons and the dimension of the input data are set as follows in the present invention:

[0040] 1). Dimensions of input data:

[0041] If you use word embedding technology to process text data (such as descriptions of software components, change logs, etc.), you can choose a medium-sized word embedding dimension, such as 100 to 200. This can capture enough information while avoiding overly complex models.

[0042] For non-text data (such as version numbers, component IDs, etc.), they can be converted into numerical data through one-hot encoding or other feature engineering techniques. The dimension of this data will depend on the number of features.

[0043] 2) Number of neurons:

[0044] For recurrent layers, a moderate number of neurons can be chosen, such as 128 to 256. This should provide enough model capacity to capture complex patterns in the data while avoiding overfitting.

[0045] If the model still cannot achieve the expected performance, you can consider increasing the number of neurons, for example to 512.

[0046] (4) Add activation function: ReLU as an activation function can increase the nonlinear characteristics of the model. You can also try other types of activation functions, such as Tanh.

[0047] (5) Add output layer: The output layer of the model needs to select different activation functions and number of units according to the task requirements. In text classification tasks, sigmoid or softmax is usually used as the activation function of the output layer.

[0048] (6) Model summary: Use the summary function to view detailed information about the model architecture and check whether the model is defined correctly.

[0049] Through the above improvements, the memory capacity of the neural network and its ability to model long-term dependencies can be improved, thereby improving the performance and generalization ability of the model.

[0050] 4.3.3 Improved model compilation: In the traditional neural network model training process, the model compilation stage is very important. Different model compilations may affect the learning efficiency and generalization ability of the model. In addition to using cross entropy as the loss function and Adam as the optimizer, this paper tries other loss functions and optimizers suitable for the task, such as loss functions for unbalanced data sets or optimizers for sparse gradients. The specific implementation process is as follows:

[0051] (1) Model compilation: After defining the model architecture, you need to compile the model and specify the loss function, optimizer, and evaluation metrics. The compile function provided by Keras can achieve this function.

[0052] (2) Loss function: Different loss functions can be selected for different task requirements. Cross entropy can be used for classification tasks, mean square error can be used for regression tasks, and for unbalanced data, weighted loss functions can be selected.

[0053] (3) Optimizer: The function of the optimizer is to control the step size and direction of the model parameter update. The Adam optimizer is a commonly used optimizer. You can also try other optimizers, such as SGD, Adagrad, RMSprop, etc.

[0054] (4) Evaluation indicators: The evaluation indicators of the model can include accuracy, precision, recall, etc. Keras provides some commonly used evaluation indicators, and you can also customize the evaluation indicators.

[0055] (5) Model training: Use the fit function to train the model and specify relevant training parameters, such as epoch, batch_size, etc.

[0056] Through the above improvements, different loss functions and optimizers can be selected according to task requirements during the model compilation phase, thereby improving the learning efficiency and generalization ability of the model. For example, the loss function for unbalanced data sets or the optimizer for sparse gradients can further optimize the performance of the model.

[0057] 4.3.4 Improved model training: In the traditional neural network model training process, the model training stage is very important. Different model training may affect the performance and generalization ability of the model. In addition to dividing the data set and setting the appropriate batch size and number of iterations, the training set size can be expanded by using data enhancement techniques such as rotation, scaling, and flipping. The specific implementation process is as follows:

[0058] (1) Import related libraries: Before model training, you need to import related libraries and modules, such as keras, tensorflow, etc.

[0059] (2) Data loading: The ImageDataGenerator method provided by Keras can be used to load the dataset directly from the image folder and perform data augmentation. If the dataset is large, you can consider using the tf.data API to process the dataset.

[0060] (3) Data enhancement: Keras provides many data enhancement methods, including rotation, scaling, flipping, shearing, random flipping, etc., which can be selected and combined according to task requirements, which can increase the diversity of training samples and improve the generalization performance of the model.

[0061] (4) Dataset division: To divide the data set, you can use the train_test_split method to divide the training set and the validation set into a certain proportion, and you can randomly shuffle them to effectively avoid overfitting problems.

[0062] (5) Model training: Use the fit function to train the model and specify relevant training parameters, such as epoch, batch_size, etc. In iterative training, you can output the loss and evaluation indicators during the training process, and use strategies such as earlystopping to prevent overfitting of the model.

[0063] Through the above improvements, data augmentation techniques can be used to expand the size of the training set during model training, such as increasing the diversity of samples by rotation, scaling, flipping, etc., and improving the generalization performance of the model. At the same time, dividing the data set and setting the appropriate batch size and number of iterations can also effectively train the neural network model.

[0064] 4.3.5 Improved model evaluation: In the traditional neural network model training process, the model evaluation stage is very important. Different model evaluations may affect the performance and generalization ability of the model, and can also provide guidance for model improvement. In addition to calculating indicators such as classification accuracy, precision and recall, other common indicators such as F1-score, AUC-ROC, etc. can also be used to evaluate the model to have a more comprehensive understanding of the model's performance. The specific implementation process is as follows:

[0065] (1) Model prediction: Use the trained model to predict the test set, generally using the predict function.

[0066] (2) Classification indicators: Calculate classification indicators such as accuracy, precision, and recall. You can use the confusion_matrix function to count the quantitative relationship between the true category and the predicted category. At the same time, you can choose to use other indicators under the sklearn.metrics module to calculate the classification performance of the model according to your needs.

[0067] (3) Regression metrics: For regression tasks, you can calculate metrics such as mean square error (MSE) and mean absolute error (MAE) to evaluate model performance. You can also choose to use other common regression metrics to evaluate model performance.

[0068] (4) Curve indicators: AUC-ROC is a commonly used classification curve indicator that can reflect the performance of model classification. It can be calculated using the roc_curve and auc functions of the sklearn.metrics module.

[0069] (5) Drawing the ROC curve: Drawing the ROC curve of the model can give you an intuitive understanding of the performance of the model. You can use libraries such as matplotlib to draw the curve.

[0070] Through the above improvements, other common indicators such as F1-score, AUC-ROC, etc. can be used to evaluate the model in the model evaluation stage to have a more comprehensive understanding of the model performance. At the same time, multiple indicators need to be evaluated to describe the performance of the model, so as to guide further improvements to the model.

[0071] 4.3.6 Improved model prediction: In the traditional neural network model prediction process, model tuning and ensemble learning can be performed to combine the prediction results of multiple models to improve the model's prediction ability and stability. The specific implementation process is as follows:

[0072] (1) Model tuning: After the model is established and trained, the performance of the model can be improved by adjusting hyperparameters, such as network structure, number of layers, number of neurons, etc. The optimal hyperparameters can be automatically searched using methods such as grid search and random search. At the same time, cross-validation can also be used as mentioned above to evaluate the performance of the model and determine the optimal parameters.

[0073] (2) Ensemble learning: Ensemble learning can improve the generalization performance and robustness of the model. Common ensemble learning methods include voting, averaging, and stacking. For example, the voting method can vote on the prediction results of multiple models and select the category with the most votes as the final result; the averaging method can take the average of the prediction results of multiple models as the final result; the stacking method uses the prediction results of multiple models as new training data to train a new model and then make predictions.

[0074] (3) Improving model robustness: In practical applications, the model may encounter problems such as noise interference and abnormal data. In order to improve the robustness of the model, noise reduction methods, anomaly detection methods and other technologies can be used for optimization.

[0075] (4) Apply the model for prediction: Finally, the trained model can be used to perform classification or regression prediction on unknown data, obtain prediction results, and evaluate the performance of the model.

[0076] Through the above improvements, we can perform model tuning and ensemble learning in the model prediction stage, combine the prediction results of multiple models, and improve the prediction ability and stability of the model. At the same time, we need to consider the efficiency and robustness of the model operation to ensure that the model can achieve the expected effect in practical applications.

[0077] 5. Risk assessment and prediction

[0078] Based on the trained model, risk assessment and prediction are performed on the components of the software supply chain for power system software access. By analyzing specific components, it is possible to predict their possible vulnerabilities and security issues, thereby helping decision makers better manage the security of the software supply chain for power system software access.

[0079] Beneficial Effects

[0080] The present invention has the following beneficial effects:

[0081] Improved the accuracy and applicability of software supply chain risk assessment.

[0082] Provides a more secure and reliable software supply chain platform for the power system.

[0083] Provides reference and lessons for software security management in other industries. DETAILED DESCRIPTION

[0084] The present invention will be further described below in conjunction with specific embodiments:

[0085] Example 1

[0086] 1. Data collection: Obtain data through API interface and crawler technology, and clean and organize it to ensure data integrity and consistency.

[0087] 2. Data preprocessing: Normalize the data to ensure that the data is suitable for analysis and prediction by machine learning algorithms.

[0088] 3. Feature Engineering: The selected features include the domain to which the component belongs, component ID, version number, component source, public library dependency, and number of vulnerabilities.

[0089] 4. Improved machine learning model training: The neural network architecture used is an improved recurrent neural network, including word embedding technology, selection of different types of recurrent units, optimization of the model compilation phase, and data augmentation technology in the model training phase.

[0090] 5. Risk assessment and prediction: In the model prediction stage, the model is tuned and integrated learning is performed, and the prediction results of multiple models are combined to improve the prediction ability and stability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0091] Attached Figure 1 The present invention is a schematic diagram of the implementation flow of a power system software risk assessment method based on improved machine learning. Specific embodiments

[0093] The complete implementation process of the power system software supply chain risk assessment method based on improved machine learning is described in Example 1. The process includes key steps such as data collection, data preprocessing, feature engineering, model training and risk assessment, and ultimately achieves accurate assessment of power system software supply chain risks.

[0094] The embodiments of the present invention are not limited to the above description, and other changes and improvements may be possible, and these changes and improvements all fall within the protection scope of the present invention.

Claims

1. A method for risk assessment of power system software based on improved machine learning, characterized in that: The method comprises the following steps: 1.1 Data collection: collects data including component ID, version number, component source, component domain, and security vulnerabilities; 1.2 Data preprocessing: cleaning, organizing and transforming the collected data to facilitate subsequent machine learning algorithm processing; 1.3 Feature engineering: selecting appropriate features and transforming data to use machine learning algorithms for data analysis and prediction; 1.4 Improved machine learning model training, using neural network algorithms, including data preparation, feature engineering, network architecture design, model compilation, model training, and model evaluation; 1.5 Risk assessment and prediction: Based on the trained model, risk assessment and prediction are conducted on the components of the software supply chain for power system software access.

2. A method for risk assessment of power system software based on improved machine learning according to claim 1, characterized in that: In the data collection step, data is acquired through API interface and crawler technology, and is cleaned and organized.

3. A method for risk assessment of power system software based on improved machine learning according to claim 1 or 2, characterized in that: In the data preprocessing step, the data is normalized to ensure that the data is suitable for analysis and prediction by the machine learning algorithm.

4. A method for risk assessment of power system software based on improved machine learning according to claim 1 or 2, characterized in that: In the feature engineering step, the selected features include the domain to which the component belongs, the component ID, the version number, the component source, the public library dependency and the number of vulnerabilities.

5. A method for risk assessment of power system software based on improved machine learning according to claim 1 or 2, characterized in that: In the improved machine learning model training step, the neural network architecture used is an improved recurrent neural network, including word embedding technology, selection of different types of recurrent units, optimization of the model compilation stage, and data enhancement technology in the model training stage.

6. A method for risk assessment of power system software based on improved machine learning according to claim 1 or 2, characterized in that: In the risk assessment and prediction steps, the model prediction stage performs model tuning and integrated learning, combines the prediction results of multiple models, and improves the prediction ability and stability of the model.

7. A software supply chain risk assessment system for power system software access based on improved machine learning, characterized in that: The system comprises: 7.1 Data collection module, used to collect data including component ID, version number, component source, component domain and security vulnerabilities; 7.2 Data preprocessing module, used to clean, organize and transform the collected data; 7.3 Feature engineering module, used to select appropriate features and perform data transformation; 7.4 Machine learning model training module, used to train neural network models; 7.5 Risk assessment and prediction module, used to conduct risk assessment and prediction on components of the software supply chain for power system software access.

8. The software supply chain risk assessment system for power system software access based on improved machine learning according to claim 7 is characterized in that: The system also includes a user interface for displaying the risk assessment report and receiving user input.

9. A computer-readable storage medium, characterized in that: The medium stores a computer program configured to execute the steps of the software supply chain risk assessment method for power system software access based on improved machine learning as described in any one of claims 1 to 6.

10. A computer program product, characterized in that The product includes computer executable instructions, which are used to implement the functions of the software supply chain risk assessment method for power system software access based on improved machine learning as described in any one of claims 1 to 6.

Citation Information

Cited By

  • Software architecture evaluation method based on dependency structure matrix

    CN119782123A

  • A software architecture evaluation method based on dependency structure matrix

    CN119782123B

  • Pipeline safety assessment method, equipment and medium

    CN120626982A