Mining program detection method and system based on capsule network model of deep learning

The capsule network model based on deep learning is used to monitor the operation data of the target equipment and extract feature values, which solves the problem of inaccurate detection of mining programs in the existing technology, achieves efficient and accurate detection results, and does not affect the operation of the equipment. Reasonably select CPU and GPU parameters.

CN118260744BActive Publication Date: 2024-10-15JIANGNAN INFORMATION SECURITY (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310967606.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-03
Publication Date
2024-10-15
Estimated Expiration
2043-08-03

AI Technical Summary

Technical Problem

The mining program detection methods in the existing technology lack versatility, resulting in inaccurate detection results and affecting the operations of enterprises and individual netizens.

Method used

Using a capsule network model based on deep learning, through the operation data monitoring, feature value extraction and weight calculation of the target device, the OpenHardwareMonitor tool is used to obtain CPU and GPU information for real-time detection.

Benefits of technology

It achieves efficient and accurate mining program detection, improves the accuracy and versatility of detection, and can reasonably select CPU and GPU parameters when the machine is running or not running the mining program.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118260744B_ABST
    Figure CN118260744B_ABST
Patent Text Reader

Abstract

The present invention discloses a mining program detection method and system based on a deep learning-based capsule network model, including: monitoring the operation data of a target device to obtain the operation data; determining the characteristic value corresponding to each sampling moment based on the operation data, and determining the input data according to the characteristic values ​​corresponding to all sampling moments; and detecting the mining program based on the input data and a preset deep learning-based capsule network model. The present invention aims to solve the current problem of inaccurate detection of mining programs, and can achieve efficient and accurate detection of mining programs, while being able to reasonably and economically select CPU and GPU parameters when the machine is running or not running the mining program.
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 technology, and more specifically, to a mining program detection method and system based on a deep learning capsule network model. Background Art

[0002] For enterprises and Internet users, in addition to facing threats such as ransomware, another common type of network threat they often face is infection with malicious mining programs. Malicious mining is to occupy the system resources and network resources of the user's terminal device for mining without the user's knowledge or permission, so as to obtain virtual currency for profit. It can usually occur on the user's personal computer, corporate website or server, personal mobile phone, and network router. In related technologies, the current detection of mining programs is mostly based on empirical troubleshooting and technical troubleshooting methods, such as checking process behavior, network connection status, self-starting or task scheduling scripts, related configuration files, log files, etc. These methods are difficult to be universal, resulting in inaccurate detection results of mining programs, which in turn affects the subsequent operations of enterprises and individual Internet users.

[0003] Therefore, how to select parameters for mining program detection so that they are universal and how to reasonably design a deep learning model that uses these parameter data to detect mining programs is an urgent problem that needs to be solved. Summary of the invention

[0004] The present invention proposes a mining program detection method and system based on a deep learning network model to solve the problem of how to detect mining programs efficiently and accurately.

[0005] In order to solve the above problem, according to one aspect of the present invention, a mining program detection method based on a capsule network model of deep learning is provided, characterized in that the method comprises:

[0006] Monitoring the operation data of the target device and obtaining the operation data;

[0007] Determine a characteristic value corresponding to each sampling moment based on the operation data, and determine input data according to the characteristic values ​​corresponding to all sampling moments; and

[0008] The mining program is detected based on the input data and a preset deep learning-based capsule network model.

[0009] Preferably, monitoring the operating data of the target device and obtaining the operating data includes:

[0010] A hardware monitoring tool (OpenHardwareMonitor) is used to monitor the target device in real time to obtain CPU information and GPU information of the target device during operation, and the operation data is obtained based on the CPU information and GPU information.

[0011] Preferably, determining the characteristic value corresponding to each sampling moment based on the operating data includes:

[0012] Performing format conversion on the operation data, selecting demand characteristic data from the operation data after the format conversion based on the demand information, and removing unit information of the demand characteristic data;

[0013] The weight of each feature in the demand feature data is calculated, and the feature value corresponding to each sampling moment is determined based on the weight of each feature.

[0014] Preferably, the weight of each feature in the demand feature data is calculated in the following manner, including:

[0015]

[0016] cos(x h ,x p )=x h *x p / (|x h |*|x p |),

[0017] The feature value corresponding to each sampling moment is determined based on the weight of each feature in the following manner, including:

[0018]

[0019] Among them, K h is the weight of the hth feature; N1 is the difference between the number of selected features minus 1; cos(x h ,x p ) is the distance between the hth feature and the pth feature; x h is the feature data corresponding to the hth feature; x p is the feature data corresponding to the pth feature, h, p and N1 are natural numbers; |x h | is the modulus of the feature data corresponding to the hth feature; |x p | is the modulus of the feature data corresponding to the pth feature; X is the feature value corresponding to each sampling moment.

[0020] Preferably, the method further comprises:

[0021] The capsule network model based on deep learning is trained in the following manner to obtain the preset capsule network model based on deep learning, including:

[0022] Initialization vector b ij ; Where i represents the i-th capsule unit in the previous L layers, and j represents the j-th capsule unit in the current L+1 layer;

[0023] For the i-th capsule unit of the first L layers, based on the vector b ij Perform a softmax operation to obtain the coupling coefficient c of the i-th capsule unit to the j-th capsule unit of the current layer L+1 ij ;

[0024] Based on the neuron vector and the corresponding weight matrix in the i-th capsule unit, calculate the prediction vector of the i-th capsule unit for the j-th capsule unit in the current layer L+1

[0025] Based on the coupling coefficient c of the i-th capsule unit to the j-th capsule unit of the current layer L+1 ij and the prediction vector Calculate the input vector s corresponding to the j-th capsule unit j ;

[0026] Based on the input vector s corresponding to the j-th capsule unit j The input vector s for the next capsule unit j+1 i+1 Perform enhancement processing;

[0027] Compress all enhanced input vectors to obtain the output vector v of the j-th capsule unit to be passed to the current layer L+1 layer j ;

[0028] For vector b ij Perform dynamic update operation and re-input vector s j The training is completed when the number of iterations reaches a preset number, and the preset capsule network model based on deep learning is obtained.

[0029] Preferably, the coupling coefficient c of the i-th capsule unit to the j-th capsule unit of the current layer L+1 is obtained in the following manner: ij ,include:

[0030]

[0031]

[0032] Among them, j represents the value of the jth category in the neural network output vector; k represents the number of categories of the neural network; is the standard exponential function applied to each element of the input vector of the i-th capsule unit in the first L layers; is the standard exponential function applied to each element of the input vector of the jth capsule unit in the current layer L+1; c i is the input vector of the softmax function; exp(c i ) is the standard exponential function applied to the input vector of the softmax function.

[0033] Preferably, the input vector s corresponding to the j-th capsule unit is calculated in the following way: j ,include:

[0034]

[0035] Among them, c ij is the coupling coefficient of the i-th capsule unit to the j-th capsule unit in the current layer L+1; W ij is the weight corresponding to the i-th capsule unit in the previous L layers and the j-th capsule unit in the current L+1 layer in the weight matrix; u i W represents the i-th capsule unit in the first L layers containing a group of neurons; ij u i is the prediction vector corresponding to the i-th capsule unit.

[0036] Preferably, the compression operation is performed on all enhanced input vectors to obtain the output vector v of the j-th capsule unit to be transmitted to the current layer L+1 layer. j ,include:

[0037]

[0038] Among them, v j is the output vector of the jth capsule unit to be passed to the current layer L+1 layer; s j ′ is the enhanced input vector corresponding to the jth capsule unit; ||s j ′|| is s j ′, which refers to the vector norm of vector s in the vector space j The size of ′.

[0039] Preferably, the pair vector b ij Perform dynamic update operations, including:

[0040] Using the output vector v of the j-th capsule unit in the L+1 layer j and the prediction vector obtained from the L-layer capsule unit Do the dot product and add the original vector bij Update to get the new vector b ij .

[0041] According to another aspect of the present invention, a mining program detection system based on a deep learning capsule network model is provided, the system comprising:

[0042] An operation data acquisition module, used to monitor the operation data of the target device and acquire the operation data;

[0043] An input data acquisition module, used to determine the characteristic value corresponding to each sampling moment based on the operation data, and determine the input data according to the characteristic values ​​corresponding to all sampling moments;

[0044] A detection module is used to detect the mining program based on the input data and a preset deep learning-based capsule network model.

[0045] Preferably, the operation data acquisition module monitors the operation data of the target device and acquires the operation data, including:

[0046] A hardware monitoring tool (OpenHardwareMonitor) is used to monitor the target device in real time to obtain CPU information and GPU information of the target device during operation, and the operation data is obtained based on the CPU information and GPU information.

[0047] Preferably, the input data acquisition module determines the characteristic value corresponding to each sampling moment based on the operation data, including:

[0048] Performing format conversion on the operation data, selecting demand characteristic data from the operation data after the format conversion based on the demand information, and removing unit information of the demand characteristic data;

[0049] The weight of each feature in the demand feature data is calculated, and the feature value corresponding to each sampling moment is determined based on the weight of each feature.

[0050] Preferably, the input data acquisition module calculates the weight of each feature in the demand feature data in the following manner, including:

[0051]

[0052] cos(x h ,x p )=x h *x p / (|x h |*|x p |),

[0053] The feature value corresponding to each sampling moment is determined based on the weight of each feature in the following manner, including:

[0054]

[0055] Among them, K h is the weight of the hth feature; N1 is the difference between the number of selected features minus 1; cos(x h ,x p ) is the distance between the hth feature and the pth feature; x h is the feature data corresponding to the hth feature; x p is the feature data corresponding to the pth feature, h, p and N1 are natural numbers; |x h | is the modulus of the feature data corresponding to the hth feature; |x p | is the modulus of the feature data corresponding to the pth feature; X is the feature value corresponding to each sampling moment.

[0056] Preferably, the system further comprises: a model training module, for:

[0057] The capsule network model based on deep learning is trained in the following manner to obtain the preset capsule network model based on deep learning, including:

[0058] Initialization vector b ij ; Where i represents the i-th capsule unit in the previous L layers, and j represents the j-th capsule unit in the current L+1 layer;

[0059] For the i-th capsule unit of the first L layers, based on the vector b ij Perform a softmax operation to obtain the coupling coefficient c of the i-th capsule unit to the j-th capsule unit of the current layer L+1 ij ;

[0060] Based on the neuron vector and the corresponding weight matrix in the i-th capsule unit, calculate the prediction vector of the i-th capsule unit for the j-th capsule unit in the current layer L+1

[0061] Based on the coupling coefficient c of the i-th capsule unit to the j-th capsule unit of the current layer L+1 ij and the prediction vector Calculate the input vector s corresponding to the j-th capsule unit j ;

[0062] Based on the input vector s corresponding to the j-th capsule unit j The input vector s for the next capsule unit j+1 i+1 Perform enhancement processing;

[0063] Compress all enhanced input vectors to obtain the output vector v of the j-th capsule unit to be passed to the current layer L+1 layer j ;

[0064] For vector b ij Perform dynamic update operation and re-input vector s j The training is completed when the number of iterations reaches a preset number, and the preset capsule network model based on deep learning is obtained.

[0065] Preferably, the model training module obtains the coupling coefficient c of the i-th capsule unit to the j-th capsule unit of the current layer L+1 by the following method: ij ,include:

[0066]

[0067]

[0068] Among them, j represents the value of the jth category in the neural network output vector; k represents the number of categories of the neural network; is the standard exponential function applied to each element of the input vector of the i-th capsule unit in the first L layers; is the standard exponential function applied to each element of the input vector of the jth capsule unit in the current layer L+1; c i is the input vector of the softmax function; exp(c i ) is the standard exponential function applied to the input vector of the softmax function.

[0069] Preferably, the model training module calculates the input vector s corresponding to the j-th capsule unit in the following manner: j ,include:

[0070]

[0071] Among them, c ij is the coupling coefficient of the i-th capsule unit to the j-th capsule unit in the current layer L+1; W ij is the weight corresponding to the i-th capsule unit in the previous L layers and the j-th capsule unit in the current L+1 layer in the weight matrix; u i W represents the i-th capsule unit in the first L layers containing a group of neurons; ij u i is the prediction vector corresponding to the i-th capsule unit.

[0072] Preferably, the model training module performs a compression operation on all enhanced input vectors to obtain the output vector v of the j-th capsule unit to be transmitted to the current layer L+1 layer. j ,include:

[0073]

[0074] Among them, v j is the output vector of the jth capsule unit to be passed to the current layer L+1 layer; s j ′ is the enhanced input vector corresponding to the jth capsule unit; ||s j ′|| is s j ′, which refers to the vector norm of vector s in the vector space j The size of ′.

[0075] Preferably, the model training module, the vector b ij Perform dynamic update operations, including:

[0076] Using the output vector v of the j-th capsule unit in the L+1 layer j and the prediction vector obtained from the L-layer capsule unit Do the dot product and add the original vector b ij Update to get the new vector b ij .

[0077] Based on another aspect of the present invention, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any step of a mining program detection method based on a deep learning capsule network model.

[0078] According to another aspect of the present invention, the present invention provides an electronic device, including:

[0079] The computer-readable storage medium described above; and

[0080] One or more processors are used to execute the program in the computer-readable storage medium.

[0081] The present invention provides a mining program detection method and system based on a deep learning-based capsule network model, including: monitoring the operation data of a target device to obtain the operation data; determining the characteristic value corresponding to each sampling moment based on the operation data, and determining the input data according to the characteristic values ​​corresponding to all sampling moments; and detecting the mining program based on the input data and a preset deep learning-based capsule network model. The present invention aims to solve the current problem of inaccurate detection of mining programs, and can achieve efficient and accurate detection of mining programs, while being able to reasonably and economically select CPU and GPU parameters when the machine is running or not running the mining program. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] A more complete understanding of exemplary embodiments of the present invention may be obtained by referring to the following drawings:

[0083] Figure 1 is a flowchart of a mining program detection method 100 based on a deep learning capsule network model according to an embodiment of the present invention;

[0084] Figure 2 Schematic diagram of the structure of a mining program detection system 200 based on a deep learning capsule network model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0085] Now, exemplary embodiments of the present invention are described with reference to the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided to disclose the present invention in detail and completely and to fully convey the scope of the present invention to those skilled in the art. The terms used in the exemplary embodiments shown in the accompanying drawings are not intended to limit the present invention. In the accompanying drawings, the same units / elements are marked with the same reference numerals.

[0086] Unless otherwise specified, the terms (including technical terms) used herein have the commonly understood meanings to those skilled in the art. In addition, it is understood that the terms defined in commonly used dictionaries should be understood to have the same meanings as those in the context of the relevant fields, and should not be understood as idealized or overly formal meanings.

[0087] Figure 1 FIG. 1 is a flowchart of a mining program detection method 100 based on a deep learning capsule network model according to an embodiment of the present invention. Figure 1As shown, the mining program detection method based on the deep learning network model provided by the embodiment of the present invention aims to solve the problem of inaccurate detection of mining programs at present, and can realize efficient and accurate detection of mining programs, while being able to reasonably and economically select CPU and GPU parameters when the machine is running or not running the mining program. The mining program detection method 100 based on the deep learning network model provided by the embodiment of the present invention starts from step 101. In step 101, the operation data of the target device is monitored to obtain the operation data.

