The present disclosure relates to a method, device and medium for performing retrosynthesis analysis on a compound molecule. A method for performing retrosynthesis analysis on a compound molecule is provided, comprising: determining probability graph weights of single-step reactions of a
Markov logic network based on actual reaction
learning data, thereby obtaining a trained
Markov logic network; receiving an encoded molecular structure of a target compound; inputting the encoded molecular structure into the trained
Markov logic network, and predicting a plurality of candidate retrosynthesis paths of the target compound through the Markov
logic network; inputting the plurality of candidate retrosynthesis paths into a
reinforcement learning model, training the
reinforcement learning model based on existing actual reaction processes, so that a path consistent with an actual synthesis path obtains a reward, and updating a transition matrix in the
reinforcement learning model; and determining one or more selected retrosynthesis paths from the plurality of candidate retrosynthesis paths by using the finally obtained transition matrix through the reinforcement learning model.