Drive system and method for embedded internet of things devices

By combining a custom driver framework with an embedded real-time operating system, the problem of integrating embedded IoT devices with cloud platform interfaces was solved, enabling devices to quickly access the cloud, improving resource utilization and system reliability, and meeting the needs of business expansion and real-time performance.

CN115243309BActive Publication Date: 2025-11-04BEIJING ESWIN COMPUTING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210728504.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-24
Publication Date
2025-11-04
Estimated Expiration
2042-06-24

AI Technical Summary

Technical Problem

Existing technologies lack effective solutions to integrate the functional interfaces of embedded IoT devices with cloud platforms, resulting in high resource consumption, poor reliability, and difficulty in meeting business expansion and real-time requirements during device access to cloud platforms.

Method used

A driving system and method are provided, including a startup module, a communication module, a control module, and a processing module. By combining a custom driving framework with an embedded real-time operating system, efficient communication and resource integration between the device and the cloud platform are achieved, supporting multi-tasking operation of IoT applications.

Benefits of technology

It enables embedded IoT devices to quickly connect to the cloud, is compatible with various cloud platforms, meets business expansion and real-time requirements, and improves resource utilization and system reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115243309B_ABST
    Figure CN115243309B_ABST
Patent Text Reader

Abstract

The application provides a driving system and method for an embedded Internet of Things device, the driving method comprising: starting and initializing the driving system, and monitoring the starting state and starting number of the driving system in real time; initializing the driving layer of the Internet of Things device, and obtaining the network configuration information and binding activation information of the Internet of Things device; performing network configuration operation on the Internet of Things device based on the network configuration information and binding activation information of the Internet of Things device and the starting number of the driving system; initializing the client of the Internet of Things device, and completing the connection between the client and the cloud server; and executing the sub-service of the application layer of the Internet of Things device. Thus, the gradually increasing service expansion and real-time requirement of the embedded device can be met, the effective use of resource integration is facilitated, and various cloud and embedded Internet of Things devices can be compatible, and the application has a certain universality.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of Internet of Things devices, in particular to a driving system and method for embedded Internet of Things devices. BACKGROUND

[0002] Internet of Things (IOT) refers to real-time collection of various information of articles and equipment through various information sensors, radio frequency identification technology, etc., and information exchange and communication between articles and people through various possible network access, so as to realize intelligent perception, identification and management of articles and processes. As one of the important directions of future information network field development, Internet of Things has been widely concerned in the world. Internet of Things is regarded as the third wave of world information industry after computer, Internet and mobile communication network, and has been widely valued in the world.

[0003] Now the research and development, application, etc. of Internet of Things technology has a certain scale, but there are still many problems to be solved before the realization of the goal of real smart home, such as: research and development of diversified device ends with communication functions such as wifi and Bluetooth, optimization and improvement of cloud server end, data interaction between Internet of Things device side and cloud platform, and how to make application APP more intelligent, humanized and convenient to use; Therefore, the Internet of Things market field will usher in faster development in the future, and at the same time, there are great opportunities and challenges because there are many problems to be solved.

[0004] At present, in the field of Internet of Things technology, the prerequisite for making embedded devices intelligent is that the device can be connected to the cloud server or cloud control platform of the relevant manufacturer. In the development kit provided by the manufacturer's cloud platform, a simple reference example of accessing the cloud is usually given, which involves the sequence of cloud function interface call execution, such as: waiting for device networking, device network state query, cloud communication function initialization, cloud server connection construction. Because these example programs come from the cloud platform and do not involve hardware platform carriers, the reference program for embedded device access is usually not given in the example program. In the process of accessing the cloud platform of the embedded device, the function call of the device system is essential, and how to integrate the function modules of the device system and the cloud platform functions to realize the access of the cloud is an important problem to be solved, and there is no better solution provided at present. SUMMARY

[0005] In order to solve the above technical problems, the present application provides a driving system and method for embedded Internet of Things devices, which can meet the demand of gradually increasing business expansion and real-time of embedded devices, is beneficial to the effective use of resource integration, and can be compatible with various clouds and embedded Internet of Things devices, and has certain universality.

[0006] In one aspect, the present application provides a driving system for embedded Internet of Things devices, wherein the driving system comprises:

[0007] a starting module for implementing a starting operation or a resetting operation of the driving system;

[0008] a communication module for implementing communication between the Internet of Things devices and between the Internet of Things devices and a cloud platform;

[0009] a control module for monitoring a real-time state of the driving system and generating an operation instruction for performing a network configuration operation on the Internet of Things devices according to obtained monitoring information;

[0010] a processing module for accessing the Internet of Things devices according to the control instruction to control the Internet of Things devices to perform corresponding operations.

[0011] Preferably, the aforementioned monitoring information comprises a starting state and a starting number of times of the driving system, a communication state between the Internet of Things devices and between the Internet of Things devices and a cloud server, network configuration information and binding activation information of the Internet of Things devices.

[0012] Preferably, the aforementioned Internet of Things devices comprise:

[0013] a driving layer comprising a processor, a real-time clock, a display, a data bus, a wifi, a Bluetooth, an infrared data communication interface, and a network interface;

[0014] a running environment constructed in an embedded system of the Internet of Things devices, the running environment being used for providing an application program framework, application components and system services for developing and expanding device functions;

[0015] an application layer, the application layer providing an application program interface for developing Internet of Things functions, and a plurality of Internet of Things applications running in a multitasking manner on the application layer.

[0016] Preferably, the aforementioned driving system further comprises:

[0017] a first judging module, the first judging module being used for performing:

[0018] judging whether initialization of the driving layer, the component layer and the dependent library module in the Internet of Things devices is completed, if the initialization is completed, monitoring a starting state and a starting number of times of the driving system in real time, otherwise, directly terminating or resetting the driving system to restart;

[0019] a second judging module, the second judging module being used for performing:

[0020] judging whether the Internet of Things devices directly enter a STA mode or need to perform a network configuration operation.

[0021] The binding information of the current device is acquired and the binding is successful;

[0022] The wifi information of the current device is read, and the number of system start-ups is less than a preset threshold, so that the current device directly enters an STA mode;

[0023] The initialization of the driver layer in the current device is completed,

[0024] If one of the three conditions is not met, incomplete information related to the erasure is executed, and the network configuration operation is re-executed, and after success, the old parameter value information is covered by using new parameters.

[0025] Preferably, the network configuration operation includes at least one of the following: AP network configuration, one-key network configuration, BLE Bluetooth network configuration, and AT instruction network configuration.

[0026] In another aspect, the application also provides a driving method for an embedded Internet of Things device, which is applied to the driving system as described above, and the driving method comprises:

[0027] Starting and initializing the driving system, and monitoring the start-up state and the number of start-ups of the driving system in real time;

[0028] Initializing the driver layer of the Internet of Things device, and acquiring the network configuration information and the binding activation information of the Internet of Things device;

[0029] Based on the network configuration information and the binding activation information of the Internet of Things device, and the number of start-ups of the driving system, the network configuration operation is executed on the Internet of Things device;

[0030] Initializing the client of the Internet of Things device, and completing the connection between the client and the cloud server;

[0031] Executing the sub-service of the application layer of the Internet of Things device.

[0032] Preferably, the step of starting and initializing the driving system, and monitoring the start-up state and the number of start-ups of the driving system in real time comprises:

[0033] Judging whether the initialization of the driver layer, the component layer and the dependent library module in the Internet of Things device is completed, if all the initialization is completed, the start-up state and the number of start-ups of the driving system are monitored in real time; otherwise, the driving system is directly terminated or reset and restarted.

[0034] Preferably, the step of initializing the driver layer of the Internet of Things device, and acquiring the network configuration information and the binding activation information of the Internet of Things device further comprises:

[0035] The starting monitoring thread of the driving system is created to monitor the starting state of the driving system in real time to determine whether to perform the reset operation of the driving system according to the stable running time and the starting number of the driving system.

[0036] Preferably, the step of obtaining the commissioning information and the binding activation information of the Internet of Things device comprises:

[0037] The WiFi configuration information is read from the component layer in the Internet of Things device.

[0038] Alternatively, the communication module is used to communicate with the cloud server or the application program corresponding to the cloud server to obtain the commissioning information and the binding activation information of the Internet of Things device.

[0039] Preferably, the step of performing the commissioning operation on the Internet of Things device based on the commissioning information and the binding activation information of the Internet of Things device and the starting number of the driving system comprises:

[0040] The following three conditions are judged: whether the Internet of Things device directly enters the STA mode or needs to perform the commissioning operation.

[0041] The binding information of the current device is obtained and the binding is successful.

[0042] The WiFi information of the current device is read, and the system starting number is less than a preset threshold value, so that the current device directly enters the STA mode.

[0043] The initialization of the driving layer in the current device is completed,

[0044] If one of the above three conditions is not met, the related incomplete information is erased, and the commissioning operation is performed again. After success, the old parameter value information is overwritten with new parameters.

[0045] Preferably, the commissioning operation comprises at least one of the following: AP commissioning, one-key commissioning, BLE Bluetooth commissioning and AT instruction commissioning.

[0046] Preferably, after the commissioning operation is performed on the Internet of Things device, the driving method further comprises:

[0047] The commissioning status is queried, and the network connection state is determined according to the feedback monitoring result; and

[0048] After the network connection is correct, the system time and the network time are calibrated.

[0049] Preferably, the step of initializing the client of the Internet of Things device and completing the connection between the client and the cloud server comprises:

[0050] Judge whether the client and the cloud server are connected successfully, if yes, continue to execute, otherwise, erase the storage information in this execution, return to system reset operation or end.

[0051] The beneficial effects of the present application are: the present application provides a driving system and method for embedded Internet of Things device, the driving method comprises: starting and initializing the driving system, and monitoring the starting state and starting number of the driving system in real time; initializing the driving layer of the Internet of Things device, and obtaining the network configuration information and binding activation information of the Internet of Things device; based on the network configuration information and binding activation information of the Internet of Things device, and the starting number of the driving system, performing network configuration operation on the Internet of Things device; initializing the client of the Internet of Things device, and completing the connection between the client and the cloud server; and executing the sub-business of the application layer of the Internet of Things device. The present application is based on the communication between the embedded Internet of Things device and the cloud server, and designs and builds a driving method process and driving system framework for the rapid access of the Internet of Things device to various clouds in the application layer of the Internet of Things device system. The driving method can effectively connect the cloud application program interface (API) and the system API interface, realize the function of device access to the cloud, thereby meeting the requirements of business expansion and real-time of the increasing embedded devices, facilitating the effective use of resource integration, and being compatible with various clouds and embedded Internet of Things devices, and having certain universality; from the actual development point of view, as many types of functions as possible are covered, and the interfaces with the cloud platform are well integrated.

