Model training method, device and storage medium based on kernel autoencoder

The kernel autoencoder is used to reduce the dimensionality of the sample features of the network intrusion detection model, which solves the computational complexity problem caused by high-dimensional features and achieves more efficient model training and more accurate feature expression.

CN111860552BActive Publication Date: 2024-10-15COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910348033.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-04-28
Publication Date
2024-10-15
Estimated Expiration
2039-04-28

AI Technical Summary

Technical Problem

In the existing technology, in the training of network intrusion detection models, the computational complexity increases due to the high feature dimension of the sample data, the dimensionality reduction process is complicated and the model training complexity is high.

Method used

Using a method based on the kernel autoencoder, the sample features are dimensionally reduced through kernel PCA, and the hidden layer data is obtained as the input of the classifier. The decoded data is obtained through kernel regression processing, a loss function is constructed to train the classifier, and the regularization structure is used Risk minimization strategies reduce model training complexity.

Benefits of technology

It effectively reduces the complexity of dimensionality reduction of data features, reduces the complexity of model training, and takes into account the linear and nonlinear connections between features, so that the dimensionally reduced data features can better express the original features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111860552B_ABST
    Figure CN111860552B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a model training method, device and storage medium of a kernel autoencoder, which relates to the field of network security. The method of the present invention comprises: performing dimensionality reduction processing on sample features based on kernel PCA through the encoding module of the kernel autoencoder to obtain hidden layer data corresponding to the sample data, and using the hidden layer data as input data of the classifier; obtaining decoded data of the sample based on kernel regression processing through the decoding module of the kernel autoencoder, and using the decoded data as output data of the classifier; constructing a loss function of the classifier based on the input data and the output data; and training the classifier according to the loss function. The present invention can reduce the complexity of dimensionality reduction of data features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security, and in particular to a model training method, device and storage medium based on a kernel autoencoder. Background Art

[0002] With the rapid development of computer network technology, network technology has been widely used in various fields. While computer networks provide convenience and benefits to people, network attacks also pose great challenges to information security.

[0003] In order to protect against network attacks, intrusion detection models can be used to predict intrusions in network flows. During the model training process, the original feature dimension of the sample data is too high, which will greatly increase the computational complexity, so the sample features need to be reduced in dimension. At present, the process of reducing the dimension of sample features directly inputs the feature subset into the classifier, and selects the sample data for dimensionality reduction based on the performance of the classifier. This method leads to high computational complexity when reducing the dimension of data features, which further leads to high model training complexity. Summary of the invention

[0004] Embodiments of the present invention provide a model training method, device and storage medium based on a kernel autoencoder, which can reduce the dimensionality reduction complexity of data features.

[0005] To achieve the above object, the embodiments of the present invention adopt the following technical solutions:

[0006] In a first aspect, an embodiment of the present invention provides a model training method based on a kernel autoencoder, comprising:

[0007] Through the encoding module of the kernel autoencoder, the sample features are subjected to dimensionality reduction processing based on the kernel PCA to obtain the hidden layer data corresponding to the sample data, and the hidden layer data is used as the input data of the classifier;

[0008] Obtaining decoded data of the sample based on kernel regression processing through a decoding module of the kernel autoencoder, and using the decoded data as output data of the classifier;

[0009] Constructing a loss function of the classifier based on the input data and the output data;

[0010] The classifier is trained according to the loss function.

[0011] In combination with the first aspect, in a first possible implementation manner of the first aspect, constructing a loss function of the classifier based on the input data and the output data includes:

[0012] calculating a difference between the input data and the output data;

[0013] The modulus of the difference is added to the regularization term to obtain the loss function of the classifier.

[0014] In combination with the first aspect, or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, it is characterized in that the training of the classifier according to the loss function includes:

[0015] Based on the regularized structural risk minimization strategy, the value of the loss function is minimized and the classifier is trained.

[0016] In combination with the first aspect, in a third possible implementation manner of the first aspect, the method further includes:

