The rapid development and popularity of IoT technology has reshaped the way people interact with the real world. Many researchers have attempted to build natural language interfaces for IoT platforms, but have not produced much progress in parsing natural language commands that contain multiple operations and more complex logical structures. In this paper, we propose IoT-NLI, a natural language query and control interface for popular IoT platforms, which uses hierarchical semantic parsing algorithms and directed edge-tagged graph structures to efficiently parse natural language commands input by users, enabling them to perform multiple operations contained in one complex natural language command. Experiments in three domains, agriculture, industry, and smart home, show that IoT-NLI has excellent performance and reasonable response time. Finally, a IoT-NLI application was developed on the Android platform and integrated with the AliCloud platform. It enables users to query and control devices on Android phones through chat windows similar to instant messaging software.INDEX TERMS Natural language interface, human-computer interaction, natural language processing, IoT platform.''(''Please help me turn on the power to the thermostat in the shed and check the temperature of the water tank in the greenhouse''), the corresponding logical form is 'location': ' ' ('shed'), 'device': ' ' ('thermostat'), 'property': ' ' ('power'), 'value': ' ' ('turn on') and 'location': ' ' ('greenhouse'), 'device': ' ' ('water tank'), 'property': ' ' ('temperature'), 'value': ' ' ('check'). The necessary contextual information in each structured logical form, can be populated into the API according to the parameter dependencies shown in Figure 2. Parameter dependencies can be obtained from the IoT platform through requests. The script for obtaining parameter dependencies from the Ali-Cloud platform and the related request code can be found at https://github.com/CodaChan/IoT-NLI. Depending on the length of the command, the expression of the intent, and the number of operations contained in the command (i.e., the number of structured logical forms), commands are classified into basic natural language commands and complex natural language commands, which are defined as shown in Table 1.B. SYNTACTIC DEPENDENCY '' (''temperature'') corresponds to the verb '' '' (''check'') in the command, and the corresponding relationship is a verb-object relationship (VOB), which means that the noun '' '' is the object of the verb '' ''. The noun '' '' (''air conditioner'') corresponds to the word '' '', and the corresponding relationship is ATT, which means that the noun '' '' is used as a gerund to modify '' ''. The noun '' '' (''living room'') is in ATT relationship with the preposition '' '' (''inside''), and the preposition '' '' is also in ATT relationship with the noun '' '', so it can be assumed that the noun '' '' modifies the noun '' '' through the preposition '' ''.