A method and an apparatus of training a model, an electronic device, a storage medium, and a program product are provided, which relate to a field of artificial intelligence, and in particular to a field of reinforcement learning, NLP, etc. The method includes: acquiring a dialogue information input by a user in a human-machine interaction process; obtaining a corresponding predicted information based on the dialogue information by using a first intention recognition model, a first recurrent neural network and a first named entity recognition model; obtaining a corresponding machine behavior information based on the predicted information by using a first behavior decision model, in order for a machine to perform a corresponding machine behavior in the human-machine interaction process based on the machine behavior information; acquiring a feedback information input by the user for the machine behavior; storing at least one of the predicted information, the machine behavior information, or the feedback information as training data in a database; and performing a model optimization training online based on the training data in the database by using a reinforcement learning algorithm, in response to an amount of the training data in the database reaching a preset data amount.
METHOD AND APPARATUS OF TRAINING MODEL, DEVICE, STORAGE MEDIUM, AND PROGRAM PRODUCT