[0017] When the sample feature dimension is greater than 80 dimensions, the feature dimension after dimensionality reduction based on kernel PCA is less than one third of the original feature dimension; or,

[0018] When the sample feature dimension is less than or equal to 80 dimensions, the feature dimension after dimensionality reduction based on kernel PCA is less than half of the original feature dimension.

[0019] In combination with the first aspect, in a fourth possible implementation manner of the first aspect, the classifier is used to perform network intrusion detection, and the method further includes:

[0020] Inputting network traffic into the classifier to perform network security intrusion detection;

[0021] In response to detecting the presence of an intrusion risk, current network traffic is cut off and a corresponding intrusion repair solution is initiated.

[0022] In a second aspect, an embodiment of the present invention provides a model training device based on a kernel autoencoder, comprising:

[0023] An encoding module, used for performing dimensionality reduction processing on sample features based on kernel PCA through an encoding module of a kernel autoencoder to obtain hidden layer data corresponding to the sample data, and using the hidden layer data as input data of a classifier;

[0024] A decoding module, used for obtaining decoded data of the sample based on kernel regression processing through a decoding module of a kernel autoencoder, and using the decoded data as output data of the classifier;

[0025] A construction module, used to construct a loss function of the classifier based on the input data and the output data;

[0026] A training module is used to train the classifier according to the loss function.

[0027] In conjunction with the second aspect, in a first possible implementation manner of the second aspect,

[0028] The construction module is also used to calculate the difference between the input data and the output data; and add the modulus of the difference to the regularization term to obtain the loss function of the classifier.

[0029] In combination with the second aspect, or the first possible implementation manner, in a second possible implementation manner of the second aspect,

[0030] The training module is also used to train the classifier by minimizing the value of the loss function based on a regularized structural risk minimization strategy.

[0031] In conjunction with the second aspect, in a third possible implementation of the second aspect,

[0032] The encoding module is also used to reduce the dimension of the sample features based on kernel PCA to less than one third of the original dimension when the sample feature dimension is greater than 80 dimensions; or reduce the dimension of the sample features based on kernel PCA to less than one half of the original dimension when the sample feature dimension is less than or equal to 80 dimensions.

[0033] In combination with the second aspect, in a fourth possible implementation manner of the second aspect, the apparatus further includes:

[0034] The classifier trained by the training module is used for network intrusion detection;

[0035] The detection module is used to input the network traffic into the classifier to perform network security intrusion detection; and, in response to detecting the existence of intrusion risk, cut off the current network traffic and start the corresponding intrusion repair plan.

[0036] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the steps of the method provided in the first aspect.

[0037] The model training method, device and storage medium based on the kernel autoencoder provided by the embodiment of the present invention perform dimensionality reduction processing on sample features based on kernel PCA through the encoding module of the kernel autoencoder to obtain hidden layer data corresponding to the sample data, and use the hidden layer data as the input data of the classifier; obtain the decoded data of the sample based on kernel regression processing through the decoding module of the kernel autoencoder, and use the decoded data as the output data of the classifier; construct the loss function of the classifier based on the input data and the output data; and train the classifier according to the loss function. The kernel method can be introduced to perform dimensionality reduction processing on data features through the constructed kernel autoencoder, so as to avoid the situation where the classifier is trained multiple times due to the dimensionality reduction demand for high-dimensional features, reduce the dimensionality reduction complexity of data features, and further reduce the complexity of model training; at the same time, the dimensionality reduction method takes into account the linear and nonlinear connections between features, so the data features after dimensionality reduction can better express the original features of the data. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 is a flowchart of a model training method based on a kernel autoencoder according to an embodiment of the present invention;

[0040] Figure 2 is another flowchart of a model training method based on a kernel autoencoder according to an embodiment of the present invention;

[0041] Figure 3 is a schematic diagram of the structure of a model training device based on a kernel autoencoder according to an embodiment of the present invention;

[0042] Figure 4 is another structural schematic diagram of a model training device based on a kernel autoencoder according to an embodiment of the present invention;

[0043] Figure 5 Schematic diagram of the structure of a model training device 500 based on a kernel autoencoder according to an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] An embodiment of the present invention provides a model training method based on a kernel autoencoder, such as Figure 1 As shown, the method includes:

[0046] 101. Perform dimensionality reduction processing on sample features based on kernel PCA through the encoding module of the kernel autoencoder to obtain hidden layer data corresponding to the sample data, and use the hidden layer data as input data of the classifier.

[0047] For the embodiment of the present invention, the dimensionality reduction processing of the high-dimensional features of the sample is achieved through the kernel PCA (Principal Component Analysis) in the kernel autoencoder, which can avoid the problem of high computational complexity caused by training the model through the original high-dimensional features of the sample data, that is, the complexity of model training can be reduced.

[0048] In the embodiment of the present invention, the autoencoder is an artificial neural network that can learn an efficient representation of input data through unsupervised learning. This efficient representation of input data is called encoding, and the dimension after encoding is generally much smaller than the feature dimension of the input data itself. Therefore, in the embodiment of the present invention, the autoencoder is used to reduce the dimensionality of high-dimensional features.

[0049] 102. Obtain decoded data of the sample based on kernel regression processing through a decoding module of the kernel autoencoder, and use the decoded data as output data of the classifier.

[0050] 103. Construct a loss function of the classifier based on the input data and the output data.

[0051] The loss function refers to a function that maps the value of a random event or a random variable related to a random event to a non-negative real number to represent the risk or loss of the random event. In an embodiment of the present invention, the loss function of the classifier is used to characterize the risk of errors in the classification prediction results of the traffic data when the classifier is used to perform classification prediction.

[0052] 104. Train the classifier according to the loss function.

[0053] Among them, the classifier is trained by minimizing the loss function to minimize the probability of incorrect results when the classifier classifies and predicts the data traffic, that is, to maximize the accuracy of the classifier's classification prediction results.

[0054] For the embodiment of the present invention, a kernel method is introduced in the encoding stage and the decoding stage of the autoencoder to construct a kernel autoencoder, so as to achieve dimensionality reduction processing of high-dimensional features; at the same time, a regularized structural risk minimization strategy is adopted, that is, a method of minimizing the loss function of the constructed classification model to train the classification model, which can avoid multiple training of the classification model, thereby reducing the complexity of model training.

[0055] Compared with the prior art, the embodiment of the present invention can introduce the kernel method and perform dimensionality reduction processing on data features through the constructed kernel autoencoder. This can avoid the situation where the classifier is trained multiple times due to the need for dimensionality reduction of high-dimensional features, reduce the complexity of dimensionality reduction of data features, and further reduce the complexity of model training. At the same time, the dimensionality reduction method takes into account the linear and nonlinear connections between features, so the data features after dimensionality reduction can better express the original characteristics of the data.

[0056] Another embodiment of the present invention provides a model training method based on a kernel autoencoder, such as Figure 2 As shown, the method includes:

[0057] 201. Perform dimensionality reduction processing on sample features based on kernel PCA through the encoding module of the kernel autoencoder to obtain hidden layer data corresponding to the sample data, and use the hidden layer data as input data of the classifier.

[0058] For the embodiment of the present invention, the dimensionality reduction processing of the high-dimensional features of the sample is achieved through the kernel PCA (Principal Component Analysis) in the kernel autoencoder, which can avoid the problem of high computational complexity caused by training the model through the original high-dimensional features of the sample data, that is, the complexity of model training can be reduced.

[0059] In the embodiment of the present invention, the autoencoder is an artificial neural network that can learn an efficient representation of input data through unsupervised learning. This efficient representation of input data is called encoding, and the dimension after encoding is generally much smaller than the feature dimension of the input data itself. Therefore, in the embodiment of the present invention, the autoencoder is used to reduce the dimensionality of high-dimensional features.

[0060] Optionally, when the sample feature dimension is greater than 80 dimensions, the feature dimension after dimensionality reduction processing of the sample features based on kernel PCA is less than one-third of the original feature dimension; or, when the sample feature dimension is less than or equal to 80 dimensions, the feature dimension after dimensionality reduction processing of the sample features based on kernel PCA is less than one-half of the original feature dimension.

[0061] For example, when the original feature dimension of the sample is 90 dimensions, the feature dimension of the sample after dimensionality reduction processing by the kernel PCA based on the kernel autoencoder is less than 30 dimensions; when the original feature dimension of the sample is 50 dimensions, the feature dimension of the sample after dimensionality reduction processing by the kernel PCA based on the kernel autoencoder is less than 25 dimensions.

[0062] For the embodiment of the present invention, the above-mentioned dimensional demarcation point and the proportion of the number of dimensions after dimensionality reduction can be set by the user in real time according to the network situation, or can be set in advance according to historical data, and the embodiment of the present invention does not limit it. It should be noted that the above-mentioned dimensional demarcation point and the proportion of the number of dimensions after dimensionality reduction are not limited to the above-mentioned values, and any value is within the protection scope of the embodiment of the present invention.

[0063] For example, alternatively, when the sample feature dimension is greater than 58 dimensions, the feature dimension after dimensionality reduction processing based on kernel PCA is less than half of the original feature dimension; or, when the sample feature dimension is less than or equal to 58 dimensions, the feature dimension after dimensionality reduction processing based on kernel PCA is less than two-thirds of the original feature dimension.

[0064] 202. Obtain decoded data of the sample based on kernel regression processing through a decoding module of the kernel autoencoder, and use the decoded data as output data of the classifier.

[0065] 203. Construct a loss function of the classifier based on the input data and the output data.

[0066] The loss function refers to a function that maps the value of a random event or a random variable related to a random event to a non-negative real number to represent the risk or loss of the random event. In an embodiment of the present invention, the loss function of the classifier is used to characterize the risk of errors in the classification prediction results of the traffic data when the classifier is used to perform classification prediction.

[0067] For the embodiment of the present invention, step 203 may specifically be: calculating the difference between the input data and the output data; adding the modulus of the difference to the regularization term to obtain the loss function of the classifier.

[0068] For the embodiment of the present invention, the above-mentioned method of constructing a loss function based on input data and output data is an implementation method of the embodiment of the present invention, and other methods of constructing a loss function of a classifier based on the input data obtained in step 201 and the output data obtained in step 202 are all within the protection scope of the embodiment of the present invention.

[0069] 204. Based on a regularized structural risk minimization strategy, the value of the loss function is minimized and the classifier is trained.

[0070] Among them, the classifier is trained by minimizing the loss function to minimize the probability of incorrect results when the classifier classifies and predicts the data traffic, that is, to maximize the accuracy of the classifier's classification prediction results.

[0071] 205. Input the network traffic into the classifier to perform network security intrusion detection.

[0072] For the embodiment of the present invention, the classifier obtained by the above training method can be used for network security intrusion detection, that is, the classifier can be used as a network model of an intrusion detection system (IDS), through which potential intrusion attacks in network traffic can be predicted in real time.

[0073] 206. In response to detecting the presence of an intrusion risk, current network traffic is cut off and a corresponding intrusion repair solution is initiated.

[0074] Compared with the prior art, the embodiment of the present invention can introduce the kernel method and perform dimensionality reduction processing on data features through the constructed kernel autoencoder. This can avoid the situation where the classifier is trained multiple times due to the need for dimensionality reduction of high-dimensional features, reduce the complexity of dimensionality reduction of data features, and further reduce the complexity of model training. At the same time, the dimensionality reduction method takes into account the linear and nonlinear connections between features, so the data features after dimensionality reduction can better express the original characteristics of the data.

[0075] Another embodiment of the present invention provides a model training device based on a kernel autoencoder, such as Figure 3 As shown, the device comprises:

[0076] An encoding module 31 is used to perform dimensionality reduction processing on sample features based on kernel PCA through an encoding module of a kernel autoencoder to obtain hidden layer data corresponding to the sample data, and use the hidden layer data as input data of a classifier;

[0077] A decoding module 32, configured to obtain decoded data of the sample based on kernel regression processing through a decoding module of a kernel autoencoder, and use the decoded data as output data of the classifier;

[0078] A construction module 33, used to construct a loss function of the classifier based on the input data and the output data;

[0079] The training module 34 is used to train the classifier according to the loss function.

[0080] The construction module 33 is further used to calculate the difference between the input data and the output data; and add the modulus of the difference to the regularization term to obtain the loss function of the classifier.

[0081] The training module 34 is further used to train the classifier by minimizing the value of the loss function based on a regularized structural risk minimization strategy.

[0082] The encoding module 31 is also used to reduce the dimension of the sample features based on kernel PCA to less than one third of the original dimension when the sample feature dimension is greater than 80 dimensions; or reduce the dimension of the sample features based on kernel PCA to less than one half of the original dimension when the sample feature dimension is less than or equal to 80 dimensions.

[0083] Further, such as Figure 4 As shown, the device may also include:

[0084] The classifier trained by the training module 34 is used for network intrusion detection;

[0085] The detection module 41 is used to input the network traffic into the classifier to perform network security intrusion detection; and, in response to detecting the existence of intrusion risk, cut off the current network traffic and start the corresponding intrusion repair plan.

[0086] Compared with the prior art, the embodiment of the present invention can introduce the kernel method and perform dimensionality reduction processing on data features through the constructed kernel autoencoder. This can avoid the situation where the classifier is trained multiple times due to the need for dimensionality reduction of high-dimensional features, reduce the complexity of dimensionality reduction of data features, and further reduce the complexity of model training. At the same time, the dimensionality reduction method takes into account the linear and nonlinear connections between features, so the data features after dimensionality reduction can better express the original characteristics of the data.

[0087] The embodiment of the present invention also provides another computer-readable storage medium, which can be the computer-readable storage medium contained in the memory in the above embodiment; or it can be a computer-readable storage medium that exists independently and is not installed in the terminal. The computer-readable storage medium stores one or more programs, and the one or more programs are used by one or more processors to execute Figure 1 , Figure 2The illustrated embodiment provides a model training method based on a kernel autoencoder.

[0088] The model training device based on the kernel autoencoder provided in the embodiment of the present invention can implement the method embodiment provided above. For the specific function implementation, please refer to the description in the method embodiment, which will not be repeated here. The model training method, device and storage medium based on the kernel autoencoder provided in the embodiment of the present invention can be applied to intrusion detection of network security, but are not limited to this.

[0089] like Figure 5 As shown, the model training device 500 based on the kernel autoencoder can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a personal digital assistant, etc.

[0090] Reference Figure 5 The kernel autoencoder-based model training device 500 may include one or more of the following components: a processing component 502, a memory 504, a power component 506, a multimedia component 508, an audio component 510, an input / output (I / O) interface 512, a sensor component 514, and a communication component 516.

[0091] The processing component 502 generally controls the overall operation of the drone control device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions.

[0092] In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.

[0093] The memory 504 is configured to store various types of data to support operations on the drone control device 500. Examples of such data include instructions for any application or method operating on the drone control device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0094] The power supply assembly 506 provides power to various components of the drone control device 500. The power supply assembly 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the drone control device 500.

[0095] The multimedia component 508 includes a screen that provides an output interface between the drone control device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the drone control device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0096] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the drone control device 500 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.

[0097] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0098] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the drone control device 500. For example, the sensor assembly 514 can detect the open / closed state of the drone control device 500, the relative positioning of components, such as the display and keypad of the drone control device 500, the sensor assembly 514 can also detect the position change of the drone control device 500 or a component of the drone control device 500, the presence or absence of user contact with the drone control device 500, the orientation or acceleration / deceleration of the drone control device 500, and the temperature change of the drone control device 500. The sensor assembly 514 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0099] The communication component 516 is configured to facilitate wired or wireless communication between the drone control device 500 and other devices. The drone control device 500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0100] In an exemplary embodiment, the drone control device 500 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.

[0101] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0102] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0103] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A model training method based on a kernel autoencoder, characterized in that: include: Through the encoding module of the kernel autoencoder, the sample features are subjected to dimensionality reduction processing based on the kernel PCA to obtain hidden layer data corresponding to the sample data, and the hidden layer data is used as the input data of the classifier; when the dimension of the sample features is greater than 80 dimensions, the feature dimension after the dimensionality reduction processing of the sample features based on the kernel PCA is less than one third of the original sample feature dimension; or, when the dimension of the sample features is less than or equal to 80 dimensions, the feature dimension after the dimensionality reduction processing of the sample features based on the kernel PCA is less than one half of the original feature dimension; Obtaining decoded data of the sample based on kernel regression processing through a decoding module of the kernel autoencoder, and using the decoded data as output data of the classifier; Constructing a loss function of the classifier based on the input data and the output data; According to the loss function, the classifier is trained unsupervised: Inputting network traffic into the classifier to perform network security intrusion detection; In response to detecting the presence of an intrusion risk, current network traffic is cut off and a corresponding intrusion repair solution is initiated.

2. The model training method based on the kernel autoencoder according to claim 1, characterized in that: The step of constructing a loss function of the classifier based on the input data and the output data includes: calculating a difference between the input data and the output data; The modulus of the difference is added to the regularization term to obtain the loss function of the classifier.

3. The model training method based on kernel autoencoder according to claim 1 or 2, characterized in that: The training of the classifier according to the loss function comprises: Based on the regularized structural risk minimization strategy, the value of the loss function is minimized and the classifier is trained.

4. The model training method based on kernel autoencoder according to claim 1, characterized in that: The method further comprises: When the sample feature dimension is greater than 80 dimensions, the feature dimension after dimensionality reduction based on kernel PCA is less than one third of the original feature dimension; or, When the sample feature dimension is less than or equal to 80 dimensions, the feature dimension after dimensionality reduction based on kernel PCA is less than half of the original feature dimension.

5. A model training device based on a kernel autoencoder, characterized in that: include: An encoding module, used for performing dimensionality reduction processing on sample features based on kernel PCA through an encoding module of a kernel autoencoder to obtain hidden layer data corresponding to the sample data, and using the hidden layer data as input data of a classifier; when the dimension of the sample feature is greater than 80 dimensions, the feature dimension after the dimensionality reduction processing on the sample feature based on the kernel PCA is less than one third of the original sample feature dimension; or, when the dimension of the sample feature is less than or equal to 80 dimensions, the feature dimension after the dimensionality reduction processing on the sample feature based on the kernel PCA is less than one half of the original feature dimension; A decoding module, used for obtaining decoded data of the sample based on kernel regression processing through a decoding module of a kernel autoencoder, and using the decoded data as output data of the classifier; A construction module, used for constructing a loss function of the classifier based on the input data and the output data; A training module, used for performing unsupervised training on the classifier according to the loss function; The classifier trained by the training module is used for network intrusion detection; A detection module, used for inputting network traffic into the classifier to perform network security intrusion detection; And, in response to detecting the existence of an intrusion risk, current network traffic is cut off and a corresponding intrusion repair solution is initiated.

6. The model training device based on kernel autoencoder according to claim 5, characterized in that: The construction module is also used to calculate the difference between the input data and the output data; and add the modulus of the difference to the regularization term to obtain the loss function of the classifier.

7. The model training device based on the kernel autoencoder according to claim 5 or 6, characterized in that: The training module is also used to train the classifier by minimizing the value of the loss function based on a regularized structural risk minimization strategy.

8. The model training device based on kernel autoencoder according to claim 5, characterized in that: The encoding module is also used to reduce the dimension of the sample features based on kernel PCA to less than one third of the original dimension when the sample feature dimension is greater than 80 dimensions; or reduce the dimension of the sample features based on kernel PCA to less than one half of the original dimension when the sample feature dimension is less than or equal to 80 dimensions.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.