CN116546042A - IoT device control methods, devices, systems, and computer readable storage media - Google Patents

IoT device control methods, devices, systems, and computer readable storage media Download PDF

Info

Publication number
CN116546042A
CN116546042A CN202210094828.2A CN202210094828A CN116546042A CN 116546042 A CN116546042 A CN 116546042A CN 202210094828 A CN202210094828 A CN 202210094828A CN 116546042 A CN116546042 A CN 116546042A
Authority
CN
China
Prior art keywords
target
instruction
interface
app
control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210094828.2A
Other languages
Chinese (zh)
Inventor
陈志伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210094828.2A priority Critical patent/CN116546042A/en
Publication of CN116546042A publication Critical patent/CN116546042A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72406User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by software upgrading or downloading
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The embodiment of the application provides an IoT device control method, device, system and computer readable storage medium, and relates to the technical field of electronics. Receiving, by the generic plug-in, a control instruction for controlling the IoT device; the universal plug-in converts a control instruction into a target instruction matched with a first target interface according to a target host application loaded by the universal plug-in at present, wherein the first target interface is an interface which is in butt joint with the target host application in at least two first data interfaces; the universal plug-in sends a target instruction to a target host application through a first target interface; the target instructions are sent to the IoT device by the target host application. The method can be compatible with various host applications, and reduces the development cost.

Description