[0088] Preferably, the step of monitoring the operating data of the target device and obtaining the operating data includes:

[0089] The OpenHardwareMonitor tool is used to monitor the target device in real time to obtain the CPU information and GPU information of the target device when it is running, so as to obtain the operating data.

[0090] In the present invention, the operating data of the computer during daily work is monitored in real time by the OpenHardwareMonitor tool, including the status of the CPU and GPU. The OpenHardwareMonitor tool is an exe file, which runs on the web, so the monitoring program must be started at the same time to collect the information on the web.

[0091] In step 102, a characteristic value corresponding to each sampling moment is determined based on the operation data, and input data is determined according to the characteristic values ​​corresponding to all sampling moments.

[0092] Preferably, the determining of the characteristic value corresponding to each sampling moment based on the operating data includes:

[0093] Performing format conversion on the operation data, selecting demand characteristic data from the operation data after the format conversion based on the demand information, and removing unit information of the demand characteristic data;

[0094] The weight of each feature in the demand feature data is calculated, and the feature value corresponding to each sampling moment is determined based on the weight of each feature.

[0095] Preferably, the method calculates the weight of each feature in the demand feature data in the following manner, including:

[0096]

[0097] cos(x h ,x p )=x h *x p / (|x h|*|x p |),

[0098] The method determines the feature value corresponding to each sampling moment based on the weight of each feature in the following manner, including:

[0099]

[0100] Among them, K h is the weight of the hth feature; N1 is the difference between the number of selected features and 1; cos(x h ,x p ) is the distance between the hth feature and the pth feature; x h is the feature data corresponding to the hth feature; x p is the feature data corresponding to the pth feature.

[0101] Where h, p and N1 are natural numbers; |x h | is the modulus of the feature data corresponding to the hth feature; |x p | is the modulus of the feature data corresponding to the pth feature; X is the feature value corresponding to each sampling moment.

[0102] In the present invention, the collected operation data is in json format and placed in a local txt file, so it is converted into a CSV file by a python program, and each column in the CSV file corresponds to the data of a CPU or GPU parameter. Then, the CPU and GPU parameters to be used are selected. For example, the parameters that can be selected are: cpu_total_load (CPU total load), cpu_package_power (CPU package power consumption), cpu_cores_power (CPU core power consumption), gpu_core_load (GPU core load), gpu_frame_buffer_load (GPU frame buffer), gpu_bus_interface_load (GPU bus interface load), gpu_power (GPU power consumption), gpu_pcie_rx (GPU high-bandwidth extension bus receiving amount) and gpu_pcie_tx (GPU high-bandwidth extension bus sending amount).

[0103] Finally, the units of the selected CPU and GPU parameter data are cleaned, and calculations are performed based on the cleaned data to determine the eigenvalues ​​corresponding to each sampling moment. The eigenvalues ​​corresponding to all sampling moments are input into the trained model as input data to detect the mining program.

[0104] In the present invention, the weight of each feature in the demand feature data is calculated in the following manner, including:

[0105]

[0106] cos(x h ,x p )=x h *x p / (|x h |*|x p |),

[0107] Then, the feature value corresponding to each sampling moment is determined based on the weight of each feature in the following manner, including:

[0108]

[0109] Among them, K h is the weight of the hth feature; N1 is the difference between the number of selected features and 1; cos(x h ,x p ) is the distance between the hth feature and the pth feature. The cosine of the angle in geometry can be used to measure the difference in the directions of two vectors. This concept is used in machine learning to measure the difference between features. h is the feature data corresponding to the hth feature; x p is the feature data corresponding to the pth feature.

[0110] In step 103, the mining program is detected based on the input data and a preset deep learning-based capsule network model.

[0111] Preferably, the method further comprises:

[0112] The capsule network model based on deep learning is trained in the following manner to obtain the preset capsule network model based on deep learning, including:

[0113] Initialization vector b ij ; Where i represents the i-th capsule unit in the previous layer L-1, and j represents the j-th capsule unit in the current layer L;

[0114] For the i-th capsule unit in the first L-1 layer, based on the vector b ij Perform a softmax operation to obtain the coupling coefficient c of the i-th capsule unit to the j-th capsule unit in the current layer ij ;

[0115] Based on the neuron vector and the corresponding weight matrix in the i-th capsule unit, calculate the prediction vector of the i-th capsule unit for the j-th capsule unit in the current layer

[0116] Based on the coupling coefficient c of the i-th capsule unit to the j-th capsule unit in the current layerij and the prediction vector Calculate the input vector s corresponding to the j-th capsule unit j ;

[0117] Based on the input vector s corresponding to the j-th capsule unit j The input vector s for the next capsule unit j+1 i+1 Make enhancements;

[0118] Compress all enhanced input vectors to obtain the output vector v passed to the upper capsule unit j ;

[0119] Weight b ij A dynamic update operation is performed and the input vector is recalculated until the number of iterations reaches a preset number, and the training is completed to obtain the preset capsule network model based on deep learning.

[0120] Alternatively, the initialization vector b ij ; Where i represents the i-th capsule unit in the previous L layers, and j represents the j-th capsule unit in the current L+1 layer;

[0121] For the i-th capsule unit of the first L layers, based on the vector b ij Perform a softmax operation to obtain the coupling coefficient c of the i-th capsule unit to the j-th capsule unit of the current layer L+1 ij ;

[0122] Based on the neuron vector and the corresponding weight matrix in the i-th capsule unit, calculate the prediction vector of the i-th capsule unit for the j-th capsule unit in the current layer L+1

[0123] Based on the coupling coefficient c of the i-th capsule unit to the j-th capsule unit of the current layer L+1 ij and the prediction vector Calculate the input vector s corresponding to the j-th capsule unit j ;

[0124] Based on the input vector s corresponding to the j-th capsule unit j The input vector s for the next capsule unit j+1 i+1 Perform enhancement processing;

[0125] Compress all enhanced input vectors to obtain the output vector v of the j-th capsule unit to be passed to the current layer L+1 layer j ;

[0126] For vector b ijPerform dynamic update operation and re-input vector s j The training is completed when the number of iterations reaches a preset number, and the preset capsule network model based on deep learning is obtained.

[0127] Preferably, the method obtains the coupling coefficient c of the i-th capsule unit to the j-th capsule unit of the current layer L+1 by the following method: ij ,include:

[0128]

[0129]

[0130] Among them, j represents the value of the jth category in the neural network output vector; k represents the number of categories of the neural network; is the standard exponential function applied to each element of the input vector of the i-th capsule unit in the first L layers; is the standard exponential function applied to each element of the input vector of the jth capsule unit in the current layer L+1; c i is the input vector of the softmax function; exp(c i ) is the standard exponential function applied to the input vector of the softmax function.

[0131] Preferably, the method calculates the input vector s corresponding to the j-th capsule unit in the following manner: j ,include:

[0132]

[0133] Among them, c ij is the coupling coefficient of the i-th capsule unit to the j-th capsule unit in the current layer; W ij is the weight corresponding to the i-th capsule unit in the weight matrix and the j-th capsule unit in the current layer; u i represents the output of the i-th capsule unit; W ij u i is the prediction vector corresponding to the i-th capsule unit.

[0134] Preferably, the compression operation is performed on all the enhanced input vectors to obtain the vector v transmitted to the upper capsule unit. j ,include:

[0135]

[0136] Among them, v j is the vector passed to the jth capsule unit in the current layer; s jis the enhanced input vector corresponding to the jth capsule unit.

[0137] Preferably, the weight b ij Perform dynamic update operations, including:

[0138] Using the output vector v of the capsule unit in layer L+1 j and the prediction vector obtained from the L-layer capsule unit Do the dot product and add the original weight b ij Update to get the new weight b ij .

[0139] In the present invention, after obtaining the input data, the input data is input into a pre-trained capsule network model based on deep learning to detect the mining program and obtain the detection result. The known input data and result labels are input into the capsule network model for training, and the pre-trained capsule network model based on deep learning is determined according to the training result.

[0140] In the present invention, the Sequential input capsule network model is enhanced on the dynamic routing algorithm, and s is added to the original dynamic routing formula. j =s j +s j-1 ,s j Represents the input of the jth capsule unit in a layer. This makes s j The ability to carry the information of the previous capsule unit enhances the learning ability of the Sequential input capsule network model for historical information. In order to better learn the CPU and GPU status information, a longer period of CPU and GPU status information was captured during the experiment. j =s j +s j-1 To update the current capsule unit's s j , can fully learn the dynamic changes of CPU and GPU status, thereby improving the efficiency of malware detection.

[0141] The operation process of the Sequential input capsule network model is as follows:

[0142] First, in the L-layer capsule network, u1 and u2 are capsule units containing a set of neurons, both of which are vectors. Then these vectors are multiplied by the corresponding weight matrix W (W encodes the spatial relationship and other important relationships between low-level features and high-level features) to obtain their respective prediction vectors i represents the i-th capsule unit in the previous layer, and j represents the j-th capsule unit in the current layer. For each capsule in the previous layer, calculate its coupling coefficient c to each capsule in the current layer. ij , forming an overall coupling matrix, with the sum in the column direction equal to 1, ensuring that the influence of a capsule in the previous layer on the current layer is shared by all capsules in the current layer. and the coupling coefficient c ij The product and vector s j . Between different neurons in the same layer, the input s of the latter neuron j =s j +s j-1 , enhancing the connection between the front and rear neurons. Finally, all the enhanced vectors s j The nonlinear activation function accepts a vector and compresses its length to less than 1 without changing its direction to obtain the output vector v j Using the output vector v of the capsule unit of layer L+1 j and the prediction vector obtained from the L-layer capsule unit Do the dot product and add the original weight update to get the new weight. Its inherent meaning is to measure the similarity between each capsule of the current layer and a capsule of the previous layer. If the two are not similar, the importance of the previous layer capsule to the current layer capsule is weakened, otherwise the importance is enhanced. The above is the information flow process from the L-layer capsule unit to the L+1-layer capsule unit.

[0143] In the present invention, the detailed process of Sequential input capsule network model training is as follows:

[0144] The inputs required by the algorithm include the number of routing iterations r, the prediction vector of the L-layer capsule unit

[0145] Step 1: Initialize vector b ij , in the first iteration, b ij The initial value of is zero. As the number of iterations r changes, the vector b ij Dynamic update. Among them, b ij =e iπ +1.

[0146] Step 2: For all capsule units i in layer L, for vector b ij Perform a softmax operation, where k represents the number of outputs or categories of the neural network, v is the output vector, and v j is the value of the jth output or category in v, i represents the category currently to be calculated, and the vector c is obtained i The softmax activation function ensures that cij The value of will not be negative, and the c of the capsule unit in the same layer ij is 1. Because in the first iteration, b ij The initial values ​​of are all zero, so after the first iteration, the coupling coefficients c of different capsule units in the same layer ij are equal. Among them,

[0147]

[0148]

[0149] Among them, j represents the jth output; k represents the number of outputs or categories of the neural network; The standard exponential function is applied to each element of the input vector of the i-th capsule unit in the previous layer; is the standard exponential function applied to each element of the input vector of the jth capsule unit in the current layer; c i is the input vector of the softmax function.

[0150] Step 3: After obtaining the coupling coefficient c of all L-layer capsule units i ij After that, the information flow will flow to the capsule unit in the upper layer, i.e., layer L+1. In this step, u is the output of the capsule network in the previous layer, W is the weight to be multiplied for each output, and the input vector s of different capsule units j It is the weighted sum of all possible inputs to the unit, which is the coupling coefficient c ij The product sum of all possible prediction vectors. The input vector is determined by the following method, including:

[0151]

[0152] Among them, c ij is the coupling coefficient of the i-th capsule unit to the j-th capsule unit in the current layer; W ij is the weight corresponding to the i-th capsule unit in the weight matrix and the j-th capsule unit in the current layer; u i represents the output of the i-th capsule unit; W ij u i is the prediction vector corresponding to the i-th capsule unit.

[0153] Step 4: Between different neurons in the same layer, the input s of the latter neuron j =s j +s j-1, which enhances the connection between the previous and next capsule units. For example, the input of the second capsule unit in the L+1 layer is the current input s2 plus the input s1 of the previous capsule unit, that is, the input of the second capsule unit is s2=s2+s1. This enables the second capsule unit in the L+1 layer to better learn the information conveyed by the previous capsule unit, enhancing the model's ability to learn historical input information.

[0154] Step 5: For all enhanced vectors s j Perform the Squash nonlinear function compression operation. After the Squash compression function, the vector s j The original vector direction is retained, and the compression operation only changes the length of the vector, j The length of the vector s is compressed to less than 1. j After the compression operation, the vector v transmitted to the upper capsule unit is obtained. j .in,

[0155]

[0156] Among them, v j is the vector passed to the jth capsule unit in the current layer; s j is the enhanced input vector corresponding to the jth capsule unit.

[0157] Step 6: Weight b ij Perform dynamic update operation. Every time the data in the capsule network completes a one-way flow process, the weight update operation must be performed. This is the key to the dynamic routing algorithm. In this step, the output vector v of the capsule unit in the L+1 layer is used. j and the prediction vector obtained from the L-layer capsule unit Do the dot product and add the original weight update to get the new weight to achieve dynamic weight update. The dot product operation is to calculate the prediction vector With the output vector v j After step 6, the algorithm jumps to step 3 to restart the process and repeats it r times.

[0158] Among them, the update is performed using the following method:

[0159] b ij =b ij +W ij u i ·v j ,

[0160] Among them, b ijis the initialization vector; Wij is the weight corresponding to the i-th capsule unit and the j-th capsule unit in the current layer in the weight matrix; v j is the vector passed to the jth capsule unit in the current layer.

[0161] The cross entropy loss function is often used in classification problems, especially when neural networks are used for classification problems, cross entropy is often used as a loss function. In the present invention, prediction is performed based on the cross entropy loss function.

[0162] Among them, in the case of binary classification, the model finally needs to predict only two cases. For each category, the probability of our prediction is p and 1-p. At this time, the expression is:

[0163]

[0164] For multi-classification, it is actually an extension of binary classification:

[0165]

[0166] Where M is the number of categories, y mc is a sign function (0 or 1), if the true category of sample m is equal to c, it takes 1, otherwise it takes 0, p mc It refers to the predicted probability that the observed sample m belongs to category c.

[0167] Figure 2 FIG. 2 is a schematic diagram of a mining program detection system 200 based on a deep learning capsule network model according to an embodiment of the present invention. Figure 2 As shown, the mining program detection system 200 based on the deep learning network model provided in an embodiment of the present invention includes: an operation data acquisition module 201, an input data acquisition module 202 and a detection module 203.

[0168] Preferably, the operation data acquisition module 201 is used to monitor the operation data of the target device and acquire the operation data.

[0169] Preferably, the operation data acquisition module 201 monitors the operation data of the target device and acquires the operation data, including:

[0170] The OpenHardwareMonitor tool is used to monitor the target device in real time to obtain the CPU information and GPU information of the target device when it is running, so as to obtain the running data.

[0171] Preferably, the input data acquisition module 202 is used to determine the characteristic value corresponding to each sampling moment based on the operation data, and determine the input data according to the characteristic values ​​corresponding to all sampling moments.

[0172] Preferably, the input data acquisition module 202 determines the characteristic value corresponding to each sampling moment based on the operation data, including:

[0173] Performing format conversion on the operation data, selecting demand characteristic data from the operation data after the format conversion based on the demand information, and removing unit information of the demand characteristic data;

[0174] The weight of each feature in the demand feature data is calculated, and the feature value corresponding to each sampling moment is determined based on the weight of each feature.

