CN117519731A - Internet of things soft gateway deployment method, system, equipment and storage medium - Google Patents

Internet of things soft gateway deployment method, system, equipment and storage medium Download PDF

Info

Publication number
CN117519731A
CN117519731A CN202311426967.1A CN202311426967A CN117519731A CN 117519731 A CN117519731 A CN 117519731A CN 202311426967 A CN202311426967 A CN 202311426967A CN 117519731 A CN117519731 A CN 117519731A
Authority
CN
China
Prior art keywords
plug
preset
gateway
module
soft
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311426967.1A
Other languages
Chinese (zh)
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.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information 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 Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN202311426967.1A priority Critical patent/CN117519731A/en
Publication of CN117519731A publication Critical patent/CN117519731A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Abstract

The application discloses a soft gateway deployment method, a soft gateway deployment system, soft gateway deployment equipment and a storage medium of the Internet of things, relates to the field of access of equipment of the Internet of things, and comprises the following steps: determining delivery media of the individual plug-in modules according to scene requirements, packaging to generate plug-in installation packages, and placing the package installation packages into plug-in catalogues of the public assembly modules; operating an installation deployment program of the data base based on the deployment carrier, assembling a corresponding plug-in according to the plug-in installation package, and deploying the soft gateway as a system service; and starting the system service, scanning the plug-ins by using the data base to determine a target plug-in according to the current scene, and realizing the service corresponding to the system service based on the public component module and/or the individual plug-in module after the target plug-in is registered and loaded. The common module for realizing the general function and the plug-in module for realizing the protocol individuation function are designed, the selection of the plug-in module and the setting of the gateway can be carried out according to the needs, and the fragmentation problem caused by protocol customization and scene individuation is solved through the decoupling and combination modes of the modules.

Description

Internet of things soft gateway deployment method, system, equipment and storage medium
Technical Field
The invention relates to the technical field of Internet of things equipment access, in particular to an Internet of things soft gateway deployment method, system, equipment and storage medium.
Background
The internet of things (IoT, internet of things) is a network that extends and expands on the basis of the internet, and is a huge network formed by combining various information sensing devices with the network, so that the interconnection and intercommunication of people, machines and objects at any time and any place are realized. Although the Internet of things has entered a high-speed development period, the whole Internet of things still presents a fragmentation characteristic. Only a small range of devices can be associated with each other, achieving mutual recognition, interworking, interoperability, while in a larger range the devices remain isolated.
In order to realize the aim of enabling the Internet of things to transform and upgrade in different industries, the problem of fragmentation of the Internet of things is solved to a certain extent, and the gateway of the Internet of things is generated. The internet of things gateway serves as a bridge between different types of internet of things devices and connects them to a central data system or even the cloud, and data streams transmitted from edges, gateways to external networks (such as the cloud) involve aggregating, summarizing and synchronizing data. The internet of things device communicates with the internet of things gateway using Zigbee, Z-wave, bluetooth LE (Bluetooth Low Energy ) and other short range wireless technologies. Some internet of things devices also use Long Range Radio (LoRa), wiFi, LTE (Long Term Evolution, long term evolution technology), LTE-M (LTE-Machine-to-Machine) and other Long Range wireless technologies to communicate with the internet of things gateway. The internet of things gateway then connects the series of sensors to a Wide Area Network (WAN) or cloud through a fiber optic WAN (Wide Area Network ) or ethernet LAN (localarea network, local area network).
The gateway of the internet of things follows the same principle of bridging the communication of different technologies together. The bridge is established between the Internet of things sensor and the Internet. The gateway of the internet of things will collect all data, convert the protocol of the sensor and preprocess the data before sending it. Therefore, how to effectively solve the problem of fragmentation of the internet of things by using the gateway of the internet of things is a problem to be solved in the field.
Disclosure of Invention
In view of the above, the present invention aims to provide a method, a system, a device and a storage medium for deploying a soft gateway of an internet of things, which can select a plug-in module and set a gateway according to needs by designing a public module for realizing a general function and a plug-in module for realizing a protocol individuation function, and solve the fragmentation problem caused by protocol customization and scene individuation by means of decoupling and combination of the modules. The specific scheme is as follows:
in a first aspect, the present application provides a method for deploying a soft gateway of an internet of things, including:
determining a delivery medium corresponding to a preset individual plug-in module according to scene requirements, packaging the delivery medium to generate a plug-in installation package, and placing the plug-in installation package into a plug-in catalog of a preset public assembly module; the preset public component module is used for realizing the general function of the soft gateway system instance, and opening the general function to the preset personality plug-in module through a slot interface;
running an installation deployment program of a preset data base based on a preset deployment carrier, and assembling a corresponding plug-in according to the plug-in installation package based on the installation deployment program so as to deploy the soft gateway as a system service;
and starting the system service, scanning the plug-ins by using the preset data base to determine a target plug-in according to the current scene, and after registering and loading the target plug-ins, realizing the service corresponding to the system service based on the preset public assembly module and/or the preset personality plug-in module.
Optionally, the placing the plug-in installation package in a plug-in catalog of a preset public assembly module includes:
and determining a protocol cluster by using the preset personality plug-in module according to the scene requirement, and carrying out protocol analysis and protocol encapsulation according to the protocol cluster to realize the function corresponding to the slot interface of the preset public assembly module.
Optionally, the assembling the corresponding plug-in according to the plug-in installation package includes:
and assembling a transmission control protocol plug-in and/or a serial communication protocol plug-in according to the plug-in installation package so as to realize the instantiation of a transmission control protocol soft gateway and/or a serial communication protocol soft gateway supporting a corresponding protocol.
Optionally, the implementing the service corresponding to the system service based on the preset public component module and/or the preset personality plug-in module includes:
when the soft gateway is in a preset proxy mode, controlling the sub-equipment corresponding to the soft gateway to interact with a preset cloud respectively;
when the soft gateway is in a preset gateway mode, registering the soft gateway and the sub-equipment on a preset Internet of things platform, controlling the sub-equipment to interact with the preset cloud through the soft gateway, and maintaining life cycle events of the sub-equipment by using the soft gateway.
Optionally, the implementing the service corresponding to the system service based on the preset public component module and/or the preset personality plug-in module includes:
and switching the working mode of the soft gateway through a preset system configuration function interface of the soft gateway, and cleaning or storing data in the soft gateway before switching the working mode according to a preset data processing rule when the working mode is switched.
Optionally, when the soft gateway is in a preset proxy mode, controlling the sub-devices corresponding to the soft gateway to interact with a preset cloud respectively, including:
when the soft gateway is in a preset proxy mode, a first long connection is established between the sub-equipment and the preset internet of things platform by utilizing the soft gateway based on the configuration of the corresponding sub-equipment so as to control the sub-equipment to communicate with the preset cloud.
Optionally, when the soft gateway is in a preset gateway mode, registering the soft gateway and the sub-device on a preset internet of things platform, so as to control the sub-device to interact with the preset cloud through the soft gateway, including:
when the soft gateway is in a preset gateway mode, registering the soft gateway and the sub-equipment on a preset internet of things platform, establishing a second long connection with the internet of things platform through configuration of the soft gateway, and controlling the sub-equipment to interact with the preset cloud through the second long connection.
In a second aspect, the present application provides an internet of things soft gateway system, including:
the plug-in installation module is used for determining delivery media corresponding to a preset individual plug-in module according to scene requirements, packaging the delivery media to generate a plug-in installation package, and placing the plug-in installation package into a plug-in catalog of a preset public assembly module; the preset public component module is used for realizing the general function of the soft gateway system instance, and opening the general function to the preset personality plug-in module through a slot interface;
the gateway deployment module is used for running an installation deployment program of the preset data base based on a preset deployment carrier, and assembling a corresponding plug-in according to the plug-in installation package based on the installation deployment program so as to deploy the soft gateway as a system service;
the service implementation module is used for starting the system service, scanning the plug-in by utilizing the preset data base so as to determine a target plug-in according to the current scene, and implementing the service corresponding to the system service based on the preset public assembly module and/or the preset personality plug-in module after registering and loading the target plug-in.
In a third aspect, the present application provides an electronic device comprising a processor and a memory; the storage is used for storing a computer program, and the computer program is loaded and executed by the processor to realize the soft gateway deployment method of the Internet of things.
In a fourth aspect, the present application provides a computer readable storage medium for storing a computer program, where the computer program when executed by a processor implements the foregoing method for deploying soft gateways of the internet of things.
Determining a delivery medium corresponding to a preset individual plug-in module according to scene requirements, packaging the delivery medium to generate a plug-in installation package, and placing the plug-in installation package into a plug-in catalog of a preset public assembly module; the preset public component module is used for realizing the general function of the soft gateway system instance, and opening the general function to the preset personality plug-in module through a slot interface; running an installation deployment program of a preset data base based on a preset deployment carrier, and assembling a corresponding plug-in according to the plug-in installation package based on the installation deployment program so as to deploy the soft gateway as a system service; and starting the system service, scanning the plug-ins by using the preset data base to determine a target plug-in according to the current scene, and after registering and loading the target plug-ins, realizing the service corresponding to the system service based on the preset public assembly module and/or the preset personality plug-in module. Therefore, by designing the public module for realizing the general function and the plug-in module for realizing the protocol individuation function, the plug-in module can be selected and the gateway can be set according to the actually accessed equipment protocol and service application scene. Through decoupling and combination modes of the modules, the problem of fragmentation caused by protocol customization and scene individuality in the application of the Internet of things is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a deployment method of a soft gateway of the internet of things provided by the application;
fig. 2 is a schematic diagram of an internet of things soft gateway provided in the present application;
fig. 3 is a flowchart of an operation method of the soft gateway of the internet of things provided by the application;
fig. 4 is a flowchart of a deployment method of a soft gateway of the internet of things provided by the application;
fig. 5 is a block diagram of an electronic device provided in the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
At present, although the Internet of things has entered a high-speed development period, the whole Internet of things still presents a fragmentation characteristic, only a small range of equipment can be connected with each other to realize mutual recognition, intercommunication and interoperation, and in a larger range, the equipment is still isolated. By designing the public module for realizing the general function and the plug-in module for realizing the protocol individuation function, the plug-in module can be selected and the gateway mode can be set according to the actually accessed equipment protocol and service application scene. Through decoupling and combination modes of the modules, the problem of fragmentation caused by protocol customization and scene individuality in the application of the Internet of things is solved.
Referring to fig. 1, the embodiment of the invention discloses a deployment method of a soft gateway of the internet of things, which comprises the following steps:
s11, determining delivery media corresponding to a preset individual plug-in module according to scene requirements, packaging the delivery media to generate a plug-in installation package, and placing the plug-in installation package into a plug-in catalog of a preset public assembly module; the preset public component module is used for realizing the general function of the soft gateway system instance, and opening the general function to the preset personality plug-in module through a slot interface.
In this embodiment, firstly, a delivery medium corresponding to a preset individual plug-in module is determined according to a scene requirement, then, the delivery medium is packaged to generate a plug-in installation package, and the plug-in installation package is placed in a plug-in catalog of the preset public assembly module. It can be understood that the above-mentioned common component module is used for implementing the general function of the soft gateway system instance, and opening the general function to the preset personality plug-in module through the slot interface. As shown in fig. 2, the soft gateway system in this embodiment includes two modules, a common module for implementing a general function and a plug-in module for implementing a protocol personalization function, that is, a preset personality plug-in module. The common module opens its own capabilities to the plug-in modules by providing standard slot interfaces including, but not limited to, interface calls, function injection, function callbacks, data area sharing, message buses, etc.
In the embodiment, a corresponding plug-in package is selected according to the need and placed in a plug-in directory specified by a base package of a public module to perform medium combination, and in the process of placing a plug-in installation package in the plug-in directory of a preset public assembly module, a protocol cluster is determined by using the preset individual plug-in module according to scene requirements, and protocol analysis and protocol encapsulation are performed according to the protocol cluster, so that functions corresponding to slot interfaces of the preset public assembly module are realized. In this embodiment, a plug-in protocol architecture is adopted, and a plug-in module implements parsing and packaging of the protocols and implements a socket interface of a public module according to a specific protocol cluster (one plug-in module may correspond to a plurality of protocols with similar attributes, which are called a protocol cluster). Therefore, different plug-ins only concentrate on protocol clusters processed by the plug-ins, so that the plug-ins are small and attractive from the aspects of program development and user use, and the deployment process of the system is simplified.
And step S12, running an installation and deployment program of the preset data base based on a preset deployment carrier, and assembling a corresponding plug-in according to the plug-in installation package based on the installation and deployment program so as to deploy the soft gateway as a system service.
In this embodiment, an installation and deployment program of the preset data base may be run based on a preset deployment carrier, and corresponding plugins may be assembled according to the plugin installation package based on the installation and deployment program, so as to deploy the soft gateway as a system service. In particular, the tcp plug-in and/or the serial communication protocol plug-in may be assembled according to the plug-in installation package to implement instantiation of the tcp soft gateway and/or the serial communication protocol soft gateway supporting the corresponding protocol. As shown in fig. 2, a TCP (transmission control protocol) soft gateway having TCP parsing encapsulation capability may be instantiated when a TCP (Transmission Control Protocol) plug-in is assembled on a common module basis, and a Modbus soft gateway supporting the Modbus protocol may be instantiated when a Modbus plug-in is assembled. And after the media pack is placed on the deployment carrier, running an installation deployment program contained in the base pack, and deploying the soft gateway as a system service to complete system assembly. The embodiment can be assembled as required, is flexible to deploy, and saves the operation resources of the carrier.
And S13, starting the system service, scanning the plug-in by using the preset data base to determine a target plug-in according to the current scene, and after registering and loading the target plug-in, realizing the service corresponding to the system service based on the preset public component module and/or the preset personality plug-in module.
In this embodiment, after the system service is started, the plug-in is scanned by using the preset data base, so as to determine the target plug-in according to the current scene, and after the target plug-in is registered and loaded, the service corresponding to the system service is realized based on the preset public component module and/or the preset individual plug-in module. After the service is started successfully, the base scans the assembled plug-ins, completes the registration of the plug-ins and the loading of data according to the situation, starts to provide the service, and realizes the service operation.
According to the above technical solution, in the soft gateway system as shown in fig. 2, the following system functions may be included:
public module function: all soft gateway system examples have functions including system setting, end linking, local data caching and cloud data synchronization.
And (3) system setting: the method is mainly used for mode switching, factory setting can be restored, after factory restoration, data in an original setting mode can be cleared, the equipment needs to reset the working mode, and before the working mode is not set, the equipment cannot work.
Cloud linking: the gateway adopts the mode of MQTT (Message Queuing Telemetry Transport) protocol to link with the Internet of things platform, and almost all the Internet of things platforms support the MQTT protocol, so that the gateway can be adapted to most of Internet of things platforms or edge platforms. In proxy mode, each device uses a separate cloud link; in gateway mode, the entire gateway is only allowed to establish one cloud link, which is used by all devices.
Local data caching and cloud data synchronization: the local cache data comprises but is not limited to collected service data, information of sub-equipment from the sub-equipment, collection time and other data, cloud data synchronization comprises a synchronization result, a synchronization failure reason, whether failure data are retransmitted, a failure data follow-up operation (retransmitting or deleting after correction) and the like, and the specific settings are as follows:
(1) Caching strategy
(1) The period of data caching can be configured, and after the period exceeds the caching period, cached data is deleted;
(2) the default buffering period is one week, and the buffering period can be adjusted according to actual needs.
(2) Synchronization policy
After the gateway collects the sub-equipment data, the data is firstly cached locally in the gateway, and the data is synchronized with the cloud by using the corresponding cloud links according to whether the configuration is sent immediately or in batches at fixed time.
(3) Synchronizing post-processing policies
(1) After synchronization is successful, the cache data processing mode is configured in two modes: or continuously storing, and automatically deleting after the caching period expires; or deleted immediately after the synchronization is successful.
(2) After the synchronization fails, it is determined whether the failed data needs to be retransmitted, the number of retransmissions, and whether the failed data can be corrected.
Protocol personalization function: the function module customized according to the Internet of things equipment protocol under the gateway architecture comprises, but is not limited to, functions of product model, equipment management, control instruction issuing, equipment attribute setting and the like, and different protocols provide different functions.
Determining a delivery medium corresponding to a preset individual plug-in module according to scene requirements, packaging the delivery medium to generate a plug-in installation package, and placing the plug-in installation package into a plug-in catalog of a preset public assembly module; and running an installation deployment program of the preset data base based on the preset deployment carrier, and assembling the corresponding plugins according to the plugin installation package based on the installation deployment program so as to deploy the soft gateway as a system service. And starting system service, scanning plug-ins by using a preset data base, determining a target plug-in according to the current scene, and after registering and loading the target plug-ins, realizing service corresponding to the system service based on a preset public assembly module and/or a preset individual plug-in module. The embodiment designs a scene-based soft gateway design system of the Internet of things, which can generate the soft gateway of the Internet of things according to scene configuration, does not limit operation carrier conditions, operates in a system service mode, and specifically comprises the steps that a delivery medium is packed according to scene requirements to generate an installation package; after the installation and deployment are completed, the soft gateway dynamically generates services according to the loaded plug-in package; after the service is started, the base public module and the plug-in module jointly provide service to the outside. In this way, the soft gateway system in this embodiment may be generated according to the scene configuration combination, and may perform selection of the add-in module and setting of the gateway mode according to the device protocol and the service application scene that are actually accessed, and assemble and combine the public component module and the add-in module to generate the soft network deployment medium, so that the deployment physical carrier is not limited, and after the carrier deployment is successful, the soft network deployment medium exists in a service mode. Through decoupling and combination modes of the modules, the problem of fragmentation caused by protocol customization and scene individuality in the application of the Internet of things is solved.
Based on the above embodiment, the present application may perform the selection of the plug-in module and the setting of the gateway mode by designing the common module for implementing the general function and the plug-in module for implementing the protocol individuation function, and then the setting of the gateway mode and the switching process will be described in detail in this embodiment. Referring to fig. 3, the embodiment of the invention discloses a method for operating a soft gateway of the internet of things, which comprises the following steps:
and S21, when the soft gateway is in a preset proxy mode, controlling the sub-equipment corresponding to the soft gateway to interact with a preset cloud respectively.
In this embodiment, a dual-mode soft gateway system for internet of things is provided, which includes a proxy mode and a gateway mode, and can meet the requirements of various different numbers of devices and network traffic through mode switching.
When the soft gateway is in a preset proxy mode, the soft gateway is utilized to establish a first long connection between the sub-equipment and a preset internet of things platform based on the configuration of the corresponding sub-equipment so as to control the sub-equipment to communicate with a preset cloud. Each piece of sub-equipment in the proxy mode is used as an independent individual to interact with the cloud end, the soft gateway serves as a carrier for protocol conversion, registration on an Internet of things platform is not needed, and the platform does not know the existence of the gateway, namely the gateway is transparent. The gateway is transparent to the internet of things platform in the proxy mode, only the sub-equipment registers to the internet of things platform, the soft gateway establishes a long connection with the platform for each subordinate sub-equipment through respective configuration, and each sub-equipment communicates with the cloud and transmits through respective connection. Aiming at the up-down state of the sub-equipment, when the gateway detects that the sub-equipment is on line, the gateway is connected to an Internet of things platform through the configured cloud connection information of the sub-equipment, and the platform marks that the sub-equipment is on line; when the gateway detects that the sub-equipment is disconnected, the gateway disconnects the sub-equipment from the cloud because the disconnected platform automatically marks the sub-equipment to be disconnected.
The proxy mode is applicable to the following scenarios:
(1) The platform does not limit the number of the equipment to be connected, and because each piece of sub equipment needs to be connected with the platform, the online equipment connection quantity and the concurrency performance of the platform are required to be higher, so the lightweight internet of things platform deployed at the edge is very unfriendly.
(2) The number of devices under the gateway is not large, because the communication between the devices and the platform is proxied through the soft gateway, if the number of the devices is large, the hardware performance, such as the network performance, of the physical carrier where the soft gateway is located is required to be high.
(3) In a scene that the data interaction between the equipment and the platform is particularly frequent, each piece of sub equipment and the platform are connected independently, a high concurrency mechanism of the platform can be utilized more efficiently, and the data interaction between the equipment and the platform is realized through a plurality of channels.
And S22, registering the soft gateway and the sub-equipment in a preset internet of things platform when the soft gateway is in a preset gateway mode, controlling the sub-equipment to interact with the preset cloud through the soft gateway, and maintaining life cycle events of the sub-equipment by using the soft gateway.
In this embodiment, when the soft gateway is in the preset gateway mode, the soft gateway and the sub-device are registered in the preset internet of things platform, a second long connection is established with the internet of things platform through the configuration of the soft gateway, and the sub-device is controlled to interact with the preset cloud through the second long connection. It will be appreciated that in gateway mode, both the upper soft gateway and the child device need to register on the platform, and the lower soft gateway needs to maintain lifecycle events of the child device, such as the up-down status of the device. In gateway mode, both the gateway and the kid device are registered to the platform, and all data and events for all kid devices are synchronized by the gateway and platform.
In the gateway mode, the gateway establishes a long connection with the platform only through the configuration of the gateway, and interaction between all sub-devices subordinate to the gateway and the cloud is realized through the connection. After the gateway is started, whether the sub-equipment is connected or not, the gateway can be connected with the platform, and the gateway is online on the platform. In the mode, aiming at the online and offline states of the sub-equipment, when the gateway detects that the sub-equipment is online, sending a sub-equipment online message special for the platform to the platform through the established cloud connection information, informing the platform that a certain sub-equipment is online, and marking the sub-equipment online on the platform; when the gateway detects that the sub-equipment is disconnected, the gateway sends a sub-equipment offline message special for the platform again, and notifies the platform that a certain sub-equipment is offline, and the platform marks the sub-equipment offline.
The scene to which the gateway mode is applicable and the proxy mode are complementary, and the gateway mode is more applicable to scenes in which the number of sub-devices is large but the interaction data with the platform is not frequent; or a scenario in which the platform limits the number of connections that the device establishes; or even a scenario where the user needs to explicitly maintain the topology of the gateway and the kiosks.
Step S23, switching the working mode of the soft gateway through a preset system configuration function interface of the soft gateway, and cleaning or storing data in the soft gateway before switching the working mode according to a preset data processing rule when the working mode is switched.
In this embodiment, the working mode of the soft gateway may be switched through a preset system configuration function interface of the soft gateway, and when the working mode is switched, data in the soft gateway before the working mode is switched is cleaned or saved according to a preset data processing rule. The soft gateway provides a system configuration function interface, and performs one-key switching on the gateway mode, so that all data in the original mode can be selected to be cleaned during switching, and the original data can also be selected to be saved, and the soft gateway can automatically convert related data according to the difference of the two modes.
In the embodiment, when the soft gateway is in a preset proxy mode, the sub-equipment corresponding to the soft gateway is controlled to interact with a preset cloud respectively; when the soft gateway is in a preset gateway mode, registering the soft gateway and the sub-equipment on a preset internet of things platform, so as to interact with a preset cloud through the soft gateway control sub-equipment, and maintaining life cycle events of the sub-equipment by using the soft gateway. And the working mode of the soft gateway can be switched through the preset system configuration function interface of the soft gateway, and when the working mode is switched, the data in the soft gateway before the working mode is switched is cleaned or stored according to the preset data processing rule. The embodiment provides a scene dual-mode internet of things soft gateway in combination with the embodiment, and the soft gateway system of the embodiment can switch the working mode of the gateway by using an operation button through a console interface provided by a service in the running process. Each piece of sub-equipment in the proxy mode is used as an independent individual to interact with the cloud end, the soft gateway serves as a carrier for protocol conversion, registration on an Internet of things platform is not needed, and the platform does not know the existence of the gateway; in gateway mode, both the upper soft gateway and the child device need to register on the platform, and the lower soft gateway needs to maintain life cycle events of the child device, such as the up-down state of the device. Through the free setting switching of the two modes, various requirements of different equipment numbers and network flows of the gateway of the Internet of things when the equipment is accessed into an application scene can be met.
Referring to fig. 4, the embodiment of the application further discloses a soft gateway system of the internet of things, which includes:
the plug-in installation module 11 is used for determining delivery media corresponding to a preset individual plug-in module according to scene requirements, packaging the delivery media to generate a plug-in installation package, and placing the plug-in installation package into a plug-in catalog of a preset public assembly module; the preset public component module is used for realizing the general function of the soft gateway system instance, and opening the general function to the preset personality plug-in module through a slot interface;
the gateway deployment module 12 is configured to run an installation deployment program of a preset data base based on a preset deployment carrier, and assemble a corresponding plug-in according to the plug-in installation package based on the installation deployment program, so as to deploy the soft gateway as a system service;
and the service implementation module 13 is used for starting the system service, scanning the plug-in by utilizing the preset data base so as to determine a target plug-in according to the current scene, and implementing the service corresponding to the system service based on the preset public component module and/or the preset personality plug-in module after registering and loading the target plug-in.
According to the embodiment, the delivery medium corresponding to the preset individual plug-in module can be determined according to scene requirements, the delivery medium is packed to generate a plug-in installation package, and the plug-in installation package is placed in a plug-in catalog of the preset public assembly module; then, a gateway deployment module is utilized to run an installation deployment program of a preset data base based on a preset deployment carrier, and corresponding plug-ins are assembled according to plug-in installation packages based on the installation deployment program so as to deploy the soft gateway as system service; and starting system service through the service realization module, scanning plug-ins by using a preset data base to determine a target plug-in according to the current scene, and realizing the service corresponding to the system service based on a preset public assembly module and/or a preset individual plug-in module after registering and loading the target plug-in. Through the technical scheme, the common module for realizing the general function and the plug-in module for realizing the protocol individuation function can be designed, and the selection of the plug-in module and the setting of the gateway can be carried out according to the equipment protocol and the service application scene which are actually accessed, so that the problem of fragmentation caused by protocol customization and scene individuation in the application of the Internet of things is solved through the decoupling and combination modes of the modules.
In some embodiments, the card installation module 11 specifically includes:
and the protocol encapsulation unit is used for determining a protocol cluster according to the scene requirement by utilizing the preset personality plug-in module, and carrying out protocol analysis and protocol encapsulation according to the protocol cluster so as to realize the function corresponding to the slot interface of the preset public assembly module.
In some embodiments, the gateway deployment module 12 specifically includes:
and the plug-in assembly unit is used for assembling the transmission control protocol plug-in and/or the serial communication protocol plug-in according to the plug-in installation package so as to realize the instantiation of the transmission control protocol soft gateway and/or the serial communication protocol soft gateway supporting the corresponding protocol.
In some embodiments, the service implementation module 13 specifically includes:
the first interaction sub-module is used for controlling the sub-equipment corresponding to the soft gateway to interact with a preset cloud respectively when the soft gateway is in a preset proxy mode;
and the second interaction sub-module is used for registering the soft gateway and the sub-equipment in a preset internet of things platform when the soft gateway is in a preset gateway mode, controlling the sub-equipment to interact with the preset cloud through the soft gateway, and maintaining life cycle events of the sub-equipment by utilizing the soft gateway.
In some embodiments, the service implementation module 13 specifically includes:
the mode switching unit is used for switching the working mode of the soft gateway through a preset system configuration function interface of the soft gateway, and cleaning or storing data in the soft gateway before switching the working mode according to a preset data processing rule when the working mode is switched.
In some specific embodiments, the first interaction sub-module specifically includes:
and the first connection establishing unit is used for establishing a first long connection between the sub-equipment and the preset internet of things platform by utilizing the soft gateway based on the configuration of the corresponding sub-equipment when the soft gateway is in a preset proxy mode so as to control the sub-equipment to communicate with the preset cloud.
In some specific embodiments, the second interaction sub-module specifically includes:
and when the soft gateway is in a preset gateway mode, registering the soft gateway and the sub-equipment on a preset internet of things platform, establishing a second long connection with the internet of things platform through the configuration of the soft gateway, and controlling the sub-equipment to interact with the preset cloud through the second long connection.
Further, the embodiment of the present application further discloses an electronic device, and fig. 5 is a block diagram of the electronic device 20 according to an exemplary embodiment, where the content of the figure is not to be considered as any limitation on the scope of use of the present application.
Fig. 5 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, where the computer program is loaded and executed by the processor 21 to implement relevant steps in the method for deploying a soft gateway of the internet of things disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device 20 and computer programs 222, which may be Windows Server, netware, unix, linux, etc. The computer program 222 may further include a computer program capable of performing other specific tasks in addition to the computer program capable of performing the internet of things soft gateway deployment method performed by the electronic device 20 as disclosed in any of the foregoing embodiments.
Further, the application also discloses a computer readable storage medium for storing a computer program; the method for deploying the soft gateway of the Internet of things is disclosed, wherein the computer program is executed by a processor. For specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing has outlined the detailed description of the preferred embodiment of the present application, and the detailed description of the principles and embodiments of the present application has been provided herein by way of example only to facilitate the understanding of the method and core concepts of the present application; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. The method for deploying the soft gateway of the Internet of things is characterized by comprising the following steps of:
determining a delivery medium corresponding to a preset individual plug-in module according to scene requirements, packaging the delivery medium to generate a plug-in installation package, and placing the plug-in installation package into a plug-in catalog of a preset public assembly module; the preset public component module is used for realizing the general function of the soft gateway system instance, and opening the general function to the preset personality plug-in module through a slot interface;
running an installation deployment program of a preset data base based on a preset deployment carrier, and assembling a corresponding plug-in according to the plug-in installation package based on the installation deployment program so as to deploy the soft gateway as a system service;
and starting the system service, scanning the plug-ins by using the preset data base to determine a target plug-in according to the current scene, and after registering and loading the target plug-ins, realizing the service corresponding to the system service based on the preset public assembly module and/or the preset personality plug-in module.
2. The method for deploying the soft gateway of the internet of things according to claim 1, wherein the placing the plug-in installation package into the plug-in catalog of the preset public component module comprises:
and determining a protocol cluster by using the preset personality plug-in module according to the scene requirement, and carrying out protocol analysis and protocol encapsulation according to the protocol cluster to realize the function corresponding to the slot interface of the preset public assembly module.
3. The method for deploying the soft gateway of the internet of things according to claim 2, wherein the assembling the corresponding plugin according to the plugin installation package includes:
and assembling a transmission control protocol plug-in and/or a serial communication protocol plug-in according to the plug-in installation package so as to realize the instantiation of a transmission control protocol soft gateway and/or a serial communication protocol soft gateway supporting a corresponding protocol.
4. The method for deploying the soft gateway of the internet of things according to any one of claims 1 to 3, wherein the implementing the service corresponding to the system service based on the preset public component module and/or the preset personality plug-in module includes:
when the soft gateway is in a preset proxy mode, controlling the sub-equipment corresponding to the soft gateway to interact with a preset cloud respectively;
when the soft gateway is in a preset gateway mode, registering the soft gateway and the sub-equipment on a preset Internet of things platform, controlling the sub-equipment to interact with the preset cloud through the soft gateway, and maintaining life cycle events of the sub-equipment by using the soft gateway.
5. The method for deploying the soft gateway of the internet of things according to claim 4, wherein the implementing the service corresponding to the system service based on the preset public component module and/or the preset personality plug-in module comprises:
and switching the working mode of the soft gateway through a preset system configuration function interface of the soft gateway, and cleaning or storing data in the soft gateway before switching the working mode according to a preset data processing rule when the working mode is switched.
6. The method for deploying the soft gateway of the internet of things according to claim 4, wherein when the soft gateway is in a preset proxy mode, controlling the sub-devices corresponding to the soft gateway to interact with a preset cloud respectively comprises:
when the soft gateway is in a preset proxy mode, a first long connection is established between the sub-equipment and the preset internet of things platform by utilizing the soft gateway based on the configuration of the corresponding sub-equipment so as to control the sub-equipment to communicate with the preset cloud.
7. The method for deploying the soft gateway of the internet of things according to claim 4, wherein when the soft gateway is in a preset gateway mode, registering the soft gateway and the sub-device on a preset internet of things platform to control the sub-device to interact with the preset cloud through the soft gateway, comprises:
when the soft gateway is in a preset gateway mode, registering the soft gateway and the sub-equipment on a preset internet of things platform, establishing a second long connection with the internet of things platform through configuration of the soft gateway, and controlling the sub-equipment to interact with the preset cloud through the second long connection.
8. The soft gateway system of the Internet of things is characterized by comprising:
the plug-in installation module is used for determining delivery media corresponding to a preset individual plug-in module according to scene requirements, packaging the delivery media to generate a plug-in installation package, and placing the plug-in installation package into a plug-in catalog of a preset public assembly module; the preset public component module is used for realizing the general function of the soft gateway system instance, and opening the general function to the preset personality plug-in module through a slot interface;
the gateway deployment module is used for running an installation deployment program of the preset data base based on a preset deployment carrier, and assembling a corresponding plug-in according to the plug-in installation package based on the installation deployment program so as to deploy the soft gateway as a system service;
the service implementation module is used for starting the system service, scanning the plug-in by utilizing the preset data base so as to determine a target plug-in according to the current scene, and implementing the service corresponding to the system service based on the preset public assembly module and/or the preset personality plug-in module after registering and loading the target plug-in.
9. An electronic device comprising a processor and a memory; wherein the memory is for storing a computer program that is loaded and executed by the processor to implement the internet of things soft gateway deployment method of any of claims 1 to 7.
10. A computer readable storage medium for storing a computer program which when executed by a processor implements the internet of things soft gateway deployment method of any of claims 1 to 7.
CN202311426967.1A 2023-10-30 2023-10-30 Internet of things soft gateway deployment method, system, equipment and storage medium Pending CN117519731A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311426967.1A CN117519731A (en) 2023-10-30 2023-10-30 Internet of things soft gateway deployment method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311426967.1A CN117519731A (en) 2023-10-30 2023-10-30 Internet of things soft gateway deployment method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117519731A true CN117519731A (en) 2024-02-06

Family

ID=89746746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311426967.1A Pending CN117519731A (en) 2023-10-30 2023-10-30 Internet of things soft gateway deployment method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117519731A (en)

Similar Documents

Publication Publication Date Title
RU2269873C2 (en) Wireless initialization device
EP0786179B1 (en) Remote smart filtering communication management system
CN101677319A (en) Method, apparatus and system for service access on the basis of XMPP protocol
US10819659B2 (en) Direct replying actions in SDN switches
EP1830515A1 (en) A method for transferring the network management configuration information between the element management systems
WO2007058241A1 (en) (u)sim card in server mode, and communication method with client
KR20010049168A (en) Nomadic Translator or Router
US9426025B2 (en) Method and a controller device for configuring a software-defined network
KR20060092983A (en) Softrouter dynamic binding protocol
CN113301166A (en) Service calling method and device, storage medium and electronic device
CN103125141A (en) Aggregation of mobile broadband network interfaces
CN111682927A (en) Message synchronization method, device, equipment and medium based on MLAG environment
CN106878072B (en) Message transmission method and device
CN105871719A (en) Processing method and apparatus of routing status and/or policy information
CN111935017B (en) Cross-network application calling method and device and routing equipment
US7502868B2 (en) Automation equipment connected to a TCP/IP network
CN113132218B (en) Home gateway access method, device, system processor and storage medium
JP2003141002A (en) Url length conversion system and program
CN116724545A (en) Method, device and system for transmitting data packet
CN117519731A (en) Internet of things soft gateway deployment method, system, equipment and storage medium
CN101986647A (en) VRRP compatible method and device thereof
KR20170100638A (en) Managing resource links in the service layer
EP3125634A1 (en) Message transmission method and node device based on network selection and temporal arrangement
CN111414262B (en) Service calling method and device
Cisco Bridging and IBM Networking Configuration Guide Cisco IOS Release 11.3

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