Network distribution method and device, system, storage medium, and electronic device for equipment
By reading the network distribution key and obtaining the platform firmware, the problem of IoT devices needing to burn multiple cloud platform firmware in the production stage is solved, and the flexible cloud platform access and efficient storage resource utilization of the equipment is realized, reducing the network distribution Risk of failure.
Patent Information
- Application Number
- CN202411159828.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-08-22
AI Technical Summary
IoT devices need to burn multiple cloud platform firmware during the production stage, resulting in inconsistent production, increased difficulty of user distribution networks and increased risk of failure, and lack of efficient and accurate solutions.
By reading the network key of the target cloud platform from the preset storage area, connecting to the target cloud server to obtain the platform firmware, realizing the communication protocol conversion between the device and the cloud platform, avoiding burning all cloud platform firmware during the production stage, and only maintaining Universal function device firmware.
It improves the storage resource utilization rate of IoT devices, reduces the firmware burning time during the production stage, flexibly selects cloud platform access, and reduces the risk of network failure.
Smart Images

Figure CN118694661B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to a network distribution method and device, a system, a storage medium, and an electronic device for a device. Background Art
[0002] In the related technology, with the development of smart home, users have more and more demands for connecting to different cloud platforms. The protocols of each cloud platform are different, which leads to different program firmwares burned in production. As a result, the same equipment in the production environment has different cloud platform requirements and different burned firmwares, which causes troubles in production inconsistency. It is necessary to burn the platform firmware of all possible cloud platforms during production, which increases the difficulty of user network configuration and the risk of network configuration failure of IoT devices.
[0003] With respect to the above-mentioned problems existing in the related technologies, no efficient and accurate solutions have been found yet. Summary of the invention
[0004] The present invention provides a network configuration method and device, a system, a storage medium, and an electronic device for a device, so as to solve the technical problem in the related art that the Internet of Things devices need to burn multiple platform firmwares during the production stage.
[0005] According to one embodiment of the present invention, a network configuration method for a device is provided, which is applied to an Internet of Things device, comprising: reading a network configuration key of a target cloud platform to be connected from a preset storage area, wherein the network configuration key is used by the cloud platform to verify the Internet of Things device to be connected; connecting to a target cloud server of the target cloud platform based on the network configuration key; obtaining the platform firmware of the Internet of Things device from the target cloud server, wherein the platform firmware is used to implement communication protocol conversion between the Internet of Things device and the target cloud platform.
[0006] Optionally, connecting to the target cloud server of the target cloud platform based on the network configuration key includes: establishing a Bluetooth communication link between the Internet of Things device and the mobile terminal based on the network configuration key; receiving network configuration routing information sent by the mobile terminal using the Bluetooth communication link; and accessing the target cloud server according to the network configuration routing information and the network configuration key.
[0007] Optionally, establishing a Bluetooth communication link between the Internet of Things device and the mobile terminal based on the network configuration key includes: determining a target cloud platform supported by the Internet of Things device according to the network configuration key; broadcasting Bluetooth-assisted network configuration information of the target cloud platform; and establishing a Bluetooth communication link between the Internet of Things device and the mobile terminal based on the Bluetooth-assisted network configuration information.
[0008] Optionally, determining the target cloud platform supported by the Internet of Things device based on the network configuration key includes: locating the partition address of the network configuration key in the preset storage area, wherein the preset storage area includes several partition addresses, each partition address is used to store the network configuration key of a cloud platform; and searching for a target cloud platform that matches the partition address.
[0009] Optionally, after establishing a Bluetooth communication link between the Internet of Things device and the mobile terminal based on the network configuration key, the method includes: determining the general attribute protocol GATT service of the Bluetooth communication link; reading the universal unique identifier UUID feature of the GATT service, wherein the UUID feature is used to characterize application information using the Bluetooth communication link; and identifying the target cloud platform for the mobile terminal to log in based on the UUID feature.
[0010] Optionally, accessing the target cloud server according to the network configuration routing information and the network configuration key includes: parsing the routing address and server address in the network configuration routing information; using the routing address and server address to request access to the target cloud server, and sending the network configuration key to the target cloud server; after the target cloud server uses the network configuration key to verify that the Internet of Things device has passed, connecting the Internet of Things device to the target cloud server.
[0011] Optionally, obtaining the platform firmware of the Internet of Things device from the target cloud server includes: sending a firmware request to the target cloud server; receiving the platform firmware issued by the cloud server based on the firmware request; merging the platform firmware with the local device firmware of the Internet of Things device to obtain a merged firmware, wherein the device firmware is used to implement the general functional logic of the Internet of Things device; and loading the merged firmware locally on the Internet of Things device.
[0012] Optionally, after obtaining the platform firmware of the Internet of Things device from the target cloud server, the method further includes: receiving a function upgrade request issued by the target cloud server, wherein the function upgrade request carries new firmware data; and upgrading the Internet of Things device using the firmware data.
[0013] According to another embodiment of the present invention, a network configuration device of a device is provided, which is applied to an Internet of Things device, including: a reading module, used to read a network configuration key of a target cloud platform to be connected from a preset storage area, wherein the network configuration key is used by the cloud platform to verify the Internet of Things device to be connected; a connection module, used to connect to a target cloud server of the target cloud platform based on the network configuration key; an acquisition module, used to obtain the platform firmware of the Internet of Things device from the target cloud server, wherein the platform firmware is used to implement communication protocol conversion between the Internet of Things device and the target cloud platform.
[0014] Optionally, the connection module includes: an establishment unit, used to establish a Bluetooth communication link between the Internet of Things device and the mobile terminal based on the network configuration key; a receiving unit, used to receive the network configuration routing information sent by the mobile terminal using the Bluetooth communication link; and an access unit, used to access the target cloud server according to the network configuration routing information and the network configuration key.
[0015] Optionally, the establishment unit includes: a determination subunit, used to determine the target cloud platform supported by the Internet of Things device according to the network configuration key; a broadcast subunit, used to broadcast the Bluetooth-assisted network configuration information of the target cloud platform; and an establishment subunit, used to establish a Bluetooth communication link between the Internet of Things device and the mobile terminal based on the Bluetooth-assisted network configuration information.
[0016] Optionally, the determination subunit is also used to: locate the partition address of the network configuration key in the preset storage area, wherein the preset storage area includes several partition addresses, each partition address is used to store the network configuration key of a cloud platform; and search for a target cloud platform that matches the partition address.
[0017] Optionally, the device includes: a determination module, used to determine the general attribute protocol GATT service of the Bluetooth communication link after the connection module establishes the Bluetooth communication link between the Internet of Things device and the mobile terminal based on the network configuration key; a reading module, used to read the universal unique identification code UUID feature of the GATT service, wherein the UUID feature is used to characterize the application information using the Bluetooth communication link; an identification module, used to identify the target cloud platform for the mobile terminal to log in based on the UUID feature.
[0018] Optionally, the access unit includes: a parsing subunit, used to parse the routing address and server address in the network configuration routing information; a processing subunit, used to use the routing address and server address to request access to the target cloud server, and send the network configuration key to the target cloud server; an access subunit, used to connect the Internet of Things device to the target cloud server after the target cloud server uses the network configuration key to verify that the Internet of Things device has passed.
[0019] Optionally, the acquisition module includes: a sending unit, used to send a firmware request to the target cloud server; a receiving unit, used to receive the platform firmware issued by the cloud server based on the firmware request; a merging unit, used to merge the platform firmware with the local device firmware of the IoT device to obtain a merged firmware, wherein the device firmware is used to implement the general functional logic of the IoT device; and a loading unit, used to load the merged firmware locally on the IoT device.
[0020] Optionally, the device also includes: a receiving module, used to receive a function upgrade request issued by the target cloud server after the acquisition module obtains the platform firmware of the Internet of Things device from the target cloud server, wherein the function upgrade request carries new firmware data; and an upgrading module, used to upgrade the Internet of Things device using the firmware data.
[0021] According to another aspect of an embodiment of the present application, a network distribution system for a device is also provided, including an Internet of Things device, a mobile terminal, and a target cloud server, wherein the Internet of Things device includes the apparatus described in the above embodiment.
[0022] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above steps are executed when the program is run.
[0023] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the steps in the above method by running the program stored in the memory.
[0024] According to yet another embodiment of the present invention, a storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned device embodiments when running.
[0025] Through the embodiments of the present invention, a network configuration key of a target cloud platform to be accessed is read from a preset storage area, wherein the network configuration key is used by the cloud platform to verify the IoT device to be accessed; a target cloud server of the target cloud platform is connected based on the network configuration key; and the platform firmware of the IoT device is obtained from the target cloud server, wherein the platform firmware is used to realize the communication protocol conversion between the IoT device and the target cloud platform. After the IoT device accesses the selected target cloud server, the platform firmware of the IoT device is obtained from the target cloud server. The IoT device does not need to burn the platform firmware in the production stage, and the user can flexibly select different cloud platforms to access according to different product needs. The IoT device only needs to maintain the device firmware of general functions during production, and does not need to burn the platform firmware of all cloud platforms at the same time in the production stage. This improves the utilization rate of the storage resources of the IoT device, reduces the firmware burning time of the IoT device in the production stage, and solves the technical problem in the related art that the IoT device needs to burn multiple platform firmwares in the production stage. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0027] Figure 1 It is a hardware structure block diagram of a network distribution device of a device according to an embodiment of the present invention;
[0028] Figure 2 is a flow chart of a network configuration method for a device according to an embodiment of the present invention;
[0029] Figure 3 is an interactive diagram of device network configuration in an embodiment of the present invention;
[0030] Figure 4 It is a structural block diagram of a network distribution device of a device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] Example 1
[0034] The method embodiment provided in the first embodiment of the present application can be executed in an IoT device, a smart device, a networked device or a similar network distribution device. Taking running on an IoT device as an example, Figure 1 1 is a hardware structure diagram of an Internet of Things device according to an embodiment of the present invention. Figure 1 As shown, an IoT device may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the above-mentioned IoT device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the above-mentioned IoT device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0035] The memory 104 can be used to store IoT device programs, for example, software programs and modules of application software, such as the IoT device program corresponding to the network configuration method of a device in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the IoT device program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the IoT device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0036] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the IoT device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0037] In this embodiment, a method for configuring a network for a device is provided. Figure 2 is a flow chart of a network configuration method for a device according to an embodiment of the present invention, which is applied to IoT devices such as Figure 2 As shown, the process includes the following steps:
[0038] Step S202, reading the network configuration key of the target cloud platform to be connected from the preset storage area, wherein the network configuration key is used by the cloud platform to verify the IoT device to be connected;
[0039] The IoT devices of this embodiment may be air conditioners, refrigerators, washing machines, sweeping robots, and other devices that require network configuration to access the cloud server on the network side. After the IoT devices are successfully networked, users can remotely interact with and control the IoT devices.
[0040] The cloud platform of this embodiment includes a cloud server and an application running on a mobile device (such as a mobile phone or other user device). The IoT device can be connected to the cloud server and the application on the mobile device. The mobile device is connected to the cloud server via a remote wireless network, and the mobile device is connected to the IoT device via a network such as Bluetooth. During the network configuration stage of the IoT device, the mobile terminal is used to assist in the network configuration. After the network configuration is completed, the mobile terminal can remotely control the IoT device based on the target cloud platform.
[0041] When the IoT device leaves the factory, by presetting the network configuration key in the IoT device, one or more cloud platforms (such as Alibaba, Amazon, Mijia, etc.) can be selected to be supported. Subsequently, the IoT device can select a target cloud platform from the supported multiple cloud platforms for access. The network configuration key of this embodiment is used by the cloud platform to perform security and validity verification on the IoT device to be connected, to ensure the security and validity of the access device.
[0042] Step S204, connecting to the target cloud server of the target cloud platform based on the network configuration key;
[0043] Step S206, obtaining the platform firmware of the IoT device from the target cloud server, wherein the platform firmware is used to implement communication protocol conversion between the IoT device and the target cloud platform;
[0044] The IoT device of this embodiment includes device firmware and platform firmware. The device firmware is burned into the IoT device locally when it leaves the factory, and the platform firmware is stored on the cloud server. The IoT device obtains it through a request. The device firmware is used to implement the common functional logic of the IoT device on multiple cloud platforms, such as the control logic of the device itself (such as the refrigeration control program of the air conditioner). The platform firmware is used to implement the personalized functions of the IoT device on the target cloud platform and realize the communication protocol conversion between the IoT device and the target cloud platform, such as the data encryption and decryption rules, data encoding and decoding rules, and instruction mapping rules between the IoT device and the target cloud server. Each cloud platform corresponds to a platform firmware.
[0045] Through the above steps, the network configuration key of the target cloud platform to be accessed is read from the preset storage area, wherein the network configuration key is used by the cloud platform to verify the IoT device to be accessed; the target cloud server of the target cloud platform is connected based on the network configuration key; the platform firmware of the IoT device is obtained from the target cloud server, wherein the platform firmware is used to realize the communication protocol conversion between the IoT device and the target cloud platform, and after the IoT device accesses the selected target cloud server, the platform firmware of the IoT device is obtained from the target cloud server. The IoT device does not need to burn the platform firmware in the production stage, and the user can flexibly choose different cloud platforms to access according to different product needs. The IoT device only needs to maintain the device firmware of general functions during production, and there is no need to burn the platform firmware of all cloud platforms at the same time in the production stage, which improves the utilization rate of the storage resources of the IoT device, reduces the firmware burning time of the IoT device in the production stage, and solves the technical problem in the related technology that the IoT device needs to burn multiple platform firmware in the production stage.
[0046] In one implementation of this embodiment, connecting to the target cloud server of the target cloud platform based on the network configuration key includes:
[0047] S11, establishing a Bluetooth communication link between the Internet of Things device and the mobile terminal based on the network configuration key;
[0048] In one example, establishing a Bluetooth communication link between the Internet of Things device and the mobile terminal based on the network configuration key includes: determining a target cloud platform supported by the Internet of Things device according to the network configuration key; broadcasting Bluetooth-assisted network configuration information of the target cloud platform; and establishing a Bluetooth communication link between the Internet of Things device and the mobile terminal based on the Bluetooth-assisted network configuration information.
[0049] The IoT device of this embodiment can pre-burn one or more network configuration keys in the preset storage area. If only one network configuration key is burned, the IoT device broadcasts the Bluetooth auxiliary network configuration information of the platform. During the device networking activation process, the cloud platform is connected by default. If multiple network configuration keys are burned, the IoT device uses the Bluetooth broadcast polling playback method to poll and send Bluetooth broadcasts of multiple cloud platforms. Subsequently, the IoT device can distinguish the cloud platform to which the terminal APP connected to the device belongs based on the GATT service and other information accessed when the terminal APP corresponding to different cloud platforms connects to the device Bluetooth.
[0050] By adopting the solution of this embodiment, by broadcasting the Bluetooth-assisted network configuration information of the target cloud platform supported by the IoT device, the IoT device can be connected only to the APP of the cloud platform supported by the device, thereby improving the effectiveness of establishing a connection between the IoT device and the mobile terminal and avoiding connection failure.
[0051] Optionally, determining the target cloud platform supported by the Internet of Things device based on the network configuration key includes: locating the partition address of the network configuration key in the preset storage area, wherein the preset storage area includes several partition addresses, each partition address is used to store the network configuration key of a cloud platform; and searching for a target cloud platform that matches the partition address.
[0052] Before the IoT device leaves the factory, an area for storing the cloud platform network configuration key is pre-allocated in the flash of the IoT device. The flash addresses of the network configuration keys of different cloud platforms are different. In the production environment, the required cloud platform keys are burned into the device according to product requirements. After the IoT device is powered on for the first time, it will read the corresponding network configuration key in the flash partition, and distinguish the cloud platform that the IoT device supports or needs to connect to based on the different flash addresses of the keys read.
[0053] By adopting the solution of this embodiment, the first partition address is divided in the IoT device, and each partition address stores a network configuration key of a cloud platform. The IoT device determines the target cloud platform supported by the IoT device by identifying the partition address where the read network configuration key is located, thereby improving the efficiency of the IoT device in identifying the cloud platform it supports.
[0054] In addition to determining the target cloud platform by the partition address, you can also set a mapping table that stores the mapping relationship between the network configuration key and the cloud platform identifier. The IoT device can also identify the cloud platform corresponding to the currently read network configuration key by searching and retrieving the mapping table.
[0055] S12, receiving the network configuration routing information sent by the mobile terminal using the Bluetooth communication link;
[0056] S13: Access the target cloud server according to the network configuration routing information and the network configuration key.
[0057] First, a Bluetooth communication link is established between the IoT device and the mobile terminal, and then the network configuration routing information for the IoT device to access the target cloud server is obtained. Since the APP currently logged in by the mobile terminal and the target cloud server to be accessed by the IoT device are on the same cloud platform, automatic network configuration of the IoT device is achieved, which improves the success rate of network configuration and reduces the difficulty of network configuration.
[0058] In one example, accessing the target cloud server according to the network configuration routing information and the network configuration key includes: parsing the routing address and server address in the network configuration routing information; using the routing address and server address to request access to the target cloud server, and sending the network configuration key to the target cloud server; after the target cloud server uses the network configuration key to verify that the IoT device has passed, connecting the IoT device to the target cloud server.
[0059] Optionally, the routing information includes the IP address of the router, WIFI account and password, and the server address includes the IP address, MAC address, and other domain name information of the target cloud server.
[0060] By adopting the solution of this embodiment, the routing address and server address are parsed directly from the network configuration routing information sent by the mobile device. The routing address and server address can be directly read from the router currently accessed by the mobile device and the application information of the currently logged-in cloud platform, thereby improving the efficiency of IoT devices accessing the target cloud server.
[0061] In an implementation scenario of this embodiment, after establishing a Bluetooth communication link between the Internet of Things device and the mobile terminal based on the network configuration key, it also includes: determining a generic attribute protocol GATT (Generic Attribute) service of the Bluetooth communication link; reading a universally unique identifier UUID (Universally Unique Identifier) feature of the GATT service, wherein the UUID feature is used to characterize application information using the Bluetooth communication link; and identifying a target cloud platform for the mobile terminal to log in based on the UUID feature.
[0062] When the terminal APP corresponding to different cloud platforms connects to the device Bluetooth, the accessed GATT service is different, so as to distinguish the cloud platform to which the APP of the mobile terminal connected to the IoT device belongs. Since IoT devices generally support multiple cloud platforms, the APPs used by mobile terminals to connect to different cloud platforms are also different. During the Bluetooth connection process between the APP and the IoT device, different APPs access the device-side Bluetooth service with different UUID characteristics. The different UUID characteristics can be used to distinguish which APP of the mobile terminal is making the Bluetooth connection. The APP corresponds to the cloud platform one-to-one, and then the target cloud platform logged in by the mobile terminal can be distinguished.
[0063] By adopting the solution of this embodiment, the target cloud platform logged in by the mobile terminal is identified through the UUID feature of the Bluetooth communication link, thereby improving the accuracy of the IoT device in identifying the target cloud platform currently logged in by the mobile terminal connected to it by Bluetooth, and providing a guarantee for the subsequent direct interaction between the IoT device and the mobile terminal.
[0064] In addition, the target cloud platform logged in by the mobile terminal can be identified by requesting the program attribute information (such as program identification, developer, etc.) of the application currently logged in to the mobile terminal through the Bluetooth communication link.
[0065] In one implementation of the present embodiment, obtaining the platform firmware of the IoT device from the target cloud server includes: sending a firmware request to the target cloud server; receiving the platform firmware issued by the cloud server based on the firmware request; merging the platform firmware with the local device firmware of the IoT device to obtain a merged firmware, wherein the device firmware is used to implement the general functional logic of the IoT device; and loading the merged firmware locally on the IoT device.
[0066] Because the reporting logic of IoT devices and different cloud platforms is different, the platform firmware is different. It is necessary to obtain the corresponding platform firmware of the target cloud platform to be connected before the device is connected to the cloud and activated. After the terminal APP establishes a connection with the device to be configured, obtains the routing information and successfully connects to the route, first connects to the target cloud server, connects to the server that pre-stores the platform firmware of the corresponding cloud platform, downloads the platform firmware in the server to the flash reserved for the device, and merges it with the local device firmware of the device to obtain the merged firmware. The merged firmware can realize complete functions through the target cloud platform, including the general functions of the IoT device and the personalized functions between the target cloud platform. By loading the local device firmware and the platform firmware currently connected to the cloud platform, the functional integrity and flexibility of the IoT device are guaranteed on the basis of avoiding burning the platform firmware of multiple cloud platforms in the production stage.
[0067] By adopting the scheme of this embodiment, the IoT device can also pull the platform firmware from the third-party server. After reading the network configuration key of the target cloud platform to be connected from the preset storage area, it also includes: receiving the routing address and third-party server address sent by the mobile terminal, accessing the third-party server based on the routing address and the third-party server address, and sending a firmware request to the third-party server (carrying the device identification of the IoT device and the platform identification of the target cloud platform); receiving the platform firmware issued by the third-party server based on the firmware request; merging the platform firmware with the local device firmware of the IoT device to obtain a merged firmware, wherein the device firmware is used to implement the general functional logic of the IoT device. After the firmware merging is completed, the device to be activated connects to the cloud according to the cloud platform selected during the Bluetooth connection process and the key of the platform.
[0068] Optionally, after obtaining the platform firmware of the Internet of Things device from the target cloud server, it also includes: receiving a function upgrade request issued by the target cloud server, wherein the function upgrade request carries new firmware data; and using the firmware data to upgrade the Internet of Things device.
[0069] Optionally, the firmware data may be firmware data of a platform firmware or a device firmware, and is used to update platform functions or general device functions.
[0070] This proposal can realize remote upgrade of equipment, and all subsequent function upgrades can be solved in the cloud, without the need for manual offline upgrades, which improves the upgrade efficiency of IoT devices and reduces the operation and maintenance success of equipment.
[0071] Figure 3 It is an interactive diagram of device network configuration in an embodiment of the present invention, including:
[0072] S31. The mobile terminal logs in to the APP of the cloud platform, scans the attached IoT device, and connects it via Bluetooth.
[0073] S32, the IoT device determines the connected APP and identifies the cloud platform corresponding to the APP;
[0074] S33, the mobile terminal transmits relevant routing and cloud platform related information (such as the address of the cloud server) to the IoT device;
[0075] S34, the IoT device responds and connects to the cloud server of the cloud platform according to the information transmitted by the mobile terminal;
[0076] S35, the cloud server transmits the platform firmware to the IoT device, and the IoT device merges the received firmware with the local device firmware;
[0077] S36. When the IoT device needs to be upgraded, the cloud server sends a function upgrade link;
[0078] S37. The IoT device completes the function upgrade and notifies the mobile terminal.
[0079] The solution of this embodiment can ensure that when the device firmware is burned in the production stage, it will not be affected by changes in device function logic and the cloud platform. Function changes only require uploading new firmware to the cloud for remote upgrading. There is no need to change the platform firmware burned before leaving the factory according to different cloud platform products. Different cloud platforms can be flexibly selected for access according to the needs of different products. Device production only needs to maintain device firmware with general functions, which is convenient for developers to maintain code.
[0080] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0081] Example 2
[0082] In this embodiment, a network distribution device for a device is also provided, and the network distribution device for the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and hardware for the reservation function. Although the network distribution device for the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, can also be conceived.
[0083] Figure 4 is a structural block diagram of a network distribution device of an equipment in an embodiment of the present invention, such as Figure 4 As shown, it is applied in IoT devices, including:
[0084] A reading module 40 is used to read the network configuration key of the target cloud platform to be connected from a preset storage area, wherein the network configuration key is used by the cloud platform to verify the IoT device to be connected;
[0085] A connection module 42, configured to connect to a target cloud server of the target cloud platform based on the network configuration key;
[0086] The acquisition module 44 is used to obtain the platform firmware of the Internet of Things device from the target cloud server, wherein the platform firmware is used to implement the communication protocol conversion between the Internet of Things device and the target cloud platform.
[0087] Optionally, the connection module includes: an establishment unit, used to establish a Bluetooth communication link between the Internet of Things device and the mobile terminal based on the network configuration key; a receiving unit, used to receive the network configuration routing information sent by the mobile terminal using the Bluetooth communication link; and an access unit, used to access the target cloud server according to the network configuration routing information and the network configuration key.
[0088] Optionally, the establishment unit includes: a determination subunit, used to determine the target cloud platform supported by the Internet of Things device according to the network configuration key; a broadcast subunit, used to broadcast the Bluetooth-assisted network configuration information of the target cloud platform; and an establishment subunit, used to establish a Bluetooth communication link between the Internet of Things device and the mobile terminal based on the Bluetooth-assisted network configuration information.
[0089] Optionally, the determination subunit is also used to: locate the partition address of the network configuration key in the preset storage area, wherein the preset storage area includes several partition addresses, each partition address is used to store the network configuration key of a cloud platform; and search for a target cloud platform that matches the partition address.
[0090] Optionally, the device includes: a determination module, used to determine the general attribute protocol GATT service of the Bluetooth communication link after the connection module establishes the Bluetooth communication link between the Internet of Things device and the mobile terminal based on the network configuration key; a reading module, used to read the universal unique identification code UUID feature of the GATT service, wherein the UUID feature is used to characterize the application information using the Bluetooth communication link; an identification module, used to identify the target cloud platform for the mobile terminal to log in based on the UUID feature.
[0091] Optionally, the access unit includes: a parsing subunit, used to parse the routing address and server address in the network configuration routing information; a processing subunit, used to use the routing address and server address to request access to the target cloud server, and send the network configuration key to the target cloud server; an access subunit, used to connect the Internet of Things device to the target cloud server after the target cloud server uses the network configuration key to verify that the Internet of Things device has passed.
[0092] Optionally, the acquisition module includes: a sending unit, used to send a firmware request to the target cloud server; a receiving unit, used to receive the platform firmware issued by the cloud server based on the firmware request; a merging unit, used to merge the platform firmware with the local device firmware of the IoT device to obtain a merged firmware, wherein the device firmware is used to implement the general functional logic of the IoT device; and a loading unit, used to load the merged firmware locally on the IoT device.
[0093] Optionally, the device also includes: a receiving module, used to receive a function upgrade request issued by the target cloud server after the acquisition module obtains the platform firmware of the Internet of Things device from the target cloud server, wherein the function upgrade request carries new firmware data; and an upgrading module, used to upgrade the Internet of Things device using the firmware data.
[0094] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0095] Example 3
[0096] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0097] Optionally, in this embodiment, the above storage medium may be configured to store a computer program for executing:
[0098] S1, reading the network configuration key of the target cloud platform to be connected from the preset storage area, wherein the network configuration key is used by the cloud platform to verify the IoT device to be connected;
[0099] S2, connecting to the target cloud server of the target cloud platform based on the network configuration key;
[0100] S3, obtaining the platform firmware of the Internet of Things device from the target cloud server, wherein the platform firmware is used to implement communication protocol conversion between the Internet of Things device and the target cloud platform.
[0101] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0102] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0103] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0104] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0105] S1, reading the network configuration key of the target cloud platform to be connected from the preset storage area, wherein the network configuration key is used by the cloud platform to verify the IoT device to be connected;
[0106] S2, connecting to the target cloud server of the target cloud platform based on the network configuration key;
[0107] S3, obtaining the platform firmware of the Internet of Things device from the target cloud server, wherein the platform firmware is used to implement communication protocol conversion between the Internet of Things device and the target cloud platform.
[0108] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0109] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0110] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0111] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0112] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0113] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0114] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, controller or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., various media that can store program codes.
[0115] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A network distribution method for a device, characterized in that: Applications in IoT devices include: Reading a network configuration key of a target cloud platform to be connected from a preset storage area, wherein the network configuration key is used by the cloud platform to verify the IoT device to be connected, and the preset storage area includes a plurality of partition addresses, each partition address is used to store a network configuration key of a cloud platform; Connecting to a target cloud server of the target cloud platform based on the network configuration key; Acquire the platform firmware of the Internet of Things device from the target cloud server, wherein the platform firmware is used to implement the communication protocol conversion between the Internet of Things device and the target cloud platform; Acquiring the platform firmware of the IoT device from the target cloud server includes: Sending a firmware request to the target cloud server; Receiving platform firmware issued by the cloud server based on the firmware request; Merging the platform firmware with the local device firmware of the IoT device to obtain a merged firmware, wherein the device firmware is used to implement the general functional logic of the IoT device; The merged firmware is loaded locally on the IoT device.
2. The method according to claim 1, characterized in that The target cloud server connected to the target cloud platform based on the network configuration key includes: Establishing a Bluetooth communication link between the IoT device and the mobile terminal based on the network configuration key; Receiving network configuration routing information sent by the mobile terminal using the Bluetooth communication link; Access the target cloud server according to the network configuration routing information and the network configuration key.
3. The method according to claim 2, characterized in that Establishing a Bluetooth communication link between the Internet of Things device and the mobile terminal based on the network configuration key includes: Determine the target cloud platform supported by the IoT device according to the network configuration key; Broadcasting the Bluetooth-assisted network configuration information of the target cloud platform; A Bluetooth communication link is established between the Internet of Things device and the mobile terminal based on the Bluetooth-assisted network configuration information.
4. The method according to claim 3, characterized in that Determining the target cloud platform supported by the IoT device according to the network configuration key includes: Locating the partition address of the network configuration key in the preset storage area; Find the target cloud platform that matches the partition address.
5. The method according to claim 2, characterized in that: After establishing a Bluetooth communication link between the Internet of Things device and the mobile terminal based on the network configuration key, the method further includes: Determine the general attribute protocol GATT service of the Bluetooth communication link; Reading a universal unique identifier (UUID) feature of the GATT service, wherein the UUID feature is used to represent application information using the Bluetooth communication link; The target cloud platform for logging in by the mobile terminal is identified based on the UUID feature.
6. The method according to claim 2, characterized in that Accessing the target cloud server according to the network configuration routing information and the network configuration key includes: Parsing the routing address and server address in the distribution network routing information; Using the routing address and server address to request access to the target cloud server, and sending the network configuration key to the target cloud server; After the target cloud server verifies the IoT device with the network configuration key, the IoT device is connected to the target cloud server.
7. The method according to claim 1, characterized in that After obtaining the platform firmware of the Internet of Things device from the target cloud server, the method further includes: Receiving a function upgrade request sent by the target cloud server, wherein the function upgrade request carries new firmware data; The IoT device is upgraded using the firmware data.
8. A network distribution device for equipment, characterized in that: Applications in IoT devices include: A reading module, used to read the network configuration key of the target cloud platform to be connected from a preset storage area, wherein the network configuration key is used by the cloud platform to verify the IoT device to be connected, and the preset storage area includes a plurality of partition addresses, each partition address is used to store the network configuration key of a cloud platform; A connection module, used to connect to a target cloud server of the target cloud platform based on the network configuration key; An acquisition module, used to acquire the platform firmware of the Internet of Things device from the target cloud server, wherein the platform firmware is used to implement communication protocol conversion between the Internet of Things device and the target cloud platform; The acquisition module includes: a sending unit, used to send a firmware request to the target cloud server; a receiving unit, used to receive the platform firmware issued by the cloud server based on the firmware request; a merging unit, used to merge the platform firmware with the local device firmware of the IoT device to obtain a merged firmware, wherein the device firmware is used to implement the general functional logic of the IoT device; and a loading unit, used to load the merged firmware locally on the IoT device.
9. A network distribution system for equipment, characterized in that: Including IoT devices, mobile terminals, and target cloud servers, among which, The Internet of Things device comprises the apparatus described in claim 8.
10. A storage medium, characterized in that: A computer program is stored in the storage medium, wherein the computer program is configured to execute the steps of the network configuration method for a device in any one of claims 1 to 7 when running.
11. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein: The processor, the communication interface, and the memory communicate with each other via a communication bus; wherein: Memory, used to store computer programs; A processor, configured to execute the steps of the network configuration method of the device according to any one of claims 1 to 7 by running a program stored in a memory.
Citation Information
Patent Citations
Equipment network distribution method and device and Internet of Things equipment
CN111953550A