An Internet of Things soft gateway deployment method, system, device and storage medium

CN117519731BActive Publication Date: 2026-09-25SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311426967.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-30
Publication Date
2026-09-25
Estimated Expiration
2043-10-30

AI Technical Summary

Technical Problem

虽说已经进入高速发展期,但物联网整体仍呈现“碎片化”特征

Benefits of technology

[0029]本申请根据场景需求确定预设个性插件模块对应的交付介质,将所述交付介质进行打包生成插件安装包,并将所述插件安装包放置到预设公用组件模块的插件目录;所述预设公用组件模块用于实现软网关系统实例的通用功能,并通过插槽接口对所述预设个性插件模块开放所述通用功能;基于预设部署载体运行预设数据底座的安装部署程序,并基于所述安装部署程序根据所述插件安装包装配对应的插件,以将软网关部署为系统服务;启动所述系统服务,利用所述预设数据底座扫描所述插件,以根据当前场景确定目标插件,并在进行所述目标插件的注册和加载后,基于所述预设公用组件模块和/或所述预设个性插件模块实现所述系统服务对应的服务。这样一来,通过设计实现通用功能的公用模块及实现协议个性化功能的插件模块,可以根据实际接入的设备协议和业务应用场景,进行插件模块的选择及网关的设置。通过模块的解耦和组合方式,解决物联网应用中由于协议定制和场景个性引起的“碎片化”问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117519731B_ABST
    Figure CN117519731B_ABST
Patent Text Reader

Abstract

The application discloses an Internet of Things soft gateway deployment method, system, device and storage medium, relates to the Internet of Things device access field, and comprises the following steps: determining the delivery medium of a personalized plug-in module according to scene requirements, packing to generate a plug-in installation package, and placing the plug-in installation package into a plug-in directory of a public component module; running an installation and deployment program of a data base on a deployment carrier, and assembling a corresponding plug-in according to the plug-in installation package, so as to deploy the soft gateway as a system service; starting the system service, scanning the plug-in by using the data base to determine a target plug-in according to a current scene, and realizing the service corresponding to the system service based on the public component module and / or the personalized plug-in module after the target plug-in is registered and loaded. The public module for realizing general functions and the plug-in module for realizing protocol personalization functions can be selected and the gateway can be set according to needs, and the fragmentation problem caused by protocol customization and scene individuality can be solved through the decoupling and combination mode of the modules.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) device access technology, and in particular to an IoT soft gateway deployment method, system, device, and storage medium. Background Technology

[0002] The Internet of Things (IoT) is a network extending and expanding upon the internet, forming a vast network that combines various information sensing devices with the network to achieve interconnection and interoperability between people, machines, and things anytime, anywhere. Although it has entered a period of rapid development, the IoT as a whole still exhibits a "fragmented" characteristic. Only a small number of devices can connect to each other, achieving mutual recognition, interoperability, and interoperability, while on a larger scale, devices remain isolated.

[0003] To fulfill the mission of empowering the transformation and upgrading of various industries through the Internet of Things (IoT) and to address the fragmentation problem of IoT to some extent, IoT gateways have emerged. IoT gateways act as bridges between different types of IoT devices, connecting them to a central data system and even the cloud. The data flow from the edge, the gateway, to external networks (such as the cloud) involves data aggregation, summarization, and synchronization. IoT devices communicate with IoT gateways using short-range wireless technologies such as Zigbee, Z-wave, and Bluetooth Low Energy (Bluetooth LE). Some IoT devices also communicate with IoT gateways using long-range wireless technologies such as LoRa (Long Range Radio), WiFi, LTE (Long Term Evolution), and LTE-M (LTE-Machine-to-Machine). The IoT gateway then connects a series of sensors to the WAN or cloud via a fiber optic WAN (Wide Area Network) or Ethernet LAN (Local Area Network).

[0004] IoT gateways follow the same principle of bridging communication between different technologies. They establish a bridge between IoT sensors and the internet. The IoT gateway aggregates all data, converts sensor protocols, and preprocesses the data before transmission. Therefore, effectively addressing the fragmentation problem in the IoT field using IoT gateways is a challenge that needs to be solved. Summary of the Invention

[0005] In view of this, the purpose of this invention is to provide an IoT soft gateway deployment method, system, device, and storage medium. By designing common modules for general functions and plug-in modules for personalized protocol functions, the invention allows for the selection of plug-in modules and gateway configuration as needed. Through module decoupling and combination, it solves the fragmentation problem caused by protocol customization and scenario-specific requirements. The specific solution is as follows:

[0006] Firstly, this application provides a method for deploying an IoT soft gateway, including:

[0007] Based on scenario requirements, determine the delivery medium corresponding to the preset personalized plug-in module, package the delivery medium to generate a plug-in installation package, and place the plug-in installation package in the plug-in directory of the preset common component module; the preset common component module is used to implement the general functions of the soft gateway system instance, and exposes the general functions to the preset personalized plug-in module through the slot interface;

[0008] The installation and deployment program of the preset data base is run based on the preset deployment carrier, and the corresponding plugins are configured according to the plugin installation package based on the installation and deployment program to deploy the soft gateway as a system service.

[0009] The system service is started, and the plugins are scanned using the preset data base to determine the target plugins based on the current scenario. After registering and loading the target plugins, the system service is implemented based on the preset common component module and / or the preset personalized plugin module.

[0010] Optionally, the process of placing the plugin installation package into the plugin directory of the preset common component module includes:

[0011] The preset personalized plug-in module determines the protocol cluster according to the scenario requirements, and performs protocol parsing and encapsulation according to the protocol cluster to realize the function corresponding to the slot interface of the preset common component module.

[0012] Optionally, the step of configuring the corresponding plugin according to the plugin installation package includes:

[0013] The plugin installation package includes a transmission control protocol plugin and / or a serial communication protocol plugin to instantiate a transmission control protocol soft gateway and / or a serial communication protocol soft gateway that support the corresponding protocols.

[0014] Optionally, the step of implementing the system service based on the preset common component module and / or the preset personalized plug-in module includes:

[0015] When the soft gateway is in the preset proxy mode, it controls the corresponding sub-device of the soft gateway to interact with the preset cloud respectively;

[0016] When the soft gateway is in a preset gateway mode, the soft gateway and the sub-device are registered on a preset IoT platform so that the soft gateway can control the sub-device to interact with the preset cloud and maintain the lifecycle events of the sub-device.

[0017] Optionally, the step of implementing the system service based on the preset common component module and / or the preset personalized plug-in module includes:

[0018] The working mode of the soft gateway can be switched through the preset system configuration function interface of the soft gateway, and when switching the working mode, the data in the soft gateway before switching the working mode is cleaned or saved according to the preset data processing rules.

[0019] 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 includes:

[0020] When the soft gateway is in the preset proxy mode, it uses the soft gateway to establish a first long connection between the sub-device and the preset IoT platform based on the configuration of the corresponding sub-device, so as to control the sub-device to communicate with the preset cloud.

[0021] Optionally, when the soft gateway is in a preset gateway mode, registering the soft gateway and the sub-device on a preset IoT platform to control the sub-device to interact with the preset cloud through the soft gateway includes:

[0022] When the soft gateway is in a preset gateway mode, it registers the soft gateway and the sub-device on a preset IoT platform, establishes a second long connection with the IoT platform through the configuration of the soft gateway itself, and controls the sub-device to interact with the preset cloud through the second long connection.

[0023] Secondly, this application provides an Internet of Things (IoT) soft gateway system, comprising:

[0024] The plugin installation module is used to determine the delivery medium corresponding to the preset personalized plugin module according to the scenario requirements, package the delivery medium to generate a plugin installation package, and place the plugin installation package in the plugin directory of the preset common component module; the preset common component module is used to implement the general functions of the soft gateway system instance, and exposes the general functions to the preset personalized plugin module through the slot interface;

[0025] The gateway deployment module is used to run the installation and deployment program of the preset data base based on the preset deployment carrier, and to install the corresponding plugins according to the plugin installation package based on the installation and deployment program, so as to deploy the soft gateway as a system service.

[0026] The service implementation module is used to start the system service, scan the plugins using the preset data base to determine the target plugins according to the current scenario, and after registering and loading the target plugins, implement the service corresponding to the system service based on the preset common component module and / or the preset personalized plugin module.

[0027] Thirdly, this application provides an electronic device, which includes a processor and a memory; wherein the memory is used to store a computer program, which is loaded and executed by the processor to implement the aforementioned IoT soft gateway deployment method.

[0028] Fourthly, this application provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the aforementioned IoT soft gateway deployment method.

[0029] This application determines the delivery medium corresponding to the preset personalized plug-in module based on scenario requirements, packages the delivery medium into a plug-in installation package, and places the plug-in installation package in the plug-in directory of the preset common component module. The preset common component module is used to implement the general functions of the soft gateway system instance, and exposes the general functions to the preset personalized plug-in module through a slot interface. An installation and deployment program of a preset data base is run based on a preset deployment carrier, and the corresponding plug-in is configured according to the plug-in installation package based on the installation and deployment program to deploy the soft gateway as a system service. The system service is started, and the preset data base is used to scan the plug-in to determine the target plug-in based on the current scenario. After registering and loading the target plug-in, the service corresponding to the system service is implemented based on the preset common component module and / or the preset personalized plug-in module. In this way, by designing a common module that implements general functions and a plug-in module that implements protocol personalization functions, the selection of plug-in modules and the configuration of the gateway can be made according to the actual access device protocols and business application scenarios. Through the decoupling and combination of modules, the "fragmentation" problem caused by protocol customization and scenario personalization in IoT applications is solved. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0031] Figure 1 A flowchart of an IoT soft gateway deployment method provided in this application;

[0032] Figure 2 A schematic diagram of an IoT soft gateway provided in this application;

[0033] Figure 3 A flowchart of an IoT soft gateway operation method is provided in this application;

[0034] Figure 4 A flowchart of an IoT soft gateway deployment method provided in this application;

[0035] Figure 5 This application provides a structural diagram of an electronic device. Detailed Implementation

[0036] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0037] While the Internet of Things (IoT) has entered a period of rapid development, it still exhibits a fragmented characteristic. Only a small number of devices can connect to each other, achieving mutual recognition, interoperability, and communication, while on a larger scale, devices remain isolated. This application addresses this issue by designing a common module that implements general functions and a plug-in module that enables personalized protocol functionality. The plug-in module can be selected and the gateway mode configured based on the actual connected device protocols and business application scenarios. Through the decoupling and combination of modules, the fragmentation problem caused by protocol customization and scenario-specific requirements in IoT applications is resolved.

[0038] See Figure 1 As shown in the figure, an embodiment of the present invention discloses a method for deploying an Internet of Things (IoT) soft gateway, including:

[0039] Step S11: Determine the delivery medium corresponding to the preset personalized plug-in module according to the scenario requirements, package the delivery medium to generate a plug-in installation package, and place the plug-in installation package in the plug-in directory of the preset common component module; the preset common component module is used to implement the general functions of the soft gateway system instance, and opens the general functions to the preset personalized plug-in module through the slot interface.

[0040] In this embodiment, the delivery medium corresponding to the preset personalized plug-in module is first determined according to the scenario requirements. Then, the delivery medium is packaged to generate a plug-in installation package, and the plug-in installation package is placed in the plug-in directory of the preset common component module. It can be understood that the above-mentioned common component module is used to implement the general functions of the soft gateway system instance and exposes these general functions to the preset personalized plug-in module through a slot interface. For example... Figure 2 The configurable soft gateway shown in this embodiment includes two modules: a common module that implements general functions and a plug-in module that implements personalized protocol functions, i.e., a preset personalized plug-in module. The common module exposes its capabilities to the plug-in module by providing standard slot interfaces, which include, but are not limited to, interface calls, function injection, function callbacks, data area sharing, and message bus.

[0041] In this embodiment, the corresponding plug-in package is selected and placed into the plug-in directory specified in the base package of the common module for media combination. During the process of placing the plug-in installation package into the plug-in directory of the preset common component module, the preset personalized plug-in module determines the protocol cluster according to the scenario requirements, and performs protocol parsing and encapsulation based on the aforementioned protocol cluster to realize the function corresponding to the slot interface of the preset common component module. This embodiment adopts a plug-in protocol architecture. The plug-in module, based on the specific protocol cluster it corresponds to (one plug-in module can correspond to multiple protocols with similar attributes; these protocols with similar attributes are called a protocol cluster), performs protocol parsing and encapsulation, and implements the slot interface of the common module. In this way, different plug-ins focus only on the protocol cluster they handle, achieving a compact and elegant design from both program development and user experience perspectives, simplifying the system deployment process.

[0042] Step S12: Run the installation and deployment program of the preset data base based on the preset deployment carrier, and configure the corresponding plugin according to the plugin installation package based on the installation and deployment program to deploy the soft gateway as a system service.

[0043] In this embodiment, an installation and deployment program for a preset data base can be run based on a preset deployment carrier. Based on this program, corresponding plugins can be configured according to the plugin installation package to deploy the soft gateway as a system service. Specifically, a transmission control protocol plugin and / or a serial communication protocol plugin can be configured according to the plugin installation package to instantiate a transmission control protocol soft gateway and / or a serial communication protocol soft gateway that support the corresponding protocols. For example... Figure 2As shown, based on the common modules, a TCP protocol soft gateway with TCP parsing and encapsulation capabilities can be instantiated when a TCP (Transmission Control Protocol) plugin is installed, and a Modbus protocol-supporting soft gateway can be instantiated when a Modbus plugin is installed. By placing the media package onto the deployment carrier and running the installation and deployment program included in the base package, the soft gateway is deployed as a system service, completing the system installation. This embodiment allows for on-demand installation, flexible deployment, and saves carrier runtime resources.

[0044] Step S13: Start the system service, use the preset data base to scan the plugins, determine the target plugins according to the current scenario, and after registering and loading the target plugins, implement the services corresponding to the system service based on the preset common component modules and / or the preset personalized plugin modules.

[0045] In this embodiment, after the system service is started, a preset data base scan plugin is used to determine the target plugin based on the current scenario. After registering and loading the target plugin, the system service is implemented based on preset common component modules and / or preset personalized plugin modules. After the service is successfully started, the base scans the installed plugins, completes the plugin registration and data loading as needed, and begins providing services to achieve service operation.

[0046] According to the above technical solution, such as Figure 2 The software gateway system shown may include the following system functions:

[0047] Common module functions: Functions that all software gateway system instances have, including system settings, endpoint connections, local data caching, and cloud data synchronization.

[0048] System Settings: Primarily used for mode switching and factory reset. After a factory reset, the data in the original settings mode will be cleared, and the device will need to be reset to a new working mode. The device will not work until the working mode is reset.

[0049] Cloud connectivity: This gateway uses the MQTT (Message Queuing Telemetry Transport) protocol to connect with IoT platforms. Almost all IoT platforms support MQTT, so this gateway is compatible with the vast majority of IoT and edge platforms. In agent mode, each device uses a separate cloud connection; in gateway mode, only one cloud connection is allowed for the entire gateway, and all devices use this single connection.

[0050] Local data caching and cloud data synchronization: Locally cached data includes, but is not limited to, collected business data, information from sub-devices, and collection time. Cloud data synchronization includes the synchronization results, reasons for synchronization failures, whether failed data should be resent, and subsequent operations on failed data (correction and resending or deletion). Specific settings are as follows:

[0051] (1) Caching strategy

[0052] ① The data caching period can be configured. After the caching period is exceeded, the cached data will be deleted.

[0053] ②The default cache period is one week, which can be adjusted according to actual needs.

[0054] (2) Synchronization Strategy

[0055] After the gateway collects data from the sub-devices, it first caches the data locally on the gateway. Depending on the configuration, it sends the data immediately or in batches at scheduled intervals, and then uses the corresponding cloud link to synchronize the data with the cloud.

[0056] (3) Synchronous subsequent processing strategy

[0057] ① After successful synchronization, the cached data processing method can be configured in two ways: either continue to save it and automatically delete it after the cache period expires; or delete it immediately after successful synchronization.

[0058] ② After synchronization fails, determine whether the failed data needs to be resent, the number of resentments, and whether the failed data can be corrected.

[0059] Protocol customization features: These refer to the functional modules customized according to the IoT device protocols under the gateway architecture, including but not limited to product models, device management, control command issuance, device attribute settings, etc. Different protocols provide different features.

[0060] This embodiment determines the delivery medium corresponding to the preset personalized plug-in module based on scenario requirements, packages the delivery medium into a plug-in installation package, and places the plug-in installation package into the plug-in directory of the preset common component module. Based on the preset deployment carrier, the installation and deployment program of the preset data base runs, and the corresponding plug-in is configured according to the plug-in installation package to deploy the soft gateway as a system service. The system service is started, and the preset data base scans for plug-ins to determine the target plug-in based on the current scenario. After registering and loading the target plug-in, the system service is implemented based on the preset common component module and / or the preset personalized plug-in module. This embodiment designs a scenario-based IoT soft gateway design system that can generate IoT soft gateways according to scenario configuration, without limiting the running carrier conditions, and runs as a system service. Specifically, this includes packaging the delivery medium into an installation package according to scenario requirements; after installation and deployment, the soft gateway dynamically generates services based on the loaded plug-in package; after service startup, the base common module and plug-in module jointly provide services externally. In this way, the soft gateway system in this embodiment can be configured and generated according to the scenario. It can select plug-in modules and set gateway modes based on the actual connected device protocols and business application scenarios, assembling and combining common component modules and plug-in modules to generate a soft network deployment medium. There are no restrictions on the physical carrier for deployment, and after successful deployment, it exists as a service. Through the decoupling and combination of modules, the "fragmentation" problem caused by protocol customization and scenario individuality in IoT applications is solved.

[0061] As can be seen from the previous embodiment, this application can select plug-in modules and set gateway modes by designing common modules that implement general functions and plug-in modules that implement personalized protocol functions. Next, this embodiment will describe in detail the setting and switching process of the gateway mode. See [link to previous embodiment]. Figure 3 As shown, this embodiment of the invention discloses an IoT soft gateway operation method, including:

[0062] Step S21: When the soft gateway is in the preset proxy mode, control the sub-devices corresponding to the soft gateway to interact with the preset cloud respectively.

[0063] This embodiment proposes a dual-mode IoT soft gateway system, including agent mode and gateway mode, which can meet the needs of various numbers of devices and network traffic by switching modes.

[0064] When the soft gateway is in preset proxy mode, it establishes a first long connection between the sub-device and the preset IoT platform based on the configuration of the corresponding sub-device, thereby controlling the sub-device's communication with the preset cloud. In proxy mode, each sub-device interacts with the cloud as an independent entity, and the soft gateway acts as a protocol conversion carrier. It does not need to register on the IoT platform, and the platform is unaware of the gateway's existence; that is, the gateway is transparent. In proxy mode, the gateway is transparent to the IoT platform. Only when the sub-device registers with the IoT platform does the soft gateway establish a long connection between each of its subordinate sub-devices and the platform through its own configuration. Communication between each sub-device and the cloud is transmitted through its own connection. Regarding the online / offline status of a sub-device, when the gateway detects that a sub-device is online, it connects to the IoT platform through the configured cloud connection information of that sub-device, and the platform marks the sub-device as online. When the gateway detects that a sub-device is offline, it disconnects the sub-device from the cloud, and the platform automatically marks the sub-device as offline.

[0065] The proxy pattern is suitable for the following scenarios:

[0066] (1) The platform does not limit the number of connections established by the devices. Since each sub-device must establish a connection with the platform, it places higher demands on the number of online device connections and concurrent performance of the platform. Therefore, it is very unfriendly to lightweight IoT platforms deployed at the edge.

[0067] (2) In scenarios where there are not many devices under the gateway, the communication between the devices and the platform is proxied through the soft gateway. If there are many devices, the hardware performance of the physical carrier where the soft gateway is located, such as network performance, is required to be high.

[0068] (3) In scenarios where the device and the platform interact with data very frequently, each sub-device establishes a separate connection with the platform, which can make more efficient use of the platform's high concurrency mechanism and enable multiple channels to interact with the device and the platform concurrently.

[0069] Step S22: When the soft gateway is in a preset gateway mode, register the soft gateway and the sub-device on a preset IoT platform so that the soft gateway can control the sub-device to interact with the preset cloud and use the soft gateway to maintain the lifecycle events of the sub-device.

[0070] In this embodiment, when the soft gateway is in a preset gateway mode, it registers both the soft gateway and its sub-devices on a preset IoT platform. The soft gateway establishes a second long connection with the IoT platform through its own configuration and controls the sub-devices to interact with the preset cloud via this second long connection. It is understood that in gateway mode, both the soft gateway and sub-devices need to register on the platform, and the soft gateway needs to maintain the lifecycle events of the sub-devices, such as their online / offline status. In gateway mode, both the gateway and sub-devices are registered with the platform, and all data and events from all sub-devices are synchronized between the gateway and the platform.

[0071] In gateway mode, the gateway establishes a persistent connection with the platform solely through its own configuration. All interactions between the gateway's subordinate devices and the cloud are achieved through this connection. Once the gateway starts, it establishes a connection with the platform regardless of whether a sub-device is present or connected, and the gateway becomes online on the platform. In this mode, regarding the online / offline status of sub-devices, when the gateway detects a sub-device online, it sends a platform-specific sub-device online message to the platform using the established cloud connection information, notifying the platform that a sub-device is online, and the platform marks the sub-device as online. When the gateway detects a sub-device offline, it sends a platform-specific sub-device offline message to the platform, notifying the platform that a sub-device is offline, and the platform marks the sub-device as offline.

[0072] Gateway mode is complementary to proxy mode in terms of applicable scenarios. It is more suitable for scenarios with a large number of sub-devices but infrequent data interaction with the platform; scenarios where the platform limits the number of connections that devices can establish; or scenarios where users need to explicitly maintain the topology relationship between the gateway and sub-devices.

[0073] Step S23: Switch the working mode of the soft gateway through the preset system configuration function interface of the soft gateway, and when switching the working mode, clean up or save the data in the soft gateway before switching the working mode according to the preset data processing rules.

[0074] In this embodiment, the working mode of the soft gateway can be switched through the preset system configuration function interface of the soft gateway. When switching working modes, the data in the soft gateway before the switch is cleaned or saved according to preset data processing rules. The soft gateway provides a system configuration function interface to switch the gateway mode with one click. When switching, you can choose to clean up all data in the original mode or save the original data. The soft gateway will automatically convert the relevant data according to the difference between the two modes.

[0075] In this embodiment, when the soft gateway is in a preset proxy mode, it controls the corresponding sub-devices to interact with a preset cloud. When the soft gateway is in a preset gateway mode, it registers the soft gateway and the sub-devices on a preset IoT platform to control the sub-devices to interact with the preset cloud and maintain the lifecycle events of the sub-devices. Furthermore, the working mode of the soft gateway can be switched through its preset system configuration interface, and when switching modes, the data in the soft gateway before the mode switch is cleaned or saved according to preset data processing rules. This embodiment, combined with the above embodiments, proposes a scenario-based dual-mode IoT soft gateway. The soft gateway system in this embodiment can switch the gateway's working mode during operation using operation buttons on the service-provided console interface. In proxy mode, each sub-device interacts with the cloud as an independent entity, with the soft gateway acting as a protocol conversion carrier. It does not need to register on the IoT platform, and the platform is unaware of the gateway's existence. In gateway mode, both the upstream soft gateway and sub-devices need to register on the platform, and the downstream soft gateway needs to maintain the lifecycle events of the sub-devices, such as the device's online / offline status. By freely setting and switching between the two modes, the various needs of the IoT gateway for different numbers of devices and network traffic in different application scenarios can be met.

[0076] See Figure 4 As shown in the illustration, this application also discloses an IoT soft gateway system, comprising:

[0077] The plug-in installation module 11 is used to determine the delivery medium corresponding to the preset personalized plug-in module according to the scenario requirements, package the delivery medium to generate a plug-in installation package, and place the plug-in installation package in the plug-in directory of the preset common component module; the preset common component module is used to implement the general functions of the soft gateway system instance, and exposes the general functions to the preset personalized plug-in module through the slot interface;

[0078] The gateway deployment module 12 is used to run the installation and deployment program of the preset data base based on the preset deployment carrier, and to install the corresponding plugin according to the plugin installation package based on the installation and deployment program, so as to deploy the soft gateway as a system service.

[0079] Service implementation module 13 is used to start the system service, scan the plugins using the preset data base to determine the target plugins according to the current scenario, and after registering and loading the target plugins, implement the service corresponding to the system service based on the preset common component module and / or the preset personalized plugin module.

[0080] This embodiment determines the delivery medium corresponding to the preset personalized plug-in module according to scenario requirements, packages the delivery medium to generate a plug-in installation package, and places the plug-in installation package in the plug-in directory of the preset common component module. Then, the gateway deployment module runs the installation and deployment program of the preset data base based on the preset deployment carrier, and configures the corresponding plug-in according to the plug-in installation package based on the installation and deployment program to deploy the soft gateway as a system service. The system service is started through the service implementation module, and the preset data base is used to scan for plug-ins to determine the target plug-in according to the current scenario. After registering and loading the target plug-in, the corresponding service of the system service is implemented based on the preset common component module and / or the preset personalized plug-in module. Through the above technical solution, by designing a common module that implements general functions and a plug-in module that implements personalized protocol functions, the selection of plug-in modules and the setting of the gateway can be made according to the actual access device protocols and business application scenarios. In order to solve the "fragmentation" problem caused by protocol customization and scenario personalization in IoT applications through module decoupling and combination, the following approach is adopted.

[0081] In some specific embodiments, the plug-in installation module 11 specifically includes:

[0082] The protocol encapsulation unit is used to determine the protocol cluster according to the scenario requirements using the preset personalized plug-in module, and to perform protocol parsing and protocol encapsulation according to the protocol cluster, so as to realize the function corresponding to the slot interface of the preset common component module.

[0083] In some specific embodiments, the gateway deployment module 12 specifically includes:

[0084] The plug-in assembly unit is used to install and assemble transmission control protocol plug-ins and / or serial communication protocol plug-ins according to the plug-in installation package, so as to realize the instantiation of transmission control protocol soft gateways and / or serial communication protocol soft gateways that support the corresponding protocols.

[0085] In some specific embodiments, the service implementation module 13 specifically includes:

[0086] The first interaction submodule is used to control the sub-devices corresponding to the soft gateway to interact with the preset cloud when the soft gateway is in the preset proxy mode;

[0087] The second interaction submodule is used to register the soft gateway and the sub-device on a preset IoT platform when the soft gateway is in a preset gateway mode, so as to control the sub-device to interact with the preset cloud through the soft gateway, and to maintain the lifecycle events of the sub-device using the soft gateway.

[0088] In some specific embodiments, the service implementation module 13 specifically includes:

[0089] The mode switching unit is used to switch the working mode of the soft gateway through the preset system configuration function interface of the soft gateway, and when switching the working mode, clean up or save the data in the soft gateway before switching the working mode according to the preset data processing rules.

[0090] In some specific embodiments, the first interaction submodule specifically includes:

[0091] The first connection establishment unit is used to establish a first long connection between the sub-device and the preset IoT platform based on the configuration of the corresponding sub-device when the soft gateway is in the preset proxy mode, so as to control the sub-device to communicate with the preset cloud.

[0092] In some specific embodiments, the second interaction submodule specifically includes:

[0093] The second connection establishment unit, when the soft gateway is in a preset gateway mode, registers the soft gateway and the sub-device on a preset IoT platform, establishes a second long connection with the IoT platform through the configuration of the soft gateway itself, and controls the sub-device to interact with the preset cloud through the second long connection.

[0094] Furthermore, embodiments of this application also disclose an electronic device, Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0095] Figure 5 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may 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 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the IoT soft gateway deployment method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0096] In this embodiment, the power supply 23 is used to provide 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 external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0097] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0098] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the IoT soft gateway deployment method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.

[0099] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed IoT soft gateway deployment method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0100] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0101] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0102] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0103] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0104] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for deploying an Internet of Things (IoT) soft gateway, characterized in that, include: Based on scenario requirements, determine the delivery medium corresponding to the preset personalized plug-in module, package the delivery medium to generate a plug-in installation package, and place the plug-in installation package in the plug-in directory of the preset common component module; the preset common component module is used to implement the general functions of the soft gateway system instance, and exposes the general functions to the preset personalized plug-in module through the slot interface; The installation and deployment program of the preset data base is run based on the preset deployment carrier, and the corresponding plugins are configured according to the plugin installation package based on the installation and deployment program to deploy the soft gateway as a system service. The system service is started, and the plugins are scanned using the preset data base to determine the target plugins according to the current scenario. After registering and loading the target plugins, the system service is implemented based on the preset common component module and / or the preset personalized plugin module. The process of placing the plugin installation package into the plugin directory of the preset common component module includes: The preset personalized plug-in module determines the protocol cluster according to the scenario requirements, and performs protocol parsing and protocol encapsulation according to the protocol cluster to realize the function corresponding to the slot interface of the preset common component module; Furthermore, the step of configuring the corresponding plugin according to the plugin installation package includes: The plugin installation package includes a transmission control protocol plugin and / or a serial communication protocol plugin to instantiate a transmission control protocol soft gateway and / or a serial communication protocol soft gateway that support the corresponding protocols.

2. The IoT soft gateway deployment method according to claim 1, characterized in that, The provision of services corresponding to the system services based on the preset common component modules and / or the preset personalized plug-in modules includes: When the soft gateway is in the preset proxy mode, it controls the corresponding sub-device of the soft gateway to interact with the preset cloud respectively; When the soft gateway is in a preset gateway mode, the soft gateway and the sub-device are registered on a preset IoT platform so that the soft gateway can control the sub-device to interact with the preset cloud and maintain the lifecycle events of the sub-device.

3. The IoT soft gateway deployment method according to claim 2, characterized in that, The provision of services corresponding to the system services based on the preset common component modules and / or the preset personalized plug-in modules includes: The working mode of the soft gateway can be switched through the preset system configuration function interface of the soft gateway, and when switching the working mode, the data in the soft gateway before switching the working mode is cleaned or saved according to the preset data processing rules.

4. The IoT soft gateway deployment method according to claim 2, characterized in that, When the soft gateway is in a preset proxy mode, controlling the sub-devices corresponding to the soft gateway to interact with the preset cloud includes: When the soft gateway is in the preset proxy mode, it uses the soft gateway to establish a first long connection between the sub-device and the preset IoT platform based on the configuration of the corresponding sub-device, so as to control the sub-device to communicate with the preset cloud.

5. The IoT soft gateway deployment method according to claim 2, characterized in that, When the soft gateway is in a preset gateway mode, registering the soft gateway and the sub-device on a preset IoT platform to control the sub-device to interact with the preset cloud through the soft gateway includes: When the soft gateway is in a preset gateway mode, it registers the soft gateway and the sub-device on a preset IoT platform, establishes a second long connection with the IoT platform through the configuration of the soft gateway itself, and controls the sub-device to interact with the preset cloud through the second long connection.

6. An Internet of Things (IoT) soft gateway system, characterized in that, include: The plugin installation module is used to determine the delivery medium corresponding to the preset personalized plugin module according to the scenario requirements, package the delivery medium to generate a plugin installation package, and place the plugin installation package in the plugin directory of the preset common component module; the preset common component module is used to implement the general functions of the soft gateway system instance, and exposes the general functions to the preset personalized plugin module through the slot interface; The gateway deployment module is used to run the installation and deployment program of the preset data base based on the preset deployment carrier, and to configure the corresponding plugins according to the plugin installation package based on the installation and deployment program, so as to deploy the soft gateway as a system service. The service implementation module is used to start the system service, scan the plugins using the preset data base to determine the target plugin according to the current scenario, and after registering and loading the target plugin, implement the service corresponding to the system service based on the preset common component module and / or the preset personalized plugin module. The plug-in installation module includes: The protocol encapsulation unit is used to determine the protocol cluster according to the scenario requirements using the preset personalized plug-in module, and to perform protocol parsing and protocol encapsulation according to the protocol cluster, so as to realize the function corresponding to the slot interface of the preset common component module; Furthermore, the gateway deployment module includes: The plug-in assembly unit is used to install and assemble transmission control protocol plug-ins and / or serial communication protocol plug-ins according to the plug-in installation package, so as to realize the instantiation of transmission control protocol soft gateways and / or serial communication protocol soft gateways that support the corresponding protocols.

7. An electronic device, characterized in that, The electronic device includes a processor and a memory; wherein the memory is used to store a computer program, which is loaded and executed by the processor to implement the IoT soft gateway deployment method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the IoT soft gateway deployment method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Internet of things gateway system for data security storage and implementation method thereof

    CN107734028A

  • 5G Internet-of-Things visual intelligent learning and entertainment space

    CN112144918A