CN112532715B - Deployment method, access method, device, system and computer readable storage medium - Google Patents

Deployment method, access method, device, system and computer readable storage medium Download PDF

Info

Publication number
CN112532715B
CN112532715B CN202011339483.XA CN202011339483A CN112532715B CN 112532715 B CN112532715 B CN 112532715B CN 202011339483 A CN202011339483 A CN 202011339483A CN 112532715 B CN112532715 B CN 112532715B
Authority
CN
China
Prior art keywords
iot
application
platform
plugin
iot application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011339483.XA
Other languages
Chinese (zh)
Other versions
CN112532715A (en
Inventor
王晓红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202011339483.XA priority Critical patent/CN112532715B/en
Publication of CN112532715A publication Critical patent/CN112532715A/en
Application granted granted Critical
Publication of CN112532715B publication Critical patent/CN112532715B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a deployment method, an access method, equipment, a system and a computer readable storage medium, wherein the deployment method is used for deploying an internet of things (IoT) application on an IoT platform and comprises the following steps: the IoT platform obtains an IoT application deployment request, the IoT application deployment request comprising: installation information of IoT applications to be deployed; the IoT platform configures a corresponding IoT plugin for the IoT application according to the IoT application deployment request, and deploys the IoT application and the IoT plugin into different containers of the same Pod; the IoT platform establishing a mapping between the IoT application and a corresponding container to enable deployment of the IoT application to the IoT platform; wherein the IoT plugin is configured to enable message forwarding between an IoT application and an IoT platform. The IoT platform may be made available to applications in a simpler manner.

Description

Deployment method, access method, device, system and computer readable storage medium
Technical Field
The embodiment of the invention relates to the technology of the Internet of things IoT (The Internet of Things), in particular to a deployment method, an access method, equipment, a system and a computer readable storage medium.
Background
Currently, when an IoT application accesses an IoT device in a manner of network interface call, the IoT application needs to be interfaced with an IoT platform, so that management functions of the IoT device are integrated into the application in an interface manner, and the IoT of the application bears the device management functions which should be borne by the IoT platform, so that separation of management and application functions cannot be realized.
Disclosure of Invention
In view of this, an embodiment of the present invention provides a deployment method for deploying an IoT application on an IoT platform in the internet of things, the method comprising:
the IoT platform obtains an IoT application deployment request, the IoT application deployment request comprising: installation information of IoT applications to be deployed;
the IoT platform configures a corresponding IoT plugin for the IoT application according to the IoT application deployment request, and deploys the IoT application and the IoT plugin into different containers of the same Pod;
the IoT platform establishing a mapping between the IoT application and a corresponding container to enable deployment of the IoT application to the IoT platform;
wherein the IoT plugin is configured to enable message forwarding between an IoT application and an IoT platform.
The embodiment of the invention also provides an access method for the IoT application to access the IoT device, wherein the IoT application is deployed on the IoT platform by adopting the deployment method, and the IoT application and the corresponding IoT plugin are deployed in different containers of the same Pod; the method comprises the following steps:
the IoT plug-in obtaining an access message sent by the IoT application to an IoT device;
the IoT plugin encapsulates the access message into a corresponding request message according to a preset protocol parameter, and sends the encapsulated request message to an IoT platform, so that the IoT platform forwards the access message to the IoT device.
The embodiment of the invention also provides an IoT platform device, comprising: a processor and a memory storing a computer program executable on the processor, wherein the processor implements the deployment method or the access method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the deployment method or the access method when being executed by a processor.
Other aspects will become apparent upon reading and understanding the accompanying drawings and detailed description.
Drawings
The accompanying drawings are included to provide an understanding of the technical aspects of the present application, and are incorporated in and constitute a part of this specification, illustrate the technical aspects of the present application and together with the examples of the present application, and not constitute a limitation of the technical aspects of the present application.
FIG. 1 is a flow chart of a deployment method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a deployment method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an IoT application deployment in an embodiment of the present invention;
FIG. 4 is a flow chart of an access method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an example IoT Pod;
FIG. 6 is a flow chart of an access method according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a URI parameter according to an embodiment of the invention;
FIG. 8 is a diagram illustrating a request parameter according to an embodiment of the present invention;
FIG. 9 is a diagram illustrating a response parameter according to an embodiment of the present invention;
FIG. 10 is a flow chart of an access method according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an IoT platform device according to an embodiment of the present invention.
Detailed Description
The present application describes a number of embodiments, but the description is illustrative and not limiting and it will be apparent to those of ordinary skill in the art that many more embodiments and implementations are possible within the scope of the embodiments described herein. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are possible. Any feature or element of any embodiment may be used in combination with or in place of any other feature or element of any other embodiment unless specifically limited.
The present application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements of the present disclosure may also be combined with any conventional features or elements to form a unique inventive arrangement as defined in the claims. Any feature or element of any embodiment may also be combined with features or elements from other inventive arrangements to form another unique inventive arrangement as defined in the claims. Thus, it should be understood that any of the features shown and/or discussed in this application may be implemented alone or in any suitable combination. Accordingly, the embodiments are not to be restricted except in light of the attached claims and their equivalents. Further, various modifications and changes may be made within the scope of the appended claims.
Furthermore, in describing representative embodiments, the specification may have presented the method and/or process as a particular sequence of steps. However, to the extent that the method or process does not rely on the particular order of steps set forth herein, the method or process should not be limited to the particular sequence of steps described. Other sequences of steps are possible as will be appreciated by those of ordinary skill in the art. Accordingly, the particular order of the steps set forth in the specification should not be construed as limitations on the claims. Furthermore, the claims directed to the method and/or process should not be limited to the performance of their steps in the order written, and one skilled in the art can readily appreciate that the sequences may be varied and still remain within the spirit and scope of the embodiments of the present application.
With the development and application of the internet of things technology, more and more IoT platform providers and vendors help internet of things solution providers provide ways for terminal equipment to access and manage. However, at present, when using an IoT platform to manage devices, an internet of things solution provider needs to conduct development joint debugging on a device side (southbound) and an application side (northbound) with the IoT platform, needs to know factory interfaces in detail, performs different interface interfacing for different devices, and is very complicated when the types of the internet of things devices used by clients are many.
When an internet of things application is managing a terminal device through an IoT platform, the internet of things application is programmed to log in through complex authentication while creating/managing operations of a product, registering/managing the device, and the like. When the application deployment is installed and deployed, the application deployment is concerned, the application deployment and the Internet of things platform are in butt joint through a network, the capability of application developers is relatively high, and the online speed of the application development of the Internet of things is influenced.
In addition, the existing IoT applications interface with the IoT platform in a manner of network interface call when accessing the device, including authentication and authorization, device access read-write, etc., and the code integration is performed in the IoT applications to control and display the device information in the applications. The management of the equipment is integrated into the application in an interface mode, so that the application redundancy realizes the function of platform equipment management, and the separation of the system and the application function cannot be realized.
An embodiment of the present invention provides a deployment method for deploying an IoT application on an IoT platform in an internet of things, as illustrated in fig. 1, the method includes:
in step 101, the IoT platform obtains an IoT application deployment request, the IoT application deployment request comprising: installation information of IoT applications to be deployed;
step 102, the IoT platform configures a corresponding IoT plugin for the IoT application according to the IoT application deployment request, and deploys the IoT application and the IoT plugin into different containers of the same Pod;
step 103, the IoT platform establishes a mapping between the IoT application and a corresponding container to enable deployment of the IoT application to the IoT platform;
wherein the IoT plugin is configured to enable message forwarding between an IoT application and an IoT platform.
In an exemplary embodiment, the IoT platform is pre-deployed as a PaaS platform application onto a platform as a service PaaS platform;
the IoT platform invoking the PaaS platform deploys the IoT application and IoT plugin into different containers of the same Pod by:
acquiring a dock mirror image corresponding to the IoT application according to the IoT application deployment request;
creating a corresponding Pod for the IoT application, and deploying an IoT application container and an IoT plugin container in the Pod according to a dock image and the IoT plugin corresponding to the IoT application;
scheduling a virtual machine to run the IoT application container and the IoT plugin container.
In an exemplary embodiment, when the installation manner of the components in the IoT application is based on source code installation, the installation information includes: the address and code version of the component source code; the IoT platform invokes the PaaS platform to obtain a dock image corresponding to the IoT application by:
creating a source code compiling temporary docker container, and scheduling a virtual machine to operate the source code compiling temporary docker container;
pulling the source code according to the address and the code version of the source code, and compiling the pulled source code into an executable program by utilizing the source code compiling temporary dock container;
and packaging the compiled executable program and the running environment to generate a dock mirror image corresponding to the IoT application.
In an exemplary embodiment, when the installation manner of the components in the IoT application is a mirror-based installation, the installation information includes: mirroring the address at which it is located; the IoT platform invokes the PaaS platform to obtain a dock image corresponding to the IoT application by:
and pulling the mirror image to be used as a dock mirror image corresponding to the IoT application according to the address where the mirror image is located.
In an example embodiment, the IoT platform invokes the PaaS platform to create a corresponding Pod for the IoT application and deploy an IoT application container and an IoT plugin container in the Pod by:
creating a corresponding Pod for the IoT application using a kubernetes platform;
and according to the dock mirror image corresponding to the IoT application and the IoT plugin, an IoT application container corresponding to the IoT application and an IoT plugin container corresponding to the IoT plugin are deployed in the Pod.
In an example embodiment, the IoT platform establishes a mapping between the IoT application and a corresponding container by:
mapping the domain name of the IoT application with a virtual host IP and a port, and mapping the virtual host IP and the port with a container port corresponding to the IoT application.
In an exemplary embodiment, the method further comprises:
the IoT platform creates authentication information for the IoT application and integrates into the IoT plugin.
The technical scheme of the embodiment of the invention can enable the application to be deployed to the IoT platform in a simpler mode.
An embodiment of the present invention provides a deployment method for deploying an IoT application on an IoT platform, where the IoT platform is deployed as a PaaS platform application on the PaaS platform, as shown in fig. 2, the method includes:
step 201, the IoT platform obtains an IoT application deployment request, configures a corresponding IoT plugin for the IoT application, and sends the IoT application deployment request and the IoT plugin to the PaaS platform, where the IoT application deployment request includes: installation information of IoT applications to be deployed; the IoT plugin is configured to enable message forwarding between an IoT application and an IoT platform;
in an example embodiment, an IoT application deployment request is for requesting deployment of an IoT application at an IoT platform, the IoT application deployment request comprising: installation information of IoT applications to be deployed;
in an example embodiment, the installation information of the IoT application to be deployed includes one or more of the following: application name, component name, installation of the component, and other information.
In an exemplary embodiment, the installation of components supports both source-based and mirror-based installations.
In an exemplary embodiment, when the installation mode of the component is based on the source code installation, other information of the component includes: the address and code version where the component source code is located.
In an exemplary embodiment, when the installation mode of the component is a mirror image-based installation, other information of the component includes: the component mirrors the address at which it is located.
In an example embodiment, the IoT platform provides IoT application management functionality including application deployment and the like.
In an example embodiment, the IoT application is deployed on an IoT platform using the IoT application management function. For example, the IoT platform includes a display screen that may display an IoT platform user login page, after the user has successfully logged in, an application management page that may display options such as applications and application operation and maintenance, may click on the application options and then enter an application list page, for example, various options may be shown on the left, an application list page may be displayed on the right, which may display an IoT application list that has been deployed, and may also display options such as new applications, delete applications, modify applications, and so on.
In an exemplary embodiment, after the user logs into the IoT platform and initiates the application management function to click on the application option, entering an application list page that includes a deployed application list, further comprising: two options are deleted application and newly created application. For example, in the deployed application list, the 5 IoT applications, namely, the intelligent office, the intelligent home, the security system, the sender and the IoT application, have been deployed, then click on the new application to pop up the new application sub-page, at the same time, the delete application may be selected, and click on the corresponding application icon or name may enter the application interface. For example, when clicking the new application option, the new application sub-page is popped up, and the application name of the application to be deployed can be input on the new application sub-page, and the application remark can be selectively input. When the application name and the application remark are input on the newly built application sub-page and then the determination option is clicked, the component management page can be popped up, and options such as adding components, adding third party components and the like can be displayed on the component management page. When the add component option is clicked, a create component page may pop up where the component may be installed, e.g., where the component is installed in support of both component installation from source code (i.e., based on source code installation) and from source image (i.e., based on image installation). The installation from source code includes three options, custom repository, gitee (gite-based code hosting service) project and Gitlab (using Git as a code management tool) project. The installation from the source image includes two options, a designated image and a designated DockerRun command (create and launch container). When clicking any option of the custom repository, the Gitee item or the Gitlab item, a page based on source code installation may be popped up, on which a user may input information such as an application name, a component name, a repository address, a code version, etc., and then click a confirm creation button, an IoT application deployment request is generated, where the IoT application deployment request carries installation information of an application to be deployed, and the installation information is generated from the information input in the pages. In this example, the IoT application is integrated with the IoT platform in such a way that the application is more concerned with the content of the device than the device management itself, through the platform management device, through the application management content, as with the local operating system, when the user accesses the IoT application only has to log on to the IoT platform, click on the application options, and enter the application list page.
In an exemplary embodiment, when clicking on either option of the specified mirror or the specified DockerRun command, a mirror installation-based page may be popped up, on which the user may input information such as an application name, a component name, a mirror address, etc., and then click on a confirm creation button, an IoT application deployment request is generated, which carries installation information of the application to be deployed, and the installation information is generated from the information input in the page.
In an exemplary embodiment, step 201 further comprises: authentication information is created for the IoT application and integrated into the IoT plugin.
In an exemplary embodiment, when an IoT application is deployed on an IoT platform, an IoT plugin is automatically added, and authentication information created by the IoT platform for the IoT application is integrated into the IoT plugin, authentication is completed by the plugin, and the IoT application can access the IoT device as if it were accessing the local device without authentication.
In an exemplary embodiment, the IoT plugin is responsible for all tasks of the IoT application that dock with the IoT platform, the IoT plugin is used for interfacing with the IoT platform restful service, the IoT application is responsible for content management of the IoT device, and other IoT platform docking operations are completed by the IoT plugin, so that the access flow of the IoT application is simplified, the IoT application and IoT platform docking complexity is reduced, and a standardized flow is formed.
In an exemplary embodiment, the IoT plug-in has the following functionality:
message forwarding between the IoT application and the IoT platform is completed, and complex interfacing between the application and the platform is shielded.
In an exemplary embodiment, the method further comprises:
the IoT platform creates authentication information for the IoT application and integrates into the IoT plugin.
In an example embodiment, the IoT plug-in may also have the following functionality:
1. managing authentication information of the IoT application, exchanging the authentication information while interacting with the IoT platform;
2. managing IoT application data interfacing with IoT platforms, such as IoT application IDs: app_id, ioT platform access address, etc.
Step 202, the PaaS platform obtains a dock mirror image corresponding to the IoT application according to the IoT application deployment request;
in an exemplary embodiment, when the installation manner of the components in the IoT application is based on source code installation, the installation information includes: the address and code version of the component source code; invoking the PaaS platform to obtain a dock image corresponding to the IoT application by:
creating a source code compiling temporary docker container, and scheduling a virtual machine to operate the source code compiling temporary docker container;
pulling the source code according to the address and the code version of the source code, and compiling the pulled source code into an executable program by utilizing the source code compiling temporary dock container;
and packaging the compiled executable program and the running environment to generate a dock mirror image corresponding to the IoT application.
In an exemplary embodiment, a virtual machine is scheduled to run the source code compilation temporary docker container by:
and scheduling a virtual machine in the IaaS platform, and running the source code compiling temporary dock container in the virtual machine.
In an exemplary embodiment, when the installation manner of the components in the IoT application is a mirror-based installation, the installation information includes: the address where the component mirror is located; invoking the PaaS platform to obtain a dock image corresponding to the IoT application by:
and pulling the mirror image to be used as a dock mirror image corresponding to the IoT application according to the address where the mirror image is located.
Step 203, the PaaS platform creates a corresponding Pod for the IoT application, and deploys an IoT application container and an IoT plugin container in the Pod according to the dock image and the IoT plugin corresponding to the IoT application;
in an example embodiment, the PaaS platform creates a corresponding Pod for the IoT application and deploys an IoT application container and an IoT plugin container in the Pod by:
creating a corresponding Pod for the IoT application using a kubernetes platform;
and according to the dock mirror image corresponding to the IoT application and the IoT plugin, an IoT application container corresponding to the IoT application and an IoT plugin container corresponding to the IoT plugin are deployed in the Pod.
In an exemplary embodiment, the PaaS platform may deploy IoT applications and IoT plugin packages into the same Pod when deploying IoT applications by means of kubernetes platform Pod deployment, share the same IPC (Inter-Process Communication ) namespaces by means of containers of the same Pod, and the two communications may use standard process communications, such as SystemV signaling system or POSIX (Portable Operating System Interface ) shared memory, and so on.
Step 204, the PaaS platform schedules a virtual machine to run the IoT application container and the IoT plugin container;
in an example embodiment, a virtual machine is scheduled to run the IoT application container and the IoT plug-in container by:
scheduling a virtual machine in the IaaS platform and running the IoT application container and the IoT plugin container in the virtual machine.
Step 205, mapping the domain name of the IoT application with a virtual host IP and a port, and mapping the virtual host IP and the port with a container port corresponding to the IoT application.
In an exemplary embodiment, after installation is complete, the IoT application's access policies may be configured through the IoT platform that support access policies through domain names and access policies through global IP and PORT.
In an exemplary embodiment, accessing the policy by domain name includes: HTTP (HyperText Transfer Protocol ) information configured for IoT applications; the HTTP information includes one or more of the following: domain name, type, route, certificate, component (port), etc. For example, HTTP configures policies for accessing IoT applications by domain name, each application corresponding HTTP information comprising: domain name, type, advanced routing, credentials, components (ports).
In an exemplary embodiment, access policies through global IP and PORT, include: TCP/UDP information configured for the IoT application; the TCP/UDP information includes one or more of the following: endpoint, type, protocol, component port, etc. For example, including TCP (Transmission Control Protocol )/UDP (User Datagram Protocol, user datagram protocol) configured such that IoT applications access policies via global IP: PORT, each application corresponding TCP/UDP information includes: domain name, type, advanced routing, credentials, components (ports).
In an exemplary embodiment, after deployment is completed, the IoT application is displayed in a deployed application list of the IoT platform. For example, when clicking on an already deployed application icon or name, a corresponding application interface may be entered. For example, clicking on the intelligent bus can jump to the IoT application intelligent bus login interface. Multiple IoT applications are accessed through the same portal, and operation, maintenance and deployment of the applications are simplified.
In an exemplary embodiment, as shown in fig. 3, after an IoT application is deployed by an IoT platform calling PasS and IaaS (which may be based on public cloud or private cloud) based on a Kubernate micro-service architecture, an IoT application 1 and an IoT plugin are deployed in a Pod corresponding to the IoT application. Where the source code and Docker mirror in the IoT application in fig. 3 refer to the IoT application supporting both source code-based and mirror-based installations. By means of kubernetes Pod, the integration of the IoT application and the IoT plugin is achieved, the complex IoT platform interface interfacing work is completed by the IoT plugin, and meanwhile, the IoT device management function is not required to be redundant to the IoT application, so that the development flow is simplified, and the non-invasive design of service interfacing is achieved.
Wherein, ioT platform: the intelligent sensing, identification and management device is characterized in that any object or process needing to be monitored, connected and interacted is collected in real time through various devices and technologies such as various information sensors, radio frequency identification technologies, global positioning systems, infrared sensors and laser scanners, various needed information such as sound, light, heat, electricity, mechanics, chemistry, biology and positions of the object or process is collected, and the object or the object is connected with people in a ubiquitous mode through various possible network access, so that intelligent sensing, identification and management of the object or the process are realized. The internet of things is an information carrier based on the internet, a traditional telecommunication network and the like, and enables all common physical objects which can be independently addressed to form an interconnection network. PaaS (Platform as a Service): refers to platform as a service. While the corresponding server platform or development environment in the cloud computing era becomes PaaS (Platform as a Service) to provide as a service, the Kubernetes PaaS platform is used in fig. 3 in this example. IaaS (Infrastructure as a Service), infrastructure as a service, is a service mode in which IT infrastructure is provided as a service to the outside through a network and charges for the actual usage or occupancy of resources by a user. Pod: in Kubernetes, pod is the basis for all traffic types, also the minimum unit level of K8S management, which is a combination of one or more containers. These containers share specifications of storage, networks, and namespaces, and how to operate. In Pod, all containers are arranged and scheduled identically and run in a shared context. For a particular application, pod are their logical hosts, pod contains a plurality of application containers related to traffic. Sidecar mode: one implementation IoT application for a Service Mesh architecture, one of the container application modes: an application system that interacts with an IoT platform to enable an internet of things device access.
According to the technical scheme, the docking process is simplified, so that an application developer of the Internet of things can dock with the Internet of things platform like using a local operating system to manage equipment.
According to the technical scheme, the management equipment and the access application on the same platform are realized by providing the IoT application deployment mode on the IoT platform, so that the daily work habit of a user is met.
In an embodiment, the IoT platform provides IoT application management functionality that also includes functionality such as application maintenance.
In an example embodiment, the IoT application that has been deployed is run and maintained on the IoT platform using the IoT application management function. For example, the IoT platform includes a display screen that may display an IoT platform user login page, after the user has successfully logged in, an application management page that may display options such as applications and application dimensions, and may click on an application dimension and then enter an application list page from which an application to be dimension is selected. For example, the IoT platform may integrate PaaS platform application operation and maintenance functions, and clicking on the remote operation and maintenance may jump to the inside of the corresponding dock container for the corresponding IoT application for application operation and maintenance. And the IoT platform is accessed by the passive waiting IoT application, and realizes the capability of an operating system of the internet of things by actively taking account of device management, running and operation and maintenance operations of the IoT application.
An embodiment of the present invention provides an access method for an IoT application to access an IoT device, where the IoT application is deployed onto an IoT platform using the deployment method described in any of the examples above, where the IoT application and a corresponding IoT plugin are deployed into different containers of the same Pod, as shown in fig. 4, the method includes:
step 401, the IoT plugin obtains an access message sent by the IoT application to an IoT device;
in step 402, the IoT plugin encapsulates the access message into a corresponding request message according to a preset protocol parameter, and sends the encapsulated request message to an IoT platform, so that the IoT platform forwards the access message to the IoT device.
In an example embodiment, the IoT plug-in obtains access messages sent by the IoT application to the IoT device by one or more of:
directly receiving access messages sent by the IoT application
And acquiring the access message from a transmission message queue deployed in the Pod, wherein the access message sent by the IoT application is stored in the transmission message queue.
In an example embodiment, the encapsulated request message is sent to the IoT device by:
and sending the packaged request message to the IoT platform, so that the IoT platform converts the received request message into a format supported by the IoT device and forwards the converted request message to the IoT device through a corresponding gateway.
In an exemplary embodiment, the method further comprises:
the IoT plug-in obtains a response message of the request message returned by the IoT device;
the IoT plug-in de-encapsulates the response message into a response message of the access message according to a preset protocol parameter, and sends the response message of the access message to the IoT application.
In an example embodiment, the IoT plug-in obtains the response message returned by the IoT device by:
the response message sent by the IoT device is received through the IoT platform and a corresponding gateway.
In an example embodiment, the IoT plug-in sends the response message to the IoT application in one or more of the following ways:
directly sending the response message to the IoT application:
placing the response message in a receive message queue deployed in the Pod, such that the IoT application obtains the response message from the receive message queue.
In an exemplary embodiment, the protocol parameter is a restful parameter.
In an exemplary embodiment, before encapsulating the access message into a corresponding request message, the method further comprises:
the IoT plugin performs identity authentication on the IoT application according to pre-stored authentication information;
and after the authentication is passed, packaging the access message into a corresponding request message according to preset protocol parameters.
According to the technical scheme provided by the embodiment of the invention, the IoT application can access the IoT device through the IoT plugin as the local device, and the IoT device management function is not required to be configured in the IoT application.
An embodiment of the present invention provides an access method for an IoT application to access an IoT device, wherein the IoT application is deployed onto an IoT platform using the deployment method described in any of the examples above, wherein the IoT application and a corresponding IoT plugin are deployed into different containers of the same Pod; and a sending message queue and a receiving message queue are deployed in the Pod.
In an exemplary embodiment, as shown in fig. 5, an IoT Pod is deployed in a kubernetes node, an IoT application container and an IoT plugin container are deployed in the Pod, and a send message queue and a receive message queue are deployed.
As shown in fig. 6, the method includes:
step 601, the IoT application puts an access message to an IoT device into the send message queue;
in an exemplary embodiment, the IoT application container may pre-create a standard Linux message queue as the send message queue into which access messages sent to IoT devices may be written directly. For example, ioT applications send messages to devices write tuples to a "send message queue": [ message_id, device_id, name, message ].
In an example embodiment, the IoT application may also send an access message to an IoT device directly to the IoT plugin. Because the IoT application and the IoT plugin are located in the same Pod, the IoT application and the IoT plugin can share the same IPC namespace by means of containers of the same Pod, and the two communications can use standard process communications, such as a SystemV signaling system or a POSIX shared memory, etc.
Step 602, the IoT plugin obtains the access message from the send message queue;
step 603, the IoT plugin encapsulates the restful request message according to a preset restful parameter, and sends the encapsulated restful request message to the IoT platform;
in an exemplary embodiment, the restful parameters include: URI parameters, request parameters, and response parameters.
In an exemplary embodiment, the URI parameters include: request method, URI, transport protocol, address, etc.
In an exemplary embodiment, the content of the URI parameters is shown in FIG. 7.
In an exemplary embodiment, the request parameters include one or more of the following: app_id and corresponding parameters, device_id and corresponding parameters, message_id and corresponding parameter book, name and corresponding parameters, message and corresponding parameters, and so on; the corresponding parameters may include information on the necessaries/alternatives, type, location, description, etc.
In an exemplary embodiment, the contents of the request parameters are shown in FIG. 8.
In an exemplary embodiment, the response parameters include: message_id and corresponding parameters and result and corresponding parameters, etc.; the corresponding parameters may include information of type, description, etc.
In an exemplary embodiment, the content of the response parameters is shown in FIG. 9.
In an exemplary embodiment, the IoT plugin stores information such as an IoT application ID and an IoT platform access address in advance, and sends the encapsulated restful request message to the IoT platform according to the information.
In an exemplary embodiment, the IoT plugin stores in advance authentication information created by the IoT platform for the IoT application, when the IoT plugin receives a request message sent by the IoT application, the IoT plugin authenticates the IoT application according to the stored authentication message, and when the authentication is passed, the IoT plugin performs subsequent operations. In the access process, since the authentication information created by the IoT platform for the IoT application is automatically integrated into the IoT plugin when the IoT platform deploys the IoT application, authentication can be directly completed by the IoT plugin, and the IoT application can access the IoT device as if accessing the local device without authentication.
In step 604, the IoT platform converts the received restful request message into a format supported by the IoT device and forwards the restful request message to the IoT device through a corresponding gateway.
In an example embodiment, the IoT platform pre-stores format information supported by the various IoT devices.
In an exemplary embodiment, the gateway may pre-store the addresses of the subordinate IoT devices.
According to the technical scheme provided by the embodiment of the invention, the IoT application can access the IoT device through the IoT plugin as the local device, and the IoT device management function is not required to be configured in the IoT application.
In another embodiment of the present invention, based on the previous embodiment, as shown in fig. 10, the method further includes:
step 605, the IoT device performs data processing according to the received access message, and forwards the corresponding data processing result to the IoT platform as a response message through the gateway;
in an exemplary embodiment, the gateway may pre-store the various IoT platform access addresses, ioT application IDs: app_id, etc.
Step 606, the IoT platform encapsulates the response message into a restful response message and forwards to the IoT plugin;
step 607, the IoT plugin de-encapsulates the received restful response message according to a preset restful parameter to obtain the response message, and puts the response message into the received message queue;
in an example embodiment, the IoT plugin pre-creates a receive message queue to which messages received from the IoT platform are written.
At step 608, the IoT application obtains the response message from the receive message queue.
According to the technical scheme, by introducing the IoT plugin, all the work of interfacing with the IoT platform is responsible, the shielding application interfaces with the IoT platform restful service, the IoT application only needs to manage the content of the device in a mode of issuing the message to the queue, other IoT platform interfacing operations are completed by the IoT plugin, the access flow of the IoT application is simplified, the interfacing complexity of the IoT application and the IoT platform is reduced, and the standardized flow is formed.
An embodiment of the present invention further provides an IoT platform device, as shown in fig. 11, including: a processor and a memory storing a computer program executable on the processor, wherein the processor implements the deployment method of any of the examples above, or implements the access method of any of the examples above, when executing the computer program.
An embodiment of the present invention also provides a computer readable storage medium storing a computer program, where the computer program when executed by a processor implements the deployment method described in any of the above examples, or the access method described in any of the above examples.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, functional modules/units in the apparatus, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.

Claims (15)

1. A deployment method for deploying an IoT application at an internet of things IoT platform, the method comprising:
the IoT platform obtains an IoT application deployment request, the IoT application deployment request comprising: installation information of IoT applications to be deployed;
the IoT platform configures a corresponding IoT plugin for the IoT application according to the IoT application deployment request, and deploys the IoT application and the IoT plugin into different containers of the same Pod;
the IoT platform establishing a mapping between the IoT application and a corresponding container to enable deployment of the IoT application to the IoT platform;
wherein the IoT plugin is configured to enable message forwarding between an IoT application and an IoT platform.
2. The deployment method of claim 1, wherein the IoT platform is pre-deployed as a PaaS platform application onto a platform-as-a-service PaaS platform;
the IoT platform invoking the PaaS platform deploys the IoT application and IoT plugin into different containers of the same Pod by:
acquiring a dock mirror image corresponding to the IoT application according to the IoT application deployment request;
creating a corresponding Pod for the IoT application, and deploying an IoT application container and an IoT plugin container in the Pod according to a dock image and the IoT plugin corresponding to the IoT application;
scheduling a virtual machine to run the IoT application container and the IoT plugin container.
3. The deployment method of claim 2, wherein,
when the installation mode of the components in the IoT application is based on source code installation, the installation information includes: the address and code version of the component source code; the IoT platform invokes the PaaS platform to obtain a dock image corresponding to the IoT application by:
creating a source code compiling temporary docker container, and scheduling a virtual machine to operate the source code compiling temporary docker container;
pulling the source code according to the address and the code version of the source code, and compiling the pulled source code into an executable program by utilizing the source code compiling temporary dock container;
and packaging the compiled executable program and the running environment to generate a dock mirror image corresponding to the IoT application.
4. The deployment method of claim 2, wherein,
when the installation manner of the components in the IoT application is based on mirror image installation, the installation information includes: the address where the component mirror is located; the IoT platform invokes the PaaS platform to obtain a dock image corresponding to the IoT application by:
and pulling the mirror image to be used as a dock mirror image corresponding to the IoT application according to the address where the mirror image is located.
5. The deployment method of claim 2, wherein the IoT platform invokes the PaaS platform to create a corresponding Pod for the IoT application and deploy an IoT application container and an IoT plugin container in the Pod by:
creating a corresponding Pod for the IoT application using a kubernetes platform;
and according to the dock mirror image corresponding to the IoT application and the IoT plugin, an IoT application container corresponding to the IoT application and an IoT plugin container corresponding to the IoT plugin are deployed in the Pod.
6. The deployment method of claim 1, wherein the IoT platform establishes a mapping between the IoT applications and corresponding containers by:
mapping the domain name of the IoT application with a virtual host IP and a port, and mapping the virtual host IP and the port with a container port corresponding to the IoT application.
7. The deployment method of claim 1, further comprising:
the IoT platform creates authentication information for the IoT application and integrates into the IoT plugin.
8. An access method for an IoT application to access IoT devices, wherein the IoT application is deployed onto an IoT platform using the deployment method of any of claims 1-7, wherein the IoT application and corresponding IoT plugins are deployed into different containers of the same Pod; the method comprises the following steps:
the IoT plug-in obtaining an access message sent by the IoT application to an IoT device;
the IoT plugin encapsulates the access message into a corresponding request message according to a preset protocol parameter, and sends the encapsulated request message to an IoT platform, so that the IoT platform forwards the access message to the IoT device.
9. The access method of claim 8, wherein the IoT plug-in obtains the access message sent by the IoT application to the IoT device by one or more of:
directly receiving access messages sent by the IoT application
And acquiring the access message from a transmission message queue deployed in the Pod, wherein the access message sent by the IoT application is stored in the transmission message queue.
10. The access method of claim 8, wherein the method further comprises:
the IoT plug-in obtains a response message of the request message returned by the IoT device;
the IoT plug-in de-encapsulates the response message into a response message of the access message according to a preset protocol parameter, and sends the response message of the access message to the IoT application.
11. The access method of claim 10, wherein,
the IoT plug-in sends a response message to the access message to the IoT application by one or more of:
directly sending the response message to the IoT application:
placing the response message in a receive message queue deployed in the Pod, such that the IoT application obtains the response message from the receive message queue.
12. The access method according to any of claims 8-11, wherein the protocol parameter is a restful parameter.
13. The access method of claim 8, wherein prior to encapsulating the access message into a corresponding request message, the method further comprises:
the IoT plugin performs identity authentication on the IoT application according to pre-stored authentication information;
and after the authentication is passed, packaging the access message into a corresponding request message according to preset protocol parameters.
14. An IoT platform device, comprising: a processor and a memory storing a computer program executable on the processor, wherein the processor implements the deployment method according to any one of claims 1 to 7 or the access method according to any one of claims 8 to 13 when executing the computer program.
15. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the deployment method of any of claims 1 to 7 or the access method of any of claims 8 to 13.
CN202011339483.XA 2020-11-25 2020-11-25 Deployment method, access method, device, system and computer readable storage medium Active CN112532715B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011339483.XA CN112532715B (en) 2020-11-25 2020-11-25 Deployment method, access method, device, system and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011339483.XA CN112532715B (en) 2020-11-25 2020-11-25 Deployment method, access method, device, system and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112532715A CN112532715A (en) 2021-03-19
CN112532715B true CN112532715B (en) 2023-05-09

Family

ID=74993697

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011339483.XA Active CN112532715B (en) 2020-11-25 2020-11-25 Deployment method, access method, device, system and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112532715B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10255067B2 (en) * 2016-11-22 2019-04-09 Sap Se Development of internet of things (IoT) applications
CN108959046B (en) * 2018-06-08 2020-10-30 联想(北京)有限公司 Information processing method, equipment and device
US10558457B1 (en) * 2018-08-24 2020-02-11 Dais Technology, LLC Platform discovery and deployment automation system
CN109947489A (en) * 2019-03-19 2019-06-28 佳都新太科技股份有限公司 External equipment management method, device, equipment and storage medium based on container
CN111049876A (en) * 2019-10-18 2020-04-21 烽火通信科技股份有限公司 Lightweight telecom cloud edge computing system architecture
CN111866084A (en) * 2020-06-24 2020-10-30 北京智芯微电子科技有限公司 Container-based edge internet of things agent device

Also Published As

Publication number Publication date
CN112532715A (en) 2021-03-19

Similar Documents

Publication Publication Date Title
US11095711B2 (en) DNS Resolution of internal tenant-specific domain addresses in a multi-tenant computing environment
US10764244B1 (en) Systems and methods providing a multi-cloud microservices gateway using a sidecar proxy
US11184224B2 (en) System, method and compute program product for accessing a device on a network
CN109561171B (en) Configuration method and device of virtual private cloud service
CN106575305B (en) Services within a reverse proxy server
CN107615716B (en) Multi-tenant aware Dynamic Host Configuration Protocol (DHCP) mechanism for cloud networking
KR102191347B1 (en) Security configuration of cloud computing nodes
EP3292468B1 (en) Virtual host isolation
CN111290865A (en) Service calling method and device, electronic equipment and storage medium
CN111316613B (en) Access gateway management console
US20180262597A1 (en) Universal quality of service for internet of things devices
CN111431956B (en) Cross-network service access method, device, system and storage medium
CN109150978A (en) The method and apparatus for debugging micro services
US20140359001A1 (en) Multimedia device configured to provide both client and server aspects of a network service
Da Silva et al. Internet of things out of the box: using TOSCA for automating the deployment of IoT environments
CN111316612A (en) Access gateway management console
CN111316617A (en) Access gateway management console
CN113572689A (en) Microservice gateway management method, system, device, readable storage medium and product
CN111885123A (en) Construction method and device of cross-K8 s target service access channel
CN113301116A (en) Cross-network communication method, device, system and equipment for microservice application
CN114205342B (en) Service debugging routing method, electronic equipment and medium
CN113312168A (en) Page access method and electronic equipment
US10785056B1 (en) Sharing a subnet of a logically isolated network between client accounts of a provider network
CN112532715B (en) Deployment method, access method, device, system and computer readable storage medium
CN110798504B (en) Method, device, management equipment and storage medium for cross-region sharing service

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant