In the multi-hierarchy automatic classification task of Chinese patents,the rich semantic information,dependencies of labels and the feature information of different granularities between hierarchies are ignored,and the RoBERTa-ALMG model was proposed.The advanced semantic representation of the patent text was obtained through RoBERTa pre-training model,and the label text vector representation was dynamically generated with the help of dual multilayer perceptron and attention mechanisms in the label attention module.Knowledge transfer and information sharing between different hierarchies were realized through the forward propagation process.Different granularity features and information between hierarchies were captured using the multi-granularity feature extraction module.Experimental results of the dataset published by the National Information Center show that the model outperforms other models.