Code automatic generation method and device based on IoT service interface model

Fuente: Wipo "IOT"
The invention discloses an automatic code generation method and device based on an IoT service interface model, and the method comprises the steps: building the IoT service interface model in advance, and compiling an IoT service interface description file according to the IoT service interface model through employing a business event and an event transmission protocol which need to be transmitted by the IoT service; checking whether the IoT service interface description file grammar is correct or not through the IoT service interface grammar analysis tree; analyzing the IoT service interface description file through a grammar analyzer of the IoT service interface model, traversing data information of the IoT service and generating a code file of a specified project; and storing the generated code file of the specified project in a namespace specified by the IoT service interface model. The method plays an important role in the development process of integrating the IoT service in the business process system, the problems of errors and inconsistency easily occurring when the configuration relation is manually processed can be reduced, and the stability and reliability of the system are improved.