Disclosure of Invention
The purpose of the invention is as follows: aiming at the defects of the prior art, the invention provides a method for realizing an Internet of things intelligent service system based on Kaa Project.
The invention further aims to provide a corresponding Kaa Project-based intelligent service system of the Internet of things.
The technical scheme is as follows: in order to achieve the above object, the method for implementing an internet of things intelligent service system based on Kaa Project according to the present invention implements a service architecture for cross-industry and cross-platform information sharing and interconnection and interworking by constructing a 3S terminal control system based on Kaa kernel, where the 3S terminal control system based on Kaa kernel includes a terminal aggregation control platform, a network management control platform, and a service aggregation control platform, and specifically includes the following steps:
the method comprises the steps that a complex service scene under a ubiquitous environment is used as a drive, a terminal aggregation control platform is built in a Software defined mode based on an SDK (Software Development Kit) of a Kaa Project Internet of things middleware platform, the terminal aggregation control platform is used for aggregating massive heterogeneous terminals to form a unified virtual terminal, and a corresponding API (application programming interface) connected with a network management control platform and a service aggregation control platform is provided;
the method comprises the steps that an existing SDN (Software Defined Network) is used as a basic framework, a Network management strategy facing complex services and a heterogeneous Network virtualization technology are combined, resources of a Network layer are converted into an object capable of being dynamically controlled by a program through mapping processing, a Network management control platform is built on the basis, and multi-dimensional joint optimization of resources such as communication, calculation and storage is achieved;
the service aggregation control platform is built by taking the service semantic description technology, the service matching and calculation analysis technology as supports, a corresponding service bus registration interface is configured for the platform, and a corresponding service registration management module is arranged on a service bus so as to support a user to customize the personalized internet of things service.
Preferably, the method further comprises: and establishing an Internet of things intelligent service access platform based on a B/S (Browser/Server) mode and/or a C/S (Client/Server) mode, and deploying the Internet of things intelligent service access platform to a public network environment. The access platform is a public open platform integrating an Internet of things intelligent service store and a simulation experiment, can realize cross-industry and cross-platform Internet of things service, resource sharing and interconnection and intercommunication among systems, breaks resource barriers among different departments, and enables the Internet of things to be applied to better serve various industries in China.
Preferably, the implementation steps of the terminal aggregation control platform are as follows:
the Kaa platform is used for configuring the structure of data information and control information of the heterogeneous terminal;
configuring Kaa Event monitoring rules of an Event Listener module in a kernel to realize communication between heterogeneous devices;
generating corresponding SDKs based on different operation platforms of the terminal equipment, and embedding the SDKs into actual terminal application programs;
a terminal management platform is designed based on an Kaa kernel, a Server API is mainly packaged, returned information fed back by a terminal can be dynamically and real-timely received, then the information is processed in real time based on a resource representation model and a multi-terminal aggregation algorithm facing to the service of the Internet of things to construct a virtual terminal facing to a complex service scene, and a processing result is timely notified to a network layer.
Preferably, the constructing of the resource representation model for the services of the internet of things includes: the method is characterized in that the Services and resources of the internet of things are described based on OWL-S (ontology Language for web Services), and a corresponding mapping relation is established between the Services and the resources. Wherein, Profile in the OWL-S framework is used for describing service outline, namely, what the service is used for; the Model is a process Model and is mainly used for describing the internal flow of the service by a service provider; grouping refers to a service basis, and is mainly used for defining how to access the service; IoT Resources is used primarily to describe the set of physical Resources that can provide the service; specific Ontology refers to an Ontology model in some specific application-specific domains.
Preferably, the multi-terminal aggregation algorithm converts a terminal set problem configured optimally for each user service of a service layer under a resource-limited condition into a multi-terminal aggregation problem by integrating a service model and a resource model, converts the problem into a typical multi-choice multi-dimensional knapsack problem by dimension reduction, and solves the problem based on an ant colony algorithm.
Preferably, the network management control platform comprises the following implementation steps:
a listener module is added in the program design, the module is set to automatically start a plurality of processes to monitor the change of the environment information of the heterogeneous terminal in real time, and corresponding network parameters are preset in advance to feed back the changes to a network control center in time in a TCP or UDP mode;
designing a related timing program in a network control center module to periodically monitor the condition of the network, and connecting the program to a local dynamic policy library to delete or modify a related local policy according to the congestion condition, the calculation condition and the storage condition of the network at any time;
designing a network parameter dynamic configuration module, and connecting the module to a dynamic policy library to dynamically monitor changes of the policy library (the changes are caused by the previous step) so as to configure network parameters in real time and map the parameters to corresponding virtual network resources to manage the network in real time.
Preferably, the service aggregation control platform is implemented as follows:
configuring a corresponding Json data analysis and generation module in an upper-layer service bus program to uniformly analyze service requests transmitted from an application layer;
a semantic matching module is added in the platform program design, Json data transmitted by a service bus is analyzed and then matched with a local service library, the service is decomposed into a combination form of a plurality of sub-services, and a corresponding service relation expression matrix is matched;
and adding a communication link management and scheduling module in the platform, calling an API (application programming interface) of a virtual terminal corresponding to the terminal aggregation management platform through the communication link management and scheduling module by utilizing the sub-service ID data matched in the last step, and setting a corresponding program to automatically select a proper virtual terminal to access to a corresponding network according to the environment of the user so as to support the execution of specific application.
An Internet of things intelligent service system based on Kaa Project comprises a 3S terminal control system based on Kaa kernel, a 3S service analysis and management system and a client access system, wherein,
the 3S terminal control system based on the Kaa kernel utilizes Kaa good cross-platform and cross-network characteristics to realize management of a heterogeneous terminal cluster by taking a ubiquitous heterogeneous network as a bridge, receives data fed back by a sensing layer, constructs a virtual terminal according to a service request of an application layer, and opens a corresponding API (application programming interface) for service call of an upper layer 3S service analysis and management system;
the 3S service analysis and management system receives a service request sent by a client access system in real time, analyzes the service according to a certain format to generate data in a Json format, and timely transmits the request to a 3S terminal control system based on Kaa kernels;
the client access system is an Internet of things intelligent service access platform established based on a B/S mode and/or a C/S mode, receives an Internet of things service request of a user in a portal or client APP mode, formats the request data and submits the request data to the 3S service analysis and management system, and receives the analysis result of the service request in real time for the user to check and use.
Preferably, the Kaa kernel-based 3S terminal control system comprises a terminal aggregation control platform, a network management control platform and a service aggregation control platform, wherein,
the terminal aggregation control platform is configured to monitor available cooperative terminals around in real time by using an Event Listener mechanism of an Kaa kernel, and dynamically receive state information fed back by the heterogeneous terminals and timely report the state information to the network management control platform;
the network management control platform is configured to utilize a network management strategy facing complex services and a heterogeneous network virtualization technology to cooperate with various wireless network resources based on feedback information received from the terminal aggregation control platform, and convert the resources of a network layer into an object dynamically controlled by an available program through mapping processing;
the service aggregation control platform is configured to receive and process a service request sent by the application layer, and in combination with a service representation model facing the internet of things service and a service combination and analysis strategy based on an ant colony optimization algorithm, the service generation and decision, the data analysis and processing and the terminal cooperation are realized, and a calculation result is fed back to the network management control platform in time so as to call a corresponding virtual terminal access interface of the terminal aggregation control platform to execute a specific application.
Has the advantages that:
1. the invention provides a scheme for realizing an Internet of things intelligent service system based on Kaa Project, three programmable control platforms are designed based on Kaa kernels, a general Internet of things intelligent service system architecture is realized in a software definition mode, and the problems of non-uniform data, difficult resource reuse and lack of an interconnection mechanism of interconnection and intercommunication existing in the current Internet of things application of different systems and different industries can be effectively solved.
2. According to the invention, the characteristics of good cross-Platform performance, low coupling performance, open source performance and the like of the Kaa open source Platform are fully utilized, a 3S intelligent terminal control system is designed based on the Kaa IoT Platform kernel, and efficient management and scheduling of a mass heterogeneous terminal in the Internet of things can be realized conveniently.
3. The invention provides a unified representation model of services and resources in the ubiquitous environment of the Internet of things aiming at the problem of heterogeneity of information and services of the Internet of things, and the model can provide theoretical support for unified description of services and resources of the Internet of things to a certain extent so as to meet the future diversified development requirements of the Internet of things.
4. Aiming at the problems of space-time correlation and resource limitation of the service of the Internet of things, the invention utilizes a multi-terminal aggregation algorithm facing the service of the Internet of things, converts the optimal terminal set configuration problem into a multi-selection multi-dimensional knapsack problem and solves the problem based on an ant colony algorithm, so that the optimal terminal set can be reasonably configured for each user service of a service layer under the environment of the Internet of things with limited terminal resource capacity, and the use efficiency of ubiquitous terminal resources in the Internet of things is improved.
Detailed Description
The technical scheme of the invention is further explained by combining the attached drawings.
Referring to fig. 1, in one embodiment, a control architecture of an internet of things intelligent service system based on Kaa Project builds a service architecture capable of realizing cross-industry and cross-platform information sharing and interconnection and intercommunication based on a 3S terminal control system, and the 3S terminal control system is implemented based on Kaa kernel and includes three programmable control platforms, namely a terminal aggregation control platform, a network management control platform and a service aggregation control platform. The three programmable control platforms follow the concept of 'high cohesion and low coupling' acknowledged in the field of software design, namely, on the premise of keeping the internal connection of software, a software system is decomposed, the complexity of software system development is reduced, the three control platforms carry out control information interaction in an API mode, and the execution of complex services in an application scene of support connection is supported through the combination and cooperation of all modules.
In the design of a terminal aggregation control platform, an Event Listener mechanism of an Kaa kernel is utilized to perform secondary development on an SDK, a corresponding SDK is configured in a heterogeneous terminal, and a Transport module of the SDK dynamically adjusts a communication mode of the terminal according to different hardware platforms, so that the effect of monitoring available heterogeneous cooperative terminals around in real time is achieved, and state information fed back by the heterogeneous terminal is dynamically received and timely reported to a superior processing unit. In order to facilitate heterogeneous terminal management, the layer introduces a resource representation model and various end aggregation strategies facing to the internet of things service, abstracts massive heterogeneous terminal resources, abstracts a unified internet of things resource model according to the principle of complete unification of relations, entities, data resource types and the like, and a terminal aggregation control platform aggregates massive heterogeneous terminals to form a unified virtual terminal according to the model and in combination with actual service requirements and provides a corresponding API upwards. The specific implementation process comprises the following steps:
the Kaa platform is used for configuring the structure of data information and control information of the heterogeneous terminal, and a data interaction format of Json or XML can be adopted;
configuring Kaa Event monitoring rules of an Event Listener module in a kernel to realize communication between heterogeneous devices;
generating corresponding SDKs based on different operation platforms of the terminal equipment, and embedding the SDKs into actual terminal application programs, such as platforms of Linux, QNX Neutrino RTOS, Android, Raspberry Pi, ESP8266 and the like;
a terminal management platform is designed based on an Kaa kernel, a Server API is mainly packaged, returned information fed back by a terminal can be dynamically and real-timely received, then the information is processed in real time based on a resource representation model and a multi-terminal aggregation algorithm facing to the service of the Internet of things to construct a virtual terminal (logic combination of heterogeneous terminal functions) facing to a complex service scene, and a processing result is timely notified to a network layer.
The resource representation Model for the services of the internet of things is mainly structurally shown in fig. 2, develops descriptions of services and resources of the internet of things from three main aspects (Service Profile, Service Model and Service group) of an OWL-S framework by using the basic idea of OWL-S, and establishes a corresponding mapping relation with resource entities in a context environment, wherein the Profile represents the outline of the services, or describes what the services are used for; the Model is a process Model and is mainly used for describing the internal flow of the service by a service provider; grouping refers to a service basis, and mainly defines how to access the service; IoT Resources is used primarily to describe the set of physical Resources that can provide the service; specific Ontology refers to an Ontology model in some specific application-specific fields, and a large number of researchers or organizations have been beginning to research and model ontologies in different fields. The abstraction process of IoT Resource terminal resources is shown in fig. 3, massive devices of the internet of things exist in a device layer, the devices are heterogeneous and various (collectively referred to as terminals herein), and the devices are abstracted into various corresponding resources according to device characteristics in the Resource layer, for example, a sensor device is abstracted into sensing resources, an actuator is abstracted into control resources, and the like; and finally, the service release of various resources is realized by a uniform interface, so that various service functions and applications are realized.
Based on the expression model of the services and resources of the Internet of things, massive services and resources are described, a corresponding mapping relation is established between the services and the resources, and finally the model is realized in an XML description document mode so as to facilitate the analysis and the processing of a computer. The model can overcome the defect that the bottom layer terminal resources and the upper layer application entities in the existing shaft type application mode are in a close coupling relation so that the system cannot be flexibly changed along with the change of the situation in the operation process.
The multi-terminal aggregation algorithm for the services of the internet of things is used for solving the problems of how to ensure maximization and smoothness of service benefits under the condition that the resources of the terminals of the internet of things are limited, and how to reasonably configure an optimal terminal set for each user service of a service layer so as to improve the use benefits of ubiquitous terminal resources in the internet of things. The invention solves the problem by converting the optimal terminal set configuration problem into a multi-selection multi-dimensional knapsack problem and based on an ant colony algorithm. The terminal aggregation control platform receives terminal information fed back by the heterogeneous terminal cluster on one hand and receives service request information transmitted by the service aggregation control platform on the other hand, the information of the two aspects is used as input parameters of an ant colony algorithm, then the ant colony algorithm obtains an optimal device set at the current moment through calculation, and terminal devices in the optimal device set are mutually combined to form the virtual terminal to support the service request currently received by the service aggregation control platform. The algorithmic process is detailed below.
The Problem is modeled into a Multi-Terminal Aggregation Problem (MTAP) by combining the aforementioned Service Model (SM) and resource model (RS), and the mathematical model of the Problem is shown in formula (1):
in formula (1), U (i, C)i,s) A certain cooperative terminal set C corresponding to the representation service ii,sX throughi,sThe value of the benefit function after treatment, andexpressing the ideal benefit function value of the cooperative terminal set; i represents the total amount of service requests in the period of time; siRepresenting the number of the cooperative terminal sets corresponding to the service i; viRepresenting how many sub-services a service i can be decomposed into; w represents the second capability of terminal k; wkThe total number of types of k capabilities of the terminal is represented; k represents the total number of terminals;representing a terminal capability value required by a sub-service V of the service i; and e indicates which connection is occupied; j indicates which link the connection will occupy; j represents the total number of links; eiRepresenting the total number of connections to be occupied by service i;a capability value representing the e-connection required by service i; t isk,wAnd LjRespectively representing the capability upper limit values corresponding to the terminal and the link. Three 0-1 variables xi,s,Andthe definition of (2) is as follows:
as shown in (1), the MTAP problem model is a two-dimensional constraint combination optimization problem, and in order to reduce the solution complexity, in the embodiment, the problem is converted into a typical Multi-Choice Multi-dimensional Knapsack problem (MMKP) through a Dimension reduction process, that is, two constraints on terminal capability and link capacity in the MTAP are combined into a one-dimensional constraintThe conversion formula is shown in formula (3):
in the formula (3), k' represents a combination of the formula (1)Anda unique constraint variable of (a);Sa set of cooperating terminals representing a service i; viRepresenting how many sub-services a service i can be decomposed into; w represents the total number of categories of terminal capabilities (here it is assumed that the total number of capabilities of each type of terminal is the same); k represents the total number of terminals;representing a terminal capability value required by a sub-service V of the service i; and e indicates which connection is occupied; (K' -K.W) indicates which link the connection is to occupy; o represents the total number of links; eiRepresenting the total number of connections to be occupied by service i;a capability value representing the e-connection required by service i;and Lk'-K·WRespectively representing the capability upper limit values corresponding to the terminal and the link.
Thus, the MATP problem can be transformed into a one-dimensional constrained MMKP mathematical model, as shown in equation (4):
wherein,is a variable from 0 to 1, which is defined as follows:
the MMKP problem is a typical NP-Hard problem with a wide engineering background, and many practical application problems can be described as MMKP models, such as inventory compression problems and distributed computing system processor allocation policy problems, and the MMKP problem is solved by introducing Ant colony optimization Algorithm (ACO), which has been successfully applied to solve the problems of traveling salesman, quadratic assignment and sorting, and the Ant colony algorithm model is appropriately modified to form an ACO-MTA (Ant colony optimization-multiple-Terminal Aggregation) algorithm to adapt to the MMKP problem model, and the main processes of the ACO-MTA algorithm are described below.
Taking each ant as a selector of a terminal cooperation set (TAS), the ants can leave what is called pheromone in the moving process, the amount of released pheromone is controlled by the following formula (6) updating model, under the model, the concentration of the pheromone is strongest at the position of the TAS with higher comprehensive benefit value and less consumed resource amount (commonly called as a place with higher cost performance), all ants can select the TAS according to the distribution condition of the current pheromone in each iteration, the higher the concentration of the pheromone of a certain TAS is, the higher the probability of being selected is, the pheromone has certain volatilization, and the selection of the TAS is restricted by the formula (3).
When the ACO algorithm is applied to different scenes, the pheromone update model is often different, and the pheromone update process of each TAS of the ACO-MTA algorithm is shown as a formula (6).
In the above formula, Q is a constant and can be set to 1;the pheromone increment generated when the kth ant passes through the set of the s TAS terminal; rho is equal to [0,1 ]]The volatilization degree of the pheromone is represented, the closer the value is to 1, the larger the volatilization of the pheromone is, and the negative is; and CkIt represents the sum of the benefit values of all TAS selected by the kth ant. As can be seen from the above formula, the higher the profit value of TAS,the larger the corresponding pheromone increment. By the next iteration, all ants will be based on the latest pheromone vector τs(t + n) to calculate the probability of each TAS being selected, and after a number of iterations, to select the best device set for the current time.
The network management control platform is used for coordinating various wireless network resources by using a network management strategy facing complex services and a heterogeneous network virtualization technology based on received feedback information of the terminal aggregation control platform, converting resources of a network layer into an object dynamically controlled by an available program through mapping processing, realizing multi-dimensional joint optimization of resources such as communication, calculation, storage and the like, and providing network services for users in a dynamic and self-adjusting mode. The design of the network management control platform can be divided into the following steps:
a listener module is added in the program design, the module is set to automatically start a plurality of processes to monitor the change of the environment information of the heterogeneous terminal in real time, and corresponding network parameters are preset in advance to feed back the changes to a network control center in time in a TCP or UDP mode;
designing a related timing program in a network control center module to periodically monitor the condition of the network, and connecting the program to a local dynamic policy library to delete or modify a related local policy according to the congestion condition, the calculation condition and the storage condition of the network at any time;
designing a network parameter dynamic configuration module, and connecting the module to a dynamic policy library to dynamically monitor changes of the policy library (the changes are caused by the previous step), so as to configure network parameters in real time and map the parameters to corresponding virtual network resources, thereby managing the network in real time.
The heterogeneous network virtualization technology is characterized in that a plurality of heterogeneous virtual networks are constructed in parallel on a physical network through mechanisms of resource modeling, abstraction, allocation and the like of the heterogeneous physical networks, the heterogeneous virtual networks coexist and share underlying physical network resources, and a user is allowed to specifically allocate resources required to be utilized, so that each virtual network can customize respective architecture, protocol and the like according to service requirements to improve the network utilization rate, realize multi-dimensional joint optimization of resources such as communication, calculation, storage and the like, and provide network services for the user in a dynamic and self-adjusting mode. According to different resource management content embodiments, virtual network resource management is divided into the following three specific modules:
the virtual physical resource management module is mainly responsible for constructing a virtual network resource pool based on a bottom physical leased network, dynamically sensing the change of network link resources and adjusting in time;
a resource mapping management module, which maps the corresponding virtual resource to the actual physical network from the perspective of global optimization allocation by combining the current virtual network resource use condition according to the network service request provided by the service layer;
the virtual network management module is used for receiving the personalized network requirements of users based on the characteristics of the multi-service requests of the Internet of things, and can customize respective architectures, protocols and the like according to the service requirements so as to improve the network utilization rate and realize the unified management and scheduling of resources such as communication, calculation, storage and the like.
The service aggregation control platform is used for receiving and processing a service request sent by the application layer, generating and deciding services, analyzing and processing data and coordinating terminals by combining a service representation model facing the services of the Internet of things and a service combination and analysis strategy based on an ant colony optimization algorithm, and timely feeding back a calculation result to the network control platform to call a corresponding virtual terminal access interface of the terminal aggregation control platform to execute specific applications, such as smart agriculture, smart home, smart city and the like. Meanwhile, the service aggregation control platform is set to open a corresponding service configuration interface, the interface is registered to a service bus, and personalized services are customized for users through the programmable configuration module. The main design steps of the service aggregation control platform are as follows:
configuring a corresponding Json data analysis and generation module in a service bus program of an upper layer to uniformly analyze service requests transmitted by an application layer, wherein the service requests can be realized by adopting a third-party open source library, such as Gson, FastJson, Jackson and the like;
a semantic matching module is added in the platform program design, Json data transmitted by a service bus is analyzed and then matched with a local service library, the service type is analyzed, the service is decomposed into a combination form of a plurality of sub-services, and a corresponding service relation expression matrix is matched;
adding a communication link management and scheduling module in the platform, calling an API of a virtual terminal corresponding to the terminal aggregation management platform by using the sub-service ID data matched in the last step through the communication link management and scheduling module, setting a response program to automatically select a proper virtual terminal to access to a corresponding network according to the environment where a user is located so as to support the execution of a specific application, wherein the virtual terminal only reuses and combines a plurality of terminal devices existing in a perception layer, a capability-enhanced virtual terminal is formed by synthesizing the plurality of existing terminal devices, and a system automatically selects a proper virtual terminal to access to the corresponding network according to the environment where the user is located so as to support the execution of the specific application.
According to another embodiment, there is provided a ka Project-based internet of things intelligent service system constructed according to the method, as shown in fig. 4, the architecture is a service architecture capable of implementing cross-industry and cross-platform resource information sharing and interconnection, and specifically includes the following parts: the system comprises a 3S heterogeneous terminal cluster environment, an Internet of things ubiquitous heterogeneous network, a Kaa kernel-based 3S terminal control system, a 3S service analysis and management system and a client access system.
The 3S heterogeneous terminal cluster environment refers to a multi-terminal cooperative application environment formed by massive heterogeneous terminal devices in the Internet of things. With the continuous development of sensor networks, embedded technologies, wireless communication and other internet of things technologies, more and more heterogeneous devices are accessed into the internet of things, so that the access range of the internet of things is expanded, and the problems of high network complexity and resource sharing difficulty are brought. The ubiquitous heterogeneous network of the internet of things comprises various extensible networks such as a mobile ad hoc network, a wireless sensor network and the like, the networks mostly run on different protocols such as NFC, ZigBee and Bluetooth, and the heterogeneity brings certain difficulties to the resource and service interoperation between the networks. Therefore, the 3S heterogeneous terminal cluster environment and the Internet of things ubiquitous heterogeneous network are essentially terminal and network environments objectively existing in the Internet of things environment.
Aiming at the problems, the 3S terminal control system based on the Kaa kernel utilizes Kaa good cross-platform and cross-network characteristics to realize the management of a heterogeneous terminal cluster by taking a ubiquitous heterogeneous network as a bridge, receives data fed back by a sensing layer, and constructs a virtual terminal according to a service request of an application layer. The 3S terminal control system mainly comprises a terminal aggregation control platform, a network management control platform and a service aggregation control platform, wherein corresponding programming interfaces are provided for developers to realize personalized business processing logic. The terminal aggregation control platform is connected with the terminal cluster environment through a heterogeneous network, and in order to solve the problem of representation and management of massive heterogeneous equipment in the heterogeneous terminal cluster environment, the terminal aggregation control platform uses the unified resource representation model and the multi-terminal aggregation algorithm to achieve the construction of the virtual terminal. The network management control platform performs wireless resource management on various networks, provides services for users by cooperating with a wireless network based on a new characteristic expressed by cooperation at a heterogeneous terminal side, and has the functions mainly related to aspects of mobility management, extended terminal management, service shunt transmission, service adaptation and the like. The service aggregation control platform receives and processes the service request sent by the application layer, and combines a service representation model facing the service of the Internet of things, a service combination and analysis strategy based on an ant colony optimization algorithm to realize the generation and decision of the service, the analysis and processing of data and the terminal cooperation, and timely feeds back a calculation result to the network management control platform so as to call a corresponding virtual terminal access interface of the terminal aggregation control platform to execute a specific application.
The terminal aggregation control platform is mainly realized in a software-defined mode based on Kaa kernels, in order to adapt to the characteristics of massive heterogeneous terminals of the internet of things, cooperation and combination of terminal resources of a sensing layer are realized by using Apache ZooKeeper plug-in embedded in Kaa Project, so that a virtual terminal is formed and is called by an upper-layer module, meanwhile, some related data of a storage terminal are cooperatively stored by configuring SQL (structured query language) and NoSQL (NoSQL) type databases and the like in the module, and the structure of the terminal aggregation control platform based on Kaa kernels is shown in FIG. 5. The main working process is as follows:
each Kaa node consists of three parts, namely Control Service, Operations Service and Bootstrap Service, wherein the Control Service manages data of the whole Kaa node, processes API calls from an upper-layer module and an external integrated system, and sends a notification to the Operations Services, and the module is responsible for receiving terminal cooperation information transmitted by an Apache ZooKeeper in real time; the operation Service is mainly used for communicating with a plurality of heterogeneous terminal endpoints at the same time, processing the request information of the endpoints and sending related processing data to the endpoints; the Bootstrap Service is responsible for transmitting the connection parameter information of Operations Services to corresponding heterogeneous terminals, the Bootstrap Service is in real-time communication with the heterogeneous terminals of the sensing layer through a specific SDK, and the connection parameters can comprise IP addresses, TCP ports, security certificates and the like according to different protocol stacks configured by the SDK;
kaa nodes are combined through Apache ZooKeeper plug-ins to form a Kaa cluster, the normal work of the cluster needs the support of SQL, NoSQL and other types of databases to cooperatively store some related data of terminals, and the core function of the Kaa cluster is used as a support to form a virtual terminal for being called by an upper module;
and an Kaa cluster is used as a core part of the terminal aggregation control platform, and APIs (application programming interfaces) of the terminal aggregation control platform and the service aggregation control platform are respectively opened to carry out control data interaction, so that a 3S terminal control system based on a Kaa kernel is formed, and the execution of the service of the Internet of things facing to the complex service scene is supported.
The 3S service analysis and management system receives the service request sent by the client access system in real time, analyzes the service according to a certain format to generate data in a Json format, and timely transmits the request to the Kaa kernel-based 3S terminal control system through the service bus, and the Json light-weight data interaction format is adopted to facilitate the analysis of a computer and improve the service request processing efficiency of the system. The service includes both general services in the traditional network and ubiquitous services in the mobile ad hoc network, the wireless sensor network and the like in the new network environment, and the future service of the internet of things must be multi-source and provided in a manner of enhancing experience by context adaptation, deep personalization and the like. The subsystem configures a service monitoring interface through an application deployed on a WEB server to respond to a service request sent by a client in real time, and transmits request data to a service request receiving module and a processing module, and then transmits the data to a 3S terminal control system for processing.
The client access system is an Internet of things intelligent service access platform established based on a B/S mode and a C/S mode, the access platform receives a service request of a user, formats and processes the request data and submits the request data to the 3S service analysis and management system, and the service analysis system calls a corresponding virtual terminal in the 3S terminal control system based on the Kaa kernel to execute corresponding service after reprocessing. The user directly uses the service through the browser or the mobile terminal APP in a portal access mode. Therefore, the platform can provide various available Internet of things ubiquitous services for the user in the form of an application store, and access the API of the mainstream payment platform, so that the user can combine and use various Internet of things services and resources like online shopping. Meanwhile, in order to facilitate scientific research personnel to carry out relevant tests of the application of the Internet of things, a simulation experiment module of the service and resources of the Internet of things is embedded in the client system and is used by visitors. In specific design, a client access system suitable for the business of the internet of things is designed based on the control architecture and the architecture for implementing the intelligent service system of the internet of things based on ka Project, the main architecture of the system is shown in fig. 6, and the main workflow of the architecture is as follows:
the user inputs own service requirements in the form of a portal website or an APP through the client, and in the embodiment, a ring letter SDK and a science news flight SDK are introduced into an input part to support the user to input in a voice or text mode;
the requirement calculation module calls an API (application program interface) of the 3S service analysis and management system to realize the functions of formatting representation, registration, updating and searching of the service of the Internet of things, providing a calling interface and the like, and a developer can realize a self-defined service management system of the Internet of things by reusing the module without realizing the detailed part of the bottom layer;
the method comprises the steps that the construction of an internet of things service library is realized by utilizing the existing cloud database technology, a large number of sub-service prototypes are stored in the service library, and corresponding references can be provided for service request analysis and matching work of a service aggregation control platform so as to support the quick matching of request services and perform related interactive processing with a service management module;
the service selection and combination module screens the service transmitted by the service management module, and combines and schedules sub-services in the service library according to the limiting conditions such as priority and the like based on a combined optimization algorithm so as to meet the personalized service requirement of a user;
the service execution module calls a corresponding virtual terminal interface to execute a specific application, and timely feeds back the state information of the terminal and the network to the requirement calculation module and the service management module so as to update the policy base and improve the flexibility of the whole system.
The above description is only exemplary of the present invention and should not be taken as limiting the invention, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.