The invention discloses a drug supply method of a drug vending machine based on a user behavior, which comprises the following steps: step 1, constructing a drug class library at a cloud end; step 2,generating a drug class library at a cloud end; step 3, generating a drug class library at a cloud end; and step 4, generating a drug class library at a cloud end. 2, obtaining text information inputby a user, extracting keywords, defining and obtaining a user demand degree label; 3, analyze that user demand degree label of different regions in different periods, predicting the probability of theus's subsequent demand for one or several drugs by using a logistic regression algorithm, generating a suggestion list at the control center terminal, and supplementing the drugs of the vending machine according to the suggestion list. The invention reasonably handles the supply and demand relationship of drugs from the perspective of the user, and focuses on the supply of drugs, so as to betteroperate the drug vending machine system. The invention also discloses an automatic medicine vending machine, which is characterized in that the medicine supply system adopts the medicine supply methodof the medicine vending machine based on the user behavior.