Suspicious backdoor sample detection method and device for AI model in power system, computer device, readable storage medium and program product
By preprocessing, perturbation processing, and feature extraction of flow data from AI models in power systems, combined with anomaly scoring methods, suspicious backdoor samples are accurately identified and screened, solving the problem of unobjective detection results in existing technologies and improving the accuracy and reliability of detection.
Patent Information
- Application Number
- CN202610738583.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-27
- Publication Date
- 2026-08-25
AI Technical Summary
Existing technologies cannot effectively quantify the degree of anomaly in backdoor samples in power AI models, resulting in a lack of objectivity and reproducibility in the detection results.
By preprocessing the raw network traffic data of the flow input AI model in the power system, the data is merged and reorganized into a traffic session sample set containing interaction boundaries, temporal relationships and context dependencies. The samples are then perturbed and feature extracted, and a comprehensive anomaly score is calculated to screen out suspicious backdoor samples.
It has achieved accurate detection of hidden and suspicious backdoor samples in power system AI models, improved the accuracy and robustness of backdoor detection, and ensured the safe and reliable deployment of power AI models.
Smart Images

Figure CN122640182A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power system technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for detecting suspicious backdoor samples in AI models of power systems. Background Technology
[0002] With the rapid development of digitalization, networking, and intelligentization technologies in power systems, AI-based traffic classification and anomaly detection technologies have been widely applied and popularized. These technologies feature automatic feature learning, high recognition accuracy, and fast response speed, effectively enabling intelligent identification and security monitoring of power communication traffic. They have become a key means to support the secure and stable operation of power system networks. Against this backdrop, the current common approach is to use dataset-based training and static detection to perform security monitoring and backdoor detection on power AI models.
[0003] However, current traditional detection methods do not consider the differences in the model's sensitive response to backdoor triggering, cannot quantify the degree of sample abnormality, and the detection results lack objectivity and reproducibility. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, device, computer equipment, computer-readable storage medium, and computer program product for detecting suspicious backdoor samples of AI models in power systems that can quantify the degree of sample anomaly.
[0005] Firstly, this application provides a method for detecting suspicious backdoor samples in AI models of power systems, including:
[0006] Obtain the raw network flow data corresponding to the flow input type AI model in the power system, and preprocess the raw network flow data to obtain preprocessed flow data;
[0007] The preprocessed traffic data is merged and reorganized into a traffic session sample set containing interaction boundaries, temporal relationships and context dependencies. The traffic session sample set includes multiple traffic session samples.
[0008] For each traffic session sample, multiple perturbation processes are applied to the traffic session sample to obtain multiple perturbation samples corresponding to the traffic session sample; feature extraction is performed on the traffic session sample and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session sample.
[0009] For each flow session sample, the flow characteristics and disturbance characteristics of the flow session sample are input into the flow input type AI model in the power system to obtain the flow output and disturbance output of the flow session sample.
[0010] For each traffic session sample, an anomaly score is performed on the traffic session sample based on its own traffic output and disturbance output to obtain a comprehensive anomaly score. Based on the comprehensive anomaly score of each traffic session sample in the traffic session sample set, traffic session samples with anomalies are selected from the traffic session sample set and are regarded as suspicious backdoor samples.
[0011] In one embodiment, the preprocessed traffic data is merged and reassembled into a traffic session sample set containing interaction boundaries, temporal relationships, and context dependencies, including:
[0012] The preprocessed traffic data is sorted in ascending order by timestamp, and the source address, destination address, port information, protocol type, device identifier, and message fields of the preprocessed traffic data are pre-processed to obtain processed data. Based on the source address, destination address, port information, and protocol type of the processed data, normalized data belonging to the same communication link or the same communication direction are initially merged to obtain a first candidate communication set. The first candidate communication set is then time-merged based on a preset time window threshold to obtain a second candidate communication set. Based on business association rules, the second candidate communication set is corrected to obtain a traffic session sample set that includes interaction boundaries, temporal relationships, and context dependencies.
[0013] In one embodiment, the raw network traffic data is preprocessed to obtain preprocessed traffic data, including:
[0014] The raw network traffic data is subjected to timestamp unification, protocol field parsing, invalid packet filtering, duplicate packet removal, missing field marking, and abnormal encoding correction operations to obtain preprocessed traffic data.
[0015] In one embodiment, the traffic session samples are perturbed to obtain perturbed samples corresponding to the traffic session samples, including:
[0016] A preset perturbation processing method is used to perturb the traffic session samples to obtain the perturbation samples corresponding to the traffic session samples. The preset perturbation processing method is at least one of the following: non-critical field masking, slight jitter of time features, limited adjustment of auxiliary statistical features, equivalent replacement of non-critical context, and limited rearrangement of non-core packets. Feature extraction is performed on the traffic session samples and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session samples, including: feature extraction of the traffic session samples to obtain traffic features including protocol field features, time sequence direction features, statistical features, and context features; feature extraction of the perturbation samples to obtain perturbation features including perturbation protocol field features, perturbation time sequence direction features, perturbation statistical features, and perturbation context features.
[0017] In one embodiment, based on the traffic output and disturbance output of each traffic session sample, an anomaly score is performed on the traffic session sample to obtain a comprehensive anomaly score for the traffic session sample, including:
[0018] For each traffic session sample in the traffic session sample set, based on the traffic output and disturbance output of the traffic session sample, calculate the predicted category change rate, uncertainty change amount, and response consistency score; based on the predicted category change rate, uncertainty change amount, and response consistency score, calculate the comprehensive anomaly score through the comprehensive anomaly scoring function.
[0019] In one embodiment, the method further includes:
[0020] The suspected backdoor samples are removed or isolated from the traffic session sample set to obtain the processed traffic session sample set; the traffic input AI model in the power system is retrained based on the removed traffic session sample set to obtain the updated traffic input AI model in the power system.
[0021] Secondly, this application also provides a device for detecting suspicious backdoor samples in AI models of power systems, comprising:
[0022] The acquisition module is used to acquire the raw network flow data corresponding to the flow input type AI model in the power system, and to preprocess the raw network flow data to obtain preprocessed flow data.
[0023] The reorganization module is used to merge and reorganize preprocessed traffic data into a traffic session sample set that includes interaction boundaries, temporal relationships and contextual dependencies. The traffic session sample set includes multiple traffic session samples.
[0024] The processing module is used to perform various perturbation processing on each traffic session sample to obtain multiple perturbation samples corresponding to the traffic session sample; and to extract features from the traffic session sample and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session sample.
[0025] The output module is used to input the flow characteristics and disturbance characteristics of each flow session sample into the flow input type AI model in the power system, respectively, to obtain the flow output and disturbance output of the flow session sample.
[0026] The filtering module is used to score the traffic session sample based on its own traffic output and disturbance output for each traffic session sample, and obtain a comprehensive anomaly score for the traffic session sample. Based on the comprehensive anomaly score of each traffic session sample in the traffic session sample set, the module filters out the traffic session samples with anomalies from the traffic session sample set and uses the traffic session samples with anomalies as suspicious backdoor samples.
[0027] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0028] Obtain the raw network flow data corresponding to the flow input type AI model in the power system, and preprocess the raw network flow data to obtain preprocessed flow data;
[0029] The preprocessed traffic data is merged and reorganized into a traffic session sample set containing interaction boundaries, temporal relationships and context dependencies. The traffic session sample set includes multiple traffic session samples.
[0030] For each traffic session sample, multiple perturbation processes are applied to the traffic session sample to obtain multiple perturbation samples corresponding to the traffic session sample; feature extraction is performed on the traffic session sample and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session sample.
[0031] For each flow session sample, the flow characteristics and disturbance characteristics of the flow session sample are input into the flow input type AI model in the power system to obtain the flow output and disturbance output of the flow session sample.
[0032] For each traffic session sample, an anomaly score is performed on the traffic session sample based on its own traffic output and disturbance output to obtain a comprehensive anomaly score. Based on the comprehensive anomaly score of each traffic session sample in the traffic session sample set, traffic session samples with anomalies are selected from the traffic session sample set and are regarded as suspicious backdoor samples.
[0033] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0034] Obtain the raw network flow data corresponding to the flow input type AI model in the power system, and preprocess the raw network flow data to obtain preprocessed flow data;
[0035] The preprocessed traffic data is merged and reorganized into a traffic session sample set containing interaction boundaries, temporal relationships and context dependencies. The traffic session sample set includes multiple traffic session samples.
[0036] For each traffic session sample, multiple perturbation processes are applied to the traffic session sample to obtain multiple perturbation samples corresponding to the traffic session sample; feature extraction is performed on the traffic session sample and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session sample.
[0037] For each flow session sample, the flow characteristics and disturbance characteristics of the flow session sample are input into the flow input type AI model in the power system to obtain the flow output and disturbance output of the flow session sample.
[0038] For each traffic session sample, an anomaly score is performed on the traffic session sample based on its own traffic output and disturbance output to obtain a comprehensive anomaly score. Based on the comprehensive anomaly score of each traffic session sample in the traffic session sample set, traffic session samples with anomalies are selected from the traffic session sample set and are regarded as suspicious backdoor samples.
[0039] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0040] Obtain the raw network flow data corresponding to the flow input type AI model in the power system, and preprocess the raw network flow data to obtain preprocessed flow data;
[0041] The preprocessed traffic data is merged and reorganized into a traffic session sample set containing interaction boundaries, temporal relationships and context dependencies. The traffic session sample set includes multiple traffic session samples.
[0042] For each traffic session sample, multiple perturbation processes are applied to the traffic session sample to obtain multiple perturbation samples corresponding to the traffic session sample; feature extraction is performed on the traffic session sample and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session sample.
[0043] For each flow session sample, the flow characteristics and disturbance characteristics of the flow session sample are input into the flow input type AI model in the power system to obtain the flow output and disturbance output of the flow session sample.
[0044] For each traffic session sample, an anomaly score is performed on the traffic session sample based on its own traffic output and disturbance output to obtain a comprehensive anomaly score. Based on the comprehensive anomaly score of each traffic session sample in the traffic session sample set, traffic session samples with anomalies are selected from the traffic session sample set and are regarded as suspicious backdoor samples.
[0045] The aforementioned method, apparatus, computer equipment, computer-readable storage medium, and computer program product for detecting suspicious backdoor samples in AI models within a power system acquire the original network traffic data corresponding to the traffic input-type AI model in the power system. The original network traffic data is preprocessed to obtain preprocessed traffic data. The preprocessed traffic data is then merged and reorganized into a traffic session sample set containing interaction boundaries, temporal relationships, and context dependencies. This traffic session sample set includes multiple traffic session samples. For each traffic session sample, various perturbation processes are applied to obtain multiple perturbation samples corresponding to the traffic session sample. Finally, the traffic session samples and their corresponding perturbation samples are... Feature extraction is performed to obtain the flow characteristics and disturbance characteristics of the flow session samples. For each flow session sample, the flow characteristics and disturbance characteristics are input into the flow input AI model of the power system to obtain the flow output and disturbance output of the flow session sample. For each flow session sample, an anomaly score is performed based on its own flow output and disturbance output to obtain a comprehensive anomaly score. Based on the comprehensive anomaly score of each flow session sample in the set, flow session samples with anomalies are selected from the set and identified as suspicious backdoor samples. This application, by performing disturbance comparison, feature extraction, and anomaly scoring on flow session samples, can accurately detect hidden suspicious backdoor samples in the power system AI model, improve the accuracy and robustness of backdoor detection, and ensure the safe and reliable deployment of the power AI model. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a flowchart illustrating a method for detecting suspicious backdoor samples in an AI model within a power system, as shown in one embodiment.
[0048] Figure 2 This is a schematic diagram of the process of merging and reorganizing preprocessed traffic data in one embodiment;
[0049] Figure 3 This is a structural block diagram of a suspicious backdoor sample detection device for an AI model in a power system, as shown in one embodiment.
[0050] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0052] In one embodiment, such as Figure 1 As shown, a method for detecting suspicious backdoor samples in an AI model within a power system is provided. This embodiment illustrates the method by applying it to a terminal. It is understood that this method can also be applied to a server, and to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0053] Step 102: Obtain the original network flow data corresponding to the flow input type AI model in the power system, and preprocess the original network flow data to obtain preprocessed flow data.
[0054] The raw network traffic data originates from packet captures at mirror ports, exported records from switches, intrusion detection device logs, industrial gateway message records, control center communication audit logs, or historical offline traffic files. The raw network traffic data set is represented as follows:
[0055]
[0056] in, Indicates the first A raw traffic unit can be a data packet, a flow record, a communication log entry, or a message exchange record. A raw traffic unit is represented as follows:
[0057]
[0058] in, For the source address, For the destination address, For the source port, For destination port, Protocol type, For timestamps, These are protocol fields and payload characteristics.
[0059] Step 104: Merge and reorganize the preprocessed traffic data into a traffic session sample set that includes interaction boundaries, temporal relationships and contextual dependencies. The traffic session sample set includes multiple traffic session samples.
[0060] The merging and reorganization process includes sorting by timestamp in ascending order, segmenting based on time continuity, and introducing business association rules for correction.
[0061] Step 106: For each traffic session sample, perform various perturbation processes on the traffic session sample to obtain multiple perturbation samples corresponding to the traffic session sample; extract features from the traffic session sample and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session sample.
[0062] The disturbance handling only applies to non-critical parts that do not affect the core business meaning, without modifying key protocol fields, disrupting the response order, or damaging the logic of key business stages.
[0063] Step 108: For each flow session sample, input the flow characteristics and disturbance characteristics of the flow session sample into the flow input type AI model in the power system to obtain the flow output and disturbance output of the flow session sample.
[0064] Optionally, the flow input type AI model in the power system can be a deep learning-based power flow classification model, power anomaly detection model, power service identification model, power communication intrusion detection model, or power dispatch flow discrimination model; specifically, it may include convolutional neural networks, recurrent neural networks, long short-term memory networks, graph neural networks, Transformers, and various lightweight neural network models. This application does not limit the specific structure of the model.
[0065] Step 110: For each traffic session sample, an anomaly score is performed on the traffic session sample based on its own traffic output and disturbance output to obtain a comprehensive anomaly score for the traffic session sample. Based on the comprehensive anomaly score of each traffic session sample in the traffic session sample set, traffic session samples with anomalies are selected from the traffic session sample set and are regarded as suspicious backdoor samples.
[0066] The anomaly scoring is determined based on the changes in various metrics between the outputs corresponding to traffic session samples and perturbation samples. This is used to capture the abnormal sensitivity of suspicious backdoor samples to minor perturbations, distinguishing normal samples from contaminated samples carrying backdoor triggering characteristics.
[0067] The aforementioned method for detecting suspicious backdoor samples in AI models within a power system involves: acquiring the original network traffic data corresponding to the traffic input AI model in the power system; preprocessing the original network traffic data to obtain preprocessed traffic data; merging and recombining the preprocessed traffic data into a traffic session sample set containing interaction boundaries, temporal relationships, and contextual dependencies, with the traffic session sample set comprising multiple traffic session samples; performing various perturbation processes on each traffic session sample to obtain multiple perturbation samples corresponding to the traffic session sample; extracting features from the traffic session samples and their corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session samples; inputting the traffic features and perturbation features of each traffic session sample into the traffic input AI model in the power system to obtain the traffic output and perturbation output of the traffic session sample; performing anomaly scoring on each traffic session sample based on its own traffic output and perturbation output to obtain a comprehensive anomaly score for the traffic session sample; and selecting traffic session samples with anomalies from the traffic session sample set based on the comprehensive anomaly score of each traffic session sample in the set, and identifying these anomaly-containing traffic session samples as suspicious backdoor samples. This application can accurately detect hidden and suspicious backdoor samples in power system AI models by performing perturbation comparison, feature extraction, and anomaly scoring on traffic session samples, thereby improving the accuracy and robustness of backdoor detection and ensuring the safe and reliable deployment of power AI models.
[0068] In one exemplary embodiment, such as Figure 2 As shown, the preprocessed traffic data is merged and reorganized into a traffic session sample set containing interaction boundaries, temporal relationships, and contextual dependencies, including:
[0069] The preprocessed traffic data is sorted in ascending order by timestamp, and the source address, destination address, port information, protocol type, device identifier, and message fields of the preprocessed traffic data are pre-processed to obtain processed data. Based on the source address, destination address, port information, and protocol type of the processed data, normalized data belonging to the same communication link or the same communication direction are initially merged to obtain a first candidate communication set. The first candidate communication set is then time-merged based on a preset time window threshold to obtain a second candidate communication set. Based on business association rules, the second candidate communication set is corrected to obtain a traffic session sample set that includes interaction boundaries, temporal relationships, and context dependencies.
[0070] Specifically, preprocessed traffic data is sorted in ascending order by timestamp, and the source address, destination address, port information, protocol type, device identifier, and message fields are standardized. If the original data comes from different collection points, time alignment and field format standardization are also required to ensure a consistent data foundation for subsequent merging operations. After standardization, the traffic is initially merged based on the source address, destination address, port information, and protocol type to obtain a candidate communication set. The purpose of this process is to group traffic units that clearly belong to the same communication link or the same communication direction together, narrowing the scope of subsequent session identification. Merging based solely on address and port may still mix multiple adjacent but independent business processes together. Therefore, it is also necessary to segment the candidate communication set based on time continuity and set a time threshold. If the time interval between two traffic units is less than the threshold, the adjacent traffic units are classified into the same candidate session. In power systems, relying solely on the five-tuple and time continuity is insufficient to accurately distinguish business processes. Therefore, business association rules are further introduced to correct and confirm candidate sessions. Business association rules are mainly used to determine whether multiple traffic units belong to the same round of business interaction. After the initial merging, time segmentation, and business association determination described above, the final traffic session samples can be formed. Let the k-th traffic session sample be represented as... ,in Representing a session The number of traffic units contained therein. Through the above steps, the original network traffic is finally converted into a traffic session set representation as follows: Where M represents the number of traffic session samples constructed. Each constructed traffic session sample corresponds to a relatively complete communication interaction process and can simultaneously retain message content information; message order information; communication direction information; time interval information; request-response correspondence; device role and service context information.
[0071] For example, firstly, the preprocessed traffic data is sorted in ascending order by timestamp, and the source address, destination address, port information, protocol type, device identifier, and message fields are normalized, aligned, and cleaned to obtain processed data with a uniform format. Then, based on the source address, destination address, port information, and protocol type in the processed data, messages belonging to the same communication link and the same communication direction are initially merged to form a first candidate communication set. Time merging is then performed on the first candidate communication set according to a preset time window threshold to delineate clear interaction start and end boundaries, resulting in a second candidate communication set. Finally, session correction and merging are performed on the second candidate communication set according to power business association rules, removing invalid sessions and completing the interaction context, ultimately obtaining a traffic session sample set containing complete interaction boundaries, timing relationships, and context dependencies.
[0072] In this embodiment, by arranging, multi-dimensionally merging, dividing time windows, and correcting business rules on the preprocessed traffic data, a traffic session sample set containing interaction boundaries, temporal relationships, and contextual dependencies can be accurately constructed, providing standardized, complete, and power business-appropriate data for subsequent disturbance detection, feature extraction, and identification of suspicious backdoor samples.
[0073] In one exemplary embodiment, the raw network traffic data is preprocessed to obtain preprocessed traffic data, including:
[0074] The raw network traffic data is subjected to timestamp unification, protocol field parsing, invalid packet filtering, duplicate packet removal, missing field marking, and abnormal encoding correction operations to obtain preprocessed traffic data.
[0075] For example, firstly, the raw network traffic data undergoes a timestamp unification operation to eliminate time offsets caused by different collection nodes and devices, ensuring traffic timing consistency. Secondly, the traffic packets undergo protocol field parsing to extract source address, destination address, port, protocol type, device identifier, and service-related fields, forming structured traffic information. Subsequently, invalid packet filtering and duplicate packet removal operations are performed to eliminate empty packets, erroneous packets, garbled packets, and redundant data transmitted repeatedly, reducing noise interference. Finally, missing field marking and abnormal encoding correction operations are performed on the packets to fill in key information and correct format errors, ultimately obtaining preprocessed traffic data with standardized fields, clean data, and accurate timing.
[0076] In this embodiment, the above-mentioned multi-dimensional preprocessing operations can effectively clean up the original traffic noise, unify the data format, and ensure data integrity, providing high-quality data support for subsequent traffic session reassembly and detection of suspicious backdoor samples.
[0077] In an exemplary embodiment, the traffic session samples are perturbed to obtain perturbed samples corresponding to the traffic session samples, including:
[0078] A preset perturbation processing method is used to perturb the traffic session samples to obtain the perturbation samples corresponding to the traffic session samples. The preset perturbation processing method is at least one of the following: non-critical field masking, slight jitter of time features, limited adjustment of auxiliary statistical features, equivalent replacement of non-critical context, and limited rearrangement of non-core packets. Feature extraction is performed on the traffic session samples and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session samples, including: feature extraction of the traffic session samples to obtain traffic features including protocol field features, time sequence direction features, statistical features, and context features; feature extraction of the perturbation samples to obtain perturbation features including perturbation protocol field features, perturbation time sequence direction features, perturbation statistical features, and perturbation context features.
[0079] For example, based on the constraints of power system communication protocols and service continuity requirements, one or more combinations of non-critical field masking, slight jitter of time features, limited adjustment of auxiliary statistical features, equivalent replacement of non-critical context, and limited rearrangement of non-core messages are selected to perturb the traffic session samples and generate perturbed samples. Subsequently, feature extraction is performed on the original traffic session samples and perturbed samples respectively. Protocol field features, time sequence direction features, statistical features, and context features are extracted from the original traffic session samples to form complete traffic features. The corresponding perturbed protocol field features, perturbed time sequence direction features, perturbed statistical features, and perturbed context features are extracted from the perturbed samples to form perturbed features.
[0080] Among them, non-critical field masking involves masking, normalizing, or performing limited replacements on non-critical fields; slight time feature jittering involves slightly jittering time features that are allowed to fluctuate; limited adjustment of auxiliary statistical features involves limited perturbation of auxiliary statistical features that do not affect the meaning of core interactions; equivalent replacement of non-critical context involves equivalent replacement or slight adjustment of non-critical context labels; and limited rearrangement of non-core messages involves limited rearrangement or replacement of non-core message fragments under the premise of meeting business rules.
[0081] In this embodiment, by using the above-mentioned perturbation and feature extraction methods, effective test samples can be constructed without violating the power communication protocol, interrupting the business process, or triggering abnormal alarms. This accurately stimulates the model's abnormal response to suspicious backdoor samples, while ensuring that the feature dimensions are complete and comparable, significantly improving the accuracy and robustness of backdoor detection.
[0082] In an exemplary embodiment, based on the traffic output and disturbance output of each traffic session sample, an anomaly score is performed on the traffic session sample to obtain a comprehensive anomaly score for the traffic session sample, including:
[0083] For each traffic session sample in the traffic session sample set, based on the traffic output and disturbance output of the traffic session sample, calculate the predicted category change rate, uncertainty change amount, and response consistency score; based on the predicted category change rate, uncertainty change amount, and response consistency score, calculate the comprehensive anomaly score through the comprehensive anomaly scoring function.
[0084] Optionally, the predicted class change rate is used to measure the proportion of changes in the predicted class before and after the perturbation, and the formula is:
[0085]
[0086] in Here are the original traffic session samples, and K is the number of perturbation samples. For the perturbation sample, the model predicts the category of sample x as y(x), and I is an indicator function that takes the value 1 when the condition in parentheses is true, and takes the value 0 otherwise.
[0087] Information entropy is used to measure output uncertainty. The formula for the change in uncertainty is:
[0088]
[0089] in,
[0090] in, It represents the model's response to samples. Belongs to the The predicted probability of each category.
[0091] The response consistency score under multiple perturbations measures whether the model maintains a consistent predicted response under multiple perturbation conditions. The formula is as follows:
[0092]
[0093] Based on the comparison between the comprehensive anomaly score and a preset threshold, the backdoor risk level or suspected backdoor determination result of the target traffic session sample is determined. A higher comprehensive score indicates a more significant difference in the model response of the target traffic session sample before and after the disturbance, and a higher backdoor risk. The comprehensive anomaly score function is defined as follows:
[0094]
[0095] in, , and Each value represents a corresponding weight. When the score exceeds a preset threshold, the corresponding traffic session sample is marked as a suspicious backdoor sample.
[0096] For example, the traffic output of the traffic session sample after model inference and the perturbation output corresponding to the perturbation sample are obtained respectively. Evaluation indicators are calculated based on the two types of output results: the predicted category change rate, which reflects whether the model output classification label changes before and after the perturbation and the proportion of the change; the uncertainty change, which reflects the fluctuation range of the model output confidence, probability distribution, or information entropy before and after the perturbation; and the response consistency score, which measures whether the model's output behavior to the original sample and the perturbation sample remains stable and consistent. The predicted category change rate, uncertainty change, and response consistency score are input into a preset comprehensive anomaly scoring function, and the final comprehensive anomaly score for the traffic session sample is obtained through weighted calculation or fusion rules.
[0097] In this embodiment, by combining multi-dimensional index calculations and comprehensive scoring, the abnormally sensitive behavior of the model to minor disturbances can be accurately identified, effectively distinguishing normal traffic samples from contaminated samples carrying backdoor triggering characteristics, thereby improving the sensitivity and reliability of backdoor detection.
[0098] In one exemplary embodiment, the method further includes:
[0099] The suspected backdoor samples are removed or isolated from the traffic session sample set to obtain the processed traffic session sample set; the traffic input AI model in the power system is retrained based on the removed traffic session sample set to obtain the updated traffic input AI model in the power system.
[0100] Optionally, retraining the flow input AI model in the power system can be done by retraining an already trained flow input AI model or by retraining a new flow input AI model.
[0101] For example, after detecting and identifying suspicious backdoor samples, the identified suspicious backdoor samples are completely removed from the traffic session sample set to obtain a clean traffic session sample set free of backdoor contamination. Then, the traffic session sample set is used to retrain and optimize the parameters of the traffic input AI model in the power system, so that the model forgets the backdoor triggering rules and corrects the abnormal decision boundary. Finally, an updated AI model with eliminated backdoor risks, reliable classification results, and stronger anti-attack capabilities is obtained.
[0102] In this embodiment, by removing suspicious backdoor samples and retraining with clean data, the risk of model contamination can be eliminated from the data source, effectively improving the security and operational reliability of the power system AI model.
[0103] In an exemplary embodiment, a method for detecting suspicious backdoor samples in an AI model in a power system includes: acquiring raw network traffic data corresponding to a traffic-input type AI model in the power system; performing timestamp unification, protocol field parsing, invalid packet filtering, duplicate packet removal, missing field marking, and abnormal code correction operations on the raw network traffic data to obtain preprocessed traffic data; arranging the preprocessed traffic data in ascending order by timestamp, and performing preset processing on the source address, destination address, port information, protocol type, device identifier, and packet fields of the preprocessed traffic data to obtain processed data; based on the source address, destination address, port information, and protocol type of the processed data, initially merging normalized data belonging to the same communication link or the same communication direction to obtain a first candidate communication set; performing time merging on the first candidate communication set based on a preset time window threshold to obtain a second candidate communication set; and correcting the second candidate communication set based on business association rules to obtain a traffic session sample set containing interaction boundaries, temporal relationships, and context dependencies. For each traffic session sample, a preset perturbation processing method is used to perturb the traffic session sample, resulting in a perturbation sample corresponding to the traffic session sample. The preset perturbation processing method is at least one of the following: non-critical field masking, slight jitter of time features, limited adjustment of auxiliary statistical features, equivalent replacement of non-critical context, and limited rearrangement of non-core packets. Feature extraction is performed on the traffic session sample and the corresponding perturbation sample to obtain the traffic features and perturbation features of the traffic session sample, including: feature extraction of the traffic session sample to obtain traffic features including protocol field features, time sequence direction features, statistical features, and context features; and feature extraction of the perturbation sample to obtain perturbation features including perturbation protocol field features, perturbation time sequence direction features, perturbation statistical features, and perturbation context features. Feature extraction is performed on the flow session samples and corresponding disturbance samples to obtain the flow features and disturbance features of the flow session samples. For each flow session sample, the flow features and disturbance features of the flow session sample are input into the flow input type AI model in the power system to obtain the flow output and disturbance output of the flow session sample. For each flow session sample in the flow session sample set, based on the flow output and disturbance output of the flow session sample, the prediction category change rate, uncertainty change amount, and response consistency score are calculated. Based on the prediction category change rate, uncertainty change amount, and response consistency score, a comprehensive anomaly score is calculated using a comprehensive anomaly scoring function. Based on the comprehensive anomaly scores of each flow session sample in the flow session sample set, flow session samples with anomalies are screened out from the flow session sample set and are designated as suspected backdoor samples.Suspicious backdoor samples are removed from the traffic session sample set to obtain the removed traffic session sample set; the traffic input AI model in the power system is retrained based on the removed traffic session sample set to obtain the updated traffic input AI model in the power system.
[0104] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0105] In one exemplary embodiment, such as Figure 3 As shown, a device for detecting suspicious backdoor samples in AI models of power systems is provided, comprising: an acquisition module 301, a recombination module 302, a processing module 303, an output module 304, and a screening module 305, wherein:
[0106] The acquisition module is used to acquire the raw network flow data corresponding to the flow input type AI model in the power system, and to preprocess the raw network flow data to obtain preprocessed flow data.
[0107] The reorganization module is used to merge and reorganize preprocessed traffic data into a traffic session sample set that includes interaction boundaries, temporal relationships and contextual dependencies. The traffic session sample set includes multiple traffic session samples.
[0108] The processing module is used to perform various perturbation processing on each traffic session sample to obtain multiple perturbation samples corresponding to the traffic session sample; and to extract features from the traffic session sample and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session sample.
[0109] The output module is used to input the flow characteristics and disturbance characteristics of each flow session sample into the flow input type AI model in the power system, respectively, to obtain the flow output and disturbance output of the flow session sample.
[0110] The filtering module is used to score the traffic session sample based on its own traffic output and disturbance output for each traffic session sample, and obtain a comprehensive anomaly score for the traffic session sample. Based on the comprehensive anomaly score of each traffic session sample in the traffic session sample set, the module filters out the traffic session samples with anomalies from the traffic session sample set and uses the traffic session samples with anomalies as suspicious backdoor samples.
[0111] In one exemplary embodiment, the reorganization module is further configured to:
[0112] The preprocessed traffic data is sorted in ascending order by timestamp, and the source address, destination address, port information, protocol type, device identifier, and message fields of the preprocessed traffic data are pre-processed to obtain processed data. Based on the source address, destination address, port information, and protocol type of the processed data, normalized data belonging to the same communication link or the same communication direction are initially merged to obtain a first candidate communication set. The first candidate communication set is then time-merged based on a preset time window threshold to obtain a second candidate communication set. Based on business association rules, the second candidate communication set is corrected to obtain a traffic session sample set that includes interaction boundaries, temporal relationships, and context dependencies.
[0113] In one exemplary embodiment, the acquisition module is further configured to:
[0114] The raw network traffic data is subjected to timestamp unification, protocol field parsing, invalid packet filtering, duplicate packet removal, missing field marking, and abnormal encoding correction operations to obtain preprocessed traffic data.
[0115] In one exemplary embodiment, the processing module is further configured to:
[0116] A preset perturbation processing method is used to perturb the traffic session samples to obtain the perturbation samples corresponding to the traffic session samples. The preset perturbation processing method is at least one of the following: non-critical field masking, slight jitter of time features, limited adjustment of auxiliary statistical features, equivalent replacement of non-critical context, and limited rearrangement of non-core packets. Feature extraction is performed on the traffic session samples and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session samples, including: feature extraction of the traffic session samples to obtain traffic features including protocol field features, time sequence direction features, statistical features, and context features; feature extraction of the perturbation samples to obtain perturbation features including perturbation protocol field features, perturbation time sequence direction features, perturbation statistical features, and perturbation context features.
[0117] In one exemplary embodiment, the filtering module is further configured to:
[0118] For each traffic session sample in the traffic session sample set, based on the traffic output and disturbance output of the traffic session sample, calculate the predicted category change rate, uncertainty change amount, and response consistency score; based on the predicted category change rate, uncertainty change amount, and response consistency score, calculate the comprehensive anomaly score through the comprehensive anomaly scoring function.
[0119] In one exemplary embodiment, the filtering module is further configured to:
[0120] Suspicious backdoor samples are removed from the traffic session sample set to obtain the removed traffic session sample set; the traffic input AI model in the power system is retrained based on the removed traffic session sample set to obtain the updated traffic input AI model in the power system.
[0121] The modules in the suspected backdoor sample detection device of the AI model in the aforementioned power system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0122] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores raw network traffic data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a method for detecting suspicious backdoor samples in an AI model within a power system.
[0123] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0124] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0125] Obtain the raw network flow data corresponding to the flow input type AI model in the power system, and preprocess the raw network flow data to obtain preprocessed flow data;
[0126] The preprocessed traffic data is merged and reorganized into a traffic session sample set containing interaction boundaries, temporal relationships and context dependencies. The traffic session sample set includes multiple traffic session samples.
[0127] For each traffic session sample, multiple perturbation processes are applied to the traffic session sample to obtain multiple perturbation samples corresponding to the traffic session sample; feature extraction is performed on the traffic session sample and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session sample.
[0128] For each flow session sample, the flow characteristics and disturbance characteristics of the flow session sample are input into the flow input type AI model in the power system to obtain the flow output and disturbance output of the flow session sample.
[0129] For each traffic session sample, an anomaly score is performed on the traffic session sample based on its own traffic output and disturbance output to obtain a comprehensive anomaly score. Based on the comprehensive anomaly score of each traffic session sample in the traffic session sample set, traffic session samples with anomalies are selected from the traffic session sample set and are regarded as suspicious backdoor samples.
[0130] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0131] The preprocessed traffic data is sorted in ascending order by timestamp, and the source address, destination address, port information, protocol type, device identifier, and message fields of the preprocessed traffic data are pre-processed to obtain processed data. Based on the source address, destination address, port information, and protocol type of the processed data, normalized data belonging to the same communication link or the same communication direction are initially merged to obtain a first candidate communication set. The first candidate communication set is then time-merged based on a preset time window threshold to obtain a second candidate communication set. Based on business association rules, the second candidate communication set is corrected to obtain a traffic session sample set that includes interaction boundaries, temporal relationships, and context dependencies.
[0132] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0133] The raw network traffic data is subjected to timestamp unification, protocol field parsing, invalid packet filtering, duplicate packet removal, missing field marking, and abnormal encoding correction operations to obtain preprocessed traffic data.
[0134] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0135] A preset perturbation processing method is used to perturb the traffic session samples to obtain the perturbation samples corresponding to the traffic session samples. The preset perturbation processing method is at least one of the following: non-critical field masking, slight jitter of time features, limited adjustment of auxiliary statistical features, equivalent replacement of non-critical context, and limited rearrangement of non-core packets. Feature extraction is performed on the traffic session samples and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session samples, including: feature extraction of the traffic session samples to obtain traffic features including protocol field features, time sequence direction features, statistical features, and context features; feature extraction of the perturbation samples to obtain perturbation features including perturbation protocol field features, perturbation time sequence direction features, perturbation statistical features, and perturbation context features.
[0136] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0137] For each traffic session sample in the traffic session sample set, based on the traffic output and disturbance output of the traffic session sample, calculate the predicted category change rate, uncertainty change amount, and response consistency score; based on the predicted category change rate, uncertainty change amount, and response consistency score, calculate the comprehensive anomaly score through the comprehensive anomaly scoring function.
[0138] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0139] Suspicious backdoor samples are removed from the traffic session sample set to obtain the removed traffic session sample set; the traffic input AI model in the power system is retrained based on the removed traffic session sample set to obtain the updated traffic input AI model in the power system.
[0140] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0141] Obtain the raw network flow data corresponding to the flow input type AI model in the power system, and preprocess the raw network flow data to obtain preprocessed flow data;
[0142] The preprocessed traffic data is merged and reorganized into a traffic session sample set containing interaction boundaries, temporal relationships and context dependencies. The traffic session sample set includes multiple traffic session samples.
[0143] For each traffic session sample, multiple perturbation processes are applied to the traffic session sample to obtain multiple perturbation samples corresponding to the traffic session sample; feature extraction is performed on the traffic session sample and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session sample.
[0144] For each flow session sample, the flow characteristics and disturbance characteristics of the flow session sample are input into the flow input type AI model in the power system to obtain the flow output and disturbance output of the flow session sample.
[0145] For each traffic session sample, an anomaly score is performed on the traffic session sample based on its own traffic output and disturbance output to obtain a comprehensive anomaly score. Based on the comprehensive anomaly score of each traffic session sample in the traffic session sample set, traffic session samples with anomalies are selected from the traffic session sample set and are regarded as suspicious backdoor samples.
[0146] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0147] The preprocessed traffic data is sorted in ascending order by timestamp, and the source address, destination address, port information, protocol type, device identifier, and message fields of the preprocessed traffic data are pre-processed to obtain processed data. Based on the source address, destination address, port information, and protocol type of the processed data, normalized data belonging to the same communication link or the same communication direction are initially merged to obtain a first candidate communication set. The first candidate communication set is then time-merged based on a preset time window threshold to obtain a second candidate communication set. Based on business association rules, the second candidate communication set is corrected to obtain a traffic session sample set that includes interaction boundaries, temporal relationships, and context dependencies.
[0148] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0149] The raw network traffic data is subjected to timestamp unification, protocol field parsing, invalid packet filtering, duplicate packet removal, missing field marking, and abnormal encoding correction operations to obtain preprocessed traffic data.
[0150] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0151] A preset perturbation processing method is used to perturb the traffic session samples to obtain the perturbation samples corresponding to the traffic session samples. The preset perturbation processing method is at least one of the following: non-critical field masking, slight jitter of time features, limited adjustment of auxiliary statistical features, equivalent replacement of non-critical context, and limited rearrangement of non-core packets. Feature extraction is performed on the traffic session samples and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session samples, including: feature extraction of the traffic session samples to obtain traffic features including protocol field features, time sequence direction features, statistical features, and context features; feature extraction of the perturbation samples to obtain perturbation features including perturbation protocol field features, perturbation time sequence direction features, perturbation statistical features, and perturbation context features.
[0152] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0153] For each traffic session sample in the traffic session sample set, based on the traffic output and disturbance output of the traffic session sample, calculate the predicted category change rate, uncertainty change amount, and response consistency score; based on the predicted category change rate, uncertainty change amount, and response consistency score, calculate the comprehensive anomaly score through the comprehensive anomaly scoring function.
[0154] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0155] Suspicious backdoor samples are removed from the traffic session sample set to obtain the removed traffic session sample set; the traffic input AI model in the power system is retrained based on the removed traffic session sample set to obtain the updated traffic input AI model in the power system.
[0156] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0157] Obtain the raw network flow data corresponding to the flow input type AI model in the power system, and preprocess the raw network flow data to obtain preprocessed flow data;
[0158] The preprocessed traffic data is merged and reorganized into a traffic session sample set containing interaction boundaries, temporal relationships and context dependencies. The traffic session sample set includes multiple traffic session samples.
[0159] For each traffic session sample, multiple perturbation processes are applied to the traffic session sample to obtain multiple perturbation samples corresponding to the traffic session sample; feature extraction is performed on the traffic session sample and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session sample.
[0160] For each flow session sample, the flow characteristics and disturbance characteristics of the flow session sample are input into the flow input type AI model in the power system to obtain the flow output and disturbance output of the flow session sample.
[0161] For each traffic session sample, an anomaly score is performed on the traffic session sample based on its own traffic output and disturbance output to obtain a comprehensive anomaly score. Based on the comprehensive anomaly score of each traffic session sample in the traffic session sample set, traffic session samples with anomalies are selected from the traffic session sample set and are regarded as suspicious backdoor samples.
[0162] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0163] The preprocessed traffic data is sorted in ascending order by timestamp, and the source address, destination address, port information, protocol type, device identifier, and message fields of the preprocessed traffic data are pre-processed to obtain processed data. Based on the source address, destination address, port information, and protocol type of the processed data, normalized data belonging to the same communication link or the same communication direction are initially merged to obtain a first candidate communication set. The first candidate communication set is then time-merged based on a preset time window threshold to obtain a second candidate communication set. Based on business association rules, the second candidate communication set is corrected to obtain a traffic session sample set that includes interaction boundaries, temporal relationships, and context dependencies.
[0164] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0165] The raw network traffic data is subjected to timestamp unification, protocol field parsing, invalid packet filtering, duplicate packet removal, missing field marking, and abnormal encoding correction operations to obtain preprocessed traffic data.
[0166] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0167] A preset perturbation processing method is used to perturb the traffic session samples to obtain the perturbation samples corresponding to the traffic session samples. The preset perturbation processing method is at least one of the following: non-critical field masking, slight jitter of time features, limited adjustment of auxiliary statistical features, equivalent replacement of non-critical context, and limited rearrangement of non-core packets. Feature extraction is performed on the traffic session samples and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session samples, including: feature extraction of the traffic session samples to obtain traffic features including protocol field features, time sequence direction features, statistical features, and context features; feature extraction of the perturbation samples to obtain perturbation features including perturbation protocol field features, perturbation time sequence direction features, perturbation statistical features, and perturbation context features.
[0168] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0169] For each traffic session sample in the traffic session sample set, based on the traffic output and disturbance output of the traffic session sample, calculate the predicted category change rate, uncertainty change amount, and response consistency score; based on the predicted category change rate, uncertainty change amount, and response consistency score, calculate the comprehensive anomaly score through the comprehensive anomaly scoring function.
[0170] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0171] Suspicious backdoor samples are removed from the traffic session sample set to obtain the removed traffic session sample set; the traffic input AI model in the power system is retrained based on the removed traffic session sample set to obtain the updated traffic input AI model in the power system.
[0172] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0173] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0174] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for detecting suspicious backdoor samples in AI models of power systems, characterized in that, The method includes: Obtain the original network traffic data corresponding to the traffic input type AI model in the power system, and preprocess the original network traffic data to obtain preprocessed traffic data; The preprocessed traffic data is merged and reorganized into a traffic session sample set containing interaction boundaries, temporal relationships, and context dependencies. The traffic session sample set includes multiple traffic session samples. For each traffic session sample, multiple perturbation processes are applied to the traffic session sample to obtain multiple perturbation samples corresponding to the traffic session sample; feature extraction is performed on the traffic session sample and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session sample. For each flow session sample, the flow characteristics and disturbance characteristics of the flow session sample are respectively input into the flow input type AI model in the power system to obtain the flow output and disturbance output of the flow session sample; For each traffic session sample, an anomaly score is performed on the traffic session sample based on its own traffic output and disturbance output to obtain a comprehensive anomaly score. Based on the comprehensive anomaly scores of each traffic session sample in the traffic session sample set, traffic session samples with anomalies are selected from the traffic session sample set and are regarded as suspicious backdoor samples.
2. The method according to claim 1, characterized in that, The step of merging and reorganizing the preprocessed traffic data into a traffic session sample set containing interaction boundaries, temporal relationships, and context dependencies includes: The preprocessed traffic data is sorted in ascending order by timestamp, and the source address, destination address, port information, protocol type, device identifier, and message fields of the preprocessed traffic data are pre-processed to obtain processed data. Based on the source address, destination address, port information, and protocol type of the processed data, normalized data belonging to the same communication link or the same communication direction are initially merged to obtain the first candidate communication set; The first candidate communication set is time-merged based on a preset time window threshold to obtain the second candidate communication set; Based on business association rules, the second candidate communication set is modified to obtain a traffic session sample set that includes interaction boundaries, timing relationships, and context dependencies.
3. The method according to claim 1, characterized in that, The preprocessing of the original network traffic data to obtain preprocessed traffic data includes: The original network traffic data is subjected to timestamp unification, protocol field parsing, invalid packet filtering, duplicate packet removal, missing field marking, and abnormal code correction operations to obtain preprocessed traffic data.
4. The method according to claim 1, characterized in that, The perturbation process of the traffic session sample to obtain the perturbation sample corresponding to the traffic session sample includes: The traffic session sample is perturbed using a preset perturbation processing method to obtain the perturbed sample corresponding to the traffic session sample. The preset perturbation processing method is at least one of the following: non-critical field masking, slight jitter of time features, limited adjustment of auxiliary statistical features, equivalent replacement of non-critical context, and limited rearrangement of non-core packets. The step of extracting features from the traffic session samples and corresponding disturbance samples to obtain the traffic features and disturbance features of the traffic session samples includes: Feature extraction is performed on the traffic session samples to obtain traffic features including protocol field features, timing direction features, statistical features, and context features; The perturbation sample is subjected to feature extraction to obtain perturbation features including perturbation protocol field features, perturbation temporal direction features, perturbation statistical features, and perturbation context features.
5. The method according to claim 1, characterized in that, Based on the traffic output and disturbance output of each traffic session sample, an anomaly score is performed on the traffic session sample to obtain a comprehensive anomaly score for the traffic session sample, including: For each traffic session sample in the traffic session sample set, based on the traffic output and the perturbation output of the traffic session sample, calculate the prediction category change rate, uncertainty change amount and response consistency score; Based on the predicted category change rate, uncertainty change amount, and response consistency score, a comprehensive anomaly score is calculated using a comprehensive anomaly scoring function.
6. The method according to claim 1, characterized in that, The method further includes: The suspected backdoor samples are removed or isolated from the traffic session sample set to obtain a processed traffic session sample set; the traffic input AI model in the power system is retrained based on the removed traffic session sample set to obtain an updated traffic input AI model in the power system.
7. A device for detecting suspicious backdoor samples in an AI model of a power system, characterized in that, The device includes: The acquisition module is used to acquire the original network traffic data corresponding to the traffic input type AI model in the power system, and to preprocess the original network traffic data to obtain preprocessed traffic data. The reorganization module is used to merge and reorganize the preprocessed traffic data into a traffic session sample set containing interaction boundaries, temporal relationships and context dependencies, wherein the traffic session sample set includes multiple traffic session samples; The processing module is used to perform various perturbation processes on each traffic session sample to obtain multiple perturbation samples corresponding to the traffic session sample; and to extract features from the traffic session sample and the corresponding perturbation samples to obtain the traffic features and perturbation features of the traffic session sample. The output module is used to input the flow characteristics and disturbance characteristics of each flow session sample into the flow input type AI model in the power system to obtain the flow output and disturbance output of the flow session sample. The filtering module is used to perform anomaly scoring on each traffic session sample based on its own traffic output and disturbance output, to obtain a comprehensive anomaly score for the traffic session sample, and to filter out traffic session samples with anomalies from the traffic session sample set based on the comprehensive anomaly scores of each traffic session sample in the traffic session sample set, and to designate the traffic session samples with anomalies as suspicious backdoor samples.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.