CN116055538A - Control method and device of Internet of things equipment, terminal equipment and storage medium - Google Patents
Control method and device of Internet of things equipment, terminal equipment and storage medium Download PDFInfo
- Publication number
- CN116055538A CN116055538A CN202310037599.5A CN202310037599A CN116055538A CN 116055538 A CN116055538 A CN 116055538A CN 202310037599 A CN202310037599 A CN 202310037599A CN 116055538 A CN116055538 A CN 116055538A
- Authority
- CN
- China
- Prior art keywords
- equipment
- control
- things
- internet
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000006870 function Effects 0.000 claims description 68
- 230000003993 interaction Effects 0.000 claims description 36
- 238000004590 computer program Methods 0.000 claims description 22
- 230000006855 networking Effects 0.000 claims 1
- 230000005540 biological transmission Effects 0.000 abstract description 3
- 230000006872 improvement Effects 0.000 description 18
- 238000010586 diagram Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000011217 control strategy Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
- H04L67/125—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/22—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks comprising specially adapted graphical user interfaces [GUI]
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Human Computer Interaction (AREA)
- Selective Calling Equipment (AREA)
Abstract
The invention discloses a control method, a device, a terminal device and a storage medium of Internet of things equipment, which are used for receiving type data and equipment codes of target Internet of things equipment through an object model after a user performs function selection operation, so that equipment control instructions are determined according to equipment control events in equipment control elements matched with the type data in an equipment model library, equipment control data are generated by combining the equipment codes, and the equipment control data are transmitted to the target Internet of things equipment based on the object model to execute a control function, thereby realizing control of the Internet of things equipment. According to the method, data transmission of different Internet of things devices is performed through the object model, and the device control elements are acquired through the device model library, so that control of the different Internet of things devices is performed by combining the device control elements and the device codes, new control logic is created, control of the different Internet of things devices can be dealt with, and control efficiency of the Internet of things devices is improved.
Description
Technical Field
The present invention relates to the field of electronic data processing, and in particular, to a control method and apparatus for an internet of things device, a terminal device, and a storage medium.
Background
The control of the internet of things equipment in the prior art is to establish wireless or wired connection between a server and the internet of things equipment, and convert an instruction issued by a recognition user into a direct instruction to control the operation of the internet of things equipment.
However, the existing internet of things equipment has a plurality of types and has different protocols, so that different servers are required to access different internet of things equipment, the control of the internet of things equipment is performed, the different servers control different internet of things equipment to waste the calculation power of the servers, and the same server cannot adapt to the control logic of a plurality of different types of internet of things equipment, so that the control efficiency of the existing internet of things equipment is lower.
Therefore, a control strategy of the internet of things device is needed to solve the problem of low control efficiency of the current internet of things device.
Disclosure of Invention
The embodiment of the invention provides a control method and device of Internet of things equipment, terminal equipment and a storage medium, so as to improve the control efficiency of the Internet of things equipment.
In order to solve the above problems, an embodiment of the present invention provides a control method for an internet of things device, including:
responding to a function selection operation executed by a user on a target internet of things device at a human-computer interaction interface, and receiving type data and device codes of the target internet of things device through an object model;
according to the type data, matching equipment control elements corresponding to the type data in an equipment model library; wherein the device control element includes: device control events and device attributes;
according to the function selection operation, determining a control instruction corresponding to the function selection operation through the equipment control event and the equipment attribute, and combining the control instruction and the equipment code to generate equipment control data;
and transmitting the equipment control data to the target internet of things equipment through the object model so that the target internet of things equipment executes a corresponding control function according to the equipment control data.
As an improvement of the above solution, before the receiving, by the object model, the category data and the device code of the target internet of things device, the method further includes:
receiving access information transmitted by the target internet of things equipment through an object model;
judging the access information;
if the access information is preset SDK data, judging that the access is successful, and receiving type data and equipment codes transmitted by the target Internet of things equipment through an object model;
if the access information is not the preset SDK data, judging that the access fails, and canceling the access of the target Internet of things equipment.
As an improvement of the above solution, the matching, in the device model library, the device control element corresponding to the category data according to the category data specifically includes:
the category data includes: type, make, and model;
according to the type, the equipment and the model of the target internet of things equipment, matching library file names corresponding to the type, the brand and the model of the target internet of things equipment in an equipment model library; the device model library comprises device control events, device states and device attributes of the devices corresponding to the Internet of things by a plurality of hardware manufacturers, and names of library file names according to types, brands and models of the devices corresponding to the Internet of things by the plurality of hardware manufacturers;
according to the library file name, equipment control elements corresponding to the target Internet of things equipment are called in the equipment model library; wherein the device control element further comprises: device status.
As an improvement of the above solution, the determining, according to the function selecting operation, a control instruction corresponding to the function selecting operation according to the device control event and the device attribute specifically includes:
extracting and obtaining the equipment control event from the equipment control element;
according to the function selection operation, determining a control code corresponding to the function selection operation in the equipment control event, and determining a control parameter in the equipment attribute;
and combining the control code and the control parameter to generate a control instruction corresponding to the function selection operation.
As an improvement of the above solution, the transmitting the device control data to the target internet of things device through the object model specifically includes: and transmitting the equipment control data to the object model so that the object model transmits the equipment control data to the target internet of things equipment according to the equipment codes.
As an improvement of the above solution, after the transmitting the device control data to the target internet of things device, the method further includes:
responding to a display function executed by a user on a target internet of things device at a man-machine interaction interface, and receiving a device state transmitted by the target internet of things device through the object model;
updating the equipment state in the equipment control element according to the equipment state transmitted by the target Internet of things equipment;
and transmitting the updated equipment state in the equipment control element to the man-machine interaction interface so that the man-machine interaction interface displays according to the updated equipment state.
As an improvement of the above scheme, the receiving, by the object model, the type data and the device code of the target internet of things device specifically includes: and receiving the type data and the equipment codes transmitted by the target Internet of things equipment through an object model according to a preset interaction format.
Correspondingly, an embodiment of the present invention further provides a control device for an internet of things device, including: the device comprises a data receiving module, a data matching module, a result generating module and a device control module;
the data receiving module is used for responding to the function selection operation executed by a user on the target internet of things equipment at the man-machine interaction interface and receiving the type data and equipment codes of the target internet of things equipment through the object model;
the data matching module is used for matching equipment control elements corresponding to the type data in an equipment model library according to the type data; wherein the device control element includes: device control events and device attributes;
the result generation module is used for determining a control instruction corresponding to the function selection operation according to the function selection operation through the equipment control event and the equipment attribute, and combining the control instruction and the equipment code to generate equipment control data;
the device control module is used for transmitting the device control data to the target internet of things device through the object model so that the target internet of things device executes a corresponding control function according to the device control data.
As an improvement of the above solution, before the receiving, by the object model, the category data and the device code of the target internet of things device, the method further includes:
receiving access information transmitted by the target internet of things equipment through an object model;
judging the access information;
if the access information is preset SDK data, judging that the access is successful, and receiving type data and equipment codes transmitted by the target Internet of things equipment through an object model;
if the access information is not the preset SDK data, judging that the access fails, and canceling the access of the target Internet of things equipment.
As an improvement of the above solution, the data matching module includes: library file matching unit and equipment control element retrieving unit;
the category data includes: type, make, and model;
the library file matching unit is used for matching library file names corresponding to the type, the brand and the model of the target internet of things device in the device model library according to the type, the device and the model of the target internet of things device; the device model library comprises device control events, device states and device attributes of the devices corresponding to the Internet of things by a plurality of hardware manufacturers, and names of library file names according to types, brands and models of the devices corresponding to the Internet of things by the plurality of hardware manufacturers;
the device control element calling unit is used for calling the device control element corresponding to the target internet of things device in the device model library according to the library file name; wherein the device control element further comprises: device status.
As an improvement of the above solution, the determining, according to the function selecting operation, a control instruction corresponding to the function selecting operation according to the device control event and the device attribute specifically includes:
extracting and obtaining the equipment control event from the equipment control element;
according to the function selection operation, determining a control code corresponding to the function selection operation in the equipment control event, and determining a control parameter in the equipment attribute;
and combining the control code and the control parameter to generate a control instruction corresponding to the function selection operation.
As an improvement of the above solution, the transmitting the device control data to the target internet of things device through the object model specifically includes: and transmitting the equipment control data to the object model so that the object model transmits the equipment control data to the target internet of things equipment according to the equipment codes.
As an improvement of the above solution, after the transmitting the device control data to the target internet of things device, the method further includes:
responding to a display function executed by a user on a target internet of things device at a man-machine interaction interface, and receiving a device state transmitted by the target internet of things device through the object model;
updating the equipment state in the equipment control element according to the equipment state transmitted by the target Internet of things equipment;
and transmitting the updated equipment state in the equipment control element to the man-machine interaction interface so that the man-machine interaction interface displays according to the updated equipment state.
As an improvement of the above scheme, the receiving, by the object model, the type data and the device code of the target internet of things device specifically includes: and receiving the type data and the equipment codes transmitted by the target Internet of things equipment through an object model according to a preset interaction format.
Correspondingly, an embodiment of the invention also provides a computer terminal device, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the control method of the internet of things device is realized when the processor executes the computer program.
Correspondingly, an embodiment of the invention also provides a computer readable storage medium, which comprises a stored computer program, wherein when the computer program runs, the device where the computer readable storage medium is controlled to execute the control method of the internet of things device according to the invention.
From the above, the invention has the following beneficial effects:
the invention provides a control method of Internet of things equipment, which is characterized in that after a user performs function selection operation, type data and equipment codes of target Internet of things equipment are received through an object model, equipment control events in equipment control elements are matched in an equipment model library according to the type data, equipment control instructions are determined, equipment control data are generated by combining the equipment codes, and the equipment control data are transmitted to the target Internet of things equipment based on the object model so as to execute control functions, so that control of the Internet of things equipment is realized. According to the method, data transmission of different Internet of things devices is performed through the object model, and the device control elements are acquired through the device model library, so that control of the different Internet of things devices is performed by combining the device control elements and the device codes, new control logic is created, control of the different Internet of things devices can be dealt with, and control efficiency of the Internet of things devices is improved.
Drawings
Fig. 1 is a flow chart of a control method of an internet of things device according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a control device of an internet of things device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1, fig. 1 is a flow chart of a control method of an internet of things device according to an embodiment of the present invention, as shown in fig. 1, the embodiment includes steps 101 to 104, where each step is specifically as follows:
in this embodiment, the service gateway is configured to execute the control method of the internet of things device according to the present invention.
Step 101: and responding to the function selection operation executed by the user on the target internet of things equipment at the man-machine interaction interface, and receiving the type data and equipment codes of the target internet of things equipment through the object model.
In this embodiment, before the receiving, by the object model, the category data and the device code of the target internet of things device, the method further includes:
receiving access information transmitted by the target internet of things equipment through an object model;
judging the access information;
if the access information is preset SDK data, judging that the access is successful, and receiving type data and equipment codes transmitted by the target Internet of things equipment through an object model;
if the access information is not the preset SDK data, judging that the access fails, and canceling the access of the target Internet of things equipment.
In a specific embodiment, when a new target internet of things device is accessed, whether the device can be accessed by the SDK provided by a manufacturer is firstly judged, so that whether the access is successful is judged.
When the access is successful, the corresponding type (lamp, air conditioner, broadcast …), brand and model are obtained according to the new target internet of things equipment.
When the access fails, the access is canceled.
In a specific embodiment, when the target internet of things device is acquired, the brand, the type and the model of the target internet of things device are acquired according to the matching result by acquiring the appearance image of the target internet of things device and matching the appearance image in the device gallery.
In this embodiment, the receiving, by the object model, the type data and the device code of the target internet of things device specifically includes: and receiving the type data and the equipment codes transmitted by the target Internet of things equipment through an object model according to a preset interaction format.
In a specific embodiment, the interaction between the business gateway and the object model uses a standard interaction format to transmit events, states, and attributes of the device.
Step 102: according to the type data, matching equipment control elements corresponding to the type data in an equipment model library; wherein the device control element includes: device control events and device attributes.
In this embodiment, the matching, in the device model library, the device control element corresponding to the type data according to the type data specifically includes:
the category data includes: type, make, and model;
according to the type, the equipment and the model of the target internet of things equipment, matching library file names corresponding to the type, the brand and the model of the target internet of things equipment in an equipment model library; the device model library comprises device control events, device states and device attributes of the devices corresponding to the Internet of things by a plurality of hardware manufacturers, and names of library file names according to types, brands and models of the devices corresponding to the Internet of things by the plurality of hardware manufacturers;
according to the library file name, equipment control elements corresponding to the target Internet of things equipment are called in the equipment model library; wherein the device control element further comprises: device status.
In a specific embodiment, the human-computer interaction interface invokes a functional interface of the device control element to control event control, status display and attribute display of all devices;
device status: the device is off-line, in operation (lights: on/off, broadcast: play/idle, door: on/off/normally open/normally closed, etc.);
device control event: control code, equipment active up-feed, abnormal trigger event, (door: open/close/strong open/off-line);
device attributes: device control issuing parameters, door: on or off;
in a specific embodiment, the interaction of the service gateway with the internet of things device through the device control element only leaves the device code (device unique value) and the device control element, for example: device coding and device active upload status; device coding and device initiative, abnormal uploading event; device encoding and device attributes.
In a particular embodiment, device control events, states, attributes for a device may be located in a device model library based on type, make, and model.
Step 103: and determining a control instruction corresponding to the function selection operation according to the function selection operation through the equipment control event and the equipment attribute, and combining the control instruction and the equipment code to generate equipment control data.
In this embodiment, the determining, according to the function selecting operation, a control instruction corresponding to the function selecting operation according to the device control event and the device attribute specifically includes:
extracting and obtaining the equipment control event from the equipment control element;
according to the function selection operation, determining a control code corresponding to the function selection operation in the equipment control event, and determining a control parameter in the equipment attribute;
and combining the control code and the control parameter to generate a control instruction corresponding to the function selection operation.
In a specific embodiment, after the device control event in the device control element is acquired, the control purpose and the control function can be known, the control code is acquired, and the acquisition of the control parameter is performed based on the device attribute, so that the control instruction is generated by combining the control code and the control parameter.
Step 104: and transmitting the equipment control data to the target internet of things equipment through the object model so that the target internet of things equipment executes a corresponding control function according to the equipment control data.
In this embodiment, the transmitting the device control data to the target internet of things device through the object model specifically includes: and transmitting the equipment control data to the object model so that the object model transmits the equipment control data to the target internet of things equipment according to the equipment codes.
In this embodiment, after the transmitting the device control data to the target internet of things device, the method further includes:
responding to a display function executed by a user on a target internet of things device at a man-machine interaction interface, and receiving a device state and a device attribute transmitted by the target internet of things device through the object model;
updating the equipment state and the equipment attribute in the equipment control element according to the equipment state and the equipment attribute transmitted by the target internet of things equipment;
and transmitting the updated equipment state and equipment attribute in the equipment control element to the man-machine interaction interface so that the man-machine interaction interface displays according to the updated equipment state and equipment attribute.
In a specific embodiment, the internet of things device feeds back information such as a control result and a state result to the object model through the device access port, and the object model calls an interface corresponding to the service gateway subsystem according to the device code, and the service gateway stores the data.
In a specific embodiment, the function control display of the man-machine interaction interface is specifically: when the access equipment is queried, a three-element table (equipment control event, equipment attribute and equipment state) which is recorded in advance by a product can be matched in an equipment model library according to the brand, model and type of the equipment;
judging the selection of a user:
if the user selects the equipment control event, the man-machine interaction interface displays list data according to the control item returned by the service gateway, and only displays the control function of the target internet of things equipment control item;
if the user selects the equipment attribute, the man-machine interaction interface displays according to the equipment attribute returned by the service gateway;
and if the user selects the equipment state, the man-machine interaction interface displays according to the equipment state returned by the service gateway.
In a specific embodiment, the specific usage flow of the present application is specifically:
selecting a device icon corresponding to a certain Internet of things device in a device list in a man-machine interaction interface as a target Internet of things device by a user, and entering a target option (a device control event, a device attribute and a device state);
the man-machine interaction interface displays the content corresponding to the equipment control event options selected by the user, and executes the functions selected by the user: turning on a lamp;
the service gateway obtains the brand, type, model and equipment code of the target internet of things equipment through the object model;
the service gateway finds out a device control event corresponding to three elements of the target Internet of things device in the device model according to the brand, model and type of the device;
acquiring control codes and control parameters required by the control target Internet of things equipment based on the equipment control event and the equipment attribute;
the service gateway performs unified assembly on control codes, equipment codes and control parameters according to the structure of the equipment control event to obtain a control instruction;
and issuing a control instruction to the object model, and transmitting the uniformly assembled parameters to the target Internet of things equipment by the object model according to the equipment codes.
And the target internet of things equipment executes corresponding control.
The object model receives the type data and the device code of the target internet of things device, so that device control instructions are determined according to the type data and the device control events in the device control elements in the device model library, the device control data are generated by combining the device code, and the device control data are transmitted to the target internet of things device based on the object model to execute a control function, so that the control of the internet of things device is realized. According to the embodiment, the equipment is connected to the modeling, so that the overall development time of the system can be shortened, a common equipment control model is abstracted, the model is taken as a parameter to be transmitted in, and the custom development work of the service is reduced. The embodiment is beneficial to realizing unified management of the equipment, and the running result of the equipment can be seen in real time.
Example two
Referring to fig. 2, fig. 2 is a schematic structural diagram of a control device of an internet of things device according to an embodiment of the present invention, including: a data receiving module 201, a data matching module 202, a result generating module 203 and a device control module 204;
the data receiving module 201 is configured to receive, through an object model, category data and an equipment code of a target internet of things device in response to a function selection operation performed on the target internet of things device by a user at a human-computer interaction interface;
the data matching module 202 is configured to match, according to the type data, device control elements corresponding to the type data in a device model library; wherein the device control element includes: device control events and device attributes;
the result generating module 203 is configured to determine, according to the function selection operation, a control instruction corresponding to the function selection operation according to the device control event and the device attribute, and combine the control instruction and the device code to generate device control data;
the device control module 204 is configured to transmit the device control data to the target internet of things device through the object model, so that the target internet of things device executes a corresponding control function according to the device control data.
As an improvement of the above solution, before the receiving, by the object model, the category data and the device code of the target internet of things device, the method further includes:
receiving access information transmitted by the target internet of things equipment through an object model;
judging the access information;
if the access information is preset SDK data, judging that the access is successful, and receiving type data and equipment codes transmitted by the target Internet of things equipment through an object model;
if the access information is not the preset SDK data, judging that the access fails, and canceling the access of the target Internet of things equipment.
As an improvement of the foregoing solution, the data matching module 202 includes: library file matching unit and equipment control element retrieving unit;
the category data includes: type, make, and model;
the library file matching unit is used for matching library file names corresponding to the type, the brand and the model of the target internet of things device in the device model library according to the type, the device and the model of the target internet of things device; the device model library comprises device control events, device states and device attributes of the devices corresponding to the Internet of things by a plurality of hardware manufacturers, and names of library file names according to types, brands and models of the devices corresponding to the Internet of things by the plurality of hardware manufacturers;
the device control element calling unit is used for calling the device control element corresponding to the target internet of things device in the device model library according to the library file name; wherein the device control element further comprises: device status.
As an improvement of the above solution, the determining, according to the function selecting operation, a control instruction corresponding to the function selecting operation according to the device control event and the device attribute specifically includes:
extracting and obtaining the equipment control event from the equipment control element;
according to the function selection operation, determining a control code corresponding to the function selection operation in the equipment control event, and determining a control parameter in the equipment attribute;
and combining the control code and the control parameter to generate a control instruction corresponding to the function selection operation.
As an improvement of the above solution, the transmitting the device control data to the target internet of things device through the object model specifically includes: and transmitting the equipment control data to the object model so that the object model transmits the equipment control data to the target internet of things equipment according to the equipment codes.
As an improvement of the above solution, after the transmitting the device control data to the target internet of things device, the method further includes:
responding to a display function executed by a user on a target internet of things device at a man-machine interaction interface, and receiving a device state transmitted by the target internet of things device through the object model;
updating the equipment state in the equipment control element according to the equipment state transmitted by the target Internet of things equipment;
and transmitting the updated equipment state in the equipment control element to the man-machine interaction interface so that the man-machine interaction interface displays according to the updated equipment state.
As an improvement of the above scheme, the receiving, by the object model, the type data and the device code of the target internet of things device specifically includes: and receiving the type data and the equipment codes transmitted by the target Internet of things equipment through an object model according to a preset interaction format.
According to the method, the device and the system, the data receiving module responds to function selection operation of a user on the target internet of things device, the type data and the device codes of the target internet of things device are received through the object model, the data matching module obtains the control instruction of the target internet of things device based on the type data, the result generating module combines the control instruction and the device codes to generate device control data, and finally the device control data are transmitted to the target internet of things device through the object model through the device control module, so that function control of the target internet of things device is achieved. According to the method and the device, data transmission of different Internet of things devices is performed through the object model, and device control elements are acquired through the device model library, so that control of the different Internet of things devices is performed by combining the device control elements and the device codes, new control logic is created, control of the different Internet of things devices can be handled, and control efficiency of the Internet of things devices is improved.
Example III
Referring to fig. 3, fig. 3 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
A terminal device of this embodiment includes: a processor 301, a memory 302 and a computer program stored in said memory 302 and executable on said processor 301. The processor 301 executes the computer program to implement the steps in the embodiment of the control method of each of the above-mentioned devices of the internet of things, for example, all the steps of the control method of the devices of the internet of things shown in fig. 1. Alternatively, the processor may implement functions of each module in the above-described device embodiments when executing the computer program, for example: all modules of the control device of the internet of things equipment shown in fig. 2.
In addition, the embodiment of the invention also provides a computer readable storage medium, which comprises a stored computer program, wherein when the computer program runs, the equipment where the computer readable storage medium is controlled to execute the control method of the internet of things equipment according to any embodiment.
It will be appreciated by those skilled in the art that the schematic diagram is merely an example of a terminal device and does not constitute a limitation of the terminal device, and may include more or less components than illustrated, or may combine certain components, or different components, e.g., the terminal device may further include an input-output device, a network access device, a bus, etc.
The processor 301 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, and the processor 301 is a control center of the terminal device, and connects various parts of the entire terminal device using various interfaces and lines.
The memory 302 may be used to store the computer program and/or module, and the processor 301 may implement various functions of the terminal device by running or executing the computer program and/or module stored in the memory and invoking data stored in the memory 302. The memory 302 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
Wherein the terminal device integrated modules/units may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as stand alone products. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
It should be noted that the above-described apparatus embodiments are merely illustrative, and the units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the embodiment of the device provided by the invention, the connection relation between the modules represents that the modules have communication connection, and can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that changes and modifications may be made without departing from the principles of the invention, such changes and modifications are also intended to be within the scope of the invention.
Claims (10)
1. The control method of the Internet of things equipment is characterized by comprising the following steps of:
responding to a function selection operation executed by a user on a target internet of things device at a human-computer interaction interface, and receiving type data and device codes of the target internet of things device through an object model;
according to the type data, matching equipment control elements corresponding to the type data in an equipment model library; wherein the device control element includes: device control events and device attributes;
according to the function selection operation, determining a control instruction corresponding to the function selection operation through the equipment control event and the equipment attribute, and combining the control instruction and the equipment code to generate equipment control data;
and transmitting the equipment control data to the target internet of things equipment through the object model so that the target internet of things equipment executes a corresponding control function according to the equipment control data.
2. The method for controlling an internet of things device according to claim 1, further comprising, before the receiving, by the object model, the type data and the device code of the target internet of things device:
receiving access information transmitted by the target internet of things equipment through an object model;
judging the access information;
if the access information is preset SDK data, judging that the access is successful, and receiving type data and equipment codes transmitted by the target Internet of things equipment through an object model;
if the access information is not the preset SDK data, judging that the access fails, and canceling the access of the target Internet of things equipment.
3. The method for controlling the internet of things device according to claim 1, wherein the matching, in the device model library, the device control element corresponding to the type data according to the type data specifically includes:
the category data includes: type, make, and model;
according to the type, the equipment and the model of the target internet of things equipment, matching library file names corresponding to the type, the brand and the model of the target internet of things equipment in an equipment model library; the device model library comprises device control events, device states and device attributes of the devices corresponding to the Internet of things by a plurality of hardware manufacturers, and names of library file names according to types, brands and models of the devices corresponding to the Internet of things by the plurality of hardware manufacturers;
according to the library file name, equipment control elements corresponding to the target Internet of things equipment are called in the equipment model library; wherein the device control element further comprises: device status.
4. The control method of the internet of things device according to claim 3, wherein the determining, according to the function selection operation, a control instruction corresponding to the function selection operation according to the device control event and the device attribute specifically includes:
extracting and obtaining the equipment control event from the equipment control element;
according to the function selection operation, determining a control code corresponding to the function selection operation in the equipment control event, and determining a control parameter in the equipment attribute;
and combining the control code and the control parameter to generate a control instruction corresponding to the function selection operation.
5. The method for controlling an internet of things device according to claim 3, wherein the transmitting the device control data to the target internet of things device through the object model specifically includes: and transmitting the equipment control data to the object model so that the object model transmits the equipment control data to the target internet of things equipment according to the equipment codes.
6. The method for controlling an internet of things device according to claim 3, further comprising, after the transmitting the device control data to the target internet of things device through the object model:
responding to a display function executed by a user on a target internet of things device at a man-machine interaction interface, and receiving a device state transmitted by the target internet of things device through the object model;
updating the equipment state in the equipment control element according to the equipment state transmitted by the target Internet of things equipment;
and transmitting the updated equipment state in the equipment control element to the man-machine interaction interface so that the man-machine interaction interface displays according to the updated equipment state.
7. The method for controlling the internet of things device according to claim 2, wherein the receiving, by the object model, the type data and the device code of the target internet of things device is specifically: and receiving the type data and the equipment codes transmitted by the target Internet of things equipment through an object model according to a preset interaction format.
8. The utility model provides a controlling means of thing networking device which characterized in that includes: the device comprises a data receiving module, a data matching module, a result generating module and a device control module;
the data receiving module is used for responding to the function selection operation executed by a user on the target internet of things equipment at the man-machine interaction interface and receiving the type data and equipment codes of the target internet of things equipment through the object model;
the data matching module is used for matching equipment control elements corresponding to the type data in an equipment model library according to the type data; wherein the device control element includes: device control events and device attributes;
the result generation module is used for determining a control instruction corresponding to the function selection operation according to the function selection operation through the equipment control event and the equipment attribute, and combining the control instruction and the equipment code to generate equipment control data;
the device control module is used for transmitting the device control data to the target internet of things device through the object model so that the target internet of things device executes a corresponding control function according to the device control data.
9. A computer terminal device, characterized by comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing a control method of an internet of things device according to any one of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored computer program, wherein the computer program, when run, controls a device in which the computer readable storage medium is located to execute a method for controlling an internet of things device according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310037599.5A CN116055538A (en) | 2023-01-09 | 2023-01-09 | Control method and device of Internet of things equipment, terminal equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310037599.5A CN116055538A (en) | 2023-01-09 | 2023-01-09 | Control method and device of Internet of things equipment, terminal equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116055538A true CN116055538A (en) | 2023-05-02 |
Family
ID=86125168
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310037599.5A Pending CN116055538A (en) | 2023-01-09 | 2023-01-09 | Control method and device of Internet of things equipment, terminal equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116055538A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116300510A (en) * | 2023-05-11 | 2023-06-23 | 深圳开鸿数字产业发展有限公司 | Device control method, edge computing device, and storage medium |
-
2023
- 2023-01-09 CN CN202310037599.5A patent/CN116055538A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116300510A (en) * | 2023-05-11 | 2023-06-23 | 深圳开鸿数字产业发展有限公司 | Device control method, edge computing device, and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108667807B (en) | Protocol self-adaption method and system based on monitoring cloud platform and gateway | |
CN113348725B (en) | Device operation method, device, gateway, electronic device and computer readable medium | |
WO2020206693A1 (en) | Smart home scheduling method, apparatus and system, server and storage medium | |
WO2021008412A1 (en) | Control method and system for internet of things device | |
CN110247811A (en) | A kind of alarm method and relevant apparatus of internet of things equipment | |
CN111308944A (en) | Equipment control method and device | |
US20220052866A1 (en) | Smart home system control method and apparatus, electronic device | |
CN113039498B (en) | Method for commissioning field devices in an industrial system network | |
CN113168334A (en) | Data processing method and device, electronic equipment and readable storage medium | |
CN111130891A (en) | Server management device and method, electronic equipment and storage medium | |
CN108108285A (en) | Log processing method, device, storage medium and terminal device | |
US20150192922A1 (en) | Industrial control system and management device | |
CN111736938B (en) | Information display method and device, storage medium and electronic device | |
CN116055538A (en) | Control method and device of Internet of things equipment, terminal equipment and storage medium | |
CN112511390B (en) | Intelligent household appliance template scene generation method and device, storage medium and electronic device | |
CN114461294A (en) | Method for quickly constructing application service, computer device and storage medium | |
CN114531462B (en) | Data processing method and device for Internet of things device | |
CN112019409B (en) | Equipment distribution network processing method, equipment distribution network processing device and electronic equipment | |
CN113625586B (en) | Method and system for controlling intelligent home based on gateway | |
CN114327709A (en) | Control page generation method and device, intelligent device and storage medium | |
CN113608752A (en) | Method, system and device for installing intelligent network card system and readable storage medium | |
CN117135011B (en) | Method for adapting gateway to multiple cloud platforms based on MQTT communication and gateway system | |
CN111209613A (en) | Rapid design method and system of intelligent product | |
CN112770379A (en) | Power adjustment method and device, electronic equipment and storage medium | |
CN118012538B (en) | Automatic information calling method, system, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |