The invention relates to an interactive
Web API recommendation method based on
reinforcement learning, which belongs to the field of
Web API recommendation, and comprises the following steps: abstracting multiple rounds of
Web API recommendation problems into a Markov
decision process; designing a
state representation module fusing user positive and
negative feedback, demand semantic features and a
Mashup and Web API feature interaction relationship; designing and deploying an environment simulator based on an offline
data set; a double-layer deep Q network is adopted as a strategy function, and recommended actions are output according to the current state. A priority experience playback
mechanism based on a
time sequence difference error is introduced, and sampling priorities are dynamically distributed for interaction samples in the training process; and performing multiple rounds of interaction through a simulator, storing interaction samples in a priority experience playback buffer
pool, periodically updating DDQN network parameters,
synchronizing a target network by adopting a soft update strategy, evaluating a trained learning strategy, and outputting a recommendation
list. According to the method, the sample utilization efficiency and the sorting quality in a sparse feedback scene can be effectively improved.