Terminal data leakage event prediction method and system based on horizontal federated learning

Through a method based on horizontal federated learning, the convolutional neural network and the FedAvg algorithm are used to predict terminal data leakage events, combined with the isolation forest algorithm, to solve the security and privacy issues of data leakage event prediction in the existing technology, and achieve efficient, Accurate data breach prediction and early warning.

CN118468988BActive Publication Date: 2024-10-08ZHEJIANG UNIV
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202410910612.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-08
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

Existing technology is difficult to achieve security, privacy protection and accurate prediction in predicting terminal data leakage events. Traditional methods can only prevent some data theft behaviors with obvious characteristics, and lack effective prediction of most potential leakage events.

Method used

Using a method based on horizontal federated learning, supervised learning training of the initial shared model is performed through a convolutional neural network, and the FedAvg federated averaging algorithm is used for distribution and aggregation of model parameters, and the isolation forest algorithm is used on participating terminals for unsupervised learning. Finally, a usable data leakage prediction model is obtained through multiple rounds of training, aggregation and optimization.

Benefits of technology

It achieves security, privacy protection, and accurate prediction of terminal data leakage events, and can effectively identify and warn potential data leakage events, avoid data privacy issues, and improve prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118468988B_ABST
    Figure CN118468988B_ABST
Patent Text Reader

Abstract

The present invention discloses a terminal data leakage event prediction method and system based on horizontal federated learning, including: marking the historical behavior event data of participating terminals, training the initial shared model and sending the model to the participating terminals; the participating terminals collect their own behavior data and perform data preprocessing, and import these data into the initial shared model for local training; the participating terminals encrypt the model update parameters and send them to the central server, and the central server aggregates the model update parameters of the participating terminals; the aggregated updated model is sent to the participating terminals for training until the model reaches a convergence state; data leakage prediction is enabled, and the data leakage events predicted by the participating terminals are alarmed and handled; the data leakage event prediction effect is evaluated; the early warning terminal sends the quantitative evaluation data to the central server for model parameter and convergence condition optimization. The present invention can realize the continuous optimization and automated prediction of terminal data leakage events.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of terminal data leakage event prediction, and in particular to a terminal data leakage event prediction method and system based on horizontal federated learning. Background Art

[0002] Federated Learning (FL) was first proposed by Google and used to solve the problem of predicting the next word when typing on a personal mobile terminal keyboard. Google applies federated learning to the Gboard keyboard, combines user terminal devices, uses the user's local data to train the local model, and then aggregates and distributes the model parameters during the training process, ultimately achieving the goal of accurately predicting the next word. Federated learning meets the needs of user privacy protection and data security, and the characteristics of distributed learning make it very suitable for data security protection scenarios. Traditional rule-based data leakage detection methods can only defend against some data theft behaviors with obvious characteristics, and most rely on boundary protection measures to resist attacks. Summary of the invention

[0003] In order to overcome the shortcomings of the prior art, the present invention provides a terminal data leakage event prediction method and system based on horizontal federated learning; it is capable of utilizing federated learning, machine learning related technologies and means to realize the training of data leakage prediction models locally on the terminal, and aggregating the model parameters of all participating terminals in the training through a central server to form a usable global model, and sending the global model to each terminal for prediction of data leakage events; thereby, there is no need for the participating terminals to send their own data to the central server for unified model training, thus avoiding data privacy issues during the training process.

[0004] The specific technical solutions adopted are as follows:

[0005] A terminal data leakage event prediction method based on horizontal federated learning, including:

[0006] Obtain historical behavior event data of participating terminals, perform data labeling operations on the historical behavior event data of participating terminals, and obtain labeled data;

[0007] The central server uses the labeled data to train the initial shared model, and sends the initial shared model of the data leakage incident to each participating terminal for local training through horizontal federated learning;

[0008] In the local training phase, each participating terminal obtains and preprocesses its own behavior data and uses this data as training data for the initial shared model;

[0009] After each participating terminal is trained, the model parameters are updated, the model update parameters are encrypted and sent to the central server for model parameter aggregation;

[0010] The model updated through aggregation is then sent to each participating terminal for training until the model reaches a converged state;

[0011] When the model converges, data leakage prediction is enabled, and alarms are issued for data leakage incidents predicted by participating terminals.

[0012] Further, the historical behavior event data of the participating terminal includes historical security event log data of the participating terminal, historical application event log data of the participating terminal, historical network connection log data of the participating terminal, and historical response event log data of terminal security software installed by the participating terminal;

[0013] The historical security event log data of the participating terminals includes interactive login security logs, user management security logs, and file operation security logs recorded by the terminals;

[0014] The historical application event log data of the participating terminals includes application installation / uninstallation logs and application Web access logs;

[0015] The historical network connection log data of the participating terminals, including network protocol information, network port information, and network IP / domain name information;

[0016] The historical response event log data of the terminal security software installed on the participating terminals includes the security alarm type, the characteristics that trigger the security alarm, and the number of alarms.

[0017] Furthermore, the historical behavior event data of the participating terminals are labeled to convert the unlabeled data into labeled data; the historical behavior event data is used as the input parameter, and when the input parameter is x, the corresponding event label g is obtained, and d1 is the label conversion function, which has the following expression:

[0018] ;

[0019] Among them, x m is the input parameter of the mth data, g m is the event label of the mth data;

[0020] Through function conversion, each unlabeled event data is converted into an array containing the original event data and its label. The event label g of the mth data m When the value is 0, it indicates a non-leakage event, and when the value is 1, it indicates a leakage event;

[0021] The labeled historical behavior event data of participating terminals are feature extracted and standardized to generate training data; the first 70% of the training data set is used as the training data set, and the last 30% of the data set is used as the validation data set; the initial shared model is trained for binary classification using a convolutional neural network, and the training effect of the convolutional neural network is supervised by the mean square error loss function MSE, which has the following expression:

[0022] ;

[0023] Where n is the number of samples, is the predicted value of the i-th sample, y i is the true value of the i-th sample; and the Adam optimizer is used to optimize the model parameters. When the verification accuracy of the verification data set is 60%, the initial shared model is obtained.

[0024] Furthermore, the self-behavior data is network traffic data, file access behavior data and application access behavior data generated by the participating terminals.

[0025] Furthermore, each participating terminal obtains and preprocesses its own behavior data and uses these data as training data for the initial sharing model, including: cleaning and label encoding the network traffic data, file access behavior data, and application access behavior data generated by the participating terminal. The label encoding conversion function k is expressed as:

[0026] ;

[0027] Among them, c i Indicates the IP / domain name, access port, network protocol type, network data packet size, network data file type, access source, absolute path of the accessed file, access command, accessed file type, application name, absolute path of the application, application permissions, application installation time or application running time, I i Represents the converted Label value, and Z represents an integer;

[0028] The participating terminal uses the Label-encoded data as training data and uses the isolation forest algorithm to train the initial shared model.

[0029] Furthermore, when the participating terminal verifies the current initial shared model through the verification data set and obtains a verification accuracy of 80%, the model update parameters of the tree structure, segmentation features, and segmentation values ​​of the training model at this time are sent to the central server. The sending process uses secret shared secure multi-party computing to achieve secure transmission. Suppose the model parameter that needs to be updated by the first participating terminal is T1, and t is obtained by secret share division. 11 ,t 12 ...t1m , assuming that there are J participating terminals in total, when the central server receives J ≥ 3 secret shares from participating terminals, it performs secret reorganization through the following function to obtain the original model parameters that need to be updated;

[0030] T = f{(t 11 ,t 12 ...t 1m ),(t 21 ,t 22 ...t 2m )...(t J1 ,t J2 ...t Jm )};

[0031] Among them, T represents the original model parameters that need to be updated, t Jm represents the mth model parameter of the Jth participating terminal, and f{} represents the recombination function.

[0032] Furthermore, the central server aggregates the model update parameters of the participating terminals using the federated average algorithm. There are J participating terminals in total, and the training data set of each participating terminal j is I j , assuming the size of the training data set is p j , we get the global training data set P obtained by combining all participating terminals, which has the following expression:

[0033] ;

[0034] The initial shared model is represented as w, and the model update parameters of each participating terminal j are w1,w2...w J , the training round is t, and the complete model w after the last aggregation update is obtained by weighted averaging t+1 , the expression is:

[0035] .

[0036] Furthermore, the central server aggregates the updated model w through the convergence judgment function Q. t+1 Make a judgment on the degree of convergence;

[0037] When Q(w t+1 ) = 0, the model has not reached convergence, so let w = w t+1 , repeat the model training and aggregation process;

[0038] When Q(w t+1 ) = 1, the model reaches a convergence state; when the model convergence degree reaches the expected level, the central server will t+1The parameters are sent to each participating terminal, notifying the participating terminal to stop model training and use the model w t+1 Predict data breach incidents.

[0039] Furthermore, the data leakage event prediction is specifically as follows: the participating terminals use the trained model w t+1 Real-time detection of local network traffic data, file access behavior data, and application access behavior data; the detection function is S, and the data item to be detected is c, then:

[0040] When S(w t+1 ,c)=1, c is an isolated point, i.e., an abnormal event data item;

[0041] When S(w t+1 ,c)=0, c is a non-isolated point, that is, a normal event data item;

[0042] When the data item c to be detected is an isolated point, the associated behavior event of the data item c to be detected is reported to the early warning end.

[0043] A terminal data leakage event prediction system based on horizontal federated learning for implementing the above method includes:

[0044] An acquisition module, used to acquire historical behavior event data of participating terminals and real-time behavior event data of participating terminals;

[0045] A model training module, used to train the initial shared model and transfer model parameters between the central server and participating terminals;

[0046] Model encryption and sending module, used to encrypt and send the initial shared model and model update parameters;

[0047] Model aggregation module, used to aggregate model update parameters of each participating terminal;

[0048] A judgment module, used to make a convergence judgment on the aggregated model parameters and to judge whether the real-time behavior event in the participating terminal is a data leakage event;

[0049] An alarm handling module is used to handle alarms for data leakage events predicted by participating terminals;

[0050] A prediction effect evaluation module is used to evaluate the prediction effect of the data leakage event prediction model on the participating terminals and to quantify the prediction effect;

[0051] The model parameter optimization module is used to optimize the model training parameters based on the quantitative data of the prediction effect evaluation.

[0052] Compared with the prior art, the present invention has the following beneficial effects: the terminal data leakage event prediction method provided by the present invention uses a convolutional neural network to perform supervised learning training of the initial shared model, distributes and aggregates model parameters through the FedAvg federated average algorithm, and uses the isolation forest algorithm on the participating terminals for unsupervised learning, and finally obtains a usable data leakage prediction model through multiple rounds of training, aggregation, and optimization. The method can achieve secure, privacy-protecting, and accurate prediction of terminal data leakage events. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0054] Figure 1 This is a flow chart of a terminal data leakage event prediction method based on horizontal federated learning in one embodiment of the present invention;

[0055] Figure 2 The present invention is a block diagram of a terminal data leakage event prediction system based on horizontal federated learning in one embodiment of the present invention. DETAILED DESCRIPTION

[0056] The present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of no conflict, the various embodiments or technical features described below can be arbitrarily combined to form a new embodiment.

[0057] Example 1

[0058] The present invention provides a terminal data leakage event prediction method and system based on horizontal federated learning, comprising the following steps:

[0059] Obtain historical behavior event data of participating terminals, perform data labeling operations on the historical behavior event data of participating terminals, and obtain labeled data;

[0060] The central server uses the labeled data to train the initial shared model, and sends the initial shared model of the data leakage incident to each participating terminal for local training through horizontal federated learning;

[0061] In the local training phase, each participating terminal obtains and preprocesses its own behavior data and uses this data as training data for the initial shared model;

[0062] After each participating terminal is trained, the model parameters are updated, the model update parameters are encrypted and sent to the central server for model parameter aggregation;

[0063] The model updated through aggregation is then sent to each participating terminal for training until the model reaches a converged state;

[0064] When the model converges, data leakage prediction is enabled, and alarms are issued for data leakage incidents predicted by participating terminals.

[0065] Specifically, the prediction mechanism of the terminal data leakage event is realized by a federated learning model. The central server obtains the initial shared model through labeled data training. The initial shared model of the data leakage event is decentralized to each terminal for local training through federated learning. The terminal obtains its own behavior data for preprocessing as the training data of the model, avoiding the data privacy problem caused by uploading the data to the central server for training. The updated model parameters of each terminal after training are encrypted and sent to the central server for model parameter aggregation. The aggregated and updated model is then sent to the terminal for retraining until the convergence of the model reaches the preset value. After the model training achieves the expected effect, the prediction of data leakage events and the related event alarm handling mechanism can be performed. When the model training is performed locally on the terminal, the network traffic data, file access behavior data, and application access behavior data generated by the terminal are used as training data, and the model training is performed using a machine learning algorithm. At the same time, the data leakage event prediction effect evaluation mechanism of the early warning terminal is used for evaluation, and the information is fed back to the central server for continuous tuning of the model parameters after the evaluation.

[0066] The central server needs to obtain the historical behavior event data of the participating terminals before performing the initial shared model training. The historical behavior event data of the participating terminals obtained includes the following:

[0067] Participating terminal historical security event log data, including but not limited to interactive login security logs, user management security logs, file operation security logs, etc. recorded by the terminal;

[0068] Historical application event log data of participating terminals, including but not limited to application installation / uninstallation logs, application web access logs, etc.;

[0069] Historical network connection log data of participating terminals, including but not limited to network protocol information, network port information, network IP / domain name information, etc.;

[0070] The historical response event log data of the terminal security software installed on the participating terminals, including but not limited to the type of security alert, the characteristics that triggered the security alert, the number of alerts, etc.

[0071] The historical behavior event data of participating terminals needs to be manually labeled or labeled by other means to convert unlabeled data into labeled data. There is a function d1, with historical behavior event data as input parameters. When the input parameter is x, the corresponding event label g is obtained, which has the following expression:

[0072] ;

[0073] Among them, x m is the input parameter of the mth data, g m is the event label of the mth data;

[0074] That is, through the function conversion, each unlabeled event data is converted into an array containing the original event data and its label, and the event label g of the mth data m When the value is 0, it indicates a non-leakage event, and when the value is 1, it indicates a leakage event; here m refers to a certain piece of data.

[0075] Among them, the historical behavior event data of participating terminals with labels are feature extracted and standardized to generate usable training data, and the convolutional neural network (CNN) is used for binary classification training, where 0.0~0.7*[x m , g m ] That is, the first 70% of the data set in sequence is used as the training data set, 0.7~1.0*[x m ,g m ] That is, the last 30% of the data set in order is used as the validation data set, and the training data set and the validation data set are mutually exclusive. The training effect of the convolutional neural network is supervised by the mean square error loss function MSE:

[0076]

[0077] Where n is the number of samples (i.e. validation data set), is the predicted value of the i-th sample, y i is the true value of the i-th sample; and the Adam optimizer is used to optimize the model parameters. When a verification accuracy of 60% is obtained in the verification data set, the initial shared model w is obtained.

[0078] Furthermore, the central server and the participating terminals perform joint learning based on the federated averaging algorithm FedAvg, and the central server sends the initial shared model w to each participating terminal for training.

[0079] Participating terminals need to obtain local real-time network traffic data, file access behavior data, and application access behavior data as training data for the shared model. The collected data items are as follows:

[0080] Network traffic data includes accessed IP / domain name, access port, network protocol type, network data packet size, and network data file type;

[0081] File access behavior data includes access source, absolute path of accessed file, access command, and accessed file type;

[0082] Application access behavior data includes application name, application absolute path, application permissions, application installation time, and application running time.

[0083] The collected network traffic data, file access behavior data, and application access behavior data are cleaned and Label encoded. There is a Label encoding conversion function k:

[0084]

[0085] In the formula, c i Indicates the unique value of any data item such as IP / domain name, access port, network protocol type, network data packet size, network data file type, access source, absolute path of accessed file, access command, accessed file type, application name, absolute path of application, application permission, application installation time, and application running time. i Indicates the converted Label value, I i Belongs to integers, and Z represents an integer.

[0086] The participating terminals use the Label-encoded data as training data, use the Isolation Forest algorithm to train the initial shared model, and use all labeled data sets [x m , g m ] is used as a validation dataset for model evaluation.

[0087] Preferably, when the participating terminal passes the verification data set [x m , g m ] When the current model reaches 80% verification accuracy, the model update parameters such as the tree structure, segmentation features, and segmentation values ​​of the training model are sent to the central server. The sending process uses secret-sharing secure multi-party computing (SMPC) to achieve secure transmission. Suppose the model parameter that needs to be updated by the first participating terminal is T1, and the secret share is divided to obtain (t 11 ,t 12 ...t 1m ), assuming that there are J participating terminals in total, when the central server receives enough (J ≥ 3) secret shares from participating terminals, it can use the function:

[0088] T = f{(t11 ,t 12 ...t 1m ),(t 21 ,t 22 ...t 2m )...(t J1 ,t J2 ...t Jm )}

[0089] In the formula, T represents the original model parameters that need to be updated, t Jm represents the mth model parameter of the Jth participating terminal, and f{} represents the reorganization function. The secret reorganization is performed to obtain the original model parameter that needs to be updated.

[0090] Then, the central server uses the federated average algorithm (FedAvg) to aggregate the model update parameters of the participating terminals. There are J participating terminals, and the training data set of each participating terminal j is I j , assuming the size of the training data set is p j , we can get the global training data set P obtained by all participating terminal combinations:

[0091]

[0092] According to the initial shared model w, let the model update parameters of each participating terminal be w1,w2...w J , the training round is t, and the complete model w after the last aggregation update can be obtained by weighted averaging t+1 :

[0093] .

[0094] The central server aggregates the model w t+1 To judge the degree of convergence, there exists a function Q:

[0095] When Q(w t+1 ) = 0,

[0096] It proves that the model has not reached the expected convergence. w = w t+1 , repeat the above training process,

[0097] When Q(w t+1 ) = 1,

[0098] It proves that the model has reached the expected convergence.

[0099] When the model converges to the expected level, the central server will aggregate the model parameters w t+1 Sent to each participating terminal to notify the participating terminal to stop model training and use the model to predict data leakage events.

[0100] The participating terminals use the trained model w t+1 Real-time detection of local network traffic data, file access behavior data, and application access behavior data, then there is a function S, and the data item to be detected is c, then there is

[0101] When S(w t+1 ,c) = 1,

[0102] Prove that c is an isolated point and an abnormal event data item.

[0103] When S(w t+1 ,c) = 0,

[0104] Prove that c is a non-isolated point and a normal event data item.

[0105] When the data item c to be detected is an isolated point, the c-related behavior event is reported to the early warning terminal.

[0106] The early warning end issues an alarm for data leakage incidents sent by participating terminals, and handles them automatically or with human assistance. The early warning end manually evaluates the frequency and accuracy of data leakage incidents, and generates quantitative data for the prediction effect evaluation under the current model parameters.

[0107] The early warning end sends the quantitative data of the prediction effect evaluation to the central server. The central server adjusts the convergence conditions and model parameters based on the data and conducts a new round of model training.

[0108] Example 2

[0109] like Figure 1 As shown, the terminal data leakage event prediction method based on horizontal federated learning provided by the present invention includes the following steps:

[0110] S1: Label the historical behavior event data of participating terminals;

[0111] S2: train the initial shared model;

[0112] S3: Send the trained initial shared model to participating terminals;

[0113] S4: Collect network traffic data, file access behavior data, application access behavior data and perform data preprocessing;

[0114] S5: Import the collected data into the shared model for local training;

[0115] S6: encrypt the updated model after training and send it to the central server;

[0116] S7: Aggregate the model update parameters of each participating terminal;

[0117] S8: Determine whether the model convergence meets the preset conditions;

[0118] S9: Enable data leakage prediction;

[0119] S10: Send the predicted data leakage event to the early warning terminal;

[0120] S11: Issue an alarm for the data leakage incident predicted by the participating terminals;

[0121] S12: Evaluate the prediction effect of the model;

[0122] S13: Feedback evaluation results and optimize model convergence conditions.

[0123] In one embodiment, the central server is a Linux host Z1 equipped with a high-performance computing graphics card. There are three participating terminals in total, which are used as work terminal A1, Web server A2, and database server A3. The systems are Windows 10, Ubuntu 18.04, and Centos 8.0 respectively.

[0124] The central server Z1 needs to obtain the historical behavior event data of the participating terminals before performing the initial shared model training. The examples of the historical behavior event data obtained are as follows:

[0125] A1{("root","login fail","2024-01-25 21:54:35"),("nuser","createsuccess","2024-02-01 09:47:02"),("nuser"," / home / test / config.json","356KB","read success","2024-02-01 10:00:01"),("nuser","fileApp.elf"," / home / fileApp","install success","2024-02-01 10:10:00"),("nuser","fileApp","connectsuccess","www.redomain.com","2024-02-01 10:10:00")...}

[0126] The data in the above sample data respectively represent: at 2024-01-25 21:54:35, the "root" user tried to log in but failed; at 2024-02-01 09:47:02, the "nuser" user was successfully created; the "nuser" user successfully read the " / home / test / config.json" file at 2024-02-0110:00:01, and the file size was "356KB"; the "nuser" user successfully installed the application named "fileApp.elf" to the " / home / fileApp" directory at "2024-02-01 10:10:00"; the "nuser" user successfully connected to "www.redomain.com" through the "fileApp" application at "2024-02-01 10:10:00".

[0127] Step S1 will manually label the historical behavior event data of the participating terminals. In this implementation example, it is necessary to convert the unlabeled data of historical behavior events obtained from the three participating terminals, namely, the work terminal A1, the Web server A2, and the database server A3, into labeled data. x1 corresponds to the unlabeled data set of historical behavior events of the work terminal A1, x2 corresponds to the unlabeled data set of historical behavior events of the Web server A2, and x3 corresponds to the unlabeled data set of historical behavior events of the database server A3, because:

[0128] ;

[0129] Then we have:

[0130] d1(x1) = d1({("root","login fail","2024-01-25 21:54:35"),("nuser","create success","2024-02-01 09:47:02"),("nuser"," / home / test / config.json","356KB","read success","2024-02-01 10:00:01"),("nuser","fileApp.elf"," / home / fileApp","install success","2024-02-01 10:10:00"),("nuser","fileApp","connectsuccess","www.redomain.com","2024-02-01 10:10:00")...}) = {[("root","loginfail","2024-01-25 21:54:35"),0],[("nuser","create success","2024-02-01 09:47:02"),0],[("nuser"," / home / test / config.json","356KB","read success","2024-02-0110:00:01"),1],[("nuser","fileApp.elf"," / home / fileApp","install success","2024-02-01 10:10:00"),1],[("nuser","fileApp","connect success","www.redomain.com","2024-02-01 10:10:00"),1]...}

[0131] d1(x2) =...

[0132] d1(x3) =...

[0133] All the tagged data d1(x m ) is as follows:

[0134] d1(x m ) = d1(x1)+d1(x2)+d1(x3);

[0135] The data in the above sample data d1(x1) represent: the event that the "root" user attempted to log in but failed at 2024-01-25 21:54:35 was marked as a non-data leakage event; the event that the "nuser" user was successfully created at 2024-02-01 09:47:02 was marked as a non-data leakage event; the event that the "nuser" user successfully read the " / home / test / config.json" file at 2024-02-01 10:00:01 was marked as a data leakage event; the event that the "nuser" user successfully installed the application named "fileApp.elf" to the " / home / fileApp" directory at "2024-02-01 10:10:00" was marked as a data leakage event; the event that the "nuser" user used the "fileApp" application at "2024-02-01 The event of a successful connection to "www.redomain.com" at 10:10:00 was marked as a data breach event.

[0136] Furthermore, step S2 extracts features from the historical behavior event data of the participating terminals with labels and performs normalization to generate usable training data, and uses a convolutional neural network (CNN) for binary classification training. In this embodiment, the training data set is 0.0~0.7*[x m , g m ]for:

[0137] 0.0~0.7*d1(x m ) = 0.0*(d1(x1)+d1(x2)+d1(x3))~0.7*(d1(x1)+d1(x2)+d1(x3))

[0138] Validation data set 0.7~1.0*[x m , g m ]for:

[0139] 0.7~1.0*d1(x m ) = 0.7*(d1(x1)+d1(x2)+d1(x3))~1.0*(d1(x1)+d1(x2)+d1(x3))

[0140] The training effect of the convolutional neural network is supervised by the mean square error loss function MSE:

[0141]

[0142] The model parameters are optimized by the Adam optimizer, and the initial shared model w of this embodiment is obtained after a verification accuracy of 60% is obtained in the verification data set.

[0143] Furthermore, in this embodiment, in step S3, the central server Z1 sends the trained initial shared model w to the three participating terminals, namely, the working terminal A1, the Web server A2, and the database server A3.

[0144] Furthermore, step S4 requires the participating terminals to obtain local real-time network traffic data, file access behavior data, and application access behavior data as training data for the shared model. In this embodiment, B1 is the real-time data set of the work terminal A1, B2 is the real-time data set of the Web server A2, and B3 is the real-time data set of the database server A3, then:

[0145] B1 = {("www.adomain1.com","443","https","5132KB","text / html",),("head"," / etc / passwd","head -n 20 / etc / passwd","passwd"),("testApp"," / tmp / testApp","user","2024-01-30 10:14:21","2024-01-31 12:33:12")...}

[0146] B2 = {("www.adomain1.com","8443","https","806KB","text / html"),("cat"," / var / www / web.config","cat / var / www / web.config","cfg"),("testApp2"," / tmp / testApp2","user","2022-10-01 22:45:37","2022-12-28 01:10:49")...}

[0147] B3 = {("192.168.56.123","1433","sql server","16752KB","text"),("explore.exe","C:\Users\test.docx","explore.exe C:\Users\test.docx","docx"),("testApp3","D:\testApp3","user","2023-08-24 14:32:00","2023-08-24 14:32:30")...}

[0148] The data in the above sample data represent:

[0149] B1: Work terminal A1 accesses https: / / www.adomain1.com:443 / , and the returned data type is text / html, and the size is 5132KB; Work terminal A1 executes the head -n 20 / etc / passwd command; Work terminal A1 has an application named testApp in the / tmp / testApp file directory, which has user permissions and was installed at 2024-01-30 10:14:21 and was run at 2024-01-31 12:33:12;

[0150] B2: Web server A2 accessed https: / / www.adomain1.com:8443 / , and the returned data type was text / html, with a size of 806KB; Web server A2 executed the cat / var / www / web.config command; Web server A2 had an application named testApp2 in the / tmp / testApp2 file directory, which had user permissions and was installed at 2022-10-01 22:45:37 and was run at 2022-12-28 01:10:49;

[0151] B3: Database server A3 accessed port 1433 of 192.168.56.123, the protocol type was sql server, the return data type was text, and the return data size was 16752KB; database server A3 executed the command explore.exe C:\Users\test.docx; database server A3 had a file named testApp3 in the D:\testApp3 directory, which had user permissions and was installed at 2023-08-24 14:32:00 and run at 2023-08-24 14:32:30.

[0152] In this embodiment, the Label encoding conversion function k is used to clean the B1, B2, and B3 data:

[0153] k(B1) = {(1,1,1,1,1),(1,1,1,1),(1,1,1,1,1)...}

[0154] k(B2) = {(1,2,1,2,1),(2,2,2,2),(2,2,1,2,2)...}

[0155] k(B3) = {(3,3,3,3,3),(3,3,3,3),(3,3,1,3,3)...}

[0156] Furthermore, step S5 combines k(B1), k(B2), and k(B3) as training data, uses the isolation forest algorithm to train the initial shared model w sent from the central server Z1, and uses d1(x1)+d1(x2)+d1(x3) as a verification data set.

[0157] Furthermore, in step S6, the model update parameters after the model w is trained to reach a verification accuracy of 80% are encrypted and sent to the central server Z1. In this embodiment, the split share (t 11 ,t 12 ...t 1m ), the split share of Web server A2 (t 21 ,t 22 ...t 2m ), the split share of database server A3 (t 31 ,t 32 ...t 3m ), use the function f to analyze, and get the updated model parameter T as:

[0158] T = f{(t 11 ,t 12 ...t 1m ),(t 21 ,t 22 ...t 2m ),(t 31 ,t 32 ...t 3m )}

[0159] Perform secret reorganization to obtain the original model parameters w1, w2, w3 that need to be updated.

[0160] In this example, in step S7, the central server Z1 uses the FedAvg algorithm to aggregate the model update parameters w1, w2, and w3 of the participating terminals A1, Web server A2, and database server A3. In this embodiment, there are three participating terminals, and the training data sets of each participating terminal are k(B1), k(B2), and k(B3), and the sizes of the training data sets are p1, p2, and p3, respectively. Then, the global training data set P obtained by combining all participating terminals can be obtained:

[0161]

[0162] In this embodiment, the training round is 5, and the complete model w after the last aggregation update can be obtained by weighted averaging. t+1 :

[0163]

[0164] Further, step S8 determines the aggregated model w t+1 Whether the expected convergence degree is reached. In this embodiment, the function Q is used for analysis, and the aggregated model is w 6 ,have:

[0165] Q(w t+1 ) = Q(w 6 ) = 1

[0166] Proof Model w 6 Convergence expectations have been met.

[0167] Furthermore, step S9 will reach the convergence level of the model w 6 It is sent from the central server Z1 to the participating terminals, namely, the working terminal A1, the web server A2, and the database server A3, and each participating terminal is notified to stop model training and use the model to predict data leakage events.

[0168] In this embodiment, the trained model w t+1 The network traffic data, file access behavior data, and application access behavior data generated locally by each participating terminal are detected in real time. In this embodiment, a behavior event data c to be detected is ("www.adomain9.com", "8989", "http", "24657KB", "zip"), and the Label-encoded data is (5, 5, 5, 5), and the function S is used for analysis:

[0169] S(w t+1 ,c) = S(w 6 ,(5,5,5,5,5)) = 1

[0170] Prove that c is an isolated point and an abnormal event data item.

[0171] Furthermore, in this embodiment, step S10 reports the abnormal event data item c to the early warning terminal.

[0172] Furthermore, in this embodiment, in step S11, the early warning terminal issues an alarm for the data leakage event c sent by the participating terminal, and performs automatic or manual processing.

[0173] Furthermore, in this embodiment, in step S12, the early warning end manually evaluates the frequency and accuracy of data leakage events to generate a quantitative data set v for predictive effect evaluation under the current model parameters.

[0174] Furthermore, in this embodiment, in step S13, the early warning terminal sends the prediction effect evaluation quantitative data set v to the central server Z1, and the central server Z1 adjusts the convergence conditions and model parameters according to the data to conduct a new round of model training.

[0175] Example 3

[0176] The present invention also provides a terminal data leakage event prediction system based on horizontal federated learning, comprising:

[0177] An acquisition module, used to acquire historical behavior event data of participating terminals and real-time behavior event data of participating terminals;

[0178] A model training module, used to train the initial shared model and transfer model parameters between the central server and participating terminals;

[0179] Model encryption and sending module, used to encrypt and send the initial shared model and model update parameters;

[0180] Model aggregation module, used to aggregate model update parameters of each participating terminal;

[0181] A judgment module, used to make a convergence judgment on the aggregated model parameters and to judge whether the real-time behavior event in the participating terminal is a data leakage event;

[0182] An alarm handling module is used to handle alarms for data leakage events predicted by participating terminals;

[0183] A prediction effect evaluation module is used to evaluate the prediction effect of the data leakage event prediction model on the participating terminals and to quantify the prediction effect;

[0184] The model parameter optimization module is used to optimize the model training parameters based on the quantitative data of the prediction effect evaluation.

[0185] See also Figure 2 , an acquisition module 11 is used to acquire historical behavior event data and real-time behavior event data of participating terminals; a model training module 12 is used to train the data leakage event prediction model; a model encryption sending module 13 is used to send and encrypt model update parameters; a model aggregation module 14 is used to aggregate the model update parameters of each participating terminal; a judgment module 15 is used to judge whether the global model has reached the convergence expectation; an alarm handling module 16 is used to handle the predicted data leakage events; a prediction effect evaluation module 17 is used to evaluate the model prediction effect; a model parameter optimization module 18 is used to optimize the model parameters.

[0186] Furthermore, if Figure 2As shown, the acquisition module 11 includes a historical behavior event acquisition unit 111 and a real-time behavior event acquisition unit 112; the historical behavior event acquisition unit 111 is used to acquire historical behavior event data of participating terminals; the real-time behavior event acquisition unit 112 is used to acquire real-time behavior event data of participating terminals.

[0187] The model training module 12 includes a training data preprocessing unit 121, a supervised learning unit 122, an unsupervised learning unit 123, and a training effect evaluation unit 124; the training data preprocessing unit 121 is used to pre-process the training data required for machine learning; the supervised learning unit 122 is used to generate an initial shared model through supervised learning; the unsupervised learning unit 123 is used for the participating terminals to perform unsupervised learning on the initial shared model locally; the training effect evaluation unit 124 is used to evaluate the training effect through loss functions, test data sets, etc.

[0188] The model encryption sending module 13 includes a model parameter sending unit 131, a model parameter share splitting unit 132, and a model parameter secret reorganization unit 133; the model parameter sending unit 131 is used to send the initial shared model and model update parameters; the model parameter share splitting unit 132 is used to share the model parameters updated after the participating terminals are trained; the model parameter secret reorganization unit 133 is used for the central server to secretly reorganize the received model update parameter shares.

[0189] The model aggregation module 14 includes a model parameter aggregation unit 141, which is used for the central server to aggregate the model update parameters of each participating terminal.

[0190] The judgment module 15 includes a training verification accuracy judgment unit 151, a model parameter convergence judgment unit 152, and a data leakage event judgment unit 153; the training verification accuracy judgment unit 151 is used to use a verification data set to perform accuracy verification during model training; the model parameter convergence judgment unit 152 is used for the central server to perform convergence judgment on the aggregated model parameters; the data leakage event judgment unit 153 is used to judge whether the real-time behavior event in the participating terminal is a data leakage event.

[0191] The alarm handling module 16 includes an abnormal event alarm unit 161 and an abnormal event handling unit 162; the abnormal event alarm unit 161 is used to alarm the predicted abnormal data leakage event; the abnormal event handling unit 162 is used to handle the predicted abnormal data leakage event.

[0192] The prediction effect evaluation module 17 includes a prediction effect evaluation unit 171 and a prediction effect quantification unit 172; the prediction effect evaluation unit 171 is used to evaluate the prediction effect of the data leakage event prediction model on the participating terminal; the prediction effect quantification unit 172 is used to quantify the prediction effect.

[0193] The model parameter optimization module 18 includes a model parameter optimization unit 181, which is used to optimize the model training parameters according to the prediction effect evaluation quantization data.

[0194] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in any form. Any ordinary technician in the industry can smoothly implement the present invention as shown in the drawings and described above. However, any equivalent changes, modifications and evolutions made by technicians familiar with the profession without departing from the scope of the technical solution of the present invention using the technical content disclosed above are all equivalent embodiments of the present invention. At the same time, any equivalent changes, modifications and evolutions made to the above embodiments based on the essential technology of the present invention are still within the protection scope of the technical solution of the present invention.

Claims

1. A terminal data leakage event prediction method based on horizontal federated learning, It is characterized in that include: Obtain historical behavior event data of participating terminals, perform data labeling operations on the historical behavior event data of participating terminals, and obtain labeled data; The central server uses the labeled data and adopts convolutional neural network with supervised learning training to obtain the initial shared model. Through horizontal federated learning, the initial shared model of the data leakage incident is sent to each participating terminal for local training; In the local training phase, each participating terminal obtains its own behavior data, processes the data using the label encoding method, uses the label encoded data as the training data for the initial shared model, and uses the isolation forest algorithm to train the initial shared model; After training, each participating terminal updates the model parameters, encrypts the model update parameters and sends them to the central server for model parameter aggregation; when the participating terminal verifies the current initial shared model through the verification data set and obtains a verification accuracy of 80%, the model update parameters of the tree structure, segmentation features, and segmentation values ​​of the training model at this time are sent to the central server. The sending process uses secret-sharing secure multi-party computing to achieve secure transmission. Let the model parameter that needs to be updated by the first participating terminal be T 1 , and get t by dividing the secret share 11 ,t 12 ...t 1m , assuming that there are J participating terminals in total, then when the central server receives J ≥ 3 secret shares from participating terminals, it performs secret reorganization through the following function to obtain the original model parameters that need to be updated; T = f{(t 11 ,t 12 ...t 1m ),(t 21 ,t 22 ...t 2m )...(t J1 ,t J2 ...t Jm )}; Among them, T represents the original model parameters that need to be updated, t Jm represents the m-th model parameter of the J-th participating terminal, and f{} represents the recombination function; The model updated through aggregation is then sent to each participating terminal for training until the model reaches a converged state; When the model converges, data leakage prediction is enabled, and alarms are issued for data leakage events predicted by participating terminals. The data leakage event prediction is specifically as follows: the participating terminals use the trained model w t+1 Real-time detection of local network traffic data, file access behavior data, and application access behavior data; the detection function is S, and the data item to be detected is c, then: When S(w t+1 ,c)=1, c is an isolated point, i.e., an abnormal event data item; When S(w t+1 ,c)=0, c is a non-isolated point, that is, a normal event data item; When the data item c to be detected is an isolated point, the associated behavior event of the data item c to be detected is reported to the early warning end.

2. The terminal data leakage event prediction method based on horizontal federated learning as claimed in claim 1, It is characterized in that The historical behavior event data of the participating terminals includes historical security event log data of the participating terminals, historical application event log data of the participating terminals, historical network connection log data of the participating terminals, and historical response event log data of terminal security software installed by the participating terminals; The historical security event log data of the participating terminals includes interactive login security logs, user management security logs, and file operation security logs recorded by the terminals; The historical application event log data of the participating terminals includes application installation / uninstallation logs and application Web access logs; The historical network connection log data of the participating terminals, including network protocol information, network port information, and network IP / domain name information; The historical response event log data of the terminal security software installed on the participating terminals includes the security alarm type, the characteristics that trigger the security alarm, and the number of alarms.

3. The terminal data leakage event prediction method according to claim 1, It is characterized in that Perform data labeling on the historical behavior event data of the participating terminals to convert the unlabeled data into labeled data; take the historical behavior event data as the input parameter, when the input parameter is x, get the corresponding event label g, d1 is the label conversion function, and the expression is as follows: ; Among them, x m is the input parameter of the mth data, g m is the event label of the mth data; Through function conversion, each unlabeled event data is converted into an array containing the original event data and its label. The event label g of the mth data m When the value is 0, it indicates a non-leakage event, and when the value is 1, it indicates a leakage event; The labeled historical behavior event data of participating terminals are feature extracted and standardized to generate training data; the first 70% of the training data set is used as the training data set, and the last 30% of the data set is used as the validation data set; the initial shared model is trained for binary classification using a convolutional neural network, and the training effect of the convolutional neural network is supervised by the mean square error loss function MSE, which has the following expression: ; Where n is the number of samples, is the predicted value of the i-th sample, y i is the true value of the i-th sample; and the Adam optimizer is used to optimize the model parameters. When the verification accuracy of the verification data set is 60%, the initial shared model is obtained.

4. The terminal data leakage event prediction method based on horizontal federated learning as claimed in claim 1, It is characterized in that The self-behavior data refers to the network traffic data, file access behavior data and application access behavior data generated by the participating terminals.

5. The terminal data leakage event prediction method based on horizontal federated learning as claimed in claim 4, It is characterized in that Each participating terminal obtains its own behavior data, processes the data using the Label encoding method, and uses the Label encoded data as the training data of the initial sharing model, including: cleaning the network traffic data, file access behavior data, and application access behavior data generated by the participating terminal and performing Label encoding. The Label encoding conversion function k is expressed as: ; Among them, c i Indicates the IP / domain name, access port, network protocol type, network data packet size, network data file type, access source, absolute path of the accessed file, access command, accessed file type, application name, absolute path of the application, application permissions, application installation time or application running time, I i Represents the converted Label value, and Z represents an integer; The participating terminal uses the Label-encoded data as training data and uses the isolation forest algorithm to train the initial shared model.

6. The terminal data leakage event prediction method based on horizontal federated learning as claimed in claim 1, It is characterized in that The central server aggregates the model update parameters of the participating terminals using the federated average algorithm. There are J participating terminals in total, and the training data set for each participating terminal j is I j , assuming the size of the training data set is p j , we get the global training data set P obtained by combining all participating terminals, which has the following expression: ; The initial shared model is represented as w, and the model update parameter of each participating terminal j is w 1 ,w 2 ... J , the training round is t, and the complete model w after the last aggregation update is obtained by weighted averaging t+1 , the expression is: 。 7. The terminal data leakage event prediction method based on horizontal federated learning as claimed in claim 6, It is characterized in that The central server aggregates the updated model w through the convergence judgment function Q t+1 Make a judgment on the degree of convergence; When Q(w t+1 ) = 0, the model has not reached convergence, so let w = w t+1 , repeat the model training and aggregation process; When Q(w t+1 ) = 1, the model reaches a convergence state; when the model convergence degree reaches the expected level, the central server will t +1 The parameters are sent to each participating terminal, notifying the participating terminal to stop model training and use the model w t+1 Predict data breach incidents.

8. A terminal data leakage event prediction system based on horizontal federated learning that implements the method as claimed in claim 1, It is characterized in that include: An acquisition module, used to acquire historical behavior event data of participating terminals and real-time behavior event data of participating terminals; A model training module, used to train the initial shared model and transfer model parameters between the central server and participating terminals; Model encryption and sending module, used to encrypt and send the initial shared model and model update parameters; Model aggregation module, used to aggregate model update parameters of each participating terminal; A judgment module, used to make a convergence judgment on the aggregated model parameters and to judge whether the real-time behavior event in the participating terminal is a data leakage event; An alarm handling module is used to handle alarms for data leakage events predicted by participating terminals; A prediction effect evaluation module is used to evaluate the prediction effect of the data leakage event prediction model on the participating terminals and to quantify the prediction effect; The model parameter optimization module is used to optimize the model training parameters based on the quantitative data of the prediction effect evaluation.

Citation Information

Patent Citations

  • Power data sharing method based on transverse federated learning

    CN115775010A

  • Federal learning model training privacy protection method and system based on hybrid strategy

    CN116167084A

  • Federal learning method and system for classification prediction of connection data of Internet of Vehicles terminal

    CN116227631A

  • Personalized federal learning image classification method and system based on self-supervised contrast learning

    CN116664930A

  • Network intrusion detection method based on federated learning

    CN116708009A