A method and tool for controlling IoT devices via mobile device
By simplifying configuration, dynamically selecting object models, and editing mapping relationships, this approach solves the problems of complex configuration, insufficient flexibility, and inadequate real-time performance in traditional IoT device control, achieving convenient, flexible, and reliable IoT device control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU INSTRUCTION SET INTELLIGENT TECH CO LTD
- Filing Date
- 2023-06-30
- Publication Date
- 2026-05-26
AI Technical Summary
Traditional IoT device control methods suffer from complex configuration processes, lack of dynamism and flexibility, missing mapping relationships, and limited real-time control capabilities, resulting in high user barriers, heavy development and maintenance workload, inconsistent control, and insufficient real-time performance.
This paper provides a method for controlling IoT devices via a mobile terminal. By acquiring control requirements, initializing the configuration terminal, selecting the object model, editing the mapping relationship, initializing the runtime terminal, and modifying attribute values on the runtime terminal to control the IoT device, the method simplifies the configuration process, dynamically selects the object model, and achieves real-time control.
It simplifies the configuration process for device control, improves the flexibility and accuracy of control, ensures the correct mapping and real-time control of predefined attributes and device attributes, lowers the user threshold, and enhances the reliability and real-time performance of device integration.
Smart Images

Figure CN116743564B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet of Things (IoT) technology, and in particular to a method and tool for controlling IoT devices via a mobile terminal. Background Technology
[0002] With the rapid development of IoT technology, more and more IoT devices are entering people's lives, including but not limited to smart homes, smart lighting, and smart locks. However, for each IoT device, a control logic and user interface need to be designed for adaptation and control. The configuration process is complex, including setting connection parameters, device-specific protocols, and communication settings, which increases the user's learning curve. Furthermore, there is a lack of dynamism and flexibility; users often need to integrate and configure different devices individually, increasing the workload of development and maintenance. Mapping relationships are also lacking: in traditional methods, the mapping relationship between predefined attributes and device attributes often lacks uniformity and standardization. Finally, real-time control capabilities are poor: traditional methods are limited by factors such as physical distance, network connectivity, and communication protocols, resulting in limitations on the real-time control capabilities of IoT devices. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a method and tool for controlling IoT devices via a mobile terminal, in order to solve the technical problems existing in traditional IoT device control methods.
[0004] In a first aspect, embodiments of the present invention provide a method for controlling an Internet of Things (IoT) device via a mobile terminal, comprising the following steps:
[0005] Obtain control requirements and initialize the configuration terminal;
[0006] The configuration terminal selects the object model according to the control requirements;
[0007] Obtain the list of device attributes of the object model;
[0008] Edit the mapping entries based on the device attribute list to obtain the mapping relationship between predefined attributes and device attributes;
[0009] Initialize the runtime based on the device attribute list and mapping relationship;
[0010] Modify predefined attribute values on the runtime terminal;
[0011] The modified device attribute value mapped to the predefined attribute value is transmitted to the IoT device that needs to be controlled, so as to control the device attribute corresponding to the IoT device.
[0012] Preferably, editing the mapping entry according to the device attribute list includes the following steps:
[0013] Select a predefined attribute, and a device attribute that maps to the predefined attribute;
[0014] Edit enumeration and Boolean values;
[0015] Select the preset control components.
[0016] Preferably, initializing the runtime based on the device attribute list and mapping relationship includes the following steps:
[0017] Obtain the mapping relationship and device attribute list;
[0018] Render the user interface of the running terminal.
[0019] Preferably, after modifying the predefined attribute values on the runtime, the following steps are also included:
[0020] The modified device attribute value mapped to the predefined attribute value is temporarily stored in a key-value pair variable. It is then determined whether the preset submission condition is triggered. If not, the process continues to wait for the predefined attribute value to be modified. If it is triggered, the key-value pair variable is submitted in batches to the IoT devices that need to be controlled for control.
[0021] Preferably, the preset submission conditions include the following methods:
[0022] The predetermined number of modified device attribute values temporarily stored in the key-value pair variable and the manual commit command.
[0023] Preferably, after transmitting the modified device attribute values to the IoT device to be controlled, the process further includes the following steps:
[0024] After receiving the modified device attribute value, the IoT device modifies the corresponding device attribute and returns the modification result to the running terminal.
[0025] The runtime determines whether to continue modifying the predefined attribute values based on the modification results.
[0026] Secondly, embodiments of the present invention provide a tool for controlling Internet of Things (IoT) devices via a mobile terminal, comprising:
[0027] Receive module: Used to acquire control requirements;
[0028] Configuration module: used to initialize the configuration terminal, select a material model on the configuration terminal according to the control requirements, obtain a list of device attributes of the material model, and edit mapping entries according to the list of device attributes to obtain the mapping relationship between predefined attributes and device attributes;
[0029] Run module: Used to initialize the run terminal according to the device attribute list and mapping relationship, modify the predefined attribute values on the run terminal, and transmit the modified device attribute values mapped by the modified predefined attribute values to the IoT devices to be controlled.
[0030] Preferably, it further includes a temporary storage module and a submission determination module. The temporary storage module is used to temporarily store the modified device attribute value, and the submission determination module is used to determine whether to submit the modified attribute value temporarily stored in the temporary storage module to the IoT device that needs to be controlled.
[0031] Thirdly, embodiments of the present invention provide a readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed, implement the steps of the method described above.
[0032] Fourthly, embodiments of the present invention provide a program product including computer program instructions, which, when executed, implement the steps of the method described above.
[0033] Compared with the prior art, the method for controlling IoT devices via a mobile terminal provided by the present invention has the following beneficial effects:
[0034] 1. The method for controlling IoT devices via a mobile terminal according to embodiments of the present invention includes the following steps: obtaining control requirements and initializing a configuration terminal; selecting an object model on the configuration terminal according to the control requirements; obtaining a list of device attributes of the object model; editing mapping entries according to the device attribute list to obtain a mapping relationship between predefined attributes and device attributes; initializing a running terminal according to the device attribute list and mapping relationship; modifying predefined attribute values on the running terminal; and transmitting the modified device attribute values mapped by the modified predefined attribute values to the IoT device to be controlled, so as to control the device attributes corresponding to the IoT device. Traditional IoT device control methods have the following drawbacks: 1. Complex configuration process: Traditional IoT device control methods usually require users to manually perform a complex configuration process, including setting connection parameters, device-specific protocols, and communication settings. This increases the user's barrier to entry, especially for non-professional users, where the configuration process may seem complex and difficult. 2. Lack of dynamism and flexibility: Traditional methods usually use predefined control methods and device configurations, and cannot dynamically select and configure object models according to actual needs. This limits the user's ability to flexibly control different device types and functions. Users often need to perform separate integration and configuration for different devices, increasing the workload of development and maintenance. 3. Lack of Mapping Relationships: In traditional methods, the mapping relationship between predefined attributes and device attributes often lacks uniformity and standardization. Each device may have different attribute naming and data formats, leading to a lack of consistency and scalability in configuration and control. This makes attribute mapping and control between different devices complex and difficult. 4. Limited Real-Time Control Capabilities: Traditional methods may be limited by factors such as physical distance, network connectivity, and communication protocols, resulting in limitations on the real-time control capabilities of IoT devices. In some cases, users may not be able to obtain timely device status updates and responses, thus affecting the real-time performance and accuracy of control. In summary, traditional IoT device control methods suffer from problems in configuration complexity, dynamism, mapping relationships, and real-time control capabilities. This is because traditional methods lack unified standards and a universal control framework, as well as user-friendly configuration and control interfaces. These limitations lead to complex configuration processes, limited control capabilities, and inconsistent device integration issues for users. Understandably, compared to traditional IoT device control methods, the mobile device control method provided in this solution solves the problems of complex device control configuration, low control accuracy, and insufficient real-time performance in existing technologies by simplifying the configuration process, dynamically selecting object models, editing mapping relationships, and achieving real-time control. It offers a more convenient, flexible, and reliable way to control IoT devices via mobile devices. Attached Figure Description
[0035] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, and these are all within the protection scope of the present invention.
[0036] Figure 1 This is a flowchart illustrating a method for controlling an Internet of Things (IoT) device via a mobile terminal, as provided in the first embodiment of the present invention.
[0037] Figure 2 A schematic diagram of the structure of a tool for controlling IoT devices via a mobile terminal provided in the second embodiment of the present invention.
[0038] Figure 3 This is a schematic diagram of the main process of the configuration terminal in the tool configuration module for controlling IoT devices via a mobile terminal provided in the second embodiment of the present invention.
[0039] Figure 4 This is a schematic diagram of the main process of the running end in the tool running module for controlling IoT devices via mobile terminal provided in the second embodiment of the present invention.
[0040] Figure 5 This is a schematic diagram illustrating the implementation of the configuration terminal in the tool for controlling IoT devices via a mobile terminal provided in the second embodiment of the present invention.
[0041] Figure 6 This is a schematic diagram of the operation interface of the running terminal in the tool for controlling IoT devices via mobile terminal provided in the second embodiment of the present invention.
[0042] Figure 7 This is a schematic diagram of the structure of the program product provided in the fourth embodiment of the present invention.
[0043] Figure 8 This is a schematic diagram of the structure of an electronic device provided in the fifth embodiment of the present invention.
[0044] Explanation of icon numbers:
[0045] 1. Methods for controlling IoT devices via mobile devices; 2. Tools for controlling IoT devices via mobile devices; 3. Application products; 4. Electronic devices;
[0046] 20. Receiving module; 21. Configuration module; 22. Running module; 23. Temporary storage module; 24. Decision module; 30. Computer program instructions; 40. Processor; 41. Memory; 42. Bus; 43. Communication interface. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0048] Please see Figure 1 The first embodiment of the present invention provides a method 1 for controlling an Internet of Things (IoT) device via a mobile terminal, comprising the following steps:
[0049] Obtain control requirements and initialize the configuration terminal;
[0050] Select the object model based on control requirements at the configuration end;
[0051] Get the list of device attributes of the object model;
[0052] Edit the mapping entries based on the device attribute list to obtain the mapping relationship between predefined attributes and device attributes;
[0053] Initialize the runtime based on the device attribute list and mapping relationship;
[0054] Modify predefined attribute values at runtime;
[0055] The modified device attribute values mapped to the modified predefined attribute values are transmitted to the IoT devices that need to be controlled, so as to control the corresponding device attributes of the IoT devices.
[0056] Traditional IoT device control methods have the following drawbacks: 1. Complex configuration process: Traditional IoT device control methods typically require users to manually perform complex configuration processes, including setting connection parameters, device-specific protocols, and communication settings. This increases the barrier to entry for users, especially non-professional users, where the configuration process may seem complex and difficult. 2. Lack of dynamism and flexibility: Traditional methods usually use predefined control methods and device configurations, making it impossible to dynamically select and configure object models according to actual needs. This limits users' ability to flexibly control different device types and functions. Users often need to perform separate integration and configuration for different devices, increasing the workload of development and maintenance. 3. Lack of mapping relationships: In traditional methods, the mapping relationship between predefined attributes and device attributes usually lacks uniformity and standardization. The attribute naming and data format of each device may be different, resulting in a lack of consistency and scalability in the configuration and control process. This makes attribute mapping and control between different devices complex and difficult. 4. Limited real-time control capability: Traditional methods may be limited by factors such as physical distance, network connectivity, and communication protocols, resulting in limitations on the real-time control capability of IoT devices. In some cases, users may not receive timely device status updates and responses, affecting the real-time performance and accuracy of control. In summary, traditional IoT device control methods suffer from problems in terms of configuration complexity, dynamism, mapping relationships, and real-time control capabilities. This is because traditional methods lack unified standards and universal control frameworks, as well as user-friendly configuration and control interfaces. These limitations lead to complex configuration processes, limited control capabilities, and inconsistent device integration issues for users.
[0057] Understandably, compared to traditional IoT device control methods, the mobile terminal control method for IoT devices provided in this solution has the following advantages:
[0058] 1. Simplified Control Configuration: By acquiring control requirements and initializing the configuration terminal, the method allows users to easily set control requirements and configuration parameters. This simplifies the device control configuration process and lowers the barrier to entry for users.
[0059] 2. Dynamic Object Model Selection: By selecting an object model at the configuration end, the method allows users to dynamically choose a suitable object model based on actual needs. This enables users to select the most suitable object model for control based on the characteristics and functions of the equipment, improving the accuracy and flexibility of control.
[0060] 3. Mapping Relationship Editing and Initialization: This method edits mapping entries based on the device attribute list to obtain the mapping relationship between predefined attributes and device attributes. This allows for attribute value matching and binding during runtime initialization, ensuring correct mapping and control between predefined attributes and device attributes.
[0061] 4. Real-time control and attribute updates: By modifying predefined attribute values at the runtime and transmitting the modified values to the IoT device, this method enables real-time control of the IoT device's attributes. This allows users to promptly control the device's status and behavior, and ensures the accurate transmission and updating of attribute values.
[0062] It should be understood that the method for controlling IoT devices via mobile terminal provided in the first embodiment of the present invention solves the problems of complex device control configuration, low control accuracy, and insufficient real-time performance in the prior art by simplifying the configuration process, dynamically selecting object models, editing mapping relationships, and achieving real-time control. It provides a more convenient, flexible, and reliable way to control IoT devices via mobile terminal.
[0063] In some embodiments, editing a mapping entry based on a device attribute list includes the following steps:
[0064] Select predefined attributes, and device attributes that map to the predefined attributes;
[0065] Edit enumeration and Boolean values;
[0066] Select the preset control components.
[0067] For example, an intelligent air conditioning system has a physical model that includes the following attributes:
[0068] 1. Predefined attributes: target temperature, wind speed, vertical airflow, horizontal airflow, operating mode, start / stop control.
[0069] 2. Equipment properties: set temperature, set wind speed, vertical oscillation, horizontal oscillation, mode setting.
[0070] When editing a mapping entry, we can perform the following steps:
[0071] 1. Select a predefined attribute: Choose the attribute you want to control from the list of predefined attributes. In this example, we select wind speed and target temperature.
[0072] 2. Device Attributes Mapped to Predefined Attributes: Select the corresponding device attribute for each chosen predefined attribute. In this example, we map the predefined attribute "wind speed" to the device attribute "set wind speed," and the predefined attribute "target temperature" to the device attribute "set temperature."
[0073] 3. Editing Enumeration and Boolean Values: If the selected attribute is an enumeration or Boolean type, we can edit its corresponding value. For example, if the wind speed attribute is an enumeration type, we can specify available wind speed options, such as low, medium, high, and automatic.
[0074] 4. Select a preset control component: Choose a preset control component based on the attribute type. Different attribute types may require different control components to display and modify attribute values.
[0075] In summary, in specific embodiments, editing mapping entries based on the device attribute list can be accomplished by selecting predefined attributes, mapping them to device attributes, editing enumeration and Boolean values, and selecting preset control components. In this way, we can define the mapping relationships between attributes and configure appropriate control components to control and operate IoT devices.
[0076] In some embodiments, initializing the runtime based on the device attribute list and mapping relationship includes the following steps:
[0077] Retrieve mapping relationships and device attribute lists. Specifically, retrieve the device attribute list: obtain the device attribute list from the configuration end, which contains the controllable attributes of IoT devices; retrieve mapping relationships: obtain the mapping relationship between predefined attributes and device attributes, so that the operations of the runtime can be mapped to the attributes of IoT devices;
[0078] Render the runtime interface. Specifically, based on the device attribute list and mapping relationships, render the runtime interface. The interface should include control components corresponding to the IoT device attributes so that users can control the devices.
[0079] Specifically, a smart switch has the following physical model attributes:
[0080] Predefined attribute: Start-stop control.
[0081] Device attribute: Power switch.
[0082] When initializing the runtime environment, we can perform the following steps:
[0083] 1. Obtain the device attribute list: Obtain the device attribute list from the configuration end, including the power switch attribute.
[0084] 2. Obtain mapping relationship: Obtain the mapping relationship between predefined attributes and device attributes. For example, we establish a mapping relationship to correspond the predefined attribute "start / stop control" with the device attribute "power switch".
[0085] 3. Render the runtime interface: Based on the device attribute list and mapping relationship, render the runtime interface. The interface can display the on / off status control components.
[0086] For the on / off status attribute, render a switch button on the user interface so that the user can switch the device on / off status.
[0087] By following the steps above, we can initialize the runtime and display control components corresponding to the IoT device attributes on the interface. Users can use these control components to modify the values of predefined attributes, such as toggling switch states. The runtime will then pass the modified attribute values to the corresponding device attributes according to the mapping relationship, thereby enabling control of the IoT device.
[0088] In some embodiments, after modifying the predefined attribute values at runtime, the following steps are also included:
[0089] The modified device attribute values mapped to the modified predefined attribute values are temporarily stored in key-value pair variables. It is then determined whether the preset submission conditions are triggered. If not, the process continues to wait for the modified predefined attribute values to be modified. If the conditions are triggered, the key-value pair variables are submitted in batches to the IoT devices that need to be controlled for control.
[0090] Furthermore, the preset submission conditions include the following methods: a predetermined number of modified device attribute values temporarily stored in key-value pair variables and manual submission commands.
[0091] For example, an intelligent air conditioning system includes an intelligent air conditioning device whose object model includes the following properties:
[0092] Predefined attribute: vertical airflow.
[0093] Device attribute: Vertical oscillation.
[0094] After modifying the predefined attribute values at runtime, we can perform the following steps:
[0095] Map the modified predefined attribute values to device attribute values: Based on the mapping relationship, the modified predefined attribute values are mapped to the corresponding device attribute values. For example, if the user changes the value of the "Up and Down Swing" attribute to "On" on the runtime, we will map this value to the device attribute "Vertical Oscillation".
[0096] Temporarily store the modified mapping in a key-value pair variable: Create a key-value pair variable and store the modified mapping in it. For example, the key in the key-value pair variable can be a device attribute name (such as vertical oscillation), and the corresponding value is the modified predefined attribute value (such as enabled).
[0097] Determine if preset submission conditions are triggered: Based on preset submission conditions, determine whether the submission conditions are met. For example, submission conditions could be that the user clicked the confirmation button or that there has been no action for a period of time.
[0098] Triggering the submission operation: If the preset submission conditions are triggered, the contents of the key-value pairs are submitted in batches to the IoT devices that need to be controlled. In our example, the modified "Up and Down Swing" attribute value (On) is submitted to the "Vertical Oscillation" attribute of the IoT air conditioner device.
[0099] Through the above steps, we can map the modified predefined attribute values on the runtime to device attribute values and store the mapping relationship in key-value pair variables. Based on preset submission conditions, we determine whether a submission operation needs to be triggered. If the submission conditions are met, the contents of the key-value pair variables are submitted in batches to the IoT device for control. In this way, we can pass the modified attribute values to the IoT device at appropriate times to control the air conditioning equipment, such as controlling the air conditioner's up and down airflow function.
[0100] In some embodiments, after transmitting the modified device attribute value to the IoT device to be controlled, the following steps are also included:
[0101] After receiving a request to modify the device attribute value, the IoT device modifies the corresponding device attribute and returns the modification result to the runtime.
[0102] The runtime determines whether to continue modifying the predefined attribute values based on the modification results.
[0103] For example, taking the above-mentioned smart air conditioning system as an example, suppose that in the previous step, we passed the modified "up and down air sweeping" attribute value (on) from the operating end to the "vertical swing" attribute of the IoT air conditioning device for modification.
[0104] The IoT device receives a request to modify the device attribute value: The IoT air conditioning device receives a modification request from the operating terminal, which sets the up and down air swing attribute value to "on".
[0105] IoT devices modify corresponding device attributes: An IoT air conditioner device modifies its corresponding device attributes based on a received request. In our example, the vertical oscillation attribute of the air conditioner is set to "on".
[0106] The IoT device returns the modified result: The IoT air conditioning device returns the modified result to the operating system. For example, returning a success response indicates that the attribute was modified successfully.
[0107] The runtime determines whether to continue modifying predefined attribute values based on the modification result: The runtime receives the modification result returned by the IoT device. If the result indicates that the attribute modification was successful, the runtime can continue to allow the user to modify the predefined attribute value. If the result indicates that the attribute modification failed, the runtime can decide whether to allow the user to continue modifying or prompt the user to try again, depending on the specific circumstances.
[0108] Returning the modification results to the runtime and determining whether to continue modifying the predefined attribute values based on these results has the following advantages:
[0109] 1. Real-time Feedback: By returning the modification results to the runtime, users can promptly understand the outcome of attribute modifications to IoT devices. This provides a real-time feedback mechanism, allowing users to know whether their operations were successful and whether the device has been modified as expected.
[0110] 2. Enhanced User Experience: By providing feedback, users receive confirmation of their actions, which increases their trust in the system and their satisfaction. Users can immediately know whether their changes were successful without waiting for a device response or checking the device's status through other means.
[0111] 3. Error Handling and Correction: If the modification results in an error or failure, the runtime can take appropriate measures based on the specific circumstances. For example, it can provide the user with an error message, retry the modification, or prompt the user to perform other operations. This helps to correct potential problems and resolve them promptly.
[0112] 4. Two-way communication and interaction: By providing feedback, the operating system can make further interactions and decisions based on the information returned by the device. For example, after a successful modification, the operating system can update the status display on the interface or automatically adjust other relevant attributes based on the device's response. This two-way communication enhances the interaction and interactivity between the operating system and IoT devices.
[0113] Understandably, this feedback method provides real-time, accurate feedback, enhances the user experience, offers opportunities for error handling and correction, and supports two-way communication and interaction. These benefits contribute to improving the reliability of the control system, user satisfaction, and overall system performance.
[0114] Furthermore, the front-end primarily uses Vue3+TypeScript to develop the configuration and runtime environments, with ElementPlus as the UI library for the configuration environment and Vant as the UI library for the runtime environment; the back-end uses the Spring Boot development framework based on the Java programming language, with MySQL as the storage medium.
[0115] Please see Figure 2 The second embodiment of the present invention also provides a tool 2 for controlling IoT devices via a mobile terminal, used to implement the above-described method for controlling IoT devices via a mobile terminal. The tool for controlling IoT devices via a mobile terminal includes:
[0116] Receiver module 20: Used to acquire control requirements;
[0117] Configuration module 21: Used to initialize the configuration terminal, select an object model according to control requirements on the configuration terminal, obtain a list of device attributes of the object model, and edit mapping entries according to the device attribute list to obtain the mapping relationship between predefined attributes and device attributes. For example, the main process of the configuration terminal is as follows: Figure 3 As shown
[0118] Run Module 22: Used to initialize the run terminal according to the device attribute list and mapping relationship, modify the predefined attribute values on the run terminal, and transmit the modified device attribute values mapped by the modified predefined attribute values to the IoT devices that need to be controlled.
[0119] Preferably, the tool for controlling IoT devices via mobile terminals further includes a temporary storage module 23 and a submission determination module 24. The temporary storage module 23 is used to temporarily store modified device attribute values, and the submission determination module 24 is used to determine whether to submit the modified attribute values temporarily stored in the temporary storage module 23 to the IoT device to be controlled. For example, the operating end is divided into an immediate reporting mode and a batch reporting mode, and its flowchart is shown below. Figure 4 As shown in the diagram. A schematic diagram of the configuration implementation is shown below. Figure 5 As shown in the diagram, the user interface of the runtime is as follows: Figure 6 As shown.
[0120] It should be noted that although several modules or units for executing the process have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0121] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0122] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the method according to the embodiments of this disclosure.
[0123] The third embodiment of the present invention also provides a readable storage medium having computer program instructions stored thereon, which, when executed, implement the steps of the method described above.
[0124] In some possible embodiments, various aspects of this disclosure may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps described in the “Method for Controlling Internet of Things Devices by Mobile Device” section of this specification according to various exemplary embodiments of this disclosure.
[0125] Please see Figure 7 The fourth embodiment of the present invention also provides a program product 3, which includes computer program instructions 30, which, when executed, implement the steps of the method described above.
[0126] Please see Figure 8 The fifth embodiment of the present invention also provides an electronic device 4, specifically, the electronic device 4 includes a processor 40 and a memory 41; the memory 41 stores a computer program, and the computer program executes the method of any of the above embodiments when run by the processor.
[0127] Furthermore, the processor 40, the communication interface 43, and the memory 41 are connected via a bus 42; the processor 40 is used to execute executable modules, such as computer programs, stored in the memory 41.
[0128] The memory 41 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 43 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.
[0129] Bus 42 can be an ISA bus, PCI bus, or EISA bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0130] The memory 41 is used to store the program. After receiving the execution instruction, the processor 40 executes the program. The method executed by the device for the flow process definition disclosed in any of the foregoing embodiments of the present invention can be applied to the processor 40 or implemented by the processor 40.
[0131] Processor 40 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 40 or by instructions in software form. Processor 40 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 41, and the processor 40 reads the information from memory 41 and, in conjunction with its hardware, completes the steps of the above method.
[0132] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, electronic device, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0133] It should be noted that similar reference numerals and letters in the accompanying drawings indicate similar items. Therefore, once an item is defined in one accompanying drawing, it does not need to be further defined and explained in subsequent accompanying drawings. In addition, the terms "first," "second," "third," etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this invention, and not to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for controlling IoT devices via a mobile terminal, used in a smart air conditioning system, characterized in that: Includes the following steps: Obtain control requirements and initialize the configuration terminal, setting control requirements and configuration parameters; On the configuration terminal, a material model is selected according to the control requirements: based on the characteristics and functions of the device, the most suitable material model is selected for control; Obtain the list of device attributes of the object model; Edit the mapping entries according to the device attribute list to obtain the mapping relationship between predefined attributes and device attributes: During runtime initialization, attribute values are matched and bound according to the mapping relationship to ensure the correct mapping and control of predefined attributes and device attributes; wherein, editing the mapping entries according to the device attribute list includes the following steps 1)-4): 1) Select predefined attributes: target temperature, wind speed, vertical swing, horizontal swing, working mode, start / stop control, and device attributes mapped to the predefined attributes: set temperature, set wind speed, vertical swing, horizontal swing, mode setting; 2) Edit enumeration and Boolean values; 3) Select the preset control components. Different attribute types require different control components to display and modify attribute values; 4) By selecting predefined attributes, mapping them to device attributes, editing enumeration and Boolean type values, and selecting preset control components, you can define the mapping relationship between attributes and configure appropriate control components to achieve control and operation of IoT devices. Initialize the runtime based on the device attribute list and mapping relationship: obtain the mapping relationship and device attribute list, and render the operation interface of the runtime, specifically including the following steps 11)-14): 11) Obtain the device attribute list: Obtain the device attribute list from the configuration end, including the power switch attribute; 12) Obtain mapping relationship: Obtain the mapping relationship between predefined attributes and device attributes, and match the predefined attribute "start / stop control" with the device attribute "power switch"; 13) Render the runtime interface: Based on the device attribute list and mapping relationship, render the runtime interface and display the switch status control component on the interface; 14) For the switch status attribute, render a switch button on the operation interface so that the user can switch the device's on / off status. Through the above steps, the runtime is initialized, and control components corresponding to the attributes of IoT devices are displayed on the interface. Users use these control components to modify the values of predefined attributes. The runtime will pass the modified attribute values to the corresponding device attributes according to the mapping relationship, thereby realizing the control of IoT devices. Modify predefined attribute values on the runtime terminal; The modified device attribute value mapped to the predefined attribute value is transmitted to the IoT device that needs to be controlled, so as to control the device attribute corresponding to the IoT device, realize real-time control of IoT device attribute, enable users to control the status and behavior of the device in a timely manner, and ensure the accurate transmission and updating of attribute values.
2. The method for controlling an IoT device via a mobile terminal as described in claim 1, characterized in that: After modifying the predefined attribute values on the runtime, the following steps are also included: The modified device attribute value mapped to the predefined attribute value is temporarily stored in a key-value pair variable. It is then determined whether the preset submission condition is triggered. If not, the process continues to wait for the predefined attribute value to be modified. If it is triggered, the key-value pair variable is submitted in batches to the IoT devices that need to be controlled for control.
3. The method for controlling an IoT device via a mobile terminal as described in claim 2, characterized in that: The preset submission conditions include the following methods: The predetermined number of modified device attribute values temporarily stored in the key-value pair variable and the manual commit command.
4. The method for controlling an IoT device via a mobile terminal as described in any one of claims 1 or 3, characterized in that: After transmitting the modified device attribute values to the IoT device that needs to be controlled, the following steps are also included: After receiving the modified device attribute value, the IoT device modifies the corresponding device attribute and returns the modification result to the running terminal. The runtime determines whether to continue modifying the predefined attribute values based on the modification results.
5. A tool for controlling IoT devices via a mobile terminal, used to implement the method for controlling IoT devices via a mobile terminal as described in any one of claims 1-4, characterized in that: include: Receive module: Used to acquire control requirements; Configuration module: used to initialize the configuration terminal, select a material model on the configuration terminal according to the control requirements, obtain a list of device attributes of the material model, and edit mapping entries according to the list of device attributes to obtain the mapping relationship between predefined attributes and device attributes; Run module: Used to initialize the run terminal according to the device attribute list and mapping relationship, modify the predefined attribute values on the run terminal, and transmit the modified device attribute values mapped by the modified predefined attribute values to the IoT devices to be controlled.
6. The tool for controlling IoT devices via mobile terminal as described in claim 5, characterized in that: It also includes a temporary storage module and a submission determination module. The temporary storage module is used to temporarily store the modified device attribute value, and the submission determination module is used to determine whether to submit the modified device attribute value temporarily stored in the temporary storage module to the IoT device that needs to be controlled.
7. A readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed, they implement the steps of the method as described in any one of claims 1-4.
8. A program product comprising computer program instructions, characterized in that: When the computer program instructions are executed, they implement the steps of the method as described in any one of claims 1-4.