The invention relates to an implementation method for encapsulating a VXML (Virtual
Extensible Markup Language) protocol based on a taglib, which comprises the following steps: S1, based on the VXML protocol, forming a basic tag
library through taglib encapsulation, the basic tag
library being used for realizing an IVR (
Interactive Voice Response) service function; s2, configuring an input parameter and an output parameter of each
label in the basic
label library; s3, setting a custom name for each
label in the basic label library; s4, a basic label library is introduced into the JSP page, corresponding labels are called through custom names, label
assembly is carried out, and an
executable JSP page structure conforming to service logic is formed; and S5, responding to a service request from the IVR service platform, executing the JSP page by executing the assembled label, generating an
XML document conforming to the VXML protocol, returning the
XML document to the IVR service platform, and analyzing the
XML document and executing a corresponding telephone traffic action by the IVR service platform. According to the method, the VXML protocol is analyzed and packaged into the reusable JSP label through taglib, so that the
reusability and
readability of IVR service logic are improved, and the development difficulty is reduced.