IoT device control methods, devices, systems, and computer readable storage media
Technical Field
The present application relates to the field of electronics technology, and in particular, to an internet of things (internet of things, ioT) device control method, device, system, and computer-readable storage medium.
Background
With the rapid development of IoT technology, ioT devices are becoming increasingly popular for use in people's lives. Generally, ioT devices are controlled through control Applications (APPs) installed in control terminals (e.g., cell phones, tablet computers, etc.). The control APP comprises an APP plug-in and a host APP, and the control over the IoT device is achieved by loading the APP plug-in into the host APP.
In some application scenarios, a user needs to control the same IoT device through two different control APPs. For example, there is an IoT device that a user wants to control both through control APP a installed in the a handset and through control APP B installed in the B handset. Because interfaces of host APP in different control APPs are different, two sets of APP plug-ins need to be developed respectively to adapt to two host APPs in order to realize control of the same IoT device.
However, developing two sets of APP plug-ins separately has the problem of higher development cost.
Disclosure of Invention
The application provides an IoT device control method, device, system and computer readable storage medium, which can realize compatibility of APP plug-ins and different host APPs, and save development cost.
In a first aspect, the present application provides an IoT device control method for an internet of things, the method being performed by an electronic device in which a control application for controlling the IoT device is installed, the control application comprising a generic plug-in, the generic plug-in comprising at least two first data interfaces for interfacing with at least two host applications, the at least two first data interfaces sending data to the at least two host applications, the method comprising:
receiving, by the generic plug-in, a control instruction for controlling the IoT device; the universal plug-in converts a control instruction into a target instruction matched with a first target interface according to a target host application loaded by the universal plug-in at present, wherein the first target interface is an interface which is in butt joint with the target host application in at least two first data interfaces; the universal plug-in sends a target instruction to a target host application through a first target interface; the target instructions are sent to the IoT device by the target host application.
In this implementation, the control application is the control APP, the generic plug-in is the generic APP plug-in, and the host application is the host APP.
Alternatively, the IoT device may be, for example, a smart screen. The control application may be a first control APP (e.g., smart space APP) or a second control APP (e.g., smart life APP) in a specific embodiment. The generic plug-in may be loaded in at least two host applications, such as a smart living host APP and a smart space host APP. Specifically, the universal plug-in may include at least two first data interfaces, which can interface with the smart living host APP and the smart space host APP, respectively. It is further understood that the smart living APP may interface with a first IoT platform, the smart space APP may interface with a second IoT platform, and the smart screen accesses the first IoT platform and the second IoT platform, respectively.
When the universal plug-in is loaded in the intelligent space host APP (namely, the target host application is the intelligent space host APP), the interface which is in butt joint with the intelligent space host APP in the two first data interfaces is the first target interface, and after receiving the control instruction, the universal plug-in converts the control instruction into a target instruction matched with the first target interface and sends the target instruction to the intelligent space host APP through the first target interface. The smart space host APP sends the target instruction to the smart screen through the IoT platform.
Similarly, when the universal plug-in is loaded in the intelligent living host APP (i.e., the target host application is the intelligent living host APP), the interface, which is in butt joint with the intelligent living host APP, of the two first data interfaces is the first target interface, and after the universal plug-in receives the control instruction, the universal plug-in converts the control instruction into a target instruction matched with the first target interface, and sends the target instruction to the intelligent living host APP through the first target interface. The smart life host APP sends the target instruction to the smart screen through the IoT platform.
The IoT device control method provided in the first aspect, the generic plug-in includes at least two first data interfaces capable of interfacing with different host applications. When the universal plug-in is loaded in the target host application, a first target interface in at least two first data interfaces is in butt joint with the target host application, the universal plug-in can convert a control instruction into a target instruction matched with the first target interface, so that the target instruction can be sent to the target host application through the first target interface, and further the target host application can send the target instruction to the IoT device, and control over the IoT device is achieved. In the method, the universal plug-in can be in butt joint with at least two host applications, and control instructions can be converted into instructions matched with corresponding interfaces of the host applications, that is, the universal plug-in and the IoT device control method can be compatible with at least two host applications, and application plug-ins do not need to be respectively developed for a plurality of host applications, so that development and maintenance costs are reduced.
With reference to the first aspect, in some implementations of the first aspect, the generic plug-in converts, according to a target host application currently loaded by the generic plug-in, a control instruction into a target instruction matched with a first target interface, including: the universal plug-in converts the control instruction according to a target format to obtain the target instruction, wherein the target format is a format matched with the first target interface.
In one possible implementation, the target instruction is a generic instruction and the target format is a generic format that matches the first target interface.
Optionally, in this implementation, when the target host application is an intelligent living host APP, the target instruction may be a first general instruction in a specific embodiment; when the target host application is a smart space host APP, the target instruction may be a second general purpose instruction in the specific embodiment.
In the implementation manner, the universal plug-in converts the control instruction into the instruction in the universal format matched with the first target interface, the universal plug-in only needs to be in butt joint with the target host application through the same interface to send the instruction, and correspondingly, the host application only needs to receive the instruction through one universal interface, and multiple interfaces are not needed to be designed for the universal plug-in and the host application. Meanwhile, only one general user configuration file is required to be developed on the IoT platform corresponding to the target host application, and a plurality of user configuration files are not required to be designed, so that development and maintenance costs are further saved, and development costs can be greatly saved especially for IoT devices with more control instructions, such as intelligent screens, intelligent sound boxes and the like.
In one possible implementation, the first target interface includes a target application tool class, the target host application includes a generic instruction interface, the target application tool class interfaces with the generic instruction interface, and the generic plug-in sends the target instruction to the target host application through the first target interface, including: the universal plug-in sends a target instruction to the universal instruction interface through the target application tool class.
Alternatively, the target application tool class may be, for example, a first APP tool class or a second APP tool class in the specific embodiment, and the general instruction interface may be a first general instruction interface or a second general instruction interface in the specific embodiment. When the universal plug-in is loaded in the first host APP, the universal plug-in can send a target instruction to the first universal instruction interface through the first APP tool class; when the universal plug-in is loaded in the second host APP, the universal plug-in can send a target instruction to the second universal instruction interface through the second APP tool class.
In one possible implementation manner, the universal plug-in converts a control instruction according to a target format to obtain the target instruction, and the method includes: converting the control instruction into an instruction in a target format through a universal plug-in to obtain a conversion instruction; and marking the conversion instruction through a universal plug-in to obtain a target instruction.
Alternatively, the conversion instruction may be a first general instruction or a second general instruction in the specific embodiment, and the target instruction may be a first general flag instruction or a second general flag instruction.
Alternatively, the instruction tag may be added to the conversion instruction by a generic plug-in to obtain the target instruction. Wherein the instruction tag is used to characterize the unique identity of the instruction.
In this implementation, the target instruction is obtained by marking the instruction, so that the instruction can be conveniently identified according to the instruction mark in the target instruction, for example, the IoT device can conveniently determine the source of the target instruction according to the instruction mark, and thus feedback information can be returned according to the source of the target instruction.
In one possible implementation, receiving, by a generic plug-in, a control instruction includes: the generic plug-in receives control instructions input by a user through a device control interface, which refers to a display interface for controlling IoT devices.
In one possible implementation, before the universal plug-in receives a control instruction input by a user through the device control interface, the method further includes: acquiring interface information by a target host application, wherein the interface information is information required by a control interface of display equipment; transmitting interface information to the universal plug-in through the target host application; converting the interface information through a universal plug-in to obtain standard interface information; the generic plug-in displays a device control interface based on standard interface information.
Optionally, the interface information may include device information, feedback information, and the like of the IoT device, and the generic plug-in converts the device information to obtain standard device information, and the generic plug-in converts the feedback information to obtain standard feedback information.
In the implementation mode, the interface information is converted through the universal plug-in to obtain the standard interface information, and the equipment control interface is displayed based on the standard interface information, so that the equipment information in different host applications can be unified and standardized, the equipment control interfaces presented to the user by different control applications are unified, and the user experience is improved.
In one possible implementation, the universal plug-in further includes at least two second data interfaces, the second data interfaces being configured to interface with at least two host applications, obtain data from the at least two host applications, and send interface information to the universal plug-in through the target host application, including: and sending interface information to a second target interface through the target host application, wherein the second target interface is an interface which is in butt joint with the target host application in the second data interface.
In the implementation manner, the universal plug-in comprises at least two second data interfaces, and the docking with the at least two host applications is realized through the at least two second data interfaces, so that the universal plug-in receives the data of the host applications. Therefore, the application plug-in and the host application can be communicated in a two-way manner, and the universal plug-in is convenient for further receiving interface information sent by the host application, so that the display and the update of the interface are convenient.
In one possible implementation, the interface information includes device information of the IoT device and/or feedback information from the IoT device, the second target interface includes a target device information interface and a target feedback information interface, and sending the interface information to the second target interface through the target hosting application includes: transmitting device information to a target device information interface through a target host application; and/or sending the feedback information to the feedback information interface of the target through the target host application.
Optionally, in the case where the target host application is a first host APP (e.g., a smart life host APP), the target device information interface may be a first device information receiving module, and the target feedback information interface may be a first feedback information obtaining module. In the case where the target host application is a second host APP (e.g., an intelligent control host APP), the target device information interface may be a second device information receiving module, and the target feedback information interface may be a second feedback information acquiring module.
In a second aspect, the present application provides an IoT device control method performed by an IoT device, the method comprising: receiving a target instruction from a target control application, wherein the target control application comprises a universal plug-in, and the universal plug-in comprises at least two first data interfaces, and the first data interfaces are used for interfacing with at least two host applications and sending data to the at least two host applications; the target instruction is an instruction matched with a first target interface, the first target interface is an interface which is in butt joint with a target host application in at least two first data interfaces, and the target host application is a host application loaded currently by the universal plug-in; executing the target instruction.
The advantages of the IoT device control method provided in the second aspect may be found in the first aspect, and are not described here.
With reference to the second aspect, in some implementations of the second aspect, the method further includes: generating feedback data according to the target instruction; feedback data is sent to the target control application.
In one possible implementation, the feedback information includes a first instruction tag of the target instruction, where the first instruction tag is used to characterize a unique identity of the target instruction, and send feedback data to the target control application, where the feedback information includes: acquiring the corresponding relation between the instruction mark and the control application; and sending feedback data to the target control application according to the first instruction mark and the corresponding relation.
In one possible implementation, the target instruction includes a first instruction tag, and the IoT device includes at least two access modules for one-to-one communication with at least two control applications; receiving a target instruction from a target control application, comprising: receiving a target instruction from a target control application through a target access module, wherein the target access module refers to a module used for communicating with the target control application in at least two access modules; according to the first instruction mark and the corresponding relation, feedback data are sent to the target control application, and the method comprises the following steps: determining a target access module corresponding to the first instruction mark according to the corresponding relation; and sending feedback information to the target control application through the target access module.
Optionally, at least two access modules of the IoT device are configured to interface with at least two IoT platforms one by one, and at least two IoT platforms are configured to interface with the at least two control applications one by one. In particular, an IoT device may include a first access module and a second access module. The first access module is to interface with a first IoT platform, the first control APP interfaces with the first IoT platform, and thus the first access module of the IoT device is capable of communicating with the first control APP through the first IoT platform. The second access module is to interface with a second IoT platform, the second control APP interfaces with the second IoT platform, and thus the second access module of the IoT device is capable of communicating with the second control APP through the second IoT platform.
Optionally, the correspondence between the instruction tag and the control application, that is, the correspondence between the instruction tag and the access module to which the instruction is input. In the implementation manner, the IoT device determines, according to the first instruction tag and the corresponding relation, that the source of the control instruction corresponding to the instruction tag is the target access module, and returns the feedback information to the target control application through the target access module, so that accuracy in sending the feedback information in the scene of controlling the IoT device by the two types of control APP is ensured, and user experience is improved.
In a third aspect, the present application provides an apparatus, which is included in an electronic device, and which has a function of implementing the electronic device behavior in the first aspect and possible implementations of the first aspect. The functions may be realized by hardware, or may be realized by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the functions described above. Such as a receiving module or unit, a processing module or unit, etc.
In a fourth aspect, the present application provides an apparatus, comprised in an IoT device, having functionality to implement the electronic device behavior of the second aspect and possible implementations of the second aspect. The functions may be realized by hardware, or may be realized by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the functions described above. Such as a receiving module or unit, a processing module or unit, etc.
In a fifth aspect, the present application provides an electronic device, the electronic device comprising: a processor, a memory, and an interface; the processor, the memory and the interface cooperate with each other such that the electronic device performs any one of the methods of the technical solutions of the first aspect.
In a sixth aspect, the present application provides an IoT device, comprising: a processor, a memory, and an interface; the processor, the memory and the interface cooperate with each other such that the electronic device performs any one of the methods of the second aspect.
In a seventh aspect, the present application provides an IoT system comprising the electronic device of the fifth aspect and the IoT device of the sixth aspect.
In an eighth aspect, the present application provides a chip comprising a processor. The processor is configured to read and execute a computer program stored in the memory to perform the method of the first aspect and any possible implementation thereof, or to perform the method of the second aspect and any possible implementation thereof.
Optionally, the chip further comprises a memory, and the memory is connected with the processor through a circuit or a wire.
Further optionally, the chip further comprises a communication interface.
In a ninth aspect, the present application provides a computer readable storage medium, in which a computer program is stored, which when executed by a processor causes the processor to perform any one of the methods of the first aspect, or to perform the method of the second aspect and any possible implementation thereof.
In a tenth aspect, the present application provides a computer program product comprising: computer program code which, when run on an electronic device, causes the electronic device to perform any one of the methods of the technical solutions of the first aspect, or to perform the method of the second aspect and any possible implementation thereof.
Drawings
Fig. 1 is an application scenario schematic diagram of an example IoT device control method provided in an embodiment of the present application;
fig. 2 is a schematic diagram of the principle of different control APPs controlling the same IoT device, provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of an example of an electronic device 100 according to an embodiment of the present disclosure;
FIG. 4 is a block diagram of a software architecture of an example electronic device according to an embodiment of the present application;
fig. 5 is a schematic architecture diagram of an example system including a first control APP, a first IoT platform, and an IoT device provided in an embodiment of the present application;
fig. 6 is a schematic architecture diagram of an example system including a second control APP, a second IoT platform, and an IoT device provided in an embodiment of the present application;
fig. 7 is a flowchart illustrating a device registration phase in an IoT device control method according to an embodiment of the present application;
fig. 8 is a schematic diagram of interface change of a mobile phone when a user operates a first control APP according to an embodiment of the present application;
Fig. 9 is a flowchart illustrating a device information display stage in an IoT device control method according to an embodiment of the present application;
fig. 10 is a flowchart illustrating an instruction issue stage in an IoT device control method according to an embodiment of the present application;
fig. 11 is a flowchart illustrating a data return phase in an IoT device control method according to an embodiment of the present application;
fig. 12 is a flowchart of a device registration phase in another IoT device control method according to an embodiment of the present application;
fig. 13 is a schematic diagram of interface change of a mobile phone when a user operates a second control APP according to an embodiment of the present application;
fig. 14 is a flowchart illustrating an example IoT device control method according to an embodiment of the present application;
fig. 15 is a flowchart of another example IoT device control method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, "/" means or is meant unless otherwise indicated, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" means two or more than two.
The terms "first," "second," "third," and the like, are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first", "a second", or a third "may explicitly or implicitly include one or more such feature.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more, but not all, embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
For a better understanding of the embodiments of the present application, terms or concepts that may be referred to in the embodiments are explained below.
IoT devices: physical objects in IoT networks. In the embodiment of the application, the IoT device may be an intelligent home device, for example, an intelligent sound box, an intelligent screen, an intelligent desk lamp, an intelligent air conditioner, an intelligent refrigerator, an intelligent door lock, an intelligent curtain, or the like. In addition, the IoT device may also be an intelligent device such as an in-vehicle device, a wearable device, an Augmented Reality (AR)/Virtual Reality (VR) device, and the specific type of the IoT device is not limited in the embodiments of the present application.
Control APP: the APP for controlling IoT devices may be, for example, a smart space APP or a smart life APP. The control APP may include a host APP and an APP plug-in loaded in the host APP. In this embodiment, the host APP of the smart space APP is referred to as a smart space host APP, and the host APP of the smart living APP is referred to as a smart living host APP.
And (3) a control terminal: terminal devices with control APP installed include, but are not limited to, cell phones, tablet computers, wearable devices, notebook computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (personal digital assistant, PDA), etc.
Cloud server: also known as IoT clouds, smart home clouds, cloud platforms, cloud or device clouds, and the like. The cloud server is used to store data related to the IoT device or the control terminal, or to forward transmissions of data (e.g., control instructions) between the control terminal and the IoT device, etc.
IoT platform: an integrated platform integrating IoT device management, data security communications, and message subscription capabilities. The IoT platform supports connection of IoT devices downwards and collects data of the IoT devices; an application program interface (application programming interface, API) is provided upwards, and the control terminal can issue instructions to the IoT device by calling the API, so as to realize remote control of the IoT device. The IoT platform may be built in a cloud server, and thus, the IoT platform is also referred to as an IoT cloud platform.
The IoT platform may include an access layer and a functional layer. The access layer is to interface with IoT devices and control APPs. The functional layer is configured to implement related functions in IoT device application procedures, including, but not limited to, identity verification, data encryption, ioT device upgrades, data storage, account management, device binding, and data forwarding (also referred to as data streaming, data transmission, etc.), and the like.
Account information of control APP: the user registers in the control APP information characterizing the user's identity. The APP account is also referred to as APP user information, or APP user identity (user identity document, user ID).
Feedback information: data and information sent by IoT devices to control APP. The feedback information may include an execution result of the control instruction by the IoT device, related data generated after the IoT device executes the control instruction, state information of the IoT device acquired by the IoT device, and the like. The status information may include, for example, information characterizing IoT device online conditions, power conditions, and the like. The specific content of the state information and the feedback information is not limited in this application.
Device control interface (view): refers to an interface for controlling IoT devices displayed in a control APP in a control terminal.
Registration information of IoT devices: information required by IoT devices when the devices register. The registration information of the IoT device may include registrant identity information of the IoT device, an activation code of the IoT device, and the like.
Registrar identity information (register identity document, regID) of IoT devices: for characterizing the unique identity of the IoT device during the device registration phase.
Activation code (active code) of IoT device: for registration activation of IoT devices in a device registration phase.
Device account of IoT device: a device identity (device identity document, devID), also referred to as IoT device, for characterizing a unique identity of the IoT device.
Login password of IoT device: information for verifying identity when an IoT device logs into a device account. The device account of one IoT device corresponds to one login password.
The IoT device control method provided in the embodiments of the present application is described below.
For IoT device applications, there is an application scenario where the same IoT device is controlled by different control APPs. Fig. 1 is a schematic application scenario diagram of an example IoT device control method according to an embodiment of the present application. As shown in fig. 1, in this scenario, a first cloud server 101, a first control terminal 102, a second cloud server 104, a second control terminal 105, and an IoT device 107 are included. In fig. 1, the IoT device is taken as a smart screen, and the first control terminal 102 and the second control terminal 105 are both mobile phones. Wherein, install first control APP 103 in the first control terminal 102, install second control APP 106 in the second control terminal 105.
Fig. 2 is a schematic diagram illustrating an example of a different control APP controlling the same IoT device according to an embodiment of the present application. Referring to fig. 1 and 2, a first IoT platform 1011 is built in the first cloud server 101, and a second IoT platform 1041 is built in the second cloud server 104. IoT device 107 has access to both first IoT platform 1011 and second IoT platform 1041. Specifically, ioT device 107 includes a first access module 1071 and a second access module 1072. The first access module 1071 is an access module built based on a development kit (software development kit, SDK) provided by the first IoT platform 1011, and the IoT device 107 can access the first IoT platform 1011 through the first access module 1071. The second access module 1072 is an access module built based on the SDK provided by the second IoT platform 1041, and the IoT device 107 can access the second IoT platform 1041 through the second access module 1072.
In addition, the first control APP 103 accesses the first IoT platform 1011 and can call an application programming interface (hereinafter referred to as an interface) in the first IoT platform 1011. The second control APP 106 accesses the second IoT platform 1041 and is able to invoke an interface in the second IoT platform 1041. Control functions for IoT device 107 are developed in both first control APP 103 and second control APP 106, and thus IoT device 107 can be controlled both by first control APP 103 and by second control APP 106. Specifically, a user profile (profile) corresponding to each control instruction of the control IoT device 107 is defined in the first IoT platform 1011. The user profile is used to enable control of processing, transmission, etc. of instructions and data between APP and IoT devices. User profiles corresponding to the control instructions of the control IoT device 107 are also defined in the second IoT platform 1041.
The first control APP 103 includes a first host APP 1031 and a first APP plug-in 1032 that is capable of loading in the first host APP 1031. The first host APP 1031 is capable of interfacing with an interface of the first IoT platform 1011 and is capable of invoking a corresponding interface in the first IoT platform 1011. The first APP plug-in 1032 is configured to implement device control interface presentation, control instruction generation, control instruction issue, and receipt of feedback information of the IoT device 107. The first APP plug-in 1032 is loaded at a first host APP 1031, the first host APP 1031 interfacing with the first IoT platform 1011, thereby accessing the first IoT platform 1011. The first host APP 1031, through the first APP plug-in 1032, receives a control instruction of a user, invokes an interface corresponding to a corresponding user profile in the first IoT platform 1011, and issues the control instruction to the IoT device 107, so as to control the IoT device 107 through the first control APP 103.
Likewise, the second control APP 106 includes a second host APP 1061 and a second APP plug-in 1062 that is loadable into the second host APP 1061. The second host APP 1061 can interface with the second IoT platform 1041, and can invoke a corresponding interface in the second IoT platform 1041. The second APP plug-in 1062 is configured to implement IoT device 107 device control interface presentation, control instruction generation, control instruction issue, and feedback information reception. The second APP plug-in 1062 is loaded at the second host APP 1061, the second host APP 1061 interfacing with the second IoT platform 1041, thereby accessing the second IoT platform 1041. The second APP plug-in 1062 receives a control instruction of a user, and the second host APP 1061 invokes an interface corresponding to a corresponding user profile in the second IoT platform 1041 to issue the control instruction to the IoT device 107, so as to control the IoT device 107 through the second control APP 106.
As can be seen from the above, since the first IoT platform 1011 and the second IoT platform 1041 are different, the access interfaces and the call interfaces provided by the two platforms are different, so that the structures and interfaces of the first host APP 1031 and the second host APP 1061 are also different, and further the structures of the first APP plug-in 1032 and the second APP plug-in 1062 are also different, and the two APP plug-ins need to be separately developed and designed, so that the development cost is high. For this, the embodiment of the application provides an APP plug-in and an IoT device control method that can be compatible with multiple host APPs, thereby reducing development costs.
The IoT device control method provided by the embodiment of the application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality/virtual reality devices, notebook computers, ultra-mobile personal computer (UMPC), netbooks, personal digital assistants (personal digital assistant, PDA) and the like, in which APP can be installed, and the embodiment of the application does not limit the specific types of the electronic devices.
Fig. 3 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it may be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. The structures of the antennas 1 and 2 in fig. 3 are only one example. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer-executable program code that includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In this embodiment, taking an Android system with a layered architecture as an example, a software structure of the electronic device 100 is illustrated.
Fig. 4 is a software configuration block diagram of the electronic device 100 of the embodiment of the present application. The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively. The application layer may include a series of application packages.
As shown in fig. 4, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 4, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
Android runtimes include core libraries and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media library (media library), three-dimensional graphics processing library (e.g., openGL ES), 2D graphics engine (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The method provided in the embodiment of the present application and the architecture of the system involved in the method are described below with reference to the application scenario of fig. 1 and the electronic devices with the structures shown in fig. 3 and fig. 4. In this embodiment, an IoT device control method and a universal APP plug-in are provided, which are capable of being compatible with multiple host APPs, and the APP plug-in does not need to be developed for the multiple host APPs, so that development and maintenance costs are reduced. The following embodiments are described taking the general purpose APP plug-in that is compatible with a first host APP and a second host APP as examples. In practical application, the architecture and the method provided in this embodiment may be used to design a universal APP plug-in and an IoT control method that can be compatible with any two or more host APPs, as required.
The following embodiments are described with respect to IoT devices as smart screens, a first host APP as a smart living host APP, and a second host APP as a smart space host APP.
Fig. 5 is an architectural schematic diagram of a system including a first control APP, a first IoT platform, and an IoT device, provided in one embodiment of the present application. The first IoT platform is established on a first cloud server. The present embodiments relate to the structure and data flow associated when controlling IoT devices through a first control APP.
As shown in fig. 5, the first control APP may include a generic APP plug-in and a first host APP. The general APP plug-in and the first host APP may be disposed in an application layer in the software architecture shown in FIG. 4. The first host APP may include a first device information acquisition module, a first device information acquisition interface, a first feedback information acquisition interface, and a first general instruction interface. The first device information acquisition interface, the first feedback information acquisition interface, and the first generic instruction interface are each capable of interfacing with a corresponding interface in the first IoT platform.
The universal APP plug-in comprises a first device information receiving module, a second device information receiving module, an information conversion module, an interface display module, an instruction generating module, a host agent service (host service proxy), a first APP tool class (service util tool) and a second APP tool class (service util tool). The first equipment information receiving module can be in butt joint with the first host APP and receives data sent by the first host APP. The second equipment information receiving module can be in butt joint with the second host APP and receives data sent by the second host APP. The first APP tool class is capable of interfacing with a first host APP, sending data to the first host APP. The second APP tool class can interface with the second host APP, sending data to the second host APP. Specifically, the first device information receiving module can dock with the first device information obtaining module in the first host APP. The first APP tool class is capable of interfacing with a first generic instruction interface in a first host APP.
The first device information acquisition module is configured to acquire related information of an IoT device, such as a device name, ID information, function data and information to be displayed, and the like, of the IoT device from the first IoT platform through the first device information acquisition interface, and send the acquired related information of the IoT device to the first device information receiving module in the universal APP plug-in. The first device information receiving module sends relevant information of the IoT device to the information converting module. In this embodiment, the first host APP is an intelligent living host APP, and the information obtained by the first device information may include hi link device entity. It may be appreciated that the formats of the device information and/or the definition standards of the information obtained by different host APPs are different, and the information conversion module is configured to convert the relevant data information of the IoT device into the data information of the preset standard. The interface display module is used for displaying an interface according to the acquired data and information, including but not limited to displaying a device control interface according to the data information obtained by the information conversion module. In the embodiment of the present application, the IoT device is an intelligent screen, and the device control interface may include a remote control, an input source setting control, a sound setting control, an image setting control, and so on, which are not intended to be exhaustive herein.
The instruction generation module is to generate relevant instructions to control the IoT device in response to user operation of the relevant controls in the device control interface. In this embodiment, the instruction generation module may include a remote controller instruction generation unit, an input source setting instruction generation unit, a sound setting instruction generation unit, an image setting instruction generation unit, and the like, corresponding to a control in the device control interface.
The host proxy service may include an instruction conversion module, an instruction tagging module, a first feedback information acquisition module, and a second feedback information acquisition module. The instruction conversion module is used for converting the control instruction into a universal instruction matched with the first APP tool class or the second APP tool class according to the host application loaded by the universal APP plug-in. For example, in this embodiment, the universal APP plug-in is loaded in the first host APP, and the first APP tool class can interface with the first host APP, and then the instruction conversion module converts the control instruction into a first universal instruction that matches the first APP tool class. The instruction marking module is used for marking the general instruction and sending the marked general instruction to a tool class corresponding to the host APP loaded by the general APP plug-in. In this embodiment, the universal APP plug-in is loaded in the first host APP, and then the instruction marking module marks the first universal instruction to obtain the first universal marking instruction, and sends the first universal marking instruction to the first APP tool class. The first APP tool class can interface with the first host APP, the first generic instruction interface can interface with an interface in the first IoT platform, and thus the first APP tool class can send the first generic markup instruction to the first IoT platform through the first generic instruction interface. The first feedback information acquisition module is used for interfacing with a first feedback information acquisition interface of the first host APP and receiving feedback information sent by the first host APP. The second feedback information acquisition module is used for interfacing with a second feedback information acquisition interface of the second host APP and receiving feedback information sent by the second host APP.
In this embodiment, the first IoT platform may include a first general user profile, where the first general user profile is configured to send a first general tag instruction sent by the first control APP to the IoT device.
The IoT device may include a first APP account login module, a second APP account login module, a registration instruction generation module, a first access module, a second access module, an instruction distribution module, and an instruction processing service (cmd server) module. It is appreciated that in this embodiment, the IoT device is a smart screen, which may have a display screen that may display the IoT interface. Optionally, the IoT interface may include a first APP account login window, a second APP account login window, a registration window, and the like. The first APP account login module is used for acquiring and managing account information (which can comprise an account, a login password and the like) of a first control APP input by a user in a first APP account login window. The second APP account login module is used for acquiring and managing account information of a second control APP input by a user in a second APP account login window. The registration instruction generation module is used for generating a registration instruction according to information of the IoT device and account information of the second control APP, which are input by a user in the registration window. The registration instructions are to instruct to register the IoT device at the second IoT platform.
In this embodiment, the first access module is an access module built based on the hi link SDK provided by the first IoT platform, and the IoT device accesses the first IoT platform through the first access module. The second access module is an access module built based on a magic link SDK provided by the second IoT platform, and the IoT device accesses the second IoT platform through the second access module.
In this embodiment, the first IoT platform sends a first generic tagging instruction to the first access module. The first access module sends the marked general marking instruction to the instruction distribution module. The instruction distribution module is used for distributing the control instruction to corresponding units in the instruction processing service module according to the content of the control instruction. The instruction distribution module is further configured to receive feedback information, and send the feedback information to a corresponding module according to a source of a control instruction corresponding to the feedback information (i.e., from which module the control instruction is input). For example, in this embodiment, after receiving the feedback information, if it is determined that the source of the control instruction corresponding to the feedback information is the first access module, the instruction distribution module sends the feedback information to the first access module. The instruction processing service module is used for processing and executing the control instruction. Optionally, the control instructions processed and executed by the instruction distribution module and the instruction processing service module may be control instructions issued by the control APP, control instructions issued by the server, or control instructions input by the user directly operating the IoT device, for example, registration control instructions input by the user through an interactive interface of the smart screen.
Alternatively, in this embodiment, the instruction processing service module may include a device status reporting unit, a remote controller unit, an input source setting unit, a sound setting unit, an image setting unit, a device registration unit, and the like. Wherein the device registration unit is to register the IoT device with the second IoT platform.
It should be noted that the architecture of the IoT device above is merely an example, and the IoT device may include more or fewer units and modules than in the above embodiments depending on the kind and functional design. For example, the first APP account login module, the second APP account login module, the registration instruction generation module, and the like may not be included in IoT devices without a display screen and an interactive interface, and the instruction processing units specifically included in the instruction processing service module may be different for different IoT devices.
Fig. 6 is a schematic architecture diagram of a system including a second control APP, a second IoT platform, and an IoT device, as provided in one embodiment of the present application. Wherein the second IoT platform is established at a second cloud server. The present embodiments relate to the structure and data flow associated with controlling IoT devices via a second control APP.
As shown in fig. 6, the second control APP may include a generic APP plug-in and a second host APP. The generic APP plug-in and the second host APP may be provided at an application layer in the software architecture shown in fig. 4. The second host APP comprises a second equipment information acquisition module, a second equipment information acquisition interface, a second feedback information acquisition interface and a second general instruction interface. The second device information acquisition interface, the second feedback information acquisition interface, and the second general instruction interface are each capable of interfacing with a corresponding interface in the second IoT platform. The second device information acquisition module is configured to acquire relevant information of the IoT device from the second IoT platform through the second device information acquisition interface. The information obtained by the second device information is different from the format and/or definition standard of the information obtained by the first device information obtaining module in the first control APP. In this embodiment, the second host APP is an intelligent space host APP, and the information obtained by the second device information may include host device entity.
The structure of the general APP plug-in is the same as that of the general APP plug-in the embodiment shown in fig. 5, and the structure of the general APP plug-in is not described again. However, unlike the embodiment shown in fig. 5, in this embodiment, the universal APP plug-in is loaded in the second host APP, and the instruction conversion module converts the control instruction into a second universal instruction matching the second APP tool class, and sends the second universal instruction to the instruction tagging module. The instruction marking module marks the second general instruction to obtain a second general marking instruction, and sends the marked second general marking instruction to a second APP tool class. The second APP tool class sends a second generic tag instruction to the second IoT platform via the second generic instruction interface. In this embodiment, the universal APP plug-in interfaces with the second feedback information acquisition interface through the second feedback information acquisition module, and receives feedback information sent by the second host APP. The universal APP plug-in unit is in butt joint with the second equipment information acquisition module through the second equipment information receiving module and receives equipment information sent by the second host APP. In other words, the embodiment shown in fig. 5 has the same structure as the general-purpose APP plug-in this embodiment, but the host APP to which the general-purpose APP is docked is different, the transmission paths of the instruction and the information are different, and the formats of the instruction are different.
In this embodiment, the second IoT platform may include a second general user profile, where the second general user profile is configured to send a second general tag instruction sent by the second control APP to the IoT device.
The structure of the IoT device is as described in the embodiment shown in fig. 5, and is not described here. The second access module of the IoT device is capable of interfacing with a second IoT platform. The second IoT platform sends a second universal marking instruction to a second access module of the IoT device. In this embodiment, after receiving the feedback information, the instruction distribution module of the IoT device determines that the source of the feedback information is the second access module, and then sends the feedback information to the second access module, and the second access module sends the feedback information to the second IoT platform. In other words, the IoT platform that the IoT device in this embodiment interfaces with is different from the embodiment shown in fig. 5, and the transmission paths of the instructions and information are different.
For easy understanding, the following embodiments of the present application will take the structures shown in fig. 5 and fig. 6 as an example, and specifically describe the IoT device control method provided in the embodiments of the present application in conjunction with the drawings and the application scenario.
The process of IoT device control mainly involves a device registration phase, a device information presentation phase, an instruction issue phase, and a data return phase. In the following embodiments, taking IoT devices as smart screens, specific flows of each stage of IoT device control in two scenarios of controlling IoT devices through a first control APP and controlling IoT devices through a second control APP are described respectively.
A. Controlling IoT devices through a first control APP
1) Device registration phase
Fig. 7 is a schematic flow chart of a device registration phase in an IoT device control method according to an embodiment of the present application. Referring to fig. 5 and fig. 7 together, in this embodiment, the IoT device control method includes:
s701, a user performs a first login operation on a first APP account login window in an internet of things (IoT) device interface of a smart screen, and a first APP account login module responds to the first login operation of the user to acquire first APP account information input by the user. The first login operation comprises operations such as inputting first APP account information, clicking a login control and the like. The first APP account information refers to account information registered by the user in the first control APP.
S702, the first APP account login module sends the acquired first APP account information to the first access module.
S703, the first access module sends the first APP account information to the first IoT platform, and applies for registration information of the IoT device to the first IoT platform.
S704, the first IoT platform generates registration information of the IoT device in response to the application of the first access module, and associates the registration information of the IoT device with the first APP account information, so as to facilitate verification when the subsequent device registers.
The registration information of the IoT device may include registrant identity information of the IoT device, an activation code of the IoT device, and the like.
S705, the first IoT platform returns the generated registration information of the IoT device to the first access module of the IoT device.
S706, the first access module of the IoT device sends the registration information of the IoT device and the first APP account to the second IoT platform, and requests the first IoT platform to register the device.
S707, the first IoT platform performs device registration on the IoT device in response to the device registration request of the first access module.
Specifically, the first IoT platform may compare and verify the registration information of the IoT device sent by the IoT device with the registration information of the IoT device associated with the first APP account stored in the first IoT platform, and if the two are consistent, the first IoT platform generates the device information of the IoT device. The device information includes a device account, a login password, and the like. The first IoT platform binds the device information of the IoT device with the first APP account, i.e., associates the device information of the IoT device with the first APP account information.
S708, the first IoT platform returns a registration result to a first access module of the IoT device.
Optionally, the registration result may include a device account and a login password of the IoT device. The IoT device may log into the first IoT platform according to the device account and the login password.
It should be noted that the above-mentioned process of the device registration stage is only an example, and the specific process of the device registration stage may be different according to the type, function, etc. of the IoT device, for example, in the case that the IoT device does not have a display screen and an interactive interface, the device registration may be performed by the first control APP in the control terminal, which is not limited in this embodiment of the present application.
2) Device information presentation phase
Fig. 8 is a schematic diagram illustrating an interface change of a mobile phone when a user operates a first control APP according to an embodiment of the present application. When the smart screen is bound with the first APP account and the first control APP in the mobile phone logs in with the first APP account, and the user clicks an icon of the first control APP in the interface shown in (a) of fig. 8, the mobile phone opens the first control APP in response to the clicking operation of the user, and displays a main interface of the first control APP, as shown in (b) of fig. 8. The interface includes a smart card 801. The user clicks on the smart card 801 and enters the device control interface of the smart screen as shown in fig. 8 (c).
In the above process, when the user clicks the smart card 801, the first control APP enters the device information display stage, and the specific execution process is as follows.
Fig. 9 is a schematic flow chart of a device information presentation phase in an IoT device control method according to an embodiment of the present application. Referring to fig. 5 and fig. 9 together, in this embodiment, the IoT device control method includes:
s901, a first device information acquisition module in a first host APP acquires first device information of an IoT device (smart screen) from a first IoT platform through a first device information acquisition interface in response to an operation of clicking a smart screen card by a user.
For convenience of distinction, in the embodiment of the present application, the device information of the intelligent screen acquired by the first device information acquisition module of the first host APP is referred to as first device information, and the device information of the intelligent screen acquired by the second device information acquisition module of the second host APP is referred to as second device information.
S902, a first device information acquisition module in the first host APP sends first device information to a first device information receiving module in the universal APP plugin.
S903, a first device information receiving module in the universal APP plug-in sends the first device information to an information conversion module.
S904, an information conversion module in the universal APP plug-in converts the first equipment information to obtain standard equipment information.
Optionally, the information conversion module may perform JSON deserialization conversion on the first device information according to a preset standard, to obtain standard device information. The subsequent APP is based on the standard equipment information when the equipment control interface is displayed or other steps requiring equipment information support are executed.
S905, the information conversion module in the universal APP plug-in sends standard equipment information to the interface display module.
S906, an interface display module in the universal APP plug-in displays an equipment control interface of the intelligent screen according to standard equipment information, as shown in (c) in fig. 8.
In this embodiment, the first device information receiving module in the universal APP plug-in interfaces with the first device information obtaining module in the first host APP, so that device information of the IoT device can be obtained from the first host APP. And the information conversion module in the universal APP plug-in converts the equipment information acquired by the host APP into standard equipment information, and displays an equipment control interface based on the standard equipment information. Like this, general APP plug-in components can adapt and compatible multiple host APP, realize unification and standardization of the equipment information in the different host APP for the equipment control interface that different control APP presented to the user is unified, improves user experience.
3) Instruction issue stage
In one embodiment, when the user clicks on a control as in (c) of fig. 8, the first control APP enters the instruction issue phase. This embodiment is described taking an example in which the user clicks the input source setting control 802 shown in (c) in fig. 8 to issue an input source setting instruction. Specifically, the description will be given taking the example that the user changes the input source of the smart screen from DTV to HDMI1 by operating the input source setting control 802. The issuing process of other control instructions is similar to that, and will not be described again.
Fig. 10 is a schematic flow chart of an instruction issuing stage in an IoT device control method according to an embodiment of the present application. Referring to fig. 5 and fig. 10 together, in this embodiment, the IoT device control method includes:
s1001, an input source setting instruction generating unit in the instruction generating module responds to the operation of clicking an input source setting control by a user to generate an input source setting instruction.
In this embodiment, the input source setting instruction is used to instruct setting the input source of the smart screen to HDMI1.
S1002, an input source setting instruction generating unit sends an input source setting instruction to an instruction conversion module in a home agent service.
S1003, an instruction conversion module in the host proxy service converts the input source setting instruction into a first general instruction.
The general command refers to a control command with a preset general format. After different control instructions are converted into a general instruction with a certain general format, the general instruction can be input through a certain general interface, and a module which is in butt joint with the interface can also receive the general instruction through the general interface. At the same time, the IoT platform may also process or transmit the generic instructions via a generic user profile.
In this embodiment, the instruction conversion module may convert the received control instruction into a general instruction with a different format according to different host APPs loaded by the general APP plug-in. Specifically, if the universal APP plug-in is loaded in the first host APP, the instruction conversion module converts all the received control instructions into universal instructions in the first format, so as to obtain first universal instructions. The first format refers to a format matched with the first APP tool class. If the universal APP plug-in is loaded in the second host APP, the instruction conversion module converts all received control instructions into universal instructions in a second format to obtain second universal instructions. Wherein the second format is a format matching the second APP tool class.
S1004, the instruction conversion module in the host proxy service sends the first general instruction to the instruction marking module in the host proxy service.
S1005, an instruction marking module in the host agent service marks the first general instruction to obtain the first general marking instruction.
Optionally, the instruction tag module may add an instruction tag to each first general instruction to distinguish the respective first general instruction, the instruction tag being used to characterize the unique identity of the instruction. As a possible implementation manner, the instruction marking module may increase the instruction sequence number at a preset position of each first general instruction, and the increased instruction sequence number in each first general instruction is different. For example, the instruction tag module increases the instruction sequence number SN1 at the end of the first issued first general instruction, increases the instruction sequence number SN2 at the end of the second issued first general instruction, and so on. The first general-purpose instruction after adding the tag is called a first general-purpose tag instruction.
S1006, the instruction marking module in the host agent service sends the first general marking instruction to the corresponding tool class. In this embodiment, the instruction tagging module sends a first universal tagging instruction to the first APP tool class.
Optionally, the instruction marking module may send the first generic marking instruction to the corresponding tool class according to a format of the first generic marking instruction. Optionally, the instruction marking module may determine the host APP currently loaded by the universal APP plug-in, and then send the first universal marking instruction to the tool class of the host APP currently loaded by the universal APP plug-in. Alternatively, the instruction marking module may determine the host APP currently loaded by the universal APP plug-in according to the type of the device information received by the first device information receiving module or the source of the device information (the first device information receiving module). For example, if the device information received by the information conversion module is hilink device entity, it is determined that the host APP currently loaded by the universal APP plug-in is an intelligent living host APP, and the instruction marking module sends a first universal marking instruction to the first APP tool class. If the equipment information received by the information conversion module is host device entity, determining that the host APP currently loaded by the universal APP plug-in is an intelligent space host APP, and sending a first universal marking instruction to a second APP tool class by the instruction marking module.
S1007, the first APP tool class sends the first universal marking instruction to the first IoT platform through the first universal instruction interface in the first host APP.
S1008, the first IoT platform sends a first universal marking instruction to a first access module of the IoT device.
Specifically, the first IoT platform may send the first generic tagging instruction to the first access module via the first generic configuration file.
S1009, the first access module of the IoT device sends the first generic marking instruction to the instruction distribution module.
S1010, the instruction distribution module of the IoT device determines and records information of the module that inputs the first generic markup instruction, that is, determines and records the source of the first generic markup instruction.
Specifically, the instruction distribution module may acquire an instruction tag in each received control instruction, and establish a correspondence between each instruction tag and information of a module inputting the control instruction, so that information of the module inputting the control instruction may be obtained according to the instruction tag.
S1011, the instruction distribution module of the IoT device analyzes the first universal marking instruction, and sends the first universal marking instruction to a corresponding unit in the instruction processing service module according to the content of the first universal marking instruction. In this embodiment, the instruction distribution module sends the first universal flag instruction to the input source setting unit in the instruction processing service module.
S1012, an instruction input source setting unit in the instruction processing service module executes a first general marking instruction, sets an input source for a current display screen of the intelligent screen, and sets the input source as HDMI1.
In this embodiment, the instruction marking module in the host proxy service may send the first universal marking instruction to a first APP tool class corresponding to the first host APP loaded by the universal APP plug-in, where the first APP tool class may interface with the first host APP, send the first universal marking instruction to the first IoT platform through a first universal instruction interface in the first host APP, and forward the control instruction to the IoT device by the first IoT platform. Thus, the universal APP plug-in is applicable to the first host APP. On the other hand, the instruction is converted into the general instruction through the instruction conversion module in the host proxy service, so that the first APP tool class and the first host APP only need to be in butt joint with one type of instruction, a plurality of interfaces are not required to be designed, the first IoT platform only needs to develop one general user configuration file and does not need to design a plurality of user configuration files, and therefore development and maintenance costs are saved, and development costs can be greatly saved especially for IoT devices with more control instructions, such as intelligent screens and intelligent sound boxes.
4) Data return phase
In practical applications, ioT devices report or return feedback information to the control APP. Specifically, in some embodiments, the relevant unit in the instruction processing service module of the IoT device may return, after executing the control instruction, the execution result of the control instruction or relevant data generated by executing the control instruction, etc. to the control APP. In other embodiments, the IoT device may obtain the status information of the IoT device and report the status information to the control APP, such that the control APP displays the status information of the IoT device on a card of the IoT device in a device control interface of the IoT device or a main interface of the control APP. When the IoT device reports or returns feedback information, the IoT device enters a data return phase, and the specific process of the data return phase is as follows.
Fig. 11 is a schematic flow diagram of a data return stage in an IoT device control method according to an embodiment of the present application. In this embodiment, an execution result of an input source setting instruction is fed back to a first control APP by an IoT device is described as an example. Referring to fig. 5 and 11 together, in this embodiment, the IoT device control method includes:
s1101, the input source setting unit generates first feedback information according to an execution result of the input source setting instruction, wherein the first feedback information comprises an instruction mark in the input source setting instruction.
S1102, the input source setting unit sends the first feedback information to the instruction distribution module.
S1103, the instruction distribution module determines the source of the control instruction corresponding to the instruction mark according to the instruction mark in the first feedback information. In this embodiment, the instruction distribution module of the IoT device determines, according to the instruction tag in the first feedback information, that the source of the control instruction corresponding to the instruction tag is the first access module.
S1104, the instruction distribution module returns the first feedback information to the corresponding module according to the source of the control instruction corresponding to the instruction mark. In this embodiment, the instruction distribution module returns the first feedback information to the first access module.
S1105, the first access module sends the first feedback information to the first IoT platform.
S1106, the first IoT platform sends the first feedback information to a first feedback information acquisition module of the host proxy service through a first feedback information acquisition interface of the first host APP.
S1107, the first feedback information acquisition module sends the first feedback information to the information conversion module.
S1108, the information conversion module converts the first feedback information to obtain first standard feedback information.
S1109, the information conversion module sends the first standard feedback information to the interface display module.
S1110, the interface display module updates the equipment control interface according to the first standard feedback information, and displays that the input source is HDMI1.
In this embodiment, the instruction distribution module of the IoT device determines, according to the instruction tag in the first feedback information, a source of a control instruction corresponding to the instruction tag, and sends the first feedback information to the corresponding module according to the source of the control instruction, so as to feedback the first feedback information to the control APP that issues the corresponding control instruction. The instruction distribution module determines the source of the control instruction corresponding to the instruction mark according to the instruction mark in the first feedback information, so that the accuracy of feedback information transmission under the scene of controlling the IoT equipment by the two control APP is ensured, and the user experience is improved. On the other hand, after the first feedback information is sent to the control APP, the first feedback information is converted through the information conversion module, so that first standard feedback information is obtained, interface display is performed based on the first standard feedback information, the consistency of feedback information display is guaranteed, and user experience is further improved.
B. Controlling IoT devices through a second control APP
The specific process of controlling IoT devices by the second control APP is similar to the specific process of controlling IoT by the first control APP. Differences from the process of controlling IoT by the first control APP will be mainly described below, and the same or similar points may be referred to the embodiments shown in fig. 7 to 11, and will not be described again.
1) Device registration phase
Fig. 12 is a schematic flow chart of a device registration phase in another IoT device control method according to an embodiment of the present application. Referring to fig. 6 and 12 together, in this embodiment, the IoT device control method includes:
s1201, a user performs a second login operation on a second APP account login window in an internet of things (IoT) device interface of the intelligent screen, and the second APP account login module responds to the second login operation of the user to acquire second APP account information input by the user. The second login operation may include entering second APP account information, clicking a login control, and the like. The second APP account information refers to account information registered by the user in the second control APP.
S1202, the second APP account login module sends the acquired second APP account information to the registration instruction generation module.
S1203, the user performs a registration operation in a registration window in an IoT device interface of the smart screen, and the registration instruction generating module generates a device registration instruction according to the second APP account information in response to the registration operation of the user, where the device registration instruction includes the second APP account information. The registration operation may include entering device account information for the IoT device, clicking on a registration control, and the like. The device account information may include, among other things, a device account of the IoT device, a login password, and the like.
And S1204, the registration instruction generation module sends the equipment registration instruction to the instruction distribution module.
S1205, the instruction distribution module analyzes the registration instruction generation module and distributes the equipment registration instruction to the equipment registration unit in the instruction processing service module according to the content of the registration instruction.
And S1206, the device registration unit in the instruction processing service module reports the second APP account information to the second IoT platform according to the device registration instruction, and applies for the target family account information to the second IoT platform.
The family account information refers to information of families or groups to which the APP account belongs or is associated. APP accounts belonging to the same home account may share IoT devices with each other. In other words, APP accounts under the same home account may share IoT devices with each other. The target home account information refers to home account information associated with the second APP account information.
S1207, the second IoT platform obtains target family account information associated with the second APP account information according to the second APP account information.
Specifically, if the second APP account does not belong to any home account, the second IoT platform may create a target home account and mount the second APP account under the target home account, i.e., associate the second APP account information with the target home account information. If the second APP account belongs to a certain home account, the second IoT platform determines information of the home account as target home account information.
S1208, the second IoT platform returns the target home account information to the device registration unit in the instruction processing service module of the IoT device.
The device registration unit in the instruction processing service module of the IoT device transmits the target home account information and the registration information to the second access module S1209.
S1210, the second access module sends the target family account information and the IoT device account information to the second IoT platform, and applies for registration information of the IoT device to the second IoT platform.
S1211, the second IoT platform generates registration information of the IoT device in response to the application of the second access module, and associates the registration information of the IoT device with the target home account information, so as to facilitate verification when the subsequent device registers.
The registration information of the IoT device may include registrant identity information of the IoT device, an activation code of the IoT device, and the like.
S1212, the second IoT platform returns the generated registration information of the IoT device to the second access module of the IoT device.
S1213, the second access module of the IoT device sends the registration information of the IoT device and the second APP account information to the second IoT platform, and requests the second IoT platform to register the device.
S1214, the second IoT platform performs device registration in response to the device registration application of the second access module.
Specifically, the second IoT platform may find the home account information corresponding to the second APP account information, and the registration information associated with the home account information. The second IoT platform compares and verifies the registration information sent by the IoT device with the searched registration information, and if the registration information is consistent with the searched registration information, the second IoT platform binds the IoT device with the second APP account, namely, associates the device information of the IoT device with the second APP account information.
It should be noted that the above-mentioned process of the device registration stage is only an example, and the specific process of the device registration stage may be different according to the type, function, etc. of the IoT device, for example, in the case that the IoT device does not have a display screen and an interactive interface, the device registration may be performed through the second control APP in the control terminal, which is not limited in any way in the embodiments of the present application.
2) Device information presentation phase
Fig. 13 is a schematic diagram illustrating an interface change of a mobile phone when a user operates a second control APP according to an embodiment of the present application. The second control APP will be described as an example of the smart space. When the user clicks the icon of the smart space APP in the interface shown in (a) of fig. 13 under the condition that the smart screen is bound to the second APP account and the second control APP in the mobile phone logs in to the second APP account, the mobile phone opens the second control APP in response to the clicking operation of the user, and displays the main interface of the second control APP, as shown in (b) of fig. 13. The interface includes a smart card 1301. The user clicks on the smart screen card 1301 to enter the device control interface of the smart screen, as shown in fig. 13 (c).
In the above process, when the user clicks the smart card 1301, the second control APP enters the device information display stage. In this embodiment, the specific flow of the device information display stage is similar to that of the embodiment shown in fig. 9, except that in this embodiment, after the user clicks the smart card in the second control APP, the second device information obtaining module in the second host APP obtains the second device information from the second IoT platform through the second device information obtaining interface in response to the operation of clicking the smart card by the user. The second device information acquisition module sends the second device information to a second device information receiving module in the universal APP plug-in. The second equipment information receiving module sends the second equipment information to the information conversion module, and the information conversion module converts the second equipment information to obtain standard equipment information. The subsequent steps are the same as those in the embodiment shown in fig. 9, and will not be described again.
In this embodiment, the second device information receiving module in the universal APP plug-in interfaces with the second device information obtaining module in the second host APP, so that device information of the IoT device can be obtained from the second host APP. And the information conversion module in the universal APP plug-in converts the equipment information acquired by the host APP into standard equipment information, and displays an equipment control interface based on the standard equipment information. Like this, general APP plug-in components can adapt and compatible multiple host APP, realize unification and standardization of the equipment information in the different host APP for the equipment control interface that different control APP presented to the user is unified, improves user experience.
3) Instruction issue stage
In one embodiment, when the user clicks on a control as in (c) of fig. 13, the second control APP enters the instruction issue phase. This embodiment is described taking an example in which the user clicks the input source setting control 1302 shown in (c) of fig. 13 to issue an input source setting instruction. Specifically, the description will be given taking the example that the user changes the input source of the smart screen from DTV to HDMI1 by operating the input source setting control 1302.
In this embodiment, the specific flow of the instruction issuing stage is similar to that of the embodiment shown in fig. 10, except that in this embodiment, after the user clicks the input source setting control of the device control interface, the instruction conversion module in the host proxy service converts the input source setting instruction into the second general instruction. The second general instruction is in a different format than the first general instruction. The instruction conversion module sends the second general instruction to the instruction marking module, and the instruction marking module marks the second general instruction to obtain a second general marking instruction. The instruction tagging module sends a second universal tagging instruction to the second APP tool class. The second APP tool class sends a second universal marking instruction to the second IoT platform through a second universal instruction interface in the second host APP. The second IoT platform sends a second universal marking instruction to a second access module of the IoT device via a second universal user profile. The second access module of the IoT device sends a second universal marking instruction to the instruction distribution module. The subsequent processing flow for the second general marking instruction is the same as the steps in the embodiment shown in fig. 10, and will not be described again.
In this embodiment, the instruction marking module in the host proxy service may send the second general purpose marking instruction to a second APP tool class corresponding to a second host APP loaded by the general purpose APP plug-in, where the second APP tool class may interface with the second host APP, send the second general purpose marking instruction to the second IoT platform through a second general purpose instruction interface in the second host APP, and forward the control instruction to the IoT device by the second IoT platform. Thus, the universal APP plug-in is applicable to a second host APP. Therefore, the universal APP plug-in can be compatible with the first host APP and the second host APP, so that only one set of APP plug-in needs to be developed when the same IoT device is controlled by the two control APPs, and development and maintenance costs are reduced. On the other hand, the instruction is converted into the general instruction through the instruction conversion module in the host proxy service, so that the second APP tool class and the second host APP only need to be in butt joint with one type of instruction, a plurality of interfaces are not required to be designed, the second IoT platform only needs to develop one general user configuration file and does not need to design a plurality of user configuration files, and therefore development and maintenance costs are saved, and development costs can be greatly saved especially for IoT devices with more control instructions, such as intelligent screens and intelligent sound boxes.
4) Data return phase
In this embodiment, the specific flow of the instruction issuing stage is similar to that of the embodiment shown in fig. 11, except that in this embodiment, the input source setting unit generates the second feedback information, and sends the second feedback information to the instruction distributing module, and the instruction distributing module determines, according to the instruction tag in the second feedback information, that the source of the control instruction corresponding to the instruction tag is the second access module. The instruction distribution module returns the second feedback information to the second access module. The second access module sends second feedback information to the second IoT platform. The second IoT platform sends the second feedback information to a second feedback information acquisition module of the hosting proxy service through a second feedback information acquisition interface of the second hosting APP. The other processing flows and the beneficial effects of the present embodiment are the same as those of the embodiment shown in fig. 11, and will not be described again.
The IoT device control method provided in the embodiments of the present application is described in detail below with reference to the accompanying drawings.
Fig. 14 is an exemplary IoT device control method according to an embodiment of the present application. In this embodiment, the execution body of the method may be an electronic device as shown in fig. 3 and fig. 4. Install control APP in the electronic equipment, control APP includes general APP plug-in components, and general APP plug-in components include two at least first data interface, and two at least first data interface are used for with two at least host APP butt joint, send data to two at least host APP. The control APP may be the first control APP or the second control APP in the above embodiment. The at least two host APPs may include the first host APP and the second host APP in the above embodiments. Optionally, in an embodiment, the first data interface may include the first APP tool class and the second APP tool class in the above embodiments. Of course, the first data interface may be another module or interface, which is not limited in this application.
As shown in fig. 14, the method includes:
s1401, receive, through the universal APP plug-in, a control instruction for controlling the IoT device.
The control instruction may be, for example, one of the remote controller instructions, the input source setting instructions, the sound setting instructions, the image setting instructions, and the like in the above-described embodiments.
Optionally, the general APP plug-in can receive the control instruction input by the user through the device control interface, and the control instruction can also be generated by the internal related module of the general APP plug-in. For example, a network monitoring module may be included in the generic APP plug-in to monitor network communication conditions of IoT devices. The network monitoring module may generate network inspection instructions according to a preset period, the network monitoring module to instruct the IoT to inspect its network condition and return inspection results.
S1402, the universal APP plug-in converts the control instruction into a target instruction matched with a first target interface according to the target host APP loaded by the universal APP plug-in, wherein the first target interface is an interface which is in butt joint with the target host APP in at least two first data interfaces.
That is, the target host APP refers to the host APP currently loaded by the universal APP plug-in. When the universal APP plug-in is loaded in the first control APP, the first control APP is a target host APP, and the first target interface is an interface which is in butt joint with the first control APP in at least two data interfaces; when the universal APP plug-in is loaded in the second control APP, the second control APP is a target host APP, and the first target interface is an interface which is in butt joint with the second control APP in at least two data interfaces.
Different host APPs have different interfaces, and the types, formats, standards and the like of data matched by the different interfaces are different. The universal APP plug-in converts the control instruction into a target instruction matched with the first target interface, so that the instruction can be sent to the target host APP through the first target interface.
S1403, the universal APP plug-in sends a target instruction to the target host APP through the first target interface.
Alternatively, the target host APP may include a generic instruction interface, and the generic APP plug-in may send the target instruction to the generic instruction interface through the first target interface. Optionally, when the target host APP is the first host APP, the general instruction interface may be the first general instruction interface; when the target host APP is the second host APP, the general instruction interface may be the second general instruction interface.
S1404, sending, by the target host APP, a target instruction to the IoT device.
Optionally, the target host APP may send the target instruction to the IoT device through the IoT platform it interfaces with. For example, if the target host APP is the first host APP in the above embodiment, the first host APP sends the target instruction to the first IoT platform, which forwards the target instruction to the IoT device.
According to the control method for the IoT device, the universal APP plug-in comprises at least two first data interfaces, can be in butt joint with at least two host APPs, and can convert control instructions into instructions matched with interfaces corresponding to the host APPs, that is, the universal APP plug-in and the method can be compatible with at least two host APPs, and application plug-ins do not need to be developed for a plurality of host APPs respectively, so that development and maintenance costs are reduced.
In one embodiment, in step S1402, converting the control instruction into a target instruction matched with the first target interface may include: and the universal APP plug-in converts the control instruction according to the target format to obtain a target instruction. The target format refers to a format matched with the first target interface.
As one possible implementation, the target format may be a generic format that matches the first target interface, and the target instruction is a generic instruction. Alternatively, when the target host APP is the first host APP, the general instruction may be the first general instruction; when the target host APP is the second host APP, the general instruction may be the second general instruction.
In one embodiment, the step of converting the control instruction by the general APP plug-in according to the target format to obtain the target instruction may include: converting the control instruction into an instruction in a target format through a universal APP plug-in, and obtaining a conversion instruction; and marking the conversion instruction through the universal APP plug-in to obtain the target instruction.
Alternatively, when the target host APP is the first host APP, the conversion instruction may be the first general-purpose tag instruction; when the target host APP is the second host APP, the general instruction may be the second general flag instruction.
In one embodiment, the generic APP plug-in may generate the device control interface by: acquiring interface information through a target host APP, wherein the interface information refers to information required by a display device control interface; transmitting interface information to a general APP plug-in through a target host APP; converting the interface information through a universal APP plug-in to obtain standard interface information; the universal APP plug-in displays the device control interface based on the standard interface information.
Optionally, the universal APP plug-in may include at least two second data interfaces for interfacing with at least two host APPs to obtain data from the at least two host APPs. In this case, the interface information may be sent to the second target interface through the target host APP, where the second target interface is an interface in the second data interface that interfaces with the target host APP.
Alternatively, the second data interface may include at least two device information interfaces and at least two feedback information interfaces. The at least two equipment information interfaces are used for being in butt joint with the at least two host APP and receiving the equipment information sent by the at least two host APP. The at least two feedback information interfaces are used for being in butt joint with the at least two host APP and receiving feedback information sent by the at least two host APP. In the case where the at least two host APPs include the first host APP and the second host APP in the above embodiments, the device information interface may include the first device information receiving module and the second device information receiving module in the above embodiments, and the feedback information interface may include the first feedback information acquiring module and the second feedback information acquiring module in the above embodiments.
The interface information includes device information of the IoT device and/or feedback information from the IoT device, and the second target interface may include a target device information interface and a target feedback information interface. The target device information interface refers to an interface which is in butt joint with the target host APP in at least two device information interfaces. The target feedback information interface refers to an interface which is in butt joint with the target host APP in at least two feedback information interfaces.
Fig. 15 is a schematic diagram illustrating another IoT device control method according to an embodiment of the present application. In this embodiment, the execution body of the method may be an IoT device. As shown in fig. 15, the method includes:
s1501, receiving a target instruction from a target control APP, wherein the target control APP comprises a universal APP plug-in, and the universal APP plug-in comprises at least two first data interfaces, and the first data interfaces are used for interfacing with at least two host APPs and sending data to the at least two host APPs; the target instruction is an instruction matched with a first target interface, the first target interface is an interface which is in butt joint with a target host APP in at least two first data interfaces, and the target host APP is a host APP loaded by the universal APP plug-in.
The target control APP refers to a control APP capable of transmitting the above target instruction to the IoT device among at least two control APPs capable of controlling the IoT device. The target control APP comprises the general APP plug-in, and the general APP plug-in can realize the method in the embodiment shown in fig. 14.
S1502, executing a target instruction.
S1503, generating feedback data according to the target instruction.
The feedback data is data generated by the IoT device according to the target instruction, and may be an execution result of the target instruction, or related information, data, etc. obtained according to the target instruction. The feedback instruction uniquely corresponds to the target instruction. Optionally, when the target host APP is the first host APP and the target instruction is the first universal flag instruction, the feedback data may be the first feedback data; when the target host APP is the second host APP and the target instruction is the second general purpose flag instruction, the feedback data may be the second feedback data.
The process of IoT executing the target instruction and generating the feedback data may refer to the above-mentioned embodiments related to fig. 5 to 12, which are not described herein.
S1504, feedback data is sent to the target control APP.
It can be understood that when the plurality of control APPs can control the IoT device, the IoT device returns feedback data corresponding to the target instruction to the control APP that sends the target instruction, so that accurate communication with the control APP is achieved, communication confusion is avoided, and communication accuracy is improved.
Optionally, an instruction tag may be included in the control instruction sent by the control APP to the IoT device. The target instruction may have a first instruction tag therein, where the first instruction tag is used to characterize a unique identity of the target instruction, and the feedback instruction may also include the first instruction tag therein. When the IoT receives a control instruction, the corresponding relationship between the instruction tag in the control instruction and the control APP that sends the control instruction may be recorded. When feedback data is returned, the IoT may determine, according to the instruction tag in the feedback data, a control APP that sends a control instruction corresponding to the feedback data. In this embodiment, the IoT device may send the feedback data to the control APP that sends the target instruction, that is, the target control APP, according to the correspondence and the first instruction flag.
In one embodiment, an IoT device includes at least two access modules for one-to-one communication with at least two control APPs. Optionally, the at least two access modules may interface with at least two IoT platforms one-to-one, the at least two IoT platforms interfacing with the at least two control APPs, thereby enabling communication of the IoT device with the at least two control APPs. Alternatively, the at least two access modules may include the first access module and the second access module in the above embodiments.
The corresponding relation between the instruction mark and the control APP can also be the corresponding relation between the control instruction and the access module. The step S1501 of receiving a target instruction from the target control APP may include: receiving a target instruction from a target control APP through a target access module, wherein the target access module refers to a module used for communicating with the target control APP in at least two access modules; the IoT device may determine, according to the correspondence between the instruction tag and the control APP, that is, the correspondence between the control instruction and the access module, that the access module corresponding to the first instruction tag is the target access module, and send feedback information to the target control APP through the target access module.
The specific process, the beneficial effects, etc. of the IoT device control method provided in the present embodiment may refer to the embodiments shown in fig. 5 to 12, and are not described herein again.
Examples of IoT device control methods provided by embodiments of the present application are described in detail above. It is to be appreciated that the electronic device or IoT system includes corresponding hardware and/or software modules that perform the respective functions in order to achieve the functionality described above. Those of skill in the art will readily appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation is not to be considered as outside the scope of this application.
The embodiment of the present application may divide the functional modules of the electronic device according to the above method examples, for example, may divide each function into each functional module corresponding to each function, for example, a detection unit, a processing unit, a display unit, or the like, or may integrate two or more functions into one module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
It should be noted that, all relevant contents of each step related to the above method embodiment may be cited to the functional description of the corresponding functional module, which is not described herein.
The electronic device provided in this embodiment is configured to execute the flow steps related to the control terminal in the IoT device control method, so that the same effects as those of the implementation method can be achieved.
In case an integrated unit is employed, the electronic device may further comprise a processing module, a storage module and a communication module. The processing module can be used for controlling and managing the actions of the electronic equipment. The memory module may be used to support the electronic device to execute stored program code, data, etc. And the communication module can be used for supporting the communication between the electronic device and other devices.
Wherein the processing module may be a processor or a controller. Which may implement or perform the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. A processor may also be a combination that performs computing functions, e.g., including one or more microprocessors, digital signal processing (digital signal processing, DSP) and microprocessor combinations, and the like. The memory module may be a memory. The communication module can be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip and other equipment which interact with other electronic equipment.
In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device according to this embodiment may be a device having the structure shown in fig. 3.
The embodiment of the application also provides an IoT device, which comprises a processing module, a storage module and a communication module. The IoT device is configured to perform the relevant flow steps of the IoT device in the above embodiment, so that the same effects as the implementation method described above can be achieved.
The embodiment of the application also provides an IoT device, which comprises the electronic device and the IoT device. The electronic device is configured to execute the related flow steps of the control terminal in the IoT device control method, and the IoT device is configured to execute the related flow steps of the IoT device in the foregoing embodiment.
Optionally, the IoT system may further include a server configured to perform the relevant flow steps of the first IoT platform in the first cloud server or the second IoT platform in the second cloud server in the above embodiments.
Embodiments of the present application also provide a computer-readable storage medium, in which a computer program is stored, which when executed by a processor, causes the processor to perform the IoT device control method of any of the embodiments described above.
The present application also provides a computer program product, which when run on a computer, causes the computer to perform the above-mentioned related steps to implement the IoT device control method in the above-mentioned embodiments.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component, or a module, and may include a processor and a memory connected to each other; the memory is configured to store computer-executable instructions, and when the apparatus is executed, the processor may execute the computer-executable instructions stored in the memory, to cause the chip to perform the IoT device control method in the above-described method embodiments.
The electronic device, the computer readable storage medium, the computer program product or the chip provided in this embodiment are used to execute the corresponding method provided above, so that the beneficial effects thereof can be referred to the beneficial effects in the corresponding method provided above, and will not be described herein.
It will be appreciated by those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (18)