[0052] It should be appreciated that methods according to this document can include any combination of the aspects and features described herein. That is, methods according to this document are not limited to the combination of aspects and features specifically described herein, but also include any combination of the aspects and features provided.

[0053] The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below. Other features and advantages will be apparent from the description and drawings, and from the claims. BRIEF DESCRIPTION OF DRAWINGS

[0054] The above and other objects, features and advantages of the present application will become more apparent from the following description when taken in conjunction with the accompanying drawings, in which:

[0055] Figure 1 A structure schematic diagram of an Internet of Things device based on an embedded system provided by an embodiment of the present application is shown;

[0056] Figure 2 A structure schematic diagram of a driving system for an embedded Internet of Things device provided by an embodiment of the present application is shown;

[0057] Figure 3 A driving system for an embedded Internet of Things device provided by an embodiment of the present application is shown; Figure 2Flow chart of the driving method of the driving system shown;

[0058] Figure 4 Show Figure 3 Application model diagram of the driving method shown in a specific embodiment.

[0059] Term explanation:

[0060] SDK: Software Development Kit, software development kit, generally a collection of development tools used by software engineers to build applications for a particular software package, software framework, hardware platform, operating system, etc. In the scenario of App embedding using third-party SDK, three parties are involved: App provider, App user and SDK provider. During SDK development, the SDK provider encapsulates codes that can implement specific functions such as advertising, pushing, statistics, positioning, etc., and reserves simple access interfaces to allow App developers to directly call the corresponding functions of the SDK. During development, the App developer embeds the third-party SDK in the App code and accesses the interface to implement the specific functions (including page interaction) of the SDK.

[0061] IoT: Internet of Things, the full name in English is Internet of Things. It refers to the connection of any object with the Internet through RFID, infrared sensor, GPS, laser scanner and other information sensing devices, according to the agreed protocol, for information exchange and communication, to realize intelligent identification, positioning, tracking, monitoring and management of objects.

[0062] ARM mbedtls: makes it very easy for developers to add encryption and SSL / TLS functionality to embedded products. It provides an SSL library with intuitive APIs and readable source code. The tool is ready to use, and it can be directly built on most systems, or it can be manually selected and configured for each function. The mbedtls library provides a set of encryption components that can be used and compiled separately, and can also add or exclude these components using a single configuration header file. From a functional point of view, mbedtls is divided into three main parts: SSL / TLS protocol implementation, an encryption library, and an X.509 certificate processing library.

[0063] cJSON: a C-based JSON parsing library, written in C language, used to create and parse JSON files. The feature of cJSON is that the engineering file is simple, the function interface is complete, and it is very convenient to use. It is used to support the parsing and packaging of JSON files.

[0064] Lwip: As an open source TCP / IP protocol stack mainly applied in the embedded field, in addition to realizing basic TCP / IP functions, it can also support DNS, SNMP, DHCP, IGMP and other advanced applications. In addition, in the case of limited RAM and ROM resources of embedded devices, Lwip has its own unique memory management mechanism, and it can even run without the support of an operating system, so that tens of K of RAM or ROM can meet its system requirements. DETAILED DESCRIPTION

[0065] In order to facilitate the understanding of the present application, the present application will be described more fully below with reference to the accompanying drawings. The preferred embodiments of the present application are shown in the drawings. However, the present application can be implemented in different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the understanding of the content of the present application more thorough and comprehensive.

[0066] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used in the specification of the present application are only for the purpose of describing the specific embodiments and are not intended to limit the present application.

[0067] The analysis of the prior art found that for the scheme of directly introducing a mature embedded operating system into the drive system of an embedded device proposed by someone, since the application of the embedded operating system is relatively wide and the types are also relatively many, these operating systems are focused on general embedded devices or Internet of Things applications. Although some of these operating systems provide rich component resources and can improve the implementation of task response, most of these operating systems have the problems of large resource consumption and incomplete separation of application development and hardware devices, which can easily lead to the problems of large resource consumption and unreliable embedded device drive systems.

[0068] At present, in the field of Internet of Things technology, the prerequisite for making an embedded device intelligent is that the device can be connected to the cloud server or cloud control platform of the relevant manufacturer. In the process of constructing the connection between the device and the server, the embedded system and the cloud platform access interface will be involved throughout the integration, but how to design a process framework to integrate the functions of the system and the cloud platform not only can achieve the access target, but also the integrated framework can cover all possible functions as much as possible. At present, there is no better complete solution on the market.

[0069] To solve the above technical problems, the application provides an application layer framework and a design method of an Internet of Things device system, the framework is suitable for various cloud platforms, the system comprises a driving framework based on an embedded real-time operating system, the driving framework comprises a device driving layer, a device management layer and an application layer; the device driving layer comprises an Internet of Things device access interface module, the Internet of Things device access interface module is used for accessing the Internet of Things device according to an instruction sent by the device management layer; the device management layer comprises a device registration interface module and an abstract device access interface module, the device registration interface module is used for registering the Internet of Things device according to a registration request of the device driving layer, and the abstract device access interface module is used for accessing an abstract device according to an instruction sent by the application layer, wherein the abstract device is constructed according to the Internet of Things device; wherein the abstract device access interface module and the Internet of Things device access interface module have a mapping conversion relationship, so as to realize the access of the application layer to the device driving layer.

[0070] Through the technical solution, the application realizes the introduction of the embedded real-time operating system through the self-defined driving framework and the function interface therein, can meet the business expansion and real-time requirement of the gradually increasing embedded devices, reduces the RAM resource consumption of the system, and improves the resource utilization rate and the executable and reliable performance of the system.

[0071] Hereinafter, the application will be described in detail with reference to the drawings.

[0072] Figure 1 A structure schematic diagram of an Internet of Things device based on an embedded system provided by the embodiment of the application is shown. Figure 1As shown, the embodiment of the present application proposes an Internet of Things device based on an embedded system, which comprises a driver layer 3 and a component layer 4. The driver layer 3 at least comprises a processor, a real-time clock (RTC), a display (LCD, LED), and a data bus, and generally further comprises a data communication interface such as wifi, Bluetooth, infrared, and the like, and a network interface and the like. In order to realize the intelligence of the Internet of Things device, compared with the traditional gateway device, the Internet of Things device of the present application can construct an embedded system in the driver layer 3, so as to provide components or modules of network components, disk management, memory management, process management, file system, dynamic link, IO device system, time management, and task scheduling service. The component layer 4 comprises, for example, a non-volatile random access memory (NVRAM), a light weight TCP / IP stack (Lwip), an electrically erasable programmable read-only memory (EEPROM), and a flash memory. The Internet of Things device in the embodiment of the present application uses the embedded system to perform various management of the device, facilitates the functional expansion of the device, and constructs a running environment 2 of the corresponding function thereon, so as to meet the increasing business expansion and real-time requirements of the embedded device.

[0073] In one embodiment, the running environment 2 of the extended function is constructed based on the accessed SDK development kit and dependent library 5 in the embedded system. In this embodiment, the dependent library 5 comprises, for example, cJSON and Mbedtls, and the like. The running environment 2 is used to provide an application framework, application components, and system services for developing and expanding the device function, so as to execute the business logic of the application layer 1.

[0074] In one embodiment, the running environment 2 is constructed on the Internet of Things device, so that the Internet of Things device can run multiple Internet of Things applications, and can develop applications, so that the Internet of Things device is convenient to expand, the function is no longer single, the original system and service are not invasive in the expansion of the function, there is no need to change any place of the original service, and after the intelligent device such as a smart phone and the like accesses the intelligent gateway, the Internet of Things device does not need too many hardware resources, the intelligent gateway has strong hardware resources and computing power, control and calculation, can be realized in the intelligent gateway through a web application, and the resource utilization rate is improved.

[0075] In one embodiment, the application layer 1 is constructed in the running environment 2, which provides an API for developing Internet of Things functions, and simultaneously runs multiple Internet of Things applications in a multitasking manner. In one embodiment, the Internet of Things applications are installed, uninstalled, updated, run, and closed in the application layer 1, and the application layer 1 isolates and manages the multiple Internet of Things applications.

[0076] Figure 2 A structure diagram of a driving system for an embedded Internet of Things device is shown. As shown in the figure, the driving system for the embedded Internet of Things device comprises a starting module 10, a communication module 20, a control module 30 and a processing module 40. Figure 2

[0077] The starting module 10 is configured to implement starting operation or reset operation of the driving system.

[0078] The communication module 20 is configured to implement communication between Internet of Things devices and between the Internet of Things devices and a cloud platform.

[0079] The control module 30 is configured to monitor real-time state of the driving system and generate operation instructions for performing network configuration operation on the Internet of Things devices according to acquired monitoring information.

[0080] The processing module 40 is configured to access the Internet of Things devices according to the control instructions to control the Internet of Things devices to perform corresponding operations.

[0081] In some embodiments, the aforementioned monitoring information comprises starting state and starting times of the driving system, communication state between the Internet of Things devices and between the Internet of Things devices and a cloud server, network configuration information and binding activation information of the Internet of Things devices.

[0082] In the specific embodiments, the aforementioned driving system can be understood as a software platform designed based on an embedded real-time operating system. Specifically, the control instructions comprise read instructions, write instructions, close instructions, search instructions, open instructions, initialization instructions, reset instructions, clear instructions, abort instructions, refresh instructions, configuration instructions and the like.

[0083] In some embodiments, the aforementioned driving system further comprises:

[0084] A first judgment module (not shown) which is configured to perform:

[0085] judgment on whether initialization of the driving layer 3, the component layer 4 and the dependent library 5 modules in the Internet of Things devices is completed. If the initialization is completed, the starting state and the starting times of the driving system are monitored in real time. Otherwise, the driving system is directly terminated or reset to restart.

[0086] A second judgment module (not shown) which is configured to perform:

[0087] judgment on whether the Internet of Things devices directly enter the STA mode or need to perform network configuration operation on the following three conditions: ​

[0088] The binding information of the current device is acquired and the binding is successful;

[0089] The wifi information of the current device is read, and the number of system start-ups is less than a preset threshold, so that the current device directly enters the STA mode;

[0090] The initialization of the driver layer in the current device is completed,

