Cloud platform entry real-time traffic replication method, system and electronic device
Through convolutional neural network and timing encoder, high-dimensional correlation feature extraction and periodic chaos mapping of real-time traffic data at the cloud platform entrance solves the problem that existing technology is difficult to identify advanced persistent threats and achieves more accurate network attacks Traffic identification and classification.
Patent Information
- Application Number
- CN202210354135.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-03
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-04-03
AI Technical Summary
Existing cyberattack detection technologies are difficult to identify advanced persistent threats, especially because of their strong targetedness, disguise and phasedness, which makes traditional intrusion prevention systems unable to effectively match and identify.
The convolutional neural network model and timing encoder are used to extract the high-dimensional correlation feature of time and sample dimensions of real-time traffic data from the cloud platform entrance, and enhance the diversity of feature distribution through periodic chaos mapping, thereby improving the global classification accuracy of the classifier. .
Effectively identifying and classifying network attack traffic improves the accuracy of attack IP and enhances network security detection capabilities.
Smart Images

Figure CN114745168B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security, and more specifically, to a cloud platform entrance real-time traffic replication method, system and electronic device. Background Art
[0002] The current network security situation is extremely severe, and network attacks are increasingly reported, posing serious network security threats to key enterprises, individuals and important departments and agencies. This advanced persistent threat can easily evade the identification of traditional detection technologies by taking advantage of its strong targeting, camouflage and phased characteristics. New attack methods and technologies emerge in an endless stream, making it impossible for general intrusion prevention systems to effectively match and identify them. At the same time, any network attack is transmitted through the network, and there must be related data packets transmitted between the attacking host and the attacked host, which has given many network security engineers inspiration.
[0003] One of the most effective ways to detect network attacks is to analyze and process the traffic transmitted between networks. That is, by copying the real-time traffic data of each cloud platform entrance, and analyzing whether there is attack traffic through the copied implementation traffic data of each cloud platform entrance, if there is attack traffic, stop copying. Therefore, in order to better detect network attacks, it is expected to provide a cloud platform entrance real-time traffic replication solution. Summary of the invention
[0004] In order to solve the above technical problems, the present application is proposed. The embodiment of the present application provides a cloud platform entrance real-time traffic replication method, system and electronic device, which uses a convolutional neural network model and a timing encoder to extract high-dimensional correlation features in the time and sample dimensions of transmission network data packets of each client at multiple predetermined time points to obtain a first feature matrix, and for network attacks, there is a certain degree of randomness between samples and time periodicity in the data paradigm of transmission traffic. By performing periodic chaotic mapping on the eigenvalues of the first feature matrix, the second feature matrix can simulate the paradigm characteristics of sample data from the feature distribution level in the high-dimensional feature space. At the same time, it can enhance the positional diversity of feature distribution by periodically generating chaotic sequences at position intervals by improving the initial feature distribution, thereby expanding the search range of the classifier for the feature distribution as a whole as a set in the high-dimensional feature space, and improving the global classification accuracy.
[0005] According to one aspect of the present application, a cloud platform inlet real-time traffic replication method is provided, which includes:
[0006] Obtain network data packets transmitted from each client to the target IP of each cloud platform at multiple predetermined time points through the source IP;
[0007] The network data packets transmitted by each of the clients from the source IP to the target IP of each cloud platform at multiple predetermined time points are passed through a temporal encoder including a one-dimensional convolutional layer and a fully connected layer to obtain a first feature vector corresponding to each client;
[0008] Arrange the first feature vectors corresponding to each client in two dimensions according to the client sample dimension into a feature matrix and then pass it through a convolutional neural network model to obtain a first feature matrix;
[0009] Performing periodic chaotic mapping on the eigenvalues at each position in the first characteristic matrix to obtain a second characteristic matrix, wherein performing periodic chaotic mapping on the eigenvalues at each position in the first characteristic matrix means integrating the eigenvalues at each position in the first characteristic matrix into a periodic function;
[0010] Extracting a first feature vector of a client to be predicted from the first feature vectors corresponding to each client;
[0011] Performing matrix multiplication of the first feature vector of the client to be predicted as a query vector and the second feature vector to obtain a classification feature vector; and
[0012] The classification feature vector is passed through a classifier to obtain a classification result, and the classification result is used to indicate whether the source IP of the client to be predicted is an attacking IP.
[0013] In the above-mentioned cloud platform entrance real-time traffic replication method, the network data packets transmitted by each of the clients through the source IP to the target IP of each cloud platform at multiple predetermined time points are passed through a temporal encoder including a one-dimensional convolutional layer and a fully connected layer to obtain a first feature vector corresponding to each client, including: arranging the network data packets transmitted by each of the clients through the source IP to the target IP of each cloud platform at multiple predetermined time points according to the time dimension into a one-dimensional input vector corresponding to each of the clients; using the fully connected layer of the temporal encoder to fully connect the input vector using the following formula to extract the high-dimensional implicit features of the feature values at each position in the input vector, wherein the formula is: Where X is the input vector, Y is the output vector, W is the weight matrix, and B is the bias vector. represents matrix multiplication; using a one-dimensional convolution layer of a temporal encoder to perform one-dimensional convolution encoding on the input vector according to the following formula to extract a high-dimensional implicit correlation feature of the correlation between the eigenvalues at each position in the input vector, wherein the formula is:
[0014]
[0015] Among them, a is the width of the convolution kernel in the x direction, F is the convolution kernel parameter vector, G is the local vector matrix operated with the convolution kernel function, and w is the size of the convolution kernel.
[0016] In the above-mentioned cloud platform entrance real-time traffic replication method, the first feature vectors corresponding to each client are arranged in two dimensions according to the client sample dimension into a feature matrix and then passed through a convolutional neural network model to obtain the first feature matrix, including: the first feature vectors corresponding to each client are arranged in two dimensions according to the client sample dimension into a feature matrix; and each layer of the convolutional neural network performs convolution processing based on a two-dimensional convolution kernel, pooling processing along the channel dimension and activation processing on the input data in the forward pass of the layer to output the first feature matrix by the last layer of the convolutional neural network, wherein the input of the first layer of the convolutional neural network is the feature matrix.
[0017] In the above-mentioned cloud platform inlet real-time traffic replication method, periodic chaotic mapping is performed on the eigenvalues of each position in the first characteristic matrix to obtain a second characteristic matrix, including: periodic chaotic mapping is performed on the eigenvalues of each position in the first characteristic matrix to obtain the second characteristic matrix according to the following formula; wherein the formula is:
[0018]
[0019] where f i,j is the eigenvalue of each position of the first feature matrix before mapping, f i,j ′ is the eigenvalue of each position of the second feature matrix after mapping, f i,j mod(1) means that f i,j Perform modulo 1 operation, that is, take f i,j The remainder of , and a and b are hyperparameters.
[0020] In the above-mentioned cloud platform inlet real-time traffic replication method, the classification feature vector is passed through a classifier to obtain a classification result, including: using the classifier to process the classification feature vector with the following formula to obtain the classification result; wherein the formula is: softmax{(W n ,B n ):…:(W1,B1)|X}, where W1 to W n is the weight matrix, B1 to B n is the bias vector, and X is the classification feature vector.
[0021] In the above-mentioned cloud platform entrance real-time traffic replication method, it further includes: in response to the classification result that the source IP of the client to be predicted is an attack IP, stopping the replication of network data packets sent by the source IP of the client to be predicted.
[0022] According to another aspect of the present application, a cloud platform inlet real-time traffic replication system is provided, which includes:
[0023] A network data packet acquisition unit, used to acquire network data packets transmitted by each client through a source IP to a target IP of each cloud platform at multiple predetermined time points;
[0024] A temporal coding unit, configured to pass the network data packets obtained by each of the network data packet acquisition units and transmitted from the client to the target IP of each cloud platform through the source IP at multiple predetermined time points through a temporal encoder including a one-dimensional convolutional layer and a fully connected layer to obtain a first feature vector corresponding to each client;
[0025] A feature extraction unit, configured to arrange the first feature vectors corresponding to each client obtained by the temporal encoding unit in two dimensions according to the client sample dimension into a feature matrix and then obtain a first feature matrix through a convolutional neural network model;
[0026] A periodic chaotic mapping unit, used for performing periodic chaotic mapping on the eigenvalues at each position in the first feature matrix obtained by the feature extraction unit to obtain a second feature matrix, wherein performing periodic chaotic mapping on the eigenvalues at each position in the first feature matrix means integrating the eigenvalues at each position in the first feature matrix into a periodic function;
[0027] An extraction unit, configured to extract a first feature vector of a client to be predicted from the first feature vectors corresponding to each client obtained by the temporal encoding unit;
[0028] a classification feature vector generating unit, configured to perform matrix multiplication of the first feature vector of the client to be predicted obtained by the extracting unit as a query vector and the second feature vector obtained by the periodic chaotic mapping unit to obtain a classification feature vector; and
[0029] The classification unit is used to pass the classification feature vector obtained by the classification feature vector generation unit through a classifier to obtain a classification result, wherein the classification result is used to indicate whether the source IP of the client to be predicted is an attacking IP.
[0030] In the above-mentioned cloud platform entrance real-time traffic replication system, the timing encoding unit is further used to: arrange the network data packets transmitted by each client through the source IP to the target IP of each cloud platform at multiple predetermined time points into a one-dimensional input vector corresponding to each client according to the time dimension; use the fully connected layer of the timing encoder to fully connect the input vector using the following formula to extract the high-dimensional implicit features of the feature values at each position in the input vector, wherein the formula is: Where X is the input vector, Y is the output vector, W is the weight matrix, and B is the bias vector. represents matrix multiplication; using a one-dimensional convolution layer of a temporal encoder to perform one-dimensional convolution encoding on the input vector according to the following formula to extract a high-dimensional implicit correlation feature of the correlation between the eigenvalues at each position in the input vector, wherein the formula is:
[0031]
[0032] Among them, a is the width of the convolution kernel in the x direction, F is the convolution kernel parameter vector, G is the local vector matrix operated with the convolution kernel function, and w is the size of the convolution kernel.
[0033] In the above-mentioned cloud platform entrance real-time traffic replication system, the feature extraction unit is further used to: arrange the first feature vectors corresponding to each client in two dimensions into a feature matrix according to the client sample dimension; and, each layer of the convolutional neural network performs convolution processing based on a two-dimensional convolution kernel, pooling processing along the channel dimension and activation processing on the input data in the forward pass of the layer to output the first feature matrix by the last layer of the convolutional neural network, wherein the input of the first layer of the convolutional neural network is the feature matrix.
[0034] In the above-mentioned cloud platform inlet real-time traffic replication system, the periodic chaotic mapping unit is further used to: perform periodic chaotic mapping on the eigenvalues of each position in the first characteristic matrix according to the following formula to obtain a second characteristic matrix;
[0035] Wherein, the formula is:
[0036]
[0037] where f i,j is the eigenvalue of each position of the first feature matrix before mapping, f i,j ′ is the eigenvalue of each position of the second feature matrix after mapping, f i,j mod(1) means that f i,j Perform modulo 1 operation, that is, take f i,j The remainder of , and a and b are hyperparameters.
[0038] In the above-mentioned cloud platform inlet real-time traffic replication system, the classification unit is further used to: use the classifier to process the classification feature vector using the following formula to obtain the classification result; wherein the formula is: softmax{(W n ,B n ):…:(W1,B1)|X}, where W1 to W n is the weight matrix, B1 to B n is the bias vector, and X is the classification feature vector.
[0039] In the above-mentioned cloud platform entry real-time traffic replication system, in response to the classification result that the source IP of the client to be predicted is an attacking IP, the replication of the network data packets sent by the source IP of the client to be predicted is stopped.
[0040] According to another aspect of the present application, an electronic device is provided, comprising: a processor; and a memory, in which computer program instructions are stored, and when the computer program instructions are executed by the processor, the processor executes the cloud platform inlet real-time traffic replication method as described above.
[0041] According to yet another aspect of the present application, a computer-readable medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the cloud platform inlet real-time traffic replication method as described above.
[0042] Compared with the prior art, the cloud platform entrance real-time traffic replication method, system and electronic device provided by the present application use a convolutional neural network model and a timing encoder to extract high-dimensional correlation features in the time and sample dimensions of the transmission network data packets of each client at multiple predetermined time points to obtain a first feature matrix, and for network attacks with a certain degree of randomness between samples and time periodicity in the transmission traffic data paradigm, by performing periodic chaotic mapping on the eigenvalues of the first feature matrix, the second feature matrix can simulate the paradigm characteristics of the sample data from the feature distribution level in the high-dimensional feature space, and at the same time, it can enhance the positional diversity of the feature distribution by periodically generating a chaotic sequence by position interval by improving the initial feature distribution, thereby expanding the search range of the classifier for the feature distribution as a whole as a set in the high-dimensional feature space, and improving the global classification accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0044] Figure 1 It is a flow chart of a cloud platform inlet real-time traffic replication method according to an embodiment of the present application;
[0045] Figure 2 A schematic diagram of the system architecture of a cloud platform inlet real-time traffic replication method according to an embodiment of the present application;
[0046] Figure 3 A block diagram of a cloud platform inlet real-time traffic replication system according to an embodiment of the present application;
[0047] Figure 4 is a block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0048] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.
[0049] Scenario Overview
[0050] As mentioned above, the current network security situation is extremely severe, and network attacks are increasingly reported, posing serious network security threats to key enterprises, individuals and important departments and agencies. This advanced persistent threat can easily evade the identification of traditional detection technologies by taking advantage of its strong targeting, camouflage and phased characteristics. New attack methods and technologies emerge in an endless stream, making it impossible for general intrusion prevention systems to effectively match and identify them. At the same time, any network attack is transmitted through the network, and there must be related data packets transmitted between the attacking host and the attacked host, which has given many network security engineers inspiration.
[0051] One of the most effective ways to detect network attacks is to analyze and process the traffic transmitted between networks. That is, by copying the real-time traffic data of each cloud platform entrance, and analyzing whether there is attack traffic through the copied implementation traffic data of each cloud platform entrance, if there is attack traffic, stop copying. Therefore, in order to better detect network attacks, it is expected to provide a cloud platform entrance real-time traffic replication solution.
[0052] At present, deep learning and neural networks have been widely used in computer vision, natural language processing, speech signal processing and other fields. In addition, deep learning and neural networks have also shown a level close to or even beyond that of humans in image classification, object detection, semantic segmentation, text translation and other fields.
[0053] The development of deep learning and neural networks has provided new solutions and ideas for real-time traffic replication at cloud platform entrances in network security.
[0054] Accordingly, in the technical solution of the present application, each client transmits a network data packet to the target IP of each cloud platform through the source IP. Since it is necessary to determine which source IP or which source IPs may be the attacking IP, it is necessary not only to consider the network data packets from each source IP to each target IP at multiple predetermined time points, but also to consider the overall situation of all source IPs to all target IPs at the multiple predetermined time points, which can be extracted by using a convolutional neural network model and a temporal encoder for associated feature extraction. In essence, this is also a classification problem, that is, the network data packets transmitted by each client through the source IP to the target IP of each cloud platform at multiple predetermined time points are used to classify and judge whether the source IP of the client to be predicted is the attacking IP.
[0055] Based on this, in the technical solution of the present application, first, network data packets from each client to the target IP of each cloud platform at multiple predetermined time points through the source IP are obtained, and are encoded by a timing encoder respectively to extract the implicit correlation feature information of the network data packets transmitted from each client to the target IP of each cloud platform at multiple predetermined time points through the source IP in the time dimension, so as to obtain multiple first feature vectors.
[0056] Then, multiple first feature vectors corresponding to each client are arranged into a feature matrix according to the client sample dimension and processed through a convolutional neural network model to extract high-dimensional correlation feature information of the sample dimension of each client, thereby obtaining a first feature matrix.
[0057] It should be understandable that, with respect to the correlation characteristics between the data in the time dimension and the sample dimension contained in the first feature matrix, how to constrain the feature distribution from the perspective of the transmission traffic of the network attack so that the high-dimensional feature distribution of the first feature matrix can be more in line with the paradigm characteristics of the transmission traffic of the network attack is a problem that needs to be solved.
[0058] Therefore, a periodic chaotic mapping is performed on the eigenvalues of each position in the first characteristic matrix to obtain the second characteristic matrix, which is expressed as:
[0059]
[0060] where f i,j is the eigenvalue of each position of the first feature matrix before mapping, f i,j ′ is the eigenvalue of each position of the second feature matrix after mapping, f i,j mod(1) means that f i,j Perform modulo 1 operation, that is, take f i,j a and b are hyperparameters, and their initial values can be, for example, a=0.5 and b=0.2.
[0061] Furthermore, the first feature vector of the client to be predicted can be extracted from the first feature vectors corresponding to each client, and used as a query vector to perform matrix multiplication with the second feature vector to obtain a classification feature vector. Furthermore, the classification feature vector is passed through a classifier to obtain a classification result indicating whether the source IP of the client to be predicted is an attacking IP.
[0062] In this way, for the data paradigm of network attacks that have a certain degree of randomness between samples and periodicity in time in the transmission traffic, by performing periodic chaotic mapping on the eigenvalues of the first feature matrix, the second feature matrix can simulate the paradigm characteristics of the sample data from the feature distribution level in the high-dimensional feature space. At the same time, by improving the initial feature distribution to generate chaotic sequences at periodic intervals according to position intervals, the positional diversity of the feature distribution can be enhanced, thereby expanding the search range of the classifier for the feature distribution as a whole as a set in the high-dimensional feature space and improving the global classification accuracy.
[0063] Based on this, the present application proposes a cloud platform entrance real-time traffic replication method, which includes: obtaining network data packets transmitted by each client to the target IP of each cloud platform through the source IP at multiple predetermined time points; passing the network data packets transmitted by each client to the target IP of each cloud platform through the source IP at multiple predetermined time points through a temporal encoder including a one-dimensional convolutional layer and a fully connected layer to obtain a first feature vector corresponding to each client; arranging the first feature vectors corresponding to each client into a feature matrix in two dimensions according to the client sample dimension and then passing it through a convolutional neural network model to obtain a first feature matrix; performing periodic chaotic mapping on the eigenvalues of each position in the first feature matrix to obtain a second feature matrix, wherein performing periodic chaotic mapping on the eigenvalues of each position in the first feature matrix means integrating the eigenvalues of each position in the first feature matrix into a periodic function; extracting the first eigenvector of the client to be predicted from the first eigenvector corresponding to each client; performing matrix multiplication of the first eigenvector of the client to be predicted with the second eigenvector as a query vector to obtain a classification feature vector; and passing the classification feature vector through a classifier to obtain a classification result, and the classification result is used to indicate whether the source IP of the client to be predicted is an attack IP.
[0064] After introducing the basic principles of the present application, various non-limiting embodiments of the present application will be described in detail with reference to the accompanying drawings.
[0065] Exemplary Methods
[0066] Figure 1 The figure shows a flow chart of the real-time traffic replication method for the cloud platform entrance. Figure 1As shown, according to the cloud platform entrance real-time traffic replication method of the embodiment of the present application, it includes: S110, obtaining network data packets transmitted by each client to the target IP of each cloud platform through the source IP at multiple predetermined time points; S120, passing the network data packets transmitted by each of the clients to the target IP of each cloud platform through the source IP at multiple predetermined time points through a temporal encoder including a one-dimensional convolutional layer and a fully connected layer to obtain a first feature vector corresponding to each client; S130, arranging the first feature vectors corresponding to each client into a feature matrix in two dimensions according to the client sample dimension and then passing it through a convolutional neural network model to obtain a first feature matrix; S140, for each of the first feature matrix, The eigenvalues of the positions are subjected to periodic chaotic mapping to obtain a second feature matrix, wherein the periodic chaotic mapping of the eigenvalues of each position in the first feature matrix represents integrating the eigenvalues of each position in the first feature matrix into a periodic function; S150, extracting the first eigenvector of the client to be predicted from the first eigenvectors corresponding to each client; S160, taking the first eigenvector of the client to be predicted as a query vector and performing matrix multiplication with the second eigenvector to obtain a classification feature vector; and, S170, passing the classification feature vector through a classifier to obtain a classification result, wherein the classification result is used to indicate whether the source IP of the client to be predicted is an attack IP.
[0067] Figure 2 The figure shows a schematic diagram of the architecture of the cloud platform inlet real-time traffic replication method according to an embodiment of the present application. Figure 2 As shown, in the network architecture of the cloud platform entrance real-time traffic replication method, first, the network data packets (for example, Figure 2 P1 as shown in FIG) is passed through a temporal encoder including a one-dimensional convolutional layer and a fully connected layer (e.g., Figure 2 E) to obtain a first feature vector corresponding to each client (for example, Figure 2 Then, the first feature vectors corresponding to each client are arranged in two dimensions according to the client sample dimension into a feature matrix (for example, Figure 2 MF1) and then passed through a convolutional neural network model (e.g., Figure 2 ) to obtain a first feature matrix (e.g., Figure 2 Then, a periodic chaotic mapping is performed on the eigenvalues of each position in the first characteristic matrix to obtain a second characteristic matrix (for example, Figure 2MF3 shown in FIG. 3 ); then, extracting the first feature vector of the client to be predicted from the first feature vectors corresponding to each client (for example, Figure 2 Then, the first feature vector of the client to be predicted is used as a query vector and the second feature vector is matrix-multiplied to obtain a classification feature vector (for example, Figure 2 and, finally, passing the classification feature vector through a classifier (e.g., Figure 2 The circle S shown in FIG. 1 is used to obtain a classification result, wherein the classification result is used to indicate whether the source IP of the client to be predicted is an attacking IP.
[0068] In step S110 and step S120, the network data packets transmitted by each client to the target IP of each cloud platform through the source IP at multiple predetermined time points are obtained, and the network data packets transmitted by each client to the target IP of each cloud platform through the source IP at multiple predetermined time points are passed through a temporal encoder including a one-dimensional convolutional layer and a fully connected layer to obtain a first feature vector corresponding to each client. It should be understood that in the technical solution of the present application, each client transmits a network data packet to the target IP of each cloud platform through the source IP. Since it is necessary to determine which source IP or which source IPs may be an attacking IP, it is necessary not only to consider the network data packets of each source IP to each target IP at multiple predetermined time points, but also to consider the overall situation of all source IPs to all target IPs at the multiple predetermined time points, which can be used to extract associated features using a convolutional neural network model and a temporal encoder. And essentially this is also a classification problem, that is, the network data packets transmitted by each client to the target IP of each cloud platform through the source IP at multiple predetermined time points are used to classify and judge whether the source IP of the client to be predicted is an attacking IP.
[0069] Therefore, in the technical solution of the present application, first, the network data packets transmitted by each client to the target IP of each cloud platform through the source IP at multiple predetermined time points are obtained through a traffic detector. Then, the network data packets transmitted by each client to the target IP of each cloud platform through the source IP at multiple predetermined time points are respectively encoded through a timing encoder to extract the implicit correlation feature information of the network data packets transmitted by each client to the target IP of each cloud platform through the source IP at multiple predetermined time points in the time dimension, thereby obtaining multiple first feature vectors.
[0070] Specifically, in an embodiment of the present application, the process of obtaining the first feature vector corresponding to each client by passing the network data packets transmitted by each client through the source IP to the target IP of each cloud platform at multiple predetermined time points through a temporal encoder including a one-dimensional convolutional layer and a fully connected layer includes: first, arranging the network data packets transmitted by each client through the source IP to the target IP of each cloud platform at multiple predetermined time points into a one-dimensional input vector corresponding to each client according to the time dimension. Then, the fully connected layer of the temporal encoder is used to fully connect the input vector using the following formula to extract the high-dimensional implicit features of the feature values at each position in the input vector, wherein the formula is: Where X is the input vector, Y is the output vector, W is the weight matrix, and B is the bias vector. Represents matrix multiplication. Finally, the one-dimensional convolution layer of the temporal encoder is used to perform one-dimensional convolution encoding on the input vector using the following formula to extract the high-dimensional implicit correlation feature of the correlation between the eigenvalues at each position in the input vector, wherein the formula is:
[0071]
[0072] Among them, a is the width of the convolution kernel in the x direction, F is the convolution kernel parameter vector, G is the local vector matrix operated with the convolution kernel function, and w is the size of the convolution kernel.
[0073] In step S130, the first feature vectors corresponding to each client are arranged in two dimensions according to the client sample dimension into a feature matrix, and then the first feature matrix is obtained through a convolutional neural network model. That is, in the technical solution of the present application, after obtaining the first feature vectors corresponding to each client, the first feature vectors are further arranged into a feature matrix according to the client sample dimension, and then processed through a convolutional neural network model to extract high-dimensional correlation feature information of the sample dimension of the network data packets transmitted by each client, thereby obtaining the first feature matrix.
[0074] Specifically, in an embodiment of the present application, the process of arranging the first feature vectors corresponding to each client into a feature matrix in two dimensions according to the client sample dimension and then obtaining the first feature matrix through a convolutional neural network model includes: first, arranging the first feature vectors corresponding to each client into a feature matrix in two dimensions according to the client sample dimension; then, each layer of the convolutional neural network performs convolution processing based on a two-dimensional convolution kernel, pooling processing along the channel dimension, and activation processing on the input data in the forward pass of the layer to output the first feature matrix by the last layer of the convolutional neural network, wherein the input of the first layer of the convolutional neural network is the feature matrix.
[0075] In step S140, a periodic chaotic mapping is performed on the eigenvalues at each position in the first feature matrix to obtain a second feature matrix, wherein the periodic chaotic mapping of the eigenvalues at each position in the first feature matrix represents the integration of the eigenvalues at each position in the first feature matrix into a periodic function. It should be understood that, due to the correlation characteristics between the data in the time dimension and the sample dimension contained in the first feature matrix, how to constrain the feature distribution from the perspective of the transmission traffic of the network attack so that the high-dimensional feature distribution of the first feature matrix can be more in line with the paradigm characteristics of the transmission traffic of the network attack is a problem that needs to be solved. Therefore, in the technical solution of the present application, a periodic chaotic mapping is further performed on the eigenvalues at each position in the first feature matrix to obtain a second feature matrix. It is worth mentioning that, here, the periodic chaotic mapping of the eigenvalues at each position in the first feature matrix represents the integration of the eigenvalues at each position in the first feature matrix into a periodic function.
[0076] In particular, it should be understood that, for network attacks that have a certain degree of randomness between samples and periodicity in time in the transmission traffic, the data paradigm of the second feature matrix can be simulated from the feature distribution level in the high-dimensional feature space by performing periodic chaotic mapping on the eigenvalues of the first feature matrix. At the same time, the positional diversity of the feature distribution can be enhanced by improving the initial feature distribution to generate chaotic sequences at periodic intervals, thereby expanding the search range of the classifier for the feature distribution as a whole as a set in the high-dimensional feature space and improving the global classification accuracy.
[0077] Specifically, in an embodiment of the present application, the process of performing periodic chaotic mapping on the eigenvalues at each position in the first characteristic matrix to obtain the second characteristic matrix includes: performing periodic chaotic mapping on the eigenvalues at each position in the first characteristic matrix to obtain the second characteristic matrix according to the following formula; wherein the formula is:
[0078]
[0079] where f i,j is the eigenvalue of each position of the first feature matrix before mapping, f i,j ′ is the eigenvalue of each position of the second feature matrix after mapping, f i,j mod(1) means that f i,j Perform modulo 1 operation, that is, take f i,j The remainder, and a and b are hyperparameters, whose initial values can be, for example, a=0.5 and b=0.2.
[0080] In step S150 and step S160, the first feature vector of the client to be predicted is extracted from the first feature vectors corresponding to each client, and the first feature vector of the client to be predicted is used as a query vector to perform matrix multiplication with the second feature vector to obtain a classification feature vector. That is, in the technical solution of the present application, in order to accurately judge whether the source IP of the client to be predicted is an attacking IP, it is necessary to extract the first feature vector of the client to be predicted from the first feature vectors corresponding to each client. Then, the first feature vector of the client to be predicted is further used as a query vector to perform matrix multiplication with the second feature vector to obtain a classification feature vector for classification.
[0081] In step S170, the classification feature vector is passed through a classifier to obtain a classification result, and the classification result is used to indicate whether the source IP of the client to be predicted is an attacking IP. That is, in the technical solution of the present application, the classification feature vector is further passed through a classifier to obtain a classification result indicating whether the source IP of the client to be predicted is an attacking IP. In particular, in response to the classification result that the source IP of the client to be predicted is an attacking IP, the replication of the network data packet sent by the source IP of the client to be predicted is stopped.
[0082] Specifically, in the embodiment of the present application, the process of passing the classification feature vector through the classifier to obtain the classification result includes: using the classifier to process the classification feature vector using the following formula to obtain the classification result; wherein the formula is: softmax{(W n ,B n ):…:(W1,B1)|X}, where W1 to W n is the weight matrix, B1 to B n is the bias vector, and X is the classification feature vector.
[0083] In summary, the real-time traffic replication method of the cloud platform entrance of the embodiment of the present application is explained, which uses a convolutional neural network model and a timing encoder to extract high-dimensional correlation features in the time and sample dimensions for the transmission network data packets of each client at multiple predetermined time points to obtain a first feature matrix, and for network attacks that have a certain degree of randomness between samples and time periodicity in the transmission traffic data paradigm, by performing periodic chaotic mapping on the eigenvalues of the first feature matrix, the second feature matrix can simulate the paradigm characteristics of the sample data from the feature distribution level in the high-dimensional feature space, and at the same time, by improving the initial feature distribution to periodically generate chaotic sequences at position intervals to enhance the positional diversity of the feature distribution, thereby expanding the search range of the classifier for the feature distribution as a whole as a set in the high-dimensional feature space, and improving the global classification accuracy.
[0084] Exemplary Systems
[0085] Figure 3 The diagram shows a block diagram of a cloud platform inlet real-time traffic replication system according to an embodiment of the present application. Figure 3As shown, according to the cloud platform entrance real-time traffic replication system 400 of the embodiment of the present application, it includes: a network data packet acquisition unit 410, which is used to obtain network data packets transmitted by each client to the target IP of each cloud platform through the source IP at multiple predetermined time points; a timing encoding unit 420, which is used to obtain the network data packets transmitted by each client to the target IP of each cloud platform through the source IP at multiple predetermined time points obtained by the network data packet acquisition unit 410 through a timing encoder including a one-dimensional convolutional layer and a fully connected layer to obtain a first feature vector corresponding to each client; a feature extraction unit 430, which is used to arrange the first feature vectors corresponding to each client obtained by the timing encoding unit 420 into a feature matrix in two dimensions according to the client sample dimension and then obtain a first feature matrix through a convolutional neural network model; a periodic chaotic mapping unit 440, which is used to obtain each of the first feature vectors in the first feature matrix obtained by the feature extraction unit 430. The eigenvalues of the positions are subjected to periodic chaotic mapping to obtain a second feature matrix, wherein the periodic chaotic mapping of the eigenvalues of each position in the first feature matrix represents the integration of the eigenvalues of each position in the first feature matrix into a periodic function; an extraction unit 450 is used to extract the first eigenvector of the client to be predicted from the first eigenvectors corresponding to each client obtained by the timing coding unit 420; a classification feature vector generation unit 460 is used to perform matrix multiplication of the first eigenvector of the client to be predicted obtained by the extraction unit 450 as a query vector and the second eigenvector obtained by the periodic chaotic mapping unit 440 to obtain a classification feature vector; and a classification unit 470 is used to pass the classification feature vector obtained by the classification feature vector generation unit 460 through a classifier to obtain a classification result, and the classification result is used to indicate whether the source IP of the client to be predicted is an attack IP.
[0086] In one example, in the above-mentioned cloud platform entry real-time traffic replication system 400, the timing encoding unit 420 is further used to: arrange the network data packets transmitted by each of the clients to the target IP of each cloud platform at multiple predetermined time points through the source IP into a one-dimensional input vector corresponding to each of the clients according to the time dimension; use the fully connected layer of the timing encoder to fully connect the input vector using the following formula to extract the high-dimensional implicit features of the feature values at each position in the input vector, wherein the formula is: Where X is the input vector, Y is the output vector, W is the weight matrix, and B is the bias vector. represents matrix multiplication; using a one-dimensional convolution layer of a temporal encoder to perform one-dimensional convolution encoding on the input vector according to the following formula to extract a high-dimensional implicit correlation feature of the correlation between the eigenvalues at each position in the input vector, wherein the formula is:
[0087]
[0088] Among them, a is the width of the convolution kernel in the x direction, F is the convolution kernel parameter vector, G is the local vector matrix operated with the convolution kernel function, and w is the size of the convolution kernel.
[0089] In one example, in the above-mentioned cloud platform entrance real-time traffic replication system 400, the feature extraction unit 430 is further used to: arrange the first feature vectors corresponding to each client in two dimensions into a feature matrix according to the client sample dimension; and, each layer of the convolutional neural network performs convolution processing based on a two-dimensional convolution kernel, pooling processing along the channel dimension, and activation processing on the input data in the forward pass of the layer to output the first feature matrix by the last layer of the convolutional neural network, wherein the input of the first layer of the convolutional neural network is the feature matrix.
[0090] In one example, in the above-mentioned cloud platform inlet real-time traffic replication system 400, the periodic chaotic mapping unit 440 is further used to: perform periodic chaotic mapping on the eigenvalues of each position in the first characteristic matrix according to the following formula to obtain a second characteristic matrix;
[0091] Wherein, the formula is:
[0092]
[0093] where f i,j is the eigenvalue of each position of the first feature matrix before mapping, f i,j ′ is the eigenvalue of each position of the second feature matrix after mapping, f i,j mod(1) means that f i,j Perform modulo 1 operation, that is, take f i,j The remainder of , and a and b are hyperparameters.
[0094] In one example, in the above-mentioned cloud platform inlet real-time traffic replication system 400, the classification unit 470 is further used to: use the classifier to process the classification feature vector according to the following formula to obtain the classification result; wherein the formula is: softmax{(W n ,B n ):…:(W1,B1)|X}, where W1 to W n is the weight matrix, B1 to B n is the bias vector, and X is the classification feature vector.
[0095] In one example, in the above-mentioned cloud platform entry real-time traffic replication system 400, it further includes: in response to the classification result that the source IP of the client to be predicted is an attack IP, stopping the replication of network data packets sent by the source IP of the client to be predicted.
[0096] Here, those skilled in the art can understand that the specific functions and operations of the various units and modules in the above-mentioned cloud platform inlet real-time traffic replication system 400 have been referred to above. Figure 1 to Figure 2 The method for real-time traffic replication at the cloud platform entrance has been introduced in detail, and therefore, its repeated description will be omitted.
[0097] As described above, the cloud platform entrance real-time traffic replication system 400 according to the embodiment of the present application can be implemented in various terminal devices, such as a server of the cloud platform entrance real-time traffic replication algorithm. In one example, the cloud platform entrance real-time traffic replication system 400 according to the embodiment of the present application can be integrated into the terminal device as a software module and / or a hardware module. For example, the cloud platform entrance real-time traffic replication system 400 can be a software module in the operating system of the terminal device, or it can be an application developed for the terminal device; of course, the cloud platform entrance real-time traffic replication system 400 can also be one of the many hardware modules of the terminal device.
[0098] Alternatively, in another example, the cloud platform entry real-time traffic replication system 400 and the terminal device may also be separate devices, and the cloud platform entry real-time traffic replication system 400 may be connected to the terminal device via a wired and / or wireless network and transmit interactive information in accordance with an agreed data format.
[0099] Exemplary Electronic Devices
[0100] Below, reference Figure 4 To describe the electronic device according to the embodiment of the present application. Figure 4 As shown, the electronic device 10 includes one or more processors 11 and a memory 12. The processor 11 may be a central processing unit (CPU) or other processing units having data processing capability and / or instruction execution capability, and may control other components in the electronic device 10 to perform desired functions.
[0101] The memory 12 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 11 may run the program instructions to implement the functions of the cloud platform inlet real-time traffic replication method of each embodiment of the present application described above and / or other desired functions. Various contents such as a first feature vector, a classification feature vector, etc. may also be stored in the computer-readable storage medium.
[0102] In one example, the electronic device 10 may further include: an input system 13 and an output system 14, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0103] The input system 13 may include, for example, a keyboard, a mouse, and the like.
[0104] The output system 14 can output various information to the outside, including classification results, etc. The output system 14 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0105] Of course, to simplify, Figure 4 Only some of the components related to the present application in the electronic device 10 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 10 may also include any other appropriate components.
[0106] Exemplary computer program products and computer-readable storage media
[0107] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps in the functions of the cloud platform inlet real-time traffic replication method according to various embodiments of the present application described in the above "Exemplary Method" section of this specification.
[0108] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0109] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the cloud platform inlet real-time traffic replication method described in the above "Exemplary Method" section of this specification.
[0110] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, system or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0111] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.
[0112] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.
[0113] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.
[0114] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0115] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A cloud platform inlet real-time traffic replication method, characterized in that: include: Obtain network data packets transmitted from each client to the target IP of each cloud platform at multiple predetermined time points through the source IP; The network data packets transmitted by each of the clients from the source IP to the target IP of each cloud platform at multiple predetermined time points are passed through a temporal encoder including a one-dimensional convolutional layer and a fully connected layer to obtain a first feature vector corresponding to each client; Arrange the first feature vectors corresponding to each client in two dimensions according to the client sample dimension into a feature matrix and then pass it through a convolutional neural network model to obtain a first feature matrix; Performing periodic chaotic mapping on the eigenvalues at each position in the first characteristic matrix to obtain a second characteristic matrix, wherein performing periodic chaotic mapping on the eigenvalues at each position in the first characteristic matrix means integrating the eigenvalues at each position in the first characteristic matrix into a periodic function; Extracting the first feature vector of the client to be predicted from the first feature vectors corresponding to each client: Performing matrix multiplication of the first feature vector of the client to be predicted as a query vector and the second feature matrix to obtain a classification feature vector; and Passing the classification feature vector through a classifier to obtain a classification result, wherein the classification result is used to indicate whether the source IP of the client to be predicted is an attacking IP; The network data packets transmitted by each client through the source IP to the target IP of each cloud platform at multiple predetermined time points are passed through a temporal encoder including a one-dimensional convolutional layer and a fully connected layer to obtain a first feature vector corresponding to each client, including: Arrange the network data packets transmitted by each of the clients to the target IP of each cloud platform through the source IP at multiple predetermined time points into a one-dimensional input vector corresponding to each of the clients according to the time dimension; The input vector is fully connected encoded using the fully connected layer of the temporal encoder according to the following formula to extract high-dimensional implicit features of the feature values at each position in the input vector, wherein the formula is: Where X is the input vector, Y is the output vector, W is the weight matrix, and B is the bias vector. Represents matrix multiplication; The one-dimensional convolution layer of the temporal encoder is used to perform one-dimensional convolution encoding on the input vector according to the following formula to extract the high-dimensional implicit correlation feature of the correlation between the feature values at each position in the input vector, wherein the formula is: Among them, a is the width of the convolution kernel in the x direction, F is the convolution kernel parameter vector, G is the local vector matrix operated with the convolution kernel function, and w is the size of the convolution kernel; The step of performing periodic chaotic mapping on the eigenvalues at each position in the first characteristic matrix to obtain a second characteristic matrix includes: Performing periodic chaotic mapping on the eigenvalues at each position in the first characteristic matrix according to the following formula to obtain a second characteristic matrix; Wherein, the formula is: where f i,j is the eigenvalue of each position of the first feature matrix before mapping, f i,j ′ is the eigenvalue of each position of the second feature matrix after mapping, f i,j mod(1) means that f i,j Perform modulo 1 operations, that is, take f i,j The remainder of , and a and b are hyperparameters.
2. The cloud platform entrance real-time traffic replication method according to claim 1, wherein: Arranging the first feature vectors corresponding to each client in two dimensions according to the client sample dimension into a feature matrix and then passing the matrix through a convolutional neural network model to obtain a first feature matrix includes: Arranging the first feature vectors corresponding to each client in two dimensions into a feature matrix according to the client sample dimension; and In the forward pass of the layer, each layer of the convolutional neural network performs convolution processing based on a two-dimensional convolution kernel, pooling processing along the channel dimension, and activation processing on the input data so that the first feature matrix is output by the last layer of the convolutional neural network, wherein the input of the first layer of the convolutional neural network is the feature matrix.
3. The cloud platform entrance real-time traffic replication method according to claim 2, wherein: Passing the classification feature vector through a classifier to obtain a classification result includes: Using the classifier to process the classification feature vector according to the following formula to obtain the classification result; Wherein, the formula is: softmax{(W n , B n ):...:(W1,B1)|X}, where W1 to W n is the weight matrix, B1 to B n is the bias vector, and X is the classification feature vector.
4. The cloud platform inlet real-time traffic replication method according to claim 3 further comprises: In response to the classification result that the source IP of the client to be predicted is an attacking IP, the replication of the network data packet sent by the source IP of the client to be predicted is stopped.
5. A cloud platform entrance real-time traffic replication system, characterized in that: include: A network data packet acquisition unit, used to acquire network data packets transmitted by each client through a source IP to a target IP of each cloud platform at multiple predetermined time points; A temporal coding unit, configured to pass the network data packets obtained by each of the network data packet acquisition units and transmitted from the client to the target IP of each cloud platform through the source IP at multiple predetermined time points through a temporal encoder including a one-dimensional convolutional layer and a fully connected layer to obtain a first feature vector corresponding to each client; A feature extraction unit, configured to arrange the first feature vectors corresponding to each client obtained by the temporal encoding unit in two dimensions according to the client sample dimension into a feature matrix and then obtain a first feature matrix through a convolutional neural network model; A periodic chaotic mapping unit, used for performing periodic chaotic mapping on the eigenvalues at each position in the first feature matrix obtained by the feature extraction unit to obtain a second feature matrix, wherein performing periodic chaotic mapping on the eigenvalues at each position in the first feature matrix means integrating the eigenvalues at each position in the first feature matrix into a periodic function; An extraction unit, configured to extract a first feature vector of a client to be predicted from the first feature vectors corresponding to each client obtained by the temporal encoding unit; a classification feature vector generating unit, configured to perform matrix multiplication of the first feature vector of the client to be predicted obtained by the extracting unit as a query vector and the second feature matrix obtained by the periodic chaotic mapping unit to obtain a classification feature vector; and A classification unit, used for passing the classification feature vector obtained by the classification feature vector generating unit through a classifier to obtain a classification result, wherein the classification result is used to indicate whether the source IP of the client to be predicted is an attacking IP; Wherein, the timing coding unit is used for: Arrange the network data packets transmitted by each client through the source IP to the target IP of each cloud platform at multiple predetermined time points according to the time dimension into a one-dimensional input vector corresponding to each client; use the fully connected layer of the temporal encoder to fully connect the input vector using the following formula to extract the high-dimensional implicit features of the feature values at each position in the input vector, wherein the formula is: Where X is the input vector, Y is the output vector, W is the weight matrix, and B is the bias vector. represents matrix multiplication; using a one-dimensional convolution layer of a temporal encoder to perform one-dimensional convolution encoding on the input vector using the following formula to extract a high-dimensional implicit correlation feature of the correlation between the eigenvalues at each position in the input vector, wherein the formula is: Among them, a is the width of the convolution kernel in the x direction, F is the convolution kernel parameter vector, G is the local vector matrix operated with the convolution kernel function, and w is the size of the convolution kernel; Wherein, the periodic chaotic mapping unit is used for: Performing periodic chaotic mapping on the eigenvalues at each position in the first characteristic matrix according to the following formula to obtain a second characteristic matrix; Wherein, the formula is: where f i,j is the eigenvalue of each position of the first feature matrix before mapping, f i,j ′ is the eigenvalue of each position of the second feature matrix after mapping, f i,j mod(1) means that f i,j Perform modulo 1 operations, that is, take f i,j The remainder of , and a and b are hyperparameters.
6. An electronic device comprising: processor; as well as A memory, in which computer program instructions are stored, and when the computer program instructions are executed by the processor, the processor executes the cloud platform entrance real-time traffic replication method as described in any one of claims 1-4.