1. An internet of things IoT device control method performed by an electronic device, wherein a control application for controlling an IoT device is installed in the electronic device, the control application comprising a generic plug-in comprising at least two first data interfaces for interfacing with at least two host applications to which data is sent, the method comprising:
receiving, by the generic plug-in, control instructions for controlling the IoT device;
the universal plug-in converts the control instruction into a target instruction matched with a first target interface according to a target host application loaded by the universal plug-in at present, wherein the first target interface is an interface which is in butt joint with the target host application in the at least two first data interfaces;
the universal plug-in sends the target instruction to the target host application through the first target interface;
the target instructions are sent to the IoT device by the target host application.
2. The method of claim 1, wherein the generic plug-in converting the control instruction into a target instruction matching the first target interface according to a target host application currently loaded by the generic plug-in, comprises:
And the universal plug-in converts the control instruction according to a target format to obtain the target instruction, wherein the target format is a format matched with the first target interface.
3. The method of claim 2, wherein the target instruction is a generic instruction and the target format is a generic format that matches the first target interface.
4. The method of claim 3, wherein the first target interface comprises a target application tool class, the target host application comprises a generic instruction interface, the target application tool class interfaces with the generic instruction interface, the generic plug-in sends the target instruction to the target host application through the first target interface, comprising:
and the universal plug-in sends the target instruction to the universal instruction interface through the target application tool class.
5. The method according to any one of claims 2 to 4, wherein the universal plug-in converting the control instruction according to a target format to obtain the target instruction includes:
converting the control instruction into the instruction in the target format through the universal plug-in, so as to obtain a conversion instruction;
And marking the conversion instruction through the universal plug-in to obtain the target instruction.
6. The method of any one of claims 1 to 5, wherein the receiving, by the generic plug-in, a control instruction comprises:
the generic plug-in receives the control instructions input by a user through a device control interface, which refers to a display interface for controlling the IoT device.
7. The method of claim 6, wherein prior to the generic plug-in receiving the control instructions entered by a user via a device control interface, the method further comprises:
acquiring interface information by the target host application, wherein the interface information is information required for displaying the equipment control interface;
sending the interface information to the generic plugin through the target host application;
converting the interface information through the universal plug-in to obtain standard interface information;
the generic plug-in displays the device control interface based on the standard interface information.
8. The method of claim 7, wherein the generic plug-in further comprises at least two second data interfaces for interfacing with the at least two host applications, obtaining data from the at least two host applications, the sending the interface information to the generic plug-in through the target host application comprising:
And sending the interface information to a second target interface through the target host application, wherein the second target interface is an interface which is in butt joint with the target host application in the second data interface.
9. The method of claim 8, wherein the interface information includes device information of the IoT device and/or feedback information from the IoT device, wherein the second target interface includes a target device information interface and a target feedback information interface, wherein the sending the interface information to the second target interface via the target host application comprises:
transmitting the device information to the target device information interface through the target hosting application;
and/or the number of the groups of groups,
and sending the feedback information to the target feedback information interface through the target host application.
10. An IoT device control method performed by an IoT device, the method comprising:
receiving a target instruction from a target control application, wherein the target control application comprises a universal plug-in, the universal plug-in comprises at least two first data interfaces, and the first data interfaces are used for interfacing with at least two host applications and sending data to the at least two host applications; the target instruction is an instruction matched with a first target interface, the first target interface is an interface which is in butt joint with a target host application in the at least two first data interfaces, and the target host application is a host application loaded by the universal plug-in unit at present;
And executing the target instruction.
11. The method according to claim 10, wherein the method further comprises:
generating feedback data according to the target instruction;
and sending the feedback data to the target control application.
12. The method of claim 11, wherein the feedback information includes a first instruction tag of the target instruction, the first instruction tag being used to characterize a unique identity of the target instruction, the sending the feedback data to the target control application comprising:
acquiring the corresponding relation between the instruction mark and the control application;
and sending the feedback data to the target control application according to the corresponding relation between the first instruction mark and the first instruction mark.
13. The method of claim 12, wherein the target instruction includes the first instruction tag therein, wherein the IoT device includes at least two access modules for one-to-one communication with at least two control applications;
the receiving a target instruction from a target control application comprises:
receiving the target instruction from the target control application through a target access module, wherein the target access module is a module used for communicating with the target control application in the at least two access modules;
The sending the feedback data to the target control application according to the corresponding relation between the first instruction mark and the first instruction mark comprises the following steps:
determining the target access module corresponding to the first instruction mark according to the corresponding relation;
and sending the feedback information to the target control application through the target access module.
14. An IoT system comprising an electronic device to perform the method of any of claims 1-9 and an IoT device to perform the method of any of claims 10-13.
15. An electronic device, comprising: a processor, a memory, and an interface;
the processor, memory and interface cooperate to cause the electronic device to perform the method of any of claims 1 to 9.
16. An IoT device characterized by a processor, a memory, and an interface;
the processor, memory, and interface cooperate to cause the IoT device to perform the method of any of claims 10-13.
17. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, causes the processor to perform the method of any of claims 1 to 9 or to perform the method of any of claims 10 to 13.
18. A computer program product, the computer program product comprising: computer program code which, when run on an electronic device, causes the electronic device to perform the method of any one of claims 1 to 9 or to perform the method of any one of claims 10 to 13.
CN202210094828.2A 2022-01-26 2022-01-26 IoT device control methods, devices, systems, and computer readable storage media Pending CN116546042A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210094828.2A CN116546042A (en) 2022-01-26 2022-01-26 IoT device control methods, devices, systems, and computer readable storage media

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210094828.2A CN116546042A (en) 2022-01-26 2022-01-26 IoT device control methods, devices, systems, and computer readable storage media

