Flow detection processing method and device for edge device

By conducting coding module training and aggregation processing on edge devices, combined with Bayesian network adjustment parameters, the problem of data domain distribution differences and noise data elimination in the edge-cloud collaborative environment is solved, and the accuracy and update speed of the intrusion detection model are improved. Efficient traffic detection is achieved.

CN118802237APending Publication Date: 2024-10-18CHINA MOBILE COMM GRP TERMINAL +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311640531.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-01
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

In an edge-cloud collaboration environment, existing technologies are difficult to effectively solve the problem of data domain distribution differences between edge devices and cloud devices, cannot detect effective variant attacks, and are ineffective at removing noise data, resulting in inefficient intrusion detection model update.

Method used

By training and splitting the coding module on the edge device, sub-coding modules are generated for feature coding and aggregation processing, and combined with Bayesian network adjustment parameters, the dynamic update and efficient detection of the traffic detection module are achieved.

Benefits of technology

It improves the accuracy and update speed of the edge device intrusion detection model, can effectively handle inconsistent data distribution and noisy data, and improves the detection capability of effective variant attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802237A_ABST
    Figure CN118802237A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a traffic detection processing method and device for an edge device, and the method comprises the steps: carrying out the coding module training according to the source traffic data of a device server to which the edge device belongs, obtaining a coding module, and carrying out the splitting processing of the coding module, and obtaining at least one sub-coding module; inputting the device traffic data of the edge device into each sub-coding module in the at least one sub-coding module for feature coding to obtain a traffic feature set composed of traffic features corresponding to each sub-coding module; training a traffic detection module corresponding to each sub-coding module by taking the traffic feature corresponding to each sub-coding module as a training sample, and performing aggregation processing on the traffic detection module to obtain an aggregation detection module; and performing parameter adjustment on the aggregation detection module based on the feature associated parameters of the traffic feature group in the traffic feature set, so as to perform traffic detection on the traffic data of the edge device by the target traffic detection module obtained based on the parameter adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of intrusion detection technology, and in particular to a flow detection and processing method and apparatus for edge devices. Background Art

[0002] In the edge-cloud collaborative environment, edge devices process the data generated by the terminal, which can reduce the number of interactions between the terminal and the cloud and respond to user services more quickly. There are three core problems that need to be solved in the edge-cloud collaborative detection model: first, the data distribution connected to different edge devices may be different; second, the amount of data obtained by different edge devices may vary greatly; third, intrusion detection is a small sample learning problem of a high-dimensional problem, so there will definitely be few-class data and noise data for small sample data.

[0003] At present, in the construction of intrusion detection models in the edge-cloud collaborative environment, there are models dedicated to solving the problem of differences in data domain distribution in edge devices and cloud devices. The edge devices continuously update the detection model on the edge side based on the cloud model and incremental data, while the cloud uses an integrated learning method to update the edge model. In this way, continuous iteration up and down can achieve two-way updating of the model; there is a log-normal distribution mixed model that is used to fit the data samples, and the distribution characteristics of the noise data are used to make the two types of data have the best clustering effect, so that valid data can be identified and extracted.

[0004] However, the existing technologies are not perfect and comprehensive in their solutions to the three core problems of the edge-cloud collaborative detection model. When solving the problem of differences in data domain distribution between edge devices and cloud devices, they do not take into account the situation of insufficient data and are unable to detect effective variant attacks. When it comes to removing noise data, existing methods require a certain number of minority samples to produce better clustering results. Therefore, a self-learning method is needed to remove noise data. Summary of the invention

[0005] An embodiment of the present specification aims to provide a method and apparatus for processing flow detection of an edge device, so as to solve the problem of low update efficiency of a flow detection module of an edge device.

[0006] To solve the above technical problems, an embodiment of this specification is implemented as follows:

[0007] In a first aspect, an embodiment of the present specification provides a traffic detection and processing method for an edge device, the method comprising:

[0008] Performing encoding module training according to source traffic data of a device server to which the edge device belongs to obtain an encoding module, and performing splitting processing on the encoding module to obtain at least one sub-encoding module;

[0009] Inputting device traffic data of the edge device into each sub-coding module of the at least one sub-coding module for feature coding, and obtaining a traffic feature set composed of traffic features corresponding to each sub-coding module;

[0010] Using the traffic features corresponding to the sub-encoding modules as training samples, the traffic detection modules corresponding to the sub-encoding modules are trained, and the traffic detection modules are aggregated to obtain aggregated detection modules;

[0011] Based on the feature association parameters of the traffic feature group in the traffic feature set, the aggregation detection module is adjusted in parameters, so that the target traffic detection module based on the parameter adjustment performs traffic detection on the traffic data of the edge device.

[0012] In a second aspect, another embodiment of the present specification provides a flow detection and processing device for an edge device, the device comprising:

[0013] The splitting processing module is configured to perform encoding module training according to source traffic data of the device server to which the edge device belongs, obtain the encoding module, and split the encoding module to obtain at least one sub-encoding module;