[0091] If one of the three conditions is not met, the related incomplete information is erased, and the network configuration operation is re-executed. After success, the old parameter value information is overwritten with new parameters.

[0092] Preferably, the foregoing network configuration operation includes at least one of the following: AP network configuration, one-key network configuration, BLE Bluetooth network configuration, and AT instruction network configuration. Taking the AP network configuration as an example, the phone hot spot network configuration (phone-ap-config) is a variant of the device hot spot network configuration (dev-ap-config, a commonly used network configuration method. In this method, when network configuration, the device to be configured is first placed in the AP mode, and the phone is connected to the device. Then the phone sends the network configuration device to the device, and then the device can switch to the STA mode and connect to the Wi-Fi router). The hot spot is no longer created by the device, but by the phone. The specific network configuration process is as follows: the phone APP starts a pre-defined hot spot; the device to be configured is first connected to the phone hot spot and forms a local area network with the phone; the phone sends the network configuration information (SSID / password) of the Wi-Fi router to the device; after the device obtains the network configuration information, it disconnects the phone hot spot, enters the STA mode, and connects to the Wi-Fi router.

[0093] According to the prior art, in the wifi module, AP and STA modes respectively mean: AP: also known as wireless access point, it is a creator of a wireless network and a central node of the network. The wireless router used in general households or offices is an AP. The STA site is each terminal (such as a notebook computer, a PDA, and other networked user devices) connected to a wireless network, which can be called a site.

[0094] Logically, the AP is a central point of a wireless unit, and all wireless signals in the unit must pass through it to exchange. The AP is an essential device in the basic mode of a wireless local area network. Although a wireless card can be used without an AP to form a point-to-point mode wireless local area network, such a wireless local area network is somewhat special and only suitable for temporary wireless connection. After using the AP, not only can permanent wireless connection service be obtained, but also users can be centrally managed and the security of the wireless network can be greatly improved.

[0095] The WLAN mainly consists of: a station (Station, STA), an access point (Access Point, AP), a wireless medium (Wireless Medium, WM) and a distribution system (Distribution System, DS). The STA is generally a client in the WLAN, which can be a computer equipped with a wireless network card or a smart phone with a WiFi module. The STA can be mobile or fixed, and is the most basic component unit of the wireless local area network.

[0096] Figure 4 The application model of the driving method in a specific embodiment is shown. Figure 3 The application model of the driving method in a specific embodiment is shown. Figure 4 The application model of the driving method in a specific embodiment is shown. Figure 2 The function implementation of the driving system for the embedded Internet of Things device according to the design idea from top to bottom can specifically include the following steps:

[0097] Step S1, start and initialize the driving system, and wait for the initialization of the driving system to be completed. The normal operation of the driving system is the basis for the operation and debugging of other functions, so in this step, the first judgment module is used to judge whether the initialization of the driving layer 3, the component layer 4 and the dependent library 5 and other modules in the driving system is completed. If the system appears abnormal and the initialization is not completed, it is directly terminated (in this case, even if it can still be executed, but it has little meaning), otherwise the application layer business logic is continued to be executed.

[0098] Step S2, initialization of the system parameters of the Internet of Things device communication and the driving system. In this step, the variable parameters required to be used such as thread creation or Internet of Things device network configuration are defined and initialized for use in the subsequent steps.

[0099] Step S3, create a driving system start monitoring thread to monitor the start state of the driving system in real time to judge whether the reset operation of the system needs to be executed according to the actual situation. In this embodiment, the implementation can be specifically: each time the driving system is started, the corresponding start number is automatically incremented by 1; if the driving system is restarted within a certain time, the start number is automatically incremented by 1; if the driving system is stably running for more than a certain time, the start number is set to 0; here, the start number is the basis for the driving system to perform reset, if the start number exceeds the set threshold in a short time, the reset of the system is executed to clear the stored related network or cloud access configuration information. In addition, the start number of the system is also one of the bases for the device to execute the network configuration in the subsequent steps.

[0100] Step S4, initialization of the driving layer of the Internet of Things device. This step will initialize the driving layer of the current device, for example: PWM driving to control the light state of the device.

[0101] Step S5, information acquisition of the Internet of Things device. In this step, WiFi configuration information is read from component layer 4 (such as a non-volatile storage (NV) module) in the Internet of Things device, and communication with the cloud server or the APP corresponding to the cloud server is attempted, so as to acquire the network configuration information and the binding activation information of the Internet of Things device.

[0102] Step S6, based on the binding activation information, the network configuration information acquired in step S5, and the number of system starts acquired in step S3, the second judgment module is used to determine whether the Internet of Things device directly enters the STA mode or needs to perform a network configuration operation. The network configuration operation generally includes: AP network configuration, one-key network configuration, BLE Bluetooth network configuration, and AT instruction network configuration. The determination process is as follows: if the binding information is successfully acquired (the current device has completed access to the cloud server before, and the current device is bound to the APP), the WiFi configuration information is read, and the number of system starts is less than a certain preset threshold, then the current device communication can directly enter the STA mode. After that, in order to ensure successful networking, the driving initialization state of the WiFi module needs to be determined until the WiFi module is ready (because of multi-threaded operation, the driving system may execute to this step, but the WiFi module is still in the initialization process and has not been completed). If one of the above three conditions is not met, then the current device communication may have a problem. At this time, the related incomplete information is erased and the network configuration operation is re-executed. After success, the old parameter value information is overwritten with new parameters.

[0103] Step S7, after the AP network configuration or the STA mode configuration of the Internet of Things (current) device is successful, a network configuration status query is initiated. It is confirmed again whether the network connection is smooth and stable.

[0104] Step S8, network time synchronization. After the network connection is correct, the system time and the network time are calibrated. This step is to ensure that the Internet of Things device and the cloud (cloud server) have the same time, so as to facilitate daily maintenance and development problem positioning.

[0105] Step S9, initialization of the Internet of Things device client. The communication between the embedded Internet of Things device and the cloud server is mostly completed through the MQTT protocol, and there is also data interaction through the HTTP protocol. Taking the MQTT communication protocol as an example, in this step, the initialization of the MQTT client on the device side needs to be completed, such as the application of system resources required in the connection process, the configuration of connection parameters, the registration of sub-business callback function events, the subscription of device message topics, and the like.

[0106] According to the related technology, HTTP protocol, namely Hypertext transfer protocol, is a rule of mutual communication between a browser and a WWW (World Wide Web) server, and is a data transmission protocol for transmitting WWW documents through the Internet. At present, the HTTP protocol has been widely used as a standard protocol of the Web. It can also be used in some Internet of Things scenarios, such as mobile phones, PC terminal devices and the like. However, as the HTTP protocol is adapted to the browser scenario, it is not applicable to other Internet of Things scenarios.

[0107] MQTT (Message Queuing Telemetry Transport) is a message queuing telemetry transport. The MQTT protocol was initially developed by IBM in 1999, and was used to connect sensors on oil pipelines with satellites. In 2014, it became an OASIS open standard.

[0108] The MQTT uses a publish / subscribe mode commonly used in MQ, and plays a role in application decoupling, asynchronous message and peak shaving. Many MQ middleware also supports the MQTT protocol, such as ActiveMQ, RabbitMQ, HiveMQ, WebSphereMQ and the like.

[0109] Step S10, after the initialization of the Internet of Things device client is completed, the interface related to the connection of the cloud server is called, the connection between the device client and the cloud proxy server is started to be executed, and whether the connection is successful is further judged. If yes, the execution is continued; otherwise, the resources are recycled and released.

[0110] Step S11, sub-service control of the Internet of Things device business layer 1. After the connection of the client and the server is completed, this step needs to perform corresponding operations according to different needs of the server, such as the current device information reporting, the boot reporting and the actual control of the device, and the like, which are triggered by the cloud server through the corresponding message topic.

[0111] In summary, the embodiment of the application is based on the communication between the embedded Internet of Things device and the cloud server, and a driving system framework for quickly accessing various clouds of the Internet of Things device is designed and built in the application layer of the Internet of Things device system. The driving system can effectively connect the cloud application program interface (API) and the system API interface, realize the function of device access to the cloud, thereby meeting the business expansion and real-time needs of the increasing embedded devices, facilitating the effective use of resource integration, and being compatible with various clouds and embedded Internet of Things devices, and having certain universality. From the actual development point of view, as many types of functions as possible are covered, and the interfaces with the cloud platform are well integrated.

[0112] Figure 3 The application embodiment provided by the application is applied to Figure 2 The flowchart of the driving method of the driving system is shown. On the other hand, the application embodiment also provides a driving method for an embedded Internet of Things device, which is applied to the driving system as described in the foregoing embodiment, and the driving method is described with reference to Figure 3 The driving method comprises the following steps.

[0113] S110: starting and initializing the driving system, and monitoring the starting state and starting times of the driving system in real time.

[0114] In an optional embodiment, the step S110 can comprise the following steps.

[0115] Starting and initializing the driving system, and determining whether the initialization of the driving layer 3, the component layer 4 and the dependent library 5 modules in the Internet of Things device is completed, if yes, monitoring the starting state and starting times of the driving system in real time; otherwise, directly terminating or resetting the driving system to restart.

[0116] S120: initializing the driving layer of the Internet of Things device, and obtaining the network configuration information and the binding activation information of the Internet of Things device.

[0117] In an optional embodiment, the step S120 can further comprise the following steps.

[0118] Obtaining the communication state detection result between the Internet of Things devices and between the Internet of Things device and the cloud server by using the communication module 20, and determining whether the communication between the Internet of Things devices and between the Internet of Things device and the cloud server is good by using the detection result, to determine whether the data transmission such as the network configuration information of the target Internet of Things device can be completed, and

[0119] Creating a starting monitoring thread of the driving system, and monitoring the starting state of the driving system in real time to determine whether to perform the reset operation of the driving system according to the stable running time and starting times of the driving system.

[0120] In an optional embodiment, the step of obtaining the network configuration information and the binding activation information of the Internet of Things device comprises the following steps.

[0121] Reading the WiFi configuration information from the component layer of the Internet of Things device;

[0122] Alternatively, communicating with the cloud server or the application program corresponding to the cloud server by using the communication module, to obtain the network configuration information and the binding activation information of the Internet of Things device.

[0123] S130: performing the network configuration operation on the Internet of Things device based on the network configuration information and the binding activation information of the Internet of Things device, and the starting times of the driving system.

[0124] In an optional embodiment, the step S130 can further include:

[0125] The following three conditions are judged whether the Internet of Things device is directly entered into the STA mode or needs to be configured with the network operation:

[0126] The binding information of the current device is obtained and the binding is successful;

[0127] The WiFi information of the current device is read and the number of system starts is less than the preset threshold, so that the current device directly enters the STA mode;

[0128] The initialization of the driver layer in the current device is completed,

[0129] If one of the above three conditions is not met, the related incomplete information is erased and the network configuration operation is re-executed, and after success, the old parameter value information is covered with new parameters.

[0130] In an embodiment, the network configuration operation described above includes at least one of the following: AP network configuration, one-key network configuration, BLE Bluetooth network configuration, and AT instruction network configuration. In this embodiment, the AT instruction is an AT command communication analysis module, which supports bare machine (at_chat) and OS version (at). It is suitable for modem, WIFI module, and Bluetooth communication.

[0131] S140: Initialize the client of the Internet of Things device and complete the connection of the client and the cloud server.

[0132] In an embodiment, the step S140 can further include:

[0133] The network configuration status is queried, and the network connection state is determined according to the feedback monitoring result; and

[0134] After the network connection is correct, the system time and the network time are calibrated.

[0135] Among them, the network configuration status query can effectively confirm whether the network connection is smooth and stable, and the network time synchronization can ensure that the device and the cloud keep the same time, which is convenient for daily maintenance and development problem positioning.

[0136] In a further embodiment, the step of initializing the client of the Internet of Things device and completing the connection of the client and the cloud server includes:

[0137] Whether the client and the cloud server are connected successfully is judged, if yes, the execution is continued; otherwise, the storage information in this execution is erased, and the system reset operation or the end is returned.

[0138] S150: Execute the sub-service of the application layer of the Internet of Things device.

[0139] After the client and the server complete the connection, this step needs to perform corresponding operations according to different needs of the server, such as log service (SLS) of device information, timing reporting, boot reporting, and actual control of the device, and the cloud server triggers corresponding message topics.

[0140] The log service SLS can include the following contents:

[0141] Data collection, supporting unified collection of Log / Metric / Trace, supporting server / application / mobile device / webpage / IoT data source access, and supporting Aliyun product / open source system / cloud / log data access.

[0142] Data processing, supporting various complex data extraction, parsing, enrichment, distribution, and other needs without writing code through flexible syntax, and supporting structured analysis.

[0143] Query analysis, providing multiple ways such as keyword, SQL92, and AIOps function, supporting real-time query analysis of text + structured data, and supporting abnormal inspection and intelligent analysis.

[0144] Monitoring and alarm, having rich visualization components, and being capable of creating a seen-is-seen interactive analysis dashboard. Meanwhile, the real-time programmable alarm function is supported, and the business trend can be grasped at any time and any place.

[0145] Log audit, real-time automatic and centralized collection of cloud product logs for audit under multiple accounts, supporting compliance storage, query, and information summary report required for upgrading.

[0146] Delivery and consumption, real-time connection with various real-time computing and services, and custom consumption can be realized. Data delivery to storage class services is supported, and various storage formats such as compression, custom partition, and row and column are supported.

[0147] In the above embodiment, a corresponding integrated development environment (IDE or IDE middleware) for developers can be built on the application layer 1, which provides the whole process from application development to deployment. The developer develops the related application program through the IDE, and can upload the application to the cloud application store through the operation of the IDE. The developer can repeatedly develop the updated version of the application, and can also develop multiple applications. For the smart hardware device (such as a smart phone), the related developer can access the smart Internet of Things device through Zigbee, wifi, and other related Internet of Things protocols.

[0148] The embodiment of the application provides a driving system and method for an embedded Internet of Things device, the driving method comprising: starting and initializing the driving system, and monitoring the starting state and starting times of the driving system in real time; initializing the driving layer of the Internet of Things device, and acquiring the network configuration information and binding activation information of the Internet of Things device; performing network configuration operation on the Internet of Things device based on the network configuration information and binding activation information of the Internet of Things device and the starting times of the driving system; initializing the client of the Internet of Things device, and completing the connection between the client and the cloud server; and performing the sub-service of the application layer of the Internet of Things device. The application is based on the communication between the embedded Internet of Things device and the cloud server, and a driving method process and driving system framework for quickly accessing various clouds of the Internet of Things device are designed and built in the application layer of the Internet of Things device system. The driving method can effectively connect the cloud application program interface (API) and the system API interface, realize the function of device access to the cloud, thereby meeting the requirements of the gradually increasing business expansion and real-time of the embedded device, facilitating the effective use of resource integration, and being compatible with various clouds and embedded Internet of Things devices, and having certain universality; from the actual development point of view, as many types of functions as possible are covered, and the interfaces with the cloud platform are well integrated.

[0149] For the convenience of description, the above device or apparatus is described as various units in terms of functions. Of course, the functions of the units can be implemented in one or more software and / or hardware in the implementation of the present application.

[0150] From the description of the above embodiments, those skilled in the art can clearly understand that the application can be implemented by means of software and the necessary general hardware platform. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present application.

[0151] It should be noted that in the description of the present application, it should be understood that the terms "upper", "lower", "inner", etc. indicate the orientation or position relationship, which is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the components or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application.

[0152] Furthermore, herein, the term "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a... " does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0153] Finally, it should be noted that the above-mentioned embodiments are merely intended for the purpose of illustration rather than limiting the embodiments. Those skilled in the art can make other variations or modifications on the basis of the above description without departing from the scope of the present application. It is not necessary or possible to enumerate all the embodiments. The obvious variations or modifications derived therefrom are still within the scope of the present application.

Claims

1. A driving system for embedded Internet of Things (IoT) devices, characterized in that, The drive system includes: The startup module is used to implement the startup or reset operation of the drive system; The communication module is used to enable communication between the IoT devices and between the IoT devices and the cloud platform; The control module is used to monitor the real-time status of the drive system and generate operation instructions for performing network configuration operations on the IoT devices based on the acquired monitoring information. The monitoring information includes: the startup status and startup count of the drive system, the communication status between the IoT devices and between the IoT devices and the cloud server, and the network configuration information and binding activation information of the IoT devices. The processing module is used to access the IoT device according to control instructions in order to control the IoT device to perform corresponding operations. The first judgment module is used to execute: The system determines whether the initialization of the driver layer, component layer, and dependency library modules in the IoT device is complete. If all initializations are complete, the system monitors the startup status and startup count of the driver system in real time. Otherwise, the system is terminated or reset and restarted. The second judgment module is used to execute: To determine whether the IoT device directly enters STA mode or requires network configuration, the following three conditions must be met: Obtain the binding information of the current device and bind successfully; If the device's Wi-Fi information and the number of system startups are less than a preset threshold, the device will directly enter STA mode. The initialization of the driver layer in the current device is complete. If any of the above three conditions is not met, the relevant incomplete information will be erased and the distribution network operation will be re-executed. If successful, the old parameter values ​​will be overwritten with the new parameters.

2. The drive system according to claim 1, characterized in that, The IoT devices include: The driver layer includes a processor, a real-time clock, a display, a data bus, Wi-Fi, Bluetooth, infrared data communication interfaces, and a network interface; The runtime environment is built on the embedded system connected to the IoT device. The runtime environment is used to provide application frameworks, application components and system services for developing and extending device functions. The application layer provides application programming interfaces for developing IoT functions, and multiple IoT applications can run in a multitasking manner on the application layer.

3. The drive system according to claim 1, characterized in that, The network configuration operation includes at least one of the following: AP network configuration, one-click network configuration, BLE Bluetooth network configuration, and AT command network configuration.

4. A driving method for embedded Internet of Things (IoT) devices, characterized in that, The driving method is applied to the driving system according to any one of claims 1 to 3, and the driving method includes: Start and initialize the drive system, and monitor the startup status and startup count of the drive system in real time; Initialize the driver layer of the IoT device and obtain the network configuration information and binding activation information of the IoT device; The network configuration operation is performed on the IoT device based on the network configuration information and binding activation information of the IoT device, as well as the number of times the drive system is started. Initialize the client for the IoT device and complete the connection between the client and the cloud server; Execute the sub-services of the IoT device application layer.

5. The driving method according to claim 4, characterized in that, The steps of starting and initializing the drive system, and monitoring the startup status and startup count of the drive system in real time include: The system determines whether the initialization of the driver layer, component layer, and dependency library modules in the IoT device is complete. If all initializations are complete, the system monitors the startup status and startup count of the driver system in real time. Otherwise, the system is terminated or reset and restarted.

6. The driving method according to claim 5, characterized in that, The steps of initializing the driver layer of the IoT device and obtaining the network configuration information and binding activation information of the IoT device further include: A startup monitoring thread is created for the driver system to monitor the startup status of the driver system in real time and determine whether to perform a reset operation based on the stable running time and number of startups of the driver system.

7. The driving method according to claim 6, characterized in that, The steps of obtaining the network configuration information and binding activation information of the IoT device include: Read WiFi configuration information from the component layer of the IoT device; Alternatively, the communication module can be used to communicate with a cloud server or the application corresponding to the cloud server to obtain the network configuration information and binding activation information of the IoT device.

8. The driving method according to claim 7, characterized in that, The step of performing network configuration operations on the IoT device based on the network configuration information and binding activation information of the IoT device, as well as the number of times the drive system has been started, includes: To determine whether the IoT device directly enters STA mode or requires network configuration, the following three conditions must be met: Obtain the binding information of the current device and bind successfully; If the device's Wi-Fi information and the number of system startups are less than a preset threshold, the device will directly enter STA mode. The initialization of the driver layer in the current device is complete. If any of the above three conditions is not met, the relevant incomplete information will be erased and the distribution network operation will be re-executed. If successful, the old parameter values ​​will be overwritten with the new parameters.

9. The driving method according to claim 8, characterized in that, The network configuration operation includes at least one of the following: AP network configuration, one-click network configuration, BLE Bluetooth network configuration, and AT command network configuration.

10. The driving method according to claim 8, characterized in that, After performing the network configuration operation on the IoT device, the driving method further includes: Network status query, determining network connection status based on feedback monitoring results; and After confirming a successful network connection, perform a time synchronization operation between the system time and the network time.

11. The driving method according to claim 10, characterized in that, The step of initializing the client of the IoT device and completing the connection between the client and the cloud server includes: The system determines whether the client and the cloud server are successfully connected. If successful, execution continues; otherwise, the stored information in this execution is erased, and the system returns to the reset operation or terminates.

Citation Information

Patent Citations

  • Internet of Things module, Internet of Things control method and intelligent equipment

    CN111163144A