A customizable device control method based on the Internet of Things

Through a customizable device control method based on the Internet of Things, a variety of intelligent devices are unifiedly controlled, which solves the cumbersome operation problems caused by device independence in the existing technology, realizes custom addition and integration of devices, simplifies the operation process and improves the Management efficiency.

CN117997936BActive Publication Date: 2024-11-01GUANGZHOU BAOLUN ELECTRONICS CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410398246.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-03
Publication Date
2024-11-01
Estimated Expiration
2044-04-03

AI Technical Summary

Technical Problem

The existing intelligent device control system is cumbersome in multi-function classrooms or conference rooms due to equipment independence, so it is impossible to control multiple devices in a unified manner, and the compatibility of new devices is poor.

Method used

The customizable device control method based on the Internet of Things is adopted, and the peripherals are controlled uniformly through the control end, and the control program is generated based on the device parameters, so as to realize the custom addition and integration of peripherals, and simplify operations. The method includes an interactive module, a program library and a communication terminal, and uses instruction packet analysis and configuration instructions to generate control programs, supporting multiple interaction methods, such as touch panels, remote software and web pages.

Benefits of technology

It realizes unified control of multiple devices, simplifies operational processes, improves device management efficiency, supports customized addition and compatibility of devices, and reduces operational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117997936B_ABST
    Figure CN117997936B_ABST
Patent Text Reader

Abstract

The present invention provides a customizable device control method based on the Internet of Things, including: constructing a device control system, the device control system including an interactive module, a control terminal and a communication terminal; the interactive module generates a command data packet according to the external command in response to an external command, and sends the command data packet to the control terminal; the control terminal parses the command data packet; when the command data packet type is a control command data packet, the control terminal calls the control program in the program library, sends the control program to the communication terminal, and the communication terminal receives the control program and sends data; when the command type is a configuration command data packet, the control terminal generates the control program, and adds the generated control program to the program library, and the communication terminal performs configuration. The present invention integrates the control commands of various types of devices, merges and simplifies the control methods of various devices, and realizes the custom addition of peripherals, thereby improving the freedom of the control terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things, and in particular to a customizable device control method based on the Internet of Things. Background Art

[0002] With the rapid development of the Internet, the application of the Internet has been booming in manufacturing, Internet finance, and other aspects. Technology has helped realize digital education and smart classrooms. At present, more and more smart devices are entering classrooms and conference rooms as education and conference multimedia, but they are all implemented for a certain function or a certain direction. For example, indoor environmental intelligent monitoring and alarms, control of electrical equipment such as lights, these systems are often designed and arranged separately for the environment of classrooms or conference rooms, and there is no linkage between them. Therefore, multi-functional classrooms or conference rooms with complex facilities often have multiple devices or terminals that work independently of each other, and different control platforms need to be switched when in use, which brings inconvenience to the operation. And the more equipment that needs to be added later, the more cumbersome the operation.

[0003] Therefore, there is a need for a method that can uniformly control multiple devices and can be compatible with newly added devices. Summary of the invention

[0004] To solve the above problems, the present invention provides a customizable device control method based on the Internet of Things, which controls peripherals in a unified manner through a control terminal and can generate a control program according to device parameters, thereby realizing custom addition of peripherals and integrating and simplifying the control of various devices.

[0005] To achieve the above object, the present invention provides the following solutions:

[0006] A customizable device control method based on the Internet of Things comprises the following steps:

[0007] S1. Constructing a device control system, the device control system includes a control terminal and a communication terminal, wherein the control terminal includes an interactive module and a program library, the program library includes a plurality of control programs, and the communication terminal is connected to an external peripheral;

[0008] S2. The interactive module responds to an external instruction, generates an instruction packet according to the external instruction, and sends an instruction packet to the control terminal, wherein the instruction packet includes a control instruction packet and a configuration instruction packet;

[0009] S3. After the control terminal receives the instruction packet issued by the interactive module, the instruction packet is parsed to confirm the type of instruction packet received;

[0010] S4. When the instruction packet type is a control instruction packet, the control terminal calls the control program in the library according to the parameters in the control instruction packet, and sends the control program to the communication terminal. The communication terminal receives the control program and sends data to the corresponding peripheral device according to the control program;

[0011] When the instruction type is a configuration instruction data packet, the control end generates a control program according to the parameters in the configuration instruction data packet, adds the generated control program to the program library, and configures the communication end according to the interface parameters in the control instruction data packet.

[0012] Furthermore, the interaction module receives external instructions via a touch panel terminal, remote software or a web page.

[0013] Through the above technical means, users can interact and input commands in a variety of ways, making user operations more convenient.

[0014] Furthermore, the communication terminal sends data to the peripheral device through the connection interface.

[0015] Furthermore, each control program in the program library controls a corresponding peripheral device, and each control program has an independent identifier. The control end retrieves the corresponding control program through the peripheral device name or identifier.

[0016] By setting the identifier, the control end can easily search for the control program and better manage the control programs in the program library.

[0017] Furthermore, the instruction data packet issued by the interaction module is in json format; the control instruction data packet includes one or more of the name of the peripheral or the identifier of the control program corresponding to the peripheral, and the instructions that need to be executed by the peripheral; the configuration instruction data packet includes device parameters of the custom device, interface parameters for controlling the custom device, instructions that can be executed by the custom device, and parameters of the corresponding instructions.

[0018] Furthermore, in step S4, the step of generating a control program according to the parameters in the configuration instruction data packet by the control end includes:

[0019] S41. Generate a control program file based on the device parameters of the custom device;

[0020] S42. The control program file generates an interface function according to the interface parameters of the custom device;

[0021] S43. Generate a command function according to the commands that the custom device can execute and the corresponding command parameters. Each command corresponds to a command function, and the command function includes the command parameters corresponding to the command. When all the commands have their corresponding command functions, the generation of the command function ends.

[0022] S44. Encapsulate the control program file to obtain an encapsulated control program, generate an identifier for the encapsulated control program, and save the control program with the identifier in a program library.

[0023] Further, in step S4, the communication end receives the control program, and sends data to the corresponding peripheral device according to the control program, including: the communication end connects to the corresponding interface according to the interface function of the control program, the control end transmits the instruction in the control instruction data packet to the communication end, the communication end executes the corresponding instruction function according to the instruction, and sends the corresponding instruction parameter according to the instruction function.

[0024] Furthermore, the communication terminal also includes a plurality of integrated modules, and the interfaces of the peripherals are connected to the integrated modules.

[0025] Furthermore, after the communication end receives the control program and sends data to the corresponding peripheral device according to the control program, it also includes: after receiving the data, the communication end returns the data to the control end, and the control end displays the data on the interaction module after receiving the data.

[0026] Furthermore, the control terminal and the communication terminal are in the same local area network. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 This is an overall flow chart of a customizable device control method based on the Internet of Things. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0030] See also Figure 1 , a customizable device control method based on the Internet of Things, comprising the following steps:

[0031] S1. Constructing a device control system, the device control system includes a control terminal and a communication terminal, wherein the control terminal includes an interactive module and a program library, the program library includes a plurality of control programs, and the communication terminal is connected to an external peripheral;

[0032] S2. The interactive module responds to an external instruction, generates an instruction packet according to the external instruction, and sends an instruction packet to the control terminal, wherein the instruction packet includes a control instruction packet and a configuration instruction packet;

[0033] S3. After the control terminal receives the instruction packet issued by the interactive module, the instruction packet is parsed to confirm the type of instruction packet received;

[0034] S4. When the instruction packet type is a control instruction packet, the control terminal calls the control program in the library according to the parameters in the control instruction packet, and sends the control program to the communication terminal. The communication terminal receives the control program and sends data to the corresponding peripheral device according to the control program;

[0035] When the instruction type is a configuration instruction data packet, the control end generates a control program according to the parameters in the configuration instruction data packet, adds the generated control program to the program library, and configures the communication end according to the interface parameters in the control instruction data packet.

[0036] For example, the user interacts with the interaction module, causing the interaction module to send a control command data packet to the control end to start the projector. After receiving the control command data packet, the control end searches the program library according to the command for starting the projector in the control command data packet, obtains the control program for starting the projector, and sends the control program for starting the projector to the communication end. The communication end receives and executes the control program to start the projector.

[0037] The interactive module receives external instructions through a touch panel terminal, remote software or a web page.

[0038] In this embodiment, the user can interact with the touch screen terminal, mobile phone APP and web page to input the instructions to be executed or the peripheral parameters to be configured. Through the above technical means, the user can interact and input instructions in a variety of ways, making the user's operation more convenient.

[0039] In an optional implementation, the communication terminal sends data to the peripheral device through the connection interface.