Publications (1)

Publication Number Publication Date
CN116546042A true CN116546042A (en) 2023-08-04

Family

ID=87442287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210094828.2A Pending CN116546042A (en) 2022-01-26 2022-01-26 IoT device control methods, devices, systems, and computer readable storage media

Country Status (1)

Country Link
CN (1) CN116546042A (en)

Similar Documents

Publication Publication Date Title
CN113032766B (en) Application authority management method and device
CN113434288A (en) Memory management method and electronic equipment
CN113190362B (en) Service calling method and device, computer equipment and storage medium
CN114968384B (en) Function calling method and device
WO2024037032A1 (en) Account login method and electronic device
WO2023051355A1 (en) Permission check method and electronic device
KR20140142116A (en) Electronic device and method for providing text transformaation service
CN114489350B (en) Input method calling method and related equipment
US10057751B2 (en) Electronic device and method for updating accessory information
CN114915618B (en) Upgrade package downloading method and device
EP4095723B1 (en) Permission reuse method, permission reuse-based resource access method, and related device
US20230216732A1 (en) Network Configuration Method and Device
CN113176954A (en) Application calling method and device, storage medium and electronic equipment
CN114530148A (en) Control method and device and electronic equipment
CN114237921A (en) Sensor monitoring method and device and terminal equipment
CN116546042A (en) IoT device control methods, devices, systems, and computer readable storage media
CN115114607A (en) Sharing authorization method, device and storage medium
CN117216428B (en) Webpage resource request method, terminal equipment and computer readable storage medium
CN116661584B (en) Resource scheduling method and related equipment
CN115981576B (en) Method for sharing data, electronic device and storage medium
EP4216052A1 (en) Method for developing mvvm architecture-based application, and terminal
WO2023125832A1 (en) Image sharing method and electronic device
CN116991532A (en) Virtual machine window display method, electronic equipment and system
CN117950677A (en) Software distribution method, electronic equipment and system
CN117676913A (en) Router management method, router and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination