CN112995348B - Control method, device and system of Internet of things equipment - Google Patents

Control method, device and system of Internet of things equipment Download PDF

Info

Publication number
CN112995348B
CN112995348B CN202110514551.XA CN202110514551A CN112995348B CN 112995348 B CN112995348 B CN 112995348B CN 202110514551 A CN202110514551 A CN 202110514551A CN 112995348 B CN112995348 B CN 112995348B
Authority
CN
China
Prior art keywords
plug
edge
internet
message
information
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.)
Active
Application number
CN202110514551.XA
Other languages
Chinese (zh)
Other versions
CN112995348A (en
Inventor
胡佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202110514551.XA priority Critical patent/CN112995348B/en
Publication of CN112995348A publication Critical patent/CN112995348A/en
Application granted granted Critical
Publication of CN112995348B publication Critical patent/CN112995348B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y40/00IoT characterised by the purpose of the information processing
    • G16Y40/30Control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network

Abstract

The invention discloses a control method, device and system of Internet of things equipment, and belongs to the field of cloud services. Wherein, the method comprises the following steps: receiving uplink and downlink messages of the Internet of things equipment; determining priority information of a plurality of edge plug-ins, wherein the plurality of edge plug-ins are configured on an edge server; and processing the uplink and downlink messages by adopting an information processing queue based on the priority information, wherein the information processing queue comprises a plurality of series nodes, and each edge plug-in corresponds to one series node in the information processing queue. The invention solves the technical problem of weak expansibility of the edge gateway in the related technology, and improves the expansibility and flexibility of the edge gateway.

Description

Control method, device and system of Internet of things equipment
Technical Field
The invention relates to the field of cloud services, in particular to a method, a device and a system for controlling Internet of things equipment.
Background
In the related art, with the continuous development of the internet of things in the field of smart home, the smart devices are beginning to go deep into each home, and the smart home devices in the market are roughly divided into two types, namely, ToC (user-oriented) and ToB (enterprise-oriented). ToC intelligent home is mainly provided with a series of devices such as Mijia or apple HomeKit, and the devices are generally characterized by easy deployment, simple functions and dependence on cloud services; ToB class equipment is just a class of equipment that develops gradually in recent years, and this type of equipment is for adapting to the demand of B terminal to the scene, often can use non-wifi communication protocol, and the integrated level is higher, and the function is more complicated, needs stronger message processing ability, and most need stride the equipment brand, even need with if other non-thing networking equipment such as security protection link, this type of equipment often needs higher privacy nature, some still need restrict to manage in the community, do not allow to use cloud. Because most of the intelligent home devices are low-power consumption devices, the complex requirements are difficult to realize, and therefore an edge gateway with higher computing power is introduced.
In the related art, the implementation of edge gateway software by each manufacturer of the internet of things is different due to different service fields: equipment manufacturers have own internet of things platforms or APP products, can customize and develop gateways in an embedded mode, and achieve cloud functions on the sub-equipment, wherein the cloud functions generally comprise internet of things communication protocol implementation, sub-equipment management and cloud communication. The client equipment manufacturer does not have an own Internet of things platform product or APP, can customize a pure offline gateway according to the needs of a customer, and performs equipment management in a factory pre-configuration mode. In the related technology, the edge gateway has a single function, only supports the self-owned splicing equipment or a small amount of other equipment, supports less communication protocols and is difficult to expand, can only be executed on customized hardware, has limited computing capability, cannot realize complex scenes, cannot adapt to data processing and equipment linkage of community-level equipment, gives insufficient attention to communication-level data safety, has potential safety hazards, is high in operation and maintenance cost, and does not support distributed operation and maintenance.
In view of the above problems in the related art, no effective solution has been found at present.
Disclosure of Invention
The embodiment of the invention provides a method, a device and a system for controlling Internet of things equipment.
According to an aspect of an embodiment of the present invention, there is provided a method for controlling an internet of things device, including: receiving uplink and downlink messages of the Internet of things equipment; determining priority information of a plurality of edge plug-ins, wherein the plurality of edge plug-ins are configured on an edge server; and processing the uplink and downlink messages by adopting an information processing queue based on the priority information, wherein the information processing queue comprises a plurality of series nodes, and each edge plug-in corresponds to one series node in the information processing queue.
Further, the method further comprises: monitoring equipment state information of the Internet of things equipment; and sending the equipment state information to a cloud server, wherein the cloud server is used for feeding back the equipment state information to a client according to a query request of the client, receiving a plug-in configuration request of the client and issuing configuration information to the edge server.
Further, processing the uplink and downlink messages by using an information processing queue based on the priority information comprises: processing a first uplink and downlink message by adopting a first information processing queue; responding to the scene demand information, and acquiring a target edge plug-in to be loaded; after the target edge plug-in passes the verification, suspending the message processing process of the first information processing queue, caching the unprocessed second uplink and downlink messages of the first information processing queue, and continuously processing the historical messages in the first information processing queue; loading the target edge plug-in the first information processing queue by adopting a plug-in engine, and adjusting the insertion position of the target edge plug-in the first information processing queue based on the preset priority of the target edge plug-in to generate a second information processing queue; and continuously processing the second uplink and downlink message and the newly received third uplink and downlink message based on the second information processing queue.
Further, the plurality of edge inserts includes: the system comprises at least two of a protocol processing plug-in, a message processing plug-in, a linkage processing plug-in, a data storage plug-in, an equipment driving plug-in, a system log plug-in, a system authentication plug-in and a scene perception plug-in, wherein the linkage processing plug-in is used for accessing the plurality of Internet of things equipment based on a uniform scene configuration template.
Further, the plurality of edge inserts includes: a protocol processing plug-in, a message processing plug-in, and a context aware plug-in, processing the uplink and downlink messages using an information processing queue based on the priority information includes: calling the protocol processing plug-in to analyze original state data of the Internet of things equipment to obtain target state data, wherein the uplink and downlink messages comprise the original state data; calling the message processing plug-in to extract key fields in the target state data; calling the scene perception plug-in to generate scene information of the Internet of things equipment based on the key field; wherein the priority information is used for indicating that the priority of the protocol processing plug-in is greater than that of the message processing plug-in, and the priority of the message processing plug-in is greater than that of the scene awareness plug-in.
Further, receiving uplink and downlink messages of the internet of things device comprises: receiving an event message from the Internet of things equipment, analyzing the event message and converting the event message into a scene message in a gateway standard format; judging whether the Internet of things equipment triggers a target scene or not based on the scene message according to a preset linkage template; if a target scene is triggered, generating a corresponding control instruction, and writing the scene message into a downlink message queue; and if the target scene is not triggered, storing the scene message into an uplink buffer queue.
Further, before receiving uplink and downlink messages of the internet of things device, the method further includes: configuring an edge basic component, an edge service component and an edge cloud component in the edge server; the edge basic component comprises first edge plug-ins of a plurality of general scenes, the edge service component comprises second edge plug-ins of a plurality of user-defined scenes, and the edge cloud component is used for communicating with a cloud server.
Further, the method further comprises at least one of: responding to a data request of first Internet of things equipment, acquiring authorization information of the first Internet of things equipment through a standard API (application program interface), and returning corresponding first equipment data to the first Internet of things equipment after the authorization information passes authentication; and receiving a subscription message published by second networked equipment, searching second equipment data matched with the subscription message, encapsulating the second equipment data in a subscription response message of the subscription message, and pushing the second equipment data to the second networked equipment, wherein the subscription message is used for subscribing specified subjects or specified types of equipment data to the edge server.
According to another aspect of the embodiments of the present invention, there is provided a control apparatus for an internet of things device, including: the receiving module is used for receiving uplink and downlink messages of the Internet of things equipment; a determining module, configured to determine priority information of a plurality of edge plug-ins, wherein the plurality of edge plug-ins are configured on an edge server; and the processing module is used for processing the uplink and downlink messages by adopting an information processing queue based on the priority information, wherein the information processing queue comprises a plurality of serial nodes, and each edge plug-in corresponds to one serial node in the information processing queue.
Further, the apparatus further comprises: the monitoring module is used for monitoring equipment state information of the Internet of things equipment; and the sending module is used for sending the equipment state information to a cloud server, wherein the cloud server is used for feeding back the equipment state information to the client according to a query request of the client, receiving a plug-in configuration request of the client and issuing configuration information to the edge server.
Further, the processing module includes: the first processing unit is used for processing the first uplink and downlink messages by adopting the first information processing queue; the acquisition unit is used for responding to the scene demand information and acquiring a target edge plug-in to be loaded; a suspending unit, configured to suspend the message processing process of the first information processing queue after the target edge plugin passes verification, cache a second uplink and downlink message that is not processed by the first information processing queue, and continue to process the historical message in the first information processing queue; an inserting unit, configured to load the target edge plugin in the first information processing queue by using a plugin engine, adjust an inserting position of the target edge plugin in the first information processing queue based on a preset priority of the target edge plugin, and generate a second information processing queue; and the second processing unit is used for continuously processing the second uplink and downlink message and a newly received third uplink and downlink message based on the second information processing queue.
Further, the plurality of edge inserts includes: the system comprises at least two of a protocol processing plug-in, a message processing plug-in, a linkage processing plug-in, a data storage plug-in, an equipment driving plug-in, a system log plug-in, a system authentication plug-in and a scene perception plug-in, wherein the linkage processing plug-in is used for accessing the plurality of Internet of things equipment based on a uniform scene configuration template.
Further, the plurality of edge inserts includes: a protocol processing plug-in, a message processing plug-in, and a context aware plug-in, the processing module comprising: the first calling unit is used for calling the protocol processing plug-in to analyze original state data of the Internet of things equipment to obtain target state data, wherein the uplink and downlink messages comprise the original state data; the second calling unit is used for calling the message processing plug-in to extract the key field in the target state data; the third calling unit is used for calling the scene perception plug-in to generate scene information of the Internet of things equipment based on the key field; wherein the priority information is used for indicating that the priority of the protocol processing plug-in is greater than that of the message processing plug-in, and the priority of the message processing plug-in is greater than that of the scene awareness plug-in.
Further, the receiving module includes: the receiving unit is used for receiving the event message from the Internet of things equipment, analyzing the event message and converting the event message into a scene message in a gateway standard format; the judging unit is used for judging whether the Internet of things equipment triggers a target scene or not based on the scene message according to a preset linkage template; the storage unit is used for generating a corresponding control instruction if a target scene is triggered, and writing the scene message into a downlink message queue; and if the target scene is not triggered, storing the scene message into an uplink buffer queue.
Further, the apparatus further comprises: the configuration module is used for configuring an edge basic component, an edge service component and an edge cloud component in the edge server before the receiving module receives uplink and downlink messages of the Internet of things equipment; the edge basic component comprises first edge plug-ins of a plurality of general scenes, the edge service component comprises second edge plug-ins of a plurality of user-defined scenes, and the edge cloud component is used for communicating with a cloud server.
Further, the apparatus further comprises at least one of: the return module is used for responding to a data request of first Internet of things equipment, acquiring authorization information of the first Internet of things equipment through a standard API (application program interface), and returning corresponding first equipment data to the first Internet of things equipment after the authorization information passes authentication; the pushing module is configured to receive a subscription message published by a second networked device, search for second device data matched with the subscription message, encapsulate the second device data in a subscription response message of the subscription message, and push the second device data to the second networked device, where the subscription message is used to subscribe to a specified topic or specified type of device data from the edge server.
According to another aspect of the embodiments of the present invention, there is provided a control system for an internet of things device, including: the Internet of things equipment is accessed to the edge server of the area to which the Internet of things equipment belongs; the edge server, with a plurality of thing networking device are connected, are configured with a plurality of edge plug-ins, include: the receiving module is used for receiving uplink and downlink messages of the Internet of things equipment; a determining module, configured to determine priority information of a plurality of edge plug-ins, wherein the plurality of edge plug-ins are configured on an edge server; and the processing module is used for processing the uplink and downlink messages by adopting an information processing queue based on the priority information, wherein the information processing queue comprises a plurality of serial nodes, and each edge plug-in corresponds to one serial node in the information processing queue.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium including a stored program which executes the above steps when the program is executed.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein: a memory for storing a computer program; a processor for executing the steps of the method by running the program stored in the memory.
Embodiments of the present invention also provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps of the above method.
According to the invention, the uplink and downlink messages of the Internet of things equipment are received, the priority information of a plurality of edge plug-ins is determined, the uplink and downlink messages are processed by adopting the information processing queue based on the priority information, a novel edge gateway framework is provided, the expansibility of an edge server is improved by plug-in configuration and the information processing mechanism of the information processing queue, more Internet of things application scenes can be adapted, the technical problem of weak expansibility of the edge gateway in the related technology is solved, and the expansibility and flexibility of the edge gateway are improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of an edge server according to an embodiment of the present invention;
fig. 2 is a flowchart of a control method of an internet of things device according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a network deployment of an embodiment of the present invention;
FIG. 4 is a logical architecture diagram of an edge server in an embodiment of the present invention;
fig. 5 is a block diagram of a control device of an internet of things device according to an embodiment of the present invention;
fig. 6 is a block diagram of a control system of an internet of things device according to an embodiment of the present invention;
fig. 7 is a block diagram of an electronic device implementing an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
The method provided by the first embodiment of the present invention may be executed in a computer, a server, or a similar gateway device. Taking an edge server as an example, fig. 1 is a block diagram of a hardware structure of an edge server according to an embodiment of the present invention. As shown in fig. 1, the server may include one or more (only one shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and is not intended to limit the structure of the server. For example, the server may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be configured to store a server program, for example, a software program and a module of application software, such as a server program corresponding to a control method of an internet of things device in an embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the server program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to a server over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the server. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
In this embodiment, a method for controlling an internet of things device is provided, and fig. 2 is a flowchart of a method for controlling an internet of things device according to an embodiment of the present invention, which is applied to an edge server, and as shown in fig. 2, the flowchart includes the following steps:
step S202, receiving uplink and downlink messages of the Internet of things equipment;
optionally, the internet of things device may access the edge server as a unit according to the communities, that is, an edge server is deployed in each community, and the edge server serves as an access gateway/edge gateway of the internet of things device, so as to implement distributed management of the internet of things device.
Step S204, determining the priority information of a plurality of edge plug-ins, wherein the plurality of edge plug-ins are configured on an edge server;
the edge plug-in of this embodiment is a plug-in applied to an edge server, and may be loaded and run in a system program of the edge server, and the edge plug-in may be automatically executed along with the start of the edge server, and the corresponding functional service may be interactively completed or independently completed based on an application program interface of the system program.
And step S206, processing the uplink and downlink messages by adopting an information processing queue based on the priority information, wherein the information processing queue comprises a plurality of serial nodes, and each edge plug-in corresponds to one serial node in the information processing queue.
The priority information corresponds to the sequence of processing the uplink and downlink messages by the edge plug-in, and the higher the priority is, the earlier the time sequence for processing the uplink and downlink messages is. The method comprises the steps of firstly sequencing a plurality of edge plug-ins based on priority information to generate an information processing queue, then sequentially processing uplink and downlink messages by adopting the information processing queue, wherein the first edge plug-in the queue processes the uplink and downlink messages, and the next edge plug-in continues to process intermediate data transmitted by the last edge plug-in the queue until the last edge plug-in the queue. Through the priority, the number of nodes of the information processing queue and the connection relation among the nodes can be configured, and the ordered transmission of the uplink and downlink messages in the edge server can be realized, so that the flexible configuration and expansion of the edge server are realized.
The message processing queue of the embodiment is a behavior mode of an object, so that a plurality of nodes (handlers) have an opportunity to process a message, a direct coupling relation between a sender (an internet of things device or an edge server) and a receiver (an edge server or an internet of things device) of the message is avoided, the nodes are connected in series into a chain, and the message is transmitted along the chain until one node processes the message. The information processing queue comprises each node and the series relation between every two adjacent nodes, and the sender and the receiver are decoupled by the information processing queue. The edge plug-in can be flexibly customized through a self-defined template or a unified template, and is increased, decreased or adapted according to a scene.
Through the steps, the uplink and downlink messages of the Internet of things equipment are received. The priority information of a plurality of edge plug-ins is determined, the information processing queue is adopted to process uplink and downlink information based on the priority information, a new edge gateway framework is provided, the expansibility of an edge server is improved through the plug-in configuration and the information processing mechanism of the information processing queue, more Internet of things application scenes can be adapted, the technical problem of weak expansibility of the edge gateway in the related technology is solved, and the expansibility and flexibility of the edge gateway are improved.
In one implementation of the embodiment, the scheme further comprises: monitoring equipment state information of the Internet of things equipment; and sending the equipment state information to a cloud server, wherein the cloud server is used for feeding back the equipment state information to the client according to the query request of the client, receiving a plug-in configuration request of the client and issuing the configuration information to an edge server.
In the embodiment, the cloud server is connected with the edge server through a pluggable component and is used for communicating with the edge server in an online state of the edge server and storing the equipment state information of the equipment of the internet of things; the client is connected with the cloud server and used for inquiring the equipment state information of the Internet of things equipment from the cloud server and issuing the configuration information to the edge server through the cloud server.
In another aspect of this embodiment, the edge server cannot communicate with the cloud server in the offline state, and offline management can be performed locally on the edge server, for example, device state information of the internet of things device is queried, configuration information of the edge server is issued, and the like, so that offline/online management is realized, the use is more flexible, and the scene is richer.
Optionally, the edge server needs to be initialized before running. The initialization process of the online state of the edge server comprises the following steps: through configuration API of the edge cloud, calling a system authentication plug-in to initialize an account number of an administrator, and calling a data storage plug-in to store the account number and a secret key encrypted by the administrator; starting an edge cloud, inputting gateway authentication information, executing a configuration synchronization instruction, and pulling configuration information of the edge server from a cloud server, wherein the configuration information comprises an object model of the Internet of things equipment authorized to be accessed, equipment authentication information and a configured scene configuration template; and after the operation is finished, the Internet of things equipment can be accessed to the gateway through a specified protocol. The initialization process of the offline state of the edge server comprises the following steps: and closing the edge cloud synchronization function, and finishing equipment initialization in a mode of manually uploading configuration files.
Fig. 3 is a schematic diagram of network deployment according to an embodiment of the present invention, including a cloud server, an edge server, an internet of things device, a client, and the like. The edge server is an edge gateway in the whole network, an administrator initializes the edge server and executes operation and maintenance management service in operation, a user can use the Internet of things equipment without sensing, the cloud server can be used for controlling the Internet of things equipment (the edge server needs to start a cloud synchronization function) through the APP. The deployment method may be direct installation and containerized deployment, and in an example of adopting containerized deployment, the edge server further configures cloud container cluster governance capability, such as deployment using k8s (kubernets) and cloud management modification.
In one embodiment of the embodiment, before determining the priority information of the plurality of edge plug-ins, the edge plug-ins further need to be configured in advance, and the registering and loading of the edge plug-ins in the edge server includes: storing a script file of the edge plug-in into a directory file by adopting a hot loading mode and modifying a configuration file of a plug-in manager so as to register the edge plug-in an edge server; after the edge plug-in registration is completed, the edge plug-in is loaded to enable the edge plug-in to be effective in the edge server.
The edge server respectively executes the steps by adopting a plug-in manager and a plug-in API (Application Programming Interface), wherein the plug-in manager stores the script file of the edge plug-in into a directory file in a hot loading mode and modifies the configuration file of the plug-in manager; and after the edge plug-in is registered in the plug-in manager, the plug-in API loads the edge plug-in, and the edge plug-in takes effect after the edge plug-in is loaded in the edge server.
In one embodiment of this embodiment, processing the uplink and downlink messages by using the information processing queue based on the priority information includes: processing a first uplink and downlink message by adopting a first information processing queue; responding to the scene demand information, and acquiring a target edge plug-in to be loaded; after the target edge plug-in passes the verification, suspending the message processing process of the first information processing queue, caching the unprocessed second uplink and downlink messages of the first information processing queue, and continuously processing the historical messages in the first information processing queue; loading a target edge plug-in the first information processing queue by adopting a plug-in engine, and adjusting the insertion position of the target edge plug-in the first information processing queue based on the preset priority of the target edge plug-in to generate a second information processing queue; and continuously processing the second uplink and downlink message and the newly received third uplink and downlink message based on the second information processing queue.
In one example, the first information processing queue includes three plug-ins, i.e., plug-in a, plug-in B, and plug-in C, which constitute the first information processing queue of plug-in a → plug-in B → plug-in C, and the message needs to be processed by plug-in D due to a scene requirement or a scene switch, after the script file of the plug-in D is verified, the processing progress of the first information processing queue is suspended, the plug-in a does not receive uplink and downlink messages, buffers the messages to be transmitted to the plug-in a, the uplink and downlink messages that have entered the plug-in a and are not transmitted from the plug-in C continue to be processed by the first information processing queue until the first information processing queue is empty, and the second information processing queue is obtained by inserting the priority information of the plug-in D, such as the lowest priority of the plug-in D, at the end of the first information processing queue, i.e., plug-in a → plug-in B → plug-in C → plug-in D, aiming at the second uplink and downlink messages which are cached before and the newly received third uplink and downlink messages, the second information processing queue is continuously adopted for processing, and by adopting the queue hot loading mode of the embodiment, when a scene changes, the information processing queue can be immediately and flexibly adjusted according to the real-time requirement of a service scene, so that the processing mode of the uplink and downlink messages is adjusted, meanwhile, the reliability of data is ensured, the data loss is prevented, and the flexible control and application of the edge server to the Internet of things equipment are realized. In addition to adding the edge plug-in, a certain plug-in the first information processing queue may be replaced, or a certain plug-in the first information processing queue may be deleted, so as to generate the second information processing queue.
In this embodiment, all edge plug-ins are developed according to a standard plug-in model, after the development is completed, the edge plug-ins are uploaded or plug-in scripts of the edge plug-ins are manually put into a preset directory file and a configuration file of a plug-in manager is modified, the plug-ins are registered, the newly registered edge plug-ins are added into an information processing queue, then a plug-in API is called to load the plug-ins to enable the plug-ins to take effect, and then the plug-in function can be started. The plurality of edge inserts includes: the system comprises at least two of a protocol processing plug-in, a message processing plug-in, a linkage processing plug-in, a data storage plug-in, an equipment driving plug-in, a system log plug-in, a system authentication plug-in and a scene perception plug-in, wherein the linkage processing plug-in is used for accessing a plurality of Internet of things equipment based on a uniform scene configuration template. By arranging the linkage processing plug-in based on the unified scene configuration template in the edge server, the current real-time scene of the Internet of things equipment can be identified in a unified message format, the equipment linkage capacity of cross brands, cross types and cross regions can be realized, and the application of the Internet of things equipment is greatly enriched.
Optionally, before receiving the uplink and downlink messages of the internet of things device, the method further includes: configuring an edge basic component, an edge service component and an edge cloud component in an edge server; the edge basic assembly comprises first edge plug-ins of a plurality of general scenes, the edge service assembly comprises second edge plug-ins of a plurality of user-defined scenes, and the edge cloud assembly is used for communicating with the cloud server.
Fig. 4 is a logical architecture diagram of an edge server according to an embodiment of the present invention, where the entire edge server is divided into three major components: edge Base component (Edge Base), Edge service component (Edge service), Edge cloud component (Edge cloud), which are described below:
the edge basic component is a basic module of the whole edge server and provides the expansion capability of the system, the plug-in manager based on hot loading can quickly expand the system function on the basis of the edge basic component and expand the capability of the edge server, and the edge basic component comprises the following edge plug-ins: the edge plug-ins with basic edge functions, such as a data storage plug-in, an equipment driving plug-in, a system log plug-in, a system authentication plug-in and the like, are internally realized by adopting an information processing queue, fixed priorities are configured in all scenes, each function is taken as a public abstraction and is provided for an upper layer service code where an edge service is located to be used, so that the selection of the information processing queue is conveniently realized by adjusting a bottom layer according to the performance of an actual deployment environment, for example, an SQLite embedded database is defaulted for the relational data storage of the data storage plug-in, and if the data storage plug-in is required to be deployed in a high-performance server or the data is required to be uniformly stored in a community, the database type of the data storage plug-in can be modified into a database matched with the storage environment or service requirements. The device driving plug-in is used for driving special hardware directly connected to the edge server, and opens executable operation serving as a standard interface to an upper-layer service through encapsulation; the system log plug-in is used for processing important operation and alarm content of the system and adopts a file storage mode for problem troubleshooting and auditing; the system authentication plug-in is used for the authentication of the edge server and is used for processing the user authority control related to operation and maintenance. All plugins in the edge base component can be invoked by the edge service component in the edge server.
The edge service component is a system service module and can comprise a protocol processing plug-in, a message processing plug-in, a scene perception plug-in and a linkage processing plug-in, a service engine connects all the plug-ins, the inside is realized by adopting an information processing queue, available plug-ins are registered and loaded in advance according to scenes and priority information is configured, data are transmitted from high to low according to the priority of all the edge plug-ins, the transmitted data comprise original input data and plug-in supplement data, and the protocol processing plug-in comprises two sub plug-ins of a data decoder and a data encoder and is used for processing uplink and downlink messages of equipment. The component is a core component of the edge server, and each edge plug-in the information processing queue can be freely expanded except for a default plug-in the edge basic component, so that customized message and data processing capacity is realized. The function of the edge plug-in is explained here: the device comprises a protocol processing plug-in for converting uplink and downlink messages into texts which can be identified by an edge server to obtain translated texts, a message processing plug-in for judging whether the translated texts are correct according to service requirements, a scene perception plug-in for judging whether the translated texts trigger linkage actions based on specific numerical values (such as flag bits) in the translated texts, and a linkage processing plug-in for controlling and executing the linkage actions.
The edge cloud component is a cloud client component of the edge server and is used for realizing communication between the edge server and a cloud platform (cloud server), for example, registering the edge server to the cloud platform, pulling the latest configuration from the cloud platform, monitoring the endpoint output of the cloud platform, caching the uplink message from the cloud platform, and safely transmitting the message to the client through the cloud platform. Optionally, the edge cloud component is a pluggable component, and can be closed through configuration, and after the edge cloud component is closed, the edge server can only locally manage. In addition, the component can also provide a standard management API, and the API can be used for configuring the edge server and managing functions of system configuration, plug-in, log, session and the like of the edge server through a self-contained or self-defined business system of the system.
In a linkage scenario of the present embodiment, the plurality of edge plug-ins includes: the protocol processing plug-in, the message processing plug-in and the scene perception plug-in, the processing of the uplink and downlink messages by the information processing queue based on the priority information comprises: calling a protocol processing plug-in to analyze original state data of the Internet of things equipment to obtain target state data, wherein uplink and downlink messages comprise the original state data; calling a message processing plug-in to extract key fields in the target state data; calling a scene perception plug-in to generate scene information of the Internet of things equipment based on the key field; the priority information is used for indicating that the priority of the protocol processing plug-in is greater than that of the message processing plug-in, and the priority of the message processing plug-in is greater than that of the scene perception plug-in.
In the internet of things (IoT), a scene represents a specific state, such as a light-on state or a light-off state, a door magnet is in an on state, an alarm is in an alarm state, and an action represents a behavior that can cause a device to enter a scene, or a state is switched, and turning on a light (action) causes the light to be in the on state (scene), and as a result, the action and the scene are the same, and in the IoT service, the action is the scene; the automatic change from the scene A to the scene B, the scene A is called a condition, the scene B is called an action, the condition has several sources, the first is data reported by equipment (also is a part with the largest source), the second is environmental data, such as temperature, humidity, weather, PM2.5, air quality, sunset and sunrise, and when a user selects a meteorological condition, the current city can be selected; the method comprises the following steps of firstly, setting a scene B as an action, and also as a condition, secondly, setting a timing task, timing or periodically triggering, and also comprises a plurality of types of actions, wherein the first type is equipment action, turning on a light or turning off the light; the third category is scenes, and the fourth category is delay, how long the delay triggers an action.
In an example based on the linkage scene, the internet of things device is a lamp, the protocol processing plug-in analyzes original state data (such as on-off state, voltage, current and the like) of the lamp to generate a digital signal, the message processing plug-in analyzes the digital signal, and flag bits (such as 0 and 1) and device identification information (such as Light 1 and Light living room) in the digital signal are extracted as scene information and stored in the edge plug-in.
The information processing queue is adopted to comb the messages and transmit the messages in sequence, so that the maturity and reliability of the whole Internet of things system can be guaranteed.
In one embodiment of the embodiment, the edge server is further connected with the cloud server and the client, after receiving a pull configuration instruction from the client, the cloud server acquires a corresponding message plaintext from the edge server, signs the message plaintext and signs load data to generate a response message in a JSON format, and issues the response message through a downlink Topic (Topic is a component in a kafka cluster, and Topic logically is a target sending destination which is physically a partition directory on a disk) subscribed by the client; the client sends the pull configuration instruction through the uplink channel, decrypts data from the response message by using a pre-configured key or certificate after receiving the response message, and performs signature verification to obtain a corresponding message plaintext to display to the user.
The client can send a pull configuration instruction through an uplink channel, the cloud server receives the instruction and then sends the instruction through downlink Topic subscribed by the client, the response message is transmitted in a JSON format, the message plaintext is signed and Payload is signed before transmission, the signature is carried out through an SHA1 algorithm, when the client receives the message, the client needs to decrypt data by using a pre-configured secret key or certificate, and signature verification is carried out, so that the message reliability is guaranteed. The transmission encryption is carried out between the cloud server and the client, so that the security is good, the secure link and the data encryption are supported, the reliable transmission of uplink and downlink messages is realized, and the security of the Internet of things is enhanced.
In this embodiment, the communication between the edge server and the cloud server is implemented by a publish-subscribe mechanism, the cloud server may be a kafka server, and when the edge server and the cloud server are connected, an SSL (Secure socket Layer)/SASL (Simple Authentication and encryption Layer) Authentication mechanism is used to ensure the communication Security and the device reliability.
In one implementation manner of the embodiment, receiving the uplink and downlink messages of the internet of things device includes: receiving an event message from the Internet of things equipment, analyzing the event message and converting the event message into a scene message in a gateway standard format; judging whether the Internet of things equipment triggers a target scene or not based on the scene message according to a preset linkage template; if the target scene is triggered, generating a corresponding control instruction, and writing the scene message into a downlink message queue; and if the target scene is not triggered, storing the scene message into an uplink buffer queue.
Optionally, if the target scene is triggered, the downlink message queue may be scanned, and the message in the downlink message queue is sent to the corresponding internet of things device; if the target scene is not triggered, the information in the uplink cache queue can be sent to the cloud server, and if the communication with the cloud server fails, the scene information is kept in the local cache and is continuously sent after the communication link between the edge server and the cloud server is recovered.
In the embodiment, the internet of things equipment establishes connection with the edge server, the internet of things equipment is accessed to the edge server after the equipment authentication, the edge server establishes session for the connection, when the state of the IOT equipment is changed, the event message is sent to the edge server, the edge server analyzes the message and converts the message into a gateway standard format and then transmits the gateway standard format to the linkage scene plug-in unit, the plug-in unit judges whether to trigger a target scene according to the linkage template, when triggered, generates corresponding control instruction to be written into the downstream message queue, the message encoder will scan the queue, and sends the message in the queue to the corresponding device, if not triggered, judges whether the cloud synchronization is started, if the communication fails, the message transmission module is reserved in the cache and continues to transmit after the communication with the cloud is recovered. In the process, the Endpoint records the message counter +1 and the message size, the processing time and other self-defined monitoring items, and finally records the log according to the log level. By adopting the message processing mode of the embodiment, a cache and log management mechanism is perfected in the edge server, and the message is ensured not to be lost.
Optionally, the edge server may use a secure link model such as SSL/TLS (secure Transport Layer protocol)/DTLS (data packet Transport Layer Security protocol), to provide link encryption, and use a symmetric encryption algorithm such as AES and DES to encrypt data to be transmitted, so as to ensure data Security between the internet of things device and the edge server.
In this embodiment, the edge server may further perform data interaction with the internet of things device, where the data interaction includes at least one of the following: responding to a data request of the first Internet of things equipment, acquiring authorization information of the first Internet of things equipment through a standard API (application program interface), and returning corresponding first equipment data to the first Internet of things equipment after the authorization information passes authentication; and receiving a subscription message published by the second networked device, searching second device data matched with the subscription message, encapsulating the second device data in a subscription response message of the subscription message, and pushing the second device data to the second networked device, wherein the subscription message is used for subscribing specified subjects or specified types of device data to the edge server.
Optionally, when data is exchanged between the edge server and the internet of things device, one of two data open modes may be used, one is to obtain device data from the internet of things device after being authorized through a standard API, the other is to open a Message subscription capability in the edge server, subscribe a response Message in the edge server using an authorized account, the edge server may actively push the response Message to the client, and the subscription mode is implemented by using MQTT (Message queue Telemetry Transport).
The embodiment realizes a universal edge gateway solution, and provides a universal adaptive solution for community-level edge gateways. The edge server and the cloud server can perform cloud edge coordination, can also independently run locally without depending on the cloud, and can realize local management through an API (application program interface) which is independently output. The method has the advantages that the plug-in model supporting the hot loading technology is adopted to register and load the edge plug-in, the management and the expansion of the plug-in function are realized, the information processing queue is used for processing the uplink and downlink information of the Internet of things equipment, and the plug-ins can be connected in series to form pipeline to realize the complex service function. The edge server can also perform format conversion on the internet of things message, unify the message according to a predefined model and convert the message into a scene message in a gateway standard format, and rich inter-device linkage effect can be realized by the built-in script-based linkage processing plug-in.
Through the above description of the embodiments, those skilled in the art can clearly understand that the system and method according to the above embodiments can be implemented by software plus necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
The embodiment also provides a control device and a control system for the internet of things device, which are used for implementing the foregoing embodiments and preferred embodiments, and are not described again after being described. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 5 is a block diagram of a control apparatus of an internet of things device according to an embodiment of the present invention, and as shown in fig. 5, the apparatus includes: a receiving module 50, a determining module 52, a processing module 54, wherein,
the receiving module 50 is configured to receive uplink and downlink messages of the internet of things device;
a determining module 52, configured to determine priority information of a plurality of edge plug-ins, where the plurality of edge plug-ins are configured on an edge server;
and a processing module 54, configured to process the uplink and downlink messages by using an information processing queue based on the priority information, where the information processing queue includes a plurality of serial nodes, and each edge plug-in corresponds to one serial node in the information processing queue.
Optionally, the apparatus further comprises: the monitoring module is used for monitoring equipment state information of the Internet of things equipment; and the sending module is used for sending the equipment state information to a cloud server, wherein the cloud server is used for feeding back the equipment state information to the client according to a query request of the client, receiving a plug-in configuration request of the client and issuing configuration information to the edge server.
Further, the processing module includes: the first processing unit is used for processing the first uplink and downlink messages by adopting the first information processing queue; the acquisition unit is used for responding to the scene demand information and acquiring a target edge plug-in to be loaded; a suspending unit, configured to suspend the message processing process of the first information processing queue after the target edge plugin passes verification, cache a second uplink and downlink message that is not processed by the first information processing queue, and continue to process the historical message in the first information processing queue; an inserting unit, configured to load the target edge plugin in the first information processing queue by using a plugin engine, adjust an inserting position of the target edge plugin in the first information processing queue based on a preset priority of the target edge plugin, and generate a second information processing queue; and the second processing unit is used for continuously processing the second uplink and downlink message and a newly received third uplink and downlink message based on the second information processing queue.
Further, the plurality of edge inserts includes: the system comprises at least two of a protocol processing plug-in, a message processing plug-in, a linkage processing plug-in, a data storage plug-in, an equipment driving plug-in, a system log plug-in, a system authentication plug-in and a scene perception plug-in, wherein the linkage processing plug-in is used for accessing the plurality of Internet of things equipment based on a uniform scene configuration template.
Further, the plurality of edge inserts includes: a protocol processing plug-in, a message processing plug-in, and a context aware plug-in, the processing module comprising: the first calling unit is used for calling the protocol processing plug-in to analyze original state data of the Internet of things equipment to obtain target state data, wherein the uplink and downlink messages comprise the original state data; the second calling unit is used for calling the message processing plug-in to extract the key field in the target state data; the third calling unit is used for calling the scene perception plug-in to generate scene information of the Internet of things equipment based on the key field; wherein the priority information is used for indicating that the priority of the protocol processing plug-in is greater than that of the message processing plug-in, and the priority of the message processing plug-in is greater than that of the scene awareness plug-in.
Further, the receiving module includes: the receiving unit is used for receiving the event message from the Internet of things equipment, analyzing the event message and converting the event message into a scene message in a gateway standard format; the judging unit is used for judging whether the Internet of things equipment triggers a target scene or not based on the scene message according to a preset linkage template; the storage unit is used for generating a corresponding control instruction if a target scene is triggered, and writing the scene message into a downlink message queue; and if the target scene is not triggered, storing the scene message into an uplink buffer queue.
Further, the apparatus further comprises: the configuration module is used for configuring an edge basic component, an edge service component and an edge cloud component in the edge server before the receiving module receives uplink and downlink messages of the Internet of things equipment; the edge basic component comprises first edge plug-ins of a plurality of general scenes, the edge service component comprises second edge plug-ins of a plurality of user-defined scenes, and the edge cloud component is used for communicating with a cloud server.
Further, the apparatus further comprises at least one of: the return module is used for responding to a data request of first Internet of things equipment, acquiring authorization information of the first Internet of things equipment through a standard API (application program interface), and returning corresponding first equipment data to the first Internet of things equipment after the authorization information passes authentication; the pushing module is configured to receive a subscription message published by a second networked device, search for second device data matched with the subscription message, encapsulate the second device data in a subscription response message of the subscription message, and push the second device data to the second networked device, where the subscription message is used to subscribe to a specified topic or specified type of device data from the edge server.
This embodiment also provides a control system of thing networking device, includes: a plurality of internet of things devices 60 accessing to an edge server 62 of the region; edge server 62, with a plurality of internet of things device connection, is configured with a plurality of edge plug-ins, includes: the receiving module is used for receiving uplink and downlink messages of the Internet of things equipment; a determining module, configured to determine priority information of a plurality of edge plug-ins, wherein the plurality of edge plug-ins are configured on an edge server; and the processing module is used for processing the uplink and downlink messages by adopting an information processing queue based on the priority information, wherein the information processing queue comprises a plurality of serial nodes, and each edge plug-in corresponds to one serial node in the information processing queue.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
Fig. 7 is a structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 7, the electronic device includes a processor 71, a communication interface 72, a memory 73, and a communication bus 74, where the processor 71, the communication interface 72, and the memory 73 complete communication with each other through the communication bus 74, and the memory 73 is used for storing a computer program; the processor 71, when executing the program stored in the memory 73, implements the following steps: receiving uplink and downlink messages of the Internet of things equipment; determining priority information of a plurality of edge plug-ins, wherein the plurality of edge plug-ins are configured on an edge server; and processing the uplink and downlink messages by adopting an information processing queue based on the priority information, wherein the information processing queue comprises a plurality of series nodes, and each edge plug-in corresponds to one series node in the information processing queue.
Further, the method further comprises: monitoring equipment state information of the Internet of things equipment; and sending the equipment state information to a cloud server, wherein the cloud server is used for feeding back the equipment state information to a client according to a query request of the client, receiving a plug-in configuration request of the client and issuing configuration information to the edge server.
Further, processing the uplink and downlink messages by using an information processing queue based on the priority information comprises: processing a first uplink and downlink message by adopting a first information processing queue; responding to the scene demand information, and acquiring a target edge plug-in to be loaded; after the target edge plug-in passes the verification, suspending the message processing process of the first information processing queue, caching the unprocessed second uplink and downlink messages of the first information processing queue, and continuously processing the historical messages in the first information processing queue; loading the target edge plug-in the first information processing queue by adopting a plug-in engine, and adjusting the insertion position of the target edge plug-in the first information processing queue based on the preset priority of the target edge plug-in to generate a second information processing queue; and continuously processing the second uplink and downlink message and the newly received third uplink and downlink message based on the second information processing queue.
Further, the plurality of edge inserts includes: the system comprises at least two of a protocol processing plug-in, a message processing plug-in, a linkage processing plug-in, a data storage plug-in, an equipment driving plug-in, a system log plug-in, a system authentication plug-in and a scene perception plug-in, wherein the linkage processing plug-in is used for accessing the plurality of Internet of things equipment based on a uniform scene configuration template.
Further, the plurality of edge inserts includes: a protocol processing plug-in, a message processing plug-in, and a context aware plug-in, processing the uplink and downlink messages using an information processing queue based on the priority information includes: calling the protocol processing plug-in to analyze original state data of the Internet of things equipment to obtain target state data, wherein the uplink and downlink messages comprise the original state data; calling the message processing plug-in to extract key fields in the target state data; calling the scene perception plug-in to generate scene information of the Internet of things equipment based on the key field; wherein the priority information is used for indicating that the priority of the protocol processing plug-in is greater than that of the message processing plug-in, and the priority of the message processing plug-in is greater than that of the scene awareness plug-in.
Further, receiving uplink and downlink messages of the internet of things device comprises: receiving an event message from the Internet of things equipment, analyzing the event message and converting the event message into a scene message in a gateway standard format; judging whether the Internet of things equipment triggers a target scene or not based on the scene message according to a preset linkage template; if a target scene is triggered, generating a corresponding control instruction, and writing the scene message into a downlink message queue; and if the target scene is not triggered, storing the scene message into an uplink buffer queue.
Further, before receiving uplink and downlink messages of the internet of things device, the method further includes: configuring an edge basic component, an edge service component and an edge cloud component in the edge server; the edge basic component comprises first edge plug-ins of a plurality of general scenes, the edge service component comprises second edge plug-ins of a plurality of user-defined scenes, and the edge cloud component is used for communicating with a cloud server.
Further, the method further comprises at least one of: responding to a data request of first Internet of things equipment, acquiring authorization information of the first Internet of things equipment through a standard API (application program interface), and returning corresponding first equipment data to the first Internet of things equipment after the authorization information passes authentication; and receiving a subscription message published by second networked equipment, searching second equipment data matched with the subscription message, encapsulating the second equipment data in a subscription response message of the subscription message, and pushing the second equipment data to the second networked equipment, wherein the subscription message is used for subscribing specified subjects or specified types of equipment data to the edge server.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment provided by the present application, a computer-readable storage medium is further provided, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is caused to execute the method for controlling an internet of things device according to any one of the foregoing embodiments.
In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the method for controlling an internet of things device as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (11)

1. A control method of Internet of things equipment is characterized by comprising the following steps:
receiving uplink and downlink messages of the Internet of things equipment;
determining priority information of a plurality of edge plug-ins, wherein the plurality of edge plug-ins are configured on an edge server;
processing the uplink and downlink messages by adopting an information processing queue based on the priority information, wherein the information processing queue comprises a plurality of serial nodes, and each edge plug-in corresponds to one serial node in the information processing queue;
wherein the method further comprises: monitoring equipment state information of the Internet of things equipment; and sending the equipment state information to a cloud server, wherein the cloud server is used for feeding back the equipment state information to a client according to a query request of the client, receiving a plug-in configuration request of the client and issuing configuration information to the edge server.
2. The method of claim 1, wherein processing the uplink and downlink messages with an information handling queue based on the priority information comprises:
processing a first uplink and downlink message by adopting a first information processing queue;
responding to the scene demand information, and acquiring a target edge plug-in to be loaded;
after the target edge plug-in passes the verification, suspending the message processing process of the first information processing queue, caching the unprocessed second uplink and downlink messages of the first information processing queue, and continuously processing the historical messages in the first information processing queue;
loading the target edge plug-in the first information processing queue by adopting a plug-in engine, and adjusting the insertion position of the target edge plug-in the first information processing queue based on the preset priority of the target edge plug-in to generate a second information processing queue;
and continuously processing the second uplink and downlink message and the newly received third uplink and downlink message based on the second information processing queue.
3. The method of claim 1, wherein the plurality of edge inserts comprises: the system comprises at least two of a protocol processing plug-in, a message processing plug-in, a linkage processing plug-in, a data storage plug-in, an equipment driving plug-in, a system log plug-in, a system authentication plug-in and a scene perception plug-in, wherein the linkage processing plug-in is used for accessing the Internet of things equipment based on a uniform scene configuration template.
4. The method of claim 1, wherein the plurality of edge inserts comprises: a protocol processing plug-in, a message processing plug-in, and a context aware plug-in, processing the uplink and downlink messages using an information processing queue based on the priority information includes:
calling the protocol processing plug-in to analyze original state data of the Internet of things equipment to obtain target state data, wherein the uplink and downlink messages comprise the original state data;
calling the message processing plug-in to extract key fields in the target state data;
calling the scene perception plug-in to generate scene information of the Internet of things equipment based on the key field;
wherein the priority information is used for indicating that the priority of the protocol processing plug-in is greater than that of the message processing plug-in, and the priority of the message processing plug-in is greater than that of the scene awareness plug-in.
5. The method of claim 1, wherein receiving uplink and downlink messages for an internet of things device comprises:
receiving an event message from the Internet of things equipment, analyzing the event message and converting the event message into a scene message in a gateway standard format;
judging whether the Internet of things equipment triggers a target scene or not based on the scene message according to a preset linkage template;
if a target scene is triggered, generating a corresponding control instruction, and writing the scene message into a downlink message queue; and if the target scene is not triggered, storing the scene message into an uplink buffer queue.
6. The method of claim 1, wherein before receiving the uplink and downlink messages of the internet of things device, the method further comprises:
configuring an edge basic component, an edge service component and an edge cloud component in the edge server; the edge basic component comprises first edge plug-ins of a plurality of general scenes, the edge service component comprises second edge plug-ins of a plurality of user-defined scenes, and the edge cloud component is used for communicating with a cloud server.
7. The method of claim 1, further comprising at least one of:
responding to a data request of first Internet of things equipment, acquiring authorization information of the first Internet of things equipment through a standard API (application program interface), and returning corresponding first equipment data to the first Internet of things equipment after the authorization information passes authentication;
and receiving a subscription message published by second networked equipment, searching second equipment data matched with the subscription message, encapsulating the second equipment data in a subscription response message of the subscription message, and pushing the second equipment data to the second networked equipment, wherein the subscription message is used for subscribing specified subjects or specified types of equipment data to the edge server.
8. The utility model provides a controlling means of thing networking device which characterized in that includes:
the receiving module is used for receiving uplink and downlink messages of the Internet of things equipment;
a determining module, configured to determine priority information of a plurality of edge plug-ins, wherein the plurality of edge plug-ins are configured on an edge server;
a processing module, configured to process the uplink and downlink messages by using an information processing queue based on the priority information, where the information processing queue includes multiple serial nodes, and each edge plug-in corresponds to one serial node in the information processing queue;
wherein the apparatus further comprises: the monitoring module is used for monitoring equipment state information of the Internet of things equipment; and the sending module is used for sending the equipment state information to a cloud server, wherein the cloud server is used for feeding back the equipment state information to the client according to a query request of the client, receiving a plug-in configuration request of the client and issuing configuration information to the edge server.
9. A control system of Internet of things equipment is characterized by comprising:
the Internet of things equipment is accessed to the edge server of the area to which the Internet of things equipment belongs;
the edge server, with a plurality of thing networking device are connected, are configured with a plurality of edge plug-ins, include:
the receiving module is used for receiving uplink and downlink messages of the Internet of things equipment;
a determining module, configured to determine priority information of a plurality of edge plug-ins, wherein the plurality of edge plug-ins are configured on an edge server;
a processing module, configured to process the uplink and downlink messages by using an information processing queue based on the priority information, where the information processing queue includes multiple serial nodes, and each edge plug-in corresponds to one serial node in the information processing queue;
wherein the edge server further comprises: the monitoring module is used for monitoring equipment state information of the Internet of things equipment; and the sending module is used for sending the equipment state information to a cloud server, wherein the cloud server is used for feeding back the equipment state information to the client according to a query request of the client, receiving a plug-in configuration request of the client and issuing configuration information to the edge server.
10. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program is operative to perform the method steps of any of the preceding claims 1-7.
11. An electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; wherein:
a memory for storing a computer program;
a processor for executing the method steps of any of claims 1-7 by executing a program stored on a memory.
CN202110514551.XA 2021-05-12 2021-05-12 Control method, device and system of Internet of things equipment Active CN112995348B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110514551.XA CN112995348B (en) 2021-05-12 2021-05-12 Control method, device and system of Internet of things equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110514551.XA CN112995348B (en) 2021-05-12 2021-05-12 Control method, device and system of Internet of things equipment

Publications (2)

Publication Number Publication Date
CN112995348A CN112995348A (en) 2021-06-18
CN112995348B true CN112995348B (en) 2021-09-07

Family

ID=76337561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110514551.XA Active CN112995348B (en) 2021-05-12 2021-05-12 Control method, device and system of Internet of things equipment

Country Status (1)

Country Link
CN (1) CN112995348B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113452772B (en) * 2021-06-24 2023-10-27 青岛海尔科技有限公司 Intelligent scene processing method and device, storage medium and electronic equipment
CN113542371B (en) * 2021-06-29 2022-05-17 西南大学 Resource scheduling method and system based on edge gateway
CN113176948B (en) * 2021-06-29 2022-08-05 深圳智造谷工业互联网创新中心有限公司 Edge gateway, edge computing system and configuration method thereof
CN113726579A (en) * 2021-09-02 2021-11-30 国网信息通信产业集团有限公司 Method and device for realizing power Internet of things communication protocol plug-in
CN113873042B (en) * 2021-10-11 2022-06-07 北京国信未来城市数字科技研究院有限公司 Edge intelligent controller and data processing method
CN113904924A (en) * 2021-10-19 2022-01-07 吴枚兰 Efficient operation and maintenance method for local area network system of Internet of things
CN114051030B (en) * 2021-11-11 2024-03-22 广东睿住智能科技有限公司 Communication method, communication device, intelligent community system and storage medium
CN114422618B (en) * 2021-12-31 2024-01-02 北京千方科技股份有限公司 Cloud-protogenesis-based IOT platform protocol adaptation method, device, equipment and medium
CN114531437B (en) * 2022-02-14 2023-02-17 镁佳(北京)科技有限公司 MQTT-based non-homologous uplink data processing method and device
CN115174295A (en) * 2022-05-30 2022-10-11 青岛海尔科技有限公司 Scene information synchronization method and device, storage medium and electronic device
CN115174603B (en) * 2022-07-06 2023-08-22 中国联合网络通信集团有限公司 NAS service system, implementation method, electronic equipment and storage medium
CN115208922B (en) * 2022-07-15 2023-11-03 鹿马智能科技(上海)有限公司 Hotel management system based on edge calculation
CN115378787A (en) * 2022-08-19 2022-11-22 深圳前海环融联易信息科技服务有限公司 Cloud edge cooperation-based equipment management method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025577A (en) * 2011-01-06 2011-04-20 西安电子科技大学 Network system of Internet of things and data processing method thereof
CN110825433A (en) * 2019-10-30 2020-02-21 电子科技大学 Design method of edge control equipment
CN112153095A (en) * 2019-06-28 2020-12-29 北京金山云网络技术有限公司 CDN function module operation method, operation device, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180351793A1 (en) * 2017-06-05 2018-12-06 Unisys Corporation System and method for providing secure and redundant communications and processing for a collection of internet of things (iot) devices
WO2019131398A1 (en) * 2017-12-28 2019-07-04 日本電気株式会社 IoT DEVICE CONTROL METHOD, RECORDING MEDIUM HAVING PROGRAM RECORDED THEREON, AND IoT NETWORK INFRASTRUCTURE SYSTEM
US20220138012A1 (en) * 2019-02-28 2022-05-05 Siemens Schweiz Ag Computing Resource Scheduling Method, Scheduler, Internet of Things System, and Computer Readable Medium
CN110809043B (en) * 2019-11-01 2023-08-11 腾讯云计算(北京)有限责任公司 Data processing method, device, equipment and storage medium based on Internet of things
CN112769938B (en) * 2021-01-12 2022-08-23 烽火通信科技股份有限公司 Kubernets cloud side communication system and method based on QUIC

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025577A (en) * 2011-01-06 2011-04-20 西安电子科技大学 Network system of Internet of things and data processing method thereof
CN112153095A (en) * 2019-06-28 2020-12-29 北京金山云网络技术有限公司 CDN function module operation method, operation device, electronic equipment and storage medium
CN110825433A (en) * 2019-10-30 2020-02-21 电子科技大学 Design method of edge control equipment

Also Published As

Publication number Publication date
CN112995348A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN112995348B (en) Control method, device and system of Internet of things equipment
CN105471686B (en) Terminal control method, device and system
CN109391500B (en) Configuration management method, device and equipment
US11184227B2 (en) Method and apparatus for updating configuration object
US9754096B2 (en) Update management
US10321311B2 (en) Bootstrap mechanism for endpoint devices
CN106790676B (en) Method and device for realizing subscription notification
KR100978336B1 (en) Remote access
US20100034386A1 (en) Device manager repository
US11399069B2 (en) Method and apparatus to implement a home computing cloud
CN116472592A (en) System and method for remote monitoring and control of electrochromic glazing
CN102332983A (en) Utilize broadband gateway that the method and system of energy management is provided in home network
WO2019134595A1 (en) Configuration system, client device, embedded device configuration method, and storage medium
CN112153088A (en) Control system for Internet of things equipment
CN106679095B (en) A kind of method, apparatus and intelligent air-conditioning system of interconnection access
WO2020168568A1 (en) Data processing method and apparatus, electronic device and readable storage medium
CN112423322B (en) Model information sending method, device, storage medium and electronic device
US10779141B2 (en) Device and method for a gateway for the consistent updating of the services of a home network
van der Westhuizen et al. Practical Comparison between COAP and MQTT-Sensor to Server level
KR102094041B1 (en) System having the Semantic Engine based on RDF Graph for Autonomous Interaction between IoT Devices in Real-Time
CN108989157B (en) Method and device for controlling intelligent equipment
US20220103634A1 (en) Device registration mechanism
WO2020253330A1 (en) Method and apparatus for customer premise equipment configuration management
CN114205178A (en) Equipment linkage method and device, storage medium and electronic equipment
EP4133694A1 (en) Method and apparatus to implement a home computing cloud

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
GR01 Patent grant
GR01 Patent grant