Equipment control method and device, electronic equipment and storage medium
By generating control interfaces in smart home devices that match the device's functions, the user experience issues caused by differences in individual device functions are resolved, achieving broader device compatibility and better user interaction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING XIAOMI MOBILE SOFTWARE CO LTD
- Filing Date
- 2024-10-21
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, smart home device control protocols fail to effectively address the functional differences between individual devices, resulting in a mismatch between the control interface and the actual functions of the devices, thus affecting the user experience.
After the first device completes network configuration, it receives device function information from the cloud, generates a control interface corresponding to the device function, and sends instruction information to the second device based on a preset protocol to achieve dynamic control of the device function.
It minimizes protocol and device modifications, supports access from a wider range of devices, and improves the user experience.
Smart Images

Figure CN121907628A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of Internet of Things (IoT) technology and smart device control, and more particularly to a device control method, apparatus, electronic device, and storage medium. Background Technology
[0002] For smart home devices that are in the same ecosystem and have related relationships, different devices in the device set can be managed and controlled through preset control protocols.
[0003] In related technologies, the control protocol specifies corresponding control logic for different devices in the device set. Users can view the functional status of other devices through the master device (such as a mobile phone) based on the preset control protocol, and adjust the functions of other devices based on the preset control. Summary of the Invention
[0004] To overcome the problems existing in the related technologies, this disclosure provides a device control method, apparatus, electronic device and storage medium.
[0005] According to a first aspect of the present disclosure, a device control method is provided, comprising: responding to a first device completing network configuration for a second device and receiving device function information sent from a cloud, generating a control interface based on the device function information, wherein the device function information is information generated and uploaded to the cloud by the second device after completing network configuration, the device function information characterizes the functions that the second device can perform, the control interface corresponds to the functions that the second device can perform, and the representation format of the device function information conforms to a preset protocol, the first device controlling the second device through the preset protocol; responding to the first device receiving a control instruction through the control interface, the first device sending instruction information corresponding to the control instruction to the second device based on the preset protocol, so that the second device performs the device function corresponding to the control instruction.
[0006] In one embodiment, the preset protocol for describing device function information includes dynamically changeable attribute information in the protocol specification; the device function information includes module information and module function information of the second device, the module information represents the functional modules included in the second device, the module function information represents the function that each functional module in the second device can perform, and the device function information is uploaded to the cloud by the second device in the form of attribute information through the preset protocol.
[0007] In one embodiment, the module function information includes one or more of the following: a service corresponding to each function module, an attribute corresponding to the service, a method corresponding to the service, or an event corresponding to the service; wherein, a service represents the function that the corresponding function module can implement, an attribute represents the state supported by the corresponding function of the service, a method represents the operation supported by the corresponding function of the service, and an event represents the instantaneous change that occurs in the corresponding function of the service.
[0008] In one embodiment, when the second device is a device that implements device functions through different hardware, the functional modules included in the second device correspond to the hardware that constitutes the second device; or when the second device is a device that implements device functions through different applications, the functional modules included in the second device correspond to the applications installed on the second device.
[0009] According to a second aspect of the present disclosure, a device control method is provided, comprising: responding to a second device completing network distribution, the second device generating device function information based on its own achievable functions, the second device being configured by a first device for network distribution; uploading the device function information to a cloud, so that the cloud sends the device function information to the first device, and the first device generating a control interface based on the device function information, the control interface corresponding to the functions achievable by the second device, and the representation format of the device function information conforming to a preset protocol, the first device controlling the second device through the preset protocol; responding to receiving an instruction information sent by the first device to the second device based on the preset protocol, the second device executing a device function corresponding to the instruction information, wherein the instruction information is information generated by the first device upon receiving a control instruction through the control interface, and the instruction information corresponds to the control instruction.
[0010] In one embodiment, the preset protocol is used to describe dynamically changeable attribute information set in the device function information specification; the device function information includes module information and module function information of the second device, the module information represents the functional modules included in the second device, the module function information represents the function that each functional module in the second device can perform, and the device function information is uploaded to the cloud by the second device in the form of attribute information through the preset protocol.
[0011] In one embodiment, the device function information includes one or more of the following: a service corresponding to each function module, an attribute corresponding to the service, a method corresponding to the service, or an event corresponding to the service; wherein, a service represents the function that the corresponding function module can implement, an attribute represents the state supported by the corresponding function of the service, a method represents the operation supported by the corresponding function of the service, and an event represents the instantaneous change that occurs in the corresponding function of the service.
[0012] In one embodiment, when the second device is a device that implements device functions through different hardware, the functional modules included in the second device correspond to the hardware that constitutes the second device; or when the second device is a device that implements device functions through different applications, the functional modules included in the second device correspond to the applications installed on the second device.
[0013] According to a third aspect of the present disclosure, a device control apparatus is provided, comprising: a generation unit, configured to, in response to a first device completing network configuration for a second device and receiving device function information sent from a cloud, generate a control interface based on the device function information, wherein the device function information is information generated and uploaded to the cloud by the second device after completing network configuration, the device function information characterizing the functions that the second device can perform, the control interface corresponding to the functions that the second device can perform, and the representation format of the device function information conforming to a preset protocol, wherein the first device controls the second device through the preset protocol; and a control unit, configured to, in response to the first device receiving a control instruction through the control interface, issue instruction information corresponding to the control instruction to the second device based on the preset protocol, so that the second device performs a device function corresponding to the control instruction.
[0014] In one embodiment, the preset protocol for describing device function information includes dynamically changeable attribute information in the protocol specification; the device function information includes module information and module function information of the second device, the module information represents the functional modules included in the second device, the module function information represents the function that each functional module in the second device can perform, and the device function information is uploaded to the cloud by the second device in the form of attribute information through the preset protocol.
[0015] In one embodiment, the module function information includes one or more of the following: a service corresponding to each function module, an attribute corresponding to the service, a device corresponding to the service, or an event corresponding to the service; wherein, a service represents the function that the corresponding function module can perform, an attribute represents the state supported by the function corresponding to the service, a device represents the operation supported by the function corresponding to the service, and an event represents the instantaneous change that occurs in the function corresponding to the service.
[0016] In one embodiment, when the second device is a device that implements device functions through different hardware, the functional modules included in the second device correspond to the hardware that constitutes the second device; or when the second device is a device that implements device functions through different applications, the functional modules included in the second device correspond to the applications installed on the second device.
[0017] According to a fourth aspect of the present disclosure, a device control apparatus is provided, comprising: a generation unit, configured to, in response to a second device completing network distribution, generate device function information based on the functions it can perform, wherein the second device is configured to perform network distribution by a first device; an uploading unit, configured to upload the device function information to a cloud, so that the cloud sends the device function information to the first device, and causes the first device to generate a control interface based on the device function information, wherein the control interface corresponds to the functions that the second device can perform, and the format of the device function information conforms to a preset protocol, wherein the first device controls the second device through the preset protocol; and an execution unit, configured to, in response to receiving an instruction information sent by the first device to the second device based on the preset protocol, execute a device function corresponding to the instruction information, wherein the instruction information is information generated by the first device upon receiving a control instruction through the control interface, and the instruction information corresponds to the control instruction.
[0018] In one embodiment, the preset protocol is used to describe dynamically changeable attribute information set in the device function information specification; the device function information includes module information and module function information of the second device, the module information represents the functional modules included in the second device, the module function information represents the function that each functional module in the second device can perform, and the device function information is uploaded to the cloud by the second device in the form of attribute information through the preset protocol.
[0019] In one embodiment, the device function information includes one or more of the following: a service corresponding to each function module, an attribute corresponding to the service, a device corresponding to the service, or an event corresponding to the service; wherein, a service represents the function that the corresponding function module can perform, an attribute represents the state supported by the function corresponding to the service, a device represents the operation supported by the function corresponding to the service, and an event represents the instantaneous change that occurs in the function corresponding to the service.
[0020] In one embodiment, when the second device is a device that implements device functions through different hardware, the functional modules included in the second device correspond to the hardware that constitutes the second device; or when the second device is a device that implements device functions through different applications, the functional modules included in the second device correspond to the applications installed on the second device.
[0021] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the device control method described in the first aspect or any embodiment of the first aspect.
[0022] According to a sixth aspect of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the device control method described in the second aspect or any embodiment of the second aspect.
[0023] According to a seventh aspect of the present disclosure, a storage medium is provided, the storage medium storing instructions that, when executed by a processor, enable the processor to perform the device control method described in the first aspect or any embodiment of the first aspect.
[0024] According to an eighth aspect of the present disclosure, a storage medium is provided that stores instructions which, when executed by a processor, enable the processor to perform the device control method described in the second aspect or any embodiment of the second aspect.
[0025] The technical solutions provided by the embodiments of this disclosure can include the following beneficial effects: When the first device completes network configuration for the second device and receives device function information sent from the cloud, the first device generates a control interface based on the received device function information, and upon receiving a control instruction through the control interface, sends instruction information to the second device based on a preset protocol, so that the second device executes the device function corresponding to the control instruction. The device function information is generated and uploaded to the cloud by the second device after completing network configuration. The device function information characterizes the functions that the second device can perform. The control interface corresponds to the functions that the second device can perform, and the format of the device function information conforms to the preset protocol. The first device controls the second device through the preset protocol. Through this disclosure, the protocol used for device control supports devices with dynamic functions, minimizing modifications to the protocol, the protocol-based platform, the second device, and the first device. It also enables the protocol-based platform to access more types of second devices.
[0026] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0027] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0028] Figure 1 This is a schematic diagram illustrating a specification describing a device data model in a control protocol according to an exemplary embodiment of the present disclosure.
[0029] Figure 2 This is a schematic diagram illustrating an application scenario of a device control method according to an exemplary embodiment of the present disclosure.
[0030] Figure 3 This is a flowchart illustrating a device control method applied to a first device according to an exemplary embodiment.
[0031] Figure 4 This is a flowchart illustrating a device control method applied to a second device according to an exemplary embodiment.
[0032] Figure 5 This is a schematic diagram illustrating a device control method based on different device terminals according to an exemplary embodiment.
[0033] Figure 6 This is a schematic diagram illustrating a specification of a device data model for a simple functional device in a control protocol according to an exemplary embodiment of the present disclosure.
[0034] Figure 7 This is a schematic diagram illustrating a specification of a device data model for a functionally complex device in a control protocol according to an exemplary embodiment of the present disclosure.
[0035] Figure 8 This is a block diagram illustrating a device control apparatus according to an exemplary embodiment.
[0036] Figure 9 This is a block diagram illustrating a device control apparatus according to an exemplary embodiment.
[0037] Figure 10 This is a block diagram illustrating an apparatus for device control according to an exemplary embodiment.
[0038] Figure 11 This is a block diagram illustrating an apparatus for device control according to an exemplary embodiment. Detailed Implementation
[0039] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure.
[0040] The device control method provided in this disclosure is applied to a scenario where a control interface for a target device is generated based on the functions supported by the target device, and the user controls the target device through the generated control interface.
[0041] For smart home devices that are part of the same ecosystem and have interconnected relationships, different devices within the device set can be managed and controlled through preset control protocols. In related technologies, the control protocol specifies corresponding control logic for each different device in the device set. Users can view the functional status of other devices through a master device (such as a mobile phone) based on the preset control protocol and adjust the functions of other devices according to the preset controls.
[0042] In related technologies, when controlling devices through device control protocols, the protocols define fixed functions for devices of the same type, failing to consider functional differences between individual devices of the same type. This leads to a discrepancy between the final control interface generated for the target device and the actual functions supported by the target device, impacting the user experience. Furthermore, if the control interface contains redundant sub-interfaces with functions not available on the target device, the user cannot control the target device through these redundant sub-interfaces, further affecting the user experience.
[0043] In an exemplary embodiment of this disclosure, such as Figure 1 The diagram illustrates the specification for the device data model in the control protocol. In the diagram, the concepts represented by the ellipsis boxes are listed alongside their corresponding concepts in the adjacent boxes. For example, the ellipsis box adjacent to "module" represents other modules listed alongside "module." Figure 1As shown, the device control protocols in related technologies have a fixed device data model for device specifications. The device data model includes the device and its corresponding modules, services, properties, actions, and events. For devices of the same type, the corresponding modules, services, properties, actions, and events are defined. The device itself is a specific unit applicable to the control protocol. A module is an independent unit on the device, representing a simple set of product functions, such as a light or a switch. A service represents a specific function of the product, such as a light service. Compared to modules, services provide a smaller-granularity functional description; a light module includes light services, delay services, etc. A property is a variable describing a certain state of a function; it is the smallest descriptive unit in the data model, such as the switch property of a light. The value of a property can be a simple type, such as uint8 or float, or a complex type such as a structure or list. An action describes the operation supported by the function; it is at the same level as a property and is also the smallest descriptive unit in the data model. Methods require defined input and output parameters. Similar to attributes, the value of each parameter can be a basic data type or a complex data type. An event describes a momentary change in functionality, is at the same level as an attribute, and is the smallest descriptive unit in the data model. Unlike attributes, events describe a momentary change, not a persistent state, such as a single-click event or a double-click event on a wireless switch. It's understandable that even for the same type of device, the modules and functions they contain can be customized to a certain extent, varying depending on the different needs of different users—that is, influenced by personalized user requirements. Modules, services, attributes, methods, and events for the same device are all dynamically changing. Therefore, control protocols in related technologies that specify fixed modules, services, attributes, methods, and events for the same device cannot meet the dynamic needs of users and may negatively impact the user experience due to inconsistencies between the actual device situation and the content of the corresponding control protocol specifications.
[0044] In view of this, this disclosure proposes a device control method. When a first device completes network configuration for a second device and receives device function information sent from the cloud, the first device generates a control interface based on the received device function information. Upon receiving a control instruction through the control interface, the first device sends instruction information to the second device based on a preset protocol, causing the second device to execute the device function corresponding to the control instruction. The device function information is generated and uploaded to the cloud by the second device after completing network configuration. This information characterizes the functions that the second device can perform. The control interface corresponds to the functions that the second device can perform, and the format of the device function information conforms to the preset protocol. The first device controls the second device through the preset protocol. This disclosure enables the protocol used for device control to support devices with dynamic functions, minimizing modifications to the protocol, the protocol-based platform, the second device, and the first device. It also allows the protocol-based platform to connect to a wider variety of second devices.
[0045] In this embodiment of the disclosure, such as Figure 2 The diagram illustrates an application scenario of the device control method. The device control method proposed in this disclosure can be applied to the following scenario: After the device is bound to a user account based on a control protocol, the device uploads its functional modules and the functions of each module to the cloud platform bound to the user account. Upon receiving the uploaded information, the cloud platform generates a control interface for controlling the device within a preset application on the user terminal, based on the device's functional modules and the functions of each module. The control interface corresponds to the device's functional modules and the functions supported by each module. The user controls the device through the control interface generated by the preset application.
[0046] In this embodiment, a first device obtains device function information of a second device based on a preset protocol. The first device then generates a control interface based on this information, enabling it to issue control commands to the second device according to the control interface. The following embodiments of this disclosure describe a device control method applied to the first device.
[0047] Figure 3 This is a flowchart illustrating a device control method applied to a first device according to an exemplary embodiment. Figure 3 As shown, the method includes the following steps.
[0048] In step S101, in response to the first device completing the network configuration for the second device and receiving device function information sent from the cloud, a control interface is generated based on the device function information.
[0049] Among them, the device function information is the information generated and uploaded to the cloud by the second device after the network distribution is completed. The device function information represents the functions that the second device can perform. The control interface corresponds to the functions that the second device can perform. Moreover, the expression format of the device function information is consistent with the preset protocol. The first device controls the second device through the preset protocol.
[0050] In step S102, in response to the first device receiving a control instruction through the control interface, the first device sends instruction information corresponding to the control instruction to the second device based on a preset protocol, so that the second device performs the device function corresponding to the control instruction.
[0051] In this embodiment, a preset application on the first device configures the network for the second device. After successful network configuration and binding with a user account, the second device sends a notification message indicating that network configuration is complete to the cloud where the user account is logged in. After network configuration, the second device performs a self-check of its capabilities and obtains device function information representing its own functions. This device function information is then sent to the cloud via a preset protocol. The cloud then sends the device function information of the second device to the first device based on the preset protocol. Upon receiving the device function information of the second device, the first device constructs the actual function set of the second device according to the preset application corresponding to the preset protocol and generates a control interface for controlling the second device. The control interface is displayed to the user in the form of a user interface. When the first device receives a user instruction through the control interface, it sends an instruction message corresponding to the control instruction to the second device based on the preset protocol, causing the second device to execute the device function corresponding to the user instruction.
[0052] In this embodiment of the disclosure, the first device, the second device, and the cloud have a corresponding relationship. The first device, the second device, and the cloud interact based on a preset protocol. The device function information of the second device is transmitted from the second device to the cloud in a format that conforms to the preset protocol specifications, and then transmitted from the cloud to the first device.
[0053] Through this disclosure, a preset protocol specifies a data type for characterizing the functions of the second device and supporting dynamic changes. The preset protocol used to control the second device can transmit the functions supported by the second device to the first device according to the functions supported by the second device, using the data type that supports dynamic changes. For the second device that supports dynamically changing functions, the modifications to the preset protocol, the platform based on the preset protocol, the second device, and the first device are minimized to the greatest extent, and the platform based on the preset protocol can access more types of second devices.
[0054] In this embodiment, after completing network distribution, the second device performs a self-test to obtain device function information characterizing its own functions, and uploads the device function information to the cloud so that the first device can generate a control interface based on the device function information. After receiving a control instruction from the first device, the second device executes the device function corresponding to the control instruction. The following embodiments of this disclosure describe the device control method applied to the second device.
[0055] Figure 4 This is a flowchart illustrating a device control method applied to a second device according to an exemplary embodiment. Figure 4 As shown, the method includes the following steps.
[0056] In step S201, in response to the second device completing the network distribution, the second device generates device function information based on its own capabilities, and the second device completes the network distribution through the first device.
[0057] In step S202, the device function information is uploaded to the cloud so that the cloud sends the device function information to the first device and the first device generates a control interface based on the device function information. The control interface corresponds to the functions that the second device can perform, and the format of the device function information is consistent with the preset protocol. The first device controls the second device through the preset protocol.
[0058] In step S203, in response to receiving instruction information sent by the first device to the second device based on a preset protocol, the second device executes a device function corresponding to the instruction information. The instruction information is information generated by the first device when it receives a control instruction through the control interface, and the instruction information corresponds to the control instruction.
[0059] In this embodiment, after completing network distribution, the second device performs a self-check of its capabilities to obtain device function information characterizing its functions. The second device then sends this device function information to the cloud via a preset protocol. The cloud, based on the preset protocol, sends the device function information of the second device to the first device. The first device application, based on the device function information of the second device and a preset application corresponding to the preset protocol, constructs the actual function set of the second device and generates a control interface for controlling the second device. The first device then displays this control interface to the user. When the first device receives a user instruction through the control interface, it sends instruction information corresponding to the control instruction to the second device based on the preset protocol. Upon receiving the instruction information, the second device parses the corresponding device function and executes the device function indicated by the user. There is a correspondence between the first device, the second device, and the cloud. The first device, the second device, and the cloud interact based on the preset protocol. The device function information of the second device, expressed in a format conforming to the preset protocol specifications, is transmitted from the second device to the cloud and then from the cloud to the first device.
[0060] This disclosure aims to minimize modifications to the preset protocol, the platform based on the preset protocol, the second device, and the first device for supporting second devices with dynamically changing functions, and to enable the protocol-based platform to access more types of second devices.
[0061] In an exemplary embodiment of this disclosure, such as Figure 5 This diagram illustrates the device control method executed on different device terminals. When the target central air conditioning unit is a central air conditioning unit, this disclosure uses the following method to generate a control interface for the central air conditioning unit in the terminal application and display it to the user: The central air conditioning unit is network-connected via a preset application on the terminal. After successful network connection and binding with the user's account, the central air conditioning unit reports binding information to the cloud where the user's account is logged in. This binding information indicates that the central air conditioning unit has completed network connection and account binding. After the central air conditioning unit uploads the binding information to the cloud online, the central air conditioning firmware determines the current dynamic functions through hardware and obtains dynamic information. This dynamic information represents the functional modules possessed by the central air conditioning unit and the functions of each module. The central air conditioning unit reports the dynamic information to the cloud. The cloud publishes the dynamic information to the terminal application. Upon receiving the dynamic information, the terminal application, based on the dynamic functions of the central air conditioning unit contained in the dynamic information, assembles the actual function set of the central air conditioning unit from the application's full function set to generate a control interface for controlling the central air conditioning unit. This control interface is then displayed to the user in the form of a user interface, allowing the user to control the central air conditioning unit.
[0062] In this embodiment of the disclosure, based on the data types specified in the preset protocol for characterizing the functions of the second device and supporting dynamic changes, the transmission of device function information of the second device and the dynamic generation of the control interface are realized. The following embodiments of this disclosure further illustrate the preset protocol in this disclosure.
[0063] In one embodiment of this disclosure, the preset protocol used to describe device functional information includes dynamically changeable attribute information. The device functional information includes module information and module function information of the second device. The module information represents the functional modules included in the second device, and the module function information represents the functions that each functional module in the second device can perform. The device functional information, expressed as attribute information, is uploaded by the second device to the cloud via the preset protocol.
[0064] In this embodiment, the preset protocol defines different functional modules for different second devices based on the entities performing different functions within the second devices, and assigns different identifiers to these modules. It is understood that for different second devices, identifiers with the same representation can correspond to different functional modules. It is also understood that different second devices can have different functions. For second devices with relatively simple functions, the functions that different functional modules can implement are simple and singular. Therefore, the preset protocol can standardize lower-granularity functional descriptions for these devices, only describing the functional modules included in the second device and the functions corresponding to those modules. Furthermore, the device data model standardized by the preset protocol includes fixed data components and dynamically variable data components. The dynamically variable data components are the attribute information components. This disclosure transmits the functional information of the second device to the first device in the form of attribute information based on the preset protocol. In one example, the second device is a central air conditioning system consisting of one or more of the following: a floor heating module, a basic air conditioning module, and an air purification module. In the preset protocol, the floor heating module is represented by the identifier "1", the basic air conditioning module by the identifier "2", and the air purification module by the identifier "3". If the central air conditioning system only contains the basic air conditioning module and the air purification module, then "2" and "3" are transmitted to the first device as attribute information by the preset protocol, so that the first device knows that the central air conditioning system includes the basic air conditioning module and the air purification module, and the first device generates a control interface for the basic air conditioning module and the air purification module.
[0065] In an exemplary embodiment of this disclosure, such as Figure 6The diagram illustrates a specification of a data model for a simple functional device in a control protocol. An example of the device control method in this disclosure is provided for the case where the second device is a central air conditioning unit: A "central air conditioning unit" is a device that regulates the temperature and air quality of an entire room. It is a composite device composed of multiple common devices as functional modules, and the dynamic granularity of the device function is a module. For a given central air conditioning unit, it can be composed of one or more of the following modules based on user needs: a basic air conditioning module, a floor heating module, and an air purification module. For example... Figure 6 As shown, the preset protocol defines dynamically changing modules (air conditioning module 1, underfloor heating module 2, and air purification module 3) for this central air conditioning system, as well as services and attributes corresponding to various non-basic modules that do not support dynamic changes. The basic module (module 0) is a fixed module in the control protocol, with module id = 1, used to represent basic device information such as manufacturer, data identifier (did), firmware version, etc. This disclosure reuses this module, adding a dynamic service (dynamic) and a dynamic-status attribute (dynamic-status) to represent the device's dynamic functions. The dynamic-status attribute uses a preset format (e.g., iids), representing a list of enabled element IDs (referring to various functional modules), separated by commas, such as "2" (representing the underfloor heating module), "1,2,3" (representing the air conditioning module, underfloor heating module, and air purification module), etc.
[0066] In this embodiment of the disclosure, for a second device with relatively complex functions, the functions performed by each functional module in the second device are also relatively complex, and the functions performed by each functional module may also change dynamically based on user needs. In this disclosure, for a second device with relatively complex functions, a more granular function representation is set in the preset protocol to characterize the dynamic functions performed by each functional module in the second device.
[0067] In one embodiment of this disclosure, the module function information includes one or more of the following: a service corresponding to each functional module, an attribute corresponding to the service, a method corresponding to the service, or an event corresponding to the service. Wherein, a service represents the function that the corresponding functional module can implement, an attribute represents the state supported by the corresponding function of the service, a method represents the operation supported by the corresponding function of the service, and an event represents a momentary change that occurs in the corresponding function of the service.
[0068] In this embodiment, for a second device with relatively complex functions, a dynamic, finer-grained device data model is specified, namely, modules, services, properties, actions, and events corresponding to the device. For devices of the same type, the corresponding modules, services, properties, actions, and events are defined. A service represents a specific function of the product, such as a lamp service. Compared to modules, services are smaller-grained functional descriptions; a lamp module includes lamp services, delayed services, etc. A property is a variable describing a certain state of a function; it is the smallest descriptive unit in the data model and can be a simple type or a complex type such as a structure or list. An action describes the operation supported by the function, is at the same level as a property, and is also the smallest descriptive unit in the data model. Methods require defined input and output parameters. The value of each parameter, similar to a property, can be a basic data type or a complex data type. An event describes a momentary change in the function, is at the same level as a property, and is also the smallest descriptive unit in the data model. An event differs from a property in that it describes a momentary change, not a persistent state. This disclosure, through the aforementioned dynamic and highly granular functional description of the second device, can accurately describe the dynamic functions of the complex second device, enabling the first device to accurately characterize and transmit the dynamic functions of the complex second device to the first device through a preset protocol, so that the control interface generated by the first device corresponds to the actual functions of the second device, allowing the user to accurately understand the device functions of the second device through the first device.
[0069] In an exemplary embodiment of this disclosure, such as Figure 7This diagram illustrates a specification of a data model for a complex device in a control protocol. The device control method described in this disclosure is illustrated using a central air conditioning unit as an example: A "mobile phone" is a device with numerous and highly variable functions. Its functions change depending on the different applications installed by the user, and its functions are numerous and granular, making it more suitable for dynamic capabilities. Based on the scheme principles, the mobile phone data model is shown in the diagram: The basic (module0) module is a fixed module in the control protocol, used to represent basic device information, such as manufacturer, identifier (did), firmware version, etc. This disclosure reuses this module, adding a dynamic service and a dynamic-status attribute to represent the device's dynamic functions. In this data model, other functional modules besides the basic module (such as the second and third modules) and their corresponding functional information (such as services, attributes, module dynamic services, enabled dynamic service attributes, and composite dynamic service attributes) are all information that supports dynamic changes and are represented using different rules of representation. Among them, the dynamic function attribute (dynamic-status) represents enabled dynamic modules, the enabled dynamic service attribute (service-dynamic-status) represents enabled dynamic services, and the composite dynamic service attribute (pae-dynamic-status) represents enabled dynamic properties, methods, and events. These are all attributes within the same level element, representing the dynamic function information of that layer. Attribute values have a preset format (e.g., iids), representing the ID of the enabled sibling element.
[0070] The following embodiments further illustrate the functional modules of the second device and the second device in this disclosure.
[0071] In one embodiment of this disclosure, when the second device is a device that implements device functions through different hardware, the functional modules included in the second device correspond to the hardware constituting the second device; or when the second device is a device that implements device functions through different applications, the functional modules included in the second device correspond to the applications installed on the second device.
[0072] In this embodiment of the disclosure, when the second device is a device that implements its functions through hardware modules, such as a central air conditioner, the modules of the second device are hardware modules such as air conditioning modules and floor heating modules. When the second device is a device that implements its functions through different software applications, such as a mobile phone, the modules of the second device are software modules such as applications.
[0073] In this embodiment, after the first device completes network configuration for the second device and receives device function information sent from the cloud, the first device generates a control interface based on the received device function information. Upon receiving a control instruction through the control interface, the first device sends instruction information to the second device based on a preset protocol, causing the second device to execute the device function corresponding to the control instruction. The device function information is generated and uploaded to the cloud by the second device after network configuration is completed. This information characterizes the functions the second device can perform. The control interface corresponds to the functions the second device can perform, and the format of the device function information conforms to the preset protocol. The first device controls the second device through the preset protocol. This disclosure enables the protocol used for device control to support devices with dynamic functions, minimizing modifications to the protocol, the protocol-based platform, the second device, and the first device. It also allows the protocol-based platform to access more types of second devices.
[0074] Based on the same concept, this disclosure also provides a device control apparatus 100.
[0075] It is understood that the device control device 100 provided in this disclosure includes hardware structures and / or software modules corresponding to each function in order to achieve the above-mentioned functions. In conjunction with the units and algorithm steps of the various examples disclosed in this disclosure, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solutions of this disclosure.
[0076] Figure 8 This is a block diagram illustrating a device control apparatus 100 according to an exemplary embodiment. (Refer to...) Figure 8 The device includes a generation unit 101 and a control unit 102.
[0077] The generation unit 101 is used to respond to the first device completing the network configuration of the second device and receiving the device function information sent by the cloud, and to generate a control interface based on the device function information. The device function information is the information generated and uploaded to the cloud by the second device after completing the network configuration. The device function information represents the functions that the second device can perform. The control interface corresponds to the functions that the second device can perform, and the expression format of the device function information is consistent with the preset protocol. The first device controls the second device through the preset protocol.
[0078] The control unit 102 is configured to respond to a first device receiving a control instruction through a control interface, and the first device sends instruction information corresponding to the control instruction to the second device based on a preset protocol, so that the second device performs the device function corresponding to the control instruction.
[0079] In one implementation, the preset protocol, used to describe device functional information, includes dynamically changeable attribute information in its protocol specification. The device functional information includes module information and module function information of the second device. The module information represents the functional modules contained in the second device, and the module function information represents the functions that each functional module in the second device can perform. The device functional information, expressed as attribute information, is uploaded by the second device to the cloud via the preset protocol.
[0080] In one embodiment, the module function information includes one or more of the following: a service corresponding to each functional module, an attribute corresponding to the service, a device corresponding to the service, or an event corresponding to the service. Wherein, a service represents the function that the corresponding functional module can perform, an attribute represents the state supported by the function corresponding to the service, a device represents the operation supported by the function corresponding to the service, and an event represents a momentary change that occurs in the function corresponding to the service.
[0081] In one embodiment, when the second device is a device that implements device functions through different hardware, the functional modules included in the second device correspond to the hardware constituting the second device. Alternatively, when the second device is a device that implements device functions through different applications, the functional modules included in the second device correspond to the applications installed on the second device.
[0082] Figure 9 This is a block diagram illustrating a device control apparatus 200 according to an exemplary embodiment. (Refer to...) Figure 9 The device includes a generation unit 201, an uploading unit 202, and an execution unit 203.
[0083] The generation unit 201 is used to respond to the second device completing the network distribution. The second device generates device function information according to its own functions, and the second device completes the network distribution with the first device.
[0084] Upload unit 202 is used to upload device function information to the cloud so that the cloud sends the device function information to the first device and the first device generates a control interface based on the device function information. The control interface corresponds to the functions that the second device can perform, and the format of the device function information is consistent with the preset protocol. The first device controls the second device through the preset protocol.
[0085] The execution unit 203 is configured to respond to receiving instruction information sent by the first device to the second device based on a preset protocol, wherein the second device performs a device function corresponding to the instruction information, wherein the instruction information is information generated by the first device when it receives a control instruction through a control interface, and the instruction information corresponds to the control instruction.
[0086] In one implementation, a preset protocol is used to describe dynamically changeable attribute information set in the device function information specification. The device function information includes module information and module function information of the second device. The module information represents the functional modules contained in the second device, and the module function information represents the functions that each functional module in the second device can perform. The device function information is uploaded to the cloud by the second device in the form of attribute information through the preset protocol.
[0087] In one embodiment, the device functional information includes one or more of the following: a service corresponding to each functional module, an attribute corresponding to the service, a device corresponding to the service, or an event corresponding to the service. Wherein, a service represents the function that the corresponding functional module can perform, an attribute represents the state supported by the function corresponding to the service, a device represents the operation supported by the function corresponding to the service, and an event represents a momentary change that occurs in the function corresponding to the service.
[0088] In one embodiment, when the second device is a device that implements device functions through different hardware, the functional modules included in the second device correspond to the hardware constituting the second device. Alternatively, when the second device is a device that implements device functions through different applications, the functional modules included in the second device correspond to the applications installed on the second device.
[0089] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0090] Figure 10 This is a block diagram illustrating an apparatus 300 for device control according to an exemplary embodiment. The apparatus 300 can be provided as a terminal. For example, the apparatus 300 can be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0091] Reference Figure 10 The device 300 may include one or more of the following components: processing component 302, memory 304, power component 306, multimedia component 308, audio component 310, input / output (I / O) interface 312, sensor component 314, and communication component 316.
[0092] Processing component 302 typically controls the overall operation of device 300, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 302 may include one or more processors 320 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 302 may include one or more modules to facilitate interaction between processing component 302 and other components. For example, processing component 302 may include a multimedia module to facilitate interaction between multimedia component 308 and processing component 302.
[0093] Memory 304 is configured to store various types of data to support the operation of device 300. Examples of such data include instructions for any application or method operating on device 300, contact data, phonebook data, messages, pictures, videos, etc. Memory 304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0094] The power supply component 306 provides power to the various components of the device 300. The power supply component 306 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device 300.
[0095] Multimedia component 308 includes a screen that provides an output interface between the device 300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 308 includes a front-facing camera and / or a rear-facing camera. When the device 300 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0096] Audio component 310 is configured to output and / or input audio signals. For example, audio component 310 includes a microphone (MIC) configured to receive external audio signals when device 300 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 304 or transmitted via communication component 316. In some embodiments, audio component 310 also includes a speaker for outputting audio signals.
[0097] I / O interface 312 provides an interface between processing component 302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0098] Sensor assembly 314 includes one or more sensors for providing status assessments of various aspects of device 300. For example, sensor assembly 314 may detect the on / off state of device 300, the relative positioning of components such as the display and keypad of device 300, changes in the position of device 300 or a component of device 300, the presence or absence of user contact with device 300, the orientation or acceleration / deceleration of device 300, and temperature changes of device 300. Sensor assembly 314 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 314 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 314 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0099] Communication component 316 is configured to facilitate wired or wireless communication between device 300 and other devices. Device 300 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 316 receives broadcast signals or broadcast information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 316 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0100] In an exemplary embodiment, the apparatus 300 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0101] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 304 including instructions, which can be executed by a processor 320 of the device 300 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0102] Figure 11 This is a block diagram illustrating an apparatus 400 for device control according to an exemplary embodiment. For example, apparatus 400 may be provided as a server. (Refer to...) Figure 11 The device 400 includes a processing component 422, which further includes one or more processors, and memory resources represented by memory 432 for storing instructions, such as application programs, that can be executed by the processing component 422. The application programs stored in memory 432 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 422 is configured to execute instructions to perform the aforementioned device control method.
[0103] Device 400 may also include a power supply component 426 configured to perform power management of device 400, a wired or wireless network interface 450 configured to connect device 400 to a network, and an input / output (I / O) interface 458. Device 400 may operate on an operating system stored in memory 432, such as Windows Server™, MacOSX™, Unix™, Linux™, FreeBSD™, or similar.
[0104] It is understood that in this disclosure, "multiple" refers to two or more, and other quantifiers are similar. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. The singular forms "a," "the," and "the" are also intended to include the plural forms unless the context clearly indicates otherwise.
[0105] It is further understood that the terms "first," "second," etc., are used to describe various types of information, but this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another, and do not indicate a specific order or degree of importance. In fact, the expressions "first," "second," etc., are completely interchangeable. For example, without departing from the scope of this disclosure, first information can also be referred to as second information, and similarly, second information can also be referred to as first information.
[0106] It is further understood that the terms “center,” “longitudinal,” “lateral,” “front,” “rear,” “up,” “down,” “left,” “right,” “vertical,” “horizontal,” “top,” “bottom,” “inner,” and “outer,” etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this embodiment and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation.
[0107] It can be further understood that, unless otherwise specified, "connection" includes both direct connections where no other components exist between the two parties and indirect connections where other components exist between them.
[0108] It is further understood that although operations are described in a specific order in the accompanying drawings in this disclosure, this should not be construed as requiring these operations to be performed in the specific order or serial order shown, or requiring all of the shown operations to obtain the desired result. In certain environments, multitasking and parallel processing may be advantageous.
[0109] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein.
[0110] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A device control method, characterized in that, include: In response to the first device completing network configuration for the second device and receiving device function information sent from the cloud, a control interface is generated based on the device function information. The device function information is generated and uploaded to the cloud by the second device after completing network configuration. The device function information represents the functions that the second device can perform. The control interface corresponds to the functions that the second device can perform, and the format of the device function information conforms to a preset protocol. The first device controls the second device through the preset protocol. In response to the first device receiving a control instruction through the control interface, the first device sends instruction information corresponding to the control instruction to the second device based on the preset protocol, so that the second device performs the device function corresponding to the control instruction.
2. The method according to claim 1, characterized in that, The preset protocol is used to describe the device's functional information. The protocol specification has dynamically changeable attribute information. The device function information includes module information and module function information of the second device. The module information represents the functional modules contained in the second device, and the module function information represents the functions that each functional module in the second device can perform. The device function information is uploaded to the cloud by the second device in the form of attribute information through the preset protocol.
3. The method according to claim 2, characterized in that, The module functional information includes one or more of the following: Each functional module corresponds to a service, a property corresponding to the service, a method corresponding to the service, or an event corresponding to the service; Among them, a service represents the function that the corresponding functional module can achieve, an attribute represents the state supported by the corresponding function of the service, a method represents the operation supported by the corresponding function of the service, and an event represents the instantaneous change that occurs in the corresponding function of the service.
4. The method according to claim 2, characterized in that, When the second device is a device that implements its functions through different hardware, the functional modules included in the second device correspond to the hardware that constitutes the second device; or In the case where the second device is a device that implements device functions through different applications, the functional modules included in the second device correspond to the applications installed on the second device.
5. A device control method, characterized in that, include: In response to the completion of network distribution by the second device, the second device generates device function information based on its own capabilities, and the second device completes network distribution by the first device. The device function information is uploaded to the cloud so that the cloud sends the device function information to the first device and the first device generates a control interface based on the device function information. The control interface corresponds to the functions that the second device can perform, and the format of the device function information is consistent with a preset protocol. The first device controls the second device through the preset protocol. In response to receiving an instruction message from the first device to the second device based on the preset protocol, the second device executes a device function corresponding to the instruction message, wherein the instruction message is information generated by the first device when it receives a control instruction through the control interface, and the instruction message corresponds to the control instruction.
6. The method according to claim 5, characterized in that, The preset protocol is used to describe the dynamically changeable attribute information set in the device function information specification. The device function information includes module information and module function information of the second device. The module information represents the functional modules contained in the second device, and the module function information represents the functions that each functional module in the second device can perform. The device function information is uploaded to the cloud by the second device in the form of attribute information through the preset protocol.
7. The method according to claim 6, characterized in that, The device functional information includes one or more of the following: Each functional module corresponds to a service, a property corresponding to the service, a method corresponding to the service, or an event corresponding to the service; Among them, a service represents the function that the corresponding functional module can achieve, an attribute represents the state supported by the corresponding function of the service, a method represents the operation supported by the corresponding function of the service, and an event represents the instantaneous change that occurs in the corresponding function of the service.
8. The method according to claim 7, characterized in that, When the second device is a device that implements its functions through different hardware, the functional modules included in the second device correspond to the hardware that constitutes the second device; or In the case where the second device is a device that implements device functions through different applications, the functional modules included in the second device correspond to the applications installed on the second device.
9. A device control apparatus, characterized in that, include: A generation unit is configured to respond to the first device completing network configuration for the second device and receiving device function information sent from the cloud, and to generate a control interface based on the device function information. The device function information is generated and uploaded to the cloud by the second device after completing network configuration. The device function information represents the functions that the second device can perform. The control interface corresponds to the functions that the second device can perform, and the format of the device function information conforms to a preset protocol. The first device controls the second device through the preset protocol. A control unit is configured to respond to the first device receiving a control instruction through the control interface, wherein the first device sends instruction information corresponding to the control instruction to the second device based on the preset protocol, so that the second device performs a device function corresponding to the control instruction.
10. The apparatus according to claim 9, characterized in that, The preset protocol is used to describe the device's functional information. The protocol specification has dynamically changeable attribute information. The device function information includes module information and module function information of the second device. The module information represents the functional modules contained in the second device, and the module function information represents the functions that each functional module in the second device can perform. The device function information is uploaded to the cloud by the second device in the form of attribute information through the preset protocol.
11. The apparatus according to claim 10, characterized in that, The module functional information includes one or more of the following: Each functional module corresponds to a service, an attribute corresponding to the service, a device corresponding to the service, or an event corresponding to the service; Among them, service represents the function that the corresponding functional module can achieve, attribute represents the state supported by the corresponding function of the service, device represents the operation supported by the corresponding function of the service, and event represents the instantaneous change of the corresponding function of the service.
12. The apparatus according to claim 10, characterized in that, When the second device is a device that implements its functions through different hardware, the functional modules included in the second device correspond to the hardware that constitutes the second device; or In the case where the second device is a device that implements device functions through different applications, the functional modules included in the second device correspond to the applications installed on the second device.
13. A device control apparatus, characterized in that, include: A generation unit is used to respond to the second device completing the network distribution, wherein the second device generates device function information according to its own functions, and the second device completes the network distribution with the first device. An upload unit is used to upload the device function information to the cloud, so that the cloud sends the device function information to the first device, and the first device generates a control interface based on the device function information. The control interface corresponds to the functions that the second device can perform, and the format of the device function information conforms to a preset protocol. The first device controls the second device through the preset protocol. An execution unit is configured to respond to receiving instruction information sent by the first device to the second device based on the preset protocol, wherein the second device performs a device function corresponding to the instruction information, wherein the instruction information is information generated by the first device when it receives a control instruction through the control interface, and the instruction information corresponds to the control instruction.
14. The apparatus according to claim 13, characterized in that, The preset protocol is used to describe the dynamically changeable attribute information set in the device function information specification. The device function information includes module information and module function information of the second device. The module information represents the functional modules contained in the second device, and the module function information represents the functions that each functional module in the second device can perform. The device function information is uploaded to the cloud by the second device in the form of attribute information through the preset protocol.
15. The apparatus according to claim 14, characterized in that, The device functional information includes one or more of the following: Each functional module corresponds to a service, an attribute corresponding to the service, a device corresponding to the service, or an event corresponding to the service; Among them, service represents the function that the corresponding functional module can achieve, attribute represents the state supported by the corresponding function of the service, device represents the operation supported by the corresponding function of the service, and event represents the instantaneous change of the corresponding function of the service.
16. The apparatus according to claim 15, characterized in that, When the second device is a device that implements its functions through different hardware, the functional modules included in the second device correspond to the hardware that constitutes the second device; or In the case where the second device is a device that implements device functions through different applications, the functional modules included in the second device correspond to the applications installed on the second device.
17. An electronic device, characterized in that, include: processor: Memory used to store processor-executable instructions; The processor is configured to execute the device control method according to any one of claims 1 to 4 or the device control method according to any one of claims 5 to 8.
18. A storage medium, characterized in that, The storage medium stores instructions that, when executed by a processor, enable the processor to perform the device control method of any one of claims 1 to 4 or the device control method of any one of claims 5 to 8.