[0175] Preferably, the input data acquisition module 202 calculates the weight of each feature in the demand feature data in the following manner, including:

[0176]

[0177] cos(x h ,x p )=x h *x p / (|x h |*|x p |),

[0178] The method determines the feature value corresponding to each sampling moment based on the weight of each feature in the following manner, including:

[0179]

[0180] Among them, K h is the weight of the hth feature; N1 is the difference between the number of selected features and 1; cos(x h ,x p ) is the distance between the hth feature and the pth feature; x h is the feature data corresponding to the hth feature; x p is the feature data corresponding to the pth feature.

[0181] Preferably, the detection module 203 is used to detect the mining program based on the input data and a preset deep learning-based capsule network model.

[0182] Preferably, the system further comprises: a model training module, for:

[0183] The capsule network model based on deep learning is trained in the following manner to obtain the preset capsule network model based on deep learning, including:

[0184] Initialization vector b ij; Where i represents the i-th capsule unit in the previous layer L-1, and j represents the j-th capsule unit in the current layer L;

[0185] For the i-th capsule unit in the first L-1 layer, based on the vector b ij Perform a softmax operation to obtain the coupling coefficient c of the i-th capsule unit to the j-th capsule unit in the current layer ij ;

[0186] Based on the neuron vector and the corresponding weight matrix in the i-th capsule unit, calculate the prediction vector of the i-th capsule unit for the j-th capsule unit in the current layer

[0187] Based on the coupling coefficient c of the i-th capsule unit to the j-th capsule unit in the current layer ij and the prediction vector Calculate the input vector s corresponding to the j-th capsule unit j ;

[0188] Based on the input vector s corresponding to the j-th capsule unit j The input vector s for the next capsule unit j+1 i+1 Make enhancements;

[0189] Compress all enhanced input vectors to obtain the output vector v passed to the upper capsule unit j ;

[0190] Weight b ij A dynamic update operation is performed and the input vector is recalculated until the number of iterations reaches a preset number, and the training is completed to obtain the preset capsule network model based on deep learning.

[0191] Preferably, the model training module obtains the coupling coefficient c of the i-th capsule unit to the j-th capsule unit in the current layer by the following method: ij ,include:

[0192]

[0193]

[0194] Among them, j represents the jth output; k represents the number of outputs or categories of the neural network; The standard exponential function is applied to each element of the input vector of the i-th capsule unit in the previous layer; is the standard exponential function applied to each element of the input vector of the jth capsule unit in the current layer; c i is the input vector of the softmax function.

[0195] Preferably, the model training module calculates the input vector s corresponding to the j-th capsule unit in the following manner: j ,include:

[0196]

[0197] Among them, c ij is the coupling coefficient of the i-th capsule unit to the j-th capsule unit in the current layer; W ij is the weight corresponding to the i-th capsule unit in the weight matrix and the j-th capsule unit in the current layer; u i represents the output of the i-th capsule unit; W ij u i is the prediction vector corresponding to the i-th capsule unit.

[0198] Preferably, the model training module performs a compression operation on all enhanced input vectors to obtain the vector v transmitted to the upper capsule unit. j ,include:

[0199]

[0200] Among them, v j is the vector passed to the jth capsule unit in the current layer; s j is the enhanced input vector corresponding to the jth capsule unit.

[0201] Preferably, the model training module performs weight b ij Perform dynamic update operations, including:

[0202] Using the output vector v of the capsule unit in layer L+1 j and the prediction vector obtained from the L-layer capsule unit Do the dot product and add the original weight b ij Update to get the new weight b ij .

[0203] The mining program detection system 300 based on the deep learning network model of an embodiment of the present invention corresponds to the mining program detection method 100 based on the deep learning network model of another embodiment of the present invention, which will not be repeated here.

[0204] Based on another aspect of the present invention, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any step of a mining program detection method based on a deep learning network model.

[0205] According to another aspect of the present invention, the present invention provides an electronic device, including:

[0206] The computer-readable storage medium described above; and

[0207] One or more processors are used to execute the program in the computer-readable storage medium.

[0208] The invention has been described above with reference to a few embodiments. However, it is readily apparent to a person skilled in the art that other embodiments than the ones disclosed above are equally within the scope of the invention, as defined by the appended patent claims.

[0209] Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the technical field, unless explicitly defined otherwise herein. All references to "a / said / the [means, components, etc.]" are to be openly interpreted as at least one instance of the means, components, etc., unless explicitly stated otherwise. The steps of any method disclosed herein do not necessarily have to be performed in the exact order disclosed, unless explicitly stated otherwise.

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

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

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

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

[0214] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A mining program detection method based on a capsule network model based on deep learning, It is characterized in that The method comprises: Monitoring the operation data of the target device and obtaining the operation data; Determine a characteristic value corresponding to each sampling moment based on the operation data, and determine input data according to the characteristic values ​​corresponding to all sampling moments; and Detecting a mining program based on the input data and a preset deep learning-based capsule network model; The monitoring of the operation data of the target device and obtaining the operation data includes: Using a hardware monitoring tool to monitor the target device in real time to obtain CPU information and GPU information of the target device when it is running, and obtaining the running data based on the CPU information and GPU information; The determining, based on the operating data, a characteristic value corresponding to each sampling moment comprises: Performing format conversion on the operation data, selecting demand characteristic data from the operation data after the format conversion based on the demand information, and removing unit information of the demand characteristic data; Calculating the weight of each feature in the demand feature data, and determining the feature value corresponding to each sampling moment based on the weight of each feature; The weight of each feature in the demand feature data is calculated in the following manner, including: cos(x h ,x p )=x h *x p / (|x h |*|x p |), The feature value corresponding to each sampling moment is determined based on the weight of each feature in the following manner, including: Among them, K h is the weight of the hth feature; N1 is the difference between the number of selected features minus 1; cos(x h ,x p ) is the distance between the hth feature and the pth feature; x h is the feature data corresponding to the hth feature; x p is the feature data corresponding to the pth feature, h, p and N1 are natural numbers; |x h | is the modulus of the feature data corresponding to the hth feature; |x p | is the modulus of the feature data corresponding to the pth feature; X is the feature value corresponding to each sampling moment.

2. The method according to claim 1, It is characterized in that The method further comprises: The capsule network model based on deep learning is trained in the following manner to obtain the preset capsule network model based on deep learning, including: Initialization vector b ij ; Where i represents the i-th capsule unit in the previous L layers, and j represents the j-th capsule unit in the current L+1 layer; For the i-th capsule unit of the first L layers, based on the vector b ij Perform a softmax operation to obtain the coupling coefficient c of the i-th capsule unit to the j-th capsule unit of the current layer L+1 ij ; Based on the neuron vector and the corresponding weight matrix in the i-th capsule unit, calculate the prediction vector of the i-th capsule unit for the j-th capsule unit in the current layer L+1 Based on the coupling coefficient c of the i-th capsule unit to the j-th capsule unit of the current layer L+1 ij and the prediction vector Calculate the input vector s corresponding to the j-th capsule unit j ; Based on the input vector s corresponding to the j-th capsule unit j The input vector s for the next capsule unit j+1 i+1 Perform enhancement processing; Compress all enhanced input vectors to obtain the output vector v of the j-th capsule unit to be passed to the current layer L+1 layer j ; For vector b ij Perform dynamic update operation and re-input vector s j The training is completed when the number of iterations reaches a preset number, and the preset capsule network model based on deep learning is obtained.

3. The method according to claim 2, It is characterized in that The coupling coefficient c of the i-th capsule unit to the j-th capsule unit of the current layer L+1 is obtained by the following method: ij ,include: Among them, j represents the value of the jth category in the neural network output vector; k represents the number of categories of the neural network; is the standard exponential function applied to each element of the input vector of the i-th capsule unit in the first L layers; is the standard exponential function applied to each element of the input vector of the jth capsule unit in the current layer L+1; c i is the input vector of the softmax function; exp(c i ) is the standard exponential function applied to the input vector of the softmax function.

4. The method according to claim 2, It is characterized in that The input vector s corresponding to the j-th capsule unit is calculated as follows j ,include: Among them, c ij is the coupling coefficient of the i-th capsule unit to the j-th capsule unit in the current layer L+1; W ij is the weight corresponding to the i-th capsule unit in the previous L layers and the j-th capsule unit in the current L+1 layer in the weight matrix; u i W represents the i-th capsule unit in the first L layers containing a group of neurons; ij u i is the prediction vector corresponding to the i-th capsule unit.

5. A mining program detection system based on a capsule network model based on deep learning, It is characterized in that The system comprises: An operation data acquisition module, used to monitor the operation data of the target device and acquire the operation data; An input data acquisition module, used to determine the characteristic value corresponding to each sampling moment based on the operation data, and determine the input data according to the characteristic values ​​corresponding to all sampling moments; A detection module, used to detect mining programs based on the input data and a preset capsule network model based on deep learning; The operation data acquisition module monitors the operation data of the target device and acquires the operation data, including: Using a hardware monitoring tool to monitor the target device in real time to obtain CPU information and GPU information of the target device when it is running, and obtaining the running data based on the CPU information and GPU information; The input data acquisition module determines the characteristic value corresponding to each sampling moment based on the operation data, including: Performing format conversion on the operation data, selecting demand characteristic data from the operation data after the format conversion based on the demand information, and removing unit information of the demand characteristic data; Calculating the weight of each feature in the demand feature data, and determining the feature value corresponding to each sampling moment based on the weight of each feature; The input data acquisition module calculates the weight of each feature in the demand feature data in the following manner, including: cos(x h ,x p )=x h *x p / (|x h |*|x p |), The feature value corresponding to each sampling moment is determined based on the weight of each feature in the following manner, including: Among them, K h is the weight of the hth feature; N1 is the difference between the number of selected features minus 1; cos(x h ,x p ) is the distance between the hth feature and the pth feature; x h is the feature data corresponding to the hth feature; x p is the feature data corresponding to the pth feature, h, p and N1 are natural numbers; |x h | is the modulus of the feature data corresponding to the hth feature; |x p | is the modulus of the feature data corresponding to the pth feature; X is the feature value corresponding to each sampling moment.

6. A computer-readable storage medium having a computer program stored thereon, It is 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.

7. An electronic device, It is characterized in that include: The computer readable storage medium as claimed in claim 6; as well as One or more processors are used to execute the program in the computer-readable storage medium.