A method and system for realizing an Internet of Things access layer in the cloud based on the WooLinkOS system
The IoT access layer is implemented in the cloud through the WooLinkOS system, and virtual gateway and container technology are used to solve the problem of non-uniform access architecture of IoT devices, achieve unified access and linkage of device models, and reduce resource waste and R&D costs. , optimizing the use of cloud resources.
Patent Information
- Application Number
- CN202111118209.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-22
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-09-22
AI Technical Summary
The existing technology lacks a unified access architecture for IoT devices, which results in various IoT terminal devices needing to build different access architectures and run on different hosts, resulting in a waste of resources.
The WooLinkOS system is used to implement the Internet of Things access layer in the cloud. By building an embedded system, creating a virtual gateway instance, configuring the network abstraction layer and management platform, unified access to different devices is achieved, and container technology is used to achieve unified access to devices on the cloud and edge sides. Entry and linkage.
It achieves unified access and linkage of device models, reduces R&D costs and cloud resource usage, avoids waste of hardware resources, optimizes cloud resource usage, and meets a variety of customer needs.
Smart Images

Figure CN113783967B
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet of Things technology, and in particular to a method and system for implementing an Internet of Things access layer in the cloud based on a WooLinkOS system. Background Art
[0002] With the development of Internet of Things technology and the policy of speeding up and reducing network fees that the country attaches great importance to, the Internet of Things cards provided by major network operators are becoming cheaper, with larger and faster traffic and faster speeds. Moreover, since many IoT terminal products have built-in SIM cards to connect data to the Internet via the Internet, the devices connected to the Internet include both access devices based on industrial RS485 / 232 / CAN buses and devices directly connected through the Internet public network. However, how to enable these IoT terminal devices to access both the edge gateway side and the cloud; and how to share access libraries and methods so that private network devices and public network devices can not only be modeled and linked in the cloud, but also modeled and linked using the same system framework on the edge gateway side, are issues that need to be solved today.
[0003] In the related technology, when IoT devices access the network, if they are industrial bus-based devices, they need to access from the edge gateway through embedded technology, and if the access device is a public network device, it needs to be placed in the cloud and accessed using cloud technology. However, the above approach has the following disadvantages: 1. For the same type of device, when the protocol is the same, but the access bus is different, the architecture and software of the access device cannot be reused between the embedded gateway and the cloud, and the northbound access part of the data cannot be reused and needs to be implemented repeatedly; 2. The device linkage part cannot be reused and needs to be implemented repeatedly; 3. Private network IP devices need to be accessed on the embedded gateway, and public network IP devices need to be accessed on the cloud. Therefore, although the models and functions of the two are exactly the same, the access of private network IP devices and public network IP devices cannot be reused, resulting in a huge waste of development resources. In addition, private network IP devices cannot be linked with public network IP devices on the local embedded gateway; 4. The cloud technology architecture has high resource requirements and cannot be executed on embedded architecture devices such as ARM and MIPS; 5. When multiple isolation gateways are required on the local edge side, different models of hardware devices need to be configured, which wastes resources.
[0004] Currently, in the relevant technologies, due to the lack of a unified IoT device access architecture in the system cloud, different types of IoT terminal devices need to build different access architectures and run in different hosts, resulting in a waste of resources. No effective solution has yet been proposed. Summary of the invention
[0005] The embodiments of the present application provide a method and system for implementing an IoT access layer in the cloud based on the WooLinkOS system, so as to at least solve the problem of resource waste caused by the lack of a unified IoT device access architecture in the related technology, resulting in different types of IoT terminal devices having to build different access architectures and run in different hosts.
[0006] In a first aspect, an embodiment of the present application provides a method for implementing an Internet of Things access layer in the cloud based on a WooLinkOS system, the method comprising:
[0007] Build the WooLinkOS embedded system and use scripts to build the root file system of the system;
[0008] Based on the root file system, construct an initialization script for the system, and configure the network abstraction layer of the system to open up the host network system;
[0009] Create a virtual gateway instance through the cloud IoT system, obtain the latest image from the container warehouse, obtain the virtual gateway container instance, and obtain an idle unique serial number and an idle IP address from the serial number pool and the IP address pool, configure the idle unique serial number and the idle IP address on the virtual gateway container instance, map the public open port of the container to the outside, modify the host firewall policy, make the configuration information effective through the docker restart command, and start the container instance;
[0010] Different device links or object models are uniformly accessed in the WooLinkOS system through the container instance. In some embodiments, before obtaining the latest image from the container repository, the method includes:
[0011] Using the docker import command, create an image from the root file system and write the image into the container repository;
[0012] Start the container using the privileged command in docker run.
[0013] In some embodiments, after starting the container, the method further includes:
[0014] Enter the script graphical interface inside the container instance through the docker exec command, and configure relevant information for the container instance, wherein the information includes but is not limited to the IP address, gateway, and SN sequence code.
[0015] In some embodiments, building the WooLinkOS embedded system includes:
[0016] Build a gateway management platform for the system, and manage the virtual gateway container through the gateway management platform, including but not limited to object model binding, multi-cloud access configuration, device linkage and computing model setting.
[0017] In some embodiments, after the root file system of the system is constructed by a script, the method includes:
[0018] Compile the root file system and upload it to the server to be deployed.
[0019] In a second aspect, an embodiment of the present application provides a system for implementing an Internet of Things access layer in the cloud based on the WooLinkOS system, the system comprising:
[0020] The build module is used to build the WooLinkOS embedded system and build the root file system of the system through scripts.
[0021] Based on the root file system, construct an initialization script for the system, and configure the network abstraction layer of the system to open up the host network system;
[0022] A configuration module is used to create a virtual gateway instance through a cloud IoT system, obtain the latest image from a container repository, obtain a virtual gateway container instance, obtain an idle unique serial number and an idle IP address from a serial number pool and an IP address pool, configure the idle unique serial number and the idle IP address on the virtual gateway container instance, map the public open port of the container to the outside, modify the host firewall policy, make the configuration information effective through the docker restart command, and start the container instance;
[0023] The access module is used to uniformly access different device links or object models in the WooLinkOS system through the container instance.
[0024] In some embodiments, the system further includes a startup module, which, before obtaining the latest image from the container repository,
[0025] The startup module is used to create an image from the root file system through the docker import command, and write the image into the container repository;
[0026] Start the container using the privileged command in docker run.
[0027] In some embodiments, after starting the container,
[0028] The configuration module is further used to enter the script graphical interface inside the container instance through the docker exec command to configure relevant information for the container instance, wherein the information includes but is not limited to the IP address, gateway and SN sequence code.
[0029] In some of the embodiments, the construction module is also used to build a gateway management platform of the system, and the virtual gateway container is managed through the gateway management platform, including but not limited to physical model binding, multi-cloud access configuration, device linkage and computing model setting.
[0030] In some of the embodiments, after the root file system of the system is constructed by script, the construction module is further used to compile and upload the root file system to the server to be deployed.
[0031] Compared with the related art, the method for realizing the Internet of Things access layer in the cloud based on the WooLinkOS system provided in the embodiment of the present application builds a WooLinkOS embedded system, and builds the root file system of the system through a script; based on the root file system, builds the system's initialization script, and configures the system's network abstraction layer to open up the host network system; then, creates a virtual gateway instance through the cloud Internet of Things system, obtains the latest image from the container warehouse, obtains the virtual gateway container instance, and obtains the idle unique serial number and idle IP address from the serial number pool and the IP address pool, configures the idle unique serial number and the idle IP address on the virtual gateway container instance, maps the public open port of the container to the outside, modifies the host firewall policy, makes the configuration information effective through the docker restart command, and starts the container instance; finally, uniformly accesses different device links or object models in the WooLinkOS system through the container instance. Compared with the prior art solution of accessing devices through container technology in the local gateway, the present application runs one or more instances in the embedded system in different host systems through container technology in the cloud, thereby creating a unified access device model for users from the resource-rich cloud to the resource-limited embedded edge side, so that the access device participates in a customizable linkage strategy. In addition, this application establishes device models for private network devices, public network devices, and industrial bus devices according to a unified architecture, which helps to provide unified access services for different devices and simplifies the steps of device cloud access, which not only reduces R&D costs, but also reduces the resource usage of the cloud architecture, and solves the problem of resource waste caused by the lack of a unified IoT device access architecture in the system cloud, which leads to different types of IoT terminal devices needing to build different access architectures and run in different hosts. It effectively optimizes cloud resources, prevents hardware resource waste, and maps multiple isolated environments through container technology, which can flexibly meet the various needs of customers. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0033] Figure 1 is a flow chart of a method for implementing an Internet of Things access layer in the cloud based on the WooLinkOS system according to an embodiment of the present application;
[0034] Figure 2 is a schematic diagram of a virtual gateway instance according to an embodiment of the present application;
[0035] Figure 3 is a schematic diagram of the structure of a gateway management platform according to an embodiment of the present application;
[0036] Figure 4 is a schematic diagram of a virtual gateway monitoring example of a 2G-RTU according to an embodiment of the present application;
[0037] Figure 5 It is a structural block diagram of a system for implementing an Internet of Things access layer in the cloud based on the WooLinkOS system according to an embodiment of the present application;
[0038] Figure 6 It is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for ordinary technicians in the field related to the contents disclosed in the present application, some changes such as design, manufacturing or production based on the technical contents disclosed in the present application are only conventional technical means, and should not be understood as insufficient contents disclosed in the present application.
[0040] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0041] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to greater than or equal to two. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The terms "first", "second", "third" and the like involved in the present application are merely used to distinguish similar objects and do not represent a specific ordering of the objects.
[0042] This application provides a method for implementing the Internet of Things access layer in the cloud based on the WooLinkOS system. Figure 1 is a flow chart of a method for implementing an IoT access layer in the cloud based on the WooLinkOS system according to an embodiment of the present application, such as Figure 1 As shown, the process includes the following steps:
[0043] Step S101, building a WooLinkOS embedded system, and building a root file system of the system through a script;
[0044] In this embodiment, the WooLinkOS embedded system is a lightweight embedded Internet of Things operating system with core functions such as business data analysis, dynamic data routing, network configuration management, and system remote maintenance. It has the advantages of being cross-platform, easy to use, and supporting secondary development. The system can simplify the complicated process of device, data, and network access through the technical means of software-defined hardware, so that users can firmly occupy a leading position in the general trend of the Internet of Everything. The root file system (Root File System, referred to as rootfs) is an architecture for a specific operating system. The specific implementation form is: specific folders, relationships between folders, and various specific files; among them, specific folders and files include: the root file directory ' / ', the system-related configuration file directory / etc, the system startup-related configuration / etc / init, the system-related tools / sbin, and the user tools / usr / bin, etc.
[0045] Specifically, this embodiment uses Makefile to Figure 3 In the embedded system shown, the target files of each module after cross compilation are copied to the corresponding root directory. The specific sample code is as follows:
[0046]
[0047] Finally, a complete root file system directory is generated:
[0048] llwang@userroot~ / root-ramips$tree-L 1.
[0049]
[0050]
[0051] Next, compress and copy the entire root file system through the script: root-ramips.tar.gz; then, automatically deploy the script:
[0052] Preferably, after the root file system of the system is constructed by script, the present embodiment compiles and uploads the root file system to the server to be deployed for subsequent container settings.
[0053] This embodiment uses the WooLinkOS embedded system platform to facilitate the subsequent linkage of different devices and reuse of device access architecture;
[0054] Step S102, based on the root file system, construct the system initialization script, and configure the system's network abstraction layer to open up the host network system; preferably, this embodiment builds the system initialization script / etc / init based on the root file system constructed above, and modifies the network abstraction layer configuration based on the root file system to open up the host network system;
[0055] Specifically, this embodiment abstracts the network in the system into WAN and LAN modes. For the virtual WooLinkOS system, there is only one WAN and one LO interface. Therefore, the network abstraction layer configuration needs to be modified. The specific sample code is as follows:
[0056] config interface'loopback'#LO interface configuration
[0057] option ifname'lo'
[0058] option proto'static'
[0059] option ipaddr'127.0.0.1'
[0060] option netmask'255.0.0.0'
[0061] config interface'wan'#WAN interface configuration
[0062] option ifname'eth0'
[0063] option metric'0'
[0064] option proto'static'
[0065] option netmask'255.255.255.0'
[0066] option gateway'172.18.0.2'
[0067] option defaultroute'1'
[0068] option force_link '0'
[0069] option ipaddr'172.18.0.12'
[0070] list dns '114.114.114.114'
[0071] 172.18.0.1 is the external host network environment. You can see the corresponding network card through docker inspect network and list the IP addresses used by all containers to open up the host network system.
[0072] Step S103, create a virtual gateway instance through the cloud IoT system, obtain the latest image from the container repository, obtain the virtual gateway container instance, and obtain the idle unique serial number and idle IP address from the serial number pool and IP address pool, configure the idle unique serial number and idle IP address on the virtual gateway container instance, map the public open port of the container to the outside, modify the host firewall policy, make the configuration information effective through the docker restart command, and start the container instance.
[0073] Preferably, in this embodiment, before obtaining the latest image from the container warehouse, it is necessary to use the dockerimport command to create an image from the above-mentioned root file system and write the image into the container warehouse; then, a virtual gateway instance is created through the cloud IoT system, and the latest image is obtained from the container warehouse. After obtaining the virtual gateway container instance, the container instance is started through the privileged command in docker run;
[0074] After starting the container, this embodiment uses docker exec-it <container>The ash command enters the script graphical shell interface inside the container instance and configures relevant information for the container instance, where the configuration information includes but is not limited to IP address, gateway, and SN sequence code. The specific configuration of IP address and SN sequence code includes: obtaining an idle unique sequence number and an idle IP address from the sequence number pool and IP address pool, and then configuring the idle unique sequence number and idle IP address on the virtual gateway container instance;
[0075] Furthermore, preferably, this embodiment modifies the container port mapping, maps the ports that need to be publicly open in the container to the outside, and modifies the host firewall policy. Finally, use docker restart <container>The command makes the configuration effective, and then starts the container instance. At this point, a virtual gateway running the WooLinkOS embedded system has been deployed. Figure 2 is a schematic diagram of a virtual gateway instance according to an embodiment of the present application, such as Figure 2 As shown in the figure, this is a virtual gateway instance obtained after the above creation and deployment. Through container technology, multiple isolated gateways are built on the same hardware, mapping multiple isolated environments, which can flexibly meet the different business needs of customers.
[0076] Step S104, uniformly access different device links or object models in the WooLinkOS system through container instances.
[0077] In some of the embodiments, the constructed WooLinkOS embedded system includes a gateway management platform. Therefore, this embodiment can manage the virtual gateway container through the gateway management platform, including but not limited to physical model binding, multi-cloud access configuration, device linkage and computing model settings, etc. Figure 3 is a schematic diagram of the structure of the gateway management platform according to an embodiment of the present application, such as Figure 3 As shown, the virtual gateway management platform includes: system monitoring module, interface configuration management module, device configuration management module, device template management module, data reporting module, rule engine module, platform access module, application management module, remote log module, remote assistance module and edge computing module. The system monitoring module periodically checks the network and monitors the main system processes; the interface configuration management module provides flexible interface configuration; the device template management module provides protocol parsing, model definition and model mapping, for example, a simple two-level protocol Modbus-RTU or 485 protocol, and the model definition mainly includes a description of the capabilities of a device based on the idea of object-oriented programming, which includes the attributes of the device, the services and methods provided, and the reported events; the data reporting module can provide local data cache, and support breakpoint continuation of data, user-configured periodic reporting, threshold reporting and change reporting; the rule engine module realizes local device linkage; the device configuration management module can bind devices, device templates, access ports and protocols, so that the same interface can support protocol parsing and model mapping of different devices; the platform access module can support access to different platforms; the application management module can install corresponding software modules according to the actual usage scenario, thereby realizing the ability of software-defined hardware; the remote log module retains the log of the entire life cycle of the device data, which facilitates the location and analysis of problems; the remote assistance module can realize remote debugging. In addition, through the MQTT Broker message middleware communication, the above modules can be decoupled, so that data can flow between modules based on MQTT Topic. Specifically, in this embodiment, the terminal device will access the system of the virtual gateway management platform from the intranet. The virtual gateway container obtains the data collected by the terminal device and processes the data through protocol analysis. The obtained data information is based on MQTT Topic in Figure 3 The virtual gateway management platform shown in the figure is transferred between various modules and finally reported to the business cloud. In this embodiment, the gateway management platform can not only perform object model binding, multi-cloud access configuration, device linkage and model calculation, remote assistance, etc. on the virtual gateway, but also monitor and manage the connected devices. Figure 4 2G-RTU virtual gateway monitoring example schematic diagram according to an embodiment of the present application, such as Figure 4 As shown in the figure, the monitoring panel displays the real-time data of the virtual gateway of the 2G-RTU on the 8th floor of a building, playing a monitoring and management role.
[0078] The embodiment of the present application uses a containerized embedded edge gateway, shares models and multi-protocol access with the cloud, adopts a unified object model and linkage strategy, unifies private network devices, public network devices and industrial bus devices, and makes it possible for them to be linked with each other on the edge side, saving resources and reducing R&D costs; in addition, the present embodiment adopts a unified gateway management platform, which can effectively reduce management and operation costs and prevent waste of resources.
[0079] Through the above steps S101 to S104, this application builds a unified device access architecture on the WooLinkOS embedded system, and uses containerization technology to link industrial bus devices RS458 / 232 / CAN and ordinary IP devices in the local gateway or cloud using the same model and access method, and the access is fast, and the timeliness of device data upload is high. In addition, after the WooLinkOS embedded system is deployed in the cloud through containerization, not only can the northbound access part of the data in the access device be reused, but also the device access architecture and the device linkage part can be reused, greatly reducing the waste of development resources. It solves the problem of resource waste caused by the lack of a unified IoT device access architecture in the system cloud, which leads to the need to build different access architectures for various IoT terminal devices and run them in different hosts. It effectively optimizes cloud resources, prevents waste of hardware resources, and maps multiple isolated environments through container technology, which can flexibly meet the various needs of customers.
[0080] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0081] This embodiment also provides a system for implementing the Internet of Things access layer in the cloud based on the WooLinkOS system. The system is used to implement the above-mentioned embodiments and preferred implementations, and the descriptions that have been made will not be repeated. As used below, the terms "module", "unit", "subunit", etc. can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0082] Figure 5 is a structural block diagram of a system for implementing an Internet of Things access layer in the cloud based on the WooLinkOS system according to an embodiment of the present application, such as Figure 5 As shown, the system includes a construction module 51, a configuration module 52 and an access module 53:
[0083] A construction module 51 is used to build a WooLinkOS embedded system, and to build a root file system of the system through a script. Based on the root file system, an initialization script of the system is built, and the network abstraction layer of the system is configured to open up the host network system; a configuration module 52 is used to create a virtual gateway instance through a cloud IoT system, obtain the latest image from a container repository, obtain a virtual gateway container instance, and obtain an idle unique serial number and an idle IP address from a serial number pool and an IP address pool, configure the idle unique serial number and the idle IP address on the virtual gateway container instance, map the public open port of the container to the outside, modify the host firewall policy, make the configuration information effective through the docker restart command, and start the container instance; an access module 53 is used to uniformly access different device links or object models in the WooLinkOS system through a container instance.
[0084] Through the above system, the present application builds a unified device access architecture on the embedded system through the construction module 51 and the configuration module 52, and uses containerization technology to run one or more instances in the embedded system in different host systems, thereby creating a unified access device model for users from the resource-rich cloud to the resource-limited embedded edge side, so that the access device participates in a customizable linkage strategy. It solves the problem of resource waste caused by the lack of a unified IoT device access architecture in the system cloud, which leads to the need to build different access architectures and run in different hosts for various IoT terminal devices. It effectively optimizes cloud resources, prevents waste of hardware resources, and maps multiple isolated environments through container technology, which can flexibly meet the various needs of customers.
[0085] It should be noted that the specific examples in some other embodiments of the present application can refer to the examples described in the above-mentioned embodiment of a method for implementing an IoT access layer in the cloud based on the WooLinkOS system and the examples described in the optional implementation mode, and this embodiment will not be repeated here.
[0086] In addition, it should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0087] This embodiment further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0088] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0089] In addition, in combination with the method for implementing the Internet of Things access layer in the cloud based on the WooLinkOS system in the above embodiment, the embodiment of the present application can provide a storage medium for implementation. The storage medium stores a computer program; when the computer program is executed by the processor, any one of the methods for implementing the Internet of Things access layer in the cloud based on the WooLinkOS system in the above embodiment is implemented.
[0090] In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for realizing an Internet of Things access layer in the cloud based on the WooLinkOS system is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0091] In one embodiment, Figure 6 is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application, such as Figure 6 As shown, an electronic device is provided, which may be a server, and its internal structure diagram may be as shown in Figure 6 As shown. The electronic device includes a processor, a network interface, an internal memory and a non-volatile memory connected through an internal bus, wherein the non-volatile memory stores an operating system, a computer program and a database. The processor is used to provide computing and control capabilities, the network interface is used to communicate with an external terminal through a network connection, the internal memory is used to provide an environment for the operation of the operating system and the computer program, and when the computer program is executed by the processor, a method for realizing an Internet of Things access layer in the cloud based on the WooLinkOS system is implemented, and the database is used to store data.
[0092] Those skilled in the art will understand that Figure 6 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0093] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0094] Those skilled in the art should understand that the technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0095] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.< / container> < / container>
Claims
1. A method for implementing an Internet of Things access layer in the cloud based on the WooLinkOS system, characterized in that: The method comprises: Build the WooLinkOS embedded system and use scripts to build the root file system of the system; Based on the root file system, construct an initialization script for the system, and configure the network abstraction layer of the system to open up the host network system; Create a virtual gateway instance through the cloud IoT system, obtain the latest image from the container warehouse, obtain the virtual gateway container instance, and obtain an idle unique serial number and an idle IP address from the serial number pool and the IP address pool, configure the idle unique serial number and the idle IP address on the virtual gateway container instance, map the public open port of the container to the outside, modify the host firewall policy, make the configuration information effective through the docker restart command, and start the container instance; Different device links or object models are uniformly accessed in the WooLinkOS system through the container instance.
2. The method according to claim 1, characterized in that: The construction of WooLinkOS embedded system includes: Build a gateway management platform for the system, and manage the virtual gateway container through the gateway management platform, including but not limited to object model binding, multi-cloud access configuration, device linkage and computing model setting.
3. The method according to claim 1, characterized in that Before obtaining the latest image from the container registry, the method includes: Using the docker import command, create an image from the root file system and write the image into the container repository; Start the container using the privileged command in docker run.
4. The method according to claim 3, characterized in that After starting the container, the method further includes: Enter the script graphical interface inside the container instance through the docker exec command, and configure relevant information for the container instance, wherein the information includes but is not limited to the IP address, gateway, and SN sequence code.
5. The method according to claim 1, characterized in that After the root file system of the system is constructed by means of a script, the method comprises: Compile the root file system and upload it to the server to be deployed.
6. A system for implementing the Internet of Things access layer in the cloud based on the WooLinkOS system, characterized in that: The system comprises: The build module is used to build the WooLinkOS embedded system and build the root file system of the system through scripts. Based on the root file system, construct an initialization script for the system, and configure the network abstraction layer of the system to open up the host network system; A configuration module is used to create a virtual gateway instance through a cloud IoT system, obtain the latest image from a container repository, obtain a virtual gateway container instance, obtain an idle unique serial number and an idle IP address from a serial number pool and an IP address pool, configure the idle unique serial number and the idle IP address on the virtual gateway container instance, map the public open port of the container to the outside, modify the host firewall policy, make the configuration information effective through the docker restart command, and start the container instance; The access module is used to uniformly access different device links or object models in the WooLinkOS system through the container instance.
7. The system according to claim 6, characterized in that The construction module is also used to build a gateway management platform of the system, and the virtual gateway container is managed through the gateway management platform, including but not limited to object model binding, multi-cloud access configuration, device linkage and computing model setting.
8. The system according to claim 6, characterized in that The system also includes a startup module, before obtaining the latest image from the container repository, The startup module is used to create an image from the root file system through the docker import command, and write the image into the container repository; Start the container using the privileged command in docker run.
9. The system according to claim 8, characterized in that After starting the container, The configuration module is further used to enter the script graphical interface inside the container instance through the docker exec command to configure relevant information for the container instance, wherein the information includes but is not limited to the IP address, gateway and SN sequence code.
10. The system according to claim 6, characterized in that After the root file system of the system is constructed through the script, The construction module is also used to compile the root file system and upload it to the server to be deployed.