[0014] A feature coding module is configured to input device traffic data of the edge device into each sub-coding module of the at least one sub-coding module for feature coding, and obtain a traffic feature set composed of traffic features corresponding to each sub-coding module;

[0015] An aggregation processing module is configured to train the flow detection modules corresponding to the sub-encoding modules using the flow characteristics corresponding to the sub-encoding modules as training samples, and perform aggregation processing on the flow detection modules to obtain an aggregate detection module;

[0016] The parameter adjustment module is configured to adjust the parameters of the aggregation detection module based on the feature association parameters of the traffic feature group in the traffic feature set, so that the target traffic detection module can perform traffic detection on the traffic data of the edge device based on the parameter adjustment.

[0017] In the third aspect, another embodiment of the present specification provides a traffic detection and processing device of an edge device, wherein the traffic detection and processing device of the edge device comprises: a memory, a processor, and computer executable instructions stored on the memory and executable on the processor, wherein the computer executable instructions, when executed by the processor, implement the steps of the traffic detection and processing method of the edge device as described in the first aspect above.

[0018] In a fourth aspect, another embodiment of the present specification provides a computer-readable storage medium, which is used to store computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the traffic detection processing method of the edge device as described in the first aspect above are implemented.

[0019] The flow detection and processing method of the edge device provided in this embodiment is to solve the three core problems in the edge-cloud collaboration scenario and realize the dynamic update and efficient detection of the Internet of Things detection model. First, the encoding module is trained according to the source flow data of the device service end of the edge device to obtain the encoding module, and the encoding module is split to obtain at least one sub-encoding module, so as to solve the problem of inconsistent data distribution; then, the flow data of the edge device to be detected is input into the split sub-encoding module for flow detection, and a flow feature set composed of the flow characteristics of each sub-encoding module is obtained; secondly, the flow characteristics corresponding to each sub-encoding module are used as training samples to train the flow detection module corresponding to the sub-encoding module, and the flow detection module is aggregated to obtain an aggregate detection module; finally, based on the flow feature set of the edge device, the parameters of the aggregate detection module are adjusted to obtain the target flow detection module, and the target flow detection module is used to perform flow detection on the edge device. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate one or more embodiments of the present specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 A flow chart of a flow detection processing method for an edge device provided in one embodiment of this specification;

[0022] Figure 2 A schematic diagram of a flow detection processing method for an edge device provided in one embodiment of this specification;

[0023] Figure 3 A schematic diagram of a Bayesian network provided for one embodiment of this specification;

[0024] Figure 4 A flow chart of a method for processing flow detection of an edge device applied to an intrusion detection scenario provided by an embodiment of this specification;

[0025] Figure 5 A schematic diagram of a flow detection and processing device for an edge device provided in one embodiment of this specification;

[0026] Figure 6 A schematic diagram of the structure of a traffic detection and processing device for an edge device provided in one embodiment of the present specification. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will be combined with the drawings in one or more embodiments of this specification to clearly and completely describe the technical solutions in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.

[0028] This specification provides an embodiment of a flow detection and processing method for an edge device:

[0029] Reference Figure 1 The traffic detection and processing method of the edge device provided in this embodiment specifically includes the following steps S102 to S108.

[0030] Step S102: Perform coding module training according to source traffic data of a device server to which the edge device belongs to obtain a coding module, and split the coding module to obtain at least one sub-coding module.

[0031] In the edge-cloud collaborative environment, a server manages and connects multiple edge devices at the same time, and the data size and data distribution obtained by each edge device are different. In order to solve the problems of uneven distribution of edge device data, noisy samples, and ever-changing attack methods.

[0032] In specific implementation, since the number of device traffic data of the edge device is small, the performance of the encoding module obtained by training is relatively poor. Therefore, in this embodiment, the encoding module is trained according to the source traffic data of the device server to which the edge device belongs; in the process of training the encoding module according to the source traffic data of the device server to which the edge device belongs, it is necessary to obtain the source traffic data first; in order to obtain more source traffic data, in an optional implementation manner provided in this embodiment, the source traffic data is obtained in the following manner:

[0033] Get the server traffic data of the server to which the edge device belongs;

[0034] The server traffic data is divided by using a sliding window method to obtain the source traffic data.

[0035] Specifically, firstly, the server traffic data of the server to which the edge device belongs is obtained, and the server traffic data is divided into several segments using a sliding window method, and the divided traffic data is used as the source traffic data.

[0036] like Figure 2 As shown, assuming S w = {w, h, t s , t e} is one of the sliding windows of sequence S, where w represents the window width, h represents the window sliding step, and t e -t s Represents the sliding step size, which is smaller than the observation period and window width.

[0037] After the source traffic data is obtained, the coding module is trained according to the source traffic data to obtain the coding module; in order to improve the feature coding capability of the coding module obtained through training, since there is noise in the source traffic data, in an optional implementation manner provided by this embodiment, in the process of training the coding module according to the source traffic data to obtain the coding module, the following operations are performed:

[0038] Acquire at least one source flow data, and perform sparse transformation and data recovery on each source flow data in the at least one source flow data to obtain recovery data of each source flow data;

[0039] Performing data reconstruction based on the recovered data to obtain reconstructed data of each source flow data;

[0040] The encoding module is trained using the reconstructed data as training samples to obtain the encoding module.

[0041] Specifically, in order to remove noise in the source traffic data, first, the following transformation and data recovery are performed on each source traffic data in at least one source traffic data to obtain the recovered data of each source traffic data. In order to ensure that the training samples used to train the coding module contain the original characteristics of the source traffic data, on the basis of obtaining the recovered data of each source traffic data, data reconstruction is performed based on the recovered data to obtain the reconstructed data of each source traffic data. Then, the coding module is trained using each reconstructed data as a training sample to obtain the coding module.

[0042] In an optional implementation manner provided by this embodiment, in the process of performing data reconstruction based on the restored data to obtain the reconstructed data of each source traffic data, the following operations are performed:

[0043] Inputting the restored data into a regression prediction model for data prediction, obtaining prediction results of the flow data of each source, and calculating data residuals based on the prediction results of the flow data of each source and the initial results;

[0044] Perform residual prediction according to the data time of the at least one source flow data to obtain the prediction residual of each source flow data;

[0045] Determine the reconstruction residual of each source flow data based on the data residual and the prediction residual of each source flow data;

[0046] The reconstructed data of each source flow data is determined according to the prediction results and the reconstruction residuals of each source flow data.

[0047] Specifically, in order to fully retain the structural characteristics of the original samples of the reconstructed traffic data, the regression prediction model is first used to predict the restored data, and the data residuals between the predicted data and the source traffic data are calculated. The data residuals are then predicted to obtain the predicted residuals of the data, thereby determining the reconstructed residuals of each source traffic data. The reconstructed data of each source traffic data is determined through the prediction results and the reconstruction residuals of the source traffic data. Finally, the encoding module is trained with the reconstructed data as training samples to obtain the encoding module.

[0048] like Figure 2 As shown, based on the sparsity principle, let the source traffic data segment be X T , Y T is the sparse matrix H T The data features of the transformed sample fragment after denoising. In order to retain the sample features of the original data as much as possible, it is expected that the sample variance before and after the transformation is minimized.

[0049] arg min||YT-H T X T ||

[0050] In order to further test the sparse representation after sparse transformation, the residual reconstruction method is used to restore the sparse representation, and the restored data Z is obtained by restoring the data in combination with the recovery matrix T. T Perform regression prediction.

[0051] Z T =TY T

[0052] After obtaining N+1 restored traffic segment data sequence Z T , Z T+1 , …, Z T+N Finally, the predicted values ​​of the traffic segments from the 2nd to the Nth are predicted by combining the time series correlation And compare the original value of the corresponding traffic segment data with the predicted value to obtain the residual sequence The residual sequence is analyzed by using the time series correlation residual Perform residual prediction to obtain the predicted sequence of residuals from the T+2th to the T+Nth traffic segments

[0053]

[0054] Based on the above calculations and analysis, according to the predicted values ​​of the traffic segments and the reconstruction residuals, the reconstruction formula for the traffic segments from T+2 to T+N is as follows:

[0055]

[0056] After obtaining the traffic segment data of each source traffic data after restoration and reconstruction, the traffic segment data is input into the autoencoder for training to obtain data features of the traffic segment data and obtain a coding module.

[0057] In an optional implementation manner provided in this embodiment, the encoding module training is performed in the following manner:

[0058] The K-layer stacked autoencoder can obtain the K-layer shallow and deep features of each traffic segment data. After a large number of restored and reconstructed traffic data segments are continuously iterated, the feature extraction rules of the traffic segment data can be basically obtained, that is, the relevant parameters of the K-layer stacked autoencoder can be determined to obtain the encoding module.

[0059] like Figure 2 As shown, the K-layer coding module obtained above is decompressed layer by layer and split into K sub-coding modules. The number of layers of each sub-coding module increases one by one, for example: the first sub-coding module includes the first layer of the coding module, and the Nth sub-coding module includes the first layer to the Nth layer of the coding module.

[0060] Step S104: input the device traffic data of the edge device into each sub-coding module in the at least one sub-coding module for feature coding, and obtain a traffic feature set composed of traffic features corresponding to each sub-coding module.

[0061] In specific implementation, it is necessary to first obtain the flow data of the edge device and use the encoding module to perform feature encoding. In an optional implementation provided by this embodiment, the flow data of the edge device is divided into several segments using a sliding window method, and the divided flow data is used as the device flow data.

[0062] After obtaining the required device traffic data of the edge device, it needs to be input into the encoding module for encoding. In order to remove the influence of noise, in an optional implementation provided by this embodiment, after obtaining the device traffic data of the edge device, the following operations are performed:

[0063] Performing sparse transformation and data recovery on at least one device flow data to obtain recovery data of each device flow data;

[0064] Performing data reconstruction based on the device recovery data to obtain device reconstruction data of the flow data of each device;

[0065] Specifically, in order to remove noise from the source traffic segment data of the edge device, the obtained device traffic data is first transformed and restored to obtain device recovery data of each device traffic data. In order to make the data input into the encoding module retain the original characteristics of the device traffic data, data is reconstructed based on the device recovery data to obtain device reconstruction data of the device traffic data. The device reconstruction data is input into the encoding module for encoding.

[0066] In an optional implementation manner provided by this embodiment, in the process of performing data reconstruction based on the device recovery data and obtaining the device reconstruction data of the flow data of each device, the following operations are performed:

[0067] Inputting the equipment recovery data into the regression prediction model for data prediction, obtaining the prediction results of the flow data of each equipment, and calculating the equipment data residual based on the prediction results and initial results of the flow data of each equipment;

[0068] Perform residual prediction according to the data time of the at least one device flow data to obtain the prediction residual of each device flow data;

[0069] Determine the reconstruction residual of the flow data of each device based on the data residual and the prediction residual of the flow data of each device;

[0070] The reconstructed data of the flow data of each device is determined according to the prediction result and the reconstruction residual of the flow data of each device.

[0071] Specifically, in order to fully retain the structural characteristics of the original samples of the reconstructed device flow data, the regression prediction model is first used to predict the device recovery data, the predicted data and data residuals of the device flow data are calculated, and then the data residuals of the device flow data are predicted to obtain the predicted residuals of the device flow data, thereby determining the reconstructed residuals of each device flow data, and determining the device reconstructed data of each device flow data through the prediction results and reconstruction residuals of the device flow data, and finally the device reconstructed data is input into the encoding module for encoding.

[0072] like Figure 2 As shown, based on the sparsity principle, let the device traffic data segment be X T , Y T is the sparse matrix H T The data features of the transformed sample fragment after denoising. In order to retain the sample features of the original data as much as possible, it is expected that the sample variance before and after the transformation is minimized.

[0073] argmin||YT -H T X T ||

[0074] In order to further test the sparse representation after sparse transformation, the residual reconstruction method is used to restore the sparse representation, and the device recovery data Z is obtained by restoring the data in combination with the recovery matrix T. T Perform regression prediction.

[0075] Z T =TY T

[0076] After obtaining N+1 devices to restore the traffic fragment data sequence Z T , Z T+1 , …, Z T+N Finally, the predicted value of traffic segment data recovered from the 2nd to the Nth device is predicted by combining the time series correlation And compare the original value of the corresponding device restored traffic segment data with the predicted value to obtain the residual sequence The residual sequence of device traffic segments is analyzed by using the time series correlation residual Perform residual prediction to obtain the predicted sequence of residuals of the traffic segments from the T+2th to the T+Nth device.

[0077]

[0078] Based on the above calculations and analysis, according to the predicted values ​​of the device traffic segments and the reconstruction residuals, the reconstruction formula for the device traffic segments from T+2 to T+N is as follows:

[0079]

[0080] The device reconstructed data after the device traffic data of the edge device is reconstructed is input into the K sub-coding modules in the above-obtained coding module for feature coding, and K groups of traffic features can be obtained. The obtained K groups of traffic features are composed into the traffic feature set of the edge device.

[0081] Step S106, using the traffic features corresponding to the sub-coding modules as training samples to train the traffic detection modules corresponding to the sub-coding modules, and performing aggregation processing on the traffic detection modules to obtain an aggregated detection module.

[0082] In the specific implementation, the traffic features of the edge devices obtained by encoding each sub-encoding module are used as training samples, and the traffic detection modules corresponding to each sub-encoding module are trained. That is, K groups of traffic features are used as training samples, and the traffic detection modules corresponding to the K-layer encoding modules are trained.

[0083] K traffic detection modules are aggregated to obtain an aggregate detection module.

[0084] In an optional implementation manner provided by this embodiment, aggregation processing is performed based on K traffic detection modules obtained through training. When the aggregated detection module is obtained, the following operations are performed:

[0085] Calculating the aggregation weights of the flow detection modules according to the detection error parameters of the flow detection modules;

[0086] Based on the aggregation weights of the traffic detection modules, aggregation processing is performed on at least one traffic detection module to obtain an aggregated detection module.

[0087] Specifically, according to the detection error parameters of each traffic detection module, that is, the classification error rate, the aggregation weight α of each traffic detection module is calculated. K .

[0088]

[0089] Among them, e K Represents the classification error rate of the Kth traffic detection module.

[0090] According to the aggregation weight of each traffic detection module, K traffic detection modules are aggregated to obtain the aggregation detection module corresponding to the edge device.

[0091] Step S108, based on the feature association parameters of the traffic feature group in the traffic feature set, the aggregation detection module is parameter adjusted, so that the target traffic detection module based on the parameter adjustment performs traffic detection on the traffic data of the edge device.

[0092] In specific implementation, because the data distribution collected by edge nodes at different locations is not necessarily consistent, in order to adjust the parameters of the aggregation detection module, in an optional implementation provided by this embodiment, the following operations are performed after obtaining the aggregation detection module:

[0093] Based on the feature association parameters of the traffic feature group in the traffic feature set, updating the traffic feature set to obtain a target traffic feature set;

[0094] The target traffic features in the target traffic feature set are used as training samples, and parameters of the aggregation detection module are adjusted to obtain a target traffic detection module.

[0095] Specifically, by judging the feature association parameters of the traffic feature group, the traffic feature set is updated to obtain the target traffic feature set, and the target traffic feature set is used as a training sample to adjust the parameters of the aggregation detection module to obtain the target traffic detection module.

[0096] In an optional implementation manner provided by this embodiment, in order to solve the problem of inconsistent data distribution, a target traffic detection module is obtained and the following operations are performed:

[0097] Building a Bayesian network based on the traffic features in the traffic feature set, and determining two traffic features having a connection relationship in the Bayesian network as a traffic feature group;

[0098] Calculating cosine values ​​of two flow characteristics in the flow characteristic group as characteristic association parameters of the flow characteristic group;

[0099] If the feature association parameter is less than the association threshold, the traffic feature to be deleted in the traffic feature group is determined, and the traffic feature to be deleted is deleted from the traffic feature set to obtain the target traffic feature set.

[0100] Specifically, a Bayesian network is constructed based on the traffic feature set, and two traffic features with a connection relationship in the Bayesian network are grouped into a traffic feature group. The cosine values ​​of the two traffic features in each traffic feature group are calculated and used as the feature association parameter of the traffic feature group. If the association parameter is less than the association threshold, the traffic features to be deleted in the traffic feature group are deleted from the Bayesian network to obtain the target traffic feature set. The target traffic feature set is used as a training sample and input into the aggregation detection module for parameter adjustment.

[0101] like Figure 3 As shown, given a blank Bayesian network N, a node order w = {w1, w2, w3, ..., w K}, determine the position of parent nodes and child nodes in the Bayesian network, and stipulate that each child node has only two parent nodes, and construct the Bayesian network according to the above rules.

[0102] Determine each traffic feature group and use the cosine theorem to calculate the feature association parameters of each group. Assume that the i-th traffic feature and the j-th traffic feature are a traffic feature group, the i-th traffic feature is represented by vector α, and the j-th traffic feature is represented by vector β. Then, according to the cosine theorem, the feature association parameters of the traffic feature group are:

[0103]

[0104] If the feature association parameter of the group is less than the specified threshold, the traffic features at the child nodes in the traffic feature group are deleted from the Bayesian network, the topology of the Bayesian network is updated, and the traffic features at the child nodes in the traffic feature group are deleted from the traffic feature set, and the target traffic feature set is updated.

[0105] After the calculation of feature association parameters and threshold judgment for each traffic feature group, the target traffic feature set and the new Bayesian network are obtained. The target traffic feature set is used as a training sample and input into the aggregation detection module for training to update the parameters of the aggregation detection module.

[0106] After the update is completed once, all the traffic feature groups in the Bayesian network after the topology is updated can be determined again, the feature association parameters of each group can be calculated and judged by the threshold, the target traffic feature set and the Bayesian network can be updated, and the parameters of the aggregation detection module can be adjusted. This cycle is repeated until the feature association parameters of all traffic feature groups in the Bayesian network are greater than the specified threshold, the iteration ends, and the final aggregation detection module with adjusted parameters is obtained.

[0107] Use the parameter-adjusted aggregation detection module to perform traffic detection on the device traffic reconstruction data of the edge device.

[0108] In addition, step S106 and step S108 can also be replaced by: training the traffic detection modules corresponding to the sub-coding modules with the traffic features corresponding to the sub-coding modules as training samples, and adjusting the parameters of the traffic detection modules based on the feature association parameters of the traffic feature group in the traffic feature set; performing aggregation processing on the traffic detection modules after parameter adjustment to obtain an aggregate detection module, so as to perform traffic detection on the traffic data of the edge device based on the aggregate detection model, and forming a new implementation method together with the other processing steps provided in this embodiment.

[0109] In summary, the flow detection and processing method of the edge device provided in this embodiment first obtains the flow data of the server to which the edge device belongs, and uses the sliding window method to divide the server data into several segments to obtain the source flow data, which can increase the data volume of the small sample data to a certain extent, so that after building a relatively accurate model based on the edge node with rich flow, the model is migrated to the edge node that lacks or has only a small amount of flow data, thereby reducing the model's demand for data volume; then, in order to remove the noise in the source flow data and reduce the interference of the noise on the model construction, it is necessary to perform sparse transformation and data recovery on the source flow data to obtain the recovered data of the source flow data; in order to ensure that the training samples used to train the coding module contain the original features of the source flow data, the source flow data is predicted and the residual predicted based on the recovered data, and the data is reconstructed by the predicted value and residual value of the source flow data segment to obtain the reconstructed data of the source flow data; secondly, the reconstructed data is input as a training sample into a K-layer stacked autoencoder for training to obtain a coding module, and the coding module is split into K sub-coding modules layer by layer;

[0110] Secondly, the traffic data of the edge device is obtained and divided into several segments using the sliding window method as the device traffic data. The device recovery data is obtained through sparse transformation and data recovery to achieve the purpose of removing noise; the device recovery data is then reconstructed to retain the original data features; the device reconstruction data is input into K sub-coding modules to obtain K traffic features, and the set of K traffic features becomes a traffic feature group;

[0111] The traffic features corresponding to each encoding module are used as training samples to train the traffic detection modules corresponding to each sub-encoding module; the classification error rate corresponding to each traffic detection module is used as the aggregation weight, all traffic detection modules are aggregated to obtain the aggregated detection module.

[0112] For traffic fragment data at different times, the unsupervised learning features obtained on the migration framework are different. In particular, as time goes by, the traffic features collected by each traffic node will definitely change dynamically. In order to solve this problem, a Bayesian network is constructed, the feature association parameters in each traffic feature group are calculated, and the traffic features and Bayesian network nodes with feature association parameters less than the specified threshold are deleted to obtain the target traffic feature set and the Bayesian network with updated topology; the aggregation detection module parameters are updated with the target traffic feature set, and the feature association parameters in each traffic feature group are continued to be calculated in the Bayesian network after the topology is updated. The iterative cycle is repeated until the feature association parameters of all traffic feature groups in the Bayesian network are greater than the specified threshold, and the aggregation detection module with the final parameter adjustment is obtained; the aggregation detection module with the final parameter adjustment is used to perform traffic detection on the device traffic reconstruction data of the edge device, which can improve the accuracy of the intrusion detection model and the update speed of the model.

[0113] The following combination Figure 4 , taking the application of the flow detection and processing method of the edge device provided by this embodiment in the intrusion detection scenario as an example, the flow detection and processing method of the edge device provided by this embodiment is further explained. Figure 4 ,The traffic detection and processing method of the edge device applied to the ,intrusion detection scenario specifically includes the following steps.

[0114] Step S402, obtaining source traffic data from the server, and performing sparse transformation based on the source traffic data to obtain a sparse representation of the source traffic data.

[0115] Step S404, performing data recovery on the sparse representation to obtain recovery data, and then performing data reconstruction on the recovery data to obtain reconstructed data of the source traffic data.

[0116] Step S406: Perform self-encoding training based on the reconstructed data of the source traffic data to obtain an encoding module.

[0117] Step S408: Activate the encoding module layer by layer to obtain at least one sub-encoding module.

[0118] Optionally, the number of sub-coding modules is the same as the number of layers of the coding module.

[0119] Step S410: Acquire device reconstruction data of the edge device.

[0120] Step S412: input the device reconstruction data into each sub-coding module for feature encoding to obtain a traffic feature set.

[0121] Step S414: training the traffic detection module based on the traffic characteristics corresponding to each sub-coding module to obtain the traffic detection module corresponding to each sub-coding module.

[0122] Step S416, performing aggregation processing on each flow detection module to obtain an aggregated detection module.

[0123] Step S418, constructing a Bayesian network, updating the Bayesian network and aggregation detection module parameters by calculating the feature association parameters of the traffic feature group, iterating until the feature association parameters of all traffic feature groups in the Bayesian network are greater than or equal to the threshold, and obtaining the intrusion detection module.

[0124] Step S420, obtain the flow data of the edge device, and input the flow data into the intrusion detection module to perform intrusion detection to obtain the intrusion detection result.

[0125] Figure 5 A schematic diagram of a flow detection and processing device for an edge device provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the device comprises:

[0126] The splitting processing module 502 is used to train the encoding module according to the source traffic data of the device server to which the edge device belongs, obtain the encoding module, and split the encoding module to obtain at least one sub-encoding module;

[0127] A feature coding module 504 is used to input the device traffic data of the edge device into each sub-coding module in the at least one sub-coding module for feature coding, and obtain a traffic feature set composed of traffic features corresponding to each sub-coding module;

[0128] An aggregation processing module 506 is used to train the flow detection modules corresponding to the sub-encoding modules using the flow characteristics corresponding to the sub-encoding modules as training samples, and perform aggregation processing on the flow detection modules to obtain an aggregated detection module;

[0129] The parameter adjustment module 508 is used to adjust the parameters of the aggregation detection module based on the feature association parameters of the traffic feature group in the traffic feature set, so as to perform traffic detection on the traffic data of the edge device based on the target traffic detection module obtained by the parameter adjustment.

[0130] The flow detection and processing device of the edge device provided in this embodiment first runs the splitting processing module 502, trains the encoding module according to the source flow data of the device service end to which the edge device belongs, obtains the encoding module, and splits the encoding module to obtain at least one sub-encoding module, runs the feature encoding module 504, inputs the device flow data of the edge device into each sub-encoding module in the at least one sub-encoding module for feature encoding, and obtains a flow feature set composed of flow features corresponding to each sub-encoding module, then runs the aggregation processing module 506, trains the flow detection module corresponding to each sub-encoding module with the flow features corresponding to each sub-encoding module as training samples, and performs aggregation processing on the flow detection module to obtain an aggregation detection module, and finally runs the parameter adjustment module 508, adjusts the parameters of the aggregation detection module based on the feature association parameters of the flow feature group in the flow feature set, so as to perform flow detection on the flow data of the edge device based on the target flow detection module obtained by the parameter adjustment.

[0131] The traffic detection and processing device of the edge device provided in one embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0132] Furthermore, an embodiment of the present specification also provides a flow detection and processing device of an edge device, Figure 6 A schematic diagram of a flow detection and processing device for an edge device provided in an embodiment of this specification is shown in FIG. Figure 6 As shown, the device includes: a memory 601, a processor 602, a bus 603 and a communication interface 604. The memory 601, the processor 602 and the communication interface 604 communicate through the bus 603, and the communication interface 604 may include an input and output interface, which includes but is not limited to a keyboard, a mouse, a display, a microphone, a loudspeaker, etc.

[0133] Figure 6 In the embodiment, the memory 601 stores computer executable instructions that can be run on the processor 602. When the computer executable instructions are executed by the processor 602, the following process is implemented:

[0134] Performing encoding module training according to source traffic data of a device server to which the edge device belongs to obtain an encoding module, and performing splitting processing on the encoding module to obtain at least one sub-encoding module;

[0135] Inputting device traffic data of the edge device into each sub-coding module of the at least one sub-coding module for feature coding, and obtaining a traffic feature set composed of traffic features corresponding to each sub-coding module;

[0136] Using the traffic features corresponding to the sub-encoding modules as training samples, the traffic detection modules corresponding to the sub-encoding modules are trained, and the traffic detection modules are aggregated to obtain aggregated detection modules;

[0137] Based on the feature association parameters of the traffic feature group in the traffic feature set, the aggregation detection module is adjusted in parameters, so that the target traffic detection module based on the parameter adjustment performs traffic detection on the traffic data of the edge device.

[0138] The traffic detection and processing device of the edge device provided in this embodiment, through the cooperation of the memory 601, the processor 602, the bus 603 and the communication interface 604, firstly trains the encoding module according to the source traffic data of the device service end to which the edge device belongs, obtains the encoding module, and splits the encoding module to obtain at least one sub-coding module; then inputs the device traffic data of the edge device into at least one sub-coding module, and each sub-coding module performs feature encoding to obtain a traffic feature set composed of traffic features corresponding to each sub-coding module; secondly, the traffic detection module corresponding to each sub-coding module is trained with the traffic features corresponding to each sub-coding module as training samples, and the traffic detection module is aggregated to obtain an aggregated detection module; finally, based on the feature association parameters of the traffic feature group in the traffic feature set, the parameters of the aggregated detection module are adjusted, so that the traffic data of the edge device is subjected to traffic detection by the target traffic detection module obtained based on the parameter adjustment.

[0139] The traffic detection and processing device of the edge device provided in one embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0140] Furthermore, another embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the following process is implemented:

[0141] Performing encoding module training according to source traffic data of a device server to which the edge device belongs to obtain an encoding module, and performing splitting processing on the encoding module to obtain at least one sub-encoding module;

[0142] Inputting device traffic data of the edge device into each sub-coding module of the at least one sub-coding module for feature coding, and obtaining a traffic feature set composed of traffic features corresponding to each sub-coding module;

[0143] Using the traffic features corresponding to the sub-encoding modules as training samples, the traffic detection modules corresponding to the sub-encoding modules are trained, and the traffic detection modules are aggregated to obtain aggregated detection modules;

[0144] Based on the feature association parameters of the traffic feature group in the traffic feature set, the aggregation detection module is adjusted in parameters, so that the target traffic detection module based on the parameter adjustment performs traffic detection on the traffic data of the edge device.

[0145] The computer-readable storage medium provided in this embodiment first trains the encoding module according to the source traffic data of the device service end to which the edge device belongs, obtains the encoding module, and splits the encoding module to obtain at least one sub-encoding module; then inputs the device traffic data of the edge device into at least one sub-encoding module, and each sub-encoding module performs feature encoding to obtain a traffic feature set composed of traffic features corresponding to each sub-encoding module; secondly, the traffic detection module corresponding to each sub-encoding module is trained with the traffic features corresponding to each sub-encoding module as training samples, and the traffic detection module is aggregated to obtain an aggregated detection module; finally, based on the feature association parameters of the traffic feature group in the traffic feature set, the aggregated detection module is parameter adjusted, and the target traffic detection module obtained based on the parameter adjustment performs traffic detection on the traffic data of the edge device. Wherein, the computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0146] The computer-readable storage medium provided in an embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0147] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0148] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0149] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0150] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0151] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0152] Memory may include non-permanent storage in a computer-readable storage medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable storage medium.

[0153] Computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable storage media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0154] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0155] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0156] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A flow detection and processing method for edge devices, It is characterized in that The method comprises: Performing encoding module training according to source traffic data of a device server to which the edge device belongs to obtain an encoding module, and performing splitting processing on the encoding module to obtain at least one sub-encoding module; Inputting device traffic data of the edge device into each sub-coding module of the at least one sub-coding module for feature coding, and obtaining a traffic feature set composed of traffic features corresponding to each sub-coding module; Using the traffic features corresponding to the sub-encoding modules as training samples, the traffic detection modules corresponding to the sub-encoding modules are trained, and the traffic detection modules are aggregated to obtain aggregated detection modules; Based on the feature association parameters of the traffic feature group in the traffic feature set, the aggregation detection module is adjusted in parameters, so that the target traffic detection module based on the parameter adjustment performs traffic detection on the traffic data of the edge device.

2. The flow detection and processing method of the edge device according to claim 1, It is characterized in that The encoding module is trained according to the source traffic data of the device server to which the edge device belongs to obtain the encoding module, including: Acquire at least one source flow data, and perform sparse transformation and data recovery on each source flow data in the at least one source flow data to obtain recovery data of each source flow data; Performing data reconstruction based on the recovered data to obtain reconstructed data of each source flow data; The encoding module is trained using the reconstructed data as training samples to obtain the encoding module.

3. The flow detection and processing method of the edge device according to claim 2, It is characterized in that The performing data reconstruction based on the recovered data to obtain the reconstructed data of each source flow data includes: Inputting the restored data into a regression prediction model for data prediction, obtaining prediction results of the flow data of each source, and calculating data residuals based on the prediction results of the flow data of each source and the initial results; Perform residual prediction according to the data time of the at least one source flow data to obtain the prediction residual of each source flow data; Determine the reconstruction residual of each source flow data based on the data residual and the prediction residual of each source flow data; The reconstructed data of each source flow data is determined according to the prediction results and the reconstruction residuals of each source flow data.

4. The flow detection and processing method of the edge device according to claim 1, It is characterized in that The performing aggregation processing on the traffic detection modules to obtain an aggregate detection module includes: Calculating the aggregation weights of the flow detection modules according to the detection error parameters of the flow detection modules; Based on the aggregation weights of the traffic detection modules, aggregation processing is performed on at least one traffic detection module to obtain an aggregated detection module.

5. The flow detection and processing method of the edge device according to claim 1, It is characterized in that The adjusting parameters of the aggregation detection module based on the feature association parameters of the traffic feature group in the traffic feature set includes: Based on the feature association parameters of the traffic feature group in the traffic feature set, updating the traffic feature set to obtain a target traffic feature set; The target traffic features in the target traffic feature set are used as training samples, and parameters of the aggregation detection module are adjusted to obtain a target traffic detection module.

6. The flow detection and processing method of the edge device according to claim 5, It is characterized in that Based on the feature association parameters of the traffic feature group in the traffic feature set, the traffic feature set is updated to obtain a target traffic feature set, including: Building a Bayesian network based on the traffic features in the traffic feature set, and determining two traffic features having a connection relationship in the Bayesian network as a traffic feature group; Calculating cosine values ​​of two flow characteristics in the flow characteristic group as characteristic association parameters of the flow characteristic group; If the feature association parameter is less than the association threshold, the traffic feature to be deleted in the traffic feature group is determined, and the traffic feature to be deleted is deleted from the traffic feature set to obtain the target traffic feature set.

7. The flow detection and processing method of the edge device according to claim 1, It is characterized in that The performing flow detection on the flow data of the edge device includes: Inputting the flow data of the edge device into the encoding module for feature encoding to obtain flow data features; The flow data feature is input into the target flow detection module to perform flow detection and obtain a flow detection result.

8. A flow detection and processing device for an edge device, It is characterized in that The device comprises: The splitting processing module is configured to perform encoding module training according to source traffic data of the device server to which the edge device belongs, obtain the encoding module, and split the encoding module to obtain at least one sub-encoding module; A feature coding module is configured to input device traffic data of the edge device into each sub-coding module of the at least one sub-coding module for feature coding, and obtain a traffic feature set composed of traffic features corresponding to each sub-coding module; An aggregation processing module is configured to train the flow detection modules corresponding to the sub-encoding modules using the flow characteristics corresponding to the sub-encoding modules as training samples, and perform aggregation processing on the flow detection modules to obtain an aggregate detection module; The parameter adjustment module is configured to adjust the parameters of the aggregation detection module based on the feature association parameters of the traffic feature group in the traffic feature set, so that the target traffic detection module can perform traffic detection on the traffic data of the edge device based on the parameter adjustment.

9. A flow detection and processing device for an edge device, It is characterized in that The traffic detection and processing device of the edge device includes a memory and a processor, the memory stores computer executable instructions, and when the computer executable instructions are executed on the processor, the steps of the method described in any one of claims 1 to 7 can be implemented.

10. A computer-readable storage medium having computer-executable instructions stored therein, It is characterized in that When the computer executable instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 can be implemented.