Abstract:At present, the countermeasure technology of malicious code is constantly changing, and new varieties of malicious code are emerging in endless streamto make the classification of malicious code face severe challenges. Aimed at the problemsthat features extracted are insufficient and low in accuracy by using current malicious code classification methods based on deep learning, a malicious code classification method (BiTCNSA) based on bi-directional temporal convolution network (BiTCN) and self attention mechanism is proposed. This method is combination of opcode features with image features to show different feature details, increasing feature diversity. The BiTCN is constructed to process the fused features, making full use of the pre and post dependencies of the features. The self attention mechanism is introduced todynamically adjust the data weight, further mining the correlation between the internal data of malicious code. The model is verified by using the Kaggle data set. The results show that the accuracy of this method can reach 99.75%, and the method is fast at convergence speed, lowin error, and better than the other models.