[0040] In an optional implementation, each control program in the program library controls a corresponding peripheral device, each control program has an independent identifier, and the control end retrieves the corresponding control program through the peripheral device name or identifier.

[0041] By setting the identifier, the control end can easily search for the control program and better manage the control programs in the program library.

[0042] In an optional implementation, the instruction data packet sent by the interaction module is in json format; the control instruction data packet includes one or more of the name of the peripheral device or the identifier of the control program corresponding to the peripheral device, and the instruction to be executed by the peripheral device;

[0043] The configuration instruction data packet includes device parameters of the custom device, interface parameters for controlling the custom device, instructions that can be executed by the custom device, and parameters corresponding to the instructions.

[0044] Set the custom device parameters in the interactive module. For example, to set the control relay, you need to set the relay to be controlled and the relay status to be on or off. After setting, a configuration instruction data packet will be generated, which contains the name of the control, the function code representing the control relay function, the ID of the relay to be controlled, and the JSON format data of 0 or 1 representing on and off.

[0045] In an optional implementation, in step S4, the step of the control end generating a control program according to the parameters in the configuration instruction data packet includes:

[0046] S41. Generate a control program file based on the device parameters of the custom device;

[0047] S42. The control program file generates an interface function according to the interface parameters of the custom device;

[0048] S43. Generate a command function according to the commands that the custom device can execute and the corresponding command parameters. Each command corresponds to a command function, and the command function includes the command parameters corresponding to the command. When all the commands have their corresponding command functions, the generation of the command function ends.

[0049] In this embodiment, when the control end receives the configuration instruction data packet, it uses the open() function in Python to create a .py format file, and then continues to write the interface function into the generated .py format file;

[0050] For example, calling a peripheral requires inputting data into the serial port in the communication end. The control end needs to write the call serial port initialization function into the interface function, and encapsulate the serial port parameters such as data bit check bit as parameters in the program, so that when the communication end executes the control program, the serial port can be located and initialized, thereby transmitting instruction data to the peripheral.

[0051] The control terminal is pre-packaged with processing codes for calling common 232, 485, 422 communication protocols, power management, infrared learning and transmission, audio and video processing, etc., so as to facilitate the automatic generation of control programs that can access different devices. For example, the user needs to add a temperature sensor device to the system, and the temperature sensor device includes two instructions: start and shut down, and starting and shutting down the temperature sensor device requires calling infrared transmission and reception functions and power management functions. When the control terminal generates the control program, it will write the start and shut down instruction functions to the control program file according to the instruction set in the configuration instruction data packet, where the start instruction function calls the power start function, infrared transmission function and infrared reception function, and the shut down instruction function includes the power shut down function.

[0052] In an optional embodiment, in step S4, the communication end receives the control program, and responds according to the control program, including: the communication end connects to the corresponding interface according to the interface function of the control program, the control end transmits the instruction in the control instruction data packet to the communication end, the communication end executes the corresponding instruction function according to the instruction, and sends the corresponding instruction parameters according to the instruction function.

[0053] For example, the control end sends the temperature sensor device control program to the communication end, and sends a startup instruction to the temperature sensor device control program. The communication end executes the temperature sensor device control program, connects the corresponding interface according to the interface function in the control program, and executes the startup instruction function to make the temperature sensor device run according to the program.

[0054] In an optional implementation, the communication terminal further includes a plurality of integrated modules, and the interface is connected to the integrated modules.

[0055] The integrated module includes an audio switching module, a video switching module, an infrared learning and transmitting module, a device power management module, an electric curtain control module, an amplifier module, a network broadcasting module, a control interface module, a video decoding module, a wireless projection module, etc. Through redundant configuration of reserved interfaces, different peripherals can also be connected to the device control system, thereby being compatible with devices in a variety of different scenarios and reducing the complexity of the control system and the difficulty of operation.

[0056] In an optional implementation, after the communication end receives the control program and sends data to the corresponding peripheral device according to the control program, it also includes: after receiving the data, the communication end returns the data to the control end, and the control end displays the data on the interactive module after receiving the data.

[0057] For example, the communication terminal includes a temperature detection device. After detecting the current temperature, the temperature detection device sends the temperature data to the control terminal. After obtaining the temperature data, the control terminal displays the current temperature on the interactive module for the user to view. The control terminal can send control programs to the communication terminal and receive data from the communication terminal. The device control system can control the peripherals, receive the information collected by the peripherals, and display it to the user, thus expanding the functions of the device control system.

[0058] In an optional implementation, the control end and the communication end are in the same local area network.

[0059] The embodiment disclosed in this specification is only an example of a unilateral feature of the present invention, and the protection scope of the present invention is not limited to this embodiment, and any other functionally equivalent embodiments fall within the protection scope of the present invention. For those skilled in the art, various other corresponding changes and deformations can be made according to the technical solutions and concepts described above, and all of these changes and deformations should fall within the protection scope of the claims of the present invention.

Claims

1. A customizable device control method based on the Internet of Things, characterized in that: The following steps are involved: S1. Constructing a device control system, the device control system includes a control terminal and a communication terminal, wherein the control terminal includes an interactive module and a program library, the program library includes a plurality of control programs, and the communication terminal is connected to an external peripheral; S2. The interactive module responds to an external instruction, generates an instruction packet according to the external instruction, and sends an instruction packet to the control terminal, wherein the instruction packet includes a control instruction packet and a configuration instruction packet; S3. After the control terminal receives the instruction packet issued by the interactive module, the instruction packet is parsed to confirm the type of instruction packet received; S4. When the instruction packet type is a control instruction packet, the control terminal calls the control program in the library according to the parameters in the control instruction packet, and sends the control program to the communication terminal. The communication terminal receives the control program and sends data to the corresponding peripheral device according to the control program; When the instruction data packet type is a configuration instruction data packet, the control end generates a control program according to the parameters in the configuration instruction data packet, adds the generated control program to the program library, and configures the communication end according to the interface parameters in the control instruction data packet; Each control program in the program library controls a peripheral device, each control program has an independent identifier, and the control end retrieves the corresponding control program through the peripheral device name or identifier; The instruction data packet sent by the interaction module is in json format; the control instruction data packet includes one or more of the name of the peripheral or the identifier of the control program corresponding to the peripheral, and the instruction that needs to be executed by the peripheral; the configuration instruction data packet includes the device parameters of the custom device, the interface parameters for controlling the custom device, the instructions that the custom device can execute, and the parameters of the corresponding instructions; The steps of generating a control program according to the parameters in the configuration instruction data packet at the control end include: S41. Generate a control program file based on the device parameters of the custom device; S42. The control program file generates an interface function according to the interface parameters of the custom device; S43. Generate a command function according to the commands that the custom device can execute and the corresponding command parameters. Each command corresponds to a command function, and the command function includes the command parameters corresponding to the command. When all the commands have their corresponding command functions, the generation of the command function ends. S44. Encapsulate the control program file to obtain an encapsulated control program, generate an identifier for the encapsulated control program, and save the control program with the identifier in a program library.

2. The customizable device control method based on the Internet of Things according to claim 1, characterized in that: The interactive module receives external instructions through a touch panel terminal, remote software or a web page.

3. The customizable device control method based on the Internet of Things according to claim 1, characterized in that: The communication terminal sends data to the peripheral device through the connection interface.

4. The customizable device control method based on the Internet of Things according to claim 1, characterized in that: In step S4, the communication end receives the control program and sends data to the corresponding peripheral device according to the control program, including: the communication end connects to the corresponding interface according to the interface function of the control program, the control end transmits the instruction in the control instruction data packet to the communication end, the communication end executes the corresponding instruction function according to the instruction, and sends the corresponding instruction parameter according to the instruction function.

5. The customizable device control method based on the Internet of Things according to claim 4 is characterized in that: The communication terminal also includes a plurality of integrated modules, and the interface is connected to the integrated modules.

6. The customizable device control method based on the Internet of Things according to claim 4, characterized in that: After the communication end receives the control program and sends data to the corresponding peripheral device according to the control program, the method further includes: after receiving the data, the communication end returns the data to the control end, and the control end displays the data on the interaction module after receiving the data.

7. A customizable device control method based on the Internet of Things according to any one of claims 1 to 6, characterized in that: The control terminal and the communication terminal are in the same local area network.

Citation Information

Patent Citations

  • Internet of things equipment control method, control end and system

    CN106773749A

  • Equipment management method and terminal

    CN114666194A

  • Internet of Things sensor configuration and control method and system

    CN114760285A

  • Internet of Things control method and device in power line carrier environment, and intelligent terminal

    CN115914312A

  • Method and apparatus for controlling internet of things device

    WO2017152676A1