In the study of complex network systems,community detection is one of the important methods to mine the internal structure information of network data. This paper proposes a Bayesian community detection algorithm for a Degree-corrected Stochastic Block Model containing node covariate information ,by selecting important node covariates based on the Random Forest algorithm ,applying a covariate-dependent random partition model divide the community membership ,apply the DCSBM model ,and use the Gibbs sampler method to detect the community structure and infer the number of commu-nities. Numerical simulation results show that the Bayesian community detection algorithm for a Degree-corrected Stochastic Block Model containing node covariate information can significantly improve the performance of community detection. Finally, the Bayesian community detection algorithm for a Degree-corrected Stochastic Block Model containing node covariate infor-mation method is applied to the real data of the Weddell Sea trophic network for empirical